You are here

protected function ChartsGraphsGoogleCharts::_encode_chart_type in Charts and Graphs 7

Same name and namespace in other branches
  1. 6.2 apis/charts_graphs_google_charts/charts_graphs_google_charts.class.inc \ChartsGraphsGoogleCharts::_encode_chart_type()
1 call to ChartsGraphsGoogleCharts::_encode_chart_type()
ChartsGraphsGoogleCharts::_get_url in apis/charts_graphs_google_charts/charts_graphs_google_charts.class.inc

File

apis/charts_graphs_google_charts/charts_graphs_google_charts.class.inc, line 61
Implementation of abstract class ChartsGraphsCanvas for Google Charts library.

Class

ChartsGraphsGoogleCharts
Implementation of abstract class ChartsGraphsCanvas for Google Charts library.

Code

protected function _encode_chart_type() {
  switch ($this->type) {
    case 'line':
      $type = 'lc';
      break;
    case 'area':
      $type = 'lc';
      break;
    case 'bar':
      $type = 'bvg';
      break;
    case 'pie':
      $type = 'p';
      $this->colour_count_series = FALSE;
      break;
    case 'side_bar':
      $type = 'bhg';
      break;
    case 'queued_bar':
      $type = 'bvo';
      break;
    case 'stacked_bar':
      $type = 'bvs';
      break;
    case 'stacked_side_bar':
      $type = 'bhs';
      break;
    case 'pie_3d':
      $type = 'p3';
      $this->colour_count_series = FALSE;
      break;
  }
  $this->parameters_to_send[CHARTS_GRAPHS_GOOGLE_CHARTS_CHART_TYPE] = $type;
}