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

Configurable hide/show animations #7055

Merged
merged 5 commits into from
Feb 6, 2020
Merged

Conversation

kurkle
Copy link
Member

@kurkle kurkle commented Feb 3, 2020

closes: #1833

master:
hide-master

pr:
hide-pr

src/core/core.animation.js Outdated Show resolved Hide resolved
src/core/core.controller.js Outdated Show resolved Hide resolved
me.setDataVisibility(datasetIndex, index, visible);
}
meta._skipUpdate = true;
me.update();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't we just not call update instead of adding _skipUpdate?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added some comments to explain

Copy link
Contributor

Choose a reason for hiding this comment

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

It feels a little off to me that we're reaching inside the meta object to set a private property _skipUpdate. E.g. it's not an API our users would be able to use really. What do you think about if we made mode also able to take a function to be resolved and then we could return a different mode for datasetIndex?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

etimberg
etimberg previously approved these changes Feb 4, 2020
@kurkle
Copy link
Member Author

kurkle commented Feb 5, 2020

rebased

etimberg
etimberg previously approved these changes Feb 5, 2020
etimberg
etimberg previously approved these changes Feb 5, 2020
Copy link
Contributor

@benmccann benmccann left a comment

Choose a reason for hiding this comment

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

this looks good to me

src/core/core.controller.js Outdated Show resolved Hide resolved
etimberg
etimberg previously approved these changes Feb 6, 2020
@benmccann
Copy link
Contributor

@kurkle looks like this one needs to be rebased

@etimberg etimberg merged commit 70b6eab into chartjs:master Feb 6, 2020
@etimberg etimberg added this to the Version 3.0 milestone Feb 6, 2020
@kurkle kurkle deleted the show-hide branch February 19, 2020 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow animation to/from hidden datasets
3 participants