diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-08-18 10:09:06 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-08-18 10:09:06 +0000 |
commit | 94953ea4f75810e5e667425bfd55ce8d51672ee3 (patch) | |
tree | b6e34c66f1031c2834c3578a7e80382710c2f362 /tests/renderer_2d_test.php | |
parent | e981be4dca177e235f6aa9b597d4a99c0a2cf875 (diff) | |
download | zetacomponents-graph-94953ea4f75810e5e667425bfd55ce8d51672ee3.zip zetacomponents-graph-94953ea4f75810e5e667425bfd55ce8d51672ee3.tar.gz |
- Moved properties to properties array
- Fixed bug: Legend title was rendered, even when empty
Diffstat (limited to 'tests/renderer_2d_test.php')
-rw-r--r-- | tests/renderer_2d_test.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/renderer_2d_test.php b/tests/renderer_2d_test.php index e1d4b9f..362a7e0 100644 --- a/tests/renderer_2d_test.php +++ b/tests/renderer_2d_test.php @@ -1741,6 +1741,31 @@ class ezcGraphRenderer2dTest extends ezcTestCase $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg' ); } + + public function testRenderPieChartWithLegendTitle() + { + $filename = $this->tempDir . __FUNCTION__ . '.svg'; + + $chart = new ezcGraphPieChart(); + $chart->data['sample'] = new ezcGraphArrayDataSet( array( + 'Mozilla' => 4375, + 'IE' => 345, + 'Opera' => 1204, + 'wget' => 231, + 'Safari' => 987, + ) ); + + $chart->legend->title = 'Legenda'; + + $chart->driver = new ezcGraphSvgDriver(); + $chart->options->font = $this->basePath . 'font.ttf'; + $chart->render( 500, 200, $filename ); + + $this->compare( + $filename, + $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg' + ); + } } ?> |