When the chart loads, instead of just having the points on the x-axis of 1, 2, 3, etc. it includes 0.2, 0.4, 0.6, etc in between each integer point. I can't figure out how to get rid of the in-between tick marks.
Chart:
new Highcharts.chart('<some id>', {
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'bar'
},
title: {
text: '<some label>'
},
plotOptions: {
bar: {
stacking: 'normal'
}
},
xAxis: {
categories: categories,
// tickInterval: 1,
tickPositions: [0, 1, 2, 3, 4],
labels: {
step: 1
}
},
yAxis: {
min: 0,
max: 4,
title: {
text: '<some title>'
}
},
series: seriesData
})
It seems like it's just ignoring my tick mark settings. I've tried tickInterval w/out the positions specified, and nothing has even somewhat altered the x-axis from the default look. Even if I remove all the settings other than the category data, it looks the same. And yes, my interval is always [0,4] so there's no unbounded worries there.
Any ideas?
edit: It seems dependent on page size and the chart width... but how do I turn this setting off? As I increase and decrease the size of the page, it should never show decimals in between the integer tick marks.
I've reproduced your example and I believe you wanted to add your tickPositions property to the yAxis (in the bar series yAxis is horizontal by default, so you may have missed it).
yAxis: {
tickPositions: [0, 1, 2, 3, 4]
},
Live Demo: https://jsfiddle.net/BlackLabel/v1f2d5mp/