Formatting the float numbers in Highcharts
highcharts
Solution
dataLabels controls numbers that show up near the points on the chart itself. That rollover you have in your image is the tooltip. Check out: http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/tooltip/valuedecimals/
tooltip: {
valueDecimals: 2
},
Problem
When the mouse moves to the series, highcharts displays all the numbers, as shown in this picture: I want to make the float numbers all have 2 digits after dot point. I searched online, and came up sth like: ``` plotOptions: { series: { dataLabels: { formatter: function() { return '<b>' + this.point.name + '</b>: ' + this.percentage.toFixed(2) + ' %'; } } } } ``` But it does not work.