summaryrefslogtreecommitdiffstats
path: root/src/charts/pie.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-11-30 09:29:35 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-11-30 09:29:35 +0000
commit5ced6d5c25202717ef3ec1a811cffba6b44bcb79 (patch)
tree9e809048dd794a6d7d95497fe60f11bbcd77cc88 /src/charts/pie.php
parenta624a3e637586a8efc327cd5e8e6021bf3546c00 (diff)
downloadzetacomponents-graph-5ced6d5c25202717ef3ec1a811cffba6b44bcb79.zip
zetacomponents-graph-5ced6d5c25202717ef3ec1a811cffba6b44bcb79.tar.gz
- Fixed bug #9568: (Devision by zero warning)
Diffstat (limited to 'src/charts/pie.php')
-rw-r--r--src/charts/pie.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/charts/pie.php b/src/charts/pie.php
index 58c4ec7..2201ac7 100644
--- a/src/charts/pie.php
+++ b/src/charts/pie.php
@@ -182,6 +182,11 @@ class ezcGraphPieChart extends ezcGraphChart
*/
public function render( $width, $height, $file = null )
{
+ if ( !count( $this->data ) )
+ {
+ throw new ezcGraphNoDataException();
+ }
+
// Set image properties in driver
$this->driver->options->width = $width;
$this->driver->options->height = $height;
OpenPOWER on IntegriCloud