diff --git a/includes/charts.pages.inc b/includes/charts.pages.inc index 843396652a173e19faf6637392e41b51e6d75ffb..88c28fd68beaa6e888d589252ff370ac39269f32 100644 --- a/includes/charts.pages.inc +++ b/includes/charts.pages.inc @@ -129,6 +129,30 @@ function charts_settings_form($form, $defaults = array(), $field_options = array '#parents' => array_merge($parents, array('title_position')), ); + $form['display']['tooltips'] = array( + '#title' => t('Tooltips'), + '#type' => 'select', + '#options' => array( + '' => t('Disabled'), + 'TRUE' => t('Enabled'), + ), + '#description' => t('Show data details on mouse over? Note: unavailable for print or on mobile devices.'), + '#default_value' => $options['tooltips'], + '#parents' => array_merge($parents, array('tooltips')), + ); + + $form['display']['data_labels'] = array( + '#title' => t('Data labels'), + '#type' => 'select', + '#options' => array( + '' => t('Disabled'), + 'TRUE' => t('Enabled'), + ), + '#default_value' => $options['data_labels'], + '#description' => t('Show data details as labels on chart? Note: recommended for print or on mobile devices.'), + '#parents' => array_merge($parents, array('data_labels')), + ); + $form['display']['legend_position'] = array( '#title' => t('Legend position'), '#type' => 'select', @@ -361,6 +385,7 @@ function charts_default_settings() { $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(); diff --git a/views/charts_plugin_style_chart.inc b/views/charts_plugin_style_chart.inc index 2e45b5feb7e2061513dfef75115516147a9242f0..43385403f6f6cf7bb185d6d9f84bbac05c99b2b9 100644 --- a/views/charts_plugin_style_chart.inc +++ b/views/charts_plugin_style_chart.inc @@ -165,6 +165,8 @@ class charts_plugin_style_chart extends views_plugin_style { '#id' => drupal_clean_css_identifier('chart_' . $chart_id), '#title' => $this->options['title_position'] ? $this->options['title'] : FALSE, '#title_position' => $this->options['title_position'], + '#tooltips' => $this->options['tooltips'], + '#data_labels' => $this->options['data_labels'], '#colors' => $this->options['colors'], '#background' => $this->options['background'] ? $this->options['background'] : 'transparent', '#legend' => $this->options['legend_position'] ? TRUE : FALSE,