How i can get the 2 decimal places?

时间:2017-12-18 05:51:01

标签: highcharts

Based on this jsfiddle,

Visit http://jsfiddle.net/yingchor/qq6o1ma1/5/

I would like display the figure as 77.00 instead of 77.0007825

chart.setTitle({
    text:  percent*100 + '%'
});

Thank for the help.

1 个答案:

答案 0 :(得分:1)

Try below

text:  (percent*100).toFixed(2) + '%'

http://jsfiddle.net/4neop25f/