File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,10 @@ export abstract class BaseDataSet<T extends Entry> implements IDataSet<T> {
154
154
return this . mColors ;
155
155
}
156
156
157
+ public getNbColors ( ) {
158
+ return this . mColors . length ;
159
+ }
160
+
157
161
public getValueColors ( ) {
158
162
return this . mValueColors ;
159
163
}
Original file line number Diff line number Diff line change @@ -170,7 +170,9 @@ export class LineChartRenderer extends LineRadarRenderer {
170
170
if ( dataSet . getEntryCount ( ) < 1 ) return false ;
171
171
this . mRenderPaint . setStrokeWidth ( dataSet . getLineWidth ( ) ) ;
172
172
this . mRenderPaint . setPathEffect ( dataSet . getDashPathEffect ( ) ) ;
173
- this . mRenderPaint . setColor ( dataSet . getColor ( ) ) ;
173
+ if ( dataSet . getNbColors ( ) === 1 ) {
174
+ this . mRenderPaint . setColor ( dataSet . getColor ( ) ) ;
175
+ }
174
176
this . mRenderPaint . setStyle ( Style . STROKE ) ;
175
177
176
178
const scaleX = this . mViewPortHandler . getScaleX ( ) ;
You can’t perform that action at this time.
0 commit comments