Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
charts
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
charts
Commits
5853af2a
Commit
5853af2a
authored
10 years ago
by
Pierre Vriens
Browse files
Options
Downloads
Patches
Plain Diff
#2353511-12 Add 'tooltips' and 'data_labels' to Views UI
parent
0aaab0c2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
includes/charts.pages.inc
+25
-0
25 additions, 0 deletions
includes/charts.pages.inc
views/charts_plugin_style_chart.inc
+2
-0
2 additions, 0 deletions
views/charts_plugin_style_chart.inc
with
27 additions
and
0 deletions
includes/charts.pages.inc
+
25
−
0
View file @
5853af2a
...
@@ -129,6 +129,30 @@ function charts_settings_form($form, $defaults = array(), $field_options = array
...
@@ -129,6 +129,30 @@ function charts_settings_form($form, $defaults = array(), $field_options = array
'#parents'
=>
array_merge
(
$parents
,
array
(
'title_position'
)),
'#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
(
$form
[
'display'
][
'legend_position'
]
=
array
(
'#title'
=>
t
(
'Legend position'
),
'#title'
=>
t
(
'Legend position'
),
'#type'
=>
'select'
,
'#type'
=>
'select'
,
...
@@ -361,6 +385,7 @@ function charts_default_settings() {
...
@@ -361,6 +385,7 @@ function charts_default_settings() {
$defaults
[
'field_colors'
]
=
NULL
;
$defaults
[
'field_colors'
]
=
NULL
;
$defaults
[
'title'
]
=
''
;
$defaults
[
'title'
]
=
''
;
$defaults
[
'title_position'
]
=
'out'
;
$defaults
[
'title_position'
]
=
'out'
;
$defaults
[
'data_labels'
]
=
FALSE
;
$defaults
[
'legend'
]
=
TRUE
;
$defaults
[
'legend'
]
=
TRUE
;
$defaults
[
'legend_position'
]
=
'right'
;
$defaults
[
'legend_position'
]
=
'right'
;
$defaults
[
'colors'
]
=
charts_default_colors
();
$defaults
[
'colors'
]
=
charts_default_colors
();
...
...
This diff is collapsed.
Click to expand it.
views/charts_plugin_style_chart.inc
+
2
−
0
View file @
5853af2a
...
@@ -165,6 +165,8 @@ class charts_plugin_style_chart extends views_plugin_style {
...
@@ -165,6 +165,8 @@ class charts_plugin_style_chart extends views_plugin_style {
'#id'
=>
drupal_clean_css_identifier
(
'chart_'
.
$chart_id
),
'#id'
=>
drupal_clean_css_identifier
(
'chart_'
.
$chart_id
),
'#title'
=>
$this
->
options
[
'title_position'
]
?
$this
->
options
[
'title'
]
:
FALSE
,
'#title'
=>
$this
->
options
[
'title_position'
]
?
$this
->
options
[
'title'
]
:
FALSE
,
'#title_position'
=>
$this
->
options
[
'title_position'
],
'#title_position'
=>
$this
->
options
[
'title_position'
],
'#tooltips'
=>
$this
->
options
[
'tooltips'
],
'#data_labels'
=>
$this
->
options
[
'data_labels'
],
'#colors'
=>
$this
->
options
[
'colors'
],
'#colors'
=>
$this
->
options
[
'colors'
],
'#background'
=>
$this
->
options
[
'background'
]
?
$this
->
options
[
'background'
]
:
'transparent'
,
'#background'
=>
$this
->
options
[
'background'
]
?
$this
->
options
[
'background'
]
:
'transparent'
,
'#legend'
=>
$this
->
options
[
'legend_position'
]
?
TRUE
:
FALSE
,
'#legend'
=>
$this
->
options
[
'legend_position'
]
?
TRUE
:
FALSE
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment