In the views render function, instead of
$chart['#data'][] = $row->$key;
you need
$chart['#data'][] = $row->{$field->field_alias};

Comments

13rac1’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Active » Fixed

This is fixed in 7.x-1.x-dev.

      foreach ($records as $row_index => $row) {
        foreach ($this->view->field as $key => $field) {
          if (!$field->options['exclude']) {
            $chart['#data'][$field->field_alias][] = (int) $row->{$field->field_alias};
            $chart['#labels'][] = $field->options['label'] . ($this->options['label_append_value'] ? ': ' . $row->{$field->field_alias} : ''); // @TODO Provide a way to change format.
            $chart['#data_colors'][$field->field_alias] = chart_unique_color($field->field_alias, $this->options['color_scheme']);
          }
        }
      }

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.