Creating a line slider on a graph in android

*爱你&永不变心* 提交于 2019-12-13 01:45:05

问题


I have created a graph with a series of data. Now I'm trying to add a slider / line marker to the chart like the one below.

I created the graph/charts using the MPAndroidChart library provided here https://github.com/PhilJay/MPAndroidChart.

The graph seems to be working fine and good but i need a line slider like below so that when i touch on the graph the line slides and provides the values of the line intersecting the graph. Could anyone help me figure out this problem or do i have to use a different library to achieve this.


回答1:


This feature just became available: https://github.com/PhilJay/MPAndroidChart/commits/master

However, it is not available as a release yet, so you cannot get it via gradle or maven, only via cloning the repository.

It will be in the next release v2.1.0 which will be available within the next week.



来源:https://stackoverflow.com/questions/29743092/creating-a-line-slider-on-a-graph-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!