diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2008-07-02 22:34:42 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2008-07-02 22:34:42 +0000 |
commit | 663755b520265cb1cc4bc3edf30370f54f16c86e (patch) | |
tree | 551a8ac31edace3c3b5c0e8cc5a5fa658811d239 /tests/line_test.php | |
parent | f4665de0edcca47b6fa59ebda67cb0ea61dd2545 (diff) | |
download | zetacomponents-graph-663755b520265cb1cc4bc3edf30370f54f16c86e.zip zetacomponents-graph-663755b520265cb1cc4bc3edf30370f54f16c86e.tar.gz |
- Fixed issue #13253: Division by zero when trying to render stacked bars.
Diffstat (limited to 'tests/line_test.php')
-rw-r--r-- | tests/line_test.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/line_test.php b/tests/line_test.php index a895da3..72ae0b8 100644 --- a/tests/line_test.php +++ b/tests/line_test.php @@ -1198,5 +1198,36 @@ class ezcGraphLineChartTest extends ezcGraphTestCase $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg' ); } + + public function testStackedBarChartBug13253() + { + $filename = $this->tempDir . __FUNCTION__ . '.svg'; + $graph = new ezcGraphBarChart(); + + $graph->data['values'] = new ezcGraphArrayDataSet( array( + 'string 1' => 55, + 'string 2' => 25, + 'string 3' => 10, + 'string 4' => 10, + 'string 5' => 5, + ) ); + $graph->data['remains'] = new ezcGraphArrayDataSet( array( + 'string 1' => 45, + 'string 2' => 75, + 'string 3' => 90, + 'string 4' => 90, + 'string 5' => 95, + ) ); + + $graph->palette = new ezcGraphPaletteEzRed(); + $graph->options->stackBars = true; + + $graph->render( 500, 200, $filename ); + + $this->compare( + $filename, + $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg' + ); + } } ?> |