rgraph-rails 4.62 → 4.64

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +3 -4
  3. data/lib/rgraph-rails/version.rb +1 -1
  4. data/vendor/assets/javascripts/RGraph.bar.js +240 -3742
  5. data/vendor/assets/javascripts/RGraph.bipolar.js +165 -2005
  6. data/vendor/assets/javascripts/RGraph.common.annotate.js +35 -395
  7. data/vendor/assets/javascripts/RGraph.common.context.js +30 -595
  8. data/vendor/assets/javascripts/RGraph.common.core.js +418 -5359
  9. data/vendor/assets/javascripts/RGraph.common.csv.js +20 -276
  10. data/vendor/assets/javascripts/RGraph.common.deprecated.js +35 -450
  11. data/vendor/assets/javascripts/RGraph.common.dynamic.js +88 -1395
  12. data/vendor/assets/javascripts/RGraph.common.effects.js +90 -1545
  13. data/vendor/assets/javascripts/RGraph.common.key.js +52 -753
  14. data/vendor/assets/javascripts/RGraph.common.resizing.js +37 -563
  15. data/vendor/assets/javascripts/RGraph.common.sheets.js +29 -352
  16. data/vendor/assets/javascripts/RGraph.common.tooltips.js +32 -450
  17. data/vendor/assets/javascripts/RGraph.common.zoom.js +14 -219
  18. data/vendor/assets/javascripts/RGraph.cornergauge.js +71 -0
  19. data/vendor/assets/javascripts/RGraph.drawing.background.js +34 -570
  20. data/vendor/assets/javascripts/RGraph.drawing.circle.js +33 -544
  21. data/vendor/assets/javascripts/RGraph.drawing.image.js +51 -755
  22. data/vendor/assets/javascripts/RGraph.drawing.marker1.js +37 -645
  23. data/vendor/assets/javascripts/RGraph.drawing.marker2.js +36 -633
  24. data/vendor/assets/javascripts/RGraph.drawing.marker3.js +35 -514
  25. data/vendor/assets/javascripts/RGraph.drawing.poly.js +37 -559
  26. data/vendor/assets/javascripts/RGraph.drawing.rect.js +33 -548
  27. data/vendor/assets/javascripts/RGraph.drawing.text.js +36 -664
  28. data/vendor/assets/javascripts/RGraph.drawing.xaxis.js +50 -812
  29. data/vendor/assets/javascripts/RGraph.drawing.yaxis.js +51 -856
  30. data/vendor/assets/javascripts/RGraph.fuel.js +58 -964
  31. data/vendor/assets/javascripts/RGraph.funnel.js +55 -984
  32. data/vendor/assets/javascripts/RGraph.gantt.js +77 -1354
  33. data/vendor/assets/javascripts/RGraph.gauge.js +85 -1421
  34. data/vendor/assets/javascripts/RGraph.hbar.js +162 -2788
  35. data/vendor/assets/javascripts/RGraph.hprogress.js +80 -1401
  36. data/vendor/assets/javascripts/RGraph.line.js +249 -4248
  37. data/vendor/assets/javascripts/RGraph.meter.js +74 -1280
  38. data/vendor/assets/javascripts/RGraph.modaldialog.js +19 -301
  39. data/vendor/assets/javascripts/RGraph.odo.js +71 -1264
  40. data/vendor/assets/javascripts/RGraph.pie.js +137 -2288
  41. data/vendor/assets/javascripts/RGraph.radar.js +110 -1847
  42. data/vendor/assets/javascripts/RGraph.rose.js +108 -1977
  43. data/vendor/assets/javascripts/RGraph.rscatter.js +80 -1432
  44. data/vendor/assets/javascripts/RGraph.scatter.js +172 -3163
  45. data/vendor/assets/javascripts/RGraph.semicircularprogress.js +60 -1120
  46. data/vendor/assets/javascripts/RGraph.svg.bar.js +66 -1735
  47. data/vendor/assets/javascripts/RGraph.svg.common.ajax.js +21 -246
  48. data/vendor/assets/javascripts/RGraph.svg.common.core.js +255 -3937
  49. data/vendor/assets/javascripts/RGraph.svg.common.csv.js +20 -276
  50. data/vendor/assets/javascripts/RGraph.svg.common.fx.js +68 -1303
  51. data/vendor/assets/javascripts/RGraph.svg.common.key.js +19 -205
  52. data/vendor/assets/javascripts/RGraph.svg.common.sheets.js +29 -352
  53. data/vendor/assets/javascripts/RGraph.svg.common.tooltips.js +22 -273
  54. data/vendor/assets/javascripts/RGraph.svg.funnel.js +32 -0
  55. data/vendor/assets/javascripts/RGraph.svg.hbar.js +59 -1400
  56. data/vendor/assets/javascripts/RGraph.svg.line.js +70 -1580
  57. data/vendor/assets/javascripts/RGraph.svg.pie.js +55 -1131
  58. data/vendor/assets/javascripts/RGraph.svg.radar.js +57 -1502
  59. data/vendor/assets/javascripts/RGraph.svg.rose.js +66 -1817
  60. data/vendor/assets/javascripts/RGraph.svg.scatter.js +58 -1261
  61. data/vendor/assets/javascripts/RGraph.svg.semicircularprogress.js +28 -865
  62. data/vendor/assets/javascripts/RGraph.svg.waterfall.js +45 -1252
  63. data/vendor/assets/javascripts/RGraph.thermometer.js +63 -1136
  64. data/vendor/assets/javascripts/RGraph.vprogress.js +83 -1470
  65. data/vendor/assets/javascripts/RGraph.waterfall.js +83 -1347
  66. metadata +5 -4
  67. data/vendor/assets/javascripts/financial-data.js +0 -1067
@@ -1,277 +1,21 @@
1
- // version: 2017-05-08
2
- /**
3
- * o--------------------------------------------------------------------------------o
4
- * | This file is part of the RGraph package - you can learn more at: |
5
- * | |
6
- * | http://www.rgraph.net |
7
- * | |
8
- * | RGraph is licensed under the Open Source MIT license. That means that it's |
9
- * | totally free to use! |
10
- * o--------------------------------------------------------------------------------o
11
- */
12
1
 
