|
1 |
| -import PropTypes from "prop-types"; |
2 | 1 | import React from "react";
|
3 | 2 | import { isEmpty } from "lodash";
|
4 | 3 | import {
|
5 |
| - PropTypes as CustomPropTypes, |
6 | 4 | VictoryLabel,
|
7 |
| - CommonProps, |
8 | 5 | VictoryContainer,
|
9 | 6 | VictoryTheme,
|
10 | 7 | LineSegment,
|
@@ -90,75 +87,6 @@ class VictoryAxisBase extends React.Component<VictoryAxisProps> {
|
90 | 87 | },
|
91 | 88 | };
|
92 | 89 |
|
93 |
| - static propTypes = { |
94 |
| - ...CommonProps.baseProps, |
95 |
| - axisComponent: PropTypes.element, |
96 |
| - axisLabelComponent: PropTypes.element, |
97 |
| - axisValue: PropTypes.oneOfType([ |
98 |
| - PropTypes.number, |
99 |
| - PropTypes.string, |
100 |
| - PropTypes.object, |
101 |
| - ]), |
102 |
| - categories: PropTypes.oneOfType([ |
103 |
| - PropTypes.arrayOf(PropTypes.string), |
104 |
| - PropTypes.shape({ |
105 |
| - x: PropTypes.arrayOf(PropTypes.string), |
106 |
| - y: PropTypes.arrayOf(PropTypes.string), |
107 |
| - }), |
108 |
| - ]), |
109 |
| - crossAxis: PropTypes.bool, |
110 |
| - dependentAxis: PropTypes.bool, |
111 |
| - events: PropTypes.arrayOf( |
112 |
| - PropTypes.shape({ |
113 |
| - target: PropTypes.oneOf([ |
114 |
| - "axis", |
115 |
| - "axisLabel", |
116 |
| - "grid", |
117 |
| - "ticks", |
118 |
| - "tickLabels", |
119 |
| - ]), |
120 |
| - eventKey: PropTypes.oneOfType([ |
121 |
| - PropTypes.array, |
122 |
| - CustomPropTypes.allOfType([ |
123 |
| - CustomPropTypes.integer, |
124 |
| - CustomPropTypes.nonNegative, |
125 |
| - ]), |
126 |
| - PropTypes.string, |
127 |
| - ]), |
128 |
| - eventHandlers: PropTypes.object, |
129 |
| - }), |
130 |
| - ), |
131 |
| - fixLabelOverlap: PropTypes.bool, |
132 |
| - gridComponent: PropTypes.element, |
133 |
| - groupComponent: PropTypes.element, |
134 |
| - invertAxis: PropTypes.bool, |
135 |
| - label: PropTypes.any, |
136 |
| - offsetX: PropTypes.number, |
137 |
| - offsetY: PropTypes.number, |
138 |
| - orientation: PropTypes.oneOf(["top", "bottom", "left", "right"]), |
139 |
| - origin: PropTypes.shape({ x: PropTypes.number, y: PropTypes.number }), |
140 |
| - stringMap: PropTypes.object, |
141 |
| - style: PropTypes.shape({ |
142 |
| - parent: PropTypes.object, |
143 |
| - axis: PropTypes.object, |
144 |
| - axisLabel: PropTypes.object, |
145 |
| - grid: PropTypes.object, |
146 |
| - ticks: PropTypes.object, |
147 |
| - tickLabels: PropTypes.object, |
148 |
| - }), |
149 |
| - tickComponent: PropTypes.element, |
150 |
| - tickCount: CustomPropTypes.allOfType([ |
151 |
| - CustomPropTypes.integer, |
152 |
| - CustomPropTypes.greaterThanZero, |
153 |
| - ]), |
154 |
| - tickFormat: PropTypes.oneOfType([ |
155 |
| - PropTypes.func, |
156 |
| - CustomPropTypes.homogeneousArray, |
157 |
| - ]), |
158 |
| - tickLabelComponent: PropTypes.element, |
159 |
| - tickValues: CustomPropTypes.homogeneousArray, |
160 |
| - }; |
161 |
| - |
162 | 90 | static defaultProps = {
|
163 | 91 | axisComponent: <LineSegment />,
|
164 | 92 | axisLabelComponent: <VictoryLabel />,
|
|
0 commit comments