Pie and donut chart
Parts of a whole, up to five slices.
In use
Errors by service
Last 24 hours
Variants
Data alternative
881 errors in 24 hours: gateway 47%, worker 30%, auth 11%, billing 8%, search 4%. Five slices is the practical maximum; fold the rest into "Other".
Code
<ChartContainer config={config} label="Errors by service">
<PieChart>
<ChartTooltip />
<ChartLegend />
<Pie isAnimationActive={false} data={data} dataKey="errors" nameKey="service" innerRadius={64} stroke="var(--rax-surface)" strokeWidth={2}>
{data.map((s) => <Cell key={s.service} fill={chartVar(s.service)} />)}
</Pie>
</PieChart>
</ChartContainer>