MPAndroid single-point graph with curve

I want the line to be next. I want to show only the indicated point (the blue circle should be there) (the red circle should not be there).

enter image description here

+1
source share
2 answers

I think of two methods.

First: disable all points and values ​​with

lineDataSet.setDrawValues(dataSet.drawValues);
lineDataSet.setDrawCircles(dataSet.drawValues);

Then add another LineDataSetin LineChartcontaining only one point for Maxim. This decision causes an additional entry in the legend.

Another solution would be custom MarkerViewas described here

+2
source

To do this, first set the colors of the dots to transparent as:

dataset.setCircleColor(Color.TRANSPARENT);
dataset.setCircleColorHole(Color.TRANSPARENT);

Then after that select a specific point as:

Highlight highlight = new Highlight(50f, 0); 
chart.highlightValue(highlight, false);

(50f, 0). , . , :)

+1

Source: https://habr.com/ru/post/1688659/


All Articles