Pie chart - how to enable percent during the hover

Pie chart - how to enable percent during the hover

  

Hi Guys,

   I am using pie chart normally but I don´t know how to enable the percent value during the hover presentation.  Someone has some tip ?

Thanks

The hoveer shows the value in Tooltip. You have to pass the % value into Tooltip.

There is no sense Nuno. The chart calculates de percent value. Why I should calculate and provide it into the Tooltip ?

Did you try use the formatter as explained here?

Best regards,

PC

Luciano Schiavo wrote:

There is no sense Nuno. The chart calculates de percent value. Why I should calculate and provide it into the Tooltip ?

I was about to say "The way I see it, someone wants to show %, another wants to show relative value, another the absolute value, another the text, another text (%)... A single box for everything is easier that to guess want everyone wants. If they could do a best guess it would be really great." and

Pedro Coelho wrote:

Did you try use the formatter as explained here?

Best regards,

PC

Just perfect.

Sorry guys,

   I am trying to see the connection between tooltip and the pie chart that is available in Charts widget. Maybe I don´t have knowledge for that. Could you explain this better ?

Thanks

Luck

Solution

After doing a lot of research I could join the pieces.  It was not easy and I would like to thank you guys for your tips.

I had to add the code below to to the advancedFormat option in the pie chart gadget. So I am leaving this code to someone would like to have the same result as mine.

SyntaxEditor Code Snippet

AdvancedFormat_Init(DataPointFormats:,DataSeriesFormats:,XAxisJSON:,YAxisJSON:,HighchartsJSON:
"tooltip: { enabled: true, formatter: function() {
        return this.point.name +': '+ this.point.y +' (<b>'+this.percentage.toFixed(1) +'</b>%)';}}")
Solution