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

Displaying an overlay with extra / more detailed information on mouse hover #1940

Closed
MrMage opened this issue Dec 8, 2016 · 8 comments
Closed

Comments

@MrMage
Copy link

MrMage commented Dec 8, 2016

I am using Charts in a macOS application and would like to display extra information (or at least the data entry's x/y values and label) when the user hovers the mouse over a chart element, e.g. a bar in a bar chart - for example via a popover. I have looked around but could not find this functionality yet - highlighting seems to come closest, but only works on click and just colors the bar differently (rather than displaying more info).

Is functionality like this planned? If not, how would I best go about implementing it? Should I subclass e.g. BarChartView in my own code or try integrating this functionality so that it can be merged? Also, how would you recommend integrating the with the existing parts of the library?

Thanks,
Daniel

@MrMage
Copy link
Author

MrMage commented Dec 20, 2016

Friendly ping :-)

@pmairoldi
Copy link
Collaborator

So far all the interactions have been done using gesture recognitiers. I am not familiar with macOS but if there is a gesture for mouse move then it would be fairly simple. But from my iOS knowledge I don't think that would be a thing. Let us know!

@liuxuan30
Copy link
Member

One idea is how to detect the hover and use highlighter to highlight the values you want, also ChartMarker might help. I don't know hover in macOS

@MrMage
Copy link
Author

MrMage commented Dec 21, 2016

The problem is that highlighting only changes the color, while I want to e.g. display the actual values and their labels. I might end up just subclassing the graph view and creating my own popover.

How is ChartMarker supposed to be used?

@thierryH91200
Copy link
Contributor

Look in the demo for ios. The solution is there.
The demo for macOS is minimalist
I think 90% of people program for ios
Otherwise I can send you a sample code

@MrMage
Copy link
Author

MrMage commented Dec 21, 2016

I have looked at the iOS demo, but I can't find any example for overlays there. Could you please point me in the right direction?

@thierryH91200
Copy link
Contributor

look in BalloonMarker and XYMarkerView or modify BalloonMarker

@MrMage
Copy link
Author

MrMage commented Dec 21, 2016

Thanks, the BalloonMarker is very helpful. Closing this.

@MrMage MrMage closed this as completed Dec 21, 2016
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

4 participants