summaryrefslogtreecommitdiffstats
path: root/src/datasets
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-05-24 12:29:24 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-05-24 12:29:24 +0000
commitaa49d9ec7aaa79cc42043224386ffc30bf7c7b0f (patch)
treefd09d73e08ca90ee14e46a76a78095cffeaa0e19 /src/datasets
parent4029d5db40e0cc0c59647d1be98ead6602800d9a (diff)
downloadzetacomponents-graph-aa49d9ec7aaa79cc42043224386ffc30bf7c7b0f.zip
zetacomponents-graph-aa49d9ec7aaa79cc42043224386ffc30bf7c7b0f.tar.gz
- Fixed issue #10842: Pie charts fatal error with datasets with value sum <= 0
Diffstat (limited to 'src/datasets')
-rw-r--r--src/datasets/array.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/datasets/array.php b/src/datasets/array.php
index 3340cd0..ee7f0df 100644
--- a/src/datasets/array.php
+++ b/src/datasets/array.php
@@ -44,10 +44,16 @@ class ezcGraphArrayDataSet extends ezcGraphDataSet
throw new ezcGraphInvalidArrayDataSourceException( $data );
}
+ $this->data = array();
foreach ( $data as $key => $value )
{
$this->data[$key] = $value;
}
+
+ if ( !count( $this->data ) )
+ {
+ throw new ezcGraphInvalidDataException( 'Data sets should contain some values.' );
+ }
}
/**
OpenPOWER on IntegriCloud