/[drupal]/contributions/modules/fusioncharts/settings.inc
ViewVC logotype

Contents of /contributions/modules/fusioncharts/settings.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (show annotations) (download) (as text)
Tue Apr 21 10:32:27 2009 UTC (7 months ago) by aaron1234nz
Branch: MAIN
CVS Tags: DRUPAL-5--1-1, DRUPAL-5--1-0, HEAD
Changes since 1.4: +1 -465 lines
File MIME type: text/x-php
Recomit Drupal 5 to HEAD
1 <?php
2 // $Id: settings.inc,v 1.3 2008/09/12 22:35:37 aaron1234nz Exp $
3
4 function _fusioncharts_Background($settings) {
5 $form['settings']['background'] = array(
6 '#type' => 'fieldset',
7 '#title' => t('Background Properties'),
8 '#collapsible' => TRUE,
9 '#collapsed' => TRUE,
10 );
11 $form['settings']['background']['bgcolor_colorpicker'] = array(
12 '#type' => 'colorpicker',
13 '#title' => t('Background Color'),
14 );
15 $form['settings']['background']['bgcolor'] = array(
16 '#type' => 'colorpicker_textfield',
17 '#default_value' => ($settings['bgcolor'] ? $settings['bgcolor'] : '#f3f3f3'),
18 '#colorpicker' => 'settings_background_bgcolor_colorpicker',
19 '#description' => t('The background color for the chart.'),
20 );
21 $form['settings']['background']['bgAlpha'] = array(
22 '#type' => 'textfield',
23 '#title' => t('Background transparency'),
24 '#default_value' => ($settings['bgAlpha'] ? $settings['bgAlpha'] : '70'),
25 '#description' => t('The background transparency of the graph (0-100).'),
26 '#size' => 5,
27 );
28 $form['settings']['background']['bgSWF'] = array(
29 '#type' => 'textfield',
30 '#title' => t('Background Shockwave file'),
31 '#default_value' => ($settings['bgSWF'] ? $settings['bgSWF'] : ''),
32 '#description' => t('Path to an external .swf file. Use this to set the background of the chart to be a shockwave file.'),
33 '#size' => 60,
34 );
35 return $form;
36 }
37 function _fusioncharts_Canvas($settings) {
38 $form['settings']['canvas'] = array(
39 '#type' => 'fieldset',
40 '#title' => t('Canvas Properties'),
41 '#collapsible' => TRUE,
42 '#collapsed' => TRUE,
43 );
44 $form['settings']['canvas']['canvasBgColor_colorpicker'] = array(
45 '#type' => 'colorpicker',
46 '#title' => t('Canvas Color'),
47 );
48 $form['settings']['canvas']['canvasBgColor'] = array(
49 '#type' => 'colorpicker_textfield',
50 '#default_value' => ($settings['canvasBgColor'] ? $settings['canvasBgColor'] : '#f3fff3'),
51 '#colorpicker' => 'settings_canvas_canvasBgColor_colorpicker',
52 '#description' => t('The background color of the canvas.'),
53 );
54 $form['settings']['canvas']['bgAlpha'] = array(
55 '#type' => 'textfield',
56 '#title' => t('Background transparency'),
57 '#default_value' => ($settings['bgAlpha'] ? $settings['bgAlpha'] : '70'),
58 '#description' => t('The transparency of the canvas (1-100).'),
59 '#size' => 5,
60 );
61 $form['settings']['canvas']['canvasBorderColor_colorpicker'] = array(
62 '#type' => 'colorpicker',
63 '#title' => t('Canvas border color'),
64 );
65 $form['settings']['canvas']['canvasBorderColor'] = array(
66 '#type' => 'colorpicker_textfield',
67 '#description' => t('The border color of the canvas.'),
68 '#default_value' => ($settings['canvasBorderColor'] ? $settings['canvasBorderColor'] : '#000000'),
69 '#colorpicker' => 'settings_canvas_canvasBorderColor_colorpicker',
70 );
71 $form['settings']['canvas']['canvasBorderThickness'] = array(
72 '#type' => 'textfield',
73 '#title' => t('Canvas border thickness'),
74 '#default_value' => ($settings['canvasBorderThickness'] ? $settings['canvasBorderThickness'] : '1'),
75 '#description' => t('The border thickness (in pixels) of the canvas.'),
76 '#size' => 5,
77 );
78 return $form;
79 }
80 function _fusioncharts_Canvas_extra($settings) {
81 $form['settings']['canvas']['canvasBaseColor_colorpicker'] = array(
82 '#type' => 'colorpicker',
83 '#title' => t('Canvas base color'),
84 );
85 $form['settings']['canvas']['canvasBaseColor'] = array(
86 '#type' => 'colorpicker_textfield',
87 '#description' => t('The color of the canvas base. (The canvas is what is behind the columns).'),
88 '#default_value' => ($settings['canvasBaseColor'] ? $settings['canvasBaseColor'] : '#f3fff3'),
89 '#colorpicker' => 'settings_canvas_canvasBaseColor_colorpicker',
90 );
91 $form['settings']['canvas']['canvasBaseDepth'] = array(
92 '#type' => 'textfield',
93 '#title' => t('Canvas base depth'),
94 '#default_value' => ($settings['canvasBaseDepth'] ? $settings['canvasBaseDepth'] : ''),
95 '#description' => t('The 3D Depth of the canvas base.'),
96 '#size' => 5,
97 );
98 $form['settings']['canvas']['canvasBgDepth'] = array(
99 '#type' => 'textfield',
100 '#title' => t('3D Depth of the canvas background'),
101 '#default_value' => ($settings['canvasBgDepth'] ? $settings['canvasBgDepth'] : ''),
102 '#description' => t('The 3D Depth of the canvas background.'),
103 '#size' => 5,
104 );
105 $form['settings']['canvas']['showCanvasBg'] = array(
106 '#type' => 'checkbox',
107 '#title' => t('Show the canvas background'),
108 '#default_value' => $settings['showCanvasBg'],
109 '#attributes' => ($settings['showCanvasBg'] == 1 ? array('checked' => 'checked') : array()),
110 );
111 $form['settings']['canvas']['showCanvasBase'] = array(
112 '#type' => 'checkbox',
113 '#title' => t('Show the canvas base'),
114 '#default_value' => $settings['showCanvasBase'],
115 '#attributes' => ($settings['showCanvasBase'] == 1 ? array('checked' => 'checked') : array()),
116 );
117 return $form;
118 }
119 function _fusioncharts_Titles($settings) {
120 $form['settings']['titles'] = array(
121 '#type' => 'fieldset',
122 '#title' => t('Chart and Axis Titles'),
123 '#collapsible' => TRUE,
124 '#collapsed' => FALSE,
125 );
126 $form['settings']['titles']['caption'] = array(
127 '#type' => 'textfield',
128 '#title' => t('Caption'),
129 '#default_value' => ($settings['caption'] ? $settings['caption'] : ''),
130 '#description' => t('The caption that would appear at the top of the chart.'),
131 );
132 $form['settings']['titles']['subCaption'] = array(
133 '#type' => 'textfield',
134 '#title' => t('Sub caption'),
135 '#default_value' => ($settings['subCaption'] ? $settings['subCaption'] : ''),
136 '#description' => t('Sub-caption of the chart.'),
137 );
138 return $form;
139 }
140 function _fusioncharts_Titles_extra($settings) {
141 $form['settings']['titles']['xAxisName'] = array(
142 '#type' => 'textfield',
143 '#title' => t('X-axis label'),
144 '#default_value' => ($settings['xAxisName'] ? $settings['xAxisName'] : ''),
145 '#description' => t('X-axis label.'),
146 );
147 $form['settings']['titles']['yAxisName'] = array(
148 '#type' => 'textfield',
149 '#title' => t('Y-axis label'),
150 '#default_value' => ($settings['yAxisName'] ? $settings['yAxisName'] : ''),
151 '#description' => t('X-axis label.'),
152 );
153 return $form;
154 }
155 function _fusioncharts_Titles_extra2($settings) {
156 $form['settings']['titles']['xAxisName'] = array(
157 '#type' => 'textfield',
158 '#title' => t('X-axis label'),
159 '#default_value' => ($settings['xAxisName'] ? $settings['xAxisName'] : ''),
160 '#description' => t('X-axis label.'),
161 );
162 $form['settings']['titles']['PYAxisName'] = array(
163 '#type' => 'textfield',
164 '#title' => t('Primary Y-axis'),
165 '#default_value' => ($settings['PYAxisName'] ? $settings['PYAxisName'] : ''),
166 '#description' => t('Primary Y-axis label.'),
167 );
168 $form['settings']['titles']['SYAxisName'] = array(
169 '#type' => 'textfield',
170 '#title' => t('Secondary Y-axis'),
171 '#default_value' => ($settings['SYAxisName'] ? $settings['SYAxisName'] : ''),
172 '#description' => t('Secondary Y-axis label.'),
173 );
174 return $form;
175 }
176 function _fusioncharts_NumericalLimits($settings) {
177 $form['settings']['numericallimits'] = array(
178 '#type' => 'fieldset',
179 '#title' => t('Chart Numerial Limits'),
180 '#collapsible' => TRUE,
181 '#collapsed' => TRUE,
182 );
183 $form['settings']['numericallimits']['yAxisMinValue'] = array(
184 '#type' => 'textfield',
185 '#title' => t('Lower limit of the Y-axis'),
186 '#default_value' => ($settings['yAxisMinValue'] ? $settings['yAxisMinValue'] : ''),
187 '#description' => t('The minimum of Y-axis.'),
188 );
189 $form['settings']['numericallimits']['yAxisMaxValue'] = array(
190 '#type' => 'textfield',
191 '#title' => t('Upper limit of the Y-axis'),
192 '#default_value' => ($settings['yAxisMaxValue'] ? $settings['yAxisMaxValue'] : ''),
193 '#description' => t('The maximum of Y-axis.'),
194 );
195 return $form;
196 }
197 function _fusioncharts_NumericalLimits2($settings) {
198 $form['settings']['numericallimits'] = array(
199 '#type' => 'fieldset',
200 '#title' => t('Chart Numerial Limits'),
201 '#collapsible' => TRUE,
202 '#collapsed' => TRUE,
203 );
204 $form['settings']['numericallimits']['PYAxisMaxValue'] = array(
205 '#type' => 'textfield',
206 '#title' => t('Upper limit of primary Y-axis.'),
207 '#default_value' => ($settings['PYAxisMaxValue'] ? $settings['PYAxisMaxValue'] : ''),
208 '#description' => t('The maximum of the primary Y-axis.'),
209 );
210 $form['settings']['numericallimits']['PYAxisMinValue'] = array(
211 '#type' => 'textfield',
212 '#title' => t('Lower limit of primary Y-axis'),
213 '#default_value' => ($settings['PYAxisMinValue'] ? $settings['PYAxisMinValue'] : ''),
214 '#description' => t('The minimum of primary Y-axis.'),
215 );
216 $form['settings']['numericallimits']['SYAxisMaxValue'] = array(
217 '#type' => 'textfield',
218 '#title' => t('Upper limit of secondary Y-axis.'),
219 '#default_value' => ($settings['SYAxisMaxValue'] ? $settings['SYAxisMaxValue'] : ''),
220 '#description' => t('The maximum of secondary Y-axis.'),
221 );
222 $form['settings']['numericallimits']['SYAxisMinValue'] = array(
223 '#type' => 'textfield',
224 '#title' => t('Lower limit of secondary Y-axis'),
225 '#default_value' => ($settings['SYAxisMinValue'] ? $settings['SYAxisMinValue'] : ''),
226 '#description' => t('The mininum of secondary Y-axis.'),
227 );
228 return $form;
229 }
230 function _fusioncharts_NumericalLimits3($settings) {
231 $form['settings']['numericallimits']['xAxisMinValue'] = array(
232 '#type' => 'textfield',
233 '#title' => t('Lower limit of X-axis'),
234 '#default_value' => ($settings['xAxisMinValue'] ? $settings['xAxisMinValue'] : ''),
235 '#description' => t('The minimum of the X-axis.'),
236 );
237 $form['settings']['numericallimits']['xAxisMaxValue'] = array(
238 '#type' => 'textfield',
239 '#title' => t('Upper limit of Y-axis'),
240 '#default_value' => ($settings['xAxisMaxValue'] ? $settings['xAxisMaxValue'] : ''),
241 '#description' => t('The maximum of the X-axis.'),
242 );
243 $form['settings']['numericallimits']['SYAxisMaxValue'] = array(
244 '#type' => 'textfield',
245 '#title' => t('Upper limit of secondary Y-axis.'),
246 '#default_value' => ($settings['SYAxisMaxValue'] ? $settings['SYAxisMaxValue'] : ''),
247 '#description' => t('The maximum of the secondary Y-axis.'),
248 );
249 $form['settings']['numericallimits']['SYAxisMinValue'] = array(
250 '#type' => 'textfield',
251 '#title' => t('Lower limit of secondary Y-axis'),
252 '#default_value' => ($settings['SYAxisMinValue'] ? $settings['SYAxisMinValue'] : ''),
253 '#description' => t('The minimum of the secondary Y-axis.'),
254 );
255 $form['settings']['numericallimits']['overRideLimitCalc'] = array(
256 '#type' => 'checkbox',
257 '#title' => t('Override limit calculation'),
258 '#default_value' => $settings['showCanvasBase'],
259 '#description' => t('When you provide data and the upper and lower limits to FusionCharts, FusionCharts (while rendering) checks whether the upper and lower limits are correctly provided - that is it checks whether all the data values fall within the specified range. Sometimes, this process takes a little extra time when you have a large amount of data. If in that case you don\'t want FusionCharts to cross check the limits explicitly provided by you, you can tick this box and then FusionCharts won\'t delve into the process of checking thus saving that extra bit of time required.'),
260 '#attributes' => ($settings['showCanvasBase'] == 1 ? array('checked' => 'checked') : array()),
261 );
262 return $form;
263 }
264 function _fusioncharts_GenericProperties_a($settings) {
265 $form['settings']['genericproperties'] = array(
266 '#type' => 'fieldset',
267 '#title' => t('Generic Properties'),
268 '#collapsible' => TRUE,
269 '#collapsed' => TRUE,
270 );
271 $form['settings']['genericproperties']['shownames'] = array(
272 '#type' => 'checkbox',
273 '#title' => t('Show names'),
274 '#description' => t('Whether the X-axis values (for the data sets) will be displayed or not.'),
275 '#attributes' => ($settings['shownames'] == 1 ? array('checked' => 'checked') : array()),
276 );
277 $form['settings']['genericproperties']['showValues'] = array(
278 '#type' => 'checkbox',
279 '#title' => t('Show values'),
280 '#default_value' => ($settings['showValues']),
281 '#description' => t('Whether the data numerical values will be displayed along with the columns, bars, lines and the pies.'),
282 '#attributes' => ($settings['showValues'] == 1 ? array('checked' => 'checked') : array())
283 );
284 $form['settings']['genericproperties']['animation'] = array(
285 '#type' => 'checkbox',
286 '#title' => t('Animation'),
287 '#default_value' => ($settings['animation']),
288 '#description' => t('This attribute sets whether the animation is to be played or whether the entire chart would be rendered at one go.'),
289 '#attributes' => ($settings['animation'] == 1 ? array('checked' => 'checked') : array())
290 );
291 return $form;
292 }
293 function _fusioncharts_GenericProperties_b($settings) {
294 $form['settings']['genericproperties']['showLimits'] = array(
295 '#type' => 'checkbox',
296 '#title' => t('Show limits'),
297 '#default_value' => $settings['showLimits'],
298 '#description' => t('Whether to show/hide the chart limit textboxes.'),
299 '#attributes' => ($settings['showLimits'] == 1 ? array('checked' => 'checked') : array()),
300 );
301 $form['settings']['genericproperties']['rotateNames'] = array(
302 '#type' => 'checkbox',
303 '#title' => t('Rotate names'),
304 '#default_value' => $settings['rotateNames'],
305 '#description' => t('Whether the category name text boxes would be rotated or not.'),
306 '#attributes' => ($settings['rotateNames'] == 1 ? array('checked' => 'checked') : array()),
307 );
308 return $form;
309 }
310 function _fusioncharts_GenericProperties_h($settings) {
311 $form['settings']['genericproperties']['showColumnShadow'] = array(
312 '#type' => 'checkbox',
313 '#title' => t('Column shadow'),
314 '#default_value' => $settings['showColumnShadow'],
315 '#description' => t('Whether the 2D shadow for the columns would be shown or not.'),
316 '#attributes' => ($settings['showColumnShadow'] == 1 ? array('checked' => 'checked') : array()),
317 );
318
319 return $form;
320 }
321 function _fusioncharts_GenericProperties_c($settings) {
322 $form['settings']['genericproperties']['showPercentageValues'] = array(
323 '#type' => 'checkbox',
324 '#title' => t('Show percentage values'),
325 '#default_value' => $settings['showPercentageValues'],
326 '#description' => t('If you\'ve opted to show the data value, this attribute helps you control whether to show percentage values or actual values.'),
327 '#attributes' => ($settings['showPercentageValues'] == 1 ? array('checked' => 'checked') : array()),
328 );
329 $form['settings']['genericproperties']['showPercentageInLabel'] = array(
330 '#type' => 'checkbox',
331 '#title' => t('Show percentage in label'),
332 '#default_value' => $settings['showPercentageInLabel'],
333 '#description' => t('If you\'ve opted to show the data value, this attribute helps you control whether to show percentage values or actual values in the pie labels.'),
334 '#attributes' => ($settings['showPercentageInLabel'] == 1 ? array('checked' => 'checked') : array()),
335 );
336 return $form;
337 }
338 function _fusioncharts_GenericProperties_d($settings) {
339 $form['settings']['genericproperties']['showBarShadow'] = array(
340 '#type' => 'checkbox',
341 '#title' => t('Show bar shadow'),
342 '#default_value' => $settings['showBarShadow'],
343 '#description' => t('Whether the 2D shadow for the bars would be shown or not.'),
344 '#attributes' => ($settings['showBarShadow'] == 1 ? array('checked' => 'checked') : array()),
345 );
346 return $form;
347 }
348 function _fusioncharts_GenericProperties_e($settings) {
349 $form['settings']['genericproperties']['showLegend'] = array(
350 '#type' => 'checkbox',
351 '#title' => t('Show Legend'),
352 '#default_value' => $settings['showLegend'],
353 '#description' => t('This attribute sets whether the legend would be displayed at the bottom of the chart.'),
354 '#attributes' => ($settings['showLegend'] == 1 ? array('checked' => 'checked') : array()),
355 );
356 return $form;
357 }
358 function _fusioncharts_GenericProperties_f($settings) {
359 $form['settings']['genericproperties']['showSecondaryLimits'] = array(
360 '#type' => 'checkbox',
361 '#title' => t('Show secondary limits'),
362 '#default_value' => $settings['showSecondaryLimits'],
363 '#description' => t('Option whether to show/hide the chart limit textboxes (secondary Y-axis).'),
364 '#attributes' => ($settings['showSecondaryLimits'] == 1 ? array('checked' => 'checked') : array()),
365 );
366 return $form;
367 }
368 function _fusioncharts_GenericProperties_i($settings) {
369 /*
370 Transparency of individual slices is not implemented so this setting has no meaning
371 $form['settings']['genericproperties']['fillAlpha'] = array(
372 '#type' => 'textfield',
373 '#title' => t('Transparency'),
374 '#default_value' => ($settings['fillAlpha'] ? $settings['fillAlpha'] : ''),
375 '#description' => t('This attribute helps you specify the transparency of the funnel chart as a whole, i.e., all the funnel segments would be shown in the transparency mentioned in this attribute.'),
376 );
377 */
378 $form['settings']['genericproperties']['isSliced'] = array(
379 '#type' => 'checkbox',
380 '#title' => t('Sliced'),
381 '#default_value' => $settings['isSliced'],
382 '#description' => t('his attribute specifies whether the the various funnel segments would be sliced, i.e., separated from each other by a distance.'),
383 '#attributes' => ($settings['isSliced'] == 1 ? array('checked' => 'checked') : array()),
384 );
385 $form['settings']['genericproperties']['slicingDistance'] = array(
386 '#type' => 'textfield',
387 '#title' => t('Slicing Distance'),
388 '#default_value' => ($settings['slicingDistance'] ? $settings['slicingDistance'] : '10'),
389 '#description' => t('This attribute specifies the distance (in pixels) by which the various funnel segments would be separated from each other by.'),
390 );
391 $form['settings']['genericproperties']['funnelBaseWidth'] = array(
392 '#type' => 'textfield',
393 '#title' => t('Funnel base width'),
394 '#default_value' => ($settings['funnelBaseWidth'] ? $settings['funnelBaseWidth'] : ''),
395 '#description' => t('This attribute sets the width of the tap, i.e., the bottom part of the funnel.'),
396 );
397 $form['settings']['genericproperties']['funnelBaseHeight'] = array(
398 '#type' => 'textfield',
399 '#title' => t('Funnel base height'),
400 '#default_value' => ($settings['funnelBaseHeight'] ? $settings['funnelBaseHeight'] : ''),
401 '#description' => t(' This attribute sets the height of the tap of the funnel.'),
402 );
403 return $form;
404 }
405 function _fusioncharts_GenericProperties_j($settings) {
406 $form['settings']['genericproperties'] = array(
407 '#type' => 'fieldset',
408 '#title' => t('Generic properties'),
409 '#collapsible' => TRUE,
410 '#collapsed' => TRUE,
411 );
412 $form['settings']['genericproperties']['dateFormat'] = array(
413 '#type' => 'select',
414 '#title' => t('Date Format'),
415 '#options' => array('mm/dd/yyyy' => 'mm/dd/yyyy', 'dd/mm/yyyy' => 'dd/mm/yyyy', 'yyyy/mm/dd' => 'yyyy/mm/dd'),
416 '#default_value' => ($settings['dateFormat'] ? $settings['dateFormat'] : 'yyyy/mm/dd'),
417 '#description' => t('This is the most important attribute, which you\'ll need to specify for all the Gantt charts that you build. With the help of this attribute, you\'re basically specifying the format in which you\'ll be providing your dates to FusionCharts.'),
418 );
419 $form['settings']['genericproperties']['animation'] = array(
420 '#type' => 'checkbox',
421 '#title' => t('Animation'),
422 '#default_value' => $settings['animation'],
423 '#description' => t('Should the Gantt task bars should be animated or not.'),
424 '#attributes' => ($settings['animation'] == 1 ? array('checked' => 'checked') : array()),
425 );
426 $form['settings']['genericproperties']['showTaskStartDate'] = array(
427 '#type' => 'checkbox',
428 '#title' => t('Show task start date'),
429 '#default_value' => $settings['showTaskStartDate'],
430 '#description' => t('Whether the start date of each task will be shown on the left of the task bar.'),
431 '#attributes' => ($settings['showTaskStartDate'] == 1 ? array('checked' => 'checked') : array()),
432 );
433 $form['settings']['genericproperties']['showTaskEndDate'] = array(
434 '#type' => 'checkbox',
435 '#title' => t('Show task end date'),
436 '#default_value' => $settings['showTaskEndDate'],
437 '#description' => t('Whether the end date of each task will be shown on the right of the task bar.'),
438 '#attributes' => ($settings['showTaskEndDate'] == 1 ? array('checked' => 'checked') : array()),
439 );
440 $form['settings']['genericproperties']['showTaskNames'] = array(
441 '#type' => 'checkbox',
442 '#title' => t('Show task names'),
443 '#default_value' => $settings['showTaskNames'],
444 '#description' => t('Whether the name of each task will be shown over the task bar.'),
445 '#attributes' => ($settings['showTaskNames'] == 1 ? array('checked' => 'checked') : array()),
446 );
447 $form['settings']['genericproperties']['taskDatePadding'] = array(
448 '#type' => 'checkbox',
449 '#title' => t('Task date padding'),
450 '#default_value' => $settings['taskDatePadding'],
451 '#description' => t('If you opt to show the task start or end date, this attribute lets you configure the distance between the date textbox and the task bar.'),
452 '#attributes' => ($settings['taskDatePadding'] == 1 ? array('checked' => 'checked') : array()),
453 );
454 $form['settings']['genericproperties']['extendCategoryBg'] = array(
455 '#type' => 'checkbox',
456 '#title' => t('Extend category background'),
457 '#default_value' => $settings['extendCategoryBg'],
458 '#description' => t('Whether the background for the last sub-category (date range on the top of chart) will extend till the bottom of the chart.'),
459 '#attributes' => ($settings['extendCategoryBg'] == 1 ? array('checked' => 'checked') : array()),
460 );
461 return $form;
462 }
463 function _fusioncharts_Font($settings) {
464 $form['settings']['font'] = array(
465 '#type' => 'fieldset',
466 '#title' => t('Font properties'),
467 '#collapsible' => TRUE,
468 '#collapsed' => TRUE,
469 );
470 $form['settings']['font']['baseFont'] = array(
471 '#type' => 'select',
472 '#title' => t('Font name'),
473 '#default_value' => ($settings['baseFont'] ? $settings['baseFont'] : 'Arial'),
474 '#options' => array("Arial" => "Arial", "Helvetica" => "Helvetica", "Times New Roman" => "Times New Roman", "Times" => "Times", "Courier New" => "Courier New", "Courier" => "Courier", "Georgia" => "Georgia", "Verdana" => "Verdana", "Geneva" => "Geneva"),
475 '#description' => t('The base font of the chart; the font which lies on the canvas.'),
476 );
477 $form['settings']['font']['baseFontSize'] = array(
478 '#type' => 'select',
479 '#title' => t('Font size'),
480 '#default_value' => ($settings['baseFontSize'] ? $settings['baseFontSize'] : 10),
481 '#options' => array(6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 16 => 16, 17 => 17, 18 => 18, 19 => 19, 20 => 20, 21 => 21, 22 => 22, 23 => 23, 24 => 24),
482 '#description' => t('The base font size.'),
483 );
484 $form['settings']['font']['baseFontColor_colorpicker'] = array(
485 '#type' => 'colorpicker',
486 '#title' => t('Font color'),
487 );
488 $form['settings']['font']['baseFontColor'] = array(
489 '#type' => 'colorpicker_textfield',
490 '#description' => t('The base font color.'),
491 '#default_value' => ($settings['baseFontColor'] ? $settings['baseFontColor'] : '#000000'),
492 '#colorpicker' => 'settings_font_baseFontColor_colorpicker',
493 );
494 return $form;
495 }
496 function _fusioncharts_Font_extra($settings) {
497 $form['settings']['font']['outCnvBaseFont'] = array(
498 '#type' => 'select',
499 '#title' => t('Canvas font name'),
500 '#default_value' => ($settings['outCnvBaseFont'] ? $settings['outCnvBaseFont'] : 'Arial'),
501 '#options' => array("Arial" => "Arial", "Helvetica" => "Helvetica", "Times New Roman" => "Times New Roman", "Times" => "Times", "Courier New" => "Courier New", "Courier" => "Courier", "Georgia" => "Georgia", "Verdana" => "Verdana", "Geneva" => "Geneva"),
502 '#description' => t('The font of the chart; the font which lies outside the canvas.'),
503 );
504 $form['settings']['font']['outCnvBaseFontSze'] = array(
505 '#type' => 'select',
506 '#title' => t('Canvas font size'),
507 '#default_value' => ($settings['outCnvBaseFontSze'] ? $settings['outCnvBaseFontSze'] : 14),
508 '#options' => array(6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 16 => 16, 17 => 17, 18 => 18, 19 => 19, 20 => 20, 21 => 21, 22 => 22, 23 => 23, 24 => 24),
509 '#description' => t('The chart font size.'),
510 );
511 $form['settings']['font']['outCnvBaseFontColor_colorpicker'] = array(
512 '#type' => 'colorpicker',
513 '#title' => t('Canvas font color'),
514 );
515 $form['settings']['font']['outCnvBaseFontColor'] = array(
516 '#type' => 'colorpicker_textfield',
517 '#description' => t('The font color of the chart.'),
518 '#default_value' => ($settings['outCnvBaseFontColor'] ? $settings['outCnvBaseFontColor'] : '#000000'),
519 '#colorpicker' => 'settings_font_outCnvBaseFontColor_colorpicker',
520 );
521 return $form;
522 }
523 function _fusioncharts_NumberFormatting($settings) {
524 $form['settings']['numberformating'] = array(
525 '#type' => 'fieldset',
526 '#title' => t('Number Formatting Options'),
527 '#collapsible' => TRUE,
528 '#collapsed' => TRUE,
529 );
530 $form['settings']['numberformating']['numberPrefix'] = array(
531 '#type' => 'textfield',
532 '#title' => t('Number prefix'),
533 '#default_value' => ($settings['numberPrefix'] ? $settings['numberPrefix'] : ''),
534 '#description' => t('Add prefix to all the numbers visible on the graph. For example, to represent all dollars figure on the chart, you could specify this attribute to \' $\' to show like $40000, $50000.'),
535 '#size' => 5,
536 );
537 $form['settings']['numberformating']['numberSuffix'] = array(
538 '#type' => 'textfield',
539 '#title' => t('Number sufffix'),
540 '#default_value' => ($settings['numberSuffix'] ? urldecode($settings['numberSuffix']) : ''), //have you encoded this yet aaron?
541 '#description' => t('Add suffix to all the numbers visible on the graph. For example, to represent all figure quantified as per annum on the chart, you could specify this attribute to \' /a\' to show like 40000/a, 50000/a.'),
542 '#size' => 5,
543 );
544 $form['settings']['numberformating']['formatNumber'] = array(
545 '#type' => 'checkbox',
546 '#title' => t('Format numbers'),
547 '#default_value' => $settings['formatNumber'],
548 '#description' => t('Whether the numbers displayed on the chart will be formatted using commas, e.g., 40,000 if ticked and 40000 if unticked'),
549 '#attributes' => ($settings['formatNumber'] == 1 ? array('checked' => 'checked') : array()),
550 );
551 $form['settings']['numberformating']['formatNumberScale'] = array(
552 '#type' => 'checkbox',
553 '#title' => t('Format number scale'),
554 '#default_value' => $settings['formatNumberScale'],
555 '#description' => t('Whether to add K (thousands) and M (millions) to a number after truncating and rounding it - e.g., if ticked, 10434 would become 1.04K (with decimalPrecision set to 2 places). Same with numbers in millions - a M will added at the end.'),
556 '#attributes' => ($settings['formatNumberScale'] == 1 ? array('checked' => 'checked') : array()),
557 );
558 $form['settings']['numberformating']['decimalSeparator'] = array(
559 '#type' => 'textfield',
560 '#title' => t('Decimal seperator'),
561 '#default_value' => ($settings['decimalSeparator'] ? $settings['decimalSeparator'] : '.'),
562 '#description' => t('Specify the character to be used as the decimal separator in a number.'),
563 '#size' => 5,
564 );
565 $form['settings']['numberformating']['thousandSeparator'] = array(
566 '#type' => 'textfield',
567 '#title' => t('Thousand seperator'),
568 '#default_value' => ($settings['thousandSeparator'] ? $settings['thousandSeparator'] : ','),
569 '#description' => t('Specify the character to be used as the thousands separator in a number.'),
570 '#size' => 5,
571 );
572 $form['settings']['numberformating']['decimalPrecision'] = array(
573 '#type' => 'textfield',
574 '#title' => t('Decimal precision'),
575 '#default_value' => ($settings['decimalPrecision'] ? $settings['decimalPrecision'] : '0'),
576 '#description' => t('Number of decimal places to which all numbers on the chart would be rounded to.'),
577 '#size' => 5,
578 );
579 return $form;
580 }
581
582 function _fusioncharts_NumberFormatting_extra($settings) {
583 $form['settings']['numberformating']['divLineDecimalPrecision'] = array(
584 '#type' => 'textfield',
585 '#title' => t('Divisional line (horizontal) rounding'),
586 '#default_value' => ($settings['divLineDecimalPrecision'] ? $settings['divLineDecimalPrecision'] : '0'),
587 '#description' => t('Number of decimal places to which all divisional line (horizontal) values on the chart would be rounded to.'),
588 '#size' => 5,
589 );
590 $form['settings']['numberformating']['limitsDecimalPrecision'] = array(
591 '#type' => 'textfield',
592 '#title' => t('Upper and lower limits rounding'),
593 '#default_value' => ($settings['limitsDecimalPrecision'] ? $settings['limitsDecimalPrecision'] : '0'),
594 '#description' => t('Number of decimal places to which upper and lower limit values on the chart would be rounded to.'),
595 '#size' => 5,
596 );
597 return $form;
598 }
599 function _fusioncharts_ZeroPlane($settings) {
600 $form['settings']['zeroplane'] = array(
601 '#type' => 'fieldset',
602 '#title' => t('Zero Plane'),
603 '#collapsible' => TRUE,
604 '#collapsed' => TRUE,
605 );
606 $form['settings']['zeroplane']['zeroPlaneThickness'] = array(
607 '#type' => 'textfield',
608 '#title' => t('Thickness of the zero line'),
609 '#default_value' => ($settings['zeroPlaneThickness'] ? $settings['zeroPlaneThickness'] : ''),
610 '#description' => t('Thickness (in pixels) of the line indicating the zero plane.'),
611 '#size' => 5,
612 );
613 $form['settings']['zeroplane']['zeroPlaneColor_colorpicker'] = array(
614 '#type' => 'colorpicker',
615 '#title' => t('Color of the zero line'),
616 );
617 $form['settings']['zeroplane']['zeroPlaneColor'] = array(
618 '#type' => 'colorpicker_textfield',
619 '#description' => t('The color for the zero plane.'),
620 '#default_value' => ($settings['zeroPlaneColor'] ? $settings['zeroPlaneColor'] : '#000000'),
621 '#colorpicker' => 'settings_zeroplane_zeroPlaneColor_colorpicker',
622 );
623 $form['settings']['zeroplane']['zeroPlaneAlpha'] = array(
624 '#type' => 'textfield',
625 '#title' => t('Transparency of the zero line'),
626 '#default_value' => ($settings['zeroPlaneAlpha'] ? $settings['zeroPlaneAlpha'] : ''),
627 '#description' => t('The transparency for the zero plane (0-100).'),
628 '#size' => 5,
629 );
630 return $form;
631 }
632 function _fusioncharts_ZeroPlane_extra($settings) {
633 $form['settings']['zeroplane']['zeroPlaneShowBorder'] = array(
634 '#type' => 'checkbox',
635 '#title' => t('Show border of 3D plot'),
636 '#default_value' => $settings['zeroPlaneShowBorder'],
637 '#description' => t('Whether the border of a 3D zero plane would be plotted or not.'),
638 '#attributes' => ($settings['zeroPlaneShowBorder'] == 1 ? array('checked' => 'checked') : array()),
639 );
640 return $form;
641 }
642 function _fusioncharts_divisionalH($settings) {
643 $form['settings']['divisionalH'] = array(
644 '#type' => 'fieldset',
645 '#title' => t('Divisional Lines (Horizontal)'),
646 '#collapsible' => TRUE,
647 '#collapsed' => TRUE,
648 );
649 $form['settings']['divisionalH']['numdivlines'] = array(
650 '#type' => 'textfield',
651 '#title' => t('Number of divisional lines'),
652 '#default_value' => ($settings['numdivlines'] ? $settings['numdivlines'] : ''),
653 '#description' => t('The number of divisional lines to be drawn.'),
654 '#size' => 5,
655 );
656 $form['settings']['divisionalH']['divlinecolor_colorpicker'] = array(
657 '#type' => 'colorpicker',
658 '#title' => t('The color of grid divisional line'),
659 );
660 $form['settings']['divisionalH']['divlinecolor'] = array(
661 '#type' => 'colorpicker_textfield',
662 '#description' => t('The color of grid divisional line.'),
663 '#default_value' => ($settings['divlinecolor'] ? $settings['divlinecolor'] : '#000000'),
664 '#colorpicker' => 'settings_divisionalH_divlinecolor_colorpicker',
665 );
666 $form['settings']['divisionalH']['divLineThickness'] = array(
667 '#type' => 'textfield',
668 '#title' => t('Thickness of the grid divisional line.'),
669 '#default_value' => ($settings['divLineThickness'] ? $settings['divLineThickness'] : ''),
670 '#description' => t('Thickness (in pixels) of the grid divisional line.'),
671 '#size' => 5,
672 );
673 $form['settings']['divisionalH']['divLineAlpha'] = array(
674 '#type' => 'textfield',
675 '#title' => t('Transparency of the grid divisional line.'),
676 '#default_value' => ($settings['divLineAlpha'] ? $settings['divLineAlpha'] : ''),
677 '#description' => t('Transparency of the grid divisional line (0-100).'),
678 '#size' => 5,
679 );
680 $form['settings']['divisionalH']['showDivLineValue'] = array(
681 '#type' => 'checkbox',
682 '#title' => t('Textural value'),
683 '#default_value' => $settings['showDivLineValue'],
684 '#description' => t('Show/hide the textual value of the divisional line.'),
685 '#attributes' => ($settings['showDivLineValue'] == 1 ? array('checked' => 'checked') : array()),
686 );
687 $form['settings']['divisionalH']['showAlternateHGridColor'] = array(
688 '#type' => 'checkbox',
689 '#title' => t('Alternate colored grid bands'),
690 '#default_value' => $settings['showAlternateHGridColor'],
691 '#description' => t('Whether to show alternate colored horizontal grid bands.'),
692 '#attributes' => ($settings['showAlternateHGridColor'] == 1 ? array('checked' => 'checked') : array()),
693 );
694 $form['settings']['divisionalH']['alternateHGridColor_colorpicker'] = array(
695 '#type' => 'colorpicker',
696 '#title' => t('Color of the alternate horizontal grid bands'),
697 );
698 $form['settings']['divisionalH']['alternateHGridColor'] = array(
699 '#type' => 'colorpicker_textfield',
700 '#description' => t('Color of the alternate horizontal grid bands.'),
701 '#default_value' => ($settings['alternateHGridColor'] ? $settings['alternateHGridColor'] : '#000000'),
702 '#colorpicker' => 'settings_divisionalH_alternateHGridColor_colorpicker',
703 );
704 $form['settings']['divisionalH']['alternateHGridAlpha'] = array(
705 '#type' => 'textfield',
706 '#title' => t('Transparency of the alternate grid divisional line'),
707 '#default_value' => ($settings['alternateHGridAlpha'] ? $settings['alternateHGridAlpha'] : ''),
708 '#description' => t('Transparency of the alternate horizontal grid bands (0-100).'),
709 '#size' => 5,
710 );
711 return $form;
712 }
713 function _fusioncharts_divisionalV($settings) {
714 $form['settings']['divisionalV'] = array(
715 '#type' => 'fieldset',
716 '#title' => t('Divisional Lines (Vertical)'),
717 '#collapsible' => TRUE,
718 '#collapsed' => TRUE,
719 );
720 $form['settings']['divisionalV']['numVDivLines'] = array(
721 '#type' => 'textfield',
722 '#title' => t('Number of divisional lines'),
723 '#default_value' => ($settings['numVDivLines'] ? $settings['numVDivLines'] : ''),
724 '#description' => t('The number of vertical divisional lines to be drawn.'),
725 '#size' => 5,
726 );
727 $form['settings']['divisionalV']['VDivlinecolor_colorpicker'] = array(
728 '#type' => 'colorpicker',
729 '#title' => t('Color of vertical grid divisional line'),
730 );
731 $form['settings']['divisionalV']['VDivlinecolor'] = array(
732 '#type' => 'colorpicker_textfield',
733 '#description' => t('Color of vertical grid divisional line.'),
734 '#default_value' => ($settings['VDivlinecolor'] ? $settings['VDivlinecolor'] : '#000000'),
735 '#colorpicker' => 'settings_divisionalV_VDivlinecolor_colorpicker',
736 );
737 $form['settings']['divisionalV']['VDivLineThickness'] = array(
738 '#type' => 'textfield',
739 '#title' => t('Thickness of the grid divisional line.'),
740 '#default_value' => ($settings['VDivLineThickness'] ? $settings['VDivLineThickness'] : ''),
741 '#description' => t('Thickness (in pixels) of the grid divisional line.'),
742 '#size' => 5,
743 );
744 $form['settings']['divisionalV']['VDivLineAlpha'] = array(
745 '#type' => 'textfield',
746 '#title' => t('Transparency of the grid divisional line.'),
747 '#default_value' => ($settings['VDivLineAlpha'] ? $settings['VDivLineAlpha'] : ''),
748 '#description' => t('Transparency of the grid divisional line (0-100).'),
749 '#size' => 5,
750 );
751 $form['settings']['divisionalV']['showAlternateVGridColor'] = array(
752 '#type' => 'checkbox',
753 '#title' => t('Alternate colored grid bands'),
754 '#default_value' => $settings['showAlternateVGridColor'],
755 '#description' => t('Whether to show alternate colored vertical grid bands.'),
756 '#attributes' => ($settings['showAlternateVGridColor'] == 1 ? array('checked' => 'checked') : array()),
757 );
758 $form['settings']['divisionalV']['alternateVGridColor_colorpicker'] = array(
759 '#type' => 'colorpicker',
760 '#title' => t('Color of the alternate vertical grid bands'),
761 );
762 $form['settings']['divisionalV']['alternateVGridColor'] = array(
763 '#type' => 'colorpicker_textfield',
764 '#description' => t('Color of the alternate vertical grid bands.'),
765 '#default_value' => ($settings['alternateVGridColor'] ? $settings['alternateVGridColor'] : '#000000'),
766 '#colorpicker' => 'settings_divisionalV_alternateVGridColor_colorpicker',
767 );
768 $form['settings']['divisionalV']['alternateVGridAlpha'] = array(
769 '#type' => 'textfield',
770 '#title' => t('Transparency of the alternate grid divisional line.'),
771 '#default_value' => ($settings['alternateVGridAlpha'] ? $settings['alternateVGridAlpha'] : ''),
772 '#description' => t('Transparency of the alternate horizontal grid bands (9-100).'),
773 '#size' => 5,
774 );
775 return $form;
776 }
777 function _fusioncharts_HoverCaption($settings) {
778 $form['settings']['HoverCaption'] = array(
779 '#type' => 'fieldset',
780 '#title' => t('Hover Caption Properties'),
781 '#collapsible' => TRUE,
782 '#collapsed' => TRUE,
783 );
784 $form['settings']['HoverCaption']['showhovercap'] = array(
785 '#type' => 'checkbox',
786 '#title' => t('Hover caption'),
787 '#default_value' => $settings['showhovercap'],
788 '#description' => t('Whether to show/hide hover caption box.'),
789 '#attributes' => ($settings['showhovercap'] == 1 ? array('checked' => 'checked') : array()),
790 );
791 $form['settings']['HoverCaption']['hoverCapBgColor_colorpicker'] = array(
792 '#type' => 'colorpicker',
793 '#title' => t('Background color of the hover caption box'),
794 );
795 $form['settings']['HoverCaption']['hoverCapBgColor'] = array(
796 '#type' => 'colorpicker_textfield',
797 '#description' => t('Background color of the hover caption box.'),
798 '#default_value' => ($settings['hoverCapBgColor'] ? $settings['hoverCapBgColor'] : '#ffffff'),
799 '#colorpicker' => 'settings_HoverCaption_hoverCapBgColor_colorpicker',
800 );
801 $form['settings']['HoverCaption']['hoverCapBorderColor_colorpicker'] = array(
802 '#type' => 'colorpicker',
803 '#title' => t('Border color of the hover caption box'),
804 );
805 $form['settings']['HoverCaption']['hoverCapBorderColor'] = array(
806 '#type' => 'colorpicker_textfield',
807 '#description' => t('Border color of the hover caption box.'),
808 '#default_value' => ($settings['hoverCapBorderColor'] ? $settings['hoverCapBorderColor'] : '#000000'),
809 '#colorpicker' => 'settings_HoverCaption_hoverCapBorderColor_colorpicker',
810 );
811 $form['settings']['HoverCaption']['hoverCapSepChar'] = array(
812 '#type' => 'textfield',
813 '#title' => t('Character seperator'),
814 '#default_value' => ($settings['hoverCapSepChar'] ? $settings['hoverCapSepChar'] : ''),
815 '#description' => t('The character that separates the name and value displayed in the hover caption box.'),
816 '#size' => 5,
817 );
818 return $form;
819 }
820 function _fusioncharts_ChartMargins($settings) {
821 $form['settings']['ChartMargins'] = array(
822 '#type' => 'fieldset',
823 '#title' => t('Chart Margins'),
824 '#collapsible' => TRUE,
825 '#collapsed' => TRUE,
826 );
827 $form['settings']['ChartMargins']['chartLeftMargin'] = array(
828 '#type' => 'textfield',
829 '#title' => t('Left space'),
830 '#default_value' => ($settings['chartLeftMargin'] ? $settings['chartLeftMargin'] : ''),
831 '#description' => t('Space to be left unplotted on the left side of the chart.'),
832 '#size' => 5,
833 );
834 $form['settings']['ChartMargins']['chartRightMargin'] = array(
835 '#type' => 'textfield',
836 '#title' => t('Right space'),
837 '#default_value' => ($settings['chartRightMargin'] ? $settings['chartRightMargin'] : ''),
838 '#description' => t('Space to be left unplotted on the right side of the chart.'),
839 '#size' => 5,
840 );
841 $form['settings']['ChartMargins']['chartTopMargin'] = array(
842 '#type' => 'textfield',
843 '#title' => t('Top space'),
844 '#default_value' => ($settings['chartTopMargin'] ? $settings['chartTopMargin'] : ''),
845 '#description' => t('Space to be left unplotted on the top of the chart.'),
846 '#size' => 5,
847 );
848 $form['settings']['ChartMargins']['chartBottomMargin'] = array(
849 '#type' => 'textfield',
850 '#title' => t('Bottom space'),
851 '#default_value' => ($settings['chartBottomMargin'] ? $settings['chartBottomMargin'] : ''),
852 '#description' => t('Space to be left unplotted on the bottom of the chart.'),
853 '#size' => 5,
854 );
855 return $form;
856 }
857 function _fusioncharts_PieProperties($settings) {
858 $form['settings']['PieProperties'] = array(
859 '#type' => 'fieldset',
860 '#title' => t('Pie properties'),
861 '#collapsible' => TRUE,
862 '#collapsed' => TRUE,
863 );
864 $form['settings']['PieProperties']['pieRadius'] = array(
865 '#type' => 'textfield',
866 '#title' => t('Pie radius'),
867 '#default_value' => ($settings['pieRadius']