@@ -32,8 +32,8 @@ export interface ChartProps extends VictoryChartProps {
32
32
* The animate prop should also be used to specify enter and exit
33
33
* transition configurations with the `onExit` and `onEnter` namespaces respectively.
34
34
*
35
- * @example
36
- * {duration: 500, onExit: () => {}, onEnter: {duration: 500, before: () => ({y: 0})}) }
35
+ * @propType boolean | object
36
+ * @example {duration: 500, onExit: () => {}, onEnter: {duration: 500, before: () => ({y: 0})}) }
37
37
*/
38
38
animate ?: boolean | AnimatePropTypeInterface ;
39
39
/**
@@ -78,11 +78,15 @@ export interface ChartProps extends VictoryChartProps {
78
78
*/
79
79
containerComponent ?: React . ReactElement < any > ;
80
80
/**
81
- * **This prop should not be set manually.**
81
+ * Note: This prop should not be set manually.
82
+ *
83
+ * @hide
82
84
*/
83
85
defaultAxes ?: AxesType ;
84
86
/**
85
- * **This prop should not be set manually.**
87
+ * Note: This prop should not be set manually.
88
+ *
89
+ * @hide
86
90
*/
87
91
defaultPolarAxes ?: AxesType ;
88
92
/**
@@ -92,14 +96,22 @@ export interface ChartProps extends VictoryChartProps {
92
96
* If this prop is not provided, a domain will be calculated from data, or other
93
97
* available information.
94
98
*
95
- * @example [-1, 1], {x: [0, 100], y: [0, 1]}
99
+ * @propType number[] | { x: number[], y: number[] }
100
+ * @example [low, high], { x: [low, high], y: [low, high] }
101
+ *
102
+ * [-1, 1], {x: [0, 100], y: [0, 1]}
96
103
*/
97
104
domain ?: DomainPropType ;
98
105
/**
99
106
* The domainPadding prop specifies a number of pixels of padding to add to the
100
107
* beginning and end of a domain. This prop is useful for explicitly spacing ticks farther
101
108
* from the origin to prevent crowding. This prop should be given as an object with
102
109
* numbers specified for x and y.
110
+ *
111
+ * @propType number | number[] | { x: number[], y: number[] }
112
+ * @example [left, right], { x: [left, right], y: [bottom, top] }
113
+ *
114
+ * {x: [10, -10], y: 5}
103
115
*/
104
116
domainPadding ?: DomainPaddingPropType ;
105
117
/**
@@ -112,6 +124,8 @@ export interface ChartProps extends VictoryChartProps {
112
124
/**
113
125
* Similar to data accessor props `x` and `y`, this prop may be used to functionally
114
126
* assign eventKeys to data
127
+ *
128
+ * @propType number | string | Function
115
129
*/
116
130
eventKey ?: StringOrNumberOrCallback ;
117
131
/**
@@ -129,6 +143,7 @@ export interface ChartProps extends VictoryChartProps {
129
143
* element (i.e. a single bar), and the object returned from the mutation function
130
144
* will override the props of the selected element via object assignment.
131
145
*
146
+ * @propType object[]
132
147
* @example
133
148
* events={[
134
149
* {
@@ -158,6 +173,8 @@ export interface ChartProps extends VictoryChartProps {
158
173
events ?: EventPropTypeInterface < string , string [ ] | number [ ] | string | number > [ ] ;
159
174
/**
160
175
* Chart uses the standard externalEventMutations prop.
176
+ *
177
+ * @propType object[]
161
178
*/
162
179
externalEventMutations ?: EventCallbackInterface < string | string [ ] , StringOrNumberOrList > [ ] ;
163
180
/**
@@ -183,6 +200,8 @@ export interface ChartProps extends VictoryChartProps {
183
200
horizontal ?: boolean ;
184
201
/**
185
202
* When the innerRadius prop is set, polar charts will be hollow rather than circular.
203
+ *
204
+ * @propType number | Function
186
205
*/
187
206
innerRadius ?: number ;
188
207
/**
@@ -239,7 +258,7 @@ export interface ChartProps extends VictoryChartProps {
239
258
* dependent variable. This may cause confusion in horizontal charts, as the independent variable will corresponds to
240
259
* the y axis.
241
260
*
242
- * examples:
261
+ * @example
243
262
*
244
263
* maxDomain={0}
245
264
* maxDomain={{ y: 0 }}
@@ -254,7 +273,7 @@ export interface ChartProps extends VictoryChartProps {
254
273
* dependent variable. This may cause confusion in horizontal charts, as the independent variable will corresponds to
255
274
* the y axis.
256
275
*
257
- * examples:
276
+ * @example
258
277
*
259
278
* minDomain={0}
260
279
* minDomain={{ y: 0 }}
@@ -265,10 +284,14 @@ export interface ChartProps extends VictoryChartProps {
265
284
* the edge of the chart and any rendered child components. This prop can be given
266
285
* as a number or as an object with padding specified for top, bottom, left
267
286
* and right.
287
+ *
288
+ * @propType number | { top: number, bottom: number, left: number, right: number }
268
289
*/
269
290
padding ?: PaddingProps ;
270
291
/**
271
- * **This prop should not be set manually.**
292
+ * Note: This prop should not be set manually.
293
+ *
294
+ * @hide
272
295
*/
273
296
prependDefaultAxes ?: boolean ;
274
297
/**
@@ -283,7 +306,8 @@ export interface ChartProps extends VictoryChartProps {
283
306
* chart must share the same range, so setting this prop on children nested within Chart, ChartStack, or
284
307
* ChartGroup will have no effect. This prop is usually not set manually.
285
308
*
286
- * examples:
309
+ * @propType number[] | { x: number[], y: number[] }
310
+ * @example [low, high] | { x: [low, high], y: [low, high] }
287
311
*
288
312
* Cartesian: range={{ x: [50, 250], y: [50, 250] }}
289
313
* Polar: range={{ x: [0, 360], y: [0, 250] }}
@@ -294,6 +318,7 @@ export interface ChartProps extends VictoryChartProps {
294
318
* given as a string specifying a supported scale ("linear", "time", "log", "sqrt"),
295
319
* as a d3 scale function, or as an object with scales specified for x and y
296
320
*
321
+ * @propType string | { x: string, y: string }
297
322
* @example d3Scale.time(), {x: "linear", y: "log"}
298
323
*/
299
324
scale ?:
@@ -306,7 +331,9 @@ export interface ChartProps extends VictoryChartProps {
306
331
/**
307
332
* The sharedEvents prop is used internally to coordinate events between components.
308
333
*
309
- * **This prop should not be set manually.**
334
+ * Note: This prop should not be set manually.
335
+ *
336
+ * @hide
310
337
*/
311
338
sharedEvents ?: { events : any [ ] ; getEventState : Function } ;
312
339
/**
@@ -321,7 +348,7 @@ export interface ChartProps extends VictoryChartProps {
321
348
* value refers to the dependent variable. This may cause confusion in horizontal charts, as the independent variable
322
349
* will corresponds to the y axis.
323
350
*
324
- * examples:
351
+ * @example
325
352
*
326
353
* singleQuadrantDomainPadding={false}
327
354
* singleQuadrantDomainPadding={{ x: false }}
@@ -344,11 +371,16 @@ export interface ChartProps extends VictoryChartProps {
344
371
* The style prop defines the style of the component. The style prop should be given as an object with styles defined
345
372
* for data, labels and parent. Any valid svg styles are supported, but width, height, and padding should be specified
346
373
* via props as they determine relative layout for components in Chart.
374
+ *
375
+ * @propType { parent: object, background: object }
376
+ * @propType { parent: object, background: object }
347
377
*/
348
378
style ?: Pick < VictoryStyleInterface , 'parent' > & { background ?: VictoryStyleObject } ;
349
379
/**
350
380
* The theme prop specifies a theme to use for determining styles and layout properties for a component. Any styles or
351
381
* props defined in theme may be overwritten by props specified on the component instance.
382
+ *
383
+ * @propType object
352
384
*/
353
385
theme ?: ChartThemeDefinition ;
354
386
/**
0 commit comments