DonutChart
Show each category’s share of the whole with a donut chart.
Basic usage
Return finite nonnegative values from value. The donut shows proportions and the table exposes exact values without relying on color. In SolidStart, load the module that imports @egcs/newui/charts on the client. Export the chart as default and use clientOnly(() => import("./my-chart")) in the route.
Loading chart
API
Key props and defaults.
| Prop | Values and behavior | Default |
|---|---|---|
data | Datum[] | — |
title / label | string / (datum: Datum) => string | — |
value | (datum: Datum) => number | — |
tone | (datum: Datum) => ChartTone | — |
height | number (px) | 260 |
valueLabel | string | — |