dirname(__FILE__) . '/amcharts.class.inc', // must be full path 'clazz' => 'ChartsAmcharts', // implementation class' name 'name' => 'amcharts', // name used when invoking through a factory method 'nice_name' => 'amCharts', 'chart_types' => array( 'line' => t('Line'), 'area' => t('Area'), 'donut' => t('Donut'), 'side_bar' => t('Side Bar'), 'bar' => t('Bar'), 'pie' => t('Pie'), 'stacked_area' => t('Stacked Area'), 'stacker_bar' => t('Stacked Bar'), 'stacked_side_bar' => t('Stacked Side Bar'), '100_stacked_bar' => t('100% Stacked Bar'), 'bar_3d' => t('3D Bar'), '100_stacked_side_bar' => t('100% Stacked Side Bar'), 'side_bar_3d' => t('3D Side Bar'), ), ); return (object) $provider; } function amcharts_menu() { $items = array(); $items['amcharts/getdata'] = array( 'page callback' => 'amcharts_get_data', 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, ); return $items; } function amcharts_get_data() { $cid = check_plain($_GET['cid']); $op = check_plain(arg(2)); if ($op != 'settings' && $op != 'data') { drupal_not_found(); exit(); } $cache = cache_get($cid); if (!$cache || empty($cache->data)) { drupal_not_found(); exit(); } $obj = $cache->data; $ret = $obj->$op; drupal_set_header('Content-Type: text/xml; charset=utf-8'); print $ret; exit(); } function _____charts_openflash_data($cid = NULL) { $cache = cache_get($cid); if (!$cache) { drupal_not_found(); exit(); } $canvas = $cache->data; $chart = chart_graphs_get_graph('open-flash'); $chart->get_data_from_cache($cid); }