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

Pass the hover event to the onHover event handler #3669

Merged
merged 2 commits into from
Dec 3, 2016

Conversation

compwright
Copy link
Contributor

BREAKING CHANGE:

This makes the behavior of the onHover handler consistent with the onClick handler:

function(event, activeElements) {
    var chartInstance = this;
}

Previously, activeEvents was the first argument, and event was not passed.

This makes the behavior of the `onHover` handler consistent with the `onClick` handler:

```
function(event, activeElements) {
    var chartInstance = this;
}
```
@etimberg
Copy link
Member

etimberg commented Dec 3, 2016

I think this is fine to make this consistent. To prevent the breaking API change we could put the event as the last parameter. @simonbrunel thoughts?

@compwright
Copy link
Contributor Author

Personally, I think the breaking change is worth it for consistency's sake.

@simonbrunel
Copy link
Member

I prefer consistency as well

@etimberg etimberg added this to the Version 2.5 milestone Dec 3, 2016
@etimberg
Copy link
Member

etimberg commented Dec 3, 2016

Ok, sounds good. We'll need to keep this in mind when writing the release notes for v2.5

@etimberg etimberg merged commit 152ce9c into chartjs:master Dec 3, 2016
exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
Pass the hover event to the onHover event handler

This makes the behavior of the `onHover` handler consistent with the `onClick` handler:

```
function(event, activeElements) {
    var chartInstance = this;
}
```
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.

3 participants