13
- /**
14
- * Initialise the various objects
15
- */
16
- RGraph = window.RGraph || {isRGraph: true};
17
-
18
-
19
-
20
-
21
- RGraph.CSV = function (url, func)
22
- {
23
- var RG = RGraph,
24
- ua = navigator.userAgent,
25
- ma = Math;
26
-
27
-
28
-
29
-
30
- /**
31
- * Some default values
32
- */
33
- this.url = url;
34
- this.ready = func;
35
- this.data = null;
36
- this.numrows = null;
37
- this.numcols = null;
38
- this.seperator = arguments[2] || ',';
39
- this.endofline = arguments[3] || /\r?\n/;
40
-
41
-
42
-
43
-
44
- /**
45
- * A Custom split function
46
- *
47
- * @param string str The CSV string to split
48
- * @param mixed char The character to split on - or it can also be an object like this:
49
- * {
50
- * preserve: false, // Whether to preserve whitespace
51
- * char: ',' // The character to split on
52
- * }
53
- */
54
- this.splitCSV = function (str, split)
55
- {
56
- // Defaults
57
- var arr = [];
58
- var field = '';
59
- var inDoubleQuotes = false;
60
- var inSingleQuotes = false;
61
- var preserve = (typeof split === 'object' && split.preserve) ? true : false;
62
-
63
- // The character to split the CSV string on
64
- if (typeof split === 'object') {
65
- if (typeof split.char === 'string') {
66
- split = split.char;
67
- } else {
68
- split = ',';
69
- }
70
- } // If not an object just leave the char as it's supplied
71
-
72
-
73
-
74
- for (var i=0,len=str.length; i<len; i+=1) {
75
-
76
- char = str.charAt(i);
77
-
78
- if ( (char === '"') && !inDoubleQuotes) {
79
- inDoubleQuotes = true;
80
- continue;
81
-
82
- } else if ( (char === '"') && inDoubleQuotes) {
83
- inDoubleQuotes = false;
84
- continue;
85
- }
86
- if ( (char === "'") && !inSingleQuotes) {
87
- inSingleQuotes = true;
88
- continue;
89
-
90
- } else if ( (char === "'") && inSingleQuotes) {
91
- inSingleQuotes = false;
92
- continue;
93
-
94
- } else if (char === split && !inDoubleQuotes && !inSingleQuotes) {
95
- // TODO look ahead in order to allow for multi-character seperators
96
- arr.push(field);
97
- field = '';
98
- continue;
99
-
100
- } else {
101
- field = field + char;
102
- }
103
- }
104
-
105
- // Add the last field
106
- arr.push(field);
107
-
108
- // Now trim each value if necessary
109
- if (!preserve) {
110
- for (i=0,len=arr.length; i<len; i+=1) {
111
- arr[i] = arr[i].trim();
112
- }
113
- }
114
-
115
- return arr;
116
- };
117
-
118
-
119
-
120
-
121
- /**
122
- * This function splits the CSV data into an array so that it can be useful.
123
- */
124
- this.fetch = function ()
125
- {
126
- var sep = this.seperator,
127
- eol = this.endofline,
128
- obj = this;
129
-
130
- if (this.url.substring(0,3) === 'id:' || this.url.substring(0,4) === 'str:') {
131
-
132
- // Get rid of any surrounding whitespace
133
- if (this.url.substring(0,3) === 'id:') {
134
- var data = document.getElementById(this.url.substring(3)).innerHTML.trim();
135
-
136
- } else if (this.url.substring(0,4) === 'str:') {
137
- var data = this.url.substring(4).trim();
138
- }
139
-
140
- // Store the CSV data on the CSV object (ie - this object)
141
- obj.data = data.split(eol);
142
-
143
- // Store the number of rows
144
- obj.numrows = obj.data.length;
145
-
146
- for (var i=0,len=obj.data.length; i<len; i+=1) {
147
-
148
-
149
- /**
150
- * Split the individual line
151
- */
152
- //var row = obj.data[i].split(sep);
153
- var row = obj.splitCSV(obj.data[i], {preserve: false, char: sep});
154
-
155
-
156
- if (!obj.numcols) {
157
- obj.numcols = row.length;
158
- }
159
-
160
- /**
161
- * If the cell is purely made up of numbers - convert it
162
- */
163
- for (var j=0; j<row.length; j+=1) {
164
- if ((/^\-?[0-9.]+$/).test(row[j])) {
165
- row[j] = parseFloat(row[j]);
166
- }
167
-
168
- // Assign the split-up-row back to the data array
169
- obj.data[i] = row;
170
- }
171
- }
172
-
173
- // Call the ready function straight away
174
- obj.ready(obj);
175
-
176
- } else {
177
-
178
- RGraph.SVG.AJAX.getString(this.url, function (data)
179
- {
180
- data = data.replace(/(\r?\n)+$/, '');
181
-
182
- /**
183
- * Split the lines in the CSV
184
- */
185
- obj.data = data.split(eol);
186
-
187
- /**
188
- * Store the number of rows
189
- */
190
- obj.numrows = obj.data.length;
191
-
192
-
193
-
194
- /**
195
- * Loop thru each lines in the CSV file
196
- */
197
- for (var i=0,len=obj.data.length; i<len; i+=1) {
198
- /**
199
- * Use the new split function to split each row NOT preserving whitespace
200
- */
201
- //var row = obj.data[i].split(sep);
202
- var row = obj.splitCSV(obj.data[i], {preserve: false, char: sep});
203
-
204
- if (!obj.numcols) {
205
- obj.numcols = row.length;
206
- }
207
-
208
- /**
209
- * If the cell is purely made up of numbers - convert it
210
- */
211
- for (var j=0; j<row.length; j+=1) {
212
- if ((/^\-?[0-9.]+$/).test(row[j])) {
213
- row[j] = parseFloat(row[j]);
214
- }
215
-
216
- // Assign the split-up-row back to the data array
217
- obj.data[i] = row;
218
- }
219
-
220
- }
221
-
222
- // Call the ready function straight away
223
- obj.ready(obj);
224
- });
225
- }
226
- };
227
-
228
-
229
-
230
-
231
- /**
232
- * Returns a row of the CSV file
233
- *
234
- * @param number index The index of the row to fetch
235
- * @param start OPTIONAL If desired you can specify a column to start at (which starts at 0 by default)
236
- */
237
- this.getRow = function (index)
238
- {
239
- var row = [];
240
- var start = arguments[1] || 0;
241
-
242
- for (var i=start; i<this.numcols; i+=1) {
243
- row.push(this.data[index][i]);
244
- }
245
-
246
- return row;
247
- };
248
-
249
-
250
-
251
-
252
- /**
253
- * Returns a column of the CSV file
254
- *
255
- * @param number index The index of the column to fetch
256
- * @param start OPTIONAL If desired you can specify a row to start at (which starts at 0 by default)
257
- */
258
- this.getCol =
259
- this.getColumn = function (index)
260
- {
261
- var col = [];
262
- var start = arguments[1] || 0;
263
-
264
- for (var i=start; i<this.numrows; i+=1) {
265
- col.push(this.data[i][index]);
266
- }
267
-
268
- return col;
269
- };
270
-
271
-
272
-
273
-
274
-
275
- // Fetch the CSV file
276
- this.fetch();
277
- };
2
+ RGraph=window.RGraph||{isRGraph:true};RGraph.CSV=function(url,func)
3
+ {var RG=RGraph,ua=navigator.userAgent,ma=Math;this.url=url;this.ready=func;this.data=null;this.numrows=null;this.numcols=null;this.seperator=arguments[2]||',';this.endofline=arguments[3]||/\r?\n/;this.splitCSV=function(str,split)
4
+ {var arr=[];var field='';var inDoubleQuotes=false;var inSingleQuotes=false;var preserve=(typeof split==='object'&&split.preserve)?true:false;if(typeof split==='object'){if(typeof split.char==='string'){split=split.char;}else{split=',';}}
5
+ for(var i=0,len=str.length;i<len;i+=1){char=str.charAt(i);if((char==='"')&&!inDoubleQuotes){inDoubleQuotes=true;continue;}else if((char==='"')&&inDoubleQuotes){inDoubleQuotes=false;continue;}
6
+ if((char==="'")&&!inSingleQuotes){inSingleQuotes=true;continue;}else if((char==="'")&&inSingleQuotes){inSingleQuotes=false;continue;}else if(char===split&&!inDoubleQuotes&&!inSingleQuotes){arr.push(field);field='';continue;}else{field=field+char;}}
7
+ arr.push(field);if(!preserve){for(i=0,len=arr.length;i<len;i+=1){arr[i]=arr[i].trim();}}
8
+ return arr;};this.fetch=function()
9
+ {var sep=this.seperator,eol=this.endofline,obj=this;if(this.url.substring(0,3)==='id:'||this.url.substring(0,4)==='str:'){if(this.url.substring(0,3)==='id:'){var data=document.getElementById(this.url.substring(3)).innerHTML.trim();}else if(this.url.substring(0,4)==='str:'){var data=this.url.substring(4).trim();}
10
+ obj.data=data.split(eol);obj.numrows=obj.data.length;for(var i=0,len=obj.data.length;i<len;i+=1){var row=obj.splitCSV(obj.data[i],{preserve:false,char:sep});if(!obj.numcols){obj.numcols=row.length;}
11
+ for(var j=0;j<row.length;j+=1){if((/^\-?[0-9.]+$/).test(row[j])){row[j]=parseFloat(row[j]);}
12
+ obj.data[i]=row;}}
13
+ obj.ready(obj);}else{RGraph.SVG.AJAX.getString(this.url,function(data)
14
+ {data=data.replace(/(\r?\n)+$/,'');obj.data=data.split(eol);obj.numrows=obj.data.length;for(var i=0,len=obj.data.length;i<len;i+=1){var row=obj.splitCSV(obj.data[i],{preserve:false,char:sep});if(!obj.numcols){obj.numcols=row.length;}
15
+ for(var j=0;j<row.length;j+=1){if((/^\-?[0-9.]+$/).test(row[j])){row[j]=parseFloat(row[j]);}
16
+ obj.data[i]=row;}}
17
+ obj.ready(obj);});}};this.getRow=function(index)
18
+ {var row=[];var start=arguments[1]||0;for(var i=start;i<this.numcols;i+=1){row.push(this.data[index][i]);}
19
+ return row;};this.getCol=this.getColumn=function(index)
20
+ {var col=[];var start=arguments[1]||0;for(var i=start;i<this.numrows;i+=1){col.push(this.data[i][index]);}
21
+ return col;};this.fetch();};
@@ -1,1304 +1,69 @@
1
- // version: 2017-05-08
2
- /**
3
- * o--------------------------------------------------------------------------------o
4
- * | This file is part of the RGraph package - you can learn more at: |
5
- * | |
6
- * | http://www.rgraph.net |
7
- * | |
8
- * | RGraph is licensed under the Open Source MIT license. That means that it's |
9
- * | totally free to use! |
10
- * o--------------------------------------------------------------------------------o
11
- */
12
1
 
