You are here

public function FrxSVGGraph::configValidate in Forena Reports 8

File

src/FrxPlugin/Template/FrxSVGGraph.php, line 459
FrxSVGGraph php SVG Graph generator

Class

FrxSVGGraph

Namespace

Drupal\forena\Template

Code

public function configValidate(&$config) {
  $type = $config['style'];
  $base_type = $config['base_type'];
  $graph_options = $this
    ->graphOptions();
  if (!array_key_exists($type, $graph_options['styles'][$base_type])) {
    $styles = array_keys($graph_options['styles'][$base_type]);
    $config['type'] = $config['style'] = array_shift($styles);
  }
  $config['type'] = $config['style'];
}