You are here

function ViewsSimplechartPluginStyle::options_form in Views Simple Chart 7

Render the given style.

Overrides views_plugin_style::options_form

File

plugins/views_simplechart_plugin_style.inc, line 33
Contains the list style plugin.

Class

ViewsSimplechartPluginStyle
Style plugin to render each item in an ordered or unordered list.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['chart_title'] = array(
    '#title' => t('Chart Title'),
    '#type' => 'textfield',
    '#size' => '60',
    '#default_value' => $this->options['chart_title'],
  );
  $form['chart_axis_mapping'] = array(
    '#title' => t('Chart Axis Mapping'),
    '#type' => 'textfield',
    '#description' => t('Each axis need to be placed as comma(,) separtor.'),
    '#size' => '60',
    '#default_value' => $this->options['chart_axis_mapping'],
  );
  $form['chart_type'] = array(
    '#type' => 'radios',
    '#title' => t('Chart type'),
    '#options' => array(
      'BarChart' => t('Bar Chart'),
      'LineChart' => t('Line Chart'),
      'PieChart' => t('Pie Chart'),
      'ColumnChart' => t('Column Chart'),
      'Timeline' => t('Timeline'),
      'OrgChart' => t('Organization Chart'),
    ),
    '#default_value' => $this->options['chart_type'],
  );
  $form['chart_type_stacked'] = array(
    '#type' => 'radios',
    '#title' => t('Do you want Stack in Graph?'),
    '#options' => array(
      'yes' => t('Yes'),
      'no' => t('No'),
    ),
    '#description' => t('This is applicable only for Bar and Column chart.'),
    '#default_value' => $this->options['chart_type_stacked'],
  );
  $form['chart_legend_position'] = array(
    '#type' => 'radios',
    '#title' => t('Chart Legend Position'),
    '#options' => array(
      'left' => t('Left'),
      'right' => t('Right'),
      'top' => t('Top'),
      'bottom' => t('Bottom'),
    ),
    '#default_value' => $this->options['chart_legend_position'],
  );
  $form['chart_width'] = array(
    '#title' => t('Chart Width'),
    '#type' => 'textfield',
    '#size' => '60',
    '#default_value' => $this->options['chart_width'],
  );
  $form['chart_height'] = array(
    '#title' => t('Chart Height'),
    '#type' => 'textfield',
    '#size' => '60',
    '#default_value' => $this->options['chart_height'],
  );
}