!function(u){var y,x,w,m=Object.prototype.hasOwnProperty;u.plot.plugins.push({init:function(g,t){var e=t.Canvas;null==y&&(x=e.prototype.getTextInfo,w=e.prototype.addText,y=e.prototype.render),e.prototype.render=function(){if(!g.getOptions().canvas)return y.call(this);var t=this.context,e=this._textCache;for(var i in t.save(),t.textBaseline="middle",e)if(m.call(e,i)){var n=e[i];for(var o in n)if(m.call(n,o)){var r=n[o],s=!0;for(var a in r)if(m.call(r,a)){var l=r[a],h=l.positions,f=l.lines;s&&(t.fillStyle=l.font.color,t.font=l.font.definition,s=!1);for(var p,c=0;p=h[c];c++)if(p.active)for(var v,d=0;v=p.lines[d];d++)t.fillText(f[d].text,v[0],v[1]);else h.splice(c--,1);0==h.length&&delete r[a]}}}t.restore()},e.prototype.getTextInfo=function(t,e,i,n,o){if(!g.getOptions().canvas)return x.call(this,t,e,i,n,o);var r,s,a,l;if(e=""+e,r="object"==typeof i?i.style+" "+i.variant+" "+i.weight+" "+i.size+"px "+i.family:i,null==(s=this._textCache[t])&&(s=this._textCache[t]={}),null==(a=s[r])&&(a=s[r]={}),null==(l=a[e])){var h=this.context;if("object"!=typeof i){var f=u("
 
").css("position","absolute").addClass("string"==typeof i?i:null).appendTo(this.getTextLayer(t));(i={lineHeight:f.height(),style:f.css("font-style"),variant:f.css("font-variant"),weight:f.css("font-weight"),family:f.css("font-family"),color:f.css("color")}).size=f.css("line-height",1).height(),f.remove()}r=i.style+" "+i.variant+" "+i.weight+" "+i.size+"px "+i.family,l=a[e]={width:0,height:0,positions:[],lines:[],font:{definition:r,color:i.color}},h.save(),h.font=r;for(var p=(e+"").replace(/
|\r\n|\r/g,"\n").split("\n"),c=0;c