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

Need ability to reverse time scale #3279

Closed
wjford opened this issue Sep 8, 2016 · 3 comments · Fixed by #5927
Closed

Need ability to reverse time scale #3279

wjford opened this issue Sep 8, 2016 · 3 comments · Fixed by #5927

Comments

@wjford
Copy link

wjford commented Sep 8, 2016

I am using the Time scale to plot test results. The X values are the date the test result was entered and the Y values are the numerical results. I need the ability to display my datasets in reverse chronological order. I noticed that the documentation mentions a reverse option under the ticks object, but this doesn't appear to apply to the Time scale. Setting the time.min and time.max values cause the graph the be correctly drawn in reverse, but the only two ticks and labels on the x-axis are the max and min.

Below is a fiddle containing a chart with a min and max set and a chart without:

https://jsfiddle.net/rr3ftzge/10/

@92shepherd
Copy link

My problem is exactly same with this issue. This issue is old. I really want to solve it.

@priteshkadiwala
Copy link

Is there any solution for this problem yet?

@rorikata
Copy link

I am facing the same issue where I am not able to invert the type time scale. Is there a workaround for now?

priteshkadiwala added a commit to priteshkadiwala/Chart.js that referenced this issue Sep 16, 2018
This fixes issue chartjs#3279 where when scale type is time and the ticks option has reverse as true, it wouldn't reverse the scale. I have added combined various tests such as reversing when distribution is linear and series.
@simonbrunel simonbrunel added this to the Version 2.8 milestone Dec 20, 2018
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.

6 participants