question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Huge gap between last two labels when using maxTicksLimit

See original GitHub issue

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/

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
payalordcommented, Jul 29, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I evenly distribute ticks when using maxTicksLimit?
This solution works most of the time, but still occasionally has a wider gap for the last column. I have a graph that...
Read more >
How to Reduce the Label Ticks in the X Axis in Chart JS
The labels are called tick labels as they tend to pair along with ... or any type of chart in a Javascript library...
Read more >
Common tick options to all cartesian axes - Chart.js
Name Type Default align string 'center' crossAlign string 'near' sampleSize number ticks.length
Read more >
evenly distribute ticks when using maxTicksLimit-Chart.js
maxTicksLimit ; // let chart.js draw the first and last label ... causes all the fractional ticks to be accounted for between the...
Read more >
Generate a big X Axis - chartjs - QuickChart
For data labels, you can control which ones appear by setting the ... display only every other tick, ensuring that there are enough...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found