toomuchdesign/react-minimal-pie-chart

Can't get percentage for values working

rikoz opened this issue · 1 comments

rikoz commented

Please what exactly do I pass into label as prop to get values display as percentage.

Hi @rikoz,
please take a look at the demo source code:

<PieChart
data={dataMock}
label={({ data, dataIndex }) =>
Math.round(data[dataIndex].percentage) + '%'
}
labelStyle={defaultLabelStyle}
/>