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

Inverted time scale functionality added - Issue #3279 #5731

Closed

Conversation

priteshkadiwala
Copy link

This fixes issue #3279 where when scale type is time and the ticks option has reverse as true, it wouldn't reverse the scale. I have combined various tests such as reversing when distribution is linear and series too.

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.
@priteshkadiwala
Copy link
Author

I am unable to fix some of the issue because of the foundation of the code setup. Please let me know if I could do anything else for the approval

@@ -132,6 +132,46 @@ function buildLookupTable(timestamps, min, max, distribution) {
return table;
}

/**
* Has the same functionatilites as `buildLookupTable` but this functions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

functionatilites -> functionalities

@benmccann
Copy link
Contributor

I'm wondering if we actually need the reverse lookup table. Would it instead be possible to do something like pos = isReverse ? scaleWidth - pos : pos;? I haven't looked at this closely enough to know if that's possible or not, but it might be much easier

@priteshkadiwala
Copy link
Author

I tried doing what you asked but it doesnt seem to work

@simonbrunel
Copy link
Member

@priteshkadiwala thank for your contribution, we merged #5927 instead which contain no code duplication.

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

Successfully merging this pull request may close these issues.

None yet

3 participants