protected function ChartsGraphsGoogleCharts::_get_encoded_text_labels in Charts and Graphs 6.2
Same name and namespace in other branches
- 7 apis/charts_graphs_google_charts/charts_graphs_google_charts.class.inc \ChartsGraphsGoogleCharts::_get_encoded_text_labels()
1 call to ChartsGraphsGoogleCharts::_get_encoded_text_labels()
- ChartsGraphsGoogleCharts::_encode_data 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 263 - Implementation of abstract class ChartsGraphsCanvas for Google Charts library.
Class
- ChartsGraphsGoogleCharts
- Implementation of abstract class ChartsGraphsCanvas for Google Charts library.
Code
protected function _get_encoded_text_labels() {
$chxl = '';
if (is_array($this->x_labels)) {
/**
* Workaround a apparently Google Charts bug: data labels are inverted on
* side bar graphs.
*/
$x_labels = $this->type == 'side_bar' ? array_reverse($this->x_labels) : $this->x_labels;
foreach ($x_labels as $label) {
$chxl .= '|' . drupal_urlencode($label);
}
}
return $chxl;
}