1
我有對數y軸的條形圖。當我將y軸的min設置爲接近0(例如0.1)時,tick之間的間隔看起來相等。但是,當我根據需要將min設置爲1000時,圖表會更改其行爲,並且tick之間的空間不均勻。這裏是一個例子https://jsfiddle.net/2vh9h2q3/。這裏是代碼本身:Higcharts蜱之間不均勻的空間
new Highcharts.Chart({
"chart": {
"zoomType": "xy",
"renderTo": $('#container')[0],
"type": 'bar'
},
"title": {
"text": null
},
"subtitle": {
"text": null
},
"credits": {
"enabled": false
},
"exporting": {
"enabled": false
},
"xAxis": {
"categories": ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
"title": {
"text": null
},
"labels": {
"align": "left",
"x": 10
},
"lineWidth": 0,
"tickWidth": 0
},
"yAxis": {
"type": "logarithmic",
"min": 1000,
"labels": {
"formatter": function() {
return this.value % 1000 === 0 ? this.value/1000 + "k" : this.value;
}
},
"title": {
"text": null
}
},
"tooltip": {
"useHTML": true,
"shadow": false
},
"plotOptions": {
"bar": {
"dataLabels": {
"enabled": false
}
},
"series": {
"cursor": "pointer"
}
},
"series": [{
"showInLegend": false,
"data": [4951,1200,0,0,196484,179580,0,0,0,324,87014, 11]
}]
});
我想離開分鐘1000並獲得刻度之間的間距相等。我試着用滴答選擇玩,但它沒有工作