Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As in title,
only one color work on this type of chart.
Regardless of whether it is done by views settings or by php:
foreach ($sets as $title => $records) {
$chart_id = 'dataviz_ch' . $this->display->vid . '_'. $this->display->id . '_'. $views_dataviz_log . '_'. $set;
$output .= '<div class="dataviz" id="' . $chart_id . '"></div>';
$settings['chart'][$chart_id] = array(
'data' => array(),
'columns' => array($options['_columnLabel']),
'chartType' => $options['type'],
'containerId' => $chart_id,
'options' => array(
'forceIFrame' => FALSE,
'chartArea' => $chartArea,
'colors' => array('#010101', '#621341'),
'backgroundColor' => array('fill' => '#EDEDED'),
'legend' => array('position' => 'right'),
'title' => $options['_graphTitle'], //$one ? $this->display->display_title : $title,
),
);
Comments
Comment #1
becometa CreditAttribution: becometa commented