Chart primitives
Layouts & specialized
Interactions
Data utilities
Umbrella package
@vx/stats
The package provides react
components for visualizing distributions, such as Box Plots and Violin
Plots
Installation
npm install --save @vx/stats
Examples
<BoxPlot /> & <ViolinPlot />
Components
APIs
#<BoxPlot />
ScaleThreshold<DefaultThresholdInput, number> | ScaleTime<number, number> | ScaleLinear<number, number> | ... 4 more ... | ScaleQuantize<...>
required Scale for converting input values to pixel offsets.
Props to pass to the box glyph rect.
Default {}
Width of the BoxPlot.
Default 10
Override render function to fully control the rendering of the BoxPlot glyph.
Classname to apply to parent group element.
Whether to render a container rect element (e.g., to capture mouse events).
Default false
Props to pass to the container glyph rect if rendered.
Default {}
Fill color to apply to outlier circles and BoxPlot rect.
Fill color opacity to apply to outlier circles and BoxPlot rect.
First quartile BoxPlot value.
Whether the glyph should be rendered horizontally instead of vertically.
Left pixel offset of the glyph.
Default 0
Maximum BoxPlot value.
Props to pass to the maximum glyph line.
Default {}
Median BoxPlot value.
Props to pass to the median glyph line.
Default {}
Minimum BoxPlot value.
Props to pass to the minimum glyph line.
Default {}
Props to pass to the outlier glyph circles.
Default {}
Array of outlier values to be rendered.
Default []
Rx to apply to BoxPlot rect.
Default 2
Ry to apply to BoxPlot rect.
Default 2
Stroke color to apply to outlier circles, BoxPlot rect, and min/median/max lines.
Stroke width to apply to outlier circles, BoxPlot rect, and min/median/max lines.
Third quartile BoxPlot value.
Top pixel offset of the glyph.
Default 0
#<ViolinPlot />
Data used to draw the violin plot glyph. Violin plot values and counts should be able to be derived from data.
ScaleThreshold<DefaultThresholdInput, number> | ScaleTime<number, number> | ScaleLinear<number, number> | ... 4 more ... | ScaleQuantize<...>
required Scale for converting values to pixel offsets.
Override render function to fully control the rendering of the ViolinPlot glyph.
Classname to apply to parent group element.
Given an datum, returns the count for it.
Whether the glyph should be rendered horizontally instead of vertically.
Left pixel offset of the glyph.
Default 0
Top pixel offset of the glyph.
Default 0
Given an datum, returns the value for it.
Width of the violin plot glyph.
Default 10