Chart.js: Huge gap between last two labels when using maxTicksLimit

Created on 9 Jun 2017  路  18Comments  路  Source: chartjs/Chart.js

My chart has so much data the labels won't all fit:

sf2hz

I found https://stackoverflow.com/questions/22064577/limit-labels-number-on-chartjs-line-chart which suggests adding:

autoSkip: true,
maxTicksLimit: 10

However, despite how high or low I set this limit, there's always a large gap towards the right end of the x-axis. Does anybody know why?

https://jsfiddle.net/askhflajsf/xzk6sh1q/

help wanted duplicate time scale bug

Most helpful comment

@etimberg looks like this is still not fixed in v2.7.2

All 18 comments

@frankie-loves-jesus the issue here is that something is going wrong in the time scale. There should be a label in that large gap.

Closing as a duplicate since this has already been reported.

Hey @etimberg and thanks for your reply. Sorry but what issue is this a duplicate of?

I don't know the exact number off the top of my head, but it should be tagged with the time scale label

@etimberg thanks - I think I found them: https://github.com/chartjs/Chart.js/issues/2249 and https://github.com/chartjs/Chart.js/issues/2774 if I'm not mistaken.

@etimberg I realize it's is a very complicated issue, but are there any solutions in sight? Or perhaps temp fixes? Thanks again.

@frankie-loves-jesus some of the work on the time-series axis in #4268 and #4364 will hopefully be the solution to this problem

@etimberg great news, I can't wait!

@etimberg, https://github.com/chartjs/Chart.js/pull/4268 is done right? So we just need to merge https://github.com/chartjs/Chart.js/pull/4364 and the problem will most likely be gone?

@frankie-loves-jesus yes I think that is all that is left. All that's required on the client is switching from the 'time' to 'timerseries' axis

@etimberg is there like a nightly build of Chart.js' master branch somewhere?

Thanks! Would be nice if it ran on HTTPS as well so I could use it with JSFiddle.

Agree, but I'm not sure if we can enable SSL for chartjs.org. @nnnick?

Seems that JSFiddle now forces a redirection to HTTPS, wasn't the case a few weeks ago :\

@frankie-loves-jesus chartjs.org resources are stored on our chartjs.github.io repository, so you can use a service like https://rawgit.com/ to serve the development builds through HTTPS: https://rawgit.com/chartjs/chartjs.github.io/master/dist/master/Chart.bundle.min.js

Wonderful - thanks :)

Any news about this bug? I have the same problem with the v7.0

+1

@etimberg looks like this is still not fixed in v2.7.2

Was this page helpful?
0 / 5 - 0 ratings