diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-09-11 08:07:34 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-09-11 08:07:34 +0000 |
commit | b2f80e187bc61f0e9510c5cff18f6bb8e8eac4e6 (patch) | |
tree | 754d2d9c70ac44c6f222eac45d8cf2c71dc5b6d8 /tests/renderer_3d_test.php | |
parent | 5b6df595942b234cc74cb2ff6a009973d54dcd71 (diff) | |
download | zetacomponents-graph-b2f80e187bc61f0e9510c5cff18f6bb8e8eac4e6.zip zetacomponents-graph-b2f80e187bc61f0e9510c5cff18f6bb8e8eac4e6.tar.gz |
- Fixed bug caused by different axis space for axis
# Changes rendering order of chart elements, what causes changed SVG documents
Diffstat (limited to 'tests/renderer_3d_test.php')
-rw-r--r-- | tests/renderer_3d_test.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/renderer_3d_test.php b/tests/renderer_3d_test.php index 59d749c..5dde168 100644 --- a/tests/renderer_3d_test.php +++ b/tests/renderer_3d_test.php @@ -930,6 +930,30 @@ class ezcGraphRenderer3dTest extends ezcImageTestCase ); } + public function testRenderLineChartWithDifferentAxisSpace() + { + $filename = $this->tempDir . __FUNCTION__ . '.svg'; + + $chart = new ezcGraphLineChart(); + $chart->palette = new ezcGraphPaletteBlack(); + + $chart->data['Line 1'] = new ezcGraphArrayDataSet( array( 'sample 1' => 234, 'sample 2' => 21, 'sample 3' => 324, 'sample 4' => 120, 'sample 5' => 1) ); + $chart->data['Line 2'] = new ezcGraphArrayDataSet( array( 'sample 1' => 543, 'sample 2' => 234, 'sample 3' => 298, 'sample 4' => 5, 'sample 5' => 613) ); + + $chart->xAxis->axisSpace = .2; + $chart->yAxis->axisSpace = .05; + + $chart->driver = new ezcGraphSvgDriver(); + $chart->renderer = new ezcGraphRenderer3d(); + + $chart->render( 500, 200, $filename ); + + $this->compare( + $filename, + $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg' + ); + } + public function testRenderLineChartWithAxisLabels() { $filename = $this->tempDir . __FUNCTION__ . '.svg'; |