You are here

function _charts_google_visualization_type in Charts 8

Same name and namespace in other branches
  1. 7.2 modules/charts_google/charts_google.inc \_charts_google_visualization_type()

Utility to convert a Drupal renderable type to a Google visualization type.

1 call to _charts_google_visualization_type()
_charts_google_render in modules/charts_google/charts_google.inc
Chart render callback; Convert all chart-level data.

File

modules/charts_google/charts_google.inc, line 45
Callbacks and utility functions for rendering a Google Chart.

Code

function _charts_google_visualization_type($renderable_type) {
  $types = array(
    'area' => 'AreaChart',
    'bar' => 'BarChart',
    'column' => 'ColumnChart',
    'line' => 'LineChart',
    'pie' => 'PieChart',
    'scatter' => 'ScatterChart',
  );
  drupal_alter('charts_google_visualization_types', $types);
  return isset($types[$renderable_type]) ? $types[$renderable_type] : FALSE;
}