Compound charts: Expose data series count property
[project/chart.git] / chart.api.php
1 <?php
2 /**
3 * @file
4 * Provides API documentation.
5 *
6 * @author Jimmy Berry ("boombatower", http://drupal.org/user/214218)
7 */
8
9 /**
10 * Alter a chart before it is rendered.
11 *
12 * @param $chart
13 * An associative array defining a chart.
14 * @see chart_build()
15 */
16 function hook_chart_alter(&$chart) {
17 $chart['#title'] .= ' (altered)';
18 }
19
20 /**
21 * Define chart color schemes.
22 *
23 * @return
24 * An associative array of color schemes keyed by the scheme name and
25 * containing an array of colors.
26 */
27 function hook_chart_color_schemes() {
28 return array(
29 'my_scheme' => array(
30 'FF8000',
31 'FFFFFF',
32 ),
33 );
34 }
35
36 /**
37 * Alter chart color schemes.
38 *
39 * @param $schemes
40 * An associative array of color schemes, see hook_chart_color_schemes().
41 */
42 function hook_chart_color_schemes_alter(&$schemes) {
43 $schemes['default'] = array(
44 'FFFFFF',
45 '000000',
46 );
47 }