@@ -141,32 +141,35 @@ else if (j == points.size() - 1) {
141141 }
142142 }
143143 }
144-
144+
145145 // if filled is enabled, close the path
146146 if (dataSet .isDrawFilledEnabled ()) {
147-
147+
148148 // create a new path, this is bad for performance
149149 drawCubicFill (c , dataSet , new Path (spline ), trans );
150- }
151-
150+ }
151+
152152 mRenderPaint .setColor (dataSet .getColor ());
153-
153+
154154 mRenderPaint .setStyle (Paint .Style .STROKE );
155-
155+
156156 trans .pathValueToPixel (spline );
157157
158158 c .drawPath (spline , mRenderPaint );
159-
159+
160160 mRenderPaint .setPathEffect (null );
161161 }
162162
163163 protected void drawCubicFill (Canvas c , LineDataSet dataSet , Path spline , Transformer trans ) {
164-
164+
165165 float fillMin = mChart .getFillFormatter ()
166166 .getFillLinePosition (dataSet , mChart .getLineData (), mChart .getYChartMax (),
167167 mChart .getYChartMin ());
168168
169- spline .lineTo (dataSet .getYVals ().get ((int ) ((dataSet .getYVals ().size () - 1 ) * mAnimator .getPhaseX ())).getXIndex (), fillMin );
169+ spline .lineTo (
170+ dataSet .getYVals ()
171+ .get ((int ) ((dataSet .getYVals ().size () - 1 ) * mAnimator .getPhaseX ()))
172+ .getXIndex (), fillMin );
170173 spline .lineTo (mChart .getXChartMin (), fillMin );
171174 spline .close ();
172175
@@ -178,7 +181,7 @@ protected void drawCubicFill(Canvas c, LineDataSet dataSet, Path spline, Transfo
178181
179182 trans .pathValueToPixel (spline );
180183 c .drawPath (spline , mRenderPaint );
181-
184+
182185 mRenderPaint .setAlpha (255 );
183186 }
184187
@@ -325,12 +328,12 @@ public void drawValues(Canvas c) {
325328
326329 if (!dataSet .isDrawValuesEnabled ())
327330 continue ;
328-
331+
329332 // apply the text-styling defined by the DataSet
330333 applyValueTextStyle (dataSet );
331334
332335 Transformer trans = mChart .getTransformer (dataSet .getAxisDependency ());
333-
336+
334337 // make sure the values do not interfear with the circles
335338 int valOffset = (int ) (dataSet .getCircleSize () * 1.75f );
336339
@@ -355,7 +358,8 @@ public void drawValues(Canvas c) {
355358
356359 float val = entries .get (j / 2 ).getVal ();
357360
358- c .drawText (dataSet .getValueFormatter ().getFormattedValue (val ), x , y - valOffset ,
361+ c .drawText (dataSet .getValueFormatter ().getFormattedValue (val ), x ,
362+ y - valOffset ,
359363 mValuePaint );
360364 }
361365 }
@@ -402,9 +406,11 @@ protected void drawCircles(Canvas c) {
402406
403407 c .drawCircle (x , y , dataSet .getCircleSize (),
404408 mRenderPaint );
405- c .drawCircle (x , y ,
406- dataSet .getCircleSize () / 2f ,
407- mCirclePaintInner );
409+
410+ if (dataSet .isDrawCircleHoleEnabled ())
411+ c .drawCircle (x , y ,
412+ dataSet .getCircleSize () / 2f ,
413+ mCirclePaintInner );
408414 }
409415 } // else do nothing
410416 }
0 commit comments