File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
classes/Visualizer/Gutenberg Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -329,13 +329,13 @@ public function get_visualizer_data( $post ) {
329
329
if ( isset ( $ settings ['series ' ] ) ) {
330
330
foreach ( $ settings ['series ' ] as $ index => $ serie ) {
331
331
// skip X axis data.
332
- if ( $ index === 0 ) {
332
+ if ( $ index === 0 ) {
333
333
continue ;
334
334
}
335
335
if ( ! empty ( $ serie ['role ' ] ) ) {
336
336
// this series is some kind of annotation, so let's collect its index.
337
337
// the index will be +1 because the X axis value is index 0, which is being ignored.
338
- $ annotations ['role ' . ( intval ( $ index ) + 1 )] = $ serie ['role ' ];
338
+ $ annotations [ 'role ' . ( intval ( $ index ) + 1 ) ] = $ serie ['role ' ];
339
339
}
340
340
}
341
341
}
@@ -344,18 +344,18 @@ public function get_visualizer_data( $post ) {
344
344
$ series_names = array ();
345
345
foreach ( $ series as $ index => $ serie ) {
346
346
// skip X axis data.
347
- if ( $ index === 0 ) {
347
+ if ( $ index === 0 ) {
348
348
continue ;
349
349
}
350
350
if ( array_key_exists ( 'role ' . $ index , $ annotations ) ) {
351
- $ series_names [] = (object ) array ( 'role ' => $ annotations ['role ' . $ index ], 'type ' => $ serie ['type ' ] );
351
+ $ series_names [] = (object ) array ( 'role ' => $ annotations [ 'role ' . $ index ], 'type ' => $ serie ['type ' ] );
352
352
} else {
353
353
$ series_names [] = $ serie ['label ' ];
354
354
}
355
355
}
356
356
$ exploded_data [] = $ series_names ;
357
357
358
- foreach ( $ data ['visualizer-data ' ] as $ datum ) {
358
+ foreach ( $ data ['visualizer-data ' ] as $ datum ) {
359
359
// skip X axis data.
360
360
unset( $ datum [0 ] );
361
361
$ exploded_data [] = $ datum ;
You can’t perform that action at this time.
0 commit comments