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并获得刻度之间的间距相等。我试着用滴答选择玩,但它没有工作