rgraph-rails 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. checksums.yaml +8 -8
  2. data/.travis.yml +0 -1
  3. data/README.md +3 -3
  4. data/lib/rgraph-rails/version.rb +1 -1
  5. data/vendor/assets/javascripts/RGraph.bar.js +239 -3764
  6. data/vendor/assets/javascripts/RGraph.bipolar.js +115 -1986
  7. data/vendor/assets/javascripts/RGraph.common.annotate.js +35 -399
  8. data/vendor/assets/javascripts/RGraph.common.context.js +30 -600
  9. data/vendor/assets/javascripts/RGraph.common.core.js +403 -5187
  10. data/vendor/assets/javascripts/RGraph.common.csv.js +19 -275
  11. data/vendor/assets/javascripts/RGraph.common.deprecated.js +35 -454
  12. data/vendor/assets/javascripts/RGraph.common.dynamic.js +84 -1189
  13. data/vendor/assets/javascripts/RGraph.common.effects.js +90 -1548
  14. data/vendor/assets/javascripts/RGraph.common.key.js +54 -755
  15. data/vendor/assets/javascripts/RGraph.common.resizing.js +37 -567
  16. data/vendor/assets/javascripts/RGraph.common.sheets.js +29 -356
  17. data/vendor/assets/javascripts/RGraph.common.tooltips.js +32 -614
  18. data/vendor/assets/javascripts/RGraph.common.zoom.js +14 -223
  19. data/vendor/assets/javascripts/RGraph.cornergauge.js +71 -0
  20. data/vendor/assets/javascripts/RGraph.drawing.background.js +35 -620
  21. data/vendor/assets/javascripts/RGraph.drawing.circle.js +35 -576
  22. data/vendor/assets/javascripts/RGraph.drawing.image.js +52 -807
  23. data/vendor/assets/javascripts/RGraph.drawing.marker1.js +41 -717
  24. data/vendor/assets/javascripts/RGraph.drawing.marker2.js +37 -668
  25. data/vendor/assets/javascripts/RGraph.drawing.marker3.js +36 -563
  26. data/vendor/assets/javascripts/RGraph.drawing.poly.js +40 -608
  27. data/vendor/assets/javascripts/RGraph.drawing.rect.js +35 -597
  28. data/vendor/assets/javascripts/RGraph.drawing.text.js +34 -642
  29. data/vendor/assets/javascripts/RGraph.drawing.xaxis.js +50 -809
  30. data/vendor/assets/javascripts/RGraph.drawing.yaxis.js +51 -856
  31. data/vendor/assets/javascripts/RGraph.fuel.js +58 -964
  32. data/vendor/assets/javascripts/RGraph.funnel.js +55 -984
  33. data/vendor/assets/javascripts/RGraph.gantt.js +75 -1241
  34. data/vendor/assets/javascripts/RGraph.gauge.js +87 -1397
  35. data/vendor/assets/javascripts/RGraph.hbar.js +143 -2376
  36. data/vendor/assets/javascripts/RGraph.hprogress.js +80 -1397
  37. data/vendor/assets/javascripts/RGraph.line.js +241 -4162
  38. data/vendor/assets/javascripts/RGraph.meter.js +74 -1278
  39. metadata +3 -30
  40. data/vendor/assets/images/bg.png +0 -0
  41. data/vendor/assets/images/bullet.png +0 -0
  42. data/vendor/assets/images/facebook-large.png +0 -0
  43. data/vendor/assets/images/google-plus-large.png +0 -0
  44. data/vendor/assets/images/logo.png +0 -0
  45. data/vendor/assets/images/meter-image-sd-needle.png +0 -0
  46. data/vendor/assets/images/meter-image-sd.png +0 -0
  47. data/vendor/assets/images/meter-sketch-needle.png +0 -0
  48. data/vendor/assets/images/meter-sketch.png +0 -0
  49. data/vendor/assets/images/odometer-background.png +0 -0
  50. data/vendor/assets/images/rgraph.jpg +0 -0
  51. data/vendor/assets/images/title.png +0 -0
  52. data/vendor/assets/images/twitter-large.png +0 -0
  53. data/vendor/assets/javascripts/RGraph.modaldialog.js +0 -301
  54. data/vendor/assets/javascripts/RGraph.odo.js +0 -1265
  55. data/vendor/assets/javascripts/RGraph.pie.js +0 -2272
  56. data/vendor/assets/javascripts/RGraph.radar.js +0 -1847
  57. data/vendor/assets/javascripts/RGraph.rose.js +0 -1877
  58. data/vendor/assets/javascripts/RGraph.rscatter.js +0 -1425
  59. data/vendor/assets/javascripts/RGraph.scatter.js +0 -2970
  60. data/vendor/assets/javascripts/RGraph.semicircularprogress.js +0 -1015
  61. data/vendor/assets/javascripts/RGraph.thermometer.js +0 -1129
  62. data/vendor/assets/javascripts/RGraph.vprogress.js +0 -1452
  63. data/vendor/assets/javascripts/RGraph.waterfall.js +0 -1252
  64. data/vendor/assets/javascripts/financial-data.js +0 -1067
  65. data/vendor/assets/stylesheets/ModalDialog.css +0 -90
  66. data/vendor/assets/stylesheets/animations.css +0 -3347
  67. data/vendor/assets/stylesheets/website.css +0 -446
