show marker in mpandroidchart code example

Example 1: markerview mpchart android

Please have a look at the documentation of the markerview.

There you can find information how to achieve what you want. Basically, you will have to extend the MarkerView class and refresh it's content in the refreshContent(Entry e, int dataSetIndex) method.

Share

Example 2: markerview mpchart android

Your MarkerView is not showing because you have not highlighted any entry in your chart. The MarkerView is only displayed for entries that are highlighted.

Since you disabled the functionality to highlight entries per tap (by calling chart.setHighlightPerTapEnabled(false)), you can only highlight values programmatically, like this:

chart.highlightValue(...)

Tags:

Misc Example