Home > Software design >  How to remove labels on the chart when using MPAndroidChart Library
How to remove labels on the chart when using MPAndroidChart Library

Time:11-28

I'm trying to use MPAndroidChartLibrary for charting and could draw the chart. I have two questions in the graph:

  • I don't want the values to be added on the graph
  • I don't want the horizontal and vertical lines while scrubbing, instead I want a bubble or a small circle on the chart line (not sure if this is possible).

Please help me, what api can I use in MPAndroidChart to achieve this

enter image description here

CodePudding user response:

You have a few different questions in here

How to get rid of values?

To hide the values drawn at each point, you can call setDrawValues(false) on the data set.

How to get rid of the highlighting lines?

To disable the horizontal and vertical yellow lines when you click a point, you can use lineSet.isHighlightEnabled = false, however if you also want to use a chart popup you should keep it enabled, but hide the lines with setDrawVerticalHighlightIndicator and setDrawHorizontalHighlightIndicator

How to add a popup that shows a custom view when clicking on a point?

To add a before and after

  • Related