Bar Chart
Chart in which each bar represents the value of a variable. Inspired by Tremor.
Installation
npx @rahimstack@latest add charts
Examples
Vertical
Grouped
API Reference
BarChart
Prop | Type | Default |
---|---|---|
data * | any[] | null | undefined | |
categories * | string[] | |
index * | string | |
colors | ChartColor[] | |
valueFormatter | ChartValueFormatter | |
startEndOnly | boolean | false |
showXAxis | boolean | true |
showYAxis | boolean | true |
yAxisWidth | number | 56 |
showAnimation | boolean | true |
showTooltip | boolean | true |
showLegend | boolean | true |
showGridLines | boolean | true |
autoMinValue | boolean | false |
minValue | number | |
maxValue | number | |
allowDecimals | boolean | true |
emptyDisplay | React.ReactElement | `<></>` |
React.ComponentPropsWithRef<"div"> | ||
layout | "vertical" | "horizontal" | |
stack | boolean | |
relative | boolean | |
intervalType | "preserveStart" | "preserveEnd" | "preserveStartEnd" | "equidistantPreserveStart" | "equidistantPreserveStart" |
No styles