You are here

function _chart_is_valid_size in Google Chart Tools: Image Charts 5

Same name and namespace in other branches
  1. 6 chart.module \_chart_is_valid_size()
  2. 7 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 675
Google Charting API. Developed by Tj Holowaychuk

Code

function _chart_is_valid_size($size) {
  if (!is_numeric($size['#width']) && !is_numeric($size['#height'])) {
    return FALSE;
  }
  if ($size['#width'] * $size['#height'] >= 300000) {
    return FALSE;
  }
  return TRUE;
}