You are here

function charts_plugin_display_chart::options_summary in Charts 7.2

Provide the summary for page options in the views UI.

This output is returned as an array.

Overrides views_plugin_display::options_summary

File

views/charts_plugin_display_chart.inc, line 42
Contains the Chart display type (similar to Page, Block, Attachment, etc.)

Class

charts_plugin_display_chart
Display plugin to attach multiple chart configurations to the same chart.

Code

function options_summary(&$categories, &$options) {

  // It is very important to call the parent function here:
  parent::options_summary($categories, $options);
  $categories['chart'] = array(
    'title' => t('Chart settings'),
    'column' => 'second',
    'build' => array(
      '#weight' => -10,
    ),
  );
  $parent_title = NULL;
  $parent_display = $this
    ->get_option('parent_display');
  if (!empty($this->view->display[$parent_display])) {
    $parent_title = check_plain($this->view->display[$parent_display]->display_title);
  }
  $options['parent_display'] = array(
    'category' => 'chart',
    'title' => t('Combine with parent chart'),
    'value' => $parent_title ? $parent_title : t('None'),
  );
  $options['inherit_yaxis'] = array(
    'category' => 'chart',
    'title' => t('Axis settings'),
    'value' => $this
      ->get_option('inherit_yaxis') ? t('Use primary Y-axis') : t('Create secondary axis'),
  );
  $options['inherit_arguments'] = array(
    'category' => 'chart',
    'title' => t('Inherit contextual filters'),
    'value' => $this
      ->get_option('inherit_arguments') ? t('Yes') : t('No'),
  );
  $options['inherit_exposed_filters'] = array(
    'category' => 'chart',
    'title' => t('Inherit exposed filters'),
    'value' => $this
      ->get_option('inherit_exposed_filters') ? t('Yes') : t('No'),
  );
}