summaryrefslogtreecommitdiffstats
path: root/tests/renderer_3d_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/renderer_3d_test.php')
-rw-r--r--tests/renderer_3d_test.php66
1 files changed, 66 insertions, 0 deletions
diff --git a/tests/renderer_3d_test.php b/tests/renderer_3d_test.php
index 3204b0c..ef9c112 100644
--- a/tests/renderer_3d_test.php
+++ b/tests/renderer_3d_test.php
@@ -382,6 +382,72 @@ class ezcGraphRenderer3dTest extends ezcImageTestCase
);
}
+ public function testRenderLabeledPieChartBlue()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.svg';
+
+ $chart = new ezcGraphPieChart();
+ $chart->palette = new ezcGraphPaletteEzBlue();
+ $chart->data['sample'] = new ezcGraphArrayDataSet( array(
+ 'Mozilla' => 4375,
+ 'IE' => 345,
+ 'Opera' => 1204,
+ 'wget' => 231,
+ 'Safari' => 987,
+ ) );
+
+ $chart->data['sample']->highlight['Safari'] = true;
+
+ $chart->renderer = new ezcGraphRenderer3d();
+
+ $chart->renderer->options->pieChartShadowSize = 10;
+ $chart->renderer->options->pieChartGleam = .5;
+ $chart->renderer->options->dataBorder = false;
+ $chart->renderer->options->pieChartHeight = 16;
+ $chart->renderer->options->legendSymbolGleam = .5;
+
+ $chart->driver = new ezcGraphSvgDriver();
+ $chart->render( 500, 200, $filename );
+
+ $this->compare(
+ $filename,
+ $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg'
+ );
+ }
+
+ public function testRenderLabeledPieChartEz()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.svg';
+
+ $chart = new ezcGraphPieChart();
+ $chart->palette = new ezcGraphPaletteEz();
+ $chart->data['sample'] = new ezcGraphArrayDataSet( array(
+ 'Mozilla' => 4375,
+ 'IE' => 345,
+ 'Opera' => 1204,
+ 'wget' => 231,
+ 'Safari' => 987,
+ ) );
+
+ $chart->data['sample']->highlight['Safari'] = true;
+
+ $chart->renderer = new ezcGraphRenderer3d();
+
+ $chart->renderer->options->pieChartShadowSize = 10;
+ $chart->renderer->options->pieChartGleam = .5;
+ $chart->renderer->options->dataBorder = false;
+ $chart->renderer->options->pieChartHeight = 16;
+ $chart->renderer->options->legendSymbolGleam = .5;
+
+ $chart->driver = new ezcGraphSvgDriver();
+ $chart->render( 500, 200, $filename );
+
+ $this->compare(
+ $filename,
+ $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg'
+ );
+ }
+
public function testRenderLabeledPieSegmentWithGleamAndShadowGD()
{
if ( !ezcBaseFeatures::hasExtensionSupport( 'gd' ) &&
OpenPOWER on IntegriCloud