You are here

function flot_fields_views_plugin_style::options_form in Flot 7

Provide a form to edit options for this plugin.

Overrides views_plugin_style::options_form

File

flot_views/views/flot_fields_views_plugin_style.inc, line 63
Style plugin for views

Class

flot_fields_views_plugin_style
@file Style plugin for views

Code

function options_form(&$form, &$form_state) {
  $form['size'] = array(
    '#type' => 'textfield',
    '#title' => t('Size'),
    '#description' => t("Enter the dimensions for the chart. Format: WIDTHxHEIGHT (e.g. 200x100)"),
    '#default_value' => $this->options['size'],
  );
  $form['shadowSize'] = array(
    '#type' => 'textfield',
    '#title' => t('Shadow size'),
    '#description' => t("Enter the shadow size. Leave blank for default behaviour."),
    '#default_value' => $this->options['shadowSize'],
  );
  $form['zoomable'] = array(
    '#type' => 'checkbox',
    '#title' => t('Zoomable'),
    '#description' => t('Allow users to zoom in on the graph.'),
    '#default_value' => $this->options['zoomable'],
  );
  $form['hoverable'] = array(
    '#type' => 'checkbox',
    '#title' => t('Hoverable'),
    '#description' => t('Allow users to hover over datapoints (developers can bind a javascript function to the plothover event).'),
    '#default_value' => $this->options['hoverable'],
  );
  $form += $this
    ->legendForm();
  $form += $this
    ->axisForm('x');
  $form += $this
    ->axisForm('y');
}