function _chart_is_valid_size in Google Chart Tools: Image Charts 7
Same name and namespace in other branches
- 5 chart.module \_chart_is_valid_size()
- 6 chart.module \_chart_is_valid_size()
Check if chart data is below size limit.
1 call to _chart_is_valid_size()
- _chart_append in ./
chart.module - When the value passed is valid append a chart API attribute and parsed values to $data.
File
- ./
chart.module, line 854 - Provides primary Drupal hook implementations.
Code
function _chart_is_valid_size($size) {
if (empty($size)) {
return FALSE;
}
if (!is_numeric($size['#width']) || !is_numeric($size['#height'])) {
return FALSE;
}
if ($size['#width'] * $size['#height'] >= 300000) {
watchdog('chart', '#width X #height of chart is greater than or equal to 300,000 pixels, chart size set to default.');
return FALSE;
}
return TRUE;
}