Donut / Pie chart
D3 chart
For all common D3 chart properties, refer to D3 chart API.
Chart.Donut
js
import { Chart } from 'intergalactic/d3-chart';
DonutChartProps
BaseChartProps<> & {...}Name | Type | Description |
---|---|---|
groupKey | never | |
xScale | ScaleLinear<any, any> | |
yScale | ScaleLinear<any, any> | |
innerRadius | number | |
halfsize | boolean | |
innerLabel | React.ReactNode |
Donut
It have children components Pie
, Label
, EmptyData
.
js
import { Donut } from 'intergalactic/d3-chart';
<Donut>
<Donut.EmptyData />
<Donut.Pie />
<Donut.Label />
</Donut>;
DonutProps
& {...}Name | Type | Description |
---|---|---|
innerRadius | number | Inner radius |
outerRadius | number | Outer radius |
halfsize | boolean | Semi donut |
duration | number | Animation duration in ms. Set `0` to disable animation. |
paddingAngle | number | Additional padding between segments in radians. |
patterns | Enables charts patterns that enhances charts accessibility |