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

2.6.0 Line Chart xAxis Type Time ignores unitStepSize #4391

Closed
philipp-winterle opened this issue Jun 20, 2017 · 4 comments · Fixed by #4401
Closed

2.6.0 Line Chart xAxis Type Time ignores unitStepSize #4391

philipp-winterle opened this issue Jun 20, 2017 · 4 comments · Fixed by #4401

Comments

@philipp-winterle
Copy link

Expected Behavior

The line chart xaxis should display date values with a difference of 5 minutes, when unitStepSize is 5 and unit is "minute".

Current Behavior

The line chart xaxis displays dates with a difference of 2 minutes

Possible Solution

Rollback to chart.js version 2.5.0

Steps to Reproduce (for bugs)

http://jsfiddle.net/hummal/m7btaLx8/1/ Chart.js Version 2.5.0
http://jsfiddle.net/hummal/m7btaLx8/2/ Chart.js Version 2.6.0
Example is with chart.js version 2.6.0. Switch to 2.5.0 to see this working. It is all the same but the chart.js version.

Context

I just dont want to have a filled xaxis bar

Environment

  • Chart.js version: 2.6.0
  • Browser name and version: Chrome 58
  • Link to your project: not available
@etimberg
Copy link
Member

Thanks for reporting this. To anyone interested, I am happy to look at a PR fixing this

@etimberg
Copy link
Member

@hummal as a work-around set stepSize instead of unitStepSize. Looks like the backwards compatibility to the old property was lost.

@etimberg etimberg added this to the Version 2.7 milestone Jun 20, 2017
@philipp-winterle
Copy link
Author

@etimberg confirmed working stepSize in options ->scales -> xAxes -> time.
Did not find it in the documentation. Me confused.

unitStepSize = deprecated == true?

@etimberg
Copy link
Member

I think that's likely what happened and then somehow the code to maintain backwards compatibility was lost. Docs were already corrected: http://www.chartjs.org/docs/master/axes/cartesian/time.html

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

Successfully merging a pull request may close this issue.

2 participants