When the chart is displayed, I want to have tick marks only at integer points on the x-axis and not in between. However, no matter what settings I try, I can't seem 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 my attempts to control the tick mark intervals are being ignored. I have tried different configurations without success. Even with just the category data, the appearance remains unchanged. The values always fall within the interval [0, 4], so that is not a concern here.
Any suggestions?
edit: It appears that the display of decimals between integer tick marks is influenced by the page size and chart width. How can I disable this feature? Regardless of screen size adjustments, I want the x-axis to only show integer tick marks without any decimals in between.