I’m trying to make my x-axis display correctly by choosing exactly where the labels should be. For example, if I’m showing data that starts one week ago (defined as now minus 7 days) and ends now, I want the xaxis intervals to be on midnight of each day.
It seems the easy way to do this is to set the baseunit to day and the interval to 1, but that doesn’t work as it places the first tick on the left edge and increments from there. This leads to the labels appearing at an arbitrary point in the day depending on when the chart is loaded. Another solution is to change the baseunit to hour and use formatFunction to return an empty string if we’re not on midnight, but this solution still results in labels being visibly off, results in extra tickmarks, and for some timescales can result in thousands of labels with empty strings which is horrible for performance.
Is there a feature to offset the labels for the xAxis so that they fall on predictable marks?
Thank you.