Added check for required_axis, if we need axis based data

This commit is contained in:
Deon George 2016-07-25 15:28:35 +10:00
parent c9cc1794d4
commit 9e3874819e

View File

@ -32,7 +32,7 @@ abstract class HighChart_Type {
case 'data':
$args = array_shift($args);
if (array_diff(array_keys($args),$this->_required_axis))
if ($this->_required_axis AND array_diff(array_keys($args),$this->_required_axis))
throw new Kohana_Exception('Invalid data arguments for chart, expecting [:args]',array(':args'=>implode('|',$this->_required_axis)));
if (! $args)