From 8c0c15d20e9849370b6775041454a202f501821c Mon Sep 17 00:00:00 2001 From: osopolar <osopolar@115856.no-reply.drupal.org> Date: Thu, 8 Mar 2018 01:38:05 -0500 Subject: [PATCH] Issue #2696519 by osopolar: Views: Charts with multiple data fields aren't rendered as expected --- views/charts_plugin_style_chart.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/views/charts_plugin_style_chart.inc b/views/charts_plugin_style_chart.inc index f991d15..810cc35 100644 --- a/views/charts_plugin_style_chart.inc +++ b/views/charts_plugin_style_chart.inc @@ -229,9 +229,8 @@ class charts_plugin_style_chart extends views_plugin_style { $sets = $this->render_grouping($this->view->result, $this->options['grouping'], TRUE); foreach ($sets as $series_label => $data_set) { $series_index = isset($series_index) ? $series_index + 1 : 0; - $series_key = $this->view->current_display . '__' . $field_key . '_' . $series_index; foreach ($data_fields as $field_key => $field_handler) { - $chart[$series_key] = array( + $chart[$this->view->current_display . '__' . $field_key . '_' . $series_index] = array( '#type' => 'chart_data', '#data' => array(), // If using a grouping field, inherit from the chart level colors. @@ -266,7 +265,7 @@ class charts_plugin_style_chart extends views_plugin_style { else { $value = (float) str_replace(array(',', ' '), '', $value); } - $chart[$series_key]['#data'][] = $value; + $chart[$this->view->current_display . '__' . $field_key . '_' . $series_index]['#data'][] = $value; } $row_number++; } -- GitLab