protected function ChartsGraphsGoogleCharts::_encode_other_parameters in Charts and Graphs 7
Same name and namespace in other branches
- 6.2 apis/charts_graphs_google_charts/charts_graphs_google_charts.class.inc \ChartsGraphsGoogleCharts::_encode_other_parameters()
1 call to ChartsGraphsGoogleCharts::_encode_other_parameters()
- 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 280 - Implementation of abstract class ChartsGraphsCanvas for Google Charts library.
Class
- ChartsGraphsGoogleCharts
- Implementation of abstract class ChartsGraphsCanvas for Google Charts library.
Code
protected function _encode_other_parameters() {
$this->parameters_to_send[CHARTS_GRAPHS_GOOGLE_CHARTS_CHART_TITLE] = drupal_encode_path($this->title);
$this->parameters_to_send[CHARTS_GRAPHS_GOOGLE_CHARTS_CHART_SIZE] = drupal_encode_path(sprintf('%ux%u', $this->width, $this->height));
if (strpos($this->type, 'bar') !== FALSE) {
$this->parameters_to_send[CHARTS_GRAPHS_GOOGLE_CHARTS_BARS_WIDTH_SPACING] = 'a';
}
/**
* Applying background colour setting if available.
*/
if (isset($this->colour) && !empty($this->colour)) {
$this->parameters_to_send[CHARTS_GRAPHS_GOOGLE_CHARTS_BACKGROUND_COLOUR] = sprintf('bg,s,%s', substr($this->colour, -CHARTS_GRAPHS_GOOGLE_CHARTS_COLOUR_DEFINITION_LENGTH));
}
}