MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

Draw custom shape on the chart

Open igorvlassov opened this issue 9 years ago • 2 comments

Hi, Is it possible to draw custom shape on the chart? I'd like to draw circle around finger when long press.

Thanks in advance, Igor

igorvlassov avatar Jan 02 '17 15:01 igorvlassov

I think you would have to extend the whatever chart class you're using and override onTouch to get the position and onDraw to draw the circle. Just remember to call super.onDraw(canvas); in onDraw before doing custom drawing.

patrick-elmquist avatar Jan 02 '17 20:01 patrick-elmquist

@patrick-iv Thanks a lot! I'll try

igorvlassov avatar Jan 03 '17 10:01 igorvlassov