You are here

function QuantChartChartAPI::palette in Quant 7

Return the available color palette

2 calls to QuantChartChartAPI::palette()
QuantChartChartAPI::adminSettings in plugins/QuantChartChartAPI.inc
Implements parent:adminSettings().
QuantChartChartAPI::color in plugins/QuantChartChartAPI.inc
Add color to the chart

File

plugins/QuantChartChartAPI.inc, line 241

Class

QuantChartChartAPI
QuantChart plugin class to generate charts using chart.module (Chart API)

Code

function palette($random = FALSE) {
  $palette = variable_get('quant_chartapi_palette', array());
  if (!$palette) {
    $default_palette = chart_color_schemes();
    $palette = $default_palette['default'];
  }
  if ($random) {
    shuffle($palette);
  }
  return $palette;
}