Charts

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.

PropValues and behaviorDefault
dataDatum[]—
title / labelstring / (datum: Datum) => string—
value(datum: Datum) => number—
tone(datum: Datum) => ChartTone—
heightnumber (px)260
valueLabelstring—