How a number spreads, such as booking lead time or tickets per order.
import { Histogram } from '@oztix/roadie-charts/histogram'
<div className='w-140 max-w-full'> <Chart label='Tickets per order' source='Oztix sales.' size='md'> <Histogram data={[1, 2, 2, 2, 2, 3, 4, 4, 2, 1, 6, 2].map((tickets) => ({ tickets }))} x='tickets' binWidth={1} takeaway='Half of orders are for two tickets' /> </Chart> </div>
binWidth when the unit means something, such as 7 days. Use bins for a quick look. It sets a target, so edges stay round and the last bin takes a maximum that lands on its top edge. Don't set both.median draws a labelled dashed line. Say what it means in the takeaway.Rows of plain values, one per order or buyer.
Numeric field to bin, such as days before the show.
Format of the binned values. Counts are always whole numbers.
Defaults to 'number'.
The headline sentence. It becomes the plot's accessible name.
About how many bins. Edges land on round numbers, so this is a target and the chart may draw fewer. Use this or binWidth.
How wide each bin is, in the field's units. Use this or bins.
Draws a labelled dashed line at the median.