You are here

function ChartsGraphsCanvas::series_colours in Charts and Graphs 6.2

Same name and namespace in other branches
  1. 7.2 charts_graphs_canvas.class.inc \ChartsGraphsCanvas::series_colours()
  2. 7 charts_graphs_canvas.class.inc \ChartsGraphsCanvas::series_colours()
3 calls to ChartsGraphsCanvas::series_colours()
ChartsGraphsAmcharts::get_chart in apis/charts_graphs_amcharts/charts_graphs_amcharts.class.inc
Function that renders data.
ChartsGraphsGoogleCharts::_encode_data in apis/charts_graphs_google_charts/charts_graphs_google_charts.class.inc
ChartsGraphsOpenFlash::_preprocess_values in apis/charts_graphs_open_flash/charts_graphs_open_flash.class.inc
Pie-chart has different format for $values array than bar chart etc. This method deals with permutations across chart types. Sigh.

File

./charts_graphs_canvas.class.inc, line 142
abstract class ChartsGraphsCanvas.

Class

ChartsGraphsCanvas
Each graphing library implementation should create a derivative of this class.

Code

function series_colours() {
  if (!is_array($this->series_colours)) {
    $colours = explode(',', $this->series_colours);
    $this->series_colours = array();
    foreach ($colours as $colour) {
      $this->series_colours[] = trim($colour);
    }
  }
  return $this->series_colours;
}