How to make draggable LimitLine in MPAndroidChart

I managed to create a line chart using MP Android Chart, and I want to create a draggable line to set the limit. Therefore, if the value crosses the value of the string, the user receives a warning. My use case is similar to limiting the use of Android system data.

I came across LimitLines - https://github.com/PhilJay/MPAndroidChart/wiki/The-Axis and also dragged using callback callbacks https://github.com/PhilJay/MPAndroidChart/wiki/Interaction-with- the-chart

My question is, can I dynamically add a limit line in response to the translate (onChartTranslate) event so that I can simulate the restriction setting? Is this a better approach than trying to overload MarkerView?

+4
source share

All Articles