function _charts_series_values in Charts 7
Same name and namespace in other branches
- 6 charts.inc \_charts_series_values()
Even if the series have values with attributes, return only the numeric values of them.
Parameters
Array. A given data series with or without attributes.:
Return value
Array. A data series, but only with the values, without the attributes.
3 calls to _charts_series_values()
- _google_charts_series in google_charts/
google_charts.inc - Convert all Series-level data.
- _openflashchart_series_generic in openflashchart/
openflashchart.inc - _openflashchart_series_pie in openflashchart/
openflashchart.inc
File
- ./
charts.inc, line 91 - @author Bruno Massa http://drupal.org/user/67164
Code
function _charts_series_values($series) {
$data = array();
foreach ($series as $index => $value) {
if (!is_numeric($index)) {
continue;
}
if (is_array($value)) {
$data[] = $value['#value'];
}
else {
$data[] = $value;
}
}
return $data;
}