victory-box-plot 31.0.0 → 31.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -71
- package/dist/victory-box-plot.js +1884 -1503
- package/dist/victory-box-plot.min.js +1 -1
- package/es/helper-methods.js +20 -9
- package/es/victory-box-plot.js +46 -21
- package/lib/helper-methods.js +22 -9
- package/lib/victory-box-plot.js +47 -21
- package/package.json +2 -2
- package/src/helper-methods.js +94 -44
- package/src/victory-box-plot.js +120 -55
package/README.md
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
# VictoryBoxPlot
|
|
3
2
|
|
|
4
3
|
`victory-box-plot@^30.0.0` exports `VictoryBoxPlot` component
|
|
@@ -86,7 +85,7 @@ containerComponent={<VictoryVoronoiContainer/>}
|
|
|
86
85
|
The `data` prop for `VictoryBoxPlot` may be given in a a variety of formats:
|
|
87
86
|
|
|
88
87
|
- As an array of standard data objects with values specified for `x` and `y`
|
|
89
|
-
When given in this format, repeated values for either `x
|
|
88
|
+
When given in this format, repeated values for either `x`or `y` will be used for calculating summary statistics
|
|
90
89
|
|
|
91
90
|
```jsx
|
|
92
91
|
data={[
|
|
@@ -151,7 +150,7 @@ domainPadding={{x: [10, -10], y: 5}}
|
|
|
151
150
|
`VictoryBoxPlot` uses the standard `eventKey` prop to specify how event targets are addressed. **This prop is not commonly used.** [Read about the `eventKey` prop in more detail here](https://formidable.com/open-source/victory/docs/common-props#eventkey)
|
|
152
151
|
|
|
153
152
|
```jsx
|
|
154
|
-
eventKey="x"
|
|
153
|
+
eventKey = "x";
|
|
155
154
|
```
|
|
156
155
|
|
|
157
156
|
### events
|
|
@@ -206,7 +205,7 @@ See the [Events Guide][] for more information on defining events.
|
|
|
206
205
|
|
|
207
206
|
`VictoryBoxPlot` uses the standard `groupComponent` prop. [Read about it here](https://formidable.com/open-source/victory/docs/common-props#groupcomponent)
|
|
208
207
|
|
|
209
|
-
|
|
208
|
+
_default:_ `<g/>`
|
|
210
209
|
|
|
211
210
|
```jsx
|
|
212
211
|
groupComponent={<g transform="translate(10, 10)" />}
|
|
@@ -218,7 +217,7 @@ groupComponent={<g transform="translate(10, 10)" />}
|
|
|
218
217
|
|
|
219
218
|
`VictoryBoxPlot` uses the standard `height` prop. [Read about it here](https://formidable.com/open-source/victory/docs/common-props#height)
|
|
220
219
|
|
|
221
|
-
|
|
220
|
+
_default (provided by default theme):_ `height={300}`
|
|
222
221
|
|
|
223
222
|
```jsx
|
|
224
223
|
height={400}
|
|
@@ -230,7 +229,7 @@ height={400}
|
|
|
230
229
|
|
|
231
230
|
The horizontal prop determines whether boxes will be laid vertically or horizontally. The boxes will be vertical if this prop is false or unspecified, or horizontal if the prop is set to true.
|
|
232
231
|
|
|
233
|
-
|
|
232
|
+
_Note: Data should be flipped when `horizontal` is true_
|
|
234
233
|
|
|
235
234
|
```playground
|
|
236
235
|
<VictoryChart domainPadding={20}>
|
|
@@ -280,25 +279,25 @@ Use the `max` data accessor prop to define the max value of a box plot.
|
|
|
280
279
|
|
|
281
280
|
**string:** specify which property in an array of data objects should be used as the max value
|
|
282
281
|
|
|
283
|
-
|
|
282
|
+
_examples:_ `max="max_value"`
|
|
284
283
|
|
|
285
284
|
**function:** use a function to translate each element in a data array into a max value
|
|
286
285
|
|
|
287
|
-
|
|
286
|
+
_examples:_ `max={() => 10}`
|
|
288
287
|
|
|
289
288
|
**path string or path array:** specify which property in an array of nested data objects should be used as a max value
|
|
290
289
|
|
|
291
|
-
|
|
290
|
+
_examples:_ `max="bonds.max"`, `max={["bonds", "max"]}`
|
|
292
291
|
|
|
293
292
|
### maxComponent
|
|
294
293
|
|
|
295
294
|
`type: element`
|
|
296
295
|
|
|
297
|
-
The `maxComponent` prop takes a component instance which will be responsible for rendering an element to represent the maximum value of the box plot. The new element created from the passed `maxComponent` will be provided with the following props calculated by `VictoryBoxPlot`:
|
|
296
|
+
The `maxComponent` prop takes a component instance which will be responsible for rendering an element to represent the maximum value of the box plot. The new element created from the passed `maxComponent` will be provided with the following props calculated by `VictoryBoxPlot`: `datum`, `index`, `scale`, `style`, `events`, `majorWhisker` and `minorWhisker`. The `majorWhisker` and `minorWhisker` props are given as objects with values for `x1`, `y1`, `x2` and `y2` that describes the lines that make up the major and minor whisker. Any of these props may be overridden by passing in props to the supplied component, or modified or ignored within the custom component itself. If a `maxComponent` is not provided, `VictoryBoxPlot` will use its default [Whisker component][].
|
|
298
297
|
|
|
299
298
|
See the [Custom Components Guide][] for more detail on creating your own components
|
|
300
299
|
|
|
301
|
-
|
|
300
|
+
_default:_ `maxComponent={<Whisker/>}`
|
|
302
301
|
|
|
303
302
|
```jsx
|
|
304
303
|
maxComponent={<Whisker events={{ onClick: handleClick }}/>}
|
|
@@ -312,7 +311,7 @@ The `maxLabelComponent` prop takes a component instance which will be used to re
|
|
|
312
311
|
|
|
313
312
|
See the [Custom Components Guide][] for more detail on creating your own components
|
|
314
313
|
|
|
315
|
-
|
|
314
|
+
_default:_ `maxLabelComponent={<VictoryLabel/>}`
|
|
316
315
|
|
|
317
316
|
```jsx
|
|
318
317
|
maxLabelComponent={<VictoryLabel dy={20}/>}
|
|
@@ -342,7 +341,8 @@ maxLabelComponent={<VictoryLabel dy={20}/>}
|
|
|
342
341
|
|
|
343
342
|
The `maxLabels` prop defines the labels that will appear above each point. This prop should be given as a boolean, an array or as a function of data. When given as a boolean value, the max value of each datum will be used for the label.
|
|
344
343
|
|
|
345
|
-
|
|
344
|
+
_examples:_
|
|
345
|
+
|
|
346
346
|
- `maxLabels`
|
|
347
347
|
- `maxLabels={["first", "second", "third"]}`
|
|
348
348
|
- `maxLabels={(d) => Math.round(d.max)}`
|
|
@@ -353,7 +353,6 @@ The `maxLabels` prop defines the labels that will appear above each point. This
|
|
|
353
353
|
|
|
354
354
|
`VictoryBoxPlot` uses the standard `maxDomain` prop. [Read about it in detail](https://formidable.com/open-source/victory/docs/common-props#maxDomain)
|
|
355
355
|
|
|
356
|
-
|
|
357
356
|
```playground
|
|
358
357
|
<VictoryChart maxDomain={{ x: 3 }}>
|
|
359
358
|
<VictoryBoxPlot
|
|
@@ -375,25 +374,25 @@ Use the `median` data accessor prop to define the median value of a box plot.
|
|
|
375
374
|
|
|
376
375
|
**string:** specify which property in an array of data objects should be used as the median value
|
|
377
376
|
|
|
378
|
-
|
|
377
|
+
_examples:_ `median="median_value"`
|
|
379
378
|
|
|
380
379
|
**function:** use a function to translate each element in a data array into a median value
|
|
381
380
|
|
|
382
|
-
|
|
381
|
+
_examples:_ `median={() => 10}`
|
|
383
382
|
|
|
384
383
|
**path string or path array:** specify which property in an array of nested data objects should be used as a median value
|
|
385
384
|
|
|
386
|
-
|
|
385
|
+
_examples:_ `median="bonds.median"`, `median={["bonds", "median"]}`
|
|
387
386
|
|
|
388
387
|
### medianComponent
|
|
389
388
|
|
|
390
389
|
`type: element`
|
|
391
390
|
|
|
392
|
-
The `medianComponent` prop takes a component instance which will be responsible for rendering an element to represent the median value of the box plot. The new element created from the passed `medianComponent` will be provided with the following props calculated by `VictoryBoxPlot`:
|
|
391
|
+
The `medianComponent` prop takes a component instance which will be responsible for rendering an element to represent the median value of the box plot. The new element created from the passed `medianComponent` will be provided with the following props calculated by `VictoryBoxPlot`: `datum`, `index`, `scale`, `style`, `events`, `x1`, `y1`, `x2` and `y2` Any of these props may be overridden by passing in props to the supplied component, or modified or ignored within the custom component itself. If a `medianComponent` is not provided, `VictoryBoxPlot` will use its default [Line component][].
|
|
393
392
|
|
|
394
393
|
See the [Custom Components Guide][] for more detail on creating your own components
|
|
395
394
|
|
|
396
|
-
|
|
395
|
+
_default:_ `medianComponent={<Line/>}`
|
|
397
396
|
|
|
398
397
|
```jsx
|
|
399
398
|
medianComponent={<Line events={{ onClick: handleClick }}/>}
|
|
@@ -407,7 +406,7 @@ The `medianLabelComponent` prop takes a component instance which will be used to
|
|
|
407
406
|
|
|
408
407
|
See the [Custom Components Guide][] for more detail on creating your own components
|
|
409
408
|
|
|
410
|
-
|
|
409
|
+
_default:_ `medianLabelComponent={<VictoryLabel/>}`
|
|
411
410
|
|
|
412
411
|
```jsx
|
|
413
412
|
medianLabelComponent={<VictoryLabel dy={20}/>}
|
|
@@ -437,7 +436,8 @@ medianLabelComponent={<VictoryLabel dy={20}/>}
|
|
|
437
436
|
|
|
438
437
|
The `medianLabels` prop defines the labels that will appear above each point. This prop should be given as a boolean, an array or as a function of data. When given as a boolean value, the median value of each datum will be used for the label.
|
|
439
438
|
|
|
440
|
-
|
|
439
|
+
_examples:_
|
|
440
|
+
|
|
441
441
|
- `medianLabels`
|
|
442
442
|
- `medianLabels={["first", "second", "third"]}`
|
|
443
443
|
- `medianLabels={(d) => Math.round(d.median)}`
|
|
@@ -450,25 +450,25 @@ Use the `min` data accessor prop to define the min value of a box plot.
|
|
|
450
450
|
|
|
451
451
|
**string:** specify which property in an array of data objects should be used as the min value
|
|
452
452
|
|
|
453
|
-
|
|
453
|
+
_examples:_ `min="min_value"`
|
|
454
454
|
|
|
455
455
|
**function:** use a function to translate each element in a data array into a min value
|
|
456
456
|
|
|
457
|
-
|
|
457
|
+
_examples:_ `min={() => 10}`
|
|
458
458
|
|
|
459
459
|
**path string or path array:** specify which property in an array of nested data objects should be used as a min value
|
|
460
460
|
|
|
461
|
-
|
|
461
|
+
_examples:_ `min="bonds.min"`, `min={["bonds", "min"]}`
|
|
462
462
|
|
|
463
463
|
### minComponent
|
|
464
464
|
|
|
465
465
|
`type: element`
|
|
466
466
|
|
|
467
|
-
The `minComponent` prop takes a component instance which will be responsible for rendering an element to represent the minimum value of the box plot. The new element created from the passed `minComponent` will be provided with the following props calculated by `VictoryBoxPlot`:
|
|
467
|
+
The `minComponent` prop takes a component instance which will be responsible for rendering an element to represent the minimum value of the box plot. The new element created from the passed `minComponent` will be provided with the following props calculated by `VictoryBoxPlot`: `datum`, `index`, `scale`, `style`, `events`, `majorWhisker` and `minorWhisker`. The `majorWhisker` and `minorWhisker` props are given as objects with values for `x1`, `y1`, `x2` and `y2` that describes the lines that make up the major and minor whisker. Any of these props may be overridden by passing in props to the supplied component, or modified or ignored within the custom component itself. If a `minComponent` is not provided, `VictoryBoxPlot` will use its default [Whisker component][].
|
|
468
468
|
|
|
469
469
|
See the [Custom Components Guide][] for more detail on creating your own components
|
|
470
470
|
|
|
471
|
-
|
|
471
|
+
_default:_ `minComponent={<Whisker/>}`
|
|
472
472
|
|
|
473
473
|
```jsx
|
|
474
474
|
minComponent={<Whisker events={{ onClick: handleClick }}/>}
|
|
@@ -482,7 +482,7 @@ The `minLabelComponent` prop takes a component instance which will be used to re
|
|
|
482
482
|
|
|
483
483
|
See the [Custom Components Guide][] for more detail on creating your own components
|
|
484
484
|
|
|
485
|
-
|
|
485
|
+
_default:_ `minLabelComponent={<VictoryLabel/>}`
|
|
486
486
|
|
|
487
487
|
```jsx
|
|
488
488
|
minLabelComponent={<VictoryLabel dy={20}/>}
|
|
@@ -512,7 +512,8 @@ minLabelComponent={<VictoryLabel dy={20}/>}
|
|
|
512
512
|
|
|
513
513
|
The `minLabels` prop defines the labels that will appear above each point. This prop should be given as a boolean, an array or as a function of data. When given as a boolean value, the min value of each datum will be used for the label.
|
|
514
514
|
|
|
515
|
-
|
|
515
|
+
_examples:_
|
|
516
|
+
|
|
516
517
|
- `minLabels`
|
|
517
518
|
- `minLabels={["first", "second", "third"]}`
|
|
518
519
|
- `minLabels={(d) => Math.round(d.min)}`
|
|
@@ -523,7 +524,6 @@ The `minLabels` prop defines the labels that will appear above each point. This
|
|
|
523
524
|
|
|
524
525
|
`VictoryBoxPlot` uses the standard `minDomain` prop. [Read about it in detail](https://formidable.com/open-source/victory/docs/common-props#minDomain)
|
|
525
526
|
|
|
526
|
-
|
|
527
527
|
```playground
|
|
528
528
|
<VictoryChart minDomain={{ y: 0 }}>
|
|
529
529
|
<VictoryBoxPlot
|
|
@@ -544,7 +544,7 @@ The `minLabels` prop defines the labels that will appear above each point. This
|
|
|
544
544
|
The `name` prop is used to reference a component instance when defining shared events.
|
|
545
545
|
|
|
546
546
|
```jsx
|
|
547
|
-
name="series-1"
|
|
547
|
+
name = "series-1";
|
|
548
548
|
```
|
|
549
549
|
|
|
550
550
|
### origin
|
|
@@ -561,7 +561,7 @@ name="series-1"
|
|
|
561
561
|
|
|
562
562
|
`VictoryBar` uses the standard `padding` prop. [Read about it here](https://formidable.com/open-source/victory/docs/common-props#padding)
|
|
563
563
|
|
|
564
|
-
|
|
564
|
+
_default (provided by default theme):_ `padding={50}`
|
|
565
565
|
|
|
566
566
|
```jsx
|
|
567
567
|
padding={{ top: 20, bottom: 60 }}
|
|
@@ -583,25 +583,25 @@ Use the `q1` data accessor prop to define the q1 value of a box plot.
|
|
|
583
583
|
|
|
584
584
|
**string:** specify which property in an array of data objects should be used as the q1 value
|
|
585
585
|
|
|
586
|
-
|
|
586
|
+
_examples:_ `q1="q1_value"`
|
|
587
587
|
|
|
588
588
|
**function:** use a function to translate each element in a data array into a q1 value
|
|
589
589
|
|
|
590
|
-
|
|
590
|
+
_examples:_ `q1={() => 10}`
|
|
591
591
|
|
|
592
592
|
**path string or path array:** specify which property in an array of nested data objects should be used as a q1 value
|
|
593
593
|
|
|
594
|
-
|
|
594
|
+
_examples:_ `q1="bonds.q1"`, `q1={["bonds", "q1"]}`
|
|
595
595
|
|
|
596
596
|
### q1Component
|
|
597
597
|
|
|
598
598
|
`type: element`
|
|
599
599
|
|
|
600
|
-
The `q1Component` prop takes a component instance which will be responsible for rendering an element to represent the q1 value of the box plot. The new element created from the passed `q1Component` will be provided with the following props calculated by `VictoryBoxPlot`:
|
|
600
|
+
The `q1Component` prop takes a component instance which will be responsible for rendering an element to represent the q1 value of the box plot. The new element created from the passed `q1Component` will be provided with the following props calculated by `VictoryBoxPlot`: `datum`, `index`, `scale`, `style`, `events`, `x`, `y`, `width` and `height` Any of these props may be overridden by passing in props to the supplied component, or modified or ignored within the custom component itself. If a `q1Component` is not provided, `VictoryBoxPlot` will use its default [Box component][].
|
|
601
601
|
|
|
602
602
|
See the [Custom Components Guide][] for more detail on creating your own components
|
|
603
603
|
|
|
604
|
-
|
|
604
|
+
_default:_ `q1Component={<Box/>}`
|
|
605
605
|
|
|
606
606
|
```jsx
|
|
607
607
|
q1Component={<Box events={{ onClick: handleClick }}/>}
|
|
@@ -615,7 +615,7 @@ The `q1LabelComponent` prop takes a component instance which will be used to ren
|
|
|
615
615
|
|
|
616
616
|
See the [Custom Components Guide][] for more detail on creating your own components
|
|
617
617
|
|
|
618
|
-
|
|
618
|
+
_default:_ `q1LabelComponent={<VictoryLabel/>}`
|
|
619
619
|
|
|
620
620
|
```jsx
|
|
621
621
|
q1LabelComponent={<VictoryLabel dy={20}/>}
|
|
@@ -644,7 +644,8 @@ q1LabelComponent={<VictoryLabel dy={20}/>}
|
|
|
644
644
|
|
|
645
645
|
The `q1Labels` prop defines the labels that will appear above each point. This prop should be given as a boolean, an array or as a function of data. When given as a boolean value, the q1 value of each datum will be used for the label.
|
|
646
646
|
|
|
647
|
-
|
|
647
|
+
_examples:_
|
|
648
|
+
|
|
648
649
|
- `q1Labels`
|
|
649
650
|
- `q1Labels={["first", "second", "third"]}`
|
|
650
651
|
- `q1Labels={(d) => Math.round(d.q1)}`
|
|
@@ -657,25 +658,25 @@ Use the `q3` data accessor prop to define the q3 value of a box plot.
|
|
|
657
658
|
|
|
658
659
|
**string:** specify which property in an array of data objects should be used as the q3 value
|
|
659
660
|
|
|
660
|
-
|
|
661
|
+
_examples:_ `q3="q3_value"`
|
|
661
662
|
|
|
662
663
|
**function:** use a function to translate each element in a data array into a q3 value
|
|
663
664
|
|
|
664
|
-
|
|
665
|
+
_examples:_ `q3={() => 10}`
|
|
665
666
|
|
|
666
667
|
**path string or path array:** specify which property in an array of nested data objects should be used as a q3 value
|
|
667
668
|
|
|
668
|
-
|
|
669
|
+
_examples:_ `q3="bonds.q3"`, `q3={["bonds", "q3"]}`
|
|
669
670
|
|
|
670
671
|
### q3Component
|
|
671
672
|
|
|
672
673
|
`type: element`
|
|
673
674
|
|
|
674
|
-
The `q3Component` prop takes a component instance which will be responsible for rendering an element to represent the q3 value of the box plot. The new element created from the passed `q3Component` will be provided with the following props calculated by `VictoryBoxPlot`:
|
|
675
|
+
The `q3Component` prop takes a component instance which will be responsible for rendering an element to represent the q3 value of the box plot. The new element created from the passed `q3Component` will be provided with the following props calculated by `VictoryBoxPlot`: `datum`, `index`, `scale`, `style`, `events`, `x`, `y`, `width` and `height` Any of these props may be overridden by passing in props to the supplied component, or modified or ignored within the custom component itself. If a `q3Component` is not provided, `VictoryBoxPlot` will use its default [Box component][].
|
|
675
676
|
|
|
676
677
|
See the [Custom Components Guide][] for more detail on creating your own components
|
|
677
678
|
|
|
678
|
-
|
|
679
|
+
_default:_ `q3Component={<Box/>}`
|
|
679
680
|
|
|
680
681
|
```jsx
|
|
681
682
|
q3Component={<Box events={{ onClick: handleClick }}/>}
|
|
@@ -689,7 +690,7 @@ The `q3LabelComponent` prop takes a component instance which will be used to ren
|
|
|
689
690
|
|
|
690
691
|
See the [Custom Components Guide][] for more detail on creating your own components
|
|
691
692
|
|
|
692
|
-
|
|
693
|
+
_default:_ `q3LabelComponent={<VictoryLabel/>}`
|
|
693
694
|
|
|
694
695
|
```jsx
|
|
695
696
|
q3LabelComponent={<VictoryLabel dy={20}/>}
|
|
@@ -718,7 +719,8 @@ q3LabelComponent={<VictoryLabel dy={20}/>}
|
|
|
718
719
|
|
|
719
720
|
The `q3Labels` prop defines the labels that will appear above each point. This prop should be given as a boolean, an array or as a function of data. When given as a boolean value, the q3 value of each datum will be used for the label.
|
|
720
721
|
|
|
721
|
-
|
|
722
|
+
_examples:_
|
|
723
|
+
|
|
722
724
|
- `q3Labels`
|
|
723
725
|
- `q3Labels={["first", "second", "third"]}`
|
|
724
726
|
- `q3Labels={(d) => Math.round(d.q3)}`
|
|
@@ -737,7 +739,7 @@ The `q3Labels` prop defines the labels that will appear above each point. This p
|
|
|
737
739
|
|
|
738
740
|
`VictoryBoxPlot` uses the standard `samples` prop. [Read about it here](https://formidable.com/open-source/victory/docs/common-props#samples)
|
|
739
741
|
|
|
740
|
-
|
|
742
|
+
_default:_ `samples={50}`
|
|
741
743
|
|
|
742
744
|
```jsx
|
|
743
745
|
samples={100}
|
|
@@ -750,7 +752,7 @@ samples={100}
|
|
|
750
752
|
`VictoryBoxPlot` uses the standard `scale` prop. [Read about it here](https://formidable.com/open-source/victory/docs/common-props#scale)
|
|
751
753
|
Options for scale include "linear", "time", "log", "sqrt" and the `d3-scale` functions that correspond to these options.
|
|
752
754
|
|
|
753
|
-
|
|
755
|
+
_default:_ `scale="linear"`
|
|
754
756
|
|
|
755
757
|
```jsx
|
|
756
758
|
scale={{x: "linear", y: "log"}}
|
|
@@ -775,7 +777,7 @@ scale={{x: "linear", y: "log"}}
|
|
|
775
777
|
See the [Data Accessors Guide][] for more detail on formatting and processing data.
|
|
776
778
|
|
|
777
779
|
```jsx
|
|
778
|
-
sortKey="x"
|
|
780
|
+
sortKey = "x";
|
|
779
781
|
```
|
|
780
782
|
|
|
781
783
|
### sortOrder
|
|
@@ -784,7 +786,7 @@ sortKey="x"
|
|
|
784
786
|
|
|
785
787
|
The `sortOrder` prop specifies whether sorted data should be returned in ascending or descending order.
|
|
786
788
|
|
|
787
|
-
|
|
789
|
+
_default:_ `sortOrder="ascending"`
|
|
788
790
|
|
|
789
791
|
### standalone
|
|
790
792
|
|
|
@@ -794,7 +796,7 @@ The `sortOrder` prop specifies whether sorted data should be returned in ascendi
|
|
|
794
796
|
|
|
795
797
|
**note:** When `VictoryBar` is nested within a component like `VictoryChart`, this prop will be set to `false`
|
|
796
798
|
|
|
797
|
-
|
|
799
|
+
_default:_ `standalone={true}`
|
|
798
800
|
|
|
799
801
|
### style
|
|
800
802
|
|
|
@@ -820,7 +822,7 @@ The `style` prop defines the style of the component. The style prop should be gi
|
|
|
820
822
|
|
|
821
823
|
**note:** custom `angle` and `verticalAnchor` properties may be included in `labels` styles.
|
|
822
824
|
|
|
823
|
-
|
|
825
|
+
_default (provided by default theme):_ See [grayscale theme][] for more detail
|
|
824
826
|
|
|
825
827
|
```playground
|
|
826
828
|
<VictoryBoxPlot
|
|
@@ -852,7 +854,7 @@ The `style` prop defines the style of the component. The style prop should be gi
|
|
|
852
854
|
|
|
853
855
|
See the [Themes Guide][] for information about creating custom themes.
|
|
854
856
|
|
|
855
|
-
|
|
857
|
+
_default:_ `theme={VictoryTheme.grayscale}`
|
|
856
858
|
|
|
857
859
|
```jsx
|
|
858
860
|
theme={VictoryTheme.material}
|
|
@@ -885,7 +887,7 @@ The `whiskerWidth` prop specifies how wide each whisker crosshair should be. If
|
|
|
885
887
|
|
|
886
888
|
`VictoryBoxPlot` uses the standard `width` prop. [Read about it here](https://formidable.com/open-source/victory/docs/common-props#width)
|
|
887
889
|
|
|
888
|
-
|
|
890
|
+
_default (provided by default theme):_ `width={450}`
|
|
889
891
|
|
|
890
892
|
```jsx
|
|
891
893
|
width={400}
|
|
@@ -895,13 +897,12 @@ width={400}
|
|
|
895
897
|
|
|
896
898
|
`type: string || integer || array[string] || function`
|
|
897
899
|
|
|
898
|
-
|
|
899
900
|
`VictoryBoxPlot` uses the standard `x` data accessor prop. [Read about it here](https://formidable.com/open-source/victory/docs/common-props#x)
|
|
900
901
|
|
|
901
902
|
See the [Data Accessors Guide][] for more detail on formatting and processing data.
|
|
902
903
|
|
|
903
904
|
```jsx
|
|
904
|
-
x="employee.name"
|
|
905
|
+
x = "employee.name";
|
|
905
906
|
```
|
|
906
907
|
|
|
907
908
|
### y
|
|
@@ -916,28 +917,26 @@ See the [Data Accessors Guide][] for more detail on formatting and processing da
|
|
|
916
917
|
y={(d) => d.value + d.error}
|
|
917
918
|
```
|
|
918
919
|
|
|
919
|
-
|
|
920
|
-
[
|
|
921
|
-
[
|
|
922
|
-
[
|
|
923
|
-
[
|
|
924
|
-
[
|
|
925
|
-
[`VictoryChart`]: https://formidable.com/open-source/victory/docs/victory-chart
|
|
920
|
+
[animations guide]: https://formidable.com/open-source/victory/guides/animations
|
|
921
|
+
[data accessors guide]: https://formidable.com/open-source/victory/guides/data-accessors
|
|
922
|
+
[custom components guide]: https://formidable.com/open-source/victory/guides/custom-components
|
|
923
|
+
[events guide]: https://formidable.com/open-source/victory/guides/events
|
|
924
|
+
[themes guide]: https://formidable.com/open-source/victory/guides/themes
|
|
925
|
+
[`victorychart`]: https://formidable.com/open-source/victory/docs/victory-chart
|
|
926
926
|
[grayscale theme]: https://github.com/FormidableLabs/victory-core/blob/master/src/victory-theme/grayscale.js
|
|
927
927
|
[`x`]: https://formidable.com/open-source/victory/docs/victory-boxplot#x
|
|
928
928
|
[`y`]: https://formidable.com/open-source/victory/docs/victory-boxplot#y
|
|
929
929
|
[`max`]: https://formidable.com/open-source/victory/docs/victory-boxplot#max
|
|
930
|
-
[`
|
|
930
|
+
[`maxlabels`]: https://formidable.com/open-source/victory/docs/victory-boxplot#maxlabels
|
|
931
931
|
[`min`]: https://formidable.com/open-source/victory/docs/victory-boxplot#min
|
|
932
|
-
[`
|
|
932
|
+
[`minlabels`]: https://formidable.com/open-source/victory/docs/victory-boxplot#minlabels
|
|
933
933
|
[`median`]: https://formidable.com/open-source/victory/docs/victory-boxplot#median
|
|
934
|
-
[`
|
|
934
|
+
[`medianlabels`]: https://formidable.com/open-source/victory/docs/victory-boxplot#medianlabels
|
|
935
935
|
[`q1`]: https://formidable.com/open-source/victory/docs/victory-boxplot#q1
|
|
936
|
-
[`
|
|
936
|
+
[`q1labels`]: https://formidable.com/open-source/victory/docs/victory-boxplot#q1labels
|
|
937
937
|
[`q3`]: https://formidable.com/open-source/victory/docs/victory-boxplot#q3
|
|
938
938
|
[`q3labels`]: https://formidable.com/open-source/victory/docs/victory-boxplot#q3labels
|
|
939
|
-
[
|
|
940
|
-
[
|
|
941
|
-
[
|
|
942
|
-
[`
|
|
943
|
-
|
|
939
|
+
[whisker component]: https://formidable.com/open-source/victory/docs/victory-primitives#whisker
|
|
940
|
+
[box component]: https://formidable.com/open-source/victory/docs/victory-primitives#box
|
|
941
|
+
[line component]: https://formidable.com/open-source/victory/docs/victory-primitives#line
|
|
942
|
+
[`victorylabel`]: https://formidable.com/open-source/victory/docs/victory-label
|