Chartjs-How do I implement the 'autoskip' feature in chartjs?

1👍

In case anyone is wondering, please update to 2.9. Confirmed that the issue is resolved there.

https://github.com/chartjs/Chart.js/issues/6591

0👍

I noticed your autoskip is in lower case where in the documentation its in camlcase (ie. autoSkip) – from my experience with Chartjs, I’ve found that it might make a difference to try and fix that and see if that does the trick

0👍

You could try changing

distribution: series

to

distribution: linear

It looks to me like its trying to space the data evenly, despite the fact that you’re missing data for 3 days (the weekend maybe?). It really shouldn’t break your labels… but I bet the labels know there’s enough space for n labels on the graph, but they don’t realize that three of the labels are being squished together.

The default distribution is linear, so you could also just remove it. (https://www.chartjs.org/docs/latest/axes/cartesian/time.html#scale-distribution)

0👍

For anyone wondering, a chartjs dev has replied to my post here: https://github.com/chartjs/Chart.js/issues/6591

Looks like there are some issues in the current Chart.js version. Should be fixed in 2.9.

Leave a comment