Skip to content
Snippets Groups Projects
Commit ce1fe636 authored by Bruno Massa's avatar Bruno Massa
Browse files

Improvements:

* Remove the spedific views option Show Legend since its now possble to select it normally
parent b52313e6
No related branches found
Tags 7.x-1.12
No related merge requests found
...@@ -39,13 +39,6 @@ class charts_plugin_style_chart extends views_plugin_style { ...@@ -39,13 +39,6 @@ class charts_plugin_style_chart extends views_plugin_style {
// Get chart settings from options form. // Get chart settings from options form.
_charts_settings_form($form['charts'], $this->options['charts']); _charts_settings_form($form['charts'], $this->options['charts']);
$form['show_legend'] = array(
'#type' => 'checkbox',
'#title' => t('Show legend'),
'#default_value' => $this->options['show_legend'],
'#description' => t('Display legend next to the chart.'),
);
// Views Calc related fields // Views Calc related fields
$form['aggregation_field'] = array( $form['aggregation_field'] = array(
'#type' => 'select', '#type' => 'select',
...@@ -143,9 +136,6 @@ class charts_plugin_style_chart extends views_plugin_style { ...@@ -143,9 +136,6 @@ class charts_plugin_style_chart extends views_plugin_style {
if ($key == $this->options['aggregation_field']) { if ($key == $this->options['aggregation_field']) {
$legend_field = array_key_exists($calc, $this->view->field) ? $this->view->field[$calc] : NULL; $legend_field = array_key_exists($calc, $this->view->field) ? $this->view->field[$calc] : NULL;
$legend = !empty($legend_field->options['label']) ? $legend_field->options['label'] : NULL; $legend = !empty($legend_field->options['label']) ? $legend_field->options['label'] : NULL;
if ($this->options['show_legend']) {
$data[$calc]['#legend'] = $legend;
}
$value['#label'] = strip_tags(theme_views_view_field($this->view, $this->view->field[$key], $row)); // .': '. $row->$calc; $value['#label'] = strip_tags(theme_views_view_field($this->view, $this->view->field[$key], $row)); // .': '. $row->$calc;
$value['#value'] = $row->$calc; $value['#value'] = $row->$calc;
$chart[$calc][] = $value; $chart[$calc][] = $value;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment