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

line chart - axis options missing the tick stepSize #905

Closed
JamesB49 opened this issue May 19, 2020 · 1 comment
Closed

line chart - axis options missing the tick stepSize #905

JamesB49 opened this issue May 19, 2020 · 1 comment

Comments

@JamesB49
Copy link

JamesB49 commented May 19, 2020

Hello everyone,

sorry i am still new to this technology, and although I try as much as possible to try/test and look up by myself, today I fail to find how to control the Y axis on my line chart.

image

I can't get the chart to only display integers (0, 1, 2...) rather than half integers as displayed above...
I haven't found any option in LineChart to change anything.

Any help will be greatly appreciated.
J.

Edit: sorry for wasting anyone's time. I finally found another issue that use OptionsJsonString to provide more options to the chart. I finally found the chartjs document about the tick configuration and found my solution :
lineChart_TicketPHour.OptionsJsonString = "{\"scales\": {\"yAxes\": [{\"ticks\": {\"stepSize\": 1}}]}}";

Hope this help someone one day.

@JamesB49 JamesB49 changed the title line chart - axis options missing the tick spacing line chart - axis options missing the tick stepSize May 19, 2020
@stsrki
Copy link
Collaborator

stsrki commented May 19, 2020

You can also use OptionsObject. It might be little easier to configure.

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