You are here

function charts_default_settings in Charts 7.2

Same name and namespace in other branches
  1. 8 includes/charts.pages.inc \charts_default_settings()

Provides default options used by charts_settings_form().

3 calls to charts_default_settings()
charts_default_settings_form in includes/charts.pages.inc
Menu callback; Configure the site-wide defaults for charts.
charts_plugin_style_chart::option_definition in views/charts_plugin_style_chart.inc
Set default options.
charts_settings_form in includes/charts.pages.inc
Module settings page. Users can set the default layout of their charts.
4 string references to 'charts_default_settings'
charts_default_colors in ./charts.module
Default colors used in all libraries.
charts_default_settings_form in includes/charts.pages.inc
Menu callback; Configure the site-wide defaults for charts.
charts_default_settings_form_submit in includes/charts.pages.inc
Submit handler for charts_default_settings_form().
charts_plugin_style_chart::option_definition in views/charts_plugin_style_chart.inc
Set default options.

File

includes/charts.pages.inc, line 379
Menu callbacks for Charts module.

Code

function charts_default_settings() {
  $defaults = array();
  $defaults['type'] = 'pie';
  $defaults['library'] = NULL;
  $defaults['label_field'] = NULL;
  $defaults['data_fields'] = NULL;
  $defaults['field_colors'] = NULL;
  $defaults['title'] = '';
  $defaults['title_position'] = 'out';
  $defaults['data_labels'] = FALSE;
  $defaults['legend'] = TRUE;
  $defaults['legend_position'] = 'right';
  $defaults['colors'] = charts_default_colors();
  $defaults['background'] = '';
  $defaults['tooltips'] = TRUE;
  $defaults['tooltips_use_html'] = FALSE;
  $defaults['width'] = NULL;
  $defaults['height'] = NULL;
  $defaults['xaxis_title'] = '';
  $defaults['xaxis_labels_rotation'] = 0;
  $defaults['yaxis_title'] = '';
  $defaults['yaxis_min'] = '';
  $defaults['yaxis_max'] = '';
  $defaults['yaxis_prefix'] = '';
  $defaults['yaxis_suffix'] = '';
  $defaults['yaxis_decimal_count'] = '';
  $defaults['yaxis_labels_rotation'] = 0;
  drupal_alter('charts_default_settings', $defaults);
  return $defaults;
}