$chart) { if (!isset($settings['chart'][$id]['containerId'])) { $settings['chart'][$id]['containerId'] = drupal_strtolower(str_replace(" ", "-", $id)); } } drupal_add_css(drupal_get_path('module', 'google_chart_tools') . '/google_chart_tools.css'); drupal_add_js(drupal_get_path('module', 'google_chart_tools') . '/google_chart_tools.js'); drupal_add_js($settings, array('type' => 'setting')); $ret = array( 'title' => $chart['options']['title'], 'id' => $id, 'weight' => isset($chart['weight']) ? $chart['weight'] : 0, 'markup' => "
" ); return $ret; } /** * Return types of charts that google can render. */ function google_chart_tools_load_types() { // define default types from API documentation $types = array( 'LineChart' => t('Line Chart'), 'PieChart' => t('Pie Chart'), 'ColumnChart' => t('Column Chart'), 'AreaChart' => t('Area Chart'), 'Gauge' => t('Gauge'), 'BarChart' => t('Bar Chart'), 'OrgChart' => t('Organizational Chart') ); // allow other projects to alter chart types drupal_alter('gct_types', $types); return $types; }