dirname(__FILE__) . '/charts_graphs_amcharts.class.inc', // must be full path 'clazz' => 'ChartsGraphsAmcharts', // 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'), 'donut_3d' => t('3D Donut'), 'side_bar' => t('Side Bar'), 'bar' => t('Bar'), 'pie' => t('Pie'), 'pie_3d' => t('3D 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 charts_graphs_amcharts_menu() { $items = array(); $items['charts_graphs_amcharts/getdata'] = array( 'page callback' => 'charts_graphs_amcharts_get_data', 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, ); return $items; } function charts_graphs_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(); }