Skip to content

Conversation

@jonrimmer
Copy link
Contributor

This PR adds an onLeave callback to the legend plugin. This complements the onHover callback, allowing the user to detect when the user has moused away from a formerly hovered legend item.

This helps achieve the use-case of highlighting a particular series on hover as supported by other charting libraries.

It also adds an example page and tests for the legend plugin callbacks.

@benmccann
Copy link
Contributor

@jonrimmer don't worry about the code climate warning, but please do fix the failing test so that Travis succeeds

@jonrimmer
Copy link
Contributor Author

@benmccann Oops, sorry. Should be fixed now.

@benmccann
Copy link
Contributor

@jonrimmer I like the cleanup! this PR will have to be rebased

@benmccann
Copy link
Contributor

Looks good to me other than needing to be rebased

@jonrimmer
Copy link
Contributor Author

Rebased

@simonbrunel simonbrunel merged commit f3b1837 into chartjs:master Feb 24, 2019
@simonbrunel
Copy link
Member

Thanks @jonrimmer

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.

6 participants