문제

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...

도움이 되었습니까?

해결책

Use this:

 Highcharts.numberFormat(this.y,0)

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top