Skip to content
Snippets Groups Projects
Commit 8c0c15d2 authored by osopolar's avatar osopolar Committed by Daniel Cothran
Browse files

Issue #2696519 by osopolar: Views: Charts with multiple data fields aren't rendered as expected

parent ba58b897
No related branches found
No related tags found
No related merge requests found
......@@ -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++;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment