rgraph-rails 1.0.6 → 1.0.7

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 (29) hide show
  1. checksums.yaml +5 -13
  2. data/CODE_OF_CONDUCT.md +68 -7
  3. data/README.md +7 -2
  4. data/lib/rgraph-rails/version.rb +1 -1
  5. data/rgraph-rails.gemspec +1 -1
  6. data/vendor/assets/javascripts/RGraph.bar.js +5 -3
  7. data/vendor/assets/javascripts/RGraph.bipolar.js +4 -4
  8. data/vendor/assets/javascripts/RGraph.common.context.js +1 -1
  9. data/vendor/assets/javascripts/RGraph.common.core.js +10 -8
  10. data/vendor/assets/javascripts/RGraph.common.dynamic.js +10 -8
  11. data/vendor/assets/javascripts/RGraph.common.key.js +1 -1
  12. data/vendor/assets/javascripts/RGraph.drawing.poly.js +2 -3
  13. data/vendor/assets/javascripts/RGraph.drawing.text.js +5 -3
  14. data/vendor/assets/javascripts/RGraph.gantt.js +6 -4
  15. data/vendor/assets/javascripts/RGraph.hbar.js +9 -6
  16. data/vendor/assets/javascripts/RGraph.line.js +5 -2
  17. data/vendor/assets/javascripts/RGraph.modaldialog.js +20 -0
  18. data/vendor/assets/javascripts/RGraph.odo.js +72 -0
  19. data/vendor/assets/javascripts/RGraph.pie.js +138 -0
  20. data/vendor/assets/javascripts/RGraph.radar.js +111 -0
  21. data/vendor/assets/javascripts/RGraph.rose.js +109 -0
  22. data/vendor/assets/javascripts/RGraph.rscatter.js +81 -0
  23. data/vendor/assets/javascripts/RGraph.scatter.js +169 -0
  24. data/vendor/assets/javascripts/RGraph.semicircularprogress.js +61 -0
  25. data/vendor/assets/javascripts/RGraph.thermometer.js +63 -0
  26. data/vendor/assets/javascripts/RGraph.thermometer.old.js +68 -0
  27. data/vendor/assets/javascripts/RGraph.vprogress.js +84 -0
  28. data/vendor/assets/javascripts/RGraph.waterfall.js +81 -0
  29. metadata +31 -19
