Reputation: 295
MPAndroidChart - linechart
how to invisible touching line ?
please help.
Upvotes: 28
Views: 16472
Reputation: 788
To remove touch lines you can use
dataSet.setDrawHighlightIndicators(false);
To remove individual indicator lines, use either one of following
dataSet.setDrawHorizontalHighlightIndicator(false);
dataSet.setDrawVerticalHighlightIndicator(false);
In this, 'dataSet' should be an instance of LineScatterCandleRadarDataSet (LineDataSet extending that class in the inheritance hierarchy)
You do not need to have mpAndroidChart Version 3. I tried this with version 2.1.6
Upvotes: 27
Reputation: 639
If still want to show marker, and hide those lines, try this. (MPAndroidChart v3.0.0)
dataSet.setDrawHorizontalHighlightIndicator(false);
dataSet.setDrawVerticalHighlightIndicator(false);
Upvotes: 49
Reputation: 18978
Actually its Highlight selected axis.
to remove that use mChart.getData().setHighlightEnabled(false);
setHighlightEnabled : Enables / disables highlighting values for all DataSets this data object contains. If set to true, this means that values can be highlighted programmatically or by touch gesture.
If you have sample of MP Android Lib then you can check it from Option Menu named "Toggle Highlight".
This can also be found in the documentation.
Upvotes: 34