我有以下数组数据示例:
[
[10,10.23],
[23,58.55],
...,
[-30,170.66],
...,
[-13,3433.36],
...,
[4,47449.77],
...
]
当我生成图形时,xaxis标签设置为:
0, 5k, 10k, 15k, 20k, 25k, 30k, etc
我想为Xaxis标签设置步骤:
0, 10, 100, 1000, 10000, 100000
或逻辑代码等于:
Math.pow(10,step+1)
我读取了HighChart API,从未找到此步骤方法的解决方案。有一个技巧吗?
谢谢,mahdi
我想您正在寻找
xAxis: {
type: 'logarithmic',
labels: { //for if you want to hide the 'k' abbreviation for thousands
'{value}'
}
},
有关更多详细信息,请参见对数图表上的Highcharts演示。