Question

I have this gauge here and can't figure out how to round the decimals on the round label to one. enter image description here

tried this:

    title: {
        text: when,
        style: {
            fontSize: fontSizeMin + 4 + 'px'
        },
        formatter: function () {
            Math.round(this.y * Math.pow(10, 1)) / Math.pow(10, 1); 
        }
    },

but didn't work...

Was it helpful?

Solution

Use this:

 Highcharts.numberFormat(this.y,0)

Example: http://jsfiddle.net/CAKQH/24227/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top