You are here

function chart_settings in Google Chart Tools: Image Charts 7

Same name and namespace in other branches
  1. 5 chart.module \chart_settings()
  2. 6 chart.module \chart_settings()

Settings form page callback handler.

1 string reference to 'chart_settings'
chart_menu in ./chart.module
Implements hook_menu().

File

./chart.module, line 389
Provides primary Drupal hook implementations.

Code

function chart_settings($form, &$form_state) {
  $form['overrides'] = array(
    '#type' => 'fieldset',
    '#title' => t('Overrides'),
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
  );

  // @todo: overrides global / per theme
  $form['overrides']['chart_global_bg'] = array(
    '#type' => 'textfield',
    '#title' => t('Global Background Color'),
    '#description' => t('Specify a global background color for all charts. When set this will take precedence over any custom value which is useful for highly themed sites.'),
    '#default_value' => variable_get('chart_global_bg', ''),
  );
  $form['overrides']['chart_max_width'] = array(
    '#type' => 'textfield',
    '#title' => t('Max Width'),
    '#description' => t('Max chart width.'),
    '#default_value' => variable_get('chart_max_width', ''),
  );
  $form['overrides']['chart_max_height'] = array(
    '#type' => 'textfield',
    '#title' => t('Max Height'),
    '#description' => t('Max chart height.'),
    '#default_value' => variable_get('chart_max_height', ''),
  );
  return system_settings_form($form);
}