rgraph-rails 4.62 → 4.64

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 +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,549 +1,34 @@
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
-
13
- /**
14
- * Having this here means that the RGraph libraries can be included in any order, instead of you having
15
- * to include the common core library first.
16
- */
17
1
 
18
- // Define the RGraph global variable
19
- RGraph = window.RGraph || {isRGraph: true};
20
- RGraph.Drawing = RGraph.Drawing || {};
21
-
22
- /**
23
- * The constructor. This function sets up the object. It takes the ID (the HTML attribute) of the canvas as the
24
- * first argument and the data as the second. If you need to change this, you can.
25
- *
26
- * @param string id The canvas tag ID
27
- * @param number x The X position of the rectangle
28
- * @param number y The Y position of the rectangle
29
- * @param number w The width of the rectangle
30
- * @param number h The height of the rectangle
31
- */
32
- RGraph.Drawing.Rect = function (conf)
33
- {
34
- /**
35
- * Allow for object config style
36
- */
37
- if ( typeof conf === 'object'
38
- && typeof conf.x === 'number'
39
- && typeof conf.y === 'number'
40
- && typeof conf.width === 'number'
41
- && typeof conf.height === 'number'
42
- && typeof conf.id === 'string') {
43
-
44
- var id = conf.id,
45
- x = conf.x,
46
- y = conf.y,
47
- width = conf.width,
48
- height = conf.height,
49
- parseConfObjectForOptions = true; // Set this so the config is parsed (at the end of the constructor)
50
-
51
- } else {
52
-
53
- var id = conf,
54
- x = arguments[1],
55
- y = arguments[2],
56
- width = arguments[3],
57
- height = arguments[4];
58
- }
59
-
60
-
61
-
62
- // id, x, y, w, h
63
- this.id = id;
64
- this.canvas = document.getElementById(this.id);
65
- this.context = this.canvas.getContext('2d');
66
- this.colorsParsed = false;
67
- this.canvas.__object__ = this;
68
- this.original_colors = [];
69
- this.coordsText = [];
70
- this.firstDraw = true; // After the first draw this will be false
71
-
72
- /**
73
- * This defines the type of this shape
74
- */
75
- this.type = 'drawing.rect';
76
-
77
-
78
- /**
79
- * This facilitates easy object identification, and should always be true
80
- */
81
- this.isRGraph = true;
82
-
83
-
84
- /**
85
- * This adds a uid to the object that you can use for identification purposes
86
- */
87
- this.uid = RGraph.createUID();
88
-
89
-
90
- /**
91
- * This adds a UID to the canvas for identification purposes
92
- */
93
- this.canvas.uid = this.canvas.uid ? this.canvas.uid : RGraph.CreateUID();
94
-
95
-
96
-
97
-
98
- /**
99
- * Some example background properties
100
- */
101
- this.properties =
102
- {
103
- 'chart.strokestyle': 'rgba(0,0,0,0)',
104
- 'chart.fillstyle': 'red',
105
- 'chart.events.click': null,
106
- 'chart.events.mousemove': null,
107
- 'chart.shadow': false,
108
- 'chart.shadow.color': 'gray',
109
- 'chart.shadow.offsetx': 3,
110
- 'chart.shadow.offsety': 3,
111
- 'chart.shadow.blur': 5,
112
- 'chart.highlight.stroke': 'black',
113
- 'chart.highlight.fill': 'rgba(255,255,255,0.7)',
114
- 'chart.tooltips': null,
115
- 'chart.tooltips.effect': 'fade',
116
- 'chart.tooltips.css.class':'RGraph_tooltip',
117
- 'chart.tooltips.event': 'onclick',
118
- 'chart.tooltips.highlight':true,
119
- 'chart.tooltips.coords.page': false,
120
- 'chart.tooltips.valign': 'top',
121
- 'chart.clearto': 'rgba(0,0,0,0)'
122
- }
123
-
124
- /**
125
- * A simple check that the browser has canvas support
126
- */
127
- if (!this.canvas) {
128
- alert('[DRAWING.RECT] No canvas support');
129
- return;
130
- }
131
-
132
- /**
133
- * This can be used to store the coordinates of shapes on the graph
134
- */
135
-
136
- this.coords = [[
137
- Math.round(x),
138
- Math.round(y),
139
- width,
140
- height
141
- ]];
142
-
143
- /**
144
- * Create the dollar object so that functions can be added to them
145
- */
146
- this.$0 = {};
147
-
148
-
149
- /**
150
- * Translate half a pixel for antialiasing purposes - but only if it hasn't beeen
151
- * done already
152
- */
153
- if (!this.canvas.__rgraph_aa_translated__) {
154
- this.context.translate(0.5,0.5);
155
- this.canvas.__rgraph_aa_translated__ = true;
156
- }
157
-
158
-
159
-
160
- // Short variable names
161
- var RG = RGraph,
162
- ca = this.canvas,
163
- co = ca.getContext('2d'),
164
- prop = this.properties,
165
- pa2 = RG.path2,
166
- win = window,
167
- doc = document,
168
- ma = Math;
169
-
170
-
171
-
172
- /**
173
- * "Decorate" the object with the generic effects if the effects library has been included
174
- */
175
- if (RG.Effects && typeof RG.Effects.decorate === 'function') {
176
- RG.Effects.decorate(this);
177
- }
178
-
179
-
180
-
181
-
182
- /**
183
- * A setter method for setting graph properties. It can be used like this: obj.Set('chart.strokestyle', '#666');
184
- *
185
- * @param name string The name of the property to set
186
- * @param value mixed The value of the property
187
- */
188
- this.set =
189
- this.Set = function (name)
190
- {
191
- var value = typeof arguments[1] === 'undefined' ? null : arguments[1];
192
-
193
- /**
194
- * the number of arguments is only one and it's an
195
- * object - parse it for configuration data and return.
196
- */
197
- if (arguments.length === 1 && typeof name === 'object') {
198
- RG.parseObjectStyleConfig(this, name);
199
- return this;
200
- }
201
-
202
-
203
-
204
-
205
-
206
- /**
207
- * This should be done first - prepend the propertyy name with "chart." if necessary
208
- */
209
- if (name.substr(0,6) != 'chart.') {
210
- name = 'chart.' + name;
211
- }
212
-
213
-
214
-
215
-
216
- // Convert uppercase letters to dot+lower case letter
217
- while(name.match(/([A-Z])/)) {
218
- name = name.replace(/([A-Z])/, '.' + RegExp.$1.toLowerCase());
219
- }
220
-
221
-
222
-
223
-
224
-
225
-
226
- prop[name] = value;
227
-
228
- return this;
229
- };
230
-
231
-
232
-
233
-
234
- /**
235
- * A getter method for retrieving graph properties. It can be used like this: obj.Get('chart.strokestyle');
236
- *
237
- * @param name string The name of the property to get
238
- */
239
- this.get =
240
- this.Get = function (name)
241
- {
242
- /**
243
- * This should be done first - prepend the property name with "chart." if necessary
244
- */
245
- if (name.substr(0,6) != 'chart.') {
246
- name = 'chart.' + name;
247
- }
248
-
249
- // Convert uppercase letters to dot+lower case letter
250
- while(name.match(/([A-Z])/)) {
251
- name = name.replace(/([A-Z])/, '.' + RegExp.$1.toLowerCase());
252
- }
253
-
254
- return prop[name.toLowerCase()];
255
- };
256
-
257
-
258
-
259
-
260
- /**
261
- * Draws the rectangle
262
- */
263
- this.draw =
264
- this.Draw = function ()
265
- {
266
- /**
267
- * Fire the onbeforedraw event
268
- */
269
- RG.fireCustomEvent(this, 'onbeforedraw');
270
-
271
-
272
-
273
-
274
- /**
275
- * Stop this growing uncntrollably
276
- */
277
- this.coordsText = [];
278
-
279
-
280
-
281
-
282
- /**
283
- * Parse the colors. This allows for simple gradient syntax
284
- */
285
- if (!this.colorsParsed) {
286
-
287
- this.parseColors();
288
-
289
- // Don't want to do this again
290
- this.colorsParsed = true;
291
- }
292
-
293
-
294
- /**
295
- * Draw the rect here
296
- */
297
- pa2(co, ['b']);
298
-
299
- if (prop['chart.shadow']) {
300
- pa2(co, [
301
- 'sc',prop['chart.shadow.color'],
302
- 'sx',prop['chart.shadow.offsetx'],
303
- 'sy',prop['chart.shadow.offsety'],
304
- 'sb',prop['chart.shadow.blur'
305
- ]]);
306
- }
307
-
308
- pa2(co, [
309
- 'r',this.coords[0][0], this.coords[0][1], this.coords[0][2], this.coords[0][3],
310
- 'f',prop['chart.fillstyle'
311
- ]]);
312
-
313
-
314
- // No shaadow to stroke the rectangle
315
- RG.NoShadow(this);
316
-
317
- pa2(co, ['s',prop['chart.strokestyle']]);
318
-
319
-
320
- /**
321
- * This installs the event listeners
322
- */
323
- RG.installEventListeners(this);
324
-
325
-
326
- /**
327
- * Fire the onfirstdraw event
328
- */
329
- if (this.firstDraw) {
330
- RG.fireCustomEvent(this, 'onfirstdraw');
331
- this.firstDraw = false;
332
- this.firstDrawFunc();
333
- }
334
-
335
-
336
-
337
-
338
- /**
339
- * Fire the ondraw event
340
- */
341
- RG.fireCustomEvent(this, 'ondraw');
342
-
343
- return this;
344
- };
345
-
346
-
347
-
348
- /**
349
- * Used in chaining. Runs a function there and then - not waiting for
350
- * the events to fire (eg the onbeforedraw event)
351
- *
352
- * @param function func The function to execute
353
- */
354
- this.exec = function (func)
355
- {
356
- func(this);
357
-
358
- return this;
359
- };
360
-
361
-
362
-
363
-
364
- /**
365
- * The getObjectByXY() worker method
366
- */
367
- this.getObjectByXY = function (e)
368
- {
369
- if (this.getShape(e)) {
370
- return this;
371
- }
372
- };
373
-
374
-
375
-
376
-
377
- /**
378
- * Not used by the class during creating the graph, but is used by event handlers
379
- * to get the coordinates (if any) of the selected bar
380
- *
381
- * @param object e The event object
382
- * @param object OPTIONAL You can pass in the bar object instead of the
383
- * function using "this"
384
- */
385
- this.getShape = function (e)
386
- {
387
- var mouseXY = RG.getMouseXY(e),
388
- mouseX = mouseXY[0],
389
- mouseY = mouseXY[1];
390
-
391
- for (var i=0,len=this.coords.length; i<len; i++) {
392
-
393
- var coords = this.coords[i];
394
-
395
- var left = coords[0],
396
- top = coords[1],
397
- width = coords[2],
398
- height = coords[3];
399
-
400
- if (mouseX >= left && mouseX <= (left + width) && mouseY >= top && mouseY <= (top + height)) {
401
-
402
- return {
403
- 0: this, 1: left, 2: top, 3: width, 4: height, 5: 0,
404
- 'object': this, 'x': left, 'y': top, 'width': width, 'height': height, 'index': 0, 'tooltip': prop['chart.tooltips'] ? prop['chart.tooltips'][0] : null
405
- };
406
- }
407
- }
408
-
409
- return null;
410
- };
411
-
412
-
413
-
414
-
415
- /**
416
- * Each object type has its own Highlight() function which highlights the appropriate shape
417
- *
418
- * @param object shape The shape to highlight
419
- */
420
- this.highlight =
421
- this.Highlight = function (shape)
422
- {
423
- if (typeof prop['chart.highlight.style'] === 'function') {
424
- (prop['chart.highlight.style'])(shape);
425
- } else {
426
- RG.Highlight.rect(this, shape);
427
- }
428
- };
429
-
430
-
431
-
432
-
433
- /**
434
- * This allows for easy specification of gradients
435
- */
436
- this.parseColors = function ()
437
- {
438
- // Save the original colors so that they can be restored when the canvas is reset
439
- if (this.original_colors.length === 0) {
440
- this.original_colors['chart.fillstyle'] = RG.array_clone(prop['chart.fillstyle']);
441
- this.original_colors['chart.strokestyle'] = RG.array_clone(prop['chart.strokestyle']);
442
- this.original_colors['chart.highlight.stroke'] = RG.array_clone(prop['chart.highlight.stroke']);
443
- this.original_colors['chart.highlight.fill'] = RG.array_clone(prop['chart.highlight.fill']);
444
- }
445
-
446
-
447
-
448
-
449
- /**
450
- * Parse various properties for colors
451
- */
452
- prop['chart.fillstyle'] = this.parseSingleColorForGradient(prop['chart.fillstyle']);
453
- prop['chart.strokestyle'] = this.parseSingleColorForGradient(prop['chart.strokestyle']);
454
- prop['chart.highlight.stroke'] = this.parseSingleColorForGradient(prop['chart.highlight.stroke']);
455
- prop['chart.highlight.fill'] = this.parseSingleColorForGradient(prop['chart.highlight.fill']);
456
- };
457
-
458
-
459
-
460
-
461
- /**
462
- * Use this function to reset the object to the post-constructor state. Eg reset colors if
463
- * need be etc
464
- */
465
- this.reset = function ()
466
- {
467
- };
468
-
469
-
470
-
471
-
472
- /**
473
- * This parses a single color value
474
- */
475
- this.parseSingleColorForGradient = function (color)
476
- {
477
- if (!color) {
478
- return color;
479
- }
480
-
481
- if (typeof color === 'string' && color.match(/^gradient\((.*)\)$/i)) {
482
-
483
- var parts = RegExp.$1.split(':'),
484
- grad = co.createLinearGradient(0,0,ca.width,0),
485
- diff = 1 / (parts.length - 1);
486
-
487
- grad.addColorStop(0, RG.trim(parts[0]));
488
-
489
- for (var j=1,len=parts.length; j<len; ++j) {
490
- grad.addColorStop(j * diff, RG.trim(parts[j]));
491
- }
492
- }
493
-
494
- return grad ? grad : color;
495
- };
496
-
497
-
498
-
499
-
500
- /**
501
- * Using a function to add events makes it easier to facilitate method chaining
502
- *
503
- * @param string type The type of even to add
504
- * @param function func
505
- */
506
- this.on = function (type, func)
507
- {
508
- if (type.substr(0,2) !== 'on') {
509
- type = 'on' + type;
510
- }
511
-
512
- if (typeof this[type] !== 'function') {
513
- this[type] = func;
514
- } else {
515
- RG.addCustomEventListener(this, type, func);
516
- }
517
-
518
- return this;
519
- };
520
-
521
-
522
-
523
-
524
- /**
525
- * This function runs once only
526
- * (put at the end of the file (before any effects))
527
- */
528
- this.firstDrawFunc = function ()
529
- {
530
- };
531
-
532
-
533
-
534
-
535
- /**
536
- * Objects are now always registered so that the chart is redrawn if need be.
537
- */
538
- RG.register(this);
539
-
540
-
541
-
542
- /**
543
- * This is the 'end' of the constructor so if the first argument
544
- * contains configuration data - handle that.
545
- */
546
- if (parseConfObjectForOptions) {
547
- RG.parseObjectStyleConfig(this, conf.options);
548
- }
549
- };
2
+ RGraph=window.RGraph||{isRGraph:true};RGraph.Drawing=RGraph.Drawing||{};RGraph.Drawing.Rect=function(conf)
3
+ {if(typeof conf==='object'&&typeof conf.x==='number'&&typeof conf.y==='number'&&typeof conf.width==='number'&&typeof conf.height==='number'&&typeof conf.id==='string'){var id=conf.id,x=conf.x,y=conf.y,width=conf.width,height=conf.height,parseConfObjectForOptions=true;}else{var id=conf,x=arguments[1],y=arguments[2],width=arguments[3],height=arguments[4];}
4
+ this.id=id;this.canvas=document.getElementById(this.id);this.context=this.canvas.getContext('2d');this.colorsParsed=false;this.canvas.__object__=this;this.original_colors=[];this.coordsText=[];this.firstDraw=true;this.type='drawing.rect';this.isRGraph=true;this.uid=RGraph.createUID();this.canvas.uid=this.canvas.uid?this.canvas.uid:RGraph.CreateUID();this.properties={'chart.strokestyle':'rgba(0,0,0,0)','chart.fillstyle':'red','chart.events.click':null,'chart.events.mousemove':null,'chart.shadow':false,'chart.shadow.color':'gray','chart.shadow.offsetx':3,'chart.shadow.offsety':3,'chart.shadow.blur':5,'chart.highlight.stroke':'black','chart.highlight.fill':'rgba(255,255,255,0.7)','chart.tooltips':null,'chart.tooltips.effect':'fade','chart.tooltips.css.class':'RGraph_tooltip','chart.tooltips.event':'onclick','chart.tooltips.highlight':true,'chart.tooltips.coords.page':false,'chart.tooltips.valign':'top','chart.clearto':'rgba(0,0,0,0)'}
5
+ if(!this.canvas){alert('[DRAWING.RECT] No canvas support');return;}
6
+ this.coords=[[Math.round(x),Math.round(y),width,height]];this.$0={};if(!this.canvas.__rgraph_aa_translated__){this.context.translate(0.5,0.5);this.canvas.__rgraph_aa_translated__=true;}
7
+ var RG=RGraph,ca=this.canvas,co=ca.getContext('2d'),prop=this.properties,pa2=RG.path2,win=window,doc=document,ma=Math;if(RG.Effects&&typeof RG.Effects.decorate==='function'){RG.Effects.decorate(this);}
8
+ this.set=this.Set=function(name)
9
+ {var value=typeof arguments[1]==='undefined'?null:arguments[1];if(arguments.length===1&&typeof name==='object'){RG.parseObjectStyleConfig(this,name);return this;}
10
+ if(name.substr(0,6)!='chart.'){name='chart.'+name;}
11
+ while(name.match(/([A-Z])/)){name=name.replace(/([A-Z])/,'.'+RegExp.$1.toLowerCase());}
12
+ prop[name]=value;return this;};this.get=this.Get=function(name)
13
+ {if(name.substr(0,6)!='chart.'){name='chart.'+name;}
14
+ while(name.match(/([A-Z])/)){name=name.replace(/([A-Z])/,'.'+RegExp.$1.toLowerCase());}
15
+ return prop[name.toLowerCase()];};this.draw=this.Draw=function()
16
+ {RG.fireCustomEvent(this,'onbeforedraw');this.coordsText=[];if(!this.colorsParsed){this.parseColors();this.colorsParsed=true;}
17
+ pa2(co,['b']);if(prop['chart.shadow']){pa2(co,['sc',prop['chart.shadow.color'],'sx',prop['chart.shadow.offsetx'],'sy',prop['chart.shadow.offsety'],'sb',prop['chart.shadow.blur']]);}
18
+ pa2(co,['r',this.coords[0][0],this.coords[0][1],this.coords[0][2],this.coords[0][3],'f',prop['chart.fillstyle']]);RG.NoShadow(this);pa2(co,['s',prop['chart.strokestyle']]);RG.installEventListeners(this);if(this.firstDraw){this.firstDraw=false;RG.fireCustomEvent(this,'onfirstdraw');this.firstDrawFunc();}
19
+ RG.fireCustomEvent(this,'ondraw');return this;};this.exec=function(func)
20
+ {func(this);return this;};this.getObjectByXY=function(e)
21
+ {if(this.getShape(e)){return this;}};this.getShape=function(e)
22
+ {var mouseXY=RG.getMouseXY(e),mouseX=mouseXY[0],mouseY=mouseXY[1];for(var i=0,len=this.coords.length;i<len;i++){var coords=this.coords[i];var left=coords[0],top=coords[1],width=coords[2],height=coords[3];if(mouseX>=left&&mouseX<=(left+width)&&mouseY>=top&&mouseY<=(top+height)){return{0:this,1:left,2:top,3:width,4:height,5:0,'object':this,'x':left,'y':top,'width':width,'height':height,'index':0,'tooltip':prop['chart.tooltips']?prop['chart.tooltips'][0]:null};}}
23
+ return null;};this.highlight=this.Highlight=function(shape)
24
+ {if(typeof prop['chart.highlight.style']==='function'){(prop['chart.highlight.style'])(shape);}else{RG.Highlight.rect(this,shape);}};this.parseColors=function()
25
+ {if(this.original_colors.length===0){this.original_colors['chart.fillstyle']=RG.array_clone(prop['chart.fillstyle']);this.original_colors['chart.strokestyle']=RG.array_clone(prop['chart.strokestyle']);this.original_colors['chart.highlight.stroke']=RG.array_clone(prop['chart.highlight.stroke']);this.original_colors['chart.highlight.fill']=RG.array_clone(prop['chart.highlight.fill']);}
26
+ prop['chart.fillstyle']=this.parseSingleColorForGradient(prop['chart.fillstyle']);prop['chart.strokestyle']=this.parseSingleColorForGradient(prop['chart.strokestyle']);prop['chart.highlight.stroke']=this.parseSingleColorForGradient(prop['chart.highlight.stroke']);prop['chart.highlight.fill']=this.parseSingleColorForGradient(prop['chart.highlight.fill']);};this.reset=function()
27
+ {};this.parseSingleColorForGradient=function(color)
28
+ {if(!color){return color;}
29
+ if(typeof color==='string'&&color.match(/^gradient\((.*)\)$/i)){var parts=RegExp.$1.split(':'),grad=co.createLinearGradient(0,0,ca.width,0),diff=1/(parts.length-1);grad.addColorStop(0,RG.trim(parts[0]));for(var j=1,len=parts.length;j<len;++j){grad.addColorStop(j*diff,RG.trim(parts[j]));}}
30
+ return grad?grad:color;};this.on=function(type,func)
31
+ {if(type.substr(0,2)!=='on'){type='on'+type;}
32
+ if(typeof this[type]!=='function'){this[type]=func;}else{RG.addCustomEventListener(this,type,func);}
33
+ return this;};this.firstDrawFunc=function()
34
+ {};RG.register(this);if(parseConfObjectForOptions){RG.parseObjectStyleConfig(this,conf.options);}};