Good morning,
I'm having a really annoying issue with Highcharts, such that the x-axis label(using datetime) won't start at my first datapoint - as in this image:
As you can see, the chart label starts at 15. Aug, whereas it shoudl start at 9. Aug.
Setting the startOnTick: true forces the axis label to start on the left, but the label still doesn't correspond to my first point - as in this image:
Where you can see the label starting at 8.Aug, when it should start at 9. Aug. Better shown in my hourly chart:
My series type is line and the data takes a [dateutc, decimal] pair. The datetime intervals are not at regular intervals and can range from hourly to daily to monthly.
xAxis: {
type: "datetime",
lineWidth: 2,
//startOnTick: true,
//showFirstLabel: true
}
I think the option you're looking for is tickInterval. The reason that your ticks aren't showing up the way you want is because you don't have a custom tickInterval defined and when you use datetime as your x-axis type it picks one for you.
Here's an example jsfiddle that forces the tickInterval to every 2 days.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With