MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

LineChart circle fill color

Open lahiruchandima opened this issue 11 years ago • 2 comments

How can I change the fill color of a point circle? I tried LineDataSet.setCircleColor() but it only changes the circle outline color. Fill color is always white.

screenshot_2015-01-05-13-57-12

Thanks in advance

lahiruchandima avatar Jan 05 '15 08:01 lahiruchandima

That is not directly possible.

However, you can access the Paint object that is used for drawing the inner circles and do whatever you want with it:

Paint circlePaint = lineChart.getPaint(Chart.PAINT_CIRCLES_INNER);
circlePaint.setColor(...);

PhilJay avatar Jan 06 '15 17:01 PhilJay

@PhilJay I guess that's no longer possible on v2.0.7, since there's no such Chart.PAINT_CIRCLES_INNER constant.

From what I see, you need to access mCirclePaintInner in LineChartRenderer, but that can only be done by using your own LineChartRenderer. That's why I've created PR https://github.com/PhilJay/MPAndroidChart/pull/429

Maragues avatar Mar 10 '15 13:03 Maragues