diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/data/compare/ezcGraphLineChartTest_testLineChartNoLine.svg | 2 | ||||
-rw-r--r-- | tests/line_test.php | 25 |
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/data/compare/ezcGraphLineChartTest_testLineChartNoLine.svg b/tests/data/compare/ezcGraphLineChartTest_testLineChartNoLine.svg new file mode 100644 index 0000000..cab812b --- /dev/null +++ b/tests/data/compare/ezcGraphLineChartTest_testLineChartNoLine.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: #000000; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_2"/><path d=" M 1.5000,1.5000 L 98.5000,1.5000 L 98.5000,198.5000 L 1.5000,198.5000 L 1.5000,1.5000 z " style="fill: none; stroke: #555753; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphPolygon_3"/><ellipse cx="11.0000" cy="11.0000" rx="7.0000" ry="7.0000" 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,176.0000 L 500.0000,180.0000 L 492.0000,184.0000 L 492.0000,176.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,172.0000 L 460.0000,172.0000" 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,172.0000 L 141.0000,172.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,164.0000 L 460.0000,164.0000" 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,164.0000 L 141.0000,164.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,156.0000 L 460.0000,156.0000" 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,156.0000 L 141.0000,156.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,148.0000 L 460.0000,148.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,148.0000 L 143.0000,148.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,140.0000 L 460.0000,140.0000" 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,140.0000 L 141.0000,140.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,132.0000 L 460.0000,132.0000" 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,132.0000 L 141.0000,132.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,124.0000 L 460.0000,124.0000" 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,124.0000 L 141.0000,124.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,116.0000 L 460.0000,116.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,116.0000 L 143.0000,116.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,108.0000 L 460.0000,108.0000" 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,108.0000 L 141.0000,108.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,100.0000 L 460.0000,100.0000" 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,100.0000 L 141.0000,100.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,92.0000 L 460.0000,92.0000" 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,92.0000 L 141.0000,92.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,84.0000 L 460.0000,84.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,84.0000 L 143.0000,84.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,76.0000 L 460.0000,76.0000" 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,76.0000 L 141.0000,76.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,68.0000 L 460.0000,68.0000" 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,68.0000 L 141.0000,68.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,60.0000 L 460.0000,60.0000" 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,60.0000 L 141.0000,60.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,52.0000 L 460.0000,52.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,52.0000 L 143.0000,52.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,44.0000 L 460.0000,44.0000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_59"/><path d=" M 140.0000,44.0000 L 141.0000,44.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_60"/><path d=" M 140.0000,36.0000 L 460.0000,36.0000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_61"/><path d=" M 140.0000,36.0000 L 141.0000,36.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_62"/><path d=" M 140.0000,28.0000 L 460.0000,28.0000" style="fill: none; stroke: #888a85; stroke-width: 1; stroke-opacity: 0.47; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_63"/><path d=" M 140.0000,28.0000 L 141.0000,28.0000" style="fill: none; stroke: #eeeeec; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_64"/><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_65"/><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_66"/><path d=" M 140.0000,40.0000 L 140.0000,40.0000" style="fill: none; stroke: #729fcf; stroke-width: 0; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_68"/><path d=" M 140.0000,40.0000 L 220.0000,168.9600" style="fill: none; stroke: #729fcf; stroke-width: 0; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_69"/><path d=" M 220.0000,168.9600 L 300.0000,141.4720" style="fill: none; stroke: #729fcf; stroke-width: 0; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_70"/><path d=" M 300.0000,141.4720 L 380.0000,172.6080" style="fill: none; stroke: #729fcf; stroke-width: 0; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_71"/><path d=" M 380.0000,172.6080 L 460.0000,148.4160" style="fill: none; stroke: #729fcf; stroke-width: 0; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_72"/><ellipse cx="140.0000" cy="40.0000" rx="3.0000" ry="3.0000" style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_73"/><ellipse cx="220.0000" cy="168.9600" rx="3.0000" ry="3.0000" style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_74"/><ellipse cx="300.0000" cy="141.4720" rx="3.0000" ry="3.0000" style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_75"/><ellipse cx="380.0000" cy="172.6080" rx="3.0000" ry="3.0000" style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_76"/><ellipse cx="460.0000" cy="148.4160" rx="3.0000" ry="3.0000" style="fill: #729fcf; fill-opacity: 1.00; stroke: none;" id="ezcGraphCircle_77"/><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_78"/><text id="ezcGraphTextBox_5_text" x="19.0000" text-length="44.5200px" y="15.9000" style="font-size: 14px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">sample</text></g><g id="ezcGraphTextBox_12"><path d=" M 213.1400,195.0000 L 213.1400,181.5000 L 227.3600,181.5000 L 227.3600,195.0000 L 213.1400,195.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_79"/><text id="ezcGraphTextBox_12_text" x="213.6400" text-length="12.7200px" y="192.2000" style="font-size: 12px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">IE</text></g><g id="ezcGraphTextBox_15"><path d=" M 283.6000,195.0000 L 283.6000,181.5000 L 316.9000,181.5000 L 316.9000,195.0000 L 283.6000,195.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_80"/><text id="ezcGraphTextBox_15_text" x="284.1000" text-length="31.8000px" y="192.2000" style="font-size: 12px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">Opera</text></g><g id="ezcGraphTextBox_18"><path d=" M 366.7800,195.0000 L 366.7800,181.5000 L 393.7200,181.5000 L 393.7200,195.0000 L 366.7800,195.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_81"/><text id="ezcGraphTextBox_18_text" x="367.2800" text-length="25.4400px" y="192.2000" style="font-size: 12px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">wget</text></g><g id="ezcGraphTextBox_21"><path d=" M 440.4200,195.0000 L 440.4200,181.5000 L 480.0800,181.5000 L 480.0800,195.0000 L 440.4200,195.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_82"/><text id="ezcGraphTextBox_21_text" x="440.9200" text-length="38.1600px" y="192.2000" style="font-size: 12px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">Safari</text></g><g id="ezcGraphTextBox_22"><path d=" M 130.0600,179.0000 L 130.0600,165.5000 L 139.0000,165.5000 L 139.0000,179.0000 L 130.0600,179.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_83"/><text id="ezcGraphTextBox_22_text" x="130.5600" text-length="7.4400px" y="176.2000" style="font-size: 12px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">0</text></g><g id="ezcGraphTextBox_31"><path d=" M 107.7400,147.0000 L 107.7400,133.5000 L 139.0000,133.5000 L 139.0000,147.0000 L 107.7400,147.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_84"/><text id="ezcGraphTextBox_31_text" x="108.2400" text-length="29.7600px" y="144.2000" style="font-size: 12px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">1000</text></g><g id="ezcGraphTextBox_40"><path d=" M 107.7400,115.0000 L 107.7400,101.5000 L 139.0000,101.5000 L 139.0000,115.0000 L 107.7400,115.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_85"/><text id="ezcGraphTextBox_40_text" x="108.2400" text-length="29.7600px" y="112.2000" style="font-size: 12px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">2000</text></g><g id="ezcGraphTextBox_49"><path d=" M 107.7400,83.0000 L 107.7400,69.5000 L 139.0000,69.5000 L 139.0000,83.0000 L 107.7400,83.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_86"/><text id="ezcGraphTextBox_49_text" x="108.2400" text-length="29.7600px" y="80.2000" style="font-size: 12px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">3000</text></g><g id="ezcGraphTextBox_58"><path d=" M 107.7400,51.0000 L 107.7400,37.5000 L 139.0000,37.5000 L 139.0000,51.0000 L 107.7400,51.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_87"/><text id="ezcGraphTextBox_58_text" x="108.2400" text-length="29.7600px" y="48.2000" style="font-size: 12px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">4000</text></g><g id="ezcGraphTextBox_67"><path d=" M 107.7400,35.0000 L 107.7400,21.5000 L 139.0000,21.5000 L 139.0000,35.0000 L 107.7400,35.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_88"/><text id="ezcGraphTextBox_67_text" x="108.2400" text-length="29.7600px" y="32.2000" style="font-size: 12px; font-family: sans-serif; fill: #d3d7cf; fill-opacity: 1.00; stroke: none;">5000</text></g></g></svg> diff --git a/tests/line_test.php b/tests/line_test.php index ed3c719..a895da3 100644 --- a/tests/line_test.php +++ b/tests/line_test.php @@ -1018,6 +1018,31 @@ class ezcGraphLineChartTest extends ezcGraphTestCase ); } + public function testLineChartNoLine() + { + $filename = $this->tempDir . __FUNCTION__ . '.svg'; + + $chart = new ezcGraphLineChart(); + $chart->palette = new ezcGraphPaletteBlack(); + $chart->data['sample'] = new ezcGraphArrayDataSet( array( + 'Mozilla' => 4375, + 'IE' => 345, + 'Opera' => 1204, + 'wget' => 231, + 'Safari' => 987, + ) ); + + $chart->options->lineThickness = 0; + + $chart->driver = new ezcGraphSvgDriver(); + $chart->render( 500, 200, $filename ); + + $this->compare( + $filename, + $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg' + ); + } + public function testBarChartDataPointColors() { $filename = $this->tempDir . __FUNCTION__ . '.svg'; |