Author: kn Date: Thu Dec 13 11:43:53 2007 New Revision: 6978 Log: - Fixed issue #12246: Graph: dataBorder doesn't works in 2d renderer for piecharts
Added: trunk/Graph/tests/data/compare/ezcGraphRenderer2dTest_testRenderPieChartDifferentDataBorder.svg (with props) Modified: trunk/Graph/ChangeLog trunk/Graph/src/renderer/2d.php trunk/Graph/tests/renderer_2d_test.php Modified: trunk/Graph/ChangeLog ============================================================================== --- trunk/Graph/ChangeLog [iso-8859-1] (original) +++ trunk/Graph/ChangeLog [iso-8859-1] Thu Dec 13 11:43:53 2007 @@ -1,3 +1,9 @@ +1.2 - [RELEASEDATE] +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- Fixed issue #12246: Graph: dataBorder doesn't works in 2d renderer for + piecharts + 1.2beta1 - Wednesday 28 November 2007 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Modified: trunk/Graph/src/renderer/2d.php ============================================================================== --- trunk/Graph/src/renderer/2d.php [iso-8859-1] (original) +++ trunk/Graph/src/renderer/2d.php [iso-8859-1] Thu Dec 13 11:43:53 2007 @@ -278,7 +278,7 @@ ) ); - $darkenedColor = $circleSector['color']->darken( .5 ); + $darkenedColor = $circleSector['color']->darken( $this->options->dataBorder ); $this->driver->drawCircleSector( $circleSector['center'], $circleSector['width'], Added: trunk/Graph/tests/data/compare/ezcGraphRenderer2dTest_testRenderPieChartDifferentDataBorder.svg ============================================================================== Binary file - no diff available. Propchange: trunk/Graph/tests/data/compare/ezcGraphRenderer2dTest_testRenderPieChartDifferentDataBorder.svg ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/Graph/tests/data/compare/ezcGraphRenderer2dTest_testRenderPieChartDifferentDataBorder.svg ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Modified: trunk/Graph/tests/renderer_2d_test.php ============================================================================== --- trunk/Graph/tests/renderer_2d_test.php [iso-8859-1] (original) +++ trunk/Graph/tests/renderer_2d_test.php [iso-8859-1] Thu Dec 13 11:43:53 2007 @@ -1856,7 +1856,7 @@ ); } - public function testRenderPieChartWithHighlightAndOffset() + public function testRenderPieChartDifferentDataBorder() { $filename = $this->tempDir . __FUNCTION__ . '.svg'; @@ -1871,7 +1871,7 @@ $chart->data['sample']->highlight['Safari'] = true; - $chart->renderer->options->pieChartOffset = 76; + $chart->renderer->options->dataBorder = .1; $chart->driver = new ezcGraphSvgDriver(); $chart->render( 500, 200, $filename ); @@ -1882,7 +1882,7 @@ ); } - public function testRenderPieChartWithOffset() + public function testRenderPieChartWithHighlightAndOffset() { $filename = $this->tempDir . __FUNCTION__ . '.svg'; @@ -1895,7 +1895,9 @@ 'Safari' => 987, ) ); - $chart->renderer->options->pieChartOffset = 156; + $chart->data['sample']->highlight['Safari'] = true; + + $chart->renderer->options->pieChartOffset = 76; $chart->driver = new ezcGraphSvgDriver(); $chart->render( 500, 200, $filename ); @@ -1906,7 +1908,7 @@ ); } - public function testRenderPieChartWithLegendTitle() + public function testRenderPieChartWithOffset() { $filename = $this->tempDir . __FUNCTION__ . '.svg'; @@ -1919,7 +1921,7 @@ 'Safari' => 987, ) ); - $chart->legend->title = 'Legenda'; + $chart->renderer->options->pieChartOffset = 156; $chart->driver = new ezcGraphSvgDriver(); $chart->render( 500, 200, $filename ); @@ -1930,7 +1932,7 @@ ); } - public function testRenderLabeledPieSegmentWithModifiedSymbolColor() + public function testRenderPieChartWithLegendTitle() { $filename = $this->tempDir . __FUNCTION__ . '.svg'; @@ -1943,9 +1945,7 @@ 'Safari' => 987, ) ); - $chart->data['sample']->highlight['Safari'] = true; - - $chart->renderer->options->pieChartSymbolColor = '#000000BB'; + $chart->legend->title = 'Legenda'; $chart->driver = new ezcGraphSvgDriver(); $chart->render( 500, 200, $filename ); @@ -1956,7 +1956,7 @@ ); } - public function testRenderPieChartWithShadow() + public function testRenderLabeledPieSegmentWithModifiedSymbolColor() { $filename = $this->tempDir . __FUNCTION__ . '.svg'; @@ -1969,8 +1969,9 @@ 'Safari' => 987, ) ); - $chart->data['sample']->highlight['Opera'] = true; - $chart->renderer->options->pieChartShadowSize = 5; + $chart->data['sample']->highlight['Safari'] = true; + + $chart->renderer->options->pieChartSymbolColor = '#000000BB'; $chart->driver = new ezcGraphSvgDriver(); $chart->render( 500, 200, $filename ); @@ -1981,7 +1982,7 @@ ); } - public function testRenderPieChartWithGleamAndShadow() + public function testRenderPieChartWithShadow() { $filename = $this->tempDir . __FUNCTION__ . '.svg'; @@ -1995,6 +1996,31 @@ ) ); $chart->data['sample']->highlight['Opera'] = true; + $chart->renderer->options->pieChartShadowSize = 5; + + $chart->driver = new ezcGraphSvgDriver(); + $chart->render( 500, 200, $filename ); + + $this->compare( + $filename, + $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg' + ); + } + + public function testRenderPieChartWithGleamAndShadow() + { + $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->data['sample']->highlight['Opera'] = true; $chart->renderer->options->legendSymbolGleam = .5; $chart->renderer->options->pieChartShadowSize = 5; $chart->renderer->options->pieChartGleamBorder = 3; -- svn-components mailing list svn-components@lists.ez.no http://lists.ez.no/mailman/listinfo/svn-components