You are here

public function ChartsOverridesC3::chartOverrides in Charts 8.3

Builds an array of Chart Settings with key value pairs

Parameters

$settings array:

Return value

array

Overrides C3Overrides::chartOverrides

File

starterkits/charts_overrides/src/Plugin/override/ChartsOverridesC3.php, line 17

Class

ChartsOverridesC3
Defines a concrete class for a C3.

Namespace

Drupal\charts_overrides\Plugin\override

Code

public function chartOverrides(array $originalOptions = []) {
  $options = [];

  //    The following are currently available for overriding; they are the
  //    private variables in charts_c3/src/Settings/CThree/CThree.php
  //
  //    $options['color'];
  //    $options['bindto'];
  //    $options['data'];
  //    $options['axis'];
  //    $options['title'];
  //    $options['gauge'];
  //    $options['point'];
  //
  //    An example of how to override the color property.
  //    $options['color'] = [
  //      'pattern' => [
  //        '#000000',
  //        '#999999',
  //        '#666666'
  //      ]
  //    ];
  return $options;
}