You are here

function ChartsGraphsCanvas::series_colours in Charts and Graphs 7.2

Same name and namespace in other branches
  1. 6.2 charts_graphs_canvas.class.inc \ChartsGraphsCanvas::series_colours()
  2. 7 charts_graphs_canvas.class.inc \ChartsGraphsCanvas::series_colours()
1 call to ChartsGraphsCanvas::series_colours()
ChartsGraphsCanvas::__construct in ./charts_graphs_canvas.class.inc
Constructor function.

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() {
  $series_colours_defaults = array(
    '#0000FF',
    '#FF0000',
    '#FFFF00',
    '#87907D',
    '#21B6A8',
    '#177F75',
    '#B6212D',
    '#7F171F',
    '#B67721',
    '#7F5417',
    '#FF8000',
    '#FFC080',
    '#FFDFBF',
    '#FFC080',
    '#FFCC00',
    '#FFE500',
    '#FFF9BF',
    '#78C0E9',
    '#179CE8',
    '#30769E',
    '#C8E9FC',
    '#ECF8FF',
    '#00CCFF',
    '#4086AA',
    '#91C3DC',
  );
  $this->series_colours = variable_get("charts_graphs_default_series", $series_colours_defaults);
  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;
}