Hello again, im drawing a pie chart,, and i want to show in the tooltip not the amount or the value but the percent of the pie.. i know that , theres a value called “total” but how can i show it in the tooltip tooltipTemplate, i can do the math like this #### * 100 / “total” and it should work but i dont know how to make the tooltip take it
Thanks.
For Ionic, the tooltipTemplate can be modified in JavaScript as follows:
This will avoid the issue of nesting double and single quotes.
The solution to this has changed as the tooltip templates (tooltipTemplate, multiTooltipTemplate) have been removed. Percentages can be implemented using something like this: http://blog.cryst.co.uk/2016/06/03/adding-percentages-chart-js-pie-chart-tooltips/
From @deframe‘s site (via archive.org):
@DaveJarvis your solution work’s fine for me, but I have to do a parseFloat() in the add of total, because it take the item like a string. I leave the code below:
Grettings.