13
- /**
14
- * This is a library of a few functions that make it easier to do
15
- * effects like fade-ins or eaxpansion.
16
- */
17
-
18
- /**
19
- * Initialise the various objects
20
- */
21
- RGraph = window.RGraph || {isRGraph: true};
22
- RGraph.SVG = RGraph.SVG || {};
23
- RGraph.SVG.FX = RGraph.SVG.FX || {};
24
-
25
- // Module pattern
26
- (function (win, doc, undefined)
27
- {
28
- var RG = RGraph,
29
- ua = navigator.userAgent,
30
- ma = Math;
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
- /**
40
- * This functions adds the generic effects to thechart object
41
- *
42
- * @param object obj The chart object
43
- */
44
- RG.SVG.FX.decorate = function (obj)
45
- {
46
- for (i in RG.SVG.FX) {
47
- if (typeof RG.SVG.FX[i] === 'function') {
48
- obj[i] = RG.SVG.FX[i];
49
- }
50
- }
51
- };
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
- /**
61
- * fadeIn
62
- *
63
- * This function simply uses the CSS opacity property - initially set to zero and
64
- * increasing to 1 over the period of 0.5 second
65
- */
66
- RG.SVG.FX.fadein = function ()
67
- {
68
- // This function gets added to the chart object - so the this
69
- // variable is the chart object
70
- var obj = this,
71
- opt = arguments[0] || {},
72
- frames = opt.frames || 90,
73
- duration = (frames / 60) * 1000,
74
- frame = 0,
75
- callback = opt.callback || function () {};
76
-
77
-
78
- // Initially the opacity should be zero
79
- obj.svg.style.opacity = 0;
80
-
81
- // Draw the chart
82
- RG.SVG.redraw(this.svg);
83
-
84
- // Now fade the chart in
85
- for (var i=1; i<=frames; ++i) {
86
- (function (index)
87
- {
88
- setTimeout(function ()
89
- {
90
- obj.svg.style.opacity = (index / frames);
91
-
92
- if (index >= frames) {
93
- callback(obj);
94
- }
95
-
96
- }, (index / frames) * duration);
97
- })(i)
98
- }
99
-
100
-
101
- return this;
102
- };
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
- /**
112
- * fadeOut
113
- *
114
- * This function is a reversal of the above function - fading out instead of in
115
- */
116
- RG.SVG.FX.fadeout = function ()
117
- {
118
- // This function gets added to the chart object - so the this
119
- // variable is the chart object
120
- var obj = this,
121
- opt = arguments[0] || {},
122
- frames = opt.frames || 90,
123
- duration = (frames / 60) * 1000,
124
- frame = 0,
125
- callback = opt.callback || function () {};
126
-
127
- //RG.SVG.redraw()
128
-
129
- // Now fade the chart out
130
- for (var i=1; i<=frames; ++i) {
131
- (function (index)
132
- {
133
- setTimeout(function ()
134
- {
135
- obj.svg.style.opacity = 1 - (index / frames);
136
-
137
- if (index >= frames) {
138
- callback(obj);
139
- }
140
- }, (index / frames) * duration);
141
- })(i)
142
- }
143
-
144
- return this;
145
- };
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
- /**
155
- * fadeSlideIn
156
- *
157
- * This function fades the canvas in in a sliding motion
158
- */
159
- RG.SVG.FX.fadeslidein = function ()
160
- {
161
- // This function gets added to the chart object - so the this
162
- // variable is the chart object
163
- var obj = this,
164
- opt = arguments[0] || {},
165
- frames = opt.frames || 90,
166
- frame = 0,
167
- pc = -20,
168
- step = (120 - pc) / frames,
169
- color = opt.color || 'white',
170
- width = this.container.offsetWidth,
171
- height = this.container.offsetHeight,
172
- callback = opt.callback || function () {};
173
-
174
-
175
- // Draw the chart
176
- RG.SVG.redraw(this.svg);
177
-
178
-
179
- // Create the cover
180
- $('<div id="rgraph_fadeslide_cover_' + obj.id + '"></div>').css({
181
- background: 'linear-gradient(135deg, rgba(255,255,255,0) ' + pc + '%, ' + color + ' ' + (pc + 20) + '%)',
182
- width: width + 'px',
183
- height: height + 'px',
184
- top: 0,
185
- left: 0,
186
- position: 'absolute'
187
- }).appendTo($(this.container));
188
-
189
-
190
- function iterator ()
191
- {
192
- if (pc < 120) {
193
- $('div#rgraph_fadeslide_cover_' + obj.id).css({
194
- background: 'linear-gradient(135deg, rgba(255,255,255,0) ' + pc + '%, ' + color + ' ' + (pc + 20) + '%)'
195
- });
196
- pc += step;
197
- RG.SVG.FX.update(iterator);
198
-
199
- } else {
200
-
201
- $('div#rgraph_fadeslide_cover_' + obj.id).remove();
202
-
203
- callback(obj);
204
- }
205
- }
206
-
207
- iterator();
208
-
209
- return this;
210
- };
211
-
212
-
213
-
214
-
215
-
216
-
217
-
218
- //
219
- // fadeSlideOut
220
- //
221
- // Fades the canvas out in a sliding motion. This function gets added
222
- // to the chart object - so the this variable is the chart object
223
- //
224
- RG.SVG.FX.fadeslideout = function ()
225
- {
226
- var obj = this,
227
- opt = arguments[0] || {},
228
- frames = opt.frames || 90,
229
- frame = 0,
230
- pc = -20,
231
- step = (120 - pc) / frames,
232
- canvasXY = RG.SVG.getSVGXY(obj.svg),
233
- color = opt.color || 'white',
234
- width = this.container.offsetWidth,
235
- height = this.container.offsetHeight,
236
- callback = opt.callback || function () {};
237
-
238
-
239
- // Draw the chart
240
- //RG.SVG.redraw(this.svg);
241
-
242
- // Create the cover
243
- $('<div id="rgraph_fadeslide_cover_' + obj.id + '"></div>').css({
244
- background: 'linear-gradient(135deg, ' + color + ' ' + pc + '%, rgba(255,255,255,0) ' + (pc + 20) + '%)',
245
- width: width + 'px',
246
- height: height + 'px',
247
- top: 0,
248
- left: 0,
249
- position: 'absolute'
250
- }).appendTo($(obj.svg.parentNode));
251
-
252
- function iterator ()
253
- {
254
- if (pc < 120) {
255
- $('div#rgraph_fadeslide_cover_' + obj.id).css({
256
- background: 'linear-gradient(135deg, ' + color + ' ' + pc + '%, rgba(255,255,255,0) ' + (pc + 20) + '%)'
257
- });
258
- pc += step;
259
- RG.SVG.FX.update(iterator);
260
-
261
- } else {
262
-
263
- RG.SVG.clear(obj.svg);
264
-
265
- $('div#rgraph_fadeslide_cover_' + obj.id).remove();
266
-
267
- callback(obj);
268
- }
269
- }
270
-
271
- iterator();
272
-
273
- return this;
274
- };
275
-
276
-
277
-
278
-
279
-
280
-
281
-
282
-
283
- //
284
- // fadeCircularIn
285
- //
286
- // This function uses radial CSS gradients to cover the canvas with a radial fade in effect
287
- // (from the center outwards)
288
- //
289
- RG.SVG.FX.fadecircularinoutwards = function ()
290
- {
291
- // This function gets added to the chart object - so the 'this'
292
- // variable is the chart object
293
- var obj = this,
294
- opt = arguments[0] || {},
295
- frames = opt.frames || 90,
296
- frame = 1,
297
- radius = 0,
298
- svgXY = RG.SVG.getSVGXY(obj.svg),
299
- color = opt.color || 'white',
300
- callback = opt.callback || function () {};
301
-
302
-
303
-
304
-
305
- // Draw the chart
306
- RG.SVG.redraw(this.svg);
307
-
308
-
309
-
310
- // Create the cover
311
- $('<div id="rgraph_fadecircularinoutwards_cover_' + obj.id + '"></div>').css({
312
- background: 'radial-gradient(rgba(255,255,255,0) 0%, ' + color + ' ' + radius + '%)',
313
- width: this.container.offsetWidth + 'px',
314
- height: this.container.offsetHeight + 'px',
315
- top: 0,
316
- left: 0,
317
- position: 'absolute'
318
- }).appendTo($(obj.svg.parentNode));
319
-
320
-
321
-
322
-
323
- function iterator ()
324
- {
325
- if (frame < frames) {
326
-
327
- $('div#rgraph_fadecircularinoutwards_cover_' + obj.id).css({
328
- background: 'radial-gradient(rgba(255,255,255,0) ' + ((frame++ / frames) * 100) + '%, ' + color + ' ' + ((frame++ / frames) * 150) + '%)'
329
- });
330
-
331
- RG.SVG.FX.update(iterator);
332
-
333
- } else {
334
-
335
- $('div#rgraph_fadecircularinoutwards_cover_' + obj.id).remove();
336
-
337
- callback(obj);
338
- }
339
- }
340
-
341
- iterator();
342
-
343
- return this;
344
- };
345
-
346
-
347
-
348
-
349
-
350
-
351
-
352
-
353
- //
354
- // fadecircularoutoutwards
355
- //
356
- // This function uses radial CSS gradients to cover the canvas with a radial fade out effect
357
- // (from the center outwards)
358
- //
359
- RG.SVG.FX.fadecircularoutoutwards = function ()
360
- {
361
- // This function gets added to the chart object - so the this
362
- // variable is the chart object
363
- var obj = this,
364
- opt = arguments[0] || {},
365
- frames = opt.frames || 90,
366
- frame = 0,
367
- width = this.container.offsetWidth,
368
- height = this.container.offsetHeight,
369
- canvasXY = RG.SVG.getSVGXY(obj.svg),
370
- color = opt.color || 'white',
371
- callback = opt.callback || function () {};
372
-
373
-
374
-
375
-
376
-
377
- // Draw the chart
378
- //RG.SVG.redraw(this.svg);
379
-
380
-
381
-
382
-
383
-
384
- // Create the cover
385
- $('<div id="rgraph_fadeslide_cover_' + obj.id + '"></div>').css({
386
- background: 'radial-gradient(rgba(255,255,255,0) 0%, transparent 0%)',
387
- width: width + 'px',
388
- height: height + 'px',
389
- top: 0,
390
- left: 0,
391
- position: 'absolute'
392
- }).appendTo($(obj.svg.parentNode));
393
-
394
-
395
-
396
-
397
- function iterator ()
398
- {
399
- if (frame < frames) {
400
-
401
- $('div#rgraph_fadeslide_cover_' + obj.id).css({
402
- background: 'radial-gradient(' + color + ' ' + ((frame++ / frames) * 100) + '%, rgba(255,255,255,0) ' + ((frame++ / frames) * 150) + '%)'
403
- });
404
- RG.SVG.FX.update(iterator);
405
-
406
- } else {
407
-
408
- RG.SVG.clear(obj.svg);
409
-
410
- $('div#rgraph_fadeslide_cover_' + obj.id).remove();
411
-
412
- callback(obj);
413
- }
414
- }
415
-
416
- iterator();
417
-
418
- return this;
419
- };
420
-
421
-
422
-
423
-
424
-
425
-
426
-
427
-
428
- //
429
- // fadeCircularInInwards
430
- //
431
- // This function gets added to the chart object - so the 'this'
432
- // variable is the chart object
433
- //
434
- RG.SVG.FX.fadecircularininwards = function ()
435
- {
436
- var obj = this,
437
- opt = arguments[0] || {},
438
- frames = opt.frames || 90,
439
- frame = 0,
440
- radius = ma.max(
441
- obj.container.offsetWidth,
442
- obj.container.offsetHeight
443
- ),
444
- color = opt.color || 'white',
445
- callback = opt.callback || function () {};
446
-
447
-
448
- // Draw the chart
449
- RG.SVG.redraw(this.svg);
450
-
451
-
452
-
453
- // Create the cover
454
- $('<div id="rgraph_fadeslide_cover_' + obj.id + '"></div>').css({
455
- background: 'radial-gradient(rgba(255,255,255,0) 100%, rgba(255,255,255,0) 0%)',
456
- width: this.container.offsetWidth + 'px',
457
- height: this.container.offsetHeight + 'px',
458
- top: 0,
459
- left: 0,
460
- position: 'absolute'
461
- }).appendTo($(obj.svg.parentNode));
462
-
463
- function iterator ()
464
- {
465
- if (frame < frames) {
466
-
467
- $('div#rgraph_fadeslide_cover_' + obj.id).css({
468
- background: 'radial-gradient(' + color + ' ' + (( (frames - frame++) / frames) * 100) + '%, rgba(255,255,255,0) ' + (( (frames - frame++) / frames) * 120) + '%)'
469
- });
470
- RG.SVG.FX.update(iterator);
471
-
472
- } else {
473
-
474
- $('div#rgraph_fadeslide_cover_' + obj.id).remove();
475
-
476
- callback(obj);
477
- }
478
- }
479
-
480
- iterator();
481
-
482
- return this;
483
- };
484
-
485
-
486
-
487
-
488
-
489
-
490
-
491
-
492
- //
493
- // fadecircularoutinwards
494
- //
495
- // This function gets added to the chart object - so the this
496
- // variable is the chart object
497
- //
498
- RG.SVG.FX.fadecircularoutinwards = function ()
499
- {
500
- var obj = this,
501
- opt = arguments[0] || {},
502
- frames = opt.frames || 90,
503
- frame = 0,
504
- radius = ma.max(
505
- this.container.offsetWidth,
506
- this.container.offsetHeight
507
- ),
508
- color = opt.color || 'white',
509
- callback = opt.callback || function () {};
510
-
511
-
512
-
513
- // Draw the chart
514
- //RG.SVG.redraw(this.svg);
515
-
516
-
517
-
518
- // Create the cover
519
- $('<div id="rgraph_fadeslide_cover_' + this.id + '"></div>').css({
520
- background: 'radial-gradient(rgba(255,255,255,0) 0%, rgba(255,255,255,0) 0%)',
521
- width: this.container.offsetWidth + 'px',
522
- height: this.container.offsetHeight + 'px',
523
- top: 0,
524
- left: 0,
525
- position: 'absolute'
526
- }).appendTo($(obj.svg.parentNode));
527
-
528
- function iterator ()
529
- {
530
- if (frame < frames) {
531
-
532
- $('div#rgraph_fadeslide_cover_' + obj.id).css({
533
- background: 'radial-gradient(rgba(255,255,255,0) ' + (( (frames - frame++) / frames) * 100) + '%, ' + color + ' ' + (( (frames - frame++) / frames) * 120) + '%)'
534
- });
535
-
536
- RG.SVG.FX.update(iterator);
537
-
538
- } else {
539
-
540
- RG.SVG.clear(obj.svg);
541
-
542
- $('div#rgraph_fadeslide_cover_' + obj.id).remove();
543
-
544
- callback(obj);
545
- }
546
- }
547
-
548
- iterator();
549
-
550
- return this;
551
- };
552
-
553
-
554
-
555
-
556
- //
557
- // Reveal
558
- //
559
- // With this effect the chart is slowly revealed from the centre outwards. This
560
- // function gets added to the chart object - so the 'this' variable is the chart
561
- // object
562
- //
563
- // @param object Options for the effect. You can give frames here
564
- // @param function An optional callback function
565
- //
566
- RG.SVG.FX.reveal = function ()
567
- {
568
- var obj = this,
569
- opt = arguments[0] || {}
570
- color = opt.color || 'white',
571
- frames = opt.frames || 90,
572
- duration = (frames / 60) * 1000,
573
- callback = opt.callback || function () {}
574
-
575
- var divs = [
576
- ['rgraph_reveal_left_' + this.id, 0, 0, this.container.offsetWidth / 2, this.container.offsetHeight],
577
- ['rgraph_reveal_right_' + this.id,(this.container.offsetWidth / 2),0,(this.container.offsetWidth / 2),this.container.offsetHeight],
578
- ['rgraph_reveal_top_' + this.id,0,0,this.container.offsetWidth,(this.container.offsetHeight / 2)],
579
- ['rgraph_reveal_bottom_' + this.id,0,(this.container.offsetHeight / 2),this.container.offsetWidth,(this.container.offsetHeight / 2)]
580
- ];
581
-
582
- for (var i=0,len=divs.length; i<len; ++i) {
583
- var div = doc.createElement('DIV');
584
- div.id = divs[i][0];
585
- div.style.left = divs[i][1] + 'px';
586
- div.style.top = divs[i][2] + 'px';
587
- div.style.width = divs[i][3] + 'px';
588
- div.style.height = divs[i][4] + 'px';
589
- div.style.position = 'absolute';
590
- div.style.backgroundColor = color;
591
- this.container.appendChild(div);
592
- }
593
-
594
-
595
- // Redraw
596
- RG.SVG.redraw(obj.svg);
597
-
598
-
599
- // Animate the shrinking of the DIVs
600
- jQuery('#rgraph_reveal_left_' + obj.id).animate({width: 0}, duration);
601
- jQuery('#rgraph_reveal_right_' + obj.id).animate({left: '+=' + (this.container.offsetWidth / 2),width: 0}, duration);
602
- jQuery('#rgraph_reveal_top_' + obj.id).animate({height: 0}, duration);
603
- jQuery('#rgraph_reveal_bottom_' + obj.id).animate({top: '+=' + (this.container.offsetHeight / 2),height: 0}, duration);
604
-
605
- // Remove the DIVs from the DOM 100ms after the animation ends
606
- setTimeout(function ()
607
- {
608
- obj.container.removeChild(doc.getElementById("rgraph_reveal_top_" + obj.id));
609
- obj.container.removeChild(doc.getElementById("rgraph_reveal_bottom_" + obj.id));
610
- obj.container.removeChild(doc.getElementById("rgraph_reveal_left_" + obj.id));
611
- obj.container.removeChild(doc.getElementById("rgraph_reveal_right_" + obj.id));
612
-
613
- callback(obj);
614
- }, duration);
615
-
616
-
617
- return this;
618
- };
619
-
620
-
621
-
622
-
623
-
624
-
625
-
626
-
627
- //
628
- // Conceal
629
- //
630
- // This effect is the reverse of the Reveal effect - instead of revealing
631
- // the canvas it conceals it. Combined with the reveal effect would make
632
- // for a nice wipe effect.
633
- //
634
- // @param object obj The chart object
635
- ///
636
- RG.SVG.FX.conceal = function ()
637
- {
638
- var obj = this,
639
- opt = arguments[0] || {},
640
- frames = opt.frames || 90,
641
- callback = opt.callback || function () {},
642
- color = opt.color || 'white',
643
- duration = (frames / 60) * 1000,
644
- frame = 0;
645
-
646
-
647
-
648
- var divs = [
649
- ['rgraph_conceal_left_' + obj.id, 0, 0, 0, this.container.offsetHeight],
650
- ['rgraph_conceal_right_' + obj.id,this.container.offsetWidth,0,0,this.container.offsetHeight],
651
- ['rgraph_conceal_top_' + obj.id,0,0,this.container.offsetWidth,0],
652
- ['rgraph_conceal_bottom_' + obj.id,0,this.container.offsetHeight,this.container.offsetWidth,0]
653
- ];
654
-
655
-
656
-
657
-
658
- for (var i=0,len=divs.length; i<len; ++i) {
659
- var div = doc.createElement('DIV');
660
- div.id = divs[i][0];
661
- div.style.left = divs[i][1] + 'px';
662
- div.style.top = divs[i][2] + 'px';
663
- div.style.width = divs[i][3] + 'px';
664
- div.style.height = divs[i][4] + 'px';
665
- div.style.position = 'absolute';
666
- div.style.backgroundColor = color;
667
- this.container.appendChild(div);
668
- }
669
-
670
- jQuery('#rgraph_conceal_left_' + obj.id).animate({width: '+=' + (this.container.offsetWidth / 2)}, duration);
671
- jQuery('#rgraph_conceal_right_' + obj.id).animate({left: '-=' + (this.container.offsetWidth / 2),width: (this.container.offsetWidth / 2)}, duration);
672
- jQuery('#rgraph_conceal_top_' + obj.id).animate({height: '+=' + (this.container.offsetHeight / 2)}, duration);
673
- jQuery('#rgraph_conceal_bottom_' + obj.id).animate({top: '-=' + (this.container.offsetHeight / 2),height: (this.container.offsetHeight / 2)}, duration);
674
-
675
- // Remove the DIVs from the DOM 100ms after the animation ends
676
- setTimeout(
677
- function ()
678
- {
679
- obj.container.removeChild(doc.getElementById("rgraph_conceal_top_" + obj.id));
680
- obj.container.removeChild(doc.getElementById("rgraph_conceal_bottom_" + obj.id));
681
- obj.container.removeChild(doc.getElementById("rgraph_conceal_left_" + obj.id));
682
- obj.container.removeChild(doc.getElementById("rgraph_conceal_right_" + obj.id));
683
-
684
- RG.SVG.clear(obj.svg);
685
-
686
- callback(obj);
687
-
688
- },
689
- duration
690
- );
691
-
692
- return this;
693
- };
694
-
695
-
696
-
697
-
698
-
699
-
700
-
701
-
702
- //
703
- // Horizontal Blinds (open)
704
- //
705
- // @params object obj The graph object
706
- //
707
- RG.SVG.FX.hblindsopen = function ()
708
- {
709
- // This function gets added to the chart object - so the this
710
- // variable is the chart object
711
- var obj = this,
712
- opt = arguments[0] || {},
713
- frames = opt.frames || 90,
714
- duration = (frames / 60) * 1000,
715
- frame = 0,
716
- callback = opt.callback || function () {},
717
- color = opt.color || 'white',
718
- height = this.container.offsetHeight / 5;
719
-
720
- //
721
- // First draw the chart
722
- //
723
- RG.SVG.redraw(this.svg);
724
-
725
- for (var i=0; i<5; ++i) {
726
- var div = doc.createElement('DIV');
727
- div.id = 'rgraph_hblinds_' + i + '_' + obj.id;
728
- div.style.left = 0;
729
- div.style.top = ((this.container.offsetHeight * (i / 5))) + 'px';
730
- div.style.width = this.container.offsetWidth + 'px';
731
- div.style.height = (this.container.offsetHeight / 5) + 'px';
732
- div.style.position = 'absolute';
733
- div.style.backgroundColor = color;
734
- this.container.appendChild(div);
735
-
736
- jQuery('#rgraph_hblinds_' + i + '_' + obj.id).animate({height: 0}, duration);
737
- }
738
-
739
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_hblinds_0_' + obj.id));}, duration);
740
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_hblinds_1_' + obj.id));}, duration);
741
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_hblinds_2_' + obj.id));}, duration);
742
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_hblinds_3_' + obj.id));}, duration);
743
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_hblinds_4_' + obj.id));}, duration);
744
- setTimeout(function () {callback(obj);}, duration);
745
-
746
- return this;
747
- };
748
-
749
-
750
-
751
-
752
-
753
-
754
-
755
-
756
- //
757
- // Horizontal Blinds (close)
758
- //
759
- // This function gets added to the chart object - so the this
760
- // variable is the chart object
761
- //
762
- // @params object obj The graph object
763
- //
764
- RG.SVG.FX.hblindsclose = function ()
765
- {
766
- var obj = this,
767
- opt = arguments[0] || {},
768
- frames = opt.frames || 90,
769
- duration = (frames / 60) * 1000,
770
- frame = 0,
771
- callback = opt.callback || function () {},
772
- color = opt.color = 'white',
773
- height = this.container.offsetHeight / 5;
774
-
775
-
776
-
777
- for (var i=0; i<5; ++i) {
778
- var div = doc.createElement('DIV');
779
- div.id = 'rgraph_hblinds_' + i + '_' + obj.id;
780
- div.style.left = 0;
781
- div.style.top = (this.container.offsetHeight * (i / 5)) + 'px';
782
- div.style.width = this.container.offsetWidth + 'px';
783
- div.style.height = 0;
784
- div.style.position = 'absolute';
785
- div.style.backgroundColor = color;
786
- this.container.appendChild(div);
787
-
788
- jQuery('#rgraph_hblinds_' + i + '_' + obj.id)
789
- .animate({
790
- height: height + 'px'
791
- }, duration);
792
- }
793
-
794
-
795
-
796
- setTimeout(function () {RG.SVG.clear(obj.svg);}, duration + 100);
797
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_hblinds_0_' + obj.id));}, duration + 100);
798
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_hblinds_1_' + obj.id));}, duration + 100);
799
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_hblinds_2_' + obj.id));}, duration + 100);
800
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_hblinds_3_' + obj.id));}, duration + 100);
801
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_hblinds_4_' + obj.id));}, duration + 100);
802
- setTimeout(function () {callback(obj);}, duration + 100);
803
- };
804
-
805
-
806
-
807
-
808
-
809
-
810
-
811
-
812
- //
813
- // Vertical Blinds (open)
814
- //
815
- // @params object obj The graph object
816
- //
817
- // This function gets added to the chart object - so the this
818
- // variable is the chart object
819
- RG.SVG.FX.vblindsopen = function ()
820
- {
821
- var obj = this,
822
- opt = arguments[0] || {},
823
- frames = opt.frames || 90,
824
- duration = (frames / 60) * 1000,
825
- frame = 0,
826
- callback = opt.callback || function () {},
827
- color = opt.color || 'white',
828
- width = this.container.offsetWidth / 10;
829
-
830
- //
831
- // First draw the chart
832
- //
833
- RG.SVG.redraw(obj.svg);
834
-
835
- for (var i=0; i<10; ++i) {
836
- var div = doc.createElement('DIV');
837
- div.id = 'rgraph_vblinds_' + i + '_' + obj.id;
838
- div.style.width = width + 'px';
839
- div.style.height = this.container.offsetHeight + 'px';
840
- div.style.left = (this.container.offsetWidth * (i / 10)) + 'px';
841
- div.style.top = 0;
842
- div.style.position = 'absolute';
843
- div.style.backgroundColor = color;
844
- obj.container.appendChild(div);
845
-
846
- jQuery('#rgraph_vblinds_' + i + '_' + obj.id).animate({width: 0}, duration);
847
- }
848
-
849
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_0_' + obj.id));}, duration + 100);
850
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_1_' + obj.id));}, duration + 100);
851
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_2_' + obj.id));}, duration + 100);
852
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_3_' + obj.id));}, duration + 100);
853
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_4_' + obj.id));}, duration + 100);
854
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_5_' + obj.id));}, duration + 100);
855
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_6_' + obj.id));}, duration + 100);
856
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_7_' + obj.id));}, duration + 100);
857
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_8_' + obj.id));}, duration + 100);
858
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_9_' + obj.id));}, duration + 100);
859
-
860
- setTimeout(function () {callback(obj);}, duration + 100);
861
-
862
- return this;
863
- };
864
-
865
-
866
-
867
-
868
-
869
-
870
-
871
-
872
- //
873
- // Vertical Blinds (close)
874
- //
875
- // This function gets added to the chart object - so the this
876
- // variable is the chart object
877
- //
878
- // @params object obj The graph object
879
- //
880
- RG.SVG.FX.vblindsclose = function ()
881
- {
882
- var obj = this,
883
- opt = arguments[0] || {},
884
- frames = opt.frames || 90,
885
- duration = (frames / 60) * 1000,
886
- frame = 0,
887
- callback = opt.callback || function () {},
888
- color = opt.color || 'white',
889
- width = this.container.offsetWidth / 10;
890
-
891
- // Create the blinds
892
- for (var i=0; i<10; ++i) {
893
- var div = doc.createElement('DIV');
894
- div.id = 'rgraph_vblinds_' + i + '_' + obj.id;
895
- div.style.left = (this.container.offsetWidth * (i / 10)) + 'px';
896
- div.style.top = 0;
897
- div.style.width = 0;
898
- div.style.height = this.container.offsetHeight + 'px';
899
- div.style.position = 'absolute';
900
- div.style.backgroundColor = color;
901
- this.container.appendChild(div);
902
-
903
- jQuery('#rgraph_vblinds_' + i + '_' + obj.id).animate({width: width}, duration);
904
- }
905
-
906
- setTimeout(function () {RG.SVG.clear(obj.svg);}, duration + 100);
907
-
908
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_0_' + obj.id));}, duration + 100);
909
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_1_' + obj.id));}, duration + 100);
910
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_2_' + obj.id));}, duration + 100);
911
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_3_' + obj.id));}, duration + 100);
912
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_4_' + obj.id));}, duration + 100);
913
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_5_' + obj.id));}, duration + 100);
914
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_6_' + obj.id));}, duration + 100);
915
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_7_' + obj.id));}, duration + 100);
916
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_8_' + obj.id));}, duration + 100);
917
- setTimeout(function () {obj.container.removeChild(doc.getElementById('rgraph_vblinds_9_' + obj.id));}, duration + 100);
918
-
919
- setTimeout(function () {callback(obj);}, duration + 100);
920
-
921
- return this;
922
- };
923
-
924
-
925
-
926
-
927
-
928
-
929
-
930
-
931
- //
932
- // Slide in
933
- //
934
- // This function is a wipe that can be used when switching the canvas to a
935
- // new graph
936
- //
937
- // This function gets added to the chart object - so the this
938
- // variable is the chart object
939
- //
940
- // @param object obj The graph object
941
- //
942
- RG.SVG.FX.slidein = function ()
943
- {
944
- var obj = this,
945
- opt = arguments[0] || {},
946
- frames = opt.frames || 90,
947
- duration = (frames / 60) * 1000,
948
- frame = 0,
949
- callback = opt.callback || function () {},
950
- color = opt.color || 'white',
951
- width = this.container.offsetWidth / 10,
952
- from = opt.from || 'left';
953
-
954
- this.container.style.overflow = 'hidden';
955
-
956
- RG.SVG.redraw(this.svg);
957
-
958
- this.svg.style.position = 'relative';
959
-
960
- if (from == 'left') {
961
- this.svg.style.left = (0 - this.container.offsetWidth) + 'px';
962
- this.svg.style.top = 0;
963
- } else if (from == 'top') {
964
- this.svg.style.left = 0;
965
- this.svg.style.top = (0 - this.container.offsetHeight) + 'px';
966
- } else if (from == 'bottom') {
967
- this.svg.style.left = 0;
968
- this.svg.style.top = this.container.offsetHeight + 'px';
969
- } else {
970
- this.svg.style.left = this.container.offsetWidth + 'px';
971
- this.svg.style.top = 0;
972
- }
973
-
974
- jQuery(this.svg).animate({left:0,top:0}, duration, function ()
975
- {
976
- callback(obj);
977
- });
978
-
979
- return this;
980
- };
981
-
982
-
983
-
984
-
985
-
986
-
987
-
988
-
989
- //
990
- // Slide out
991
- //
992
- // This function is a wipe that can be used when switching the canvas to a new graph
993
- //
994
- // @param object Optional object containing configuration.
995
- // @param function Optional callback function
996
- //
997
- RG.SVG.FX.slideout = function ()
998
- {
999
- // This function gets added to the chart object - so the this
1000
- // variable is the chart object
1001
- var opt = arguments[0] || {},
1002
- frames = opt.frames || 90,
1003
- color = opt.color || 'white',
1004
- to = opt.to || 'left',
1005
- duration = (frames / 60) * 1000,
1006
- frame = 0,
1007
- callback = opt.callback || function () {},
1008
- width = this.container.offetsWidth / 10;
1009
-
1010
- this.container.style.overflow= 'hidden';
1011
-
1012
- this.svg.style.position = 'relative';
1013
- this.svg.style.left = 0;
1014
- this.svg.style.top = 0;
1015
-
1016
- if (to == 'left') {
1017
- jQuery(this.svg).animate({left: (0 - this.container.offsetWidth) + 'px'}, duration, function () {callback(this);});
1018
- } else if (to == 'top') {
1019
- jQuery(this.svg).animate({left: 0, top: (0 - this.container.offsetHeight) + 'px'}, duration, function () {callback(this);});
1020
- } else if (to == 'bottom') {
1021
- jQuery(this.svg).animate({top: (0 + this.container.offsetHeight) + 'px'}, duration, function () {callback(this);});
1022
- } else {
1023
- jQuery(this.svg).animate({left: (0 + this.container.offsetWidth) + 'px'}, duration, function () {callback(this);});
1024
- }
1025
-
1026
- return this;
1027
- };
1028
-
1029
-
1030
-
1031
-
1032
-
1033
-
1034
-
1035
-
1036
- //
1037
- // Horizontal Scissors (open)
1038
- //
1039
- // This function gets added to the chart object - so the this
1040
- // variable is the chart object
1041
- //
1042
- // @param object Optional array of options
1043
- // @param function Optional callback function
1044
- //
1045
- //
1046
- RG.SVG.FX.hscissorsopen = function ()
1047
- {
1048
- var opt = arguments[0] || {},
1049
- obj = this,
1050
- frames = opt.frames || 90,
1051
- callback = opt.callback || function () {},
1052
- color = opt.color || 'white',
1053
- to = opt.to || 'left',
1054
- frame = 0,
1055
- duration = (frames / 60) * 1000,
1056
- width = this.container.offsetWidth / 10,
1057
- height = this.container.offsetHeight / 5;
1058
-
1059
-
1060
- //
1061
- // First draw the chart
1062
- //
1063
- RG.SVG.redraw(this.svg);
1064
-
1065
-
1066
- for (var i=0; i<5; ++i) {
1067
- var div = doc.getElementById("rgraph_hscissors_" + i + '_' + this.id)
1068
- if (!div) {
1069
- var div = doc.createElement('DIV');
1070
- div.id = 'rgraph_hscissors_' + i + '_' + this.id;
1071
- div.style.width = this.container.offsetWidth + 'px';
1072
- div.style.height = (this.container.offsetHeight / 5) + 'px';
1073
- div.style.left = 0;
1074
- div.style.top = (this.container.offsetHeight * (i / 5)) + 'px';
1075
- div.style.position = 'absolute';
1076
- div.style.backgroundColor = color;
1077
- this.container.appendChild(div);
1078
- }
1079
-
1080
- if (i % 2 == 0) {
1081
- jQuery('#' + 'rgraph_hscissors_' + i + '_' + this.id).animate({left: this.container.offsetWidth + 'px', width: 0}, duration);
1082
- } else {
1083
- jQuery('#' + 'rgraph_hscissors_' + i + '_' + this.id).animate({width: 0}, duration);
1084
- }
1085
- }
1086
-
1087
- setTimeout(function ()
1088
- {
1089
- obj.container.removeChild(doc.getElementById('rgraph_hscissors_0_' + obj.id));
1090
- obj.container.removeChild(doc.getElementById('rgraph_hscissors_1_' + obj.id));
1091
- obj.container.removeChild(doc.getElementById('rgraph_hscissors_2_' + obj.id));
1092
- obj.container.removeChild(doc.getElementById('rgraph_hscissors_3_' + obj.id));
1093
- obj.container.removeChild(doc.getElementById('rgraph_hscissors_4_' + obj.id));
1094
-
1095
- callback(obj);
1096
- }, duration);
1097
-
1098
-
1099
- return this;
1100
- };
1101
-
1102
-
1103
-
1104
-
1105
-
1106
-
1107
-
1108
-
1109
- //
1110
- // Horizontal Scissors (Close)
1111
- //
1112
- // This function gets added to the chart object - so the this
1113
- // variable is the chart object
1114
- //
1115
- // @param @object Optional object of options
1116
- // @param function Optional callback function
1117
- //
1118
- //
1119
- RG.SVG.FX.hscissorsclose = function ()
1120
- {
1121
- var obj = this,
1122
- opt = arguments[0] || {},
1123
- frames = opt.frames || 60,
1124
- duration = (frames / 60) * 1000,
1125
- frame = 0,
1126
- callback = opt.callback || function () {},
1127
- color = opt.color || 'white',
1128
- height = this.container.offsetHeight / 5;
1129
-
1130
-
1131
- for (var i=0; i<5; ++i) {
1132
- var div = doc.createElement('DIV');
1133
- div.id = 'rgraph_hscissors_' + i + '_' + this.id;
1134
- div.style.width = 0;
1135
- div.style.height = height + 'px';
1136
- div.style.left = (i % 2 == 0 ? this.container.offsetWidth : 0) + 'px';
1137
- div.style.top = (this.container.offsetHeight * (i / 5)) + 'px';
1138
- div.style.position = 'absolute';
1139
- div.style.backgroundColor = color;
1140
- this.container.appendChild(div);
1141
-
1142
- if (i % 2 == 0) {
1143
- jQuery('#' + 'rgraph_hscissors_' + i + '_' + this.id).animate({left: 0, width: this.container.offsetWidth + 'px'}, duration);
1144
- } else {
1145
- jQuery('#' + 'rgraph_hscissors_' + i + '_' + this.id).animate({width: this.container.offsetWidth + 'px'}, duration);
1146
- }
1147
- }
1148
-
1149
- setTimeout(function ()
1150
- {
1151
- RG.SVG.clear(obj.svg);
1152
- jQuery('#' + 'rgraph_hscissors_' + 0 + '_' + obj.id).remove();
1153
- jQuery('#' + 'rgraph_hscissors_' + 1 + '_' + obj.id).remove();
1154
- jQuery('#' + 'rgraph_hscissors_' + 2 + '_' + obj.id).remove();
1155
- jQuery('#' + 'rgraph_hscissors_' + 3 + '_' + obj.id).remove();
1156
- jQuery('#' + 'rgraph_hscissors_' + 4 + '_' + obj.id).remove();
1157
- callback(obj);
1158
- }, duration);
1159
-
1160
- return this;
1161
- };
1162
-
1163
-
1164
-
1165
-
1166
-
1167
-
1168
-
1169
-
1170
- //
1171
- // Vertical Scissors (open)
1172
- //
1173
- // @param @object Optional An object of options. It can consist of:
1174
- // o color - The color of the scissors. The default is white
1175
- // o frames - Number of animation frames in the effect. Default
1176
- // is 60
1177
- // o callback - A function that's called when the effect is
1178
- // finished
1179
- //
1180
- RG.SVG.FX.vscissorsopen = function ()
1181
- {
1182
- // This function gets added to the chart object - so the this
1183
- // variable is the chart object
1184
- var obj = this,
1185
- opt = arguments[0] || {},
1186
- frames = opt.frames || 90,
1187
- duration = (frames / 60) * 1000,
1188
- frame = 0,
1189
- callback = opt.callback || function () {},
1190
- color = opt.color || 'white',
1191
- width = this.container.offsetWidth / 10;
1192
-
1193
-
1194
-
1195
- //
1196
- // First (re)draw the chart
1197
- //
1198
- RG.SVG.redraw(this.svg);
1199
-
1200
-
1201
-
1202
- for (var i=0; i<10; ++i) {
1203
- var div = doc.getElementById("rgraph_vscissors_" + i + '_' + this.id);
1204
-
1205
- if (!div) {
1206
- var div = doc.createElement('DIV');
1207
- div.id = 'rgraph_vscissors_' + i + '_' + this.id;
1208
- div.style.width = width + 'px';
1209
- div.style.height = this.container.offsetHeight + 'px';
1210
- div.style.left = this.container.offsetWidth * (i / 10) + 'px';
1211
- div.style.top = 0;
1212
- div.style.position = 'absolute';
1213
- div.style.backgroundColor = color;
1214
- this.container.appendChild(div);
1215
- }
1216
-
1217
- if (i % 2 == 0) {
1218
- jQuery('#' + 'rgraph_vscissors_' + i + '_' + this.id).animate({top: this.container.offsetHeight + 'px', height: 0}, duration);
1219
- } else {
1220
- jQuery('#' + 'rgraph_vscissors_' + i + '_' + this.id).animate({height: 0}, duration);
1221
- }
1222
- }
1223
-
1224
- setTimeout(function ()
1225
- {
1226
- obj.container.removeChild(doc.getElementById('rgraph_vscissors_0' + '_' + obj.id));
1227
- obj.container.removeChild(doc.getElementById('rgraph_vscissors_1' + '_' + obj.id));
1228
- obj.container.removeChild(doc.getElementById('rgraph_vscissors_2' + '_' + obj.id));
1229
- obj.container.removeChild(doc.getElementById('rgraph_vscissors_3' + '_' + obj.id));
1230
- obj.container.removeChild(doc.getElementById('rgraph_vscissors_4' + '_' + obj.id));
1231
-
1232
- callback(obj);
1233
-
1234
- }, duration);
1235
-
1236
- return this;
1237
- };
1238
-
1239
-
1240
-
1241
-
1242
-
1243
-
1244
-
1245
-
1246
- //
1247
- // Vertical Scissors (close)
1248
- //
1249
- RG.SVG.FX.vscissorsclose = function ()
1250
- {
1251
- // This function gets added to the chart object - so the this
1252
- // variable is the chart object
1253
- var obj = this,
1254
- opt = arguments[0] || {},
1255
- frames = opt.frames || 90,
1256
- duration = (frames / 60) * 1000,
1257
- frame = 0,
1258
- callback = opt.callback || function () {},
1259
- color = opt.color || 'white',
1260
- width = this.container.offsetWidth / 10;
1261
-
1262
-
1263
- for (var i=0; i<10; ++i) {
1264
- var div = doc.getElementById("rgraph_vscissors_" + i + '_' + this.id)
1265
- if (!div) {
1266
- var div = doc.createElement('DIV');
1267
- div.id = 'rgraph_vscissors_' + i + '_' + this.id;
1268
- div.style.width = width + 'px';
1269
- div.style.height = 0;
1270
- div.style.left = (width * i) + 'px';
1271
- div.style.top = (i % 2 == 0 ? this.container.offsetHeight : 0) + 'px';
1272
- div.style.position = 'absolute';
1273
- div.style.backgroundColor = color;
1274
- this.container.appendChild(div);
1275
- }
1276
-
1277
- if (i % 2 == 0) {
1278
- jQuery('#' + 'rgraph_vscissors_' + i + '_' + this.id).animate({top: 0, height: this.container.offsetHeight + 'px'}, duration);
1279
- } else {
1280
- jQuery('#' + 'rgraph_vscissors_' + i + '_' + this.id).animate({height: this.container.offsetHeight + 'px'}, duration);
1281
- }
1282
- }
1283
-
1284
- setTimeout(function ()
1285
- {
1286
- RG.SVG.clear(obj.svg);
1287
- for (var i=0; i<10; i++) {
1288
- jQuery('#rgraph_vscissors_' + i + '_' + obj.id).remove();
1289
- }
1290
- callback(obj);
1291
- }, duration);
1292
-
1293
- return this;
1294
- };
1295
-
1296
-
1297
-
1298
-
1299
-
1300
-
1301
-
1302
-
1303
- // End Module pattern
1304
- })(window, document);
2
+ RGraph=window.RGraph||{isRGraph:true};RGraph.SVG=RGraph.SVG||{};RGraph.SVG.FX=RGraph.SVG.FX||{};(function(win,doc,undefined)
3
+ {var RG=RGraph,ua=navigator.userAgent,ma=Math;RG.SVG.FX.decorate=function(obj)
4
+ {for(i in RG.SVG.FX){if(typeof RG.SVG.FX[i]==='function'){obj[i]=RG.SVG.FX[i];}}};RG.SVG.FX.fadein=function()
5
+ {var obj=this,opt=arguments[0]||{},frames=opt.frames||90,duration=(frames/60)*1000,frame=0,callback=opt.callback||function(){};obj.svg.style.opacity=0;RG.SVG.redraw(this.svg);for(var i=1;i<=frames;++i){(function(index)
6
+ {setTimeout(function()
7
+ {obj.svg.style.opacity=(index/frames);if(index>=frames){callback(obj);}},(index/frames)*duration);})(i)}
8
+ return this;};RG.SVG.FX.fadeout=function()
9
+ {var obj=this,opt=arguments[0]||{},frames=opt.frames||90,duration=(frames/60)*1000,frame=0,callback=opt.callback||function(){};for(var i=1;i<=frames;++i){(function(index)
10
+ {setTimeout(function()
11
+ {obj.svg.style.opacity=1-(index/frames);if(index>=frames){callback(obj);}},(index/frames)*duration);})(i)}
12
+ return this;};RG.SVG.FX.fadeslidein=function()
13
+ {var obj=this,opt=arguments[0]||{},frames=opt.frames||90,frame=0,pc=-20,step=(120-pc)/frames,color=opt.color||'white',width=this.container.offsetWidth,height=this.container.offsetHeight,callback=opt.callback||function(){};RG.SVG.redraw(this.svg);$('<div id="rgraph_fadeslide_cover_'+obj.id+'"></div>').css({background:'linear-gradient(135deg, rgba(255,255,255,0) '+pc+'%, '+color+' '+(pc+20)+'%)',width:width+'px',height:height+'px',top:0,left:0,position:'absolute'}).appendTo($(this.container));function iterator()
14
+ {if(pc<120){$('div#rgraph_fadeslide_cover_'+obj.id).css({background:'linear-gradient(135deg, rgba(255,255,255,0) '+pc+'%, '+color+' '+(pc+20)+'%)'});pc+=step;RG.SVG.FX.update(iterator);}else{$('div#rgraph_fadeslide_cover_'+obj.id).remove();callback(obj);}}
15
+ iterator();return this;};RG.SVG.FX.fadeslideout=function()
16
+ {var obj=this,opt=arguments[0]||{},frames=opt.frames||90,frame=0,pc=-20,step=(120-pc)/frames,canvasXY=RG.SVG.getSVGXY(obj.svg),color=opt.color||'white',width=this.container.offsetWidth,height=this.container.offsetHeight,callback=opt.callback||function(){};$('<div id="rgraph_fadeslide_cover_'+obj.id+'"></div>').css({background:'linear-gradient(135deg, '+color+' '+pc+'%, rgba(255,255,255,0) '+(pc+20)+'%)',width:width+'px',height:height+'px',top:0,left:0,position:'absolute'}).appendTo($(obj.svg.parentNode));function iterator()
17
+ {if(pc<120){$('div#rgraph_fadeslide_cover_'+obj.id).css({background:'linear-gradient(135deg, '+color+' '+pc+'%, rgba(255,255,255,0) '+(pc+20)+'%)'});pc+=step;RG.SVG.FX.update(iterator);}else{RG.SVG.clear(obj.svg);$('div#rgraph_fadeslide_cover_'+obj.id).remove();callback(obj);}}
18
+ iterator();return this;};RG.SVG.FX.fadecircularinoutwards=function()
19
+ {var obj=this,opt=arguments[0]||{},frames=opt.frames||90,frame=1,radius=0,svgXY=RG.SVG.getSVGXY(obj.svg),color=opt.color||'white',callback=opt.callback||function(){};RG.SVG.redraw(this.svg);$('<div id="rgraph_fadecircularinoutwards_cover_'+obj.id+'"></div>').css({background:'radial-gradient(rgba(255,255,255,0) 0%, '+color+' '+radius+'%)',width:this.container.offsetWidth+'px',height:this.container.offsetHeight+'px',top:0,left:0,position:'absolute'}).appendTo($(obj.svg.parentNode));function iterator()
20
+ {if(frame<frames){$('div#rgraph_fadecircularinoutwards_cover_'+obj.id).css({background:'radial-gradient(rgba(255,255,255,0) '+((frame++/ frames) * 100) + '%, ' + color + ' ' + ((frame++ /frames)*150)+'%)'});RG.SVG.FX.update(iterator);}else{$('div#rgraph_fadecircularinoutwards_cover_'+obj.id).remove();callback(obj);}}
21
+ iterator();return this;};RG.SVG.FX.fadecircularoutoutwards=function()
22
+ {var obj=this,opt=arguments[0]||{},frames=opt.frames||90,frame=0,width=this.container.offsetWidth,height=this.container.offsetHeight,canvasXY=RG.SVG.getSVGXY(obj.svg),color=opt.color||'white',callback=opt.callback||function(){};$('<div id="rgraph_fadeslide_cover_'+obj.id+'"></div>').css({background:'radial-gradient(rgba(255,255,255,0) 0%, transparent 0%)',width:width+'px',height:height+'px',top:0,left:0,position:'absolute'}).appendTo($(obj.svg.parentNode));function iterator()
23
+ {if(frame<frames){$('div#rgraph_fadeslide_cover_'+obj.id).css({background:'radial-gradient('+color+' '+((frame++/ frames) * 100) + '%, rgba(255,255,255,0) ' + ((frame++ /frames)*150)+'%)'});RG.SVG.FX.update(iterator);}else{RG.SVG.clear(obj.svg);$('div#rgraph_fadeslide_cover_'+obj.id).remove();callback(obj);}}
24
+ iterator();return this;};RG.SVG.FX.fadecircularininwards=function()
25
+ {var obj=this,opt=arguments[0]||{},frames=opt.frames||90,frame=0,radius=ma.max(obj.container.offsetWidth,obj.container.offsetHeight),color=opt.color||'white',callback=opt.callback||function(){};RG.SVG.redraw(this.svg);$('<div id="rgraph_fadeslide_cover_'+obj.id+'"></div>').css({background:'radial-gradient(rgba(255,255,255,0) 100%, rgba(255,255,255,0) 0%)',width:this.container.offsetWidth+'px',height:this.container.offsetHeight+'px',top:0,left:0,position:'absolute'}).appendTo($(obj.svg.parentNode));function iterator()
26
+ {if(frame<frames){$('div#rgraph_fadeslide_cover_'+obj.id).css({background:'radial-gradient('+color+' '+(((frames-frame++)/frames)*100)+'%, rgba(255,255,255,0) '+(((frames-frame++)/frames)*120)+'%)'});RG.SVG.FX.update(iterator);}else{$('div#rgraph_fadeslide_cover_'+obj.id).remove();callback(obj);}}
27
+ iterator();return this;};RG.SVG.FX.fadecircularoutinwards=function()
28
+ {var obj=this,opt=arguments[0]||{},frames=opt.frames||90,frame=0,radius=ma.max(this.container.offsetWidth,this.container.offsetHeight),color=opt.color||'white',callback=opt.callback||function(){};$('<div id="rgraph_fadeslide_cover_'+this.id+'"></div>').css({background:'radial-gradient(rgba(255,255,255,0) 0%, rgba(255,255,255,0) 0%)',width:this.container.offsetWidth+'px',height:this.container.offsetHeight+'px',top:0,left:0,position:'absolute'}).appendTo($(obj.svg.parentNode));function iterator()
29
+ {if(frame<frames){$('div#rgraph_fadeslide_cover_'+obj.id).css({background:'radial-gradient(rgba(255,255,255,0) '+(((frames-frame++)/frames)*100)+'%, '+color+' '+(((frames-frame++)/frames)*120)+'%)'});RG.SVG.FX.update(iterator);}else{RG.SVG.clear(obj.svg);$('div#rgraph_fadeslide_cover_'+obj.id).remove();callback(obj);}}
30
+ iterator();return this;};RG.SVG.FX.reveal=function()
31
+ {var obj=this,opt=arguments[0]||{}
32
+ color=opt.color||'white',frames=opt.frames||90,duration=(frames/60)*1000,callback=opt.callback||function(){}
33
+ var divs=[['rgraph_reveal_left_'+this.id,0,0,this.container.offsetWidth/2,this.container.offsetHeight],['rgraph_reveal_right_'+this.id,(this.container.offsetWidth/2),0,(this.container.offsetWidth/2),this.container.offsetHeight],['rgraph_reveal_top_'+this.id,0,0,this.container.offsetWidth,(this.container.offsetHeight/2)],['rgraph_reveal_bottom_'+this.id,0,(this.container.offsetHeight/2),this.container.offsetWidth,(this.container.offsetHeight/2)]];for(var i=0,len=divs.length;i<len;++i){var div=doc.createElement('DIV');div.id=divs[i][0];div.style.left=divs[i][1]+'px';div.style.top=divs[i][2]+'px';div.style.width=divs[i][3]+'px';div.style.height=divs[i][4]+'px';div.style.position='absolute';div.style.backgroundColor=color;this.container.appendChild(div);}
34
+ RG.SVG.redraw(obj.svg);jQuery('#rgraph_reveal_left_'+obj.id).animate({width:0},duration);jQuery('#rgraph_reveal_right_'+obj.id).animate({left:'+='+(this.container.offsetWidth/2),width:0},duration);jQuery('#rgraph_reveal_top_'+obj.id).animate({height:0},duration);jQuery('#rgraph_reveal_bottom_'+obj.id).animate({top:'+='+(this.container.offsetHeight/2),height:0},duration);setTimeout(function()
35
+ {obj.container.removeChild(doc.getElementById("rgraph_reveal_top_"+obj.id));obj.container.removeChild(doc.getElementById("rgraph_reveal_bottom_"+obj.id));obj.container.removeChild(doc.getElementById("rgraph_reveal_left_"+obj.id));obj.container.removeChild(doc.getElementById("rgraph_reveal_right_"+obj.id));callback(obj);},duration);return this;};RG.SVG.FX.conceal=function()
36
+ {var obj=this,opt=arguments[0]||{},frames=opt.frames||90,callback=opt.callback||function(){},color=opt.color||'white',duration=(frames/60)*1000,frame=0;var divs=[['rgraph_conceal_left_'+obj.id,0,0,0,this.container.offsetHeight],['rgraph_conceal_right_'+obj.id,this.container.offsetWidth,0,0,this.container.offsetHeight],['rgraph_conceal_top_'+obj.id,0,0,this.container.offsetWidth,0],['rgraph_conceal_bottom_'+obj.id,0,this.container.offsetHeight,this.container.offsetWidth,0]];for(var i=0,len=divs.length;i<len;++i){var div=doc.createElement('DIV');div.id=divs[i][0];div.style.left=divs[i][1]+'px';div.style.top=divs[i][2]+'px';div.style.width=divs[i][3]+'px';div.style.height=divs[i][4]+'px';div.style.position='absolute';div.style.backgroundColor=color;this.container.appendChild(div);}
37
+ jQuery('#rgraph_conceal_left_'+obj.id).animate({width:'+='+(this.container.offsetWidth/2)},duration);jQuery('#rgraph_conceal_right_'+obj.id).animate({left:'-='+(this.container.offsetWidth/2),width:(this.container.offsetWidth/2)},duration);jQuery('#rgraph_conceal_top_'+obj.id).animate({height:'+='+(this.container.offsetHeight/2)},duration);jQuery('#rgraph_conceal_bottom_'+obj.id).animate({top:'-='+(this.container.offsetHeight/2),height:(this.container.offsetHeight/2)},duration);setTimeout(function()
38
+ {obj.container.removeChild(doc.getElementById("rgraph_conceal_top_"+obj.id));obj.container.removeChild(doc.getElementById("rgraph_conceal_bottom_"+obj.id));obj.container.removeChild(doc.getElementById("rgraph_conceal_left_"+obj.id));obj.container.removeChild(doc.getElementById("rgraph_conceal_right_"+obj.id));RG.SVG.clear(obj.svg);callback(obj);},duration);return this;};RG.SVG.FX.hblindsopen=function()
39
+ {var obj=this,opt=arguments[0]||{},frames=opt.frames||90,duration=(frames/60)*1000,frame=0,callback=opt.callback||function(){},color=opt.color||'white',height=this.container.offsetHeight/5;RG.SVG.redraw(this.svg);for(var i=0;i<5;++i){var div=doc.createElement('DIV');div.id='rgraph_hblinds_'+i+'_'+obj.id;div.style.left=0;div.style.top=((this.container.offsetHeight*(i/5)))+'px';div.style.width=this.container.offsetWidth+'px';div.style.height=(this.container.offsetHeight/5)+'px';div.style.position='absolute';div.style.backgroundColor=color;this.container.appendChild(div);jQuery('#rgraph_hblinds_'+i+'_'+obj.id).animate({height:0},duration);}
40
+ setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_hblinds_0_'+obj.id));},duration);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_hblinds_1_'+obj.id));},duration);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_hblinds_2_'+obj.id));},duration);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_hblinds_3_'+obj.id));},duration);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_hblinds_4_'+obj.id));},duration);setTimeout(function(){callback(obj);},duration);return this;};RG.SVG.FX.hblindsclose=function()
41
+ {var obj=this,opt=arguments[0]||{},frames=opt.frames||90,duration=(frames/60)*1000,frame=0,callback=opt.callback||function(){},color=opt.color='white',height=this.container.offsetHeight/5;for(var i=0;i<5;++i){var div=doc.createElement('DIV');div.id='rgraph_hblinds_'+i+'_'+obj.id;div.style.left=0;div.style.top=(this.container.offsetHeight*(i/5))+'px';div.style.width=this.container.offsetWidth+'px';div.style.height=0;div.style.position='absolute';div.style.backgroundColor=color;this.container.appendChild(div);jQuery('#rgraph_hblinds_'+i+'_'+obj.id).animate({height:height+'px'},duration);}
42
+ setTimeout(function(){RG.SVG.clear(obj.svg);},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_hblinds_0_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_hblinds_1_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_hblinds_2_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_hblinds_3_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_hblinds_4_'+obj.id));},duration+100);setTimeout(function(){callback(obj);},duration+100);};RG.SVG.FX.vblindsopen=function()
43
+ {var obj=this,opt=arguments[0]||{},frames=opt.frames||90,duration=(frames/60)*1000,frame=0,callback=opt.callback||function(){},color=opt.color||'white',width=this.container.offsetWidth/10;RG.SVG.redraw(obj.svg);for(var i=0;i<10;++i){var div=doc.createElement('DIV');div.id='rgraph_vblinds_'+i+'_'+obj.id;div.style.width=width+'px';div.style.height=this.container.offsetHeight+'px';div.style.left=(this.container.offsetWidth*(i/10))+'px';div.style.top=0;div.style.position='absolute';div.style.backgroundColor=color;obj.container.appendChild(div);jQuery('#rgraph_vblinds_'+i+'_'+obj.id).animate({width:0},duration);}
44
+ setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_0_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_1_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_2_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_3_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_4_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_5_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_6_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_7_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_8_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_9_'+obj.id));},duration+100);setTimeout(function(){callback(obj);},duration+100);return this;};RG.SVG.FX.vblindsclose=function()
45
+ {var obj=this,opt=arguments[0]||{},frames=opt.frames||90,duration=(frames/60)*1000,frame=0,callback=opt.callback||function(){},color=opt.color||'white',width=this.container.offsetWidth/10;for(var i=0;i<10;++i){var div=doc.createElement('DIV');div.id='rgraph_vblinds_'+i+'_'+obj.id;div.style.left=(this.container.offsetWidth*(i/10))+'px';div.style.top=0;div.style.width=0;div.style.height=this.container.offsetHeight+'px';div.style.position='absolute';div.style.backgroundColor=color;this.container.appendChild(div);jQuery('#rgraph_vblinds_'+i+'_'+obj.id).animate({width:width},duration);}
46
+ setTimeout(function(){RG.SVG.clear(obj.svg);},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_0_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_1_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_2_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_3_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_4_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_5_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_6_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_7_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_8_'+obj.id));},duration+100);setTimeout(function(){obj.container.removeChild(doc.getElementById('rgraph_vblinds_9_'+obj.id));},duration+100);setTimeout(function(){callback(obj);},duration+100);return this;};RG.SVG.FX.slidein=function()
47
+ {var obj=this,opt=arguments[0]||{},frames=opt.frames||90,duration=(frames/60)*1000,frame=0,callback=opt.callback||function(){},color=opt.color||'white',width=this.container.offsetWidth/10,from=opt.from||'left';this.container.style.overflow='hidden';RG.SVG.redraw(this.svg);this.svg.style.position='relative';if(from=='left'){this.svg.style.left=(0-this.container.offsetWidth)+'px';this.svg.style.top=0;}else if(from=='top'){this.svg.style.left=0;this.svg.style.top=(0-this.container.offsetHeight)+'px';}else if(from=='bottom'){this.svg.style.left=0;this.svg.style.top=this.container.offsetHeight+'px';}else{this.svg.style.left=this.container.offsetWidth+'px';this.svg.style.top=0;}
48
+ jQuery(this.svg).animate({left:0,top:0},duration,function()
49
+ {callback(obj);});return this;};RG.SVG.FX.slideout=function()
50
+ {var opt=arguments[0]||{},frames=opt.frames||90,color=opt.color||'white',to=opt.to||'left',duration=(frames/60)*1000,frame=0,callback=opt.callback||function(){},width=this.container.offetsWidth/10;this.container.style.overflow='hidden';this.svg.style.position='relative';this.svg.style.left=0;this.svg.style.top=0;if(to=='left'){jQuery(this.svg).animate({left:(0-this.container.offsetWidth)+'px'},duration,function(){callback(this);});}else if(to=='top'){jQuery(this.svg).animate({left:0,top:(0-this.container.offsetHeight)+'px'},duration,function(){callback(this);});}else if(to=='bottom'){jQuery(this.svg).animate({top:(0+this.container.offsetHeight)+'px'},duration,function(){callback(this);});}else{jQuery(this.svg).animate({left:(0+this.container.offsetWidth)+'px'},duration,function(){callback(this);});}
51
+ return this;};RG.SVG.FX.hscissorsopen=function()
52
+ {var opt=arguments[0]||{},obj=this,frames=opt.frames||90,callback=opt.callback||function(){},color=opt.color||'white',to=opt.to||'left',frame=0,duration=(frames/60)*1000,width=this.container.offsetWidth/10,height=this.container.offsetHeight/5;RG.SVG.redraw(this.svg);for(var i=0;i<5;++i){var div=doc.getElementById("rgraph_hscissors_"+i+'_'+this.id)
53
+ if(!div){var div=doc.createElement('DIV');div.id='rgraph_hscissors_'+i+'_'+this.id;div.style.width=this.container.offsetWidth+'px';div.style.height=(this.container.offsetHeight/5)+'px';div.style.left=0;div.style.top=(this.container.offsetHeight*(i/5))+'px';div.style.position='absolute';div.style.backgroundColor=color;this.container.appendChild(div);}
54
+ if(i%2==0){jQuery('#'+'rgraph_hscissors_'+i+'_'+this.id).animate({left:this.container.offsetWidth+'px',width:0},duration);}else{jQuery('#'+'rgraph_hscissors_'+i+'_'+this.id).animate({width:0},duration);}}
55
+ setTimeout(function()
56
+ {obj.container.removeChild(doc.getElementById('rgraph_hscissors_0_'+obj.id));obj.container.removeChild(doc.getElementById('rgraph_hscissors_1_'+obj.id));obj.container.removeChild(doc.getElementById('rgraph_hscissors_2_'+obj.id));obj.container.removeChild(doc.getElementById('rgraph_hscissors_3_'+obj.id));obj.container.removeChild(doc.getElementById('rgraph_hscissors_4_'+obj.id));callback(obj);},duration);return this;};RG.SVG.FX.hscissorsclose=function()
57
+ {var obj=this,opt=arguments[0]||{},frames=opt.frames||60,duration=(frames/60)*1000,frame=0,callback=opt.callback||function(){},color=opt.color||'white',height=this.container.offsetHeight/5;for(var i=0;i<5;++i){var div=doc.createElement('DIV');div.id='rgraph_hscissors_'+i+'_'+this.id;div.style.width=0;div.style.height=height+'px';div.style.left=(i%2==0?this.container.offsetWidth:0)+'px';div.style.top=(this.container.offsetHeight*(i/5))+'px';div.style.position='absolute';div.style.backgroundColor=color;this.container.appendChild(div);if(i%2==0){jQuery('#'+'rgraph_hscissors_'+i+'_'+this.id).animate({left:0,width:this.container.offsetWidth+'px'},duration);}else{jQuery('#'+'rgraph_hscissors_'+i+'_'+this.id).animate({width:this.container.offsetWidth+'px'},duration);}}
58
+ setTimeout(function()
59
+ {RG.SVG.clear(obj.svg);jQuery('#'+'rgraph_hscissors_'+0+'_'+obj.id).remove();jQuery('#'+'rgraph_hscissors_'+1+'_'+obj.id).remove();jQuery('#'+'rgraph_hscissors_'+2+'_'+obj.id).remove();jQuery('#'+'rgraph_hscissors_'+3+'_'+obj.id).remove();jQuery('#'+'rgraph_hscissors_'+4+'_'+obj.id).remove();callback(obj);},duration);return this;};RG.SVG.FX.vscissorsopen=function()
60
+ {var obj=this,opt=arguments[0]||{},frames=opt.frames||90,duration=(frames/60)*1000,frame=0,callback=opt.callback||function(){},color=opt.color||'white',width=this.container.offsetWidth/10;RG.SVG.redraw(this.svg);for(var i=0;i<10;++i){var div=doc.getElementById("rgraph_vscissors_"+i+'_'+this.id);if(!div){var div=doc.createElement('DIV');div.id='rgraph_vscissors_'+i+'_'+this.id;div.style.width=width+'px';div.style.height=this.container.offsetHeight+'px';div.style.left=this.container.offsetWidth*(i/10)+'px';div.style.top=0;div.style.position='absolute';div.style.backgroundColor=color;this.container.appendChild(div);}
61
+ if(i%2==0){jQuery('#'+'rgraph_vscissors_'+i+'_'+this.id).animate({top:this.container.offsetHeight+'px',height:0},duration);}else{jQuery('#'+'rgraph_vscissors_'+i+'_'+this.id).animate({height:0},duration);}}
62
+ setTimeout(function()
63
+ {obj.container.removeChild(doc.getElementById('rgraph_vscissors_0'+'_'+obj.id));obj.container.removeChild(doc.getElementById('rgraph_vscissors_1'+'_'+obj.id));obj.container.removeChild(doc.getElementById('rgraph_vscissors_2'+'_'+obj.id));obj.container.removeChild(doc.getElementById('rgraph_vscissors_3'+'_'+obj.id));obj.container.removeChild(doc.getElementById('rgraph_vscissors_4'+'_'+obj.id));callback(obj);},duration);return this;};RG.SVG.FX.vscissorsclose=function()
64
+ {var obj=this,opt=arguments[0]||{},frames=opt.frames||90,duration=(frames/60)*1000,frame=0,callback=opt.callback||function(){},color=opt.color||'white',width=this.container.offsetWidth/10;for(var i=0;i<10;++i){var div=doc.getElementById("rgraph_vscissors_"+i+'_'+this.id)
65
+ if(!div){var div=doc.createElement('DIV');div.id='rgraph_vscissors_'+i+'_'+this.id;div.style.width=width+'px';div.style.height=0;div.style.left=(width*i)+'px';div.style.top=(i%2==0?this.container.offsetHeight:0)+'px';div.style.position='absolute';div.style.backgroundColor=color;this.container.appendChild(div);}
66
+ if(i%2==0){jQuery('#'+'rgraph_vscissors_'+i+'_'+this.id).animate({top:0,height:this.container.offsetHeight+'px'},duration);}else{jQuery('#'+'rgraph_vscissors_'+i+'_'+this.id).animate({height:this.container.offsetHeight+'px'},duration);}}
67
+ setTimeout(function()
68
+ {RG.SVG.clear(obj.svg);for(var i=0;i<10;i++){jQuery('#rgraph_vscissors_'+i+'_'+obj.id).remove();}
69
+ callback(obj);},duration);return this;};})(window,document);