X Tutup
The Wayback Machine - https://web.archive.org/web/20210111204418/https://github.com/PhilJay/MPAndroidChart/issues/5034
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

Show Marker View Programmatically #5034

Open
omidngp74 opened this issue Nov 1, 2020 · 1 comment
Open

Show Marker View Programmatically #5034

omidngp74 opened this issue Nov 1, 2020 · 1 comment

Comments

@omidngp74
Copy link

@omidngp74 omidngp74 commented Nov 1, 2020

I want to show Marker View Programmatically on specific entries when some events occurred in my app.
How can I do that?

@omidngp74
Copy link
Author

@omidngp74 omidngp74 commented Nov 22, 2020

Finally, We Found the Answer

int index = 20
float x = chart.getData().getDataSets().get(0).getEntryForIndex(index).getX();
float y = chart.getData().getDataSets().get(0).getEntryForIndex(index).getY();
chart.highlightValue(x,y,0,20);
chart.getMarker().refreshContent(chart.getData().getDataSets().get(0).getEntryForIndex(20),chart.getHighlightByTouchPoint(x,y));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.
X Tutup