MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

How to draw marks/annotations on the chart?

Open igorvlassov opened this issue 9 years ago • 5 comments

Hi, Could you point me the best way to draw some marks on significant points/events on the chart? Like on following image: image

igorvlassov avatar Jan 02 '17 16:01 igorvlassov

Limitlines could help you at this task. https://github.com/PhilJay/MPAndroidChart/wiki/The-Axis

GoneUp avatar Jan 03 '17 11:01 GoneUp

@GoneUp Thanks a lot! I'll check this.

igorvlassov avatar Jan 03 '17 12:01 igorvlassov

@GoneUp LimitLines are useful staff but not for that task. I need marks exactly like on image. There are could be more local extremums on curve I need to mark

igorvlassov avatar Jan 05 '17 12:01 igorvlassov

I think there is nothing like that implemted in the libary. They are Markers that are pretty close to that what you want (mark a specific point with a custom view), but they are limited to the values the user highlightes. You could extend the implementation of the markers, but that would be a bigger task,

GoneUp avatar Jan 05 '17 14:01 GoneUp

@GoneUp Thanks a lot. To the moment I simply added 2 separated scatter plots for red and green marks as a background for points of interest. However I should say annotations/events are very common charts feature and should be provided out of the box. There is example: https://www.amcharts.com/demos/stock-events/

igorvlassov avatar Jan 06 '17 07:01 igorvlassov