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

Wrong negative values in mousemove event (bar chart) #204

Open
TFrascaroli opened this issue Jan 28, 2016 · 0 comments
Open

Wrong negative values in mousemove event (bar chart) #204

TFrascaroli opened this issue Jan 28, 2016 · 0 comments

Comments

@TFrascaroli
Copy link

I implemented a custom tooltip for a bar chart we've built using dimple. Everything worked fine untill we started having negative values. The bars get correctly drawn, but when we hovered on them we would see value 0. This is what we're using to get the value of the data, inside the event handler for mousemove:
evt.yValue
where evt is the event (first parameter) passed to the handler by dimple.

If we look at the file "/src/objects/chart/methods/_registerEventHandlers.js", we find that this is being constructed like this:
e.yValue = d.y;
on line 16 of said file. The thing is, in my opinion, it should be:
e.yValue = d.yValue;

I'm not creating a pull request for this since I'm not sure this is the correct way to ensure we get the right value when hovering. Perhaps adding an extra property to the e object would do the trick. We've modified our copy of dimple including this tweak, but please let me know if this is the right way, or even if I'm wrong in my assumptions and this is to be dealt with in some other manner.

Thank you.

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

No branches or pull requests

1 participant