Monday, February 26, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  3] [ 3]  / answers: 1 / hits: 52881  / 12 Years ago, thu, august 9, 2012, 12:00:00

I give that values to Highcharts pie chart:



  series:[
{
type:'pie',
name:'Ratio',
data:[
['A', 42.6],
{
name:'B',
y:14.2,
sliced:true,
selected:true
}
]
}
]


However it shows it like that at pie chart:



A -> 75.00000000000001 %
B-> 25 %


You can format tooltips at Highcharts how about chart values?



enter


More From » highcharts

 Answers
43

We do have tooltip formatter options to display the value as number instead of percentage



http://api.highcharts.com/highstock#tooltip.formatter



tooltip: {
formatter: function() {
return '<b>'+ this.point.name +'</b>: '+ this.point.y ;
}
},


this.point.y will do the trick (now you have this.percentage in that place)


[#83740] Wednesday, August 8, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
maxinec

Total Points: 117
Total Questions: 116
Total Answers: 116

Location: Bangladesh
Member since Sat, Jan 23, 2021
3 Years ago
maxinec questions
;