Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Y-axes Scale issue with decimal stepSize #624

Closed
evertdausy1 opened this issue Jun 17, 2020 · 3 comments
Closed

Y-axes Scale issue with decimal stepSize #624

evertdausy1 opened this issue Jun 17, 2020 · 3 comments

Comments

@evertdausy1
Copy link

Expected Behavior

I have a line chart that will have on the Y-axes a min value of 1.0 and a max value of 3.3. I need 10 ticks. So tick size = (3.3 - 1.0) / 10 = 0.23. So I would expect 10 labels on my y axes.

Actual Behavior

I'm only getting like 6 or 7 labels and the tick size is completely off. I was trying to find what the issue is, and I came upon this fix in chart.js. chartjs/Chart.js#6966. I think these are related.

ticks: { min: 1, //minimum tick stepSize: 0.23, maxTicksLimit: 10, max: 3.3, }

I added the max ticks limit just to test, it should not be needed in the scenario I think.

scales_issue

Environment

  • vue.js version: 2.6.11
  • vue-chart.js version: 1.0.5
  • npm version: 6.13.4
@apertureless
Copy link
Owner

Sorry to close this, but its not related to vue-chartjs as this is only a wrapper for Chart.js so you might want to check out the main documentation or the main repo.

@evertdausy1
Copy link
Author

Can I just update chart.js? Because this should be fixed in the latest version.

@apertureless
Copy link
Owner

Yes, as Chart.js is only a peerDependency, you can simply update chart.js and it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants