#1531 - Adds a VictoryHistogram
component. Huge thanks to @NgoKnows for this new feature!
<VictoryHistogram
binSpacing={1}
bins={[0, 20, 50, 500]}
data={[
{ value: 1 }, { value: 1 }, { value: 2 }, { value: 3 } ...
]}
x="value"
/>
Histogram bins may be defined with the bin
prop, which takes either an array of bin edges, or a single number which corresponds to an approximate number of bins. VictoryHistogram
is meant to work with continuous data, and expects a data prop as an array of objects with x values. By default, histogram bins will be laid out with no spaces between bins, but the optional binSpacing
prop may be provided to change this behavior. Additional documentation and examples here: https://formidable.com/open-source/victory/docs/victory-histogram