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
1b94421f
Commit
1b94421f
authored
17 years ago
by
Bruno Massa
Browse files
Options
Downloads
Patches
Plain Diff
New features:
* New attributes on settings page's example chart
parent
601264c8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
charts.inc
+4
-30
4 additions, 30 deletions
charts.inc
with
4 additions
and
30 deletions
charts.inc
+
4
−
30
View file @
1b94421f
...
@@ -75,11 +75,13 @@ function _charts_settings() {
...
@@ -75,11 +75,13 @@ function _charts_settings() {
// Since the chart is an example, we should provide
// Since the chart is an example, we should provide
// and example data.
// and example data.
$settings
[]
=
array
(
$settings
[]
=
array
(
'#legend'
=>
'Revenue'
,
'#color'
=>
'00ff00'
,
10
,
20
,
55
,
72
,
45
,
50
10
,
20
,
55
,
72
,
45
,
50
);
);
$settings
[]
=
array
(
$settings
[]
=
array
(
'#l
abel'
=>
'Profit'
,
'#l
egend'
=>
'Profit'
,
'#color'
=>
'
#
ff0000'
,
'#color'
=>
'ff0000'
,
array
(
'#value'
=>
35
,
'#label'
=>
t
(
'Jan'
)),
array
(
'#value'
=>
35
,
'#label'
=>
t
(
'Jan'
)),
array
(
'#value'
=>
25
,
'#label'
=>
t
(
'Feb'
)),
array
(
'#value'
=>
25
,
'#label'
=>
t
(
'Feb'
)),
array
(
'#value'
=>
75
,
'#label'
=>
t
(
'Mar'
)),
array
(
'#value'
=>
75
,
'#label'
=>
t
(
'Mar'
)),
...
@@ -163,31 +165,3 @@ function _charts_settings_submit(&$form, &$form_state) {
...
@@ -163,31 +165,3 @@ function _charts_settings_submit(&$form, &$form_state) {
// Print a 'OK' message
// Print a 'OK' message
drupal_set_message
(
'Settings saved'
);
drupal_set_message
(
'Settings saved'
);
}
}
/**
* Module testing page. Users will be able to test a given
* data to see what its going to look like.
*
* @ingroup form
*/
function
_charts_testing
()
{
// Get the previously saved data from Data Base
$settings
=
variable_get
(
'charts_settings'
,
array
());
// This will hold the example chart
if
(
!
empty
(
$settings
))
{
$form
[
'chart'
]
=
array
(
'#value'
=>
charts_chart
(
$settings
[
'basic'
][
'provider'
],
$data
)
);
}
$form
[
'data'
]
=
array
(
'#type'
=>
'fieldset'
,
'#title'
=>
t
(
'Data'
),
'#collapsible'
=>
TRUE
,
'#collapsed'
=>
FALSE
,
'#tree'
=>
TRUE
);
return
$form
;
}
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