diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2007-01-04 11:02:35 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2007-01-04 11:02:35 +0000 |
commit | 097f99bcb85dc06ddd9c78b20c75cbb3363aa1a6 (patch) | |
tree | 429bace7b2b45c0dea6f044659232e2c220a51ee | |
parent | f1983871f351d2195102760db3141ed70f8772a9 (diff) | |
download | zetacomponents-graph-097f99bcb85dc06ddd9c78b20c75cbb3363aa1a6.zip zetacomponents-graph-097f99bcb85dc06ddd9c78b20c75cbb3363aa1a6.tar.gz |
- Make renderToOutput() method available to chart
-rw-r--r-- | src/charts/line.php | 47 | ||||
-rw-r--r-- | src/charts/pie.php | 47 | ||||
-rw-r--r-- | src/interfaces/chart.php | 10 | ||||
-rw-r--r-- | src/interfaces/renderer.php | 12 | ||||
-rw-r--r-- | tests/data/compare/ezcGraphRenderer2dTest_testRenderLineChartToOutput.svg | 2 | ||||
-rw-r--r-- | tests/data/compare/ezcGraphRenderer3dTest_testRenderLineChartToOutput.svg | 2 | ||||
-rw-r--r-- | tests/renderer_2d_test.php | 20 | ||||
-rw-r--r-- | tests/renderer_3d_test.php | 21 |
8 files changed, 133 insertions, 28 deletions
diff --git a/src/charts/line.php b/src/charts/line.php index 8d2c0ad..83d2c62 100644 --- a/src/charts/line.php +++ b/src/charts/line.php @@ -283,19 +283,7 @@ class ezcGraphLineChart extends ezcGraphChart return ezcGraph::LINE; } - /** - * Render the line chart - * - * Renders the chart into a file or stream. The width and height are - * needed to specify the dimensions of the resulting image. For direct - * output use 'php://stdout' as output file. - * - * @param int $width Image width - * @param int $height Image height - * @param string $file Output file - * @return void - */ - public function render( $width, $height, $file = null ) + protected function renderElements( $width, $height ) { if ( !count( $this->data ) ) { @@ -370,11 +358,44 @@ class ezcGraphLineChart extends ezcGraphChart // Render graph $this->renderData( $this->renderer, $boundings ); + } + + /** + * Render the line chart + * + * Renders the chart into a file or stream. The width and height are + * needed to specify the dimensions of the resulting image. For direct + * output use 'php://stdout' as output file. + * + * @param int $width Image width + * @param int $height Image height + * @param string $file Output file + * @return void + */ + public function render( $width, $height, $file = null ) + { + $this->renderElements( $width, $height ); if ( !empty( $file ) ) { $this->renderer->render( $file ); } } + + /** + * Renders this chart to direct output + * + * Does the same as ezcGraphChart::render(), but renders directly to + * output and not into a file. + * + * @return void + */ + public function renderToOutput( $widht, $height ) + { + // @TODO: merge this function with render an deprecate ommit of third + // argument in render() when API break is possible + $this->renderElements( $widht, $height ); + $this->renderer->render( null ); + } } ?> diff --git a/src/charts/pie.php b/src/charts/pie.php index 371f8dc..12bcc63 100644 --- a/src/charts/pie.php +++ b/src/charts/pie.php @@ -174,19 +174,7 @@ class ezcGraphPieChart extends ezcGraphChart } } - /** - * Render the pie chart - * - * Renders the chart into a file or stream. The width and height are - * needed to specify the dimensions of the resulting image. For direct - * output use 'php://stdout' as output file. - * - * @param int $width Image width - * @param int $height Image height - * @param string $file Output file - * @return void - */ - public function render( $width, $height, $file = null ) + protected function renderElements( $width, $height ) { if ( !count( $this->data ) ) { @@ -226,12 +214,45 @@ class ezcGraphPieChart extends ezcGraphChart // Render graph $this->renderData( $this->renderer, $boundings ); + } + + /** + * Render the pie chart + * + * Renders the chart into a file or stream. The width and height are + * needed to specify the dimensions of the resulting image. For direct + * output use 'php://stdout' as output file. + * + * @param int $width Image width + * @param int $height Image height + * @param string $file Output file + * @return void + */ + public function render( $width, $height, $file = null ) + { + $this->renderElements( $width, $height ); if ( !empty( $file ) ) { $this->renderer->render( $file ); } } + + /** + * Renders this chart to direct output + * + * Does the same as ezcGraphChart::render(), but renders directly to + * output and not into a file. + * + * @return void + */ + public function renderToOutput( $widht, $height ) + { + // @TODO: merge this function with render an deprecate ommit of third + // argument in render() when API break is possible + $this->renderElements( $widht, $height ); + $this->renderer->render( null ); + } } ?> diff --git a/src/interfaces/chart.php b/src/interfaces/chart.php index d33c086..c08dad1 100644 --- a/src/interfaces/chart.php +++ b/src/interfaces/chart.php @@ -257,6 +257,16 @@ abstract class ezcGraphChart * @return void */ abstract public function render( $widht, $height, $file = null ); + + /** + * Renders this chart to direct output + * + * Does the same as ezcGraphChart::render(), but renders directly to + * output and not into a file. + * + * @return void + */ + abstract public function renderToOutput( $widht, $height ); } ?> diff --git a/src/interfaces/renderer.php b/src/interfaces/renderer.php index 1e1d2fc..f1103f2 100644 --- a/src/interfaces/renderer.php +++ b/src/interfaces/renderer.php @@ -530,10 +530,18 @@ abstract class ezcGraphRenderer * @param string $file Filename of destination file * @return void */ - public function render( $file ) + public function render( $file = null ) { $this->finish(); - $this->driver->render( $file ); + + if ( $file === null ) + { + $this->driver->renderToOutput(); + } + else + { + $this->driver->render( $file ); + } } } ?> diff --git a/tests/data/compare/ezcGraphRenderer2dTest_testRenderLineChartToOutput.svg b/tests/data/compare/ezcGraphRenderer2dTest_testRenderLineChartToOutput.svg new file mode 100644 index 0000000..607df52 --- /dev/null +++ b/tests/data/compare/ezcGraphRenderer2dTest_testRenderLineChartToOutput.svg @@ -0,0 +1,2 @@ +<?xml version="1.0"?> +<svg xmlns="http://www.w3.org/2000/svg" width="500" height="200" version="1.0" id="ezcGraph"><defs/><g id="ezcGraphChart" color-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="optimizeLegibility"><path d=" M 0.0000,200.0000 L 0.0000,0.0000 L 500.0000,0.0000 L 500.0000,200.0000 L 0.0000,200.0000 z " style="fill: #2e3436; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_1"/><path d=" M 1.0000,199.0000 L 1.0000,1.0000 L 99.0000,1.0000 L 99.0000,199.0000 L 1.0000,199.0000 z " style="fill: none; stroke: #555753; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_2"/><path d=" M 2.0000,198.0000 L 2.0000,2.0000 L 98.0000,2.0000 L 98.0000,198.0000 L 2.0000,198.0000 z " style="fill: #000000; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_3"/><ellipse cx="11" cy="11" rx="7" ry="7" style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_4"/><path d=" M 100.0000,180.0000 L 500.0000,180.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_6"/><path d=" M 492.0000,184.0000 L 500.0000,180.0000 L 492.0000,176.0000 L 492.0000,184.0000 z " style="fill: #eeeeec; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_7"/><path d=" M 140.0000,200.0000 L 140.0000,0.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_8"/><path d=" M 137.5000,5.0000 L 140.0000,0.0000 L 142.5000,5.0000 L 137.5000,5.0000 z " style="fill: #eeeeec; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_9"/><path d=" M 220.0000,20.0000 L 220.0000,180.0000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_10"/><path d=" M 220.0000,177.0000 L 220.0000,180.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_11"/><path d=" M 300.0000,20.0000 L 300.0000,180.0000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_13"/><path d=" M 300.0000,177.0000 L 300.0000,180.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_14"/><path d=" M 380.0000,20.0000 L 380.0000,180.0000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_16"/><path d=" M 380.0000,177.0000 L 380.0000,180.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_17"/><path d=" M 460.0000,20.0000 L 460.0000,180.0000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_19"/><path d=" M 460.0000,177.0000 L 460.0000,180.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_20"/><path d=" M 140.0000,170.4000 L 460.0000,170.4000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_23"/><path d=" M 140.0000,170.0000 L 141.0000,170.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_24"/><path d=" M 140.0000,160.8000 L 460.0000,159.2000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_25"/><path d=" M 140.0000,160.0000 L 141.0000,160.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_26"/><path d=" M 140.0000,149.6000 L 460.0000,149.6000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_27"/><path d=" M 140.0000,150.0000 L 141.0000,150.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_28"/><path d=" M 140.0000,140.0000 L 460.0000,140.0000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_29"/><path d=" M 140.0000,140.0000 L 143.0000,140.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_30"/><path d=" M 140.0000,130.4000 L 460.0000,130.4000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_32"/><path d=" M 140.0000,130.0000 L 141.0000,130.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_33"/><path d=" M 140.0000,120.8000 L 460.0000,119.2000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_34"/><path d=" M 140.0000,120.0000 L 141.0000,120.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_35"/><path d=" M 140.0000,109.6000 L 460.0000,109.6000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_36"/><path d=" M 140.0000,110.0000 L 141.0000,110.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_37"/><path d=" M 140.0000,100.0000 L 460.0000,100.0000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_38"/><path d=" M 140.0000,100.0000 L 143.0000,100.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_39"/><path d=" M 140.0000,90.4000 L 460.0000,90.4000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_41"/><path d=" M 140.0000,90.0000 L 141.0000,90.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_42"/><path d=" M 140.0000,80.8000 L 460.0000,79.2000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_43"/><path d=" M 140.0000,80.0000 L 141.0000,80.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_44"/><path d=" M 140.0000,69.6000 L 460.0000,69.6000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_45"/><path d=" M 140.0000,70.0000 L 141.0000,70.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_46"/><path d=" M 140.0000,60.0000 L 460.0000,60.0000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_47"/><path d=" M 140.0000,60.0000 L 143.0000,60.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_48"/><path d=" M 140.0000,50.4000 L 460.0000,50.4000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_50"/><path d=" M 140.0000,50.0000 L 141.0000,50.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_51"/><path d=" M 140.0000,40.8000 L 460.0000,39.2000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_52"/><path d=" M 140.0000,40.0000 L 141.0000,40.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_53"/><path d=" M 140.0000,29.6000 L 460.0000,29.6000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_54"/><path d=" M 140.0000,30.0000 L 141.0000,30.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_55"/><path d=" M 140.0000,20.0000 L 460.0000,20.0000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_56"/><path d=" M 140.0000,20.0000 L 143.0000,20.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_57"/><path d=" M 140.0000,86.4000 L 140.0000,86.4000" style="fill: none; stroke: #729fcf; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_59"/><path d=" M 140.0000,86.4000 L 220.0000,171.6000" style="fill: none; stroke: #729fcf; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_60"/><path d=" M 220.0000,171.6000 L 300.0000,50.4000" style="fill: none; stroke: #729fcf; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_61"/><path d=" M 300.0000,50.4000 L 380.0000,132.0000" style="fill: none; stroke: #729fcf; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_62"/><path d=" M 380.0000,132.0000 L 460.0000,179.6000" style="fill: none; stroke: #729fcf; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_63"/><ellipse cx="140" cy="86.4" rx="3" ry="3" style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_64"/><ellipse cx="220" cy="171.6" rx="3" ry="3" style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_65"/><ellipse cx="300" cy="50.4" rx="3" ry="3" style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_66"/><ellipse cx="380" cy="132" rx="3" ry="3" style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_67"/><ellipse cx="460" cy="179.6" rx="3" ry="3" style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_68"/><g id="ezcGraphTextBox_5"><path d=" M 18.5000,19.0000 L 18.5000,3.5000 L 64.5200,3.5000 L 64.5200,19.0000 L 18.5000,19.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_69"/><text id="ezcGraphTextBox_5_text" x="19" text-length="44.52px" y="15.9" style="font-size: 14px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">Line 1</text></g><g id="ezcGraphTextBox_12"><path d=" M 185.5800,199.0000 L 185.5800,181.5000 L 254.9200,181.5000 L 254.9200,199.0000 L 185.5800,199.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_70"/><text id="ezcGraphTextBox_12_text" x="186.08" text-length="67.84px" y="195.6" style="font-size: 16px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">sample 2</text></g><g id="ezcGraphTextBox_15"><path d=" M 265.5800,199.0000 L 265.5800,181.5000 L 334.9200,181.5000 L 334.9200,199.0000 L 265.5800,199.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_71"/><text id="ezcGraphTextBox_15_text" x="266.08" text-length="67.84px" y="195.6" style="font-size: 16px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">sample 3</text></g><g id="ezcGraphTextBox_18"><path d=" M 345.5800,199.0000 L 345.5800,181.5000 L 414.9200,181.5000 L 414.9200,199.0000 L 345.5800,199.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_72"/><text id="ezcGraphTextBox_18_text" x="346.08" text-length="67.84px" y="195.6" style="font-size: 16px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">sample 4</text></g><g id="ezcGraphTextBox_21"><path d=" M 425.5800,199.0000 L 425.5800,181.5000 L 494.9200,181.5000 L 494.9200,199.0000 L 425.5800,199.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_73"/><text id="ezcGraphTextBox_21_text" x="426.08" text-length="67.84px" y="195.6" style="font-size: 16px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">sample 5</text></g><g id="ezcGraphTextBox_22"><path d=" M 127.5800,179.0000 L 127.5800,161.5000 L 139.0000,161.5000 L 139.0000,179.0000 L 127.5800,179.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_74"/><text id="ezcGraphTextBox_22_text" x="128.08" text-length="9.92px" y="175.6" style="font-size: 16px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">0</text></g><g id="ezcGraphTextBox_31"><path d=" M 107.7400,139.0000 L 107.7400,121.5000 L 139.0000,121.5000 L 139.0000,139.0000 L 107.7400,139.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_75"/><text id="ezcGraphTextBox_31_text" x="108.24" text-length="29.76px" y="135.6" style="font-size: 16px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">100</text></g><g id="ezcGraphTextBox_40"><path d=" M 107.7400,99.0000 L 107.7400,81.5000 L 139.0000,81.5000 L 139.0000,99.0000 L 107.7400,99.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_76"/><text id="ezcGraphTextBox_40_text" x="108.24" text-length="29.76px" y="95.6" style="font-size: 16px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">200</text></g><g id="ezcGraphTextBox_49"><path d=" M 107.7400,59.0000 L 107.7400,41.5000 L 139.0000,41.5000 L 139.0000,59.0000 L 107.7400,59.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_77"/><text id="ezcGraphTextBox_49_text" x="108.24" text-length="29.76px" y="55.6" style="font-size: 16px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">300</text></g><g id="ezcGraphTextBox_58"><path d=" M 107.7400,39.0000 L 107.7400,21.5000 L 139.0000,21.5000 L 139.0000,39.0000 L 107.7400,39.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_78"/><text id="ezcGraphTextBox_58_text" x="108.24" text-length="29.76px" y="35.6" style="font-size: 16px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">400</text></g></g></svg> diff --git a/tests/data/compare/ezcGraphRenderer3dTest_testRenderLineChartToOutput.svg b/tests/data/compare/ezcGraphRenderer3dTest_testRenderLineChartToOutput.svg new file mode 100644 index 0000000..21aab5f --- /dev/null +++ b/tests/data/compare/ezcGraphRenderer3dTest_testRenderLineChartToOutput.svg @@ -0,0 +1,2 @@ +<?xml version="1.0"?> +<svg xmlns="http://www.w3.org/2000/svg" width="500" height="200" version="1.0" id="ezcGraph"><defs/><g id="ezcGraphChart" color-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="optimizeLegibility"><path d=" M 0.0000,200.0000 L 0.0000,0.0000 L 500.0000,0.0000 L 500.0000,200.0000 L 0.0000,200.0000 z " style="fill: #2e3436; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_1"/><path d=" M 1.0000,199.0000 L 1.0000,1.0000 L 99.0000,1.0000 L 99.0000,199.0000 L 1.0000,199.0000 z " style="fill: none; stroke: #555753; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_2"/><path d=" M 2.0000,198.0000 L 2.0000,2.0000 L 98.0000,2.0000 L 98.0000,198.0000 L 2.0000,198.0000 z " style="fill: #000000; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_3"/><ellipse cx="11" cy="11" rx="7" ry="7" style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_4"/><path d=" M 100.0000,182.0000 L 120.0000,162.0000 L 500.0000,162.0000 L 480.0000,182.0000 L 100.0000,182.0000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_6"/><path d=" M 120.0000,162.0000 L 500.0000,162.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_7"/><path d=" M 492.0000,166.0000 L 500.0000,162.0000 L 492.0000,158.0000 L 492.0000,166.0000 z " style="fill: #eeeeec; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_8"/><path d=" M 138.0000,200.0000 L 158.0000,180.0000 L 158.0000,0.0000 L 138.0000,20.0000 L 138.0000,200.0000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_9"/><path d=" M 158.0000,180.0000 L 158.0000,0.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_10"/><path d=" M 155.5000,5.0000 L 158.0000,0.0000 L 160.5000,5.0000 L 155.5000,5.0000 z " style="fill: #eeeeec; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_11"/><path d=" M 234.0000,162.0000 L 234.0000,18.0000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_12"/><path d=" M 214.0000,179.3000 L 234.0000,159.3000 L 234.0000,162.0000 L 214.0000,182.0000 L 214.0000,179.3000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_13"/><path d=" M 214.0000,179.3000 L 234.0000,159.3000 L 234.0000,162.0000 L 214.0000,182.0000 L 214.0000,179.3000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_14"/><path d=" M 310.0000,162.0000 L 310.0000,18.0000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_16"/><path d=" M 290.0000,179.3000 L 310.0000,159.3000 L 310.0000,162.0000 L 290.0000,182.0000 L 290.0000,179.3000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_17"/><path d=" M 290.0000,179.3000 L 310.0000,159.3000 L 310.0000,162.0000 L 290.0000,182.0000 L 290.0000,179.3000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_18"/><path d=" M 386.0000,162.0000 L 386.0000,18.0000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_20"/><path d=" M 366.0000,179.3000 L 386.0000,159.3000 L 386.0000,162.0000 L 366.0000,182.0000 L 366.0000,179.3000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_21"/><path d=" M 366.0000,179.3000 L 386.0000,159.3000 L 386.0000,162.0000 L 366.0000,182.0000 L 366.0000,179.3000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_22"/><path d=" M 462.0000,162.0000 L 462.0000,18.0000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_24"/><path d=" M 442.0000,179.3000 L 462.0000,159.3000 L 462.0000,162.0000 L 442.0000,182.0000 L 442.0000,179.3000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_25"/><path d=" M 442.0000,179.3000 L 462.0000,159.3000 L 462.0000,162.0000 L 442.0000,182.0000 L 442.0000,179.3000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_26"/><path d=" M 462.0000,153.3600 L 158.0000,153.3600" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_29"/><path d=" M 138.0000,173.0000 L 158.0000,153.0000 L 158.9500,153.0000 L 138.9500,173.0000 L 138.0000,173.0000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_30"/><path d=" M 138.0000,173.0000 L 158.0000,153.0000 L 158.9500,153.0000 L 138.9500,173.0000 L 138.0000,173.0000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_31"/><path d=" M 462.0000,143.2800 L 158.0000,144.7200" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_32"/><path d=" M 138.0000,164.0000 L 158.0000,144.0000 L 158.9500,144.0000 L 138.9500,164.0000 L 138.0000,164.0000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_33"/><path d=" M 138.0000,164.0000 L 158.0000,144.0000 L 158.9500,144.0000 L 138.9500,164.0000 L 138.0000,164.0000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_34"/><path d=" M 462.0000,134.6400 L 158.0000,134.6400" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_35"/><path d=" M 138.0000,155.0000 L 158.0000,135.0000 L 158.9500,135.0000 L 138.9500,155.0000 L 138.0000,155.0000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_36"/><path d=" M 138.0000,155.0000 L 158.0000,135.0000 L 158.9500,135.0000 L 138.9500,155.0000 L 138.0000,155.0000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_37"/><path d=" M 462.0000,126.0000 L 158.0000,126.0000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_38"/><path d=" M 138.0000,146.0000 L 158.0000,126.0000 L 160.8500,126.0000 L 140.8500,146.0000 L 138.0000,146.0000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_39"/><path d=" M 138.0000,146.0000 L 158.0000,126.0000 L 160.8500,126.0000 L 140.8500,146.0000 L 138.0000,146.0000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_40"/><path d=" M 462.0000,117.3600 L 158.0000,117.3600" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_42"/><path d=" M 138.0000,137.0000 L 158.0000,117.0000 L 158.9500,117.0000 L 138.9500,137.0000 L 138.0000,137.0000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_43"/><path d=" M 138.0000,137.0000 L 158.0000,117.0000 L 158.9500,117.0000 L 138.9500,137.0000 L 138.0000,137.0000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_44"/><path d=" M 462.0000,107.2800 L 158.0000,108.7200" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_45"/><path d=" M 138.0000,128.0000 L 158.0000,108.0000 L 158.9500,108.0000 L 138.9500,128.0000 L 138.0000,128.0000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_46"/><path d=" M 138.0000,128.0000 L 158.0000,108.0000 L 158.9500,108.0000 L 138.9500,128.0000 L 138.0000,128.0000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_47"/><path d=" M 462.0000,98.6400 L 158.0000,98.6400" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_48"/><path d=" M 138.0000,119.0000 L 158.0000,99.0000 L 158.9500,99.0000 L 138.9500,119.0000 L 138.0000,119.0000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_49"/><path d=" M 138.0000,119.0000 L 158.0000,99.0000 L 158.9500,99.0000 L 138.9500,119.0000 L 138.0000,119.0000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_50"/><path d=" M 462.0000,90.0000 L 158.0000,90.0000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_51"/><path d=" M 138.0000,110.0000 L 158.0000,90.0000 L 160.8500,90.0000 L 140.8500,110.0000 L 138.0000,110.0000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_52"/><path d=" M 138.0000,110.0000 L 158.0000,90.0000 L 160.8500,90.0000 L 140.8500,110.0000 L 138.0000,110.0000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_53"/><path d=" M 462.0000,81.3600 L 158.0000,81.3600" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_55"/><path d=" M 138.0000,101.0000 L 158.0000,81.0000 L 158.9500,81.0000 L 138.9500,101.0000 L 138.0000,101.0000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_56"/><path d=" M 138.0000,101.0000 L 158.0000,81.0000 L 158.9500,81.0000 L 138.9500,101.0000 L 138.0000,101.0000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_57"/><path d=" M 462.0000,71.2800 L 158.0000,72.7200" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_58"/><path d=" M 138.0000,92.0000 L 158.0000,72.0000 L 158.9500,72.0000 L 138.9500,92.0000 L 138.0000,92.0000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_59"/><path d=" M 138.0000,92.0000 L 158.0000,72.0000 L 158.9500,72.0000 L 138.9500,92.0000 L 138.0000,92.0000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_60"/><path d=" M 462.0000,62.6400 L 158.0000,62.6400" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_61"/><path d=" M 138.0000,83.0000 L 158.0000,63.0000 L 158.9500,63.0000 L 138.9500,83.0000 L 138.0000,83.0000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_62"/><path d=" M 138.0000,83.0000 L 158.0000,63.0000 L 158.9500,63.0000 L 138.9500,83.0000 L 138.0000,83.0000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_63"/><path d=" M 462.0000,54.0000 L 158.0000,54.0000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_64"/><path d=" M 138.0000,74.0000 L 158.0000,54.0000 L 160.8500,54.0000 L 140.8500,74.0000 L 138.0000,74.0000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_65"/><path d=" M 138.0000,74.0000 L 158.0000,54.0000 L 160.8500,54.0000 L 140.8500,74.0000 L 138.0000,74.0000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_66"/><path d=" M 462.0000,45.3600 L 158.0000,45.3600" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_68"/><path d=" M 138.0000,65.0000 L 158.0000,45.0000 L 158.9500,45.0000 L 138.9500,65.0000 L 138.0000,65.0000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_69"/><path d=" M 138.0000,65.0000 L 158.0000,45.0000 L 158.9500,45.0000 L 138.9500,65.0000 L 138.0000,65.0000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_70"/><path d=" M 462.0000,35.2800 L 158.0000,36.7200" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_71"/><path d=" M 138.0000,56.0000 L 158.0000,36.0000 L 158.9500,36.0000 L 138.9500,56.0000 L 138.0000,56.0000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_72"/><path d=" M 138.0000,56.0000 L 158.0000,36.0000 L 158.9500,36.0000 L 138.9500,56.0000 L 138.0000,56.0000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_73"/><path d=" M 462.0000,26.6400 L 158.0000,26.6400" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_74"/><path d=" M 138.0000,47.0000 L 158.0000,27.0000 L 158.9500,27.0000 L 138.9500,47.0000 L 138.0000,47.0000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_75"/><path d=" M 138.0000,47.0000 L 158.0000,27.0000 L 158.9500,27.0000 L 138.9500,47.0000 L 138.0000,47.0000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_76"/><path d=" M 462.0000,18.0000 L 158.0000,18.0000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_77"/><path d=" M 138.0000,38.0000 L 158.0000,18.0000 L 160.8500,18.0000 L 140.8500,38.0000 L 138.0000,38.0000 z " style="fill: #eeeeec; fill-opacity: 0.20; stroke: none;" id="ezcGraphPolygon_78"/><path d=" M 138.0000,38.0000 L 158.0000,18.0000 L 160.8500,18.0000 L 140.8500,38.0000 L 138.0000,38.0000 z " style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_79"/><path d=" M 158.0000,77.7600 L 138.0000,97.7600 L 138.0000,97.7600 L 158.0000,77.7600 L 158.0000,77.7600 z " style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_81"/><path d=" M 158.0000,77.7600 L 138.0000,97.7600 L 138.0000,97.7600 L 158.0000,77.7600 L 158.0000,77.7600 z " style="fill: none; stroke: #395068; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_82"/><path d=" M 158.0000,77.7600 L 138.0000,97.7600 L 214.0000,174.4400 L 234.0000,154.4400 L 158.0000,77.7600 z " style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_83"/><path d=" M 158.0000,77.7600 L 138.0000,97.7600 L 214.0000,174.4400 L 234.0000,154.4400 L 158.0000,77.7600 z " style="fill: none; stroke: #395068; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_84"/><path d=" M 234.0000,154.4400 L 214.0000,174.4400 L 290.0000,65.3600 L 310.0000,45.3600 L 234.0000,154.4400 z " style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_85"/><path d=" M 234.0000,154.4400 L 214.0000,174.4400 L 290.0000,65.3600 L 310.0000,45.3600 L 234.0000,154.4400 z " style="fill: none; stroke: #395068; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_86"/><path d=" M 310.0000,45.3600 L 290.0000,65.3600 L 366.0000,138.8000 L 386.0000,118.8000 L 310.0000,45.3600 z " style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_87"/><path d=" M 310.0000,45.3600 L 290.0000,65.3600 L 366.0000,138.8000 L 386.0000,118.8000 L 310.0000,45.3600 z " style="fill: none; stroke: #395068; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_88"/><path d=" M 386.0000,118.8000 L 366.0000,138.8000 L 442.0000,181.6400 L 462.0000,161.6400 L 386.0000,118.8000 z " style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_89"/><path d=" M 386.0000,118.8000 L 366.0000,138.8000 L 442.0000,181.6400 L 462.0000,161.6400 L 386.0000,118.8000 z " style="fill: none; stroke: #395068; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_90"/><ellipse cx="158" cy="77.76" rx="3" ry="3" style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_91"/><ellipse cx="234" cy="154.44" rx="3" ry="3" style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_92"/><ellipse cx="310" cy="45.36" rx="3" ry="3" style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_93"/><ellipse cx="386" cy="118.8" rx="3" ry="3" style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_94"/><ellipse cx="462" cy="161.64" rx="3" ry="3" style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_95"/><path d=" M 500.0000,162.0000 L 480.0000,182.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_96"/><path d=" M 480.0000,182.0000 L 100.0000,182.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_97"/><path d=" M 100.0000,182.0000 L 120.0000,162.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_98"/><path d=" M 158.0000,0.0000 L 138.0000,20.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_99"/><path d=" M 138.0000,20.0000 L 138.0000,200.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_100"/><path d=" M 138.0000,200.0000 L 158.0000,180.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_101"/><g id="ezcGraphTextBox_5"><path d=" M 18.5000,19.0000 L 18.5000,3.5000 L 64.5200,3.5000 L 64.5200,19.0000 L 18.5000,19.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_102"/><text id="ezcGraphTextBox_5_text" x="19" text-length="44.52px" y="15.9" style="font-size: 14px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">Line 1</text></g><g id="ezcGraphTextBox_15"><path d=" M 182.9720,199.2000 L 182.9720,183.3000 L 245.5280,183.3000 L 245.5280,199.2000 L 182.9720,199.2000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_103"/><text id="ezcGraphTextBox_15_text" x="183.472" text-length="61.056px" y="196.04" style="font-size: 14px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">sample 2</text></g><g id="ezcGraphTextBox_19"><path d=" M 258.9720,199.2000 L 258.9720,183.3000 L 321.5280,183.3000 L 321.5280,199.2000 L 258.9720,199.2000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_104"/><text id="ezcGraphTextBox_19_text" x="259.472" text-length="61.056px" y="196.04" style="font-size: 14px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">sample 3</text></g><g id="ezcGraphTextBox_23"><path d=" M 334.9720,199.2000 L 334.9720,183.3000 L 397.5280,183.3000 L 397.5280,199.2000 L 334.9720,199.2000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_105"/><text id="ezcGraphTextBox_23_text" x="335.472" text-length="61.056px" y="196.04" style="font-size: 14px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">sample 4</text></g><g id="ezcGraphTextBox_27"><path d=" M 410.9720,199.2000 L 410.9720,183.3000 L 473.5280,183.3000 L 473.5280,199.2000 L 410.9720,199.2000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_106"/><text id="ezcGraphTextBox_27_text" x="411.472" text-length="61.056px" y="196.04" style="font-size: 14px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">sample 5</text></g><g id="ezcGraphTextBox_28"><path d=" M 126.6720,181.2000 L 126.6720,165.3000 L 137.1000,165.3000 L 137.1000,181.2000 L 126.6720,181.2000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_107"/><text id="ezcGraphTextBox_28_text" x="127.172" text-length="8.928px" y="178.04" style="font-size: 14px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">0</text></g><g id="ezcGraphTextBox_41"><path d=" M 108.8160,145.2000 L 108.8160,129.3000 L 137.1000,129.3000 L 137.1000,145.2000 L 108.8160,145.2000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_108"/><text id="ezcGraphTextBox_41_text" x="109.316" text-length="26.784px" y="142.04" style="font-size: 14px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">100</text></g><g id="ezcGraphTextBox_54"><path d=" M 108.8160,109.2000 L 108.8160,93.3000 L 137.1000,93.3000 L 137.1000,109.2000 L 108.8160,109.2000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_109"/><text id="ezcGraphTextBox_54_text" x="109.316" text-length="26.784px" y="106.04" style="font-size: 14px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">200</text></g><g id="ezcGraphTextBox_67"><path d=" M 108.8160,73.2000 L 108.8160,57.3000 L 137.1000,57.3000 L 137.1000,73.2000 L 108.8160,73.2000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_110"/><text id="ezcGraphTextBox_67_text" x="109.316" text-length="26.784px" y="70.04" style="font-size: 14px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">300</text></g><g id="ezcGraphTextBox_80"><path d=" M 108.8160,55.2000 L 108.8160,39.3000 L 137.1000,39.3000 L 137.1000,55.2000 L 108.8160,55.2000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_111"/><text id="ezcGraphTextBox_80_text" x="109.316" text-length="26.784px" y="52.04" style="font-size: 14px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">400</text></g></g></svg> diff --git a/tests/renderer_2d_test.php b/tests/renderer_2d_test.php index 0773d3b..b8bb9ec 100644 --- a/tests/renderer_2d_test.php +++ b/tests/renderer_2d_test.php @@ -1530,6 +1530,26 @@ class ezcGraphRenderer2dTest extends ezcGraphTestCase ); } + public function testRenderLineChartToOutput() + { + $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) ); + + ob_start(); + // Suppress header already sent warning + @$chart->renderToOutput( 500, 200 ); + file_put_contents( $filename, ob_get_clean() ); + + $this->compare( + $filename, + $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg' + ); + } + public function testRenderLineChart() { $filename = $this->tempDir . __FUNCTION__ . '.svg'; diff --git a/tests/renderer_3d_test.php b/tests/renderer_3d_test.php index eae4b31..c02dc89 100644 --- a/tests/renderer_3d_test.php +++ b/tests/renderer_3d_test.php @@ -292,6 +292,27 @@ class ezcGraphRenderer3dTest extends ezcGraphTestCase ); } + public function testRenderLineChartToOutput() + { + $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->renderer = new ezcGraphRenderer3d(); + + ob_start(); + // Suppress header already sent warning + @$chart->renderToOutput( 500, 200 ); + file_put_contents( $filename, ob_get_clean() ); + + $this->compare( + $filename, + $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg' + ); + } + public function testRenderLabeledPieSegment() { $filename = $this->tempDir . __FUNCTION__ . '.svg'; |