@@ -0,0 +1,81 @@
1
+
2
+ RGraph=window.RGraph||{isRGraph:true};RGraph.Waterfall=function(conf)
3
+ {if(typeof conf==='object'&&typeof conf.data==='object'&&typeof conf.id==='string'){var parseConfObjectForOptions=true;}else{var conf={id:conf,data:arguments[1]};}
4
+ this.id=conf.id;this.canvas=document.getElementById(this.id);this.context=this.canvas.getContext?this.canvas.getContext("2d"):null;this.canvas.__object__=this;this.type='waterfall';this.max=0;this.data=conf.data;this.isRGraph=true;this.coords=[];this.uid=RGraph.CreateUID();this.canvas.uid=this.canvas.uid?this.canvas.uid:RGraph.CreateUID();this.colorsParsed=false;this.coordsText=[];this.original_colors=[];this.firstDraw=true;this.properties={'chart.background.barcolor1':'rgba(0,0,0,0)','chart.background.barcolor2':'rgba(0,0,0,0)','chart.background.grid':true,'chart.background.grid.color':'#ddd','chart.background.grid.width':1,'chart.background.grid.hsize':20,'chart.background.grid.vsize':20,'chart.background.grid.vlines':true,'chart.background.grid.hlines':true,'chart.background.grid.border':true,'chart.background.grid.autofit':true,'chart.background.grid.autofit.align':true,'chart.background.grid.autofit.numhlines':5,'chart.background.grid.autofit.numvlines':20,'chart.background.image':null,'chart.background.hbars':null,'chart.linewidth':1,'chart.axis.linewidth':1,'chart.xaxispos':'bottom','chart.numxticks':null,'chart.numyticks':10,'chart.hmargin':5,'chart.strokestyle':'#666','chart.axis.color':'black','chart.gutter.left':25,'chart.gutter.right':25,'chart.gutter.top':25,'chart.gutter.bottom':25,'chart.labels':[],'chart.labels.bold':false,'chart.labels.offsetx':0,'chart.labels.offsety':0,'chart.ylabels.offsetx':0,'chart.ylabels.offsety':0,'chart.ylabels':true,'chart.text.color':'black','chart.text.size':12,'chart.text.angle':0,'chart.text.font':'Segoe UI, Arial, Verdana, sans-serif','chart.text.accessible':true,'chart.text.accessible.overflow':'visible','chart.text.accessible.pointerevents':true,'chart.ymax':null,'chart.title':'','chart.title.color':'black','chart.title.background':null,'chart.title.hpos':null,'chart.title.vpos':null,'chart.title.bold':true,'chart.title.font':null,'chart.title.xaxis':'','chart.title.yaxis':'','chart.title.yaxis.bold':true,'chart.title.yaxis.size':null,'chart.title.yaxis.font':null,'chart.title.yaxis.color':null,'chart.title.xaxis.pos':null,'chart.title.yaxis.pos':null,'chart.title.yaxis.align':'left','chart.title.xaxis.bold':true,'chart.title.xaxis.size':null,'chart.title.xaxis.font':null,'chart.title.xaxis.color':null,'chart.title.yaxis.x':null,'chart.title.yaxis.y':null,'chart.title.xaxis.x':null,'chart.title.xaxis.y':null,'chart.title.x':null,'chart.title.y':null,'chart.title.halign':null,'chart.title.valign':null,'chart.colors':['green','red','blue'],'chart.shadow':false,'chart.shadow.color':'#666','chart.shadow.offsetx':3,'chart.shadow.offsety':3,'chart.shadow.blur':3,'chart.tooltips':null,'chart.tooltips.effect':'fade','chart.tooltips.css.class':'RGraph_tooltip','chart.tooltips.event':'onclick','chart.tooltips.highlight':true,'chart.tooltips.override':null,'chart.highlight.stroke':'rgba(0,0,0,0)','chart.highlight.fill':'rgba(255,255,255,0.7)','chart.contextmenu':null,'chart.units.pre':'','chart.units.post':'','chart.scale.decimals':0,'chart.scale.point':'.','chart.scale.thousand':',','chart.scale.zerostart':true,'chart.crosshairs':false,'chart.crosshairs.color':'#333','chart.crosshairs.hline':true,'chart.crosshairs.vline':true,'chart.annotatable':false,'chart.annotate.color':'black','chart.zoom.factor':1.5,'chart.zoom.fade.in':true,'chart.zoom.fade.out':true,'chart.zoom.hdir':'right','chart.zoom.vdir':'down','chart.zoom.frames':25,'chart.zoom.delay':16.666,'chart.zoom.shadow':true,'chart.zoom.background':true,'chart.resizable':false,'chart.resize.handle.background':null,'chart.noaxes':false,'chart.noxaxis':false,'chart.noyaxis':false,'chart.axis.color':'black','chart.total':true,'chart.multiplier.x':1,'chart.multiplier.w':1,'chart.events.click':null,'chart.events.mousemove':null,'chart.ylabels.count':5,'chart.ymin':0,'chart.clearto':'rgba(0,0,0,0)'}
5
+ if(!this.canvas){alert('[WATERFALL] No canvas support');return;}
6
+ for(var i=0,len=this.data.length;i<=len;++i){this['$'+i]={}
7
+ if(typeof this.data[i]==='string'){this.data[i]=parseFloat(this.data[i]);}}
8
+ if(!this.canvas.__rgraph_aa_translated__){this.context.translate(0.5,0.5);this.canvas.__rgraph_aa_translated__=true;}
9
+ var RG=RGraph,ca=this.canvas,co=ca.getContext('2d'),prop=this.properties,pa2=RG.path2,win=window,doc=document,ma=Math
10
+ if(RG.Effects&&typeof RG.Effects.decorate==='function'){RG.Effects.decorate(this);}
11
+ this.set=this.Set=function(name,value)
12
+ {var value=typeof arguments[1]==='undefined'?null:arguments[1];if(arguments.length===1&&typeof name==='object'){RG.parseObjectStyleConfig(this,name);return this;}
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
+ if(name=='chart.total'&&prop['chart.numxticks']==null){prop['chart.numxticks']=this.data.length;}
16
+ prop[name.toLowerCase()]=value;return this;};this.get=this.Get=function(name)
17
+ {if(name.substr(0,6)!='chart.'){name='chart.'+name;}
18
+ while(name.match(/([A-Z])/)){name=name.replace(/([A-Z])/,'.'+RegExp.$1.toLowerCase());}
19
+ return prop[name.toLowerCase()];};this.draw=this.Draw=function()
20
+ {RGraph.fireCustomEvent(this,'onbeforedraw');if(!this.colorsParsed){this.parseColors();this.colorsParsed=true;}
21
+ RGraph.DrawBackgroundImage(this);this.gutterLeft=prop['chart.gutter.left'];this.gutterRight=prop['chart.gutter.right'];this.gutterTop=prop['chart.gutter.top'];this.gutterBottom=prop['chart.gutter.bottom'];this.coords=[];this.coordsText=[];this.centery=((ca.height-this.gutterTop-this.gutterBottom)/2)+this.gutterTop;this.max=0;this.grapharea=ca.height-this.gutterTop-this.gutterBottom;this.graphwidth=ca.width-this.gutterLeft-this.gutterRight;this.halfTextHeight=prop['chart.text.size']/2;this.max=this.getMax(this.data);var decimals=prop['chart.scale.decimals'];this.scale2=RG.getScale2(this,{max:typeof(prop['chart.ymax'])=='number'?prop['chart.ymax']:this.max,min:prop['chart.ymin'],strict:typeof(prop['chart.ymax'])==='number'?true:false,'scale.decimals':Number(decimals),'scale.point':prop['chart.scale.point'],'scale.thousand':prop['chart.scale.thousand'],'scale.round':prop['chart.scale.round'],'units.pre':prop['chart.units.pre'],'units.post':prop['chart.units.post'],'ylabels.count':prop['chart.ylabels.count']});this.max=this.scale2.max;this.min=this.scale2.min;RG.drawBars(this)
22
+ RG.Background.draw(this);this.DrawAxes();this.Drawbars();this.DrawLabels();if(prop['chart.xaxispos']==='bottom'&&prop['chart.noaxes']===false&&prop['chart.noxaxis']===false&&prop['chart.ymin']===0){co.strokeStyle=prop['chart.axis.color'];co.strokeRect(prop['chart.gutter.left'],ca.height-prop['chart.gutter.bottom'],ca.width-this.gutterLeft-this.gutterRight,0);}
23
+ if(prop['chart.contextmenu']){RG.ShowContext(this);}
24
+ if(prop['chart.resizable']){RG.AllowResizing(this);}
25
+ RG.InstallEventListeners(this);if(this.firstDraw){RG.fireCustomEvent(this,'onfirstdraw');this.firstDraw=false;this.firstDrawFunc();}
26
+ RG.FireCustomEvent(this,'ondraw');return this;};this.drawAxes=this.DrawAxes=function()
27
+ {if(prop['chart.noaxes']){return;}
28
+ co.beginPath();co.strokeStyle=prop['chart.axis.color'];co.lineWidth=prop['chart.axis.linewidth']+0.001;if(prop['chart.noyaxis']==false){co.moveTo(ma.round(this.gutterLeft),this.gutterTop);co.lineTo(ma.round(this.gutterLeft),ca.height-this.gutterBottom);}
29
+ if(prop['chart.noxaxis']==false){if(prop['chart.xaxispos']=='center'){co.moveTo(this.gutterLeft,ma.round(((ca.height-this.gutterTop-this.gutterBottom)/2)+this.gutterTop));co.lineTo(ca.width-this.gutterRight,ma.round(((ca.height-this.gutterTop-this.gutterBottom)/2)+this.gutterTop));}else{var y=ma.floor(this.getYCoord(0));co.moveTo(this.gutterLeft,y);co.lineTo(ca.width-this.gutterRight,y);}}
30
+ var numYTicks=prop['chart.numyticks'];if(prop['chart.noyaxis']===false&&prop['chart.numyticks']>0){var yTickGap=(ca.height-this.gutterTop-this.gutterBottom)/numYTicks;for(y=this.gutterTop;y<(ca.height-this.gutterBottom);y+=yTickGap){if(prop['chart.xaxispos']=='bottom'||(y!=((ca.height-this.gutterTop-this.gutterBottom)/2)+this.gutterTop)){co.moveTo(this.gutterLeft,ma.round(y));co.lineTo(this.gutterLeft-3,ma.round(y));}}
31
+ if(prop['chart.noxaxis']||prop['chart.xaxispos']=='center'||prop['chart.ymin']!==0){co.moveTo(this.gutterLeft-3,Math.round(ca.height-this.gutterBottom));co.lineTo(this.gutterLeft,Math.round(ca.height-this.gutterBottom));}}
32
+ if(prop['chart.numxticks']==null){prop['chart.numxticks']=this.data.length+(prop['chart.total']?1:0)}
33
+ if(prop['chart.noxaxis']==false&&prop['chart.numxticks']>0){xTickGap=(ca.width-this.gutterLeft-this.gutterRight)/prop['chart.numxticks'];if(prop['chart.xaxispos']=='center'){yStart=((ca.height-this.gutterBottom-this.gutterTop)/2)+this.gutterTop-3;yEnd=((ca.height-this.gutterBottom-this.gutterTop)/2)+this.gutterTop+3;}else{yStart=this.getYCoord(0)-(this.scale2.min<0?3:0);yEnd=this.getYCoord(0)+3;}
34
+ for(x=this.gutterLeft+xTickGap;x<=ca.width-this.gutterRight+1;x+=xTickGap){co.moveTo(ma.round(x),yStart);co.lineTo(ma.round(x),yEnd);}
35
+ if(prop['chart.noyaxis']){co.moveTo(ma.round(this.gutterLeft),yStart);co.lineTo(ma.round(this.gutterLeft),yEnd);}}
36
+ if(prop['chart.noyaxis']&&prop['chart.noxaxis']==false){co.moveTo(ma.round(this.gutterLeft),this.getYCoord(0));co.lineTo(ma.round(this.gutterLeft),this.getYCoord(0));}
37
+ co.stroke();};this.drawLabels=this.DrawLabels=function()
38
+ {var context=co,numYLabels=5,interval=this.grapharea/numYLabels,font=prop['chart.text.font'],size=prop['chart.text.size'],color=prop['chart.text.color'],units_pre=prop['chart.units.pre'],units_post=prop['chart.units.post'],offsetx=prop['chart.ylabels.offsetx'],offsety=prop['chart.ylabels.offsety'];co.beginPath();co.fillStyle=color;if(prop['chart.ylabels']){if(prop['chart.xaxispos']=='center'){var halfInterval=interval/2;var halfWay=((ca.height-this.gutterTop-this.gutterBottom)/2)+this.gutterTop;for(var i=0,len=this.scale2.labels.length;i<len;++i){RG.text2(this,{font:font,size:size,x:this.gutterLeft-5+offsetx,y:this.gutterTop+(((this.grapharea/2)/len)*i)+offsety,text:this.scale2.labels[len-i-1],valign:'center',halign:'right',tag:'scale'});RG.text2(this,{font:font,size:size,x:this.gutterLeft-5+offsetx,y:halfWay+(((this.grapharea/2)/len)*(i+1))+offsety,text:this.scale2.labels[i],valign:'center',halign:'right',tag:'scale'});}
39
+ if(prop['chart.scale.zerostart']){RG.text2(co,{x:this.gutterLeft-5+offsetx,y:halfWay,text:'0',font:font,size:size,valign:'center',halign:'right',tag:'scale'});}}else{for(var i=0,len=this.scale2.values.length;i<len;++i){var y=this.getYCoord(this.scale2.values[i])+offsety;RG.text2(this,{font:font,size:size,x:this.gutterLeft-5+offsetx,y:y,text:this.scale2.labels[i],valign:'center',halign:'right',tag:'scale'});}
40
+ if(prop['chart.scale.zerostart']||prop['chart.ymin']!==0){RG.text2(co,{x:this.gutterLeft-5+offsetx,y:this.getYCoord(prop['chart.ymin']||0),text:RG.numberFormat(this,String(Number(prop['chart.ymin']||0).toFixed(prop['chart.ymin']===0?0:prop['chart.scale.decimals'])),prop['chart.units.pre'],prop['chart.units.post']),font:font,size:size,valign:'center',halign:'right',tag:'scale'});}}}
41
+ if(prop['chart.labels'].length>0){interval=(ca.width-this.gutterLeft-this.gutterRight)/prop['chart.labels'].length;var halign='center';var angle=prop['chart.text.angle'];if(angle){halign='right';angle*=-1;}
42
+ var labels=prop['chart.labels'],labelsColor=prop['chart.labels.color'],bold=prop['chart.labels.bold'],offsetx=prop['chart.labels.offsetx'],offsety=prop['chart.labels.offsety']
43
+ for(var i=0,len=labels.length;i<len;i+=1){RG.text2(this,{'color':labelsColor,'font':font,'size':size,'bold':bold,'x':this.gutterLeft+(i*interval)+(interval/2)+offsetx,'y':ca.height-this.gutterBottom+5+this.halfTextHeight+offsety,'text':labels[i],'valign':'center','halign':halign,'angle':angle,'tag':'labels'});}}
44
+ co.stroke();co.fill();};this.drawbars=this.Drawbars=function()
45
+ {var context=co,canvas=ca,hmargin=prop['chart.hmargin'],runningTotal=0;co.lineWidth=prop['chart.linewidth']+0.001;for(var i=0,len=this.data.length;i<len;++i){co.beginPath();co.strokeStyle=prop['chart.strokestyle'];var x=ma.round(this.gutterLeft+hmargin+(((this.graphwidth/(this.data.length+(prop['chart.total']?1:0)))*i)*prop['chart.multiplier.x']));var h=this.getYCoord(0)-this.getYCoord(ma.abs(this.data[i]));if(i===0){y=this.getYCoord(0)-h;}else{y=this.getYCoord(runningTotal)-h;}
46
+ y=ma.round(y);var w=((ca.width-this.gutterLeft-this.gutterRight)/(this.data.length+(prop['chart.total']?1:0)))-(2*prop['chart.hmargin']);w=w*prop['chart.multiplier.w'];if(this.data[i]<0){y+=h;}
47
+ co.fillStyle=this.data[i]>=0?prop['chart.colors'][0]:prop['chart.colors'][1];if(prop['chart.shadow']){RG.setShadow(this,prop['chart.shadow.color'],prop['chart.shadow.offsetx'],prop['chart.shadow.offsety'],prop['chart.shadow.blur']);}else{RG.noShadow(this);}
48
+ co.rect(x,ma.floor(y),w,ma.floor(h));this.coords.push([x,y,w,h]);runningTotal+=this.data[i];co.stroke();co.fill();}
49
+ this.total=runningTotal;if(prop['chart.total']){h=this.getYCoord(0)-this.getYCoord(ma.abs(runningTotal));if(prop['chart.xaxispos']=='center'){y=runningTotal>0?this.getYCoord(0)-h:this.getYCoord(0);}else{if(runningTotal>0){y=this.getYCoord(0)-h;}else{y=this.getYCoord(0);}}
50
+ x=x+(prop['chart.hmargin']*2)+w;co.fillStyle=prop['chart.colors'][2];pa2(co,'b r % % % % s % f %',x,y,w,h,co.strokeStyle,co.fillStyle);var previousCoords=[x,y,w,ma.abs(h)];this.coords.push(previousCoords);}
51
+ RG.noShadow(this);co.lineWidth=1;co.strokeStyle='#666';co.beginPath();for(var i=1,len=this.coords.length;i<len;i+=1){var prev=this.coords[i-1],curr=this.coords[i],prevData=this.data[i-1]
52
+ var y=(prevData>0?prev[1]:prev[1]+prev[3]);co.moveTo(prev[0]+prev[2],y);co.lineTo(curr[0],(prevData>0?prev[1]:prev[1]+prev[3]));}
53
+ co.stroke();};this.getShape=this.getBar=function(e)
54
+ {for(var i=0,len=this.coords.length;i<len;i++){var mouseXY=RG.getMouseXY(e),mouseX=mouseXY[0],mouseY=mouseXY[1];var left=this.coords[i][0],top=this.coords[i][1],width=this.coords[i][2],height=this.coords[i][3];if(mouseX>=left&&mouseX<=(left+width)&&mouseY>=top&&mouseY<=top+height){var tooltip=RG.parseTooltipText(prop['chart.tooltips'],i);return{0:this,object:this,1:left,x:left,2:top,y:top,3:width,width:width,4:height,height:height,5:i,index:i,tooltip:tooltip};}}
55
+ return null;};this.getMax=function(data)
56
+ {var runningTotal=0,max=0;for(var i=0,len=data.length;i<len;i+=1){runningTotal+=data[i];max=ma.max(ma.abs(runningTotal),max);}
57
+ return ma.abs(max);};this.allowTooltips=this.AllowTooltips=function()
58
+ {RG.PreLoadTooltipImages(this);RG.InstallWindowMousedownTooltipListener(this);RG.InstallCanvasMousemoveTooltipListener(this);RG.InstallCanvasMouseupTooltipListener(this);};this.highlight=this.Highlight=function(shape)
59
+ {if(typeof prop['chart.highlight.style']==='function'){(prop['chart.highlight.style'])(shape);}else{RG.Highlight.Rect(this,shape);}};this.getObjectByXY=function(e)
60
+ {var mouseXY=RG.getMouseXY(e);if(mouseXY[0]>this.gutterLeft&&mouseXY[0]<(ca.width-this.gutterRight)&&mouseXY[1]>this.gutterTop&&mouseXY[1]<(ca.height-this.gutterBottom)){return this;}};this.getYCoord=function(value)
61
+ {if(prop['chart.xaxispos']=='center'){if(value<(-1*this.max)){return null;}
62
+ var coord=(value/this.max)*(this.grapharea/2);return this.gutterTop+(this.grapharea/2)-coord;}else{var coord=((value-this.scale2.min)/(this.max-this.scale2.min))*this.grapharea;coord=coord+this.gutterBottom;return ca.height-coord;}};this.parseColors=function()
63
+ {if(this.original_colors.length===0){this.original_colors['chart.colors']=RG.array_clone(prop['chart.colors']);this.original_colors['chart.key.colors']=RG.array_clone(prop['chart.key.colors']);this.original_colors['chart.crosshairs.color']=RG.array_clone(prop['chart.crosshairs.color']);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']);this.original_colors['chart.background.barcolor1']=RG.array_clone(prop['chart.background.barcolor1']);this.original_colors['chart.background.barcolor2']=RG.array_clone(prop['chart.background.barcolor2']);this.original_colors['chart.background.grid.color']=RG.array_clone(prop['chart.background.grid.color']);this.original_colors['chart.strokestyle']=RG.array_clone(prop['chart.strokestyle']);this.original_colors['chart.axis.color']=RG.array_clone(prop['chart.axis.color']);}
64
+ var colors=prop['chart.colors'];if(colors){for(var i=0,len=colors.length;i<len;++i){colors[i]=this.parseSingleColorForGradient(colors[i]);}}
65
+ var colors=prop['chart.key.colors'];if(colors){for(var i=0,len=colors.length;i<len;++i){colors[i]=this.parseSingleColorForGradient(colors[i]);}}
66
+ prop['chart.crosshairs.color']=this.parseSingleColorForGradient(prop['chart.crosshairs.color']);prop['chart.highlight.stroke']=this.parseSingleColorForGradient(prop['chart.highlight.stroke']);prop['chart.highlight.fill']=this.parseSingleColorForGradient(prop['chart.highlight.fill']);prop['chart.background.barcolor1']=this.parseSingleColorForGradient(prop['chart.background.barcolor1']);prop['chart.background.barcolor2']=this.parseSingleColorForGradient(prop['chart.background.barcolor2']);prop['chart.background.grid.color']=this.parseSingleColorForGradient(prop['chart.background.grid.color']);prop['chart.strokestyle']=this.parseSingleColorForGradient(prop['chart.strokestyle']);prop['chart.axis.color']=this.parseSingleColorForGradient(prop['chart.axis.color']);};this.reset=function()
67
+ {};this.parseSingleColorForGradient=function(color)
68
+ {if(!color||typeof color!='string'){return color;}
69
+ if(typeof color==='string'&&color.match(/^gradient\((.*)\)$/i)){var parts=RegExp.$1.split(':');var grad=co.createLinearGradient(0,ca.height-prop['chart.gutter.bottom'],0,prop['chart.gutter.top']);var 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]));}}
70
+ return grad?grad:color;};this.on=function(type,func)
71
+ {if(type.substr(0,2)!=='on'){type='on'+type;}
72
+ if(typeof this[type]!=='function'){this[type]=func;}else{RG.addCustomEventListener(this,type,func);}
73
+ return this;};this.firstDrawFunc=function()
74
+ {};this.grow=function()
75
+ {var opt=arguments[0]||{};var callback=arguments[1]||function(){};var frames=opt.frames||30;var numFrame=0;var obj=this;var data=RG.array_clone(obj.data);for(var i=0,len=obj.data.length;i<len;++i){obj.data[i]/=frames;}
76
+ if(obj.Get('chart.ymax')==null){var max=obj.getMax(data);var scale2=RG.getScale2(obj,{'max':max});obj.Set('chart.ymax',scale2.max);}
77
+ function iterator()
78
+ {for(var i=0;i<obj.data.length;++i){obj.data[i]=data[i]*RG.Effects.getEasingMultiplier(frames,numFrame);}
79
+ RGraph.clear(obj.canvas);RGraph.redrawCanvas(obj.canvas);if(++numFrame<frames){RGraph.Effects.updateCanvas(iterator);}else{callback(obj);}}
80
+ iterator();return this;};RG.att(ca);RG.Register(this);if(parseConfObjectForOptions){RG.parseObjectStyleConfig(this,conf.options);}
81
+ return this;};
metadata CHANGED
@@ -1,82 +1,82 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rgraph-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Griffin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-09 00:00:00.000000000 Z
11
+ date: 2016-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.10'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.10'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '10.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '10.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '3.3'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '3.3'
69
- description: ! ' The rgraph (http://www.rgraph.net/) interactive chart/graph library
70
- with the Rails asset pipeline. '
69
+ description: " The rgraph (http://www.rgraph.net/) interactive chart/graph library
70
+ with the Rails asset pipeline. "
71
71
  email:
