You are here

README.txt in Google Chart Tools: Image Charts 7

Same filename and directory in other branches
  1. 5 README.txt
  2. 6 README.txt
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,
  ),
);

File

README.txt
View source
  1. AUTHORS
  2. -------
  3. * Tj Holowaychuk
  4. * Jimmy Berry ("boombatower", http://drupal.org/user/214218)
  5. DOCUMENATION
  6. ------------
  7. * http://code.google.com/p/drupal-chart-api/w/list
  8. * chart_build() in chart.module
  9. * chart.api.php
  10. EXAMPLE USING THEME()
  11. ---------------------
  12. $chart = array(
  13. '#chart_id' => 'test_chart',
  14. '#title' => t('Servings'),
  15. '#type' => CHART_TYPE_PIE_3D,
  16. );
  17. $chart['#data']['fruits'] = 3;
  18. $chart['#data']['meats'] = 2;
  19. $chart['#data']['dairy'] = 5;
  20. echo theme('chart', array('chart' => $chart));
  21. EXAMPLE USING RENDERABLE ARRAYS
  22. -------------------------------
  23. Render Arrays in Drupal 7: http://drupal.org/node/930760
  24. $page['chart'] = array(
  25. '#theme' => 'chart',
  26. '#chart_id' => 'test_chart',
  27. '#title' => t('Servings'),
  28. '#type' => CHART_TYPE_PIE_3D,
  29. '#data' => array(
  30. 'fruits' => 3,
  31. 'meats' => 2,
  32. 'dairy' => 5,
  33. ),
  34. );