my data is look like this
{name: "xxxx", percentage:30}
and I use nameKey="name" and dataKey="percentage"
and tooltip in pie chart show "xxxx : 30"
I want to add % to the Tooltip so it should be "xxxx : 30%"
how can I do that?
Thanks in advance
@nuugut Use the props formatter of Tooltip;
<Tooltip formatter={someFormatterFunction} />
@xile611
do you have any example of {someFormatterFunction}?
Thanks
@nuugut
I have this simple example of the formatter:
const formatTooltip = value =>${value} ${unit};
Then into my chart component:
<Tooltip formatter={formatTooltip} ... />
(I used the "..." for the other props)
Most helpful comment
@nuugut Use the props
formatterofTooltip;