Skip to content

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