summaryrefslogtreecommitdiffstats
path: root/README.txt
blob: cad1fb8827e7c9534cbf9347c88474967029fd93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
AUTHORS
-------

 * Tj Holowaychuk <http://www.350designs.com/>
 * Jimmy Berry ("boombatower", http://drupal.org/user/214218)

DOCUMENATION
------------

 * http://code.google.com/p/drupal-chart-api/w/list
 * chart_build() in chart.module
 * chart.api.php

EXAMPLE USING THEME()
---------------------

$chart = array(
  '#chart_id' => 'test_chart',
  '#title' => t('Servings'),
  '#type' => CHART_TYPE_PIE_3D,
);

$chart['#data']['fruits'] = 3;
$chart['#data']['meats']  = 2;
$chart['#data']['dairy']  = 5;

echo theme('chart', array('chart' => $chart));

EXAMPLE USING RENDERABLE ARRAYS
-------------------------------
Render Arrays in Drupal 7: http://drupal.org/node/930760

$page['chart'] = array(
  '#theme' => 'chart',
  '#chart_id' => 'test_chart',
  '#title' => t('Servings'),
  '#type' => CHART_TYPE_PIE_3D,
  '#data' => array(
    'fruits' => 3,
    'meats' => 2,
    'dairy' => 5,
  );
);