summaryrefslogtreecommitdiffstats
path: root/src/charts
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2008-07-02 22:34:42 +0000
committerKore Nordmann <github@kore-nordmann.de>2008-07-02 22:34:42 +0000
commit663755b520265cb1cc4bc3edf30370f54f16c86e (patch)
tree551a8ac31edace3c3b5c0e8cc5a5fa658811d239 /src/charts
parentf4665de0edcca47b6fa59ebda67cb0ea61dd2545 (diff)
downloadzetacomponents-graph-663755b520265cb1cc4bc3edf30370f54f16c86e.zip
zetacomponents-graph-663755b520265cb1cc4bc3edf30370f54f16c86e.tar.gz
- Fixed issue #13253: Division by zero when trying to render stacked bars.
Diffstat (limited to 'src/charts')
-rw-r--r--src/charts/line.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/charts/line.php b/src/charts/line.php
index 1c8613b..ed342e8 100644
--- a/src/charts/line.php
+++ b/src/charts/line.php
@@ -350,7 +350,8 @@ class ezcGraphLineChart extends ezcGraphChart
}
// Store stacked value for next iteration
- $stacked[(int) ( $point->x * 10000 )][$point->y / abs( $point->y )] = $point;
+ $side = ( $point->y == 0 ? 1 : $point->y / abs( $point->y ) );
+ $stacked[(int) ( $point->x * 10000 )][$side] = $point;
$renderer->drawStackedBar(
$boundings,
OpenPOWER on IntegriCloud