function chart_render in Google Chart Tools: Image Charts 5
Same name and namespace in other branches
- 6 chart.module \chart_render()
Renders a chart structure.
Parameters
array $chart:
array $attributes: (optional) Assoc array of attributes parsed by drupal_attributes();
Return value
mixed
- Success: Chart image markup
- Failure: FALSE
1 call to chart_render()
- system_charts_build in contrib/
system_charts/ system_charts.module - Gather data and build a chart API structure.
File
- ./
chart.module, line 113 - Google Charting API. Developed by Tj Holowaychuk
Code
function chart_render($chart, $attributes = array()) {
if ($chart_query_string = chart_build($chart)) {
$attributes['id'] = 'chart-' . $chart['#chart_id'];
$attributes['class'] .= ' chart';
return '<img src="' . CHART_URI . '?' . $chart_query_string . '"' . drupal_attributes($attributes) . ' />';
}
else {
return FALSE;
}
}