We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 176b7d3 commit 9fb60f9Copy full SHA for 9fb60f9
classes/Visualizer/Source/Json.php
@@ -430,6 +430,20 @@ private function connect( $url ) {
430
public function refresh( $series ) {
431
$this->_series = $series;
432
$this->fetch();
433
+
434
+ $headers = wp_list_pluck( $this->_series, 'label' );
435
+ $data = array();
436
+ foreach ( $this->_data as $line ) {
437
+ $data_row = array();
438
+ foreach ( $line as $header => $value ) {
439
+ // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
440
+ if ( in_array( $header, $headers ) ) {
441
+ $data_row[] = $value;
442
+ }
443
444
+ $data[] = $this->_normalizeData( $data_row );
445
446
+ $this->_data = $data;
447
return true;
448
}
449
0 commit comments