summaryrefslogtreecommitdiffstats
path: root/tests/renderer_2d_test.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-08-18 10:09:06 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-08-18 10:09:06 +0000
commit94953ea4f75810e5e667425bfd55ce8d51672ee3 (patch)
treeb6e34c66f1031c2834c3578a7e80382710c2f362 /tests/renderer_2d_test.php
parente981be4dca177e235f6aa9b597d4a99c0a2cf875 (diff)
downloadzetacomponents-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.php25
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'
+ );
+ }
}
?>
OpenPOWER on IntegriCloud