0
votes

I have a Highcharts chart with multiple series and a datetime x-axis. I have the chart configured to show labels for each year using tickInterval. This works with line charts but does not work for bar/column charts.

jsFiddle showing how this works with line charts: line chart

jsFiddle showing how this does NOT work with column charts: column chart

As you can see in the second fiddle, when chart type is 'column' only a few ticks (2005, 2010, and 2015) are displayed instead of 2003-2013 as expected.

1

1 Answers

1
votes

It seems that you don't get proper tickInterval because there are holes in data especially in series 'Cat7' and 'Cat8'. If you use the same number of points for each series than you will get tickInterval for each year. For example:

    data: [
        [1041400800000, 0],
        [1072936800000, 0],
        [1104559200000, 0],
        [1136095200000, 0],
        [1167631200000, 0],
        [1199167200000, 1],
        [1230789600000, 0],
        [1262325600000, 0],
        [1293861600000, 0],
        [1325397600000, 1],
        [1357020000000, 0]
    ],
    name: "Cat1"
}, {

See updated example at jsfiddle and the same example with null instead of zero values.