derailed-ziya 2.0.4 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/Manifest.txt +70 -0
- data/README.txt +28 -17
- data/Rakefile +2 -2
- data/charts/charts.swf +0 -0
- data/charts/charts_library/ar3d.swf +0 -0
- data/charts/charts_library/arno.swf +0 -0
- data/charts/charts_library/ars3.swf +0 -0
- data/charts/charts_library/arst.swf +0 -0
- data/charts/charts_library/brfl.swf +0 -0
- data/charts/charts_library/brno.swf +0 -0
- data/charts/charts_library/brst.swf +0 -0
- data/charts/charts_library/buno.swf +0 -0
- data/charts/charts_library/cl3d.swf +0 -0
- data/charts/charts_library/clfl.swf +0 -0
- data/charts/charts_library/clno.swf +0 -0
- data/charts/charts_library/clp3.swf +0 -0
- data/charts/charts_library/cls3.swf +0 -0
- data/charts/charts_library/clst.swf +0 -0
- data/charts/charts_library/cnno.swf +0 -0
- data/charts/charts_library/dono.swf +0 -0
- data/charts/charts_library/lnno.swf +0 -0
- data/charts/charts_library/mxno.swf +0 -0
- data/charts/charts_library/pi3d.swf +0 -0
- data/charts/charts_library/pino.swf +0 -0
- data/charts/charts_library/pono.swf +0 -0
- data/charts/charts_library/scno.swf +0 -0
- data/lib/ziya/charts/base.rb +35 -27
- data/lib/ziya/charts/stacked_threed_area.rb +1 -1
- data/lib/ziya/components/chart_pref.rb +2 -2
- data/lib/ziya/components/chart_rect.rb +1 -1
- data/lib/ziya/helpers/base_helper.rb +46 -25
- data/lib/ziya/version.rb +1 -2
- data/lib/ziya/ziya_helper.rb +50 -75
- data/spec/charts/base_spec.rb +6 -0
- data/spec/ziya_helper_spec.rb +5 -5
- metadata +1 -1
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -18,6 +18,7 @@
|
|
18
18
|
.git/logs/refs/remotes/origin/master
|
19
19
|
.git/objects/00/5dafe13c5c2aa03dba72889caa5f5327ebdbcd
|
20
20
|
.git/objects/00/f3bd0a5b954c54cac69aeb58fcc21911f075e1
|
21
|
+
.git/objects/02/e2e24292dcedc460e6a9bc265fd7d3cbe12774
|
21
22
|
.git/objects/05/0624754a454325bc9ea4519fee6c661041d54e
|
22
23
|
.git/objects/05/4c110fac17a5e862931efa94b7f392391acde2
|
23
24
|
.git/objects/06/1262ae993b5a644171bf9d34e855e88d094cb1
|
@@ -31,26 +32,37 @@
|
|
31
32
|
.git/objects/0d/ce21001b368716fe45c3ad70198e0df8fa4e3a
|
32
33
|
.git/objects/0e/9e2b6ecaf7d24999f4f272a307e3c13ee2d372
|
33
34
|
.git/objects/0e/d43a33a81abc4e8d882c7cab4a577d1b70ff66
|
35
|
+
.git/objects/10/317d2ec1c81d7c48346ed5b039ae48ede9da19
|
34
36
|
.git/objects/10/a2d6340a89565c5f3d2e7d2a46c4d3e745955e
|
35
37
|
.git/objects/11/2367525f183f8a5cdcce1143dab16bc0133b9a
|
36
38
|
.git/objects/13/11ab7f0d2d5cd141647f76e644e84d17934b93
|
37
39
|
.git/objects/13/58c5e18e13c135a88a3b26459c7cc612bef7cf
|
40
|
+
.git/objects/13/8cde0dee025f4ccb0c31217d4e1f56c36cda9e
|
38
41
|
.git/objects/15/9a3b758523049cd63283435ac32c4dc470efba
|
39
42
|
.git/objects/16/c180bc711cf67686bacaafe96a4c49fd25d27a
|
43
|
+
.git/objects/17/10881b4a1460ced951bd5b768ebc0c5d32260b
|
40
44
|
.git/objects/18/3f5416cf1b619a3c982049036888d42a15314e
|
41
45
|
.git/objects/19/84d29634104afb86aab38acff76629b3052c6f
|
42
46
|
.git/objects/1a/05e6f9f7dcea4e427528df477cc4ab64cef4f4
|
43
47
|
.git/objects/1a/710ae86f3f4bd81bf1f9aa50bbc08e9328fd19
|
48
|
+
.git/objects/1a/e9f93f80f6890334e865da64e72e91b40af185
|
44
49
|
.git/objects/1b/5c5134a077026d4a5c19e6ed51ae9d8a84b894
|
45
50
|
.git/objects/1b/f36aa549a1635845428cae269951a9e44871ee
|
46
51
|
.git/objects/1c/909bd56adc7b47fe505b69243c3d971e5879a2
|
47
52
|
.git/objects/1c/9974bf1a58186f120b8eafcabb6203a8579907
|
53
|
+
.git/objects/1d/22a4a279a71856e5d40d928ffacccb69804423
|
48
54
|
.git/objects/1e/03d884a1f201973313d9fc795beb173ca85008
|
49
55
|
.git/objects/20/9892ec0fd94f7f9ddafcd404b687a1b29daeba
|
56
|
+
.git/objects/21/2a8a8d425a3cdf40873ae664536c944783fafc
|
57
|
+
.git/objects/22/a836d2e01309a72de70d90b8cadaa8fb29c5a4
|
50
58
|
.git/objects/24/325e0615f9689d94a296f37ea21a303ce92150
|
51
59
|
.git/objects/27/2e94c25ef7702510a0b3536f4006441aa219e8
|
60
|
+
.git/objects/27/bf5840c98b934a46312583c49b3c1ca2c6820b
|
61
|
+
.git/objects/29/164195268dce70265f34191cf93ac33187d931
|
52
62
|
.git/objects/2a/cde3d862632947e5c5c811cfcb0f9bef5165d9
|
53
63
|
.git/objects/2b/a7d14485b326d1041428a5c06033b955bfdcb1
|
64
|
+
.git/objects/2e/bc44aa7cdc5dc14e5cbc93a195e0cc424bb666
|
65
|
+
.git/objects/30/5d9ee5c80cfdf63de692069474e887affa2ba2
|
54
66
|
.git/objects/31/669ee8c91ef0739fb31679603e793df94b6492
|
55
67
|
.git/objects/31/bbcb7ee218e7f195132b901ecfbae869a05ae2
|
56
68
|
.git/objects/31/bd7843a436bef2b30753075ef6cab1f933c1b2
|
@@ -58,6 +70,8 @@
|
|
58
70
|
.git/objects/32/21fdaac97163e7bbe46d6be44523d4d5cfa2fc
|
59
71
|
.git/objects/32/992ec645fa125f57ee4a2aa1bafbd2aae004d4
|
60
72
|
.git/objects/32/abd8edef2cc5c993ecca658101c129309487bb
|
73
|
+
.git/objects/32/d07f11a9af49398a8aed22368b6799c4d0e92a
|
74
|
+
.git/objects/33/7c9c80e807a27c9af155e766f06c07eaa388e8
|
61
75
|
.git/objects/34/8c2626cead317b74dcb9b7348dc860fa3a4345
|
62
76
|
.git/objects/34/fffbbdcc380b15069f789571c143b52420088b
|
63
77
|
.git/objects/36/27ab0fccccbaf28a67d3b3049a2f0a9799b265
|
@@ -69,7 +83,9 @@
|
|
69
83
|
.git/objects/3e/b0b7d9fb3c58bd91338f33d689065d011f6184
|
70
84
|
.git/objects/41/ed6a6903441655a9258021cdbc7e62963d67bb
|
71
85
|
.git/objects/41/f8afbfb5dbe3abc46fd1893dcf8d8bb9e15faa
|
86
|
+
.git/objects/42/241eba242f67f7d7231803023bb1cdb1d447ba
|
72
87
|
.git/objects/42/43d673c2e3f3825f9da9008ff97adacbb03a8f
|
88
|
+
.git/objects/42/7c0b5508fecec972323b53508afbc80afe4bbd
|
73
89
|
.git/objects/43/ee089c3cdd92a9d040ead8af512edbc43c1f90
|
74
90
|
.git/objects/44/56f0bf6a6d82a7c0b1ab8ff4d0a89614d180d0
|
75
91
|
.git/objects/45/5e18fc2c8f14a8fffae239745977715d9ba977
|
@@ -84,7 +100,11 @@
|
|
84
100
|
.git/objects/49/dfcd49270f0c45e21f31ba81665f5420201d13
|
85
101
|
.git/objects/49/e23e4fece3df463d1e216b70d5159b87f5e8e2
|
86
102
|
.git/objects/49/e894076a99273f2cffabd2ea69931229b1ec09
|
103
|
+
.git/objects/4a/01bed5eeb6e2e3f6066cb9dc2dd71a1376d1a1
|
104
|
+
.git/objects/4a/2e799c52c0423dc90829d1acbddd7a958839a5
|
87
105
|
.git/objects/4b/1c70d5cbde60bd3bb6717b32afc5ec0b4264b0
|
106
|
+
.git/objects/4c/ab7aaabe6a7cd2ad5a47a8aea56bdb32af5494
|
107
|
+
.git/objects/4c/b186bc25904f1b991f9a5b9360d8ee9041e010
|
88
108
|
.git/objects/4d/3e8957b25a5e35eec64e8be07491e3981adefb
|
89
109
|
.git/objects/4d/a4ded55776a5a163c6b6fadc5219dac4e9b462
|
90
110
|
.git/objects/4d/ec076944bbff6e0b8a51199a8e7e6de56897b1
|
@@ -94,24 +114,32 @@
|
|
94
114
|
.git/objects/53/47cc429c3682c421285c8c31460b988560910a
|
95
115
|
.git/objects/53/ef722701dcca10bdcde2f657aa563393edf383
|
96
116
|
.git/objects/54/4b5c80a232db5d194a8fe58dd5d905cf4b9821
|
117
|
+
.git/objects/54/c919ffef4cacbce5d60ba585560dec8c467659
|
97
118
|
.git/objects/55/2abaf327019eaae07e694b97d459d81aca0c6a
|
119
|
+
.git/objects/55/db8d413bf00aabc7999adb00afd196a01a6e51
|
98
120
|
.git/objects/57/2ff9a160755a9e8a496f16393b8a23689c4b95
|
99
121
|
.git/objects/57/457cd7398fde0285a55c2c07fa96a1a01371f4
|
100
122
|
.git/objects/57/edf48136e2087780b7664206aec2fd47630ae0
|
101
123
|
.git/objects/58/bc9104547ad86d8ab9c78237567e507da593d1
|
102
124
|
.git/objects/59/e7957197204368f417a13eaee74ac3ab3b0980
|
103
125
|
.git/objects/5a/7569fb2457afd9b8113f0ab1d05ded78d38241
|
126
|
+
.git/objects/5b/31c63d6807e5f161d1231e5346e109238fdd64
|
104
127
|
.git/objects/5c/335c5ec654745b93834cec5b31f6bcf96a504d
|
105
128
|
.git/objects/5c/fe7b7bd7a7c97c8f10f49e58211dbfc50ff527
|
106
129
|
.git/objects/5d/43f2860c3f36ba9fe34b9539a3a7d0ba0b03d4
|
130
|
+
.git/objects/5d/458b505c6c2364a0ab96046d02445788effbd8
|
107
131
|
.git/objects/5d/e06b82ee0c8bc39a148dbeb15526dd938d9711
|
108
132
|
.git/objects/5e/12dd2342bb1d162bbfd3e02bd893301a251458
|
109
133
|
.git/objects/5f/d8fa1774b2b59270056a385ca94e67d390978d
|
134
|
+
.git/objects/60/2eac9dc1fddb046fcf44c5d68faedd82ef9d57
|
135
|
+
.git/objects/60/e4de083d4745f5712ea146883cb6419e7638c4
|
110
136
|
.git/objects/61/a9f36a6e6032e766135e3ae0898bf9e98fa844
|
111
137
|
.git/objects/61/d57910c713f616645922d04e2f53e9e0742963
|
138
|
+
.git/objects/62/0e37edefc5cb274a1837b568579f12f0d6495c
|
112
139
|
.git/objects/62/e7ce9ae1cd2da5168cf6e9969152a9df293241
|
113
140
|
.git/objects/64/820fa6a489f8bfb3df4285b51c3499cdc28e21
|
114
141
|
.git/objects/64/b3a1a8e30d6fd113a0a183152c80e3e7ef3ed2
|
142
|
+
.git/objects/64/db304038859ffd707bb3a8e1527ee5f6f492d7
|
115
143
|
.git/objects/65/f42ef6efbb62ce352077725859aa3210d0d037
|
116
144
|
.git/objects/66/02069058631cc22e0a5e3b0486ac598dff4df6
|
117
145
|
.git/objects/67/01f3e70063bc8aa91d61f28bc1bdac690a23ab
|
@@ -121,6 +149,7 @@
|
|
121
149
|
.git/objects/6b/366153e1938fac82d824cc3c101bc48d06b4ac
|
122
150
|
.git/objects/6b/4b1108316c30486bc1d4252464afeba566bbb3
|
123
151
|
.git/objects/6c/4aec9fae71936e6577213523fab7280c7abfac
|
152
|
+
.git/objects/6d/38aee8373335857008fa77356f538aba6af48a
|
124
153
|
.git/objects/6d/48d7a2b9d1489c7e8adc7634028567dd38bb1f
|
125
154
|
.git/objects/6e/0cb5ae2d801f0af8be97f3c54b6bd4aeceda2c
|
126
155
|
.git/objects/6f/22fded86bc0370e96e762429cae4baed1dd30c
|
@@ -128,11 +157,13 @@
|
|
128
157
|
.git/objects/74/96bc8a5ae3ee2342196b432b0798b1ac0ff377
|
129
158
|
.git/objects/7a/0ccb4c794a5ecdb520f1c70aedabb8a902159a
|
130
159
|
.git/objects/7a/9d321125c5547b67fee6edcd3685c6c640f4b6
|
160
|
+
.git/objects/7b/6a97db20063704a4e6cec738f4ecbdf5508cbe
|
131
161
|
.git/objects/7b/7c321289400939ffd0f9af86c6ec8d23a4dcb8
|
132
162
|
.git/objects/7b/bc084d6c80faac624aca316406117072436224
|
133
163
|
.git/objects/7c/e16bb5899a8d10bae32b3f96c3ec0076d0730d
|
134
164
|
.git/objects/81/835d74d8b1436f18c46538a238f0018bbc46d7
|
135
165
|
.git/objects/81/97bcca7fd2d96b6f02625187e4d2be2b261d0f
|
166
|
+
.git/objects/81/a8010dcefd013866a2661006fa2c08311d9116
|
136
167
|
.git/objects/82/e104075340ce9561b76330d950f3b877d7e76c
|
137
168
|
.git/objects/83/305415cb38b7580ef8e2619742264c4d697583
|
138
169
|
.git/objects/83/3dd1c8dd4476fa42b3242f610416c8b3ecbe6b
|
@@ -141,6 +172,7 @@
|
|
141
172
|
.git/objects/89/2b2e3e4f750b72358216eb8543473a6504afd4
|
142
173
|
.git/objects/8a/d3d6b62e2f4a2e3fbcb6f947f3318e256de511
|
143
174
|
.git/objects/8d/0a7f95bb55b70e4b8ff8fe46796303359ca08d
|
175
|
+
.git/objects/8d/3658e559e6e3ed0e06a9364eacbf0d82719255
|
144
176
|
.git/objects/8e/c4983249407e0b6402012ddd1a70b70930fc07
|
145
177
|
.git/objects/8f/54ed909a0df47cbf9c4d6a89c473eac5a4ef34
|
146
178
|
.git/objects/92/758085c0a0a541e417f9393c28f4b9097cca2a
|
@@ -152,27 +184,40 @@
|
|
152
184
|
.git/objects/99/7f03dc15404690b07658b4d736ca5c782ca98c
|
153
185
|
.git/objects/99/be08248c9c320ffe9167fafdcafce2d2a85754
|
154
186
|
.git/objects/9c/719a7578206cf9cbc3c027989f860888ffbd56
|
187
|
+
.git/objects/9c/9f992b211f4572b869a925bc8d14081280e87c
|
155
188
|
.git/objects/9e/bcf4fcf7d300d627dc9268bdfaac8b8e34320e
|
156
189
|
.git/objects/a0/e2fd366943a85764c52a0a58f182ae26c9ed55
|
157
190
|
.git/objects/a3/3f0b02cfccee08c0fb5a0894da6a873c6d1f77
|
191
|
+
.git/objects/a3/5fdda2309e4fc97a2f887e3fc913ca45d2ffb6
|
158
192
|
.git/objects/a3/9833d0ed7b53121b78da31e4262d4859c9c34c
|
159
193
|
.git/objects/a3/9ad5f9fbf91a0387879654c432a576c9ecd93f
|
194
|
+
.git/objects/a3/ebfc700a52cb556d439da73794d0aca6f3e774
|
195
|
+
.git/objects/a3/f25a7a120571fa24e994b48b75dc9c4bd57bf9
|
196
|
+
.git/objects/a4/8c559554780c8629b810ee57c9ba66e1cf7845
|
160
197
|
.git/objects/a5/573e8cfc5af6d5676b201a73eb0f60fdb7b48e
|
161
198
|
.git/objects/a5/6b35ba1c24c6f3f971cd87a64dfab00d9090c2
|
162
199
|
.git/objects/a6/1528d87b381df0ff5d6a81fdfc5d0137188b00
|
200
|
+
.git/objects/a6/fb813c1bbe4b77574ca85f0caba36e14ecd88a
|
163
201
|
.git/objects/a8/01aac96e843a4d84d9fa94b018942e293695fe
|
164
202
|
.git/objects/a9/d62fb7f4d22460d0a73cb9dcba3e4a1c702863
|
165
203
|
.git/objects/ab/489babc57fdeb25306df9e2f4511be2b840a18
|
204
|
+
.git/objects/ad/f4c7545ff9b23b9a16a780af00ff34a18edf3d
|
166
205
|
.git/objects/ae/b35f284ca0e55ced6182df81b0a8ccef7546a3
|
167
206
|
.git/objects/af/27e34f6ef585c6e4b8e29f504d398563746cb9
|
168
207
|
.git/objects/af/35a9cbf6d5fffa2a1a7866c719dd6a350be949
|
169
208
|
.git/objects/b0/16a41c361dbd6abba5a6a4d3b6c210741c3bd9
|
170
209
|
.git/objects/b0/40aea00724838f0ddf68ec658a0a29fcf538e5
|
210
|
+
.git/objects/b3/a43292a06509f9d5ee598231e9b1f7c4f32ef9
|
211
|
+
.git/objects/b3/f2d207bb43d790f08274a1599c128daf751e4a
|
171
212
|
.git/objects/b4/55173a38af0df33dc4e4d47c5e0dc5904525b0
|
172
213
|
.git/objects/b6/0be30e423a0226182a3fbddf2bae74c4381d3c
|
173
214
|
.git/objects/b6/1a81567bb2df7e67ac564fd7bec34c2584415d
|
174
215
|
.git/objects/b9/d37f572ce994aebe2c6adf06faecfba631de00
|
175
216
|
.git/objects/ba/48d7f0fe9f95b6db8d8a9154179051128c2922
|
217
|
+
.git/objects/bb/49af5d1369941a2eba3b0bb263634ef4f38369
|
218
|
+
.git/objects/bb/cc9441da2ed067f9668d3620a4f3a27552d0af
|
219
|
+
.git/objects/bc/08b79fa32d8b84d53626e2b20dafd51b74db77
|
220
|
+
.git/objects/bc/45a53b565b4de740c51e7a95749a0f00edc255
|
176
221
|
.git/objects/bc/a55bc20febe11ae681bad43ff22706abba9662
|
177
222
|
.git/objects/be/3387d70b611cba4575643073d279896be9ca5f
|
178
223
|
.git/objects/be/ac1440c4feb427a00f12a7a4abd5f2bcb3a3f3
|
@@ -180,11 +225,14 @@
|
|
180
225
|
.git/objects/bf/22ec08738e91a7bc6ff33e81b9a1fb19008558
|
181
226
|
.git/objects/c0/e3861230557f6409bac5a9e27cbc76c0918ab1
|
182
227
|
.git/objects/c1/7da230eff31a4473be6fb94e6ea8000a02dfca
|
228
|
+
.git/objects/c3/799c6c4fa6728f664ade0ff826bfa573f2397d
|
183
229
|
.git/objects/c4/269c01e6627e427519d495a65b0899e6e34972
|
184
230
|
.git/objects/c4/4c7e232e4108ba296d0a7767bbedca379befd8
|
185
231
|
.git/objects/c5/736daf294c827e40d1a983cafba355be0a517d
|
186
232
|
.git/objects/c5/d9ca89678d7a020b3d037ed4a98f99cac2b0a7
|
187
233
|
.git/objects/c6/4d0319126e720c1a3371db08023eb7ba5ec37e
|
234
|
+
.git/objects/c7/dce0fff8881a72bf94a87cb4b542c44dc8f299
|
235
|
+
.git/objects/c9/2bb99942f426d859b0f0c9f4309086485d029e
|
188
236
|
.git/objects/cb/09ede42cf0aab3a6a2f88faf77d969dd092957
|
189
237
|
.git/objects/cb/3814b73a9fb6954dcd5e5c6bcc98855154fc1f
|
190
238
|
.git/objects/cc/799dbed2913a05f0fe1a0bd6e8de6cd3968f31
|
@@ -192,11 +240,16 @@
|
|
192
240
|
.git/objects/d0/e9d0ae9f944c34e5821956deb9a8a5c40e8be7
|
193
241
|
.git/objects/d3/1a90c6ee74dad377ec05bd14e83ac8e8971a11
|
194
242
|
.git/objects/d3/bc0ae274d415e2251afc9b2eef076faad75252
|
243
|
+
.git/objects/d4/30738d12d781f354b5238a675b853a62243d2f
|
195
244
|
.git/objects/d5/141fd8c61733c0f5a7d15de589028917775a33
|
245
|
+
.git/objects/d5/b3996fa0a7029741d69bbf68f7a3de25c9dfcf
|
196
246
|
.git/objects/d7/3013fb3c829786cee45049087fc3bcb914e03d
|
197
247
|
.git/objects/da/54094d26c59a45d7abce957d013d0b0e7edf3e
|
198
248
|
.git/objects/da/9993b7b2385ee45046c6edffcfc4f9dd706dc9
|
199
249
|
.git/objects/da/a8e4c185e5c3fedfd394410bc72ba37b97a748
|
250
|
+
.git/objects/da/b335d0ddbb36855f125805ad4033100dc48de9
|
251
|
+
.git/objects/db/329d0c6af78296dff7bdf329f302d8e1a1010a
|
252
|
+
.git/objects/dc/58993017f642b86ed6cba18e4ce4009d5729a3
|
200
253
|
.git/objects/dd/0dd16990f9e04313393ac5ecda4f3bee14e609
|
201
254
|
.git/objects/de/87140bf33b53f08e61da7c01f9323e2e3ca151
|
202
255
|
.git/objects/df/d095ebe3587078830a0860847d7bef06bcbd5d
|
@@ -204,17 +257,24 @@
|
|
204
257
|
.git/objects/e2/0242d302a3901772feb39280e59e6113e738ae
|
205
258
|
.git/objects/e2/e851194abf89943c44eea36156cfc81e228dd5
|
206
259
|
.git/objects/e3/85d31b72152a9a8132909f97adf62e28c10201
|
260
|
+
.git/objects/e3/875c20aa265aed1bbe93707af34e1be4fe2384
|
207
261
|
.git/objects/e4/c17d29d1f754e94215350d8e79b9326ccbe234
|
262
|
+
.git/objects/e6/9076f984b68e0fe843a25a592a37a4af8a42bc
|
208
263
|
.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
|
209
264
|
.git/objects/e7/413f3a7fd0246ec3c6beb5e539d6702b767d18
|
210
265
|
.git/objects/e7/429aad6ca0778b3157aff5bdf12a417292a8a4
|
266
|
+
.git/objects/e8/c7b0c48adcdcf664a046ad1406d42f8bed4745
|
211
267
|
.git/objects/e9/37a8f3b410e581a8218c11bd2d72f623c3f00c
|
212
268
|
.git/objects/e9/39f89cc63280f801a49795fd46d2d0de18e0df
|
213
269
|
.git/objects/eb/9ecd91bbcc23f5e31d903b3493f343c378918c
|
214
270
|
.git/objects/ed/86e9f95e63202686d35020892d2c947ed7aa7d
|
215
271
|
.git/objects/ed/c4ff8e01529932ad201c2dd0c218bb70c832aa
|
272
|
+
.git/objects/ee/ac01d011da2c52622086d8ab3e9ddb299e384a
|
273
|
+
.git/objects/f0/52f3442294de1520f8e757cef6a3476dd391c2
|
216
274
|
.git/objects/f0/58537e675806b3b103314b7300e4dd77657c83
|
275
|
+
.git/objects/f0/b48a1e84b9076c2c6a4ac641b3b9674319112d
|
217
276
|
.git/objects/f1/2fbc659078cedaacffab700252c43489106ff9
|
277
|
+
.git/objects/f1/5d7a375c83735f20cea45aa3a32e30e9f72723
|
218
278
|
.git/objects/f2/ddcc35798004e1eada7ca3a65c1e5b846342cc
|
219
279
|
.git/objects/f3/9601adf9ad7b49b242445403d3da93519955b0
|
220
280
|
.git/objects/f3/ff80aedb5984973bd72d426f698e692e70ae95
|
@@ -222,8 +282,10 @@
|
|
222
282
|
.git/objects/f7/351c172a138824869da7acded429bf94c0c0ef
|
223
283
|
.git/objects/f7/40452f3f070440276e289a0a41f77743f076cb
|
224
284
|
.git/objects/f9/c9b4a7f2641fa239b6f36b955ba2560593a8b8
|
285
|
+
.git/objects/f9/d155ef5a6fd45be0ebff4af70117ffc77f0f2b
|
225
286
|
.git/objects/fa/a1b52c7607b406a85351c059813d1b5dc8d55a
|
226
287
|
.git/objects/fa/a3225d45f0d7a2665811b673ed3dbeb9724a27
|
288
|
+
.git/objects/ff/edbe0dd8107f80cf2113c5308239821e89d1b6
|
227
289
|
.git/objects/ff/f5b98a0ff80230e85b2a47e73844ebb8269ebb
|
228
290
|
.git/refs/heads/master
|
229
291
|
.git/refs/remotes/origin/master
|
@@ -244,6 +306,7 @@ charts/charts_library/brst.swf
|
|
244
306
|
charts/charts_library/buno.swf
|
245
307
|
charts/charts_library/cl3d.swf
|
246
308
|
charts/charts_library/clfl.swf
|
309
|
+
charts/charts_library/clim.swf
|
247
310
|
charts/charts_library/clno.swf
|
248
311
|
charts/charts_library/clp3.swf
|
249
312
|
charts/charts_library/cls3.swf
|
@@ -253,6 +316,7 @@ charts/charts_library/dono.swf
|
|
253
316
|
charts/charts_library/lnno.swf
|
254
317
|
charts/charts_library/mxno.swf
|
255
318
|
charts/charts_library/pi3d.swf
|
319
|
+
charts/charts_library/piim.swf
|
256
320
|
charts/charts_library/pino.swf
|
257
321
|
charts/charts_library/pono.swf
|
258
322
|
charts/charts_library/scno.swf
|
@@ -261,6 +325,7 @@ charts/scripts/output_jpg.php
|
|
261
325
|
charts/sliders/black.swf
|
262
326
|
charts/sliders/preview_handle_1.swf
|
263
327
|
charts/sliders/preview_handle_2.swf
|
328
|
+
charts/ziya.js
|
264
329
|
gauges/designs/circle.yml
|
265
330
|
gauges/designs/signal.yml
|
266
331
|
gauges/designs/thermo.yml
|
@@ -275,9 +340,12 @@ lib/ziya/charts/bubble.rb
|
|
275
340
|
lib/ziya/charts/candle_stick.rb
|
276
341
|
lib/ziya/charts/column.rb
|
277
342
|
lib/ziya/charts/column_threed.rb
|
343
|
+
lib/ziya/charts/custom.rb
|
278
344
|
lib/ziya/charts/donut.rb
|
279
345
|
lib/ziya/charts/floating_bar.rb
|
280
346
|
lib/ziya/charts/floating_column.rb
|
347
|
+
lib/ziya/charts/image_column.rb
|
348
|
+
lib/ziya/charts/image_pie.rb
|
281
349
|
lib/ziya/charts/line.rb
|
282
350
|
lib/ziya/charts/mixed.rb
|
283
351
|
lib/ziya/charts/parallel_threed_column.rb
|
@@ -351,6 +419,7 @@ lib/ziya/utils/logger.rb
|
|
351
419
|
lib/ziya/utils/text.rb
|
352
420
|
lib/ziya/version.rb
|
353
421
|
lib/ziya/ziya_helper.rb
|
422
|
+
release_notes.txt
|
354
423
|
spec/charts/base_spec.rb
|
355
424
|
spec/charts/chart_type_spec.rb
|
356
425
|
spec/components/area_spec.rb
|
@@ -403,3 +472,4 @@ tasks/setup.rb
|
|
403
472
|
tasks/spec.rake
|
404
473
|
tasks/svn.rake
|
405
474
|
tasks/test.rake
|
475
|
+
ziya.gemspec
|
data/README.txt
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
ziya
|
2
2
|
by Fernand Galiana
|
3
3
|
ziya.rubyforge.org
|
4
|
+
git://github.com/derailed/ziya.git
|
4
5
|
|
5
6
|
== RELEASES
|
6
7
|
|
@@ -8,8 +9,10 @@ ziya
|
|
8
9
|
2.0.1 - Additional support for 5.02 + Added donut chart from 5.03
|
9
10
|
2.0.2 - Changed logging required to 0.9.X - Update to xml/swf 5.0.4
|
10
11
|
2.0.3 - README file update - Thanks to Paul James !
|
11
|
-
2.0.4 - Fixed missing encoding on composite urls
|
12
|
-
|
12
|
+
2.0.4 - Fixed missing encoding on composite urls - published gem on github
|
13
|
+
2.0.5 - Fixed merb app support issue
|
14
|
+
2.0.6 - Updates to support xml/swf 5.0.5
|
15
|
+
|
13
16
|
== DESCRIPTION:
|
14
17
|
|
15
18
|
ZiYa allows you to easily display graphs in your ruby based applications by leveraging
|
@@ -25,6 +28,8 @@ managers will love you for it !!
|
|
25
28
|
Video : http://www.youtube.com/watch?v=axIMmMHdXzo ( Out of date but you'll get the basics... )
|
26
29
|
Documentation : http://ziya.liquidrail.com/docs
|
27
30
|
Forum : http://groups.google.com/group/ziya-plugin
|
31
|
+
Repositories : http://rubyforge.org/projects/ziya
|
32
|
+
git://github.com/derailed/ziya.git
|
28
33
|
|
29
34
|
|
30
35
|
== FEATURES:
|
@@ -50,6 +55,27 @@ managers will love you for it !!
|
|
50
55
|
|
51
56
|
* Theme support. You can change the appearance and behavior of any charts by introducing
|
52
57
|
new themes under the public/charts/themes directory.
|
58
|
+
|
59
|
+
== REQUIREMENTS:
|
60
|
+
|
61
|
+
ZiYa depends on the logging gem version > 0.9.0
|
62
|
+
|
63
|
+
== INSTALL:
|
64
|
+
|
65
|
+
On rubyforge
|
66
|
+
|
67
|
+
sudo gem install ziya
|
68
|
+
|
69
|
+
or github
|
70
|
+
|
71
|
+
sudo gem install derailed-ziya
|
72
|
+
|
73
|
+
cd to your application directory and issue the following command
|
74
|
+
|
75
|
+
> ziyafy
|
76
|
+
|
77
|
+
This will copy the necessary themes and flash files to run ziya in your application
|
78
|
+
public/charts directory.
|
53
79
|
|
54
80
|
== SYNOPSIS:
|
55
81
|
|
@@ -191,21 +217,6 @@ managers will love you for it !!
|
|
191
217
|
radius: 5
|
192
218
|
fill_alpha: 80
|
193
219
|
|
194
|
-
== REQUIREMENTS:
|
195
|
-
|
196
|
-
ZiYa depends on the logging gem version > 0.9.0
|
197
|
-
|
198
|
-
== INSTALL:
|
199
|
-
|
200
|
-
sudo gem install ziya
|
201
|
-
|
202
|
-
cd to your application directory and issue the following command
|
203
|
-
|
204
|
-
> ziyafy
|
205
|
-
|
206
|
-
This will copy the necessary themes and flash files to run ziya in your application
|
207
|
-
public/charts directory.
|
208
|
-
|
209
220
|
== LICENSE:
|
210
221
|
|
211
222
|
(The MIT License)
|
data/Rakefile
CHANGED
@@ -25,7 +25,7 @@ PROJ.svn = 'ziya'
|
|
25
25
|
PROJ.rcov_threshold = 90.0
|
26
26
|
PROJ.executables = ['ziyafy']
|
27
27
|
|
28
|
-
PROJ.exclude << %w[.DS_Store$ .
|
28
|
+
PROJ.exclude << %w[.DS_Store$ .swo$ .swp$]
|
29
29
|
PROJ.tests = FileList['test/**/test_*.rb']
|
30
30
|
PROJ.annotation_tags << 'BOZO'
|
31
31
|
|
@@ -41,4 +41,4 @@ end
|
|
41
41
|
|
42
42
|
task 'gem:package' => 'manifest:assert'
|
43
43
|
|
44
|
-
depend_on "logging", "
|
44
|
+
depend_on "logging", ">= 0.9.0"
|
data/charts/charts.swf
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/ziya/charts/base.rb
CHANGED
@@ -56,7 +56,7 @@ module Ziya::Charts
|
|
56
56
|
@options = {}
|
57
57
|
@series_desc = []
|
58
58
|
@theme = default_theme
|
59
|
-
@render_mode = Base.
|
59
|
+
@render_mode = Base.mode_reset
|
60
60
|
initialize_components
|
61
61
|
load_helpers( Ziya.helpers_dir ) if Ziya.helpers_dir
|
62
62
|
end
|
@@ -67,10 +67,10 @@ module Ziya::Charts
|
|
67
67
|
end
|
68
68
|
|
69
69
|
# don't render stylesheets just gen code for chart stylesheet and data
|
70
|
-
def self.
|
70
|
+
def self.mode_data() 1; end
|
71
71
|
|
72
72
|
# renders everything
|
73
|
-
def self.
|
73
|
+
def self.mode_reset() 0; end
|
74
74
|
|
75
75
|
# -------------------------------------------------------------------------
|
76
76
|
# Default ZiYa theme
|
@@ -84,7 +84,12 @@ module Ziya::Charts
|
|
84
84
|
Dir.foreach(helper_dir) do |helper_file|
|
85
85
|
next unless helper_file =~ /^([a-z][a-z_]*_helper).rb$/
|
86
86
|
Ziya.logger.debug( ">>> ZiYa loading custom helper `#{$1}" )
|
87
|
-
|
87
|
+
# check rails env for autoloader ?
|
88
|
+
if defined?(RAILS_ROOT)
|
89
|
+
require_dependency File.join(helper_dir, $1)
|
90
|
+
else
|
91
|
+
require File.join(helper_dir, $1)
|
92
|
+
end
|
88
93
|
helper_module_name = "Ziya::" + $1.gsub(/(^|_)(.)/) { $2.upcase }
|
89
94
|
# helper_module_name = $1.to_s.gsub(/\/(.?)/) { "::" + $1.upcase }.gsub(/(^|_)(.)/) { $2.upcase }
|
90
95
|
# if Ziya::Helpers.const_defined?(helper_module_name)
|
@@ -100,7 +105,8 @@ module Ziya::Charts
|
|
100
105
|
# Example:
|
101
106
|
# my_chart = Ziya::Charts::Bar.new
|
102
107
|
# my_chart.add( :axis_category_text, ['2004', '2005', '2006'] )
|
103
|
-
# my_chart.add( :
|
108
|
+
# my_chart.add( :axis_category_label, [ '10 dogs', '20 cats', '30 rats'] )
|
109
|
+
# my_chart.add( :series, 'series A', [ 10, 20, 30] )
|
104
110
|
# my_chart.add( :axis_value_label, [ 'my dogs', 'my cats', 'my rats'] )
|
105
111
|
# my_chart.add( :user_data, :mykey, "Fred" )
|
106
112
|
#
|
@@ -157,15 +163,19 @@ module Ziya::Charts
|
|
157
163
|
raise ArgumentError, "Must specify an array of values" if values.empty?
|
158
164
|
@options[directive] = values
|
159
165
|
when :series
|
166
|
+
series = {}
|
160
167
|
legend = args.first.is_a?(String) ? args.shift : ""
|
161
168
|
if args.first.is_a?( Array )
|
162
169
|
points = args.shift || []
|
163
170
|
raise ArgumentError, "Must specify an array of data points" if points.empty?
|
164
171
|
points.insert( 0, legend )
|
165
|
-
|
172
|
+
series[:points] = points
|
166
173
|
else
|
167
174
|
raise ArgumentError, "Must specify an array of data points"
|
168
175
|
end
|
176
|
+
url = args.shift
|
177
|
+
series[:url] = url if url
|
178
|
+
@series_desc << series
|
169
179
|
when :user_data
|
170
180
|
key = args.first.is_a?(Symbol) ? args.shift : ""
|
171
181
|
raise ArgumentError, "Must specify a key" if key.to_s.empty?
|
@@ -355,50 +365,48 @@ module Ziya::Charts
|
|
355
365
|
# ------------------------------------------------------------------------
|
356
366
|
# generates chart data row
|
357
367
|
# TODO Validate options !!
|
358
|
-
def gen_row_data( value, opts=nil )
|
368
|
+
def gen_row_data( value, opts=nil, xml=@xml )
|
359
369
|
if value.instance_of? String
|
360
|
-
gen_string_data( value, opts )
|
370
|
+
gen_string_data( value, opts, xml )
|
361
371
|
elsif value.respond_to? :zero?
|
362
|
-
gen_number_data( value, opts )
|
372
|
+
gen_number_data( value, opts, xml )
|
363
373
|
end
|
364
374
|
end
|
365
375
|
|
366
376
|
# -------------------------------------------------------------------------
|
367
377
|
# generates string chart_value
|
368
|
-
def gen_string_data( value, opts )
|
369
|
-
|
370
|
-
@xml.string( opts ) { |x| x.text!( value ) }
|
371
|
-
else
|
372
|
-
@xml.string( value )
|
373
|
-
end
|
378
|
+
def gen_string_data( value, opts, xml )
|
379
|
+
opts ? xml.string( opts ) { |x| x.text!( value ) } : xml.string( value )
|
374
380
|
end
|
375
381
|
|
376
382
|
# -------------------------------------------------------------------------
|
377
383
|
# generates number chart_value
|
378
|
-
def gen_number_data( value, opts )
|
379
|
-
|
380
|
-
@xml.number( opts ) { |x| x.text!( value.to_s ) }
|
381
|
-
else
|
382
|
-
@xml.number( value )
|
383
|
-
end
|
384
|
+
def gen_number_data( value, opts, xml )
|
385
|
+
opts ? xml.number( opts ) { |x| x.text!( value.to_s ) } : xml.number( value )
|
384
386
|
end
|
385
387
|
|
386
388
|
# -------------------------------------------------------------------------
|
387
389
|
# generates chart data points
|
388
390
|
# BOZO !! Check args on hash
|
389
391
|
def gen_chart_data( series )
|
390
|
-
|
391
|
-
series.each do |row|
|
392
|
+
block = lambda {
|
393
|
+
series[:points].each do |row|
|
392
394
|
if row.nil?
|
393
395
|
@xml.null
|
394
396
|
elsif row.instance_of? Hash
|
395
397
|
value = row.delete( :value )
|
396
|
-
gen_row_data( value, row )
|
398
|
+
gen_row_data( value, row, @xml )
|
397
399
|
else
|
398
|
-
gen_row_data( row )
|
400
|
+
gen_row_data( row, nil, @xml )
|
399
401
|
end
|
400
402
|
end
|
401
|
-
|
403
|
+
}
|
404
|
+
|
405
|
+
if series[:url]
|
406
|
+
@xml.row( :url => series[:url], &block )
|
407
|
+
else
|
408
|
+
@xml.row( &block )
|
409
|
+
end
|
402
410
|
end
|
403
411
|
|
404
412
|
# -------------------------------------------------------------------------
|
@@ -451,7 +459,7 @@ module Ziya::Charts
|
|
451
459
|
# -------------------------------------------------------------------------
|
452
460
|
# Check if we should do the all monty or just render the instance styles
|
453
461
|
def render_parents?
|
454
|
-
(@render_mode == Base.
|
462
|
+
(@render_mode == Base.mode_reset)
|
455
463
|
end
|
456
464
|
|
457
465
|
# -------------------------------------------------------------------------
|
@@ -13,9 +13,9 @@ module Ziya::Components
|
|
13
13
|
# for additional documentation, examples and futher detail.
|
14
14
|
#
|
15
15
|
class ChartPref < Base
|
16
|
-
has_attribute :line_thickness, :point_shape, :point_size, :fill_shape,
|
16
|
+
has_attribute :line_thickness, :point_shape, :point_size, :fill_shape, :connect, :tip,
|
17
17
|
:type, :bull_color, :bear_color,
|
18
|
-
:
|
18
|
+
:drag, :min_x, :min_y, :max_x, :max_y,
|
19
19
|
:trend_thickness, :trend_alpha, :line_alpha, :rotation_x,
|
20
20
|
:rotation_y, :grid, :select, :empty_center
|
21
21
|
end
|
@@ -30,7 +30,7 @@ module Ziya::Components
|
|
30
30
|
#
|
31
31
|
class ChartRect < Base
|
32
32
|
has_attribute :x, :y, :width, :height, :positive_color, :negative_color,
|
33
|
-
:positive_alpha, :negative_alpha,
|
33
|
+
:positive_alpha, :negative_alpha, :hide,
|
34
34
|
:shadow, :bevel, :blur, :glow,
|
35
35
|
:corner_tl, :corner_tr, :corner_bl, :corner_br
|
36
36
|
end
|
@@ -5,66 +5,87 @@ module Ziya::Helpers
|
|
5
5
|
module BaseHelper
|
6
6
|
include Ziya::Utils::Text, Ziya::Helper
|
7
7
|
|
8
|
-
#
|
9
|
-
|
10
|
-
# chart
|
8
|
+
# Defines various helpers to assist in writing ZiYa yaml stylesheets.
|
9
|
+
|
10
|
+
# generates a swf chart path from the given url. Used as helper to embed a chart
|
11
|
+
# within a chart
|
12
|
+
# ==== Example
|
13
|
+
# <%= chart_url( chart_1_path ) %>
|
14
|
+
#
|
15
|
+
# => /charts/charts.swf?library_path=/charts/charts_library&xml_source=http://fred/load_chart_1.xml
|
11
16
|
def chart_url( url, swf_chart_dir="/charts" )
|
12
17
|
gen_composite_path( swf_chart_dir, url )
|
13
18
|
end
|
14
19
|
|
15
|
-
# -------------------------------------------------------------------------
|
16
20
|
# indent yaml content vy multiples of 2 spaces
|
17
21
|
def indent( multiple= 1 )
|
18
22
|
" " * multiple
|
19
23
|
end
|
20
24
|
|
21
|
-
#
|
22
|
-
#
|
25
|
+
# generates a gauge yaml class declaration
|
26
|
+
# ==== Example
|
27
|
+
# <%= gauge :thermo %>
|
28
|
+
#
|
29
|
+
# produces:
|
30
|
+
#
|
31
|
+
# --- !ruby/object:Ziya::Gauges::Thermo
|
32
|
+
# components: !omap
|
23
33
|
def gauge( class_name )
|
24
34
|
"--- #{clazz( class_name, 'Gauges' )}\n#{dials}"
|
25
35
|
end
|
26
36
|
|
27
|
-
#
|
28
|
-
#
|
37
|
+
# generates a gauge element declaration
|
38
|
+
# ==== Example
|
39
|
+
# <%= dial :rect %>
|
40
|
+
# => --- !ruby/object:Ziya::Gauges::Support::Rect
|
29
41
|
def dial( comp_class, comp_name=nil )
|
30
42
|
clazz = clazz( comp_class, "Gauges::Support" )
|
31
43
|
comp_name ? "- :#{comp_name}: #{clazz}" : "- #{clazz}"
|
32
44
|
end
|
33
45
|
|
34
|
-
#
|
35
|
-
#
|
46
|
+
# generates a yaml hash of dials
|
47
|
+
# ==== Example
|
48
|
+
# <%= dials %>
|
49
|
+
# => components: !omap
|
36
50
|
def dials
|
37
51
|
"components: !omap"
|
38
52
|
end
|
39
53
|
|
40
|
-
#
|
41
|
-
#
|
54
|
+
# generates a component yaml class declaration
|
55
|
+
# ==== Example
|
56
|
+
# <%= component :axis_category %>
|
57
|
+
# => axis_category: --- !ruby/object:Ziya::Components::AxisCategory
|
42
58
|
def component( component_name )
|
43
59
|
"#{component_name}: #{clazz component_name, :Components}"
|
44
60
|
end
|
45
61
|
alias :comp :component
|
46
62
|
|
47
|
-
#
|
48
|
-
#
|
63
|
+
# generates a drawing yaml class declaration
|
64
|
+
# ==== Example
|
65
|
+
# <%=drawing :rect %>
|
66
|
+
# => --- !ruby/object:Ziya::Components::Rect
|
49
67
|
def drawing( class_name )
|
50
68
|
clazz( class_name, :Components )
|
51
69
|
end
|
52
70
|
alias_method :filter_type, :drawing
|
53
71
|
alias_method :area , :drawing
|
54
72
|
|
55
|
-
#
|
56
|
-
#
|
73
|
+
# generates a yaml chart declaration
|
74
|
+
# ==== Example
|
75
|
+
# <%= chart :bar %>
|
76
|
+
# => --- !ruby/object:Ziya::Charts::Bar
|
57
77
|
def chart( class_name )
|
58
78
|
"--- #{clazz( class_name, :Charts )}"
|
59
79
|
end
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
80
|
+
|
81
|
+
private
|
82
|
+
|
83
|
+
# generates a yaml class declaration
|
84
|
+
def clazz( class_name, module_name=nil ) #:nodoc:
|
85
|
+
buff = "!ruby/object:Ziya::"
|
86
|
+
buff << "#{module_name}::" unless module_name.nil?
|
87
|
+
buff << "#{camelize(class_name.to_s)}"
|
88
|
+
buff
|
89
|
+
end
|
69
90
|
end
|
70
91
|
end
|
data/lib/ziya/version.rb
CHANGED
data/lib/ziya/ziya_helper.rb
CHANGED
@@ -1,17 +1,14 @@
|
|
1
|
-
# -----------------------------------------------------------------------------
|
2
1
|
# Generates necessary html flash tag to support ZiYa
|
3
2
|
#
|
4
|
-
# TODO
|
3
|
+
# TODO -- Rewrite to use content tag block instead...
|
5
4
|
#
|
6
5
|
# Author: Fernand Galiana
|
7
|
-
# -----------------------------------------------------------------------------
|
8
6
|
require 'cgi'
|
9
7
|
require 'erb'
|
10
8
|
|
11
9
|
module Ziya
|
12
10
|
module Helper
|
13
11
|
|
14
|
-
# -------------------------------------------------------------------------
|
15
12
|
# generates a javascript tag to include the js script to create object and
|
16
13
|
# embed tags
|
17
14
|
def ziya_javascript_include_tag
|
@@ -55,7 +52,9 @@ module Ziya
|
|
55
52
|
# setup width and height
|
56
53
|
setup_movie_size( options )
|
57
54
|
|
58
|
-
|
55
|
+
flash_vars = url ? charts_swf : charts_swf_no_src
|
56
|
+
xml_swf_path = flash_vars % [options[:swf_path], escape_url(url)]
|
57
|
+
xml_swf_path << "&chart_id=#{options[:id]}"
|
59
58
|
xml_swf_path << "×tamp=#{Time.now.to_i}" if options[:cache] == false
|
60
59
|
xml_swf_path << "&timeout=#{options[:timeout]}&retry=#{options[:retry]}" if options[:timeout]
|
61
60
|
xml_swf_path << "&stage_width=#{options[:width]}&stage_height=#{options[:height]}" if options[:use_stage] == true
|
@@ -101,7 +100,6 @@ module Ziya
|
|
101
100
|
JS
|
102
101
|
end
|
103
102
|
|
104
|
-
# -------------------------------------------------------------------------
|
105
103
|
# generates necessary html tags to display a gauge.
|
106
104
|
def ziya_gauge( url, gauge_options={} )
|
107
105
|
options = { :width => "200",
|
@@ -121,7 +119,6 @@ module Ziya
|
|
121
119
|
generate_old_style_flash_tag( url, gauges_swf, options )
|
122
120
|
end
|
123
121
|
|
124
|
-
# -------------------------------------------------------------------------------------
|
125
122
|
# generates neccessary html tags to display a chart.
|
126
123
|
def ziya_chart( url, chart_options = {} )
|
127
124
|
options = { :width => "400",
|
@@ -138,7 +135,8 @@ module Ziya
|
|
138
135
|
:use_stage => false
|
139
136
|
}.merge!(chart_options)
|
140
137
|
|
141
|
-
|
138
|
+
flash_vars = url ? charts_swf : charts_swf_no_src
|
139
|
+
generate_flash_tag( url, flash_vars, "charts.swf", options )
|
142
140
|
end
|
143
141
|
|
144
142
|
# flash chart library path
|
@@ -150,19 +148,20 @@ module Ziya
|
|
150
148
|
# private
|
151
149
|
|
152
150
|
# Const accessors...
|
153
|
-
def mime()
|
154
|
-
def composite_url()
|
155
|
-
def
|
156
|
-
def
|
157
|
-
def
|
158
|
-
def
|
159
|
-
def
|
160
|
-
def
|
161
|
-
def
|
151
|
+
def mime() "application/x-shockwave-flash"; end
|
152
|
+
def composite_url() "%s/charts.swf?library_path=%s/charts_library&xml_source=%s" end
|
153
|
+
def charts_swf_no_src() "library_path=%s/charts_library"; end
|
154
|
+
def charts_swf() "#{charts_swf_no_src}&xml_source=%s"; end
|
155
|
+
def plugin_url() "http://www.macromedia.com/go/getflashplayer"; end
|
156
|
+
def gauges_swf() "%s/gauge.swf?xml_source=%s"; end
|
157
|
+
def gauge_path() "/gauges"; end
|
158
|
+
def chart_path() "/charts"; end
|
159
|
+
def class_id() "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" end
|
160
|
+
def codebase() "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0"; end
|
162
161
|
|
163
162
|
# generates swf path
|
164
163
|
def gen_swf_path( path_directive, swf_dir, url )
|
165
|
-
path_directive % [swf_dir, escape_url( url )]
|
164
|
+
path_directive % [swf_dir, escape_url( url )]
|
166
165
|
end
|
167
166
|
|
168
167
|
def generate_old_style_flash_tag( url, swf_path, options )
|
@@ -230,69 +229,45 @@ module Ziya
|
|
230
229
|
xml_swf_path << "&timeout=#{options[:timeout]}" if options[:timeout]
|
231
230
|
xml_swf_path << "&stage_width=#{options[:width]}&stage_height=#{options[:height]}" if options[:use_stage] == true
|
232
231
|
|
233
|
-
|
234
|
-
|
235
|
-
<
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
<
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
width="#{options[:width]}"/>
|
232
|
+
tags = <<-TAGS
|
233
|
+
<object codebase="#{codebase}" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="#{options[:id]}" height="#{options[:height]}" width="#{options[:width]}">
|
234
|
+
<param name="scale" value="noscale">
|
235
|
+
<param name="salign" value="#{options[:salign]}">
|
236
|
+
<param name="bgcolor" value="#{options[:bgcolor]}">
|
237
|
+
<param name="wmode" value="#{options[:wmode]}">
|
238
|
+
<param name="movie" value="#{options[:swf_path]}/#{swf_file}">
|
239
|
+
<param name="Flashvars" value="#{xml_swf_path}&chart_id=#{options[:id]}">
|
240
|
+
<param name="menu" value="true">
|
241
|
+
<param name="allowFullScreen" value="true">
|
242
|
+
<param name="allowScriptAccess" value="sameDomain">
|
243
|
+
<param name="quality" value="high">
|
244
|
+
<param name="play" value="true">
|
245
|
+
<param name="devicefont" value="false">
|
246
|
+
<embed scale="noscale"
|
247
|
+
allowfullscreen = "true"
|
248
|
+
allowscriptaccess = "sameDomain"
|
249
|
+
bgcolor = "#{options[:bgcolor]}"
|
250
|
+
devicefont = "false"
|
251
|
+
flashvars = "#{xml_swf_path}&chart_id=#{options[:id]}"
|
252
|
+
menu = "true"
|
253
|
+
name = "#{options[:id]}"
|
254
|
+
play = "true"
|
255
|
+
pluginspage = "http://www.macromedia.com/go/getflashplayer"
|
256
|
+
quality = "high"
|
257
|
+
salign = "#{options[:salign]}"
|
258
|
+
src = "#{options[:swf_path]}/#{swf_file}"
|
259
|
+
type = "application/x-shockwave-flash"
|
260
|
+
wmode = "#{options[:wmode]}"
|
261
|
+
align = "#{options[:align]}"
|
262
|
+
height = "#{options[:height]}"
|
263
|
+
width = "#{options[:width]}"/>
|
266
264
|
</object>
|
267
265
|
TAGS
|
268
|
-
# else
|
269
|
-
# tags = <<-TAGS
|
270
|
-
# <embed scale="noscale"
|
271
|
-
# allowfullscreen="true"
|
272
|
-
# allowscriptaccess="sameDomain"
|
273
|
-
# bgcolor="#{options[:bgcolor]}"
|
274
|
-
# devicefont="false"
|
275
|
-
# flashvars="#{xml_swf_path}"
|
276
|
-
# menu="true"
|
277
|
-
# name="#{options[:id]}"
|
278
|
-
# play="true"
|
279
|
-
# pluginspage="http://www.macromedia.com/go/getflashplayer"
|
280
|
-
# quality="high"
|
281
|
-
# salign="#{options[:salign]}"
|
282
|
-
# src="#{options[:swf_path]}/#{swf_file}"
|
283
|
-
# type="application/x-shockwave-flash"
|
284
|
-
# wmode="#{options[:wmode]}"
|
285
|
-
# align="#{options[:align]}"
|
286
|
-
# height="#{options[:height]}"
|
287
|
-
# width="#{options[:width]}"/>
|
288
|
-
# TAGS
|
289
|
-
# end
|
290
|
-
tags
|
291
266
|
end
|
292
267
|
|
293
268
|
# escape url
|
294
269
|
def escape_url( url )
|
295
|
-
CGI.escape( url.gsub( /&/, '&' ) )
|
270
|
+
url ? CGI.escape( url.gsub( /&/, '&' ) ) : url
|
296
271
|
end
|
297
272
|
|
298
273
|
# setup up wmode
|
data/spec/charts/base_spec.rb
CHANGED
@@ -82,6 +82,12 @@ describe Ziya::Charts::Base do
|
|
82
82
|
@chart.add( :series, "test", [ {:value => 10, :glow => "glow1" }, { :value => 20, :blur => "blur2" } ] )
|
83
83
|
@chart.to_xml.should == "<?xml version=\"1.0\" encoding=\"UTF-8\"?><chart><chart_data><row><null/><string>dog</string><string>cat</string></row><row><string>test</string><number glow=\"glow1\">10</number><number blur=\"blur2\">20</number></row></chart_data></chart>"
|
84
84
|
end
|
85
|
+
|
86
|
+
it "should support adding an image to a series" do
|
87
|
+
@chart.add( :axis_category_text, %w[dog cat] )
|
88
|
+
@chart.add( :series, "test", [ 10, 20 ], "some_url" )
|
89
|
+
@chart.to_xml.should == "<?xml version=\"1.0\" encoding=\"UTF-8\"?><chart><chart_data><row><null/><string>dog</string><string>cat</string></row><row url=\"some_url\"><string>test</string><number>10</number><number>20</number></row></chart_data></chart>"
|
90
|
+
end
|
85
91
|
|
86
92
|
it "should error if a series is defined but no axis_category is specified" do
|
87
93
|
@chart.add( :series, "test", [10,20] )
|
data/spec/ziya_helper_spec.rb
CHANGED
@@ -25,11 +25,11 @@ describe Ziya::Helper do
|
|
25
25
|
|
26
26
|
describe "ziya_chart" do
|
27
27
|
it "should generate the correct embed tag with the default options" do
|
28
|
-
ziya_chart( @url, :tag_type => "embed" ).should == "
|
28
|
+
ziya_chart( @url, :tag_type => "embed" ).should == " <object codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" id=\"ziya_chart\" height=\"300\" width=\"400\">\n <param name=\"scale\" value=\"noscale\">\n <param name=\"salign\" value=\"tl\"> \n <param name=\"bgcolor\" value=\"#FFFFFF\">\n <param name=\"wmode\" value=\"transparent\"> \n <param name=\"movie\" value=\"/charts/charts.swf\">\n <param name=\"Flashvars\" value=\"library_path=/charts/charts_library&xml_source=%2Ffred%2Fblee%2Fduh&chart_id=ziya_chart\">\n <param name=\"menu\" value=\"true\">\n <param name=\"allowFullScreen\" value=\"true\">\n <param name=\"allowScriptAccess\" value=\"sameDomain\"> \n <param name=\"quality\" value=\"high\">\n <param name=\"play\" value=\"true\"> \n <param name=\"devicefont\" value=\"false\">\n <embed scale=\"noscale\" \n allowfullscreen = \"true\" \n allowscriptaccess = \"sameDomain\" \n bgcolor = \"#FFFFFF\" \n devicefont = \"false\" \n flashvars = \"library_path=/charts/charts_library&xml_source=%2Ffred%2Fblee%2Fduh&chart_id=ziya_chart\" \n menu = \"true\" \n name = \"ziya_chart\" \n play = \"true\" \n pluginspage = \"http://www.macromedia.com/go/getflashplayer\" \n quality = \"high\" \n salign = \"tl\" \n src = \"/charts/charts.swf\" \n type = \"application/x-shockwave-flash\" \n wmode = \"transparent\" \n align = \"l\" \n height = \"300\" \n width = \"400\"/> \n </object> \n"
|
29
29
|
end
|
30
30
|
|
31
31
|
it "should generate the correct object tag with the default options" do
|
32
|
-
ziya_chart( @url, :tag_type => "object" ).should == "
|
32
|
+
ziya_chart( @url, :tag_type => "object" ).should == " <object codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" id=\"ziya_chart\" height=\"300\" width=\"400\">\n <param name=\"scale\" value=\"noscale\">\n <param name=\"salign\" value=\"tl\"> \n <param name=\"bgcolor\" value=\"#FFFFFF\">\n <param name=\"wmode\" value=\"transparent\"> \n <param name=\"movie\" value=\"/charts/charts.swf\">\n <param name=\"Flashvars\" value=\"library_path=/charts/charts_library&xml_source=%2Ffred%2Fblee%2Fduh&chart_id=ziya_chart\">\n <param name=\"menu\" value=\"true\">\n <param name=\"allowFullScreen\" value=\"true\">\n <param name=\"allowScriptAccess\" value=\"sameDomain\"> \n <param name=\"quality\" value=\"high\">\n <param name=\"play\" value=\"true\"> \n <param name=\"devicefont\" value=\"false\">\n <embed scale=\"noscale\" \n allowfullscreen = \"true\" \n allowscriptaccess = \"sameDomain\" \n bgcolor = \"#FFFFFF\" \n devicefont = \"false\" \n flashvars = \"library_path=/charts/charts_library&xml_source=%2Ffred%2Fblee%2Fduh&chart_id=ziya_chart\" \n menu = \"true\" \n name = \"ziya_chart\" \n play = \"true\" \n pluginspage = \"http://www.macromedia.com/go/getflashplayer\" \n quality = \"high\" \n salign = \"tl\" \n src = \"/charts/charts.swf\" \n type = \"application/x-shockwave-flash\" \n wmode = \"transparent\" \n align = \"l\" \n height = \"300\" \n width = \"400\"/> \n </object> \n"
|
33
33
|
end
|
34
34
|
|
35
35
|
it "should generate the correct js tag" do
|
@@ -37,14 +37,14 @@ describe Ziya::Helper do
|
|
37
37
|
end
|
38
38
|
|
39
39
|
it "should generate the correct js based chart tag" do
|
40
|
-
ziya_chart_js( @url ).should == " <script language=\"javascript\" type=\"text/javascript\">\n if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {\n alert( \"This page requires AC_RunActiveContent.js.\" );\n } \n else {\n var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);\n if( hasRightVersion ) { \n AC_FL_RunContent(\n 'codebase' , 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0',\n 'width' , '400',\n 'height' , '300',\n 'scale' , 'noscale',\n 'salign' , 'tl',\n 'bgcolor' , '000000',\n 'wmode' , 'opaque',\n 'movie' , '/charts/charts',\n 'src' , '/charts/charts',\n 'FlashVars' , 'library_path=/charts/charts_library&xml_source=%2Ffred%2Fblee%2Fduh', \n 'id' , 'ziya_chart',\n 'name' , 'ziya_chart',\n 'menu' , 'true',\n 'allowFullScreen' , 'true',\n 'allowScriptAccess','sameDomain',\n 'quality' , 'high',\n 'align' , 'l',\n 'pluginspage' , 'http://www.macromedia.com/go/getflashplayer',\n 'play' , 'true',\n 'devicefont' , 'false'\n ); \n } \n else { \n var alternateContent = 'This content requires the Adobe Flash Player. '\n + '<u><a href=http://www.macromedia.com/go/getflash/>Get Flash</a></u>.';\n document.write(alternateContent); \n }\n }\n </script>\n"
|
40
|
+
ziya_chart_js( @url ).should == " <script language=\"javascript\" type=\"text/javascript\">\n if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {\n alert( \"This page requires AC_RunActiveContent.js.\" );\n } \n else {\n var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);\n if( hasRightVersion ) { \n AC_FL_RunContent(\n 'codebase' , 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0',\n 'width' , '400',\n 'height' , '300',\n 'scale' , 'noscale',\n 'salign' , 'tl',\n 'bgcolor' , '000000',\n 'wmode' , 'opaque',\n 'movie' , '/charts/charts',\n 'src' , '/charts/charts',\n 'FlashVars' , 'library_path=/charts/charts_library&xml_source=%2Ffred%2Fblee%2Fduh&chart_id=ziya_chart', \n 'id' , 'ziya_chart',\n 'name' , 'ziya_chart',\n 'menu' , 'true',\n 'allowFullScreen' , 'true',\n 'allowScriptAccess','sameDomain',\n 'quality' , 'high',\n 'align' , 'l',\n 'pluginspage' , 'http://www.macromedia.com/go/getflashplayer',\n 'play' , 'true',\n 'devicefont' , 'false'\n ); \n } \n else { \n var alternateContent = 'This content requires the Adobe Flash Player. '\n + '<u><a href=http://www.macromedia.com/go/getflash/>Get Flash</a></u>.';\n document.write(alternateContent); \n }\n }\n </script>\n"
|
41
41
|
end
|
42
42
|
|
43
43
|
it "should set the wmode to opaque if bg_color is set" do
|
44
44
|
html = ziya_chart( @url, :bgcolor => "ffffff" )
|
45
45
|
# html.index (/name=\"wmode\" value=\"opaque\"/).should_not be_nil
|
46
46
|
# html.index (/'wmode'\s+,\s'opaque'/).should_not be_nil
|
47
|
-
html.index( /wmode
|
47
|
+
html.index( /wmode\s+=\s\"opaque\"/ ).should_not be_nil
|
48
48
|
end
|
49
49
|
|
50
50
|
it "should handle the size has widthxheight" do
|
@@ -114,4 +114,4 @@ describe Ziya::Helper do
|
|
114
114
|
end
|
115
115
|
end
|
116
116
|
|
117
|
-
end
|
117
|
+
end
|