rgraph-rails 5.00 → 6.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/publish-geml.yaml +46 -0
- data/.gitignore +1 -0
- data/README.md +4 -5
- data/lib/rgraph-rails/version.rb +1 -1
- data/rgraph-rails.gemspec +4 -4
- data/vendor/assets/javascripts/RGraph.activity.js +1691 -0
- data/vendor/assets/javascripts/RGraph.bar.js +4253 -236
- data/vendor/assets/javascripts/RGraph.bipolar.js +3958 -162
- data/vendor/assets/javascripts/RGraph.common.annotate.js +414 -35
- data/vendor/assets/javascripts/RGraph.common.context.js +635 -30
- data/vendor/assets/javascripts/RGraph.common.core.js +10485 -419
- data/vendor/assets/javascripts/RGraph.common.csv.js +508 -27
- data/vendor/assets/javascripts/RGraph.common.dynamic.js +1693 -90
- data/vendor/assets/javascripts/RGraph.common.effects.js +1629 -89
- data/vendor/assets/javascripts/RGraph.common.key.js +1003 -53
- data/vendor/assets/javascripts/RGraph.common.moment.js +5670 -0
- data/vendor/assets/javascripts/RGraph.common.sheets.js +541 -31
- data/vendor/assets/javascripts/RGraph.common.sheets.php +351 -0
- data/vendor/assets/javascripts/RGraph.common.starburst.js +382 -0
- data/vendor/assets/javascripts/RGraph.common.table.js +386 -0
- data/vendor/assets/javascripts/RGraph.common.tooltips.js +1433 -32
- data/vendor/assets/javascripts/RGraph.drawing.background.js +660 -35
- data/vendor/assets/javascripts/RGraph.drawing.circle.js +618 -34
- data/vendor/assets/javascripts/RGraph.drawing.image.js +857 -52
- data/vendor/assets/javascripts/RGraph.drawing.line.js +712 -0
- data/vendor/assets/javascripts/RGraph.drawing.marker1.js +760 -38
- data/vendor/assets/javascripts/RGraph.drawing.marker2.js +740 -37
- data/vendor/assets/javascripts/RGraph.drawing.marker3.js +573 -36
- data/vendor/assets/javascripts/RGraph.drawing.poly.js +667 -36
- data/vendor/assets/javascripts/RGraph.drawing.rect.js +638 -34
- data/vendor/assets/javascripts/RGraph.drawing.text.js +672 -37
- data/vendor/assets/javascripts/RGraph.drawing.xaxis.js +653 -52
- data/vendor/assets/javascripts/RGraph.drawing.yaxis.js +714 -51
- data/vendor/assets/javascripts/RGraph.fuel.js +1149 -59
- data/vendor/assets/javascripts/RGraph.funnel.js +1277 -56
- data/vendor/assets/javascripts/RGraph.gantt.js +1646 -82
- data/vendor/assets/javascripts/RGraph.gauge.js +1773 -89
- data/vendor/assets/javascripts/RGraph.hbar.js +3869 -159
- data/vendor/assets/javascripts/RGraph.horseshoe.js +970 -0
- data/vendor/assets/javascripts/RGraph.hprogress.js +1829 -81
- data/vendor/assets/javascripts/RGraph.line.js +5293 -244
- data/vendor/assets/javascripts/RGraph.meter.js +1570 -77
- data/vendor/assets/javascripts/RGraph.modaldialog.js +300 -19
- data/vendor/assets/javascripts/RGraph.odo.js +1553 -68
- data/vendor/assets/javascripts/RGraph.pie.js +3273 -129
- data/vendor/assets/javascripts/RGraph.radar.js +2333 -108
- data/vendor/assets/javascripts/RGraph.rose.js +2685 -114
- data/vendor/assets/javascripts/RGraph.rscatter.js +1920 -80
- data/vendor/assets/javascripts/RGraph.scatter.js +4215 -171
- data/vendor/assets/javascripts/RGraph.segmented.js +1006 -0
- data/vendor/assets/javascripts/RGraph.semicircularprogress.js +1980 -59
- data/vendor/assets/javascripts/RGraph.svg.activity.js +1696 -0
- data/vendor/assets/javascripts/RGraph.svg.bar.js +2575 -77
- data/vendor/assets/javascripts/RGraph.svg.bipolar.js +3533 -106
- data/vendor/assets/javascripts/RGraph.svg.common.ajax.js +240 -21
- data/vendor/assets/javascripts/RGraph.svg.common.core.js +7105 -299
- data/vendor/assets/javascripts/RGraph.svg.common.csv.js +408 -28
- data/vendor/assets/javascripts/RGraph.svg.common.fx.js +1291 -68
- data/vendor/assets/javascripts/RGraph.svg.common.key.js +451 -20
- data/vendor/assets/javascripts/RGraph.svg.common.sheets.js +543 -31
- data/vendor/assets/javascripts/RGraph.svg.common.table.js +391 -0
- data/vendor/assets/javascripts/RGraph.svg.common.tooltips.js +1072 -23
- data/vendor/assets/javascripts/RGraph.svg.funnel.js +1151 -32
- data/vendor/assets/javascripts/RGraph.svg.gauge.js +1429 -34
- data/vendor/assets/javascripts/RGraph.svg.hbar.js +2692 -65
- data/vendor/assets/javascripts/RGraph.svg.horseshoe.js +969 -0
- data/vendor/assets/javascripts/RGraph.svg.line.js +2855 -86
- data/vendor/assets/javascripts/RGraph.svg.pie.js +1630 -58
- data/vendor/assets/javascripts/RGraph.svg.radar.js +1772 -58
- data/vendor/assets/javascripts/RGraph.svg.rose.js +2419 -83
- data/vendor/assets/javascripts/RGraph.svg.scatter.js +2280 -65
- data/vendor/assets/javascripts/RGraph.svg.segmented.js +930 -0
- data/vendor/assets/javascripts/RGraph.svg.semicircularprogress.js +1612 -29
- data/vendor/assets/javascripts/RGraph.svg.waterfall.js +1525 -50
- data/vendor/assets/javascripts/RGraph.thermometer.js +1411 -64
- data/vendor/assets/javascripts/RGraph.vprogress.js +1915 -81
- data/vendor/assets/javascripts/RGraph.waterfall.js +1896 -89
- data/vendor/assets/javascripts/financial-data.js +1067 -0
- metadata +37 -16
- data/.travis.yml +0 -11
- data/vendor/assets/javascripts/RGraph.common.deprecated.js +0 -35
- data/vendor/assets/javascripts/RGraph.common.resizing.js +0 -38
- data/vendor/assets/javascripts/RGraph.common.zoom.js +0 -15
- data/vendor/assets/javascripts/RGraph.cornergauge.js +0 -71
@@ -1,20 +1,301 @@
|
|
1
|
+
'version:2023-09-16 (6.14)';
|
2
|
+
//
|
3
|
+
// o--------------------------------------------------------------------------------o
|
4
|
+
// | This file is part of the RGraph package - you can learn more at: |
|
5
|
+
// | |
|
6
|
+
// | https://www.rgraph.net |
|
7
|
+
// | |
|
8
|
+
// | RGraph is licensed under the Open Source MIT license. That means that it's |
|
9
|
+
// | totally free to use and there are no restrictions on what you can do with it! |
|
10
|
+
// o--------------------------------------------------------------------------------o
|
11
|
+
|
12
|
+
ModalDialog =
|
13
|
+
{
|
14
|
+
dialog: null,
|
15
|
+
background: null,
|
16
|
+
offset: 50,
|
17
|
+
events: [],
|
1
18
|
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
{
|
13
|
-
ModalDialog.
|
14
|
-
|
15
|
-
|
16
|
-
ModalDialog.
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
//
|
23
|
+
// Shows the dialog with the supplied DIV acting as the contents
|
24
|
+
//
|
25
|
+
// @param string id The ID of the DIV to use as the dialogs contents
|
26
|
+
// @param int width The width of the dialog
|
27
|
+
//
|
28
|
+
Show: function (id, width)
|
29
|
+
{
|
30
|
+
ModalDialog.id = id;
|
31
|
+
ModalDialog.width = width;
|
32
|
+
|
33
|
+
ModalDialog.ShowBackground();
|
34
|
+
ModalDialog.ShowDialog();
|
35
|
+
|
36
|
+
// Install the event handlers
|
37
|
+
window.onresize = ModalDialog.Resize;
|
38
|
+
|
39
|
+
// Add an event listener so that the
|
40
|
+
// ESC key hides the dialog
|
41
|
+
document.body.addEventListener('keydown', function (e)
|
42
|
+
{
|
43
|
+
if (e.keyCode === 27) {
|
44
|
+
ModalDialog.hide();
|
45
|
+
}
|
46
|
+
}, false);
|
47
|
+
|
48
|
+
|
49
|
+
// Call them initially
|
50
|
+
ModalDialog.Resize();
|
51
|
+
|
52
|
+
if (typeof ModalDialog.onmodaldialog == 'function') {
|
53
|
+
ModalDialog.onmodaldialog();
|
54
|
+
}
|
55
|
+
ModalDialog.FireCustomEvent('onmodaldialog');
|
56
|
+
},
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
//
|
62
|
+
// Shows the background semi-transparent darkened DIV
|
63
|
+
//
|
64
|
+
ShowBackground: function ()
|
65
|
+
{
|
66
|
+
// Create the background if neccessary
|
67
|
+
ModalDialog.background = document.createElement('DIV');
|
68
|
+
ModalDialog.background.className = 'ModalDialog_background';
|
69
|
+
ModalDialog.background.style.position = 'fixed';
|
70
|
+
ModalDialog.background.style.top = 0;
|
71
|
+
ModalDialog.background.style.left = 0;
|
72
|
+
ModalDialog.background.style.width = (screen.width + 100) + 'px';
|
73
|
+
ModalDialog.background.style.height = (screen.height + 100) + 'px';
|
74
|
+
ModalDialog.background.style.backgroundColor = 'rgb(204,204,204)';
|
75
|
+
ModalDialog.background.style.opacity = 0;
|
76
|
+
ModalDialog.background.style.zIndex = 3276;
|
77
|
+
ModalDialog.background.style.filter = "Alpha(opacity=50)";
|
78
|
+
|
79
|
+
document.body.appendChild(ModalDialog.background);
|
80
|
+
|
81
|
+
ModalDialog.background.style.visibility = 'visible';
|
82
|
+
},
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
//
|
88
|
+
// Shows the dialog itself
|
89
|
+
//
|
90
|
+
ShowDialog: function ()
|
91
|
+
{
|
92
|
+
// Create the DIV if necessary
|
93
|
+
// Jan 2012- Changed so that the dialog is ALWAYS (re)created
|
94
|
+
if (!ModalDialog.dialog || true) {
|
95
|
+
ModalDialog.dialog = document.createElement('DIV');
|
96
|
+
|
97
|
+
ModalDialog.dialog.id = 'ModalDialog_dialog';
|
98
|
+
ModalDialog.dialog.className = 'ModalDialog_dialog';
|
99
|
+
|
100
|
+
var borderRadius = '15px';
|
101
|
+
|
102
|
+
ModalDialog.dialog.style.borderRadius = borderRadius;
|
103
|
+
ModalDialog.dialog.style.MozBorderRadius = borderRadius;
|
104
|
+
ModalDialog.dialog.style.WebkitBorderRadius = borderRadius;
|
105
|
+
|
106
|
+
ModalDialog.dialog.style.boxShadow = '3px 3px 3px rgba(96,96,96,0.5)';
|
107
|
+
ModalDialog.dialog.style.MozBoxShadow = '3px 3px 3px rgba(96,96,96,0.5)';
|
108
|
+
ModalDialog.dialog.style.WebkitBoxShadow = 'rgba(96,96,96,0.5) 3px 3px 3px';
|
109
|
+
|
110
|
+
ModalDialog.dialog.style.position = 'fixed';
|
111
|
+
ModalDialog.dialog.style.backgroundColor = 'white';
|
112
|
+
ModalDialog.dialog.style.width = parseInt(ModalDialog.width) + 'px';
|
113
|
+
ModalDialog.dialog.style.border = '2px solid #999';
|
114
|
+
ModalDialog.dialog.style.zIndex = 32767;
|
115
|
+
ModalDialog.dialog.style.padding = '5px';
|
116
|
+
ModalDialog.dialog.style.paddingTop = '25px';
|
117
|
+
ModalDialog.dialog.style.opacity = 0;
|
118
|
+
|
119
|
+
if (document.all) {
|
120
|
+
ModalDialog.dialog.style.zIndex = 32767;
|
121
|
+
}
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
// Accomodate various browsers
|
126
|
+
if (navigator.userAgent.indexOf('Opera') != -1) {
|
127
|
+
ModalDialog.dialog.style.paddingTop = '25px';
|
128
|
+
|
129
|
+
} else if (navigator.userAgent.indexOf('MSIE') != -1) {
|
130
|
+
ModalDialog.dialog.style.paddingTop = '25px';
|
131
|
+
|
132
|
+
} else if (navigator.userAgent.indexOf('Safari') != -1) {
|
133
|
+
ModalDialog.dialog.style.paddingTop = '25px';
|
134
|
+
}
|
135
|
+
|
136
|
+
document.body.appendChild(ModalDialog.dialog);
|
137
|
+
|
138
|
+
|
139
|
+
// Now create the grey bar at the top of the dialog
|
140
|
+
var bar = document.createElement('DIV');
|
141
|
+
bar.className = 'ModalDialog_topbar';
|
142
|
+
bar.style.top = 0;
|
143
|
+
bar.style.left = 0;
|
144
|
+
bar.style.width = '100%';//(ModalDialog.dialog.offsetWidth - 4) + 'px';
|
145
|
+
bar.style.height = '20px';
|
146
|
+
bar.style.backgroundColor = '#bbb';
|
147
|
+
bar.style.borderBottom = '2px solid #999';
|
148
|
+
//bar.style.zIndex = 50000;
|
149
|
+
bar.style.position = 'absolute';
|
150
|
+
var borderRadius = '11px';
|
151
|
+
bar.style.WebkitBorderTopLeftRadius = borderRadius;
|
152
|
+
bar.style.WebkitBorderTopRightRadius = borderRadius;
|
153
|
+
bar.style.MozBorderRadiusTopleft = borderRadius;
|
154
|
+
bar.style.MozBorderRadiusTopright = borderRadius;
|
155
|
+
bar.style.borderTopRightRadius = borderRadius;
|
156
|
+
bar.style.borderTopLeftRadius = borderRadius;
|
157
|
+
ModalDialog.dialog.appendChild(bar);
|
158
|
+
|
159
|
+
// Add the content div
|
160
|
+
var content = document.createElement('DIV');
|
161
|
+
//content.style.paddingTop = '20px';
|
162
|
+
content.style.width = '100%';
|
163
|
+
content.style.height = '100%';
|
164
|
+
ModalDialog.dialog.appendChild(content);
|
165
|
+
|
166
|
+
if (ModalDialog.id.toLowerCase().substring(0, 7) == 'string:') {
|
167
|
+
content.innerHTML = ModalDialog.id.substring(7);
|
168
|
+
} else {
|
169
|
+
content.innerHTML = document.getElementById(ModalDialog.id).innerHTML;
|
170
|
+
}
|
171
|
+
|
172
|
+
// Now reposition the dialog in the center
|
173
|
+
ModalDialog.dialog.style.left = (document.body.offsetWidth / 2) - (ModalDialog.dialog.offsetWidth / 2) + 'px';
|
174
|
+
ModalDialog.dialog.style.top = '30%';
|
175
|
+
}
|
176
|
+
|
177
|
+
// Show the dialog
|
178
|
+
ModalDialog.dialog.style.visibility = 'visible';
|
179
|
+
|
180
|
+
// A simple fade-in effect
|
181
|
+
setTimeout('ModalDialog.dialog.style.opacity = 0.2', 50);
|
182
|
+
setTimeout('ModalDialog.dialog.style.opacity = 0.4', 100);
|
183
|
+
setTimeout('ModalDialog.dialog.style.opacity = 0.6', 150);
|
184
|
+
setTimeout('ModalDialog.dialog.style.opacity = 0.8', 200);
|
185
|
+
setTimeout('ModalDialog.dialog.style.opacity = 1', 250);
|
186
|
+
|
187
|
+
setTimeout('ModalDialog.background.style.opacity = 0.1', 50);
|
188
|
+
setTimeout('ModalDialog.background.style.opacity = 0.2', 100);
|
189
|
+
setTimeout('ModalDialog.background.style.opacity = 0.3', 150);
|
190
|
+
setTimeout('ModalDialog.background.style.opacity = 0.4', 200);
|
191
|
+
setTimeout('ModalDialog.background.style.opacity = 0.5', 250);
|
192
|
+
},
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
//
|
198
|
+
// Hides everything
|
199
|
+
//
|
200
|
+
Close: function ()
|
201
|
+
{
|
202
|
+
if (ModalDialog.dialog) {
|
203
|
+
// February 2012 - now remove the dialog node from the DOM
|
204
|
+
if (document.getElementById(ModalDialog.dialog.id)) {
|
205
|
+
document.body.removeChild(ModalDialog.dialog);
|
206
|
+
}
|
207
|
+
|
208
|
+
ModalDialog.dialog.style.visibility = 'hidden';
|
209
|
+
ModalDialog.dialog.style.opacity = 0;
|
210
|
+
}
|
211
|
+
|
212
|
+
if (ModalDialog.background) {
|
213
|
+
ModalDialog.background.style.visibility = 'hidden';
|
214
|
+
ModalDialog.background.style.opacity = 0;
|
215
|
+
|
216
|
+
// February 2012 - now remove the dialog node from the DOM
|
217
|
+
if (document.getElementById(ModalDialog.background.id)) {
|
218
|
+
document.body.removeChild(ModalDialog.background);
|
219
|
+
}
|
220
|
+
}
|
221
|
+
},
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
//
|
227
|
+
// Accommodate the window being resized
|
228
|
+
//
|
229
|
+
Resize: function ()
|
230
|
+
{
|
231
|
+
if (ModalDialog.dialog) {
|
232
|
+
ModalDialog.dialog.style.left = (document.body.offsetWidth / 2) - (ModalDialog.dialog.offsetWidth / 2) + 'px';
|
233
|
+
}
|
234
|
+
|
235
|
+
ModalDialog.background.style.width = '100%';
|
236
|
+
ModalDialog.background.style.height = '100%';
|
237
|
+
},
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
//
|
243
|
+
// Returns the page height
|
244
|
+
//
|
245
|
+
// @return int The page height
|
246
|
+
//
|
247
|
+
AddCustomEventListener: function (name, func)
|
248
|
+
{
|
249
|
+
if (typeof ModalDialog.events == 'undefined') {
|
250
|
+
ModalDialog.events = [];
|
251
|
+
}
|
252
|
+
|
253
|
+
ModalDialog.events.push([name, func]);
|
254
|
+
},
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
//
|
260
|
+
// Used to fire the ModalDialog custom event
|
261
|
+
//
|
262
|
+
// @param object obj The graph object that fires the event
|
263
|
+
// @param string event The name of the event to fire
|
264
|
+
//
|
265
|
+
FireCustomEvent: function (name)
|
266
|
+
{
|
267
|
+
for (var i=0; i<ModalDialog.events.length; ++i) {
|
268
|
+
if (typeof ModalDialog.events[i][0] == 'string' && ModalDialog.events[i][0] == name && typeof ModalDialog.events[i][1] == 'function') {
|
269
|
+
ModalDialog.events[i][1]();
|
270
|
+
}
|
271
|
+
}
|
272
|
+
},
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
//
|
278
|
+
// Returns true if the browser is IE8
|
279
|
+
//
|
280
|
+
isIE8: function ()
|
281
|
+
{
|
282
|
+
return document.all && (navigator.userAgent.indexOf('MSIE 8') > 0);
|
283
|
+
}
|
284
|
+
};
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
// Aliases
|
290
|
+
ModalDialog.show = ModalDialog.Show;
|
291
|
+
ModalDialog.draw = ModalDialog.Show;
|
292
|
+
ModalDialog.Hide = ModalDialog.Close;
|
293
|
+
ModalDialog.hide = ModalDialog.Close;
|
294
|
+
ModalDialog.close = ModalDialog.Close;
|
295
|
+
|
296
|
+
// Lowercase all of the function names
|
297
|
+
for (i in ModalDialog) {
|
298
|
+
if (typeof ModalDialog[i] === 'function') {
|
299
|
+
ModalDialog[i.toLowerCase()] = ModalDialog[i]
|
300
|
+
}
|
301
|
+
}
|