Possible Bug in LineSeries

I've noticed a possible bug that is even present in the official line chart demo.

The x axis is missing a label causing the data and x axis ticks to not line up. I'm not sure what is causing this but so far it has affected every line series chart I've made

Hi @JosoIce,

This happens because there isn't currently enough room to fit all twelve ticks. We will expose an internal property called TickDistance which will allow you to override the default pixel distance between ticks. We will also update our demo to show how to set it.

Thank you for the speedy reply but unfortunately just exposing TickDistance doesn't seem to have solved this issue. In the current docs for the line chart it duplicates January for some reason.

Playing around with the value I can't seem to find one that fits the 12 data points perfectly

Indeed we may need to change the algorithm which calculates the ticks when DateTime is used in categories. Until we do that you can convert your DateTime objects to strings and then they will appear as they are in the category axis.

UPDATE: The line chart demo has been changed to show this approach. I also opened an issue to track this problem.

1 Like