@@ -1,276 +1,20 @@
1
- // version: 2016-06-04
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 dual licensed under the Open Source GPL (General Public License) |
9
- * | v2.0 license and a commercial license which means that you're not bound by |
10
- * | the terms of the GPL. The commercial license starts at just 99 GBP and |
11
- * | you can read about it here: |
12
- * | |
13
- * | http://www.rgraph.net/license |
14
- * o--------------------------------------------------------------------------------o
15
- */
16
1
 
17
- /**
18
- * Initialise the various objects
19
- */
20
- RGraph = window.RGraph || {isRGraph: true};
21
-
22
-
23
-
24
-
25
- RGraph.CSV = function (url, func)
26
- {
27
- var RG = RGraph,
28
- ua = navigator.userAgent,
29
- ma = Math;
30
-
31
-
32
-
33
-
34
- /**
35
- * Some default values
36
- */
37
- this.url = url;
38
- this.ready = func;
39
- this.data = null;
40
- this.numrows = null;
41
- this.numcols = null;
42
- this.seperator = arguments[2] || ',';
43
- this.endofline = arguments[3] || /\r?\n/;
44
-
45
-
46
-
47
-
48
- /**
49
- * A Custom split function
50
- *
51
- * @param string str The CSV string to split
52
- * @param mixed char The character to split on - or it can also be an object like this:
53
- * {
54
- * preserve: false, // Whether to preserve whitespace
55
- * char: ',' // The character to split on
56
- * }
57
- */
58
- this.splitCSV = function (str, split)
59
- {
60
- // Defaults
61
- var arr = [];
62
- var field = '';
63
- var inDoubleQuotes = false;
64
- var inSingleQuotes = false;
65
- var preserve = (typeof split === 'object' && split.preserve) ? true : false;
66
-
67
- // The character to split the CSV string on
68
- if (typeof split === 'object') {
69
- if (typeof split.char === 'string') {
70
- split = split.char;
71
- } else {
72
- split = ',';
73
- }
74
- } // If not an object just leave the char as it's supplied
75
-
76
-
77
-
78
- for (var i=0,len=str.length; i<len; i+=1) {
79
-
80
- char = str.charAt(i);
81
-
82
- if ( (char === '"') && !inDoubleQuotes) {
83
- inDoubleQuotes = true;
84
- continue;
85
-
86
- } else if ( (char === '"') && inDoubleQuotes) {
87
- inDoubleQuotes = false;
88
- continue;
89
- }
90
- if ( (char === "'") && !inSingleQuotes) {
91
- inSingleQuotes = true;
92
- continue;
93
-
94
- } else if ( (char === "'") && inSingleQuotes) {
95
- inSingleQuotes = false;
96
- continue;
97
-
98
- } else if (char === split && !inDoubleQuotes && !inSingleQuotes) {
99
- // TODO look ahead in order to allow for multi-character seperators
100
- arr.push(field);
101
- field = '';
102
- continue;
103
-
104
- } else {
105
- field = field + char;
106
- }
107
- }
108
-
109
- // Add the last field
110
- arr.push(field);
111
-
112
- // Now trim each value if necessary
113
- if (!preserve) {
114
- for (i=0,len=arr.length; i<len; i+=1) {
115
- arr[i] = arr[i].trim();
116
- }
117
- }
118
-
119
- return arr;
120
- };
121
-
122
-
123
-
124
-
125
- /**
126
- * This function splits the CSV data into an array so that it can be useful.
127
- */
128
- this.fetch = function ()
129
- {
130
- var sep = this.seperator;
131
- var eol = this.endofline;
132
- var obj = this;
133
-
134
- if (this.url.substring(0,3) == 'id:') {
135
-
136
- // Get rid of any surrounding whitespace
137
- var data = document.getElementById(this.url.substring(3)).innerHTML.trim();
138
-
139
- // Store the CSV data on the CSV object (ie - this object)
140
- obj.data = data.split(eol);
141
-
142
- // Store the number of rows
143
- obj.numrows = obj.data.length;
144
-
145
- for (var i=0,len=obj.data.length; i<len; i+=1) {
146
-
147
-
148
- /**
149
- * Split the individual line
150
- */
151
- //var row = obj.data[i].split(sep);
152
- var row = obj.splitCSV(obj.data[i], {preserve: false, char: sep});
153
-
154
-
155
- if (!obj.numcols) {
156
- obj.numcols = row.length;
157
- }
158
-
159
- /**
160
- * If the cell is purely made up of numbers - convert it
161
- */
162
- for (var j=0; j<row.length; j+=1) {
163
- if ((/^[0-9.]+$/).test(row[j])) {
164
- row[j] = parseFloat(row[j]);
165
- }
166
-
167
- // Assign the split-up-row back to the data array
168
- obj.data[i] = row;
169
- }
170
- }
171
-
172
- // Call the ready function straight away
173
- obj.ready(obj);
174
-
175
- } else {
176
-
177
- RGraph.AJAX.getString(this.url, function (data)
178
- {
179
- data = data.replace(/(\r?\n)+$/, '');
180
-
181
- /**
182
- * Split the lines in the CSV
183
- */
184
- obj.data = data.split(eol);
185
-
186
- /**
187
- * Store the number of rows
188
- */
189
- obj.numrows = obj.data.length;
190
-
191
-
192
-
193
- /**
194
- * Loop thru each lines in the CSV file
195
- */
196
- for (var i=0,len=obj.data.length; i<len; i+=1) {
197
- /**
198
- * Use the new split function to split each row NOT preserving whitespace
199
- */
200
- //var row = obj.data[i].split(sep);
201
- var row = obj.splitCSV(obj.data[i], {preserve: false, char: sep});
202
-
203
- if (!obj.numcols) {
204
- obj.numcols = row.length;
205
- }
206
-
207
- /**
208
- * If the cell is purely made up of numbers - convert it
209
- */
210
- for (var j=0; j<row.length; j+=1) {
211
- if ((/^\-?[0-9.]+$/).test(row[j])) {
212
- row[j] = parseFloat(row[j]);
213
- }
214
-
215
- // Assign the split-up-row back to the data array
216
- obj.data[i] = row;
217
- }
218
-
219
- }
220
-
221
- // Call the ready function straight away
222
- obj.ready(obj);
223
- });
224
- }
225
- };
226
-
227
-
228
-
229
-
230
- /**
231
- * Returns a row of the CSV file
232
- *
233
- * @param number index The index of the row to fetch
234
- * @param start OPTIONAL If desired you can specify a column to start at (which starts at 0 by default)
235
- */
236
- this.getRow = function (index)
237
- {
238
- var row = [];
239
- var start = arguments[1] || 0;
240
-
241
- for (var i=start; i<this.numcols; i+=1) {
242
- row.push(this.data[index][i]);
243
- }
244
-
245
- return row;
246
- };
247
-
248
-
249
-
250
-
251
- /**
252
- * Returns a column of the CSV file
253
- *
254
- * @param number index The index of the column to fetch
255
- * @param start OPTIONAL If desired you can specify a row to start at (which starts at 0 by default)
256
- */
257
- this.getCol =
258
- this.getColumn = function (index)
259
- {
260
- var col = [];
261
- var start = arguments[1] || 0;
262
-
263
- for (var i=start; i<this.numrows; i+=1) {
264
- col.push(this.data[i][index]);
265
- }
266
-
267
- return col;
268
- };
269
-
270
-
271
-
272
-
273
-
274
- // Fetch the CSV file
275
- this.fetch();
276
- };
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;var eol=this.endofline;var obj=this;if(this.url.substring(0,3)=='id:'){var data=document.getElementById(this.url.substring(3)).innerHTML.trim();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;}
10
+ for(var j=0;j<row.length;j+=1){if((/^[0-9.]+$/).test(row[j])){row[j]=parseFloat(row[j]);}
11
+ obj.data[i]=row;}}
12
+ obj.ready(obj);}else{RGraph.AJAX.getString(this.url,function(data)
13
+ {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;}
14
+ for(var j=0;j<row.length;j+=1){if((/^\-?[0-9.]+$/).test(row[j])){row[j]=parseFloat(row[j]);}
15
+ obj.data[i]=row;}}
16
+ obj.ready(obj);});}};this.getRow=function(index)
17
+ {var row=[];var start=arguments[1]||0;for(var i=start;i<this.numcols;i+=1){row.push(this.data[index][i]);}
18
+ return row;};this.getCol=this.getColumn=function(index)
19
+ {var col=[];var start=arguments[1]||0;for(var i=start;i<this.numrows;i+=1){col.push(this.data[i][index]);}
20
+ return col;};this.fetch();};