summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-01-03 10:24:05 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-01-03 10:24:05 +0000
commit14aef064149236b6190859b165bb431a4a4802b4 (patch)
tree8c122ddc14967c76a5e8fcca8abc355dd2e53170 /tests
parent3d159bca6c8d9f22203edabd416d30004dca02c5 (diff)
downloadzetacomponents-graph-14aef064149236b6190859b165bb431a4a4802b4.zip
zetacomponents-graph-14aef064149236b6190859b165bb431a4a4802b4.tar.gz
- Fixed: Bug #9926 (Float values with date axis result in date parsing
exception)
Diffstat (limited to 'tests')
-rw-r--r--tests/data/compare/ezcGraphDateAxisTest_testFloatDataSetKeys.svg2
-rw-r--r--tests/date_axis_test.php20
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/data/compare/ezcGraphDateAxisTest_testFloatDataSetKeys.svg b/tests/data/compare/ezcGraphDateAxisTest_testFloatDataSetKeys.svg
new file mode 100644
index 0000000..4d0f75b
--- /dev/null
+++ b/tests/data/compare/ezcGraphDateAxisTest_testFloatDataSetKeys.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,9.0000 L 9.0000,2.0000 L 16.0000,9.0000 L 9.0000,16.0000 L 2.0000,9.0000 z " style="fill: #3465a4; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_3"/><path d=" M 100.0000,180.0000 L 500.0000,180.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_5"/><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: #2e3436; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_6"/><path d=" M 140.0000,200.0000 L 140.0000,0.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_7"/><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: #2e3436; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_8"/><path d=" M 194.4000,20.0000 L 194.4000,180.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_10"/><path d=" M 193.3333,177.0000 L 193.3333,180.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_11"/><path d=" M 245.6000,20.0000 L 245.6000,180.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_13"/><path d=" M 246.6667,177.0000 L 246.6667,180.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_14"/><path d=" M 300.0000,20.0000 L 300.0000,180.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_16"/><path d=" M 300.0000,177.0000 L 300.0000,180.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_17"/><path d=" M 354.4000,20.0000 L 354.4000,180.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_19"/><path d=" M 353.3333,177.0000 L 353.3333,180.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_20"/><path d=" M 405.6000,20.0000 L 405.6000,180.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_22"/><path d=" M 406.6667,177.0000 L 406.6667,180.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_23"/><path d=" M 460.0000,20.0000 L 460.0000,180.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_25"/><path d=" M 460.0000,177.0000 L 460.0000,180.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_26"/><path d=" M 140.0000,170.4000 L 460.0000,170.4000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_29"/><path d=" M 140.0000,170.0000 L 141.0000,170.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_30"/><path d=" M 140.0000,160.8000 L 460.0000,159.2000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_31"/><path d=" M 140.0000,160.0000 L 141.0000,160.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_32"/><path d=" M 140.0000,149.6000 L 460.0000,149.6000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_33"/><path d=" M 140.0000,150.0000 L 141.0000,150.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_34"/><path d=" M 140.0000,140.0000 L 460.0000,140.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_35"/><path d=" M 140.0000,140.0000 L 143.0000,140.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_36"/><path d=" M 140.0000,130.4000 L 460.0000,130.4000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_38"/><path d=" M 140.0000,130.0000 L 141.0000,130.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_39"/><path d=" M 140.0000,120.8000 L 460.0000,119.2000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_40"/><path d=" M 140.0000,120.0000 L 141.0000,120.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_41"/><path d=" M 140.0000,109.6000 L 460.0000,109.6000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_42"/><path d=" M 140.0000,110.0000 L 141.0000,110.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_43"/><path d=" M 140.0000,100.0000 L 460.0000,100.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_44"/><path d=" M 140.0000,100.0000 L 143.0000,100.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_45"/><path d=" M 140.0000,90.4000 L 460.0000,90.4000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_47"/><path d=" M 140.0000,90.0000 L 141.0000,90.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_48"/><path d=" M 140.0000,80.8000 L 460.0000,79.2000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_49"/><path d=" M 140.0000,80.0000 L 141.0000,80.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_50"/><path d=" M 140.0000,69.6000 L 460.0000,69.6000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_51"/><path d=" M 140.0000,70.0000 L 141.0000,70.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_52"/><path d=" M 140.0000,60.0000 L 460.0000,60.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_53"/><path d=" M 140.0000,60.0000 L 143.0000,60.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_54"/><path d=" M 140.0000,50.4000 L 460.0000,50.4000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_56"/><path d=" M 140.0000,50.0000 L 141.0000,50.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_57"/><path d=" M 140.0000,40.8000 L 460.0000,39.2000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_58"/><path d=" M 140.0000,40.0000 L 141.0000,40.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_59"/><path d=" M 140.0000,29.6000 L 460.0000,29.6000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_60"/><path d=" M 140.0000,30.0000 L 141.0000,30.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_61"/><path d=" M 140.0000,20.0000 L 460.0000,20.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_62"/><path d=" M 140.0000,20.0000 L 143.0000,20.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_63"/><path d=" M 160.5333,175.2000 L 160.5333,175.2000" style="fill: none; stroke: #3465a4; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_65"/><path d=" M 160.5333,175.2000 L 197.8667,50.4000" style="fill: none; stroke: #3465a4; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_66"/><path d=" M 197.8667,50.4000 L 428.0889,84.8000" style="fill: none; stroke: #3465a4; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_67"/><path d=" M 428.0889,84.8000 L 432.6222,130.8000" style="fill: none; stroke: #3465a4; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_68"/><path d=" M 157.5333,175.2000 L 160.5333,172.2000 L 163.5333,175.2000 L 160.5333,178.2000 L 157.5333,175.2000 z " style="fill: #3465a4; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_69"/><path d=" M 194.8667,50.4000 L 197.8667,47.4000 L 200.8667,50.4000 L 197.8667,53.4000 L 194.8667,50.4000 z " style="fill: #3465a4; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_70"/><path d=" M 425.0889,84.8000 L 428.0889,81.8000 L 431.0889,84.8000 L 428.0889,87.8000 L 425.0889,84.8000 z " style="fill: #3465a4; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_71"/><path d=" M 429.6222,130.8000 L 432.6222,127.8000 L 435.6222,130.8000 L 432.6222,133.8000 L 429.6222,130.8000 z " style="fill: #3465a4; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_72"/><g id="ezcGraphTextBox_4"><path d=" M 16.5000,17.0000 L 16.5000,1.5000 L 84.7800,1.5000 L 84.7800,17.0000 L 16.5000,17.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_73"/><text id="ezcGraphTextBox_4_text" x="17" text-length="66.78px" y="13.9" style="font-size: 14px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">some data</text></g><g id="ezcGraphTextBox_9"><path d=" M 141.5000,191.0000 L 141.5000,181.5000 L 164.2000,181.5000 L 164.2000,191.0000 L 141.5000,191.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_74"/><text id="ezcGraphTextBox_9_text" x="142" text-length="21.2px" y="188.8" style="font-size: 8px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">01:00</text></g><g id="ezcGraphTextBox_12"><path d=" M 194.8333,191.0000 L 194.8333,181.5000 L 217.5333,181.5000 L 217.5333,191.0000 L 194.8333,191.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_75"/><text id="ezcGraphTextBox_12_text" x="195.3333" text-length="21.2px" y="188.8" style="font-size: 8px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">01:10</text></g><g id="ezcGraphTextBox_15"><path d=" M 248.1667,191.0000 L 248.1667,181.5000 L 270.8667,181.5000 L 270.8667,191.0000 L 248.1667,191.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_76"/><text id="ezcGraphTextBox_15_text" x="248.6667" text-length="21.2px" y="188.8" style="font-size: 8px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">01:20</text></g><g id="ezcGraphTextBox_18"><path d=" M 301.5000,191.0000 L 301.5000,181.5000 L 324.2000,181.5000 L 324.2000,191.0000 L 301.5000,191.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_77"/><text id="ezcGraphTextBox_18_text" x="302" text-length="21.2px" y="188.8" style="font-size: 8px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">01:30</text></g><g id="ezcGraphTextBox_21"><path d=" M 354.8333,191.0000 L 354.8333,181.5000 L 377.5333,181.5000 L 377.5333,191.0000 L 354.8333,191.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_78"/><text id="ezcGraphTextBox_21_text" x="355.3333" text-length="21.2px" y="188.8" style="font-size: 8px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">01:40</text></g><g id="ezcGraphTextBox_24"><path d=" M 408.1667,191.0000 L 408.1667,181.5000 L 430.8667,181.5000 L 430.8667,191.0000 L 408.1667,191.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_79"/><text id="ezcGraphTextBox_24_text" x="408.6667" text-length="21.2px" y="188.8" style="font-size: 8px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">01:50</text></g><g id="ezcGraphTextBox_27"><path d=" M 436.3000,191.0000 L 436.3000,181.5000 L 459.0000,181.5000 L 459.0000,191.0000 L 436.3000,191.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_80"/><text id="ezcGraphTextBox_27_text" x="436.8" text-length="21.2px" y="188.8" style="font-size: 8px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">02:00</text></g><g id="ezcGraphTextBox_28"><path d=" M 132.5400,179.0000 L 132.5400,169.5000 L 139.0000,169.5000 L 139.0000,179.0000 L 132.5400,179.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_81"/><text id="ezcGraphTextBox_28_text" x="133.04" text-length="4.96px" y="176.8" style="font-size: 8px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">0</text></g><g id="ezcGraphTextBox_37"><path d=" M 122.6200,139.0000 L 122.6200,129.5000 L 139.0000,129.5000 L 139.0000,139.0000 L 122.6200,139.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_82"/><text id="ezcGraphTextBox_37_text" x="123.12" text-length="14.88px" y="136.8" style="font-size: 8px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">100</text></g><g id="ezcGraphTextBox_46"><path d=" M 122.6200,99.0000 L 122.6200,89.5000 L 139.0000,89.5000 L 139.0000,99.0000 L 122.6200,99.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_83"/><text id="ezcGraphTextBox_46_text" x="123.12" text-length="14.88px" y="96.8" style="font-size: 8px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">200</text></g><g id="ezcGraphTextBox_55"><path d=" M 122.6200,59.0000 L 122.6200,49.5000 L 139.0000,49.5000 L 139.0000,59.0000 L 122.6200,59.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_84"/><text id="ezcGraphTextBox_55_text" x="123.12" text-length="14.88px" y="56.8" style="font-size: 8px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">300</text></g><g id="ezcGraphTextBox_64"><path d=" M 122.6200,31.0000 L 122.6200,21.5000 L 139.0000,21.5000 L 139.0000,31.0000 L 122.6200,31.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_85"/><text id="ezcGraphTextBox_64_text" x="123.12" text-length="14.88px" y="28.8" style="font-size: 8px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">400</text></g></g></svg>
diff --git a/tests/date_axis_test.php b/tests/date_axis_test.php
index dde9e86..2464090 100644
--- a/tests/date_axis_test.php
+++ b/tests/date_axis_test.php
@@ -481,6 +481,26 @@ class ezcGraphDateAxisTest extends ezcGraphTestCase
$this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg'
);
}
+
+ public function testFloatDataSetKeys()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.svg';
+
+ $this->chart->data['some data'] = new ezcGraphArrayDataSet( array(
+ '231.1' => 12,
+ '651.2' => 324,
+ '3241.3' => 238,
+ '3292.4' => 123,
+ ) );
+ $this->chart->data['some data']->symbol = ezcGraph::DIAMOND;
+
+ $this->chart->render( 500, 200, $filename );
+
+ $this->compare(
+ $filename,
+ $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg'
+ );
+ }
}
?>
OpenPOWER on IntegriCloud