summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-05-10 07:18:49 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-05-10 07:18:49 +0000
commitbdaa5589b95841eb57240aecc745d0467d877b88 (patch)
tree6b30057d158744b57c8c41f59df3f3da91261dce
parentc264121dbc686aab400539f27b22d61193b05d57 (diff)
downloadzetacomponents-graph-bdaa5589b95841eb57240aecc745d0467d877b88.zip
zetacomponents-graph-bdaa5589b95841eb57240aecc745d0467d877b88.tar.gz
- Added test for rendering pie chart to output
-rw-r--r--tests/data/compare/ezcGraphPieChartTest_testRenderSmallPieChartToOutput.svg2
-rw-r--r--tests/pie_test.php18
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/data/compare/ezcGraphPieChartTest_testRenderSmallPieChartToOutput.svg b/tests/data/compare/ezcGraphPieChartTest_testRenderSmallPieChartToOutput.svg
new file mode 100644
index 0000000..b7689eb
--- /dev/null
+++ b/tests/data/compare/ezcGraphPieChartTest_testRenderSmallPieChartToOutput.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: #eeeeec; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_1"/><path d=" M 0.0000,200.0000 L 0.0000,0.0000 L 100.0000,0.0000 L 100.0000,200.0000 L 0.0000,200.0000 z " style="fill: #000000; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_2"/><path d=" M 2.0000,14.5000 L 2.0000,2.0000 L 14.5000,2.0000 L 14.5000,14.5000 L 2.0000,14.5000 z " style="fill: #4e9a06; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_3"/><path d=" M 2.0000,31.0000 L 2.0000,18.5000 L 14.5000,18.5000 L 14.5000,31.0000 L 2.0000,31.0000 z " style="fill: #cc0000; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_5"/><path d=" M 2.0000,47.5000 L 2.0000,35.0000 L 14.5000,35.0000 L 14.5000,47.5000 L 2.0000,47.5000 z " style="fill: #edd400; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_7"/><path d=" M 2.0000,64.0000 L 2.0000,51.5000 L 14.5000,51.5000 L 14.5000,64.0000 L 2.0000,64.0000 z " style="fill: #75505b; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_9"/><path d=" M 2.0000,80.5000 L 2.0000,68.0000 L 14.5000,68.0000 L 14.5000,80.5000 L 2.0000,80.5000 z " style="fill: #f57900; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_11"/><path d=" M 2.0000,97.0000 L 2.0000,84.5000 L 14.5000,84.5000 L 14.5000,97.0000 L 2.0000,97.0000 z " style="fill: #204a87; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_13"/><path d=" M 2.0000,113.5000 L 2.0000,101.0000 L 14.5000,101.0000 L 14.5000,113.5000 L 2.0000,113.5000 z " style="fill: #c17d11; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_15"/><path d=" M 2.0000,130.0000 L 2.0000,117.5000 L 14.5000,117.5000 L 14.5000,130.0000 L 2.0000,130.0000 z " style="fill: #3465a4; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_17"/><path d=" M 2.0000,146.5000 L 2.0000,134.0000 L 14.5000,134.0000 L 14.5000,146.5000 L 2.0000,146.5000 z " style="fill: #4e9a06; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_19"/><path d=" M 2.0000,163.0000 L 2.0000,150.5000 L 14.5000,150.5000 L 14.5000,163.0000 L 2.0000,163.0000 z " style="fill: #cc0000; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_21"/><path d=" M 2.0000,179.5000 L 2.0000,167.0000 L 14.5000,167.0000 L 14.5000,179.5000 L 2.0000,179.5000 z " style="fill: #edd400; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_23"/><path d=" M 2.0000,196.0000 L 2.0000,183.5000 L 14.5000,183.5000 L 14.5000,196.0000 L 2.0000,196.0000 z " style="fill: #75505b; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_25"/><path d="M 300.00,100.00 L 390.00,100.00 A 90.00,90.00 0 0,1 227.19,152.90 z" style="fill: #4e9a06; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircleSector_27"/><path d="M 300.16,100.50 L 389.50,100.50 A 89.50,89.50 0 0,1 227.89,153.01 z" style="fill: none; stroke: #274d03; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphCircleSector_28"/><path d="M 300.00,100.00 L 227.19,152.90 A 90.00,90.00 0 0,1 210.71,88.72 z" style="fill: #cc0000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircleSector_29"/><path d="M 298.68,100.34 L 227.30,152.20 A 89.50,89.50 0 0,1 211.14,89.28 z" style="fill: none; stroke: #660000; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphCircleSector_30"/><path d="M 300.00,100.00 L 210.71,88.72 A 90.00,90.00 0 0,1 227.19,47.10 z" style="fill: #edd400; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircleSector_31"/><path d="M 298.13,99.26 L 211.27,88.29 A 89.50,89.50 0 0,1 227.30,47.80 z" style="fill: none; stroke: #776a00; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphCircleSector_32"/><path d="M 300.00,100.00 L 227.19,47.10 A 90.00,90.00 0 0,1 261.68,18.57 z" style="fill: #75505b; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircleSector_33"/><path d="M 298.72,98.45 L 227.89,46.99 A 89.50,89.50 0 0,1 261.44,19.23 z" style="fill: none; stroke: #3b282e; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphCircleSector_34"/><path d="M 300.00,100.00 L 261.68,18.57 A 90.00,90.00 0 0,1 283.14,11.59 z" style="fill: #f57900; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircleSector_35"/><path d="M 298.77,96.21 L 262.35,18.81 A 89.50,89.50 0 0,1 282.74,12.18 z" style="fill: none; stroke: #7b3d00; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphCircleSector_36"/><path d="M 300.00,100.00 L 283.14,11.59 A 90.00,90.00 0 0,1 305.65,10.18 z" style="fill: #204a87; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircleSector_37"/><path d="M 299.75,96.02 L 283.72,11.99 A 89.50,89.50 0 0,1 305.12,10.65 z" style="fill: none; stroke: #102544; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphCircleSector_38"/><path d="M 300.00,100.00 L 305.65,10.18 A 90.00,90.00 0 0,1 327.81,14.40 z" style="fill: #c17d11; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircleSector_39"/><path d="M 300.75,96.08 L 306.12,10.71 A 89.50,89.50 0 0,1 327.18,14.73 z" style="fill: none; stroke: #613f09; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphCircleSector_40"/><path d="M 300.00,100.00 L 327.81,14.40 A 90.00,90.00 0 0,1 348.22,24.01 z" style="fill: #3465a4; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircleSector_41"/><path d="M 301.70,96.39 L 328.13,15.03 A 89.50,89.50 0 0,1 347.53,24.16 z" style="fill: none; stroke: #1a3352; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphCircleSector_42"/><path d="M 300.00,100.00 L 348.22,24.01 A 90.00,90.00 0 0,1 365.61,38.39 z" style="fill: #4e9a06; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircleSector_43"/><path d="M 302.54,96.93 L 348.38,24.70 A 89.50,89.50 0 0,1 364.90,38.37 z" style="fill: none; stroke: #274d03; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphCircleSector_44"/><path d="M 300.00,100.00 L 365.61,38.39 A 90.00,90.00 0 0,1 378.87,56.64 z" style="fill: #cc0000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircleSector_45"/><path d="M 303.23,97.66 L 365.58,39.10 A 89.50,89.50 0 0,1 378.19,56.44 z" style="fill: none; stroke: #660000; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphCircleSector_46"/><path d="M 300.00,100.00 L 378.87,56.64 A 90.00,90.00 0 0,1 387.17,77.62 z" style="fill: #edd400; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircleSector_47"/><path d="M 303.71,98.53 L 378.67,57.32 A 89.50,89.50 0 0,1 386.56,77.26 z" style="fill: none; stroke: #776a00; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphCircleSector_48"/><path d="M 300.00,100.00 L 387.17,77.62 A 90.00,90.00 0 0,1 390.00,100.00 z" style="fill: #75505b; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircleSector_49"/><path d="M 303.96,99.50 L 386.81,78.23 A 89.50,89.50 0 0,1 389.50,99.50 z" style="fill: none; stroke: #3b282e; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphCircleSector_50"/><path d=" M 295.8140,33.4649 L 250.4110,10.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_51"/><ellipse cx="295.814" cy="33.4649" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_52"/><ellipse cx="250.411" cy="10" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_53"/><path d=" M 279.3989,36.5962 L 222.5857,30.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_55"/><ellipse cx="279.3989" cy="36.5962" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_56"/><ellipse cx="222.5857" cy="30" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_57"/><path d=" M 257.5051,48.6325 L 207.3975,50.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_59"/><ellipse cx="257.5051" cy="48.6325" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_60"/><ellipse cx="207.3975" cy="50" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_61"/><path d=" M 238.0149,75.4584 L 198.6061,70.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_63"/><ellipse cx="238.0149" cy="75.4584" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_64"/><ellipse cx="198.6061" cy="70" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_65"/><path d=" M 235.4278,116.5793 L 196.9227,124.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_67"/><ellipse cx="235.4278" cy="116.5793" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_68"/><ellipse cx="196.9227" cy="124" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_69"/><path d=" M 312.4921,34.5142 L 349.5890,10.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_71"/><ellipse cx="312.4921" cy="34.5142" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_72"/><ellipse cx="349.589" cy="10" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_73"/><path d=" M 328.3853,39.6782 L 377.4143,30.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_75"/><ellipse cx="328.3853" cy="39.6782" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_76"/><ellipse cx="377.4143" cy="30" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_77"/><path d=" M 342.4949,48.6325 L 392.6025,50.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_79"/><ellipse cx="342.4949" cy="48.6325" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_80"/><ellipse cx="392.6025" cy="50" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_81"/><path d=" M 353.9345,60.8143 L 401.3939,70.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_83"/><ellipse cx="353.9345" cy="60.8143" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_84"/><ellipse cx="401.3939" cy="70" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_85"/><path d=" M 361.9851,75.4584 L 405.4987,90.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_87"/><ellipse cx="361.9851" cy="75.4584" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_88"/><ellipse cx="405.4987" cy="90" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_89"/><path d=" M 366.1410,91.6445 L 405.4987,110.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_91"/><ellipse cx="366.141" cy="91.6445" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_92"/><ellipse cx="405.4987" cy="110" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_93"/><path d=" M 320.6011,163.4038 L 349.5890,190.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_95"/><ellipse cx="320.6011" cy="163.4038" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_96"/><ellipse cx="349.589" cy="190" rx="3" ry="3" style="fill: #000000; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_97"/><g id="ezcGraphTextBox_4"><path d=" M 15.0000,15.5000 L 15.0000,1.5000 L 76.1250,1.5000 L 76.1250,15.5000 L 15.0000,15.5000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_99"/><text id="ezcGraphTextBox_4_text" x="15.5" text-length="59.625px" y="12.625" style="font-size: 12px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Norwegian</text></g><g id="ezcGraphTextBox_6"><path d=" M 15.0000,32.0000 L 15.0000,18.0000 L 49.6250,18.0000 L 49.6250,32.0000 L 15.0000,32.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_100"/><text id="ezcGraphTextBox_6_text" x="15.5" text-length="33.125px" y="29.125" style="font-size: 12px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Dutch</text></g><g id="ezcGraphTextBox_8"><path d=" M 15.0000,48.5000 L 15.0000,34.5000 L 56.2500,34.5000 L 56.2500,48.5000 L 15.0000,48.5000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_101"/><text id="ezcGraphTextBox_8_text" x="15.5" text-length="39.75px" y="45.625" style="font-size: 12px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">German</text></g><g id="ezcGraphTextBox_10"><path d=" M 15.0000,65.0000 L 15.0000,51.0000 L 56.2500,51.0000 L 56.2500,65.0000 L 15.0000,65.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_102"/><text id="ezcGraphTextBox_10_text" x="15.5" text-length="39.75px" y="62.125" style="font-size: 12px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">French</text></g><g id="ezcGraphTextBox_12"><path d=" M 15.0000,81.5000 L 15.0000,67.5000 L 49.6250,67.5000 L 49.6250,81.5000 L 15.0000,81.5000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_103"/><text id="ezcGraphTextBox_12_text" x="15.5" text-length="33.125px" y="78.625" style="font-size: 12px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Hindi</text></g><g id="ezcGraphTextBox_14"><path d=" M 15.0000,98.0000 L 15.0000,84.0000 L 76.1250,84.0000 L 76.1250,98.0000 L 15.0000,98.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_104"/><text id="ezcGraphTextBox_14_text" x="15.5" text-length="59.625px" y="95.125" style="font-size: 12px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Taiwanese</text></g><g id="ezcGraphTextBox_16"><path d=" M 15.0000,114.5000 L 15.0000,100.5000 L 76.1250,100.5000 L 76.1250,114.5000 L 15.0000,114.5000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_105"/><text id="ezcGraphTextBox_16_text" x="15.5" text-length="59.625px" y="111.625" style="font-size: 12px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Brazilian</text></g><g id="ezcGraphTextBox_18"><path d=" M 15.0000,131.0000 L 15.0000,117.0000 L 82.7500,117.0000 L 82.7500,131.0000 L 15.0000,131.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_106"/><text id="ezcGraphTextBox_18_text" x="15.5" text-length="66.25px" y="128.125" style="font-size: 12px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Venezuelan</text></g><g id="ezcGraphTextBox_20"><path d=" M 15.0000,147.5000 L 15.0000,133.5000 L 69.5000,133.5000 L 69.5000,147.5000 L 15.0000,147.5000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_107"/><text id="ezcGraphTextBox_20_text" x="15.5" text-length="53px" y="144.625" style="font-size: 12px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Japanese</text></g><g id="ezcGraphTextBox_22"><path d=" M 15.0000,164.0000 L 15.0000,150.0000 L 49.6250,150.0000 L 49.6250,164.0000 L 15.0000,164.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_108"/><text id="ezcGraphTextBox_22_text" x="15.5" text-length="33.125px" y="161.125" style="font-size: 12px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Czech</text></g><g id="ezcGraphTextBox_24"><path d=" M 15.0000,180.5000 L 15.0000,166.5000 L 76.1250,166.5000 L 76.1250,180.5000 L 15.0000,180.5000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_109"/><text id="ezcGraphTextBox_24_text" x="15.5" text-length="59.625px" y="177.625" style="font-size: 12px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Hungarian</text></g><g id="ezcGraphTextBox_26"><path d=" M 15.0000,197.0000 L 15.0000,183.0000 L 69.5000,183.0000 L 69.5000,197.0000 L 15.0000,197.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_110"/><text id="ezcGraphTextBox_26_text" x="15.5" text-length="53px" y="194.125" style="font-size: 12px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Romanian</text></g><g id="ezcGraphTextBox_54"><path d=" M 153.2810,15.5000 L 153.2810,5.0000 L 245.4110,5.0000 L 245.4110,15.5000 L 153.2810,15.5000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_111"/><text id="ezcGraphTextBox_54_text" x="153.781" text-length="90.63px" y="13.15" style="font-size: 9px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Taiwanese: 1 (4.0%)</text></g><g id="ezcGraphTextBox_58"><path d=" M 144.5357,35.5000 L 144.5357,25.0000 L 217.5857,25.0000 L 217.5857,35.5000 L 144.5357,35.5000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_112"/><text id="ezcGraphTextBox_58_text" x="145.0357" text-length="71.55px" y="33.15" style="font-size: 9px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Hindi: 1 (4.0%)</text></g><g id="ezcGraphTextBox_62"><path d=" M 124.5775,55.5000 L 124.5775,45.0000 L 202.3975,45.0000 L 202.3975,55.5000 L 124.5775,55.5000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_113"/><text id="ezcGraphTextBox_62_text" x="125.0775" text-length="76.32px" y="53.15" style="font-size: 9px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">French: 2 (8.0%)</text></g><g id="ezcGraphTextBox_66"><path d=" M 115.7861,75.5000 L 115.7861,65.0000 L 193.6061,65.0000 L 193.6061,75.5000 L 115.7861,75.5000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_114"/><text id="ezcGraphTextBox_66_text" x="116.2861" text-length="76.32px" y="73.15" style="font-size: 9px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">German: 2 (8.0%)</text></g><g id="ezcGraphTextBox_70"><path d=" M 114.1027,129.5000 L 114.1027,119.0000 L 191.9227,119.0000 L 191.9227,129.5000 L 114.1027,129.5000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_115"/><text id="ezcGraphTextBox_70_text" x="114.6027" text-length="76.32px" y="127.15" style="font-size: 9px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Dutch: 3 (12.0%)</text></g><g id="ezcGraphTextBox_74"><path d=" M 355.0890,15.5000 L 355.0890,5.0000 L 447.2190,5.0000 L 447.2190,15.5000 L 355.0890,15.5000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_116"/><text id="ezcGraphTextBox_74_text" x="355.589" text-length="90.63px" y="13.15" style="font-size: 9px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Brazilian: 1 (4.0%)</text></g><g id="ezcGraphTextBox_78"><path d=" M 382.9143,35.5000 L 382.9143,25.0000 L 479.8143,25.0000 L 479.8143,35.5000 L 382.9143,35.5000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_117"/><text id="ezcGraphTextBox_78_text" x="383.4143" text-length="95.4px" y="33.15" style="font-size: 9px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Venezuelan: 1 (4.0%)</text></g><g id="ezcGraphTextBox_82"><path d=" M 398.1025,55.5000 L 398.1025,45.0000 L 485.4625,45.0000 L 485.4625,55.5000 L 398.1025,55.5000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_118"/><text id="ezcGraphTextBox_82_text" x="398.6025" text-length="85.86px" y="53.15" style="font-size: 9px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Japanese: 1 (4.0%)</text></g><g id="ezcGraphTextBox_86"><path d=" M 406.8939,75.5000 L 406.8939,65.0000 L 479.9439,65.0000 L 479.9439,75.5000 L 406.8939,75.5000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_119"/><text id="ezcGraphTextBox_86_text" x="407.3939" text-length="71.55px" y="73.15" style="font-size: 9px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Czech: 1 (4.0%)</text></g><g id="ezcGraphTextBox_90"><path d=" M 410.9987,100.0500 L 410.9987,80.4500 L 469.7387,80.4500 L 469.7387,100.0500 L 410.9987,100.0500 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_120"/><text id="ezcGraphTextBox_90_text" x="411.4987" text-length="57.24px" y="88.6" style="font-size: 9px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Hungarian: 1</text><text id="ezcGraphTextBox_90_text" x="411.4987" text-length="28.62px" y="98.5" style="font-size: 9px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">(4.0%)</text></g><g id="ezcGraphTextBox_94"><path d=" M 410.9987,115.5000 L 410.9987,105.0000 L 498.3587,105.0000 L 498.3587,115.5000 L 410.9987,115.5000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_121"/><text id="ezcGraphTextBox_94_text" x="411.4987" text-length="85.86px" y="113.15" style="font-size: 9px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Romanian: 1 (4.0%)</text></g><g id="ezcGraphTextBox_98"><path d=" M 355.0890,195.5000 L 355.0890,185.0000 L 456.7590,185.0000 L 456.7590,195.5000 L 355.0890,195.5000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_122"/><text id="ezcGraphTextBox_98_text" x="355.589" text-length="100.17px" y="193.15" style="font-size: 9px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Norwegian: 10 (40.0%)</text></g></g></svg>
diff --git a/tests/pie_test.php b/tests/pie_test.php
index a4aa790..f1debe4 100644
--- a/tests/pie_test.php
+++ b/tests/pie_test.php
@@ -413,6 +413,24 @@ class ezcGraphPieChartTest extends ezcGraphTestCase
);
}
+ public function testRenderSmallPieChartToOutput()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.svg';
+
+ $chart = new ezcGraphPieChart();
+ $chart->data['Skien'] = new ezcGraphArrayDataSet( array( 'Norwegian' => 10, 'Dutch' => 3, 'German' => 2, 'French' => 2, 'Hindi' => 1, 'Taiwanese' => 1, 'Brazilian' => 1, 'Venezuelan' => 1, 'Japanese' => 1, 'Czech' => 1, 'Hungarian' => 1, 'Romanian' => 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 testRenderPieChartWithLotsOfLabels()
{
$filename = $this->tempDir . __FUNCTION__ . '.svg';
OpenPOWER on IntegriCloud