繁体   English   中英

高图:工具提示中的有效小数

[英]Highcharts: significant decimals in the tooltip

我正在尝试更改有效的小数位数。 默认情况下是7,所以对于小于0.0000001的值,我有很多0.0000000。

我尝试了plotOptions.series.dataLabels.formatterplotOptions.line.dataLabels.formatter ,但是它们没有用。

然后,我尝试了plotOptions.line.tooltip.formatter但这只接受HTML,我想设置类似

function() {
    return Highcharts.numberFormat(this.y,10);
}

我使用20位小数来运行示例,请参见示例http://jsfiddle.net/qPUZw/

 tooltip:{
            formatter:function(){
            return Highcharts.numberFormat(this.y,20,',')
            }
        },

似乎工作正常。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM