File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
classes/Visualizer/Module Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -214,12 +214,8 @@ private static function set_defaults_chartjs( $chart, $post_status ) {
214
214
// fall through.
215
215
case 'bar ' :
216
216
for ( $ i = 0 ; $ i < $ max ; $ i ++ ) {
217
- if ( isset ( $ settings [ $ name ][ $ i ]['backgroundColor ' ] ) && ! empty ( $ settings [ $ name ][ $ i ]['backgroundColor ' ] ) ) {
218
- $ attributes [] = array ( 'backgroundColor ' => $ settings [ $ name ][ $ i ]['backgroundColor ' ], 'hoverBackgroundColor ' => $ settings [ $ name ][ $ i ]['hoverBackgroundColor ' ] );
219
- } else {
220
- $ colors = self ::get_random_color ();
221
- $ attributes [] = array ( 'backgroundColor ' => $ colors [0 ], 'hoverBackgroundColor ' => $ colors [1 ] );
222
- }
217
+ $ colors = self ::get_random_color ();
218
+ $ attributes [] = array ( 'backgroundColor ' => $ colors [0 ], 'hoverBackgroundColor ' => $ colors [1 ] );
223
219
}
224
220
break ;
225
221
case 'radar ' :
@@ -228,12 +224,8 @@ private static function set_defaults_chartjs( $chart, $post_status ) {
228
224
// fall through.
229
225
case 'area ' :
230
226
for ( $ i = 0 ; $ i < $ max ; $ i ++ ) {
231
- if ( isset ( $ settings [ $ name ][ $ i ]['borderColor ' ] ) && ! empty ( $ settings [ $ name ][ $ i ]['borderColor ' ] ) ) {
232
- $ attributes [] = array ( 'borderColor ' => $ settings [ $ name ][ $ i ]['borderColor ' ] );
233
- } else {
234
- $ colors = self ::get_random_color ();
235
- $ attributes [] = array ( 'borderColor ' => $ colors [0 ] );
236
- }
227
+ $ colors = self ::get_random_color ();
228
+ $ attributes [] = array ( 'borderColor ' => $ colors [0 ] );
237
229
}
238
230
break ;
239
231
}
You can’t perform that action at this time.
0 commit comments