You are here

protected function Visualization::defineOptions in Visualization API 8

Set default options.

Overrides StylePluginBase::defineOptions

File

src/Plugin/views/style/Visualization.php, line 63
Definition of Drupal\visualization\Plugin\views\style\Visualization.

Class

Visualization
Style plugin uses views ui to configure views data for rendering charts.

Namespace

Drupal\visualization\Plugin\views\style

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['type'] = array(
    'default' => 'line',
  );
  $options['fields'] = array(
    'default' => array(),
  );
  $options['yAxis']['contains']['title'] = array(
    'default' => '',
  );
  $options['xAxis']['contains']['labelField'] = array(
    'default' => FALSE,
  );
  $options['xAxis']['contains']['invert'] = array(
    'default' => FALSE,
  );
  return $options;
}