-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Provide a general summary of the feature here
For Donut charts, the summary in the center always displays the total value of all slices by default, for example -
const donutData = [
{ id: '1', value: 3 },
{ id: '2', value: 7 },
];
colors = ['static-green-800', 'gray-200'];
<Chart
data={donutData}
colorScheme="light"
colors={colors}
height={110}
width={110}
>
<Donut color="id" metric="value">
<DonutSummary label={'Good'} />
</Donut>
</Chart>
renders

Is there a way to customize it so that only the value of the green slice (i.e. the slice with id=1) is shown instead?
🤔 Expected Behavior?
Can customize the value of DonutSummary
, maybe provide a prop -
<DonutSummary label={someLabel} value={someValue}/>
💁 Possible Solution
No response
🔦 Context
Working on a project where we need to display a measurement score out of 10. We'd like to visualize it using a donut chart, with the score (not the sum) shown in the center.
💻 Examples
🧢 Your Company/Team
No response
Metadata
Metadata
Assignees
Labels
No labels