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

Month Lengths Misaligned with time series month view #4264

Closed
crisward opened this issue May 16, 2017 · 1 comment · Fixed by #4556
Closed

Month Lengths Misaligned with time series month view #4264

crisward opened this issue May 16, 2017 · 1 comment · Fixed by #4556

Comments

@crisward
Copy link

Expected Behavior

The example should show a straight diagonal line as days go up by one, and the value goes up by one.

Current Behavior

The end of march appears to show the last 3 days aligned vertically. It looks like it's trying to fit 31 days into 28 (as though its aligned with February). This does not happen in if time unit is week or day.

Possible Solution

I suspect this is the old issue with months being zero indexed in js. I haven't gone through the source, but it is probable cause.

Steps to Reproduce (for bugs)

https://codepen.io/crisward/pen/ybqjQZ?editors=0010

Context

Trying to show a time series graph width a month scale.

Environment

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

It might be a good idea to try out the latest from the master branch. We're using moment js for dates so I don't think we don't deal with the months being zero indexed directly

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