Nav*_*eon 6 javascript jquery charts graph highcharts
我有一个高图列图,因为有时y轴数据显示为[1000,2000,3000,4000],有时显示为[1k,2k,3k,4k].
如何将其修复为单一类型的数据.
此致,Navin Leon
Che*_*ery 11
区别在于:
yAxis: {
labels: {
formatter: function() {
return this.value;
}
}
},
Run Code Online (Sandbox Code Playgroud)
小智 5
将您的yaxis值转换为1k,2k,3k,4k等:
yAxis:
{
labels:
{
formatter: function()
{
return Math.round(this.value/1000) + 'k';
}
}
},
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9636 次 |
| 最近记录: |