72
72
  - danielseangriffin@gmail.com
73
73
  executables: []
74
74
  extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
- - .gitignore
78
- - .rspec
79
- - .travis.yml
77
+ - ".gitignore"
78
+ - ".rspec"
79
+ - ".travis.yml"
80
80
  - CODE_OF_CONDUCT.md
81
81
  - Gemfile
82
82
  - README.md
@@ -121,7 +121,19 @@ files:
121
121
  - vendor/assets/javascripts/RGraph.hprogress.js
122
122
  - vendor/assets/javascripts/RGraph.line.js
123
123
  - vendor/assets/javascripts/RGraph.meter.js
124
- homepage: https://github.com/thisisbd/rgraph-rails
124
+ - vendor/assets/javascripts/RGraph.modaldialog.js
125
+ - vendor/assets/javascripts/RGraph.odo.js
126
+ - vendor/assets/javascripts/RGraph.pie.js
127
+ - vendor/assets/javascripts/RGraph.radar.js
128
+ - vendor/assets/javascripts/RGraph.rose.js
129
+ - vendor/assets/javascripts/RGraph.rscatter.js
130
+ - vendor/assets/javascripts/RGraph.scatter.js
131
+ - vendor/assets/javascripts/RGraph.semicircularprogress.js
132
+ - vendor/assets/javascripts/RGraph.thermometer.js
133
+ - vendor/assets/javascripts/RGraph.thermometer.old.js
134
+ - vendor/assets/javascripts/RGraph.vprogress.js
135
+ - vendor/assets/javascripts/RGraph.waterfall.js
136
+ homepage: https://github.com/dsgriffin/rgraph-rails
125
137
  licenses:
126
138
  - GPL-3.0
127
139
  metadata: {}
@@ -131,17 +143,17 @@ require_paths:
131
143
  - lib
132
144
  required_ruby_version: !ruby/object:Gem::Requirement
133
145
  requirements:
134
- - - ! '>='
146
+ - - ">="
135
147
  - !ruby/object:Gem::Version
136
148
  version: '0'
137
149
  required_rubygems_version: !ruby/object:Gem::Requirement
138
150
  requirements:
139
- - - ! '>='
151
+ - - ">="
140
152
  - !ruby/object:Gem::Version
141
153
  version: '0'
142
154
  requirements: []
143
155
  rubyforge_project:
144
- rubygems_version: 2.4.5
156
+ rubygems_version: 2.5.1
145
157
  signing_key:
146
158
  specification_version: 4
147
159
  summary: The rgraph (http://www.rgraph.net/) interactive chart/graph library with