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

Implement moment diff cache in time scale #3261

Merged
merged 3 commits into from
Sep 12, 2016
Merged

Conversation

desowin
Copy link
Contributor

@desowin desowin commented Sep 6, 2016

This improves the performance as described in #3211 without the need to refactor the code.

This reduces number of calls to momentjs diff() if there are multiple
datasets sharing the same labels (chartjs#3211).
Previously buildLabelDiffs() was called at the end of buildTicks() and
hence labelDiffs cache was calculated twice (in getMinimumBoxSize() and
then in fitBox()).
@etimberg
Copy link
Member

etimberg commented Sep 6, 2016

I think this is fine to merge

CC @simonbrunel @tannerlinsley @zachpanz88

Use '!==' instead of '!='. This fixes eqeqeq error reported by gulp-eslint.
@etimberg
Copy link
Member

@simonbrunel @zachpanz88 is this good to merge?

@panzarino
Copy link
Contributor

Looks good to me

@etimberg etimberg merged commit d8b13ca into chartjs:master Sep 12, 2016
exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
Implement moment diff cache in time scale
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.

3 participants