/*
 FusionCharts JavaScript Library - ZoomScatter Chart
 Copyright FusionCharts Technologies LLP
 License Information at <http://www.fusioncharts.com/license>

 @version 3.10.1
*/
FusionCharts.register("module",["private","modules.renderer.js-zoomscatter",function(){function da(c,b,d,a,e){var f=b.paper;this.renderer=b;this.attr=c;this.axisData={};this.axisData.paper=f;this.globalOptions=b.options;this.isVertical=a;this.isReverse=e;this.isNumeric=d;this.viewPortRatio={};this.graphics={};this.config={};this.components={};this._configure()}function ea(){}function ia(){}var M=this,v=M.hcLib,Fa=v.parseTooltext,na=v.extend2,Ga=v.getLinkAction,Ha=v.NumberFormatter,N=v.Raphael,oa=
v.addEvent,Ia=v.removeEvent,fa=M.window,pa=fa.MouseEvent,Q=fa.document,z=v.BLANKSTRING,Ja=v.HASHSTRING,qa=v.getSentenceCase,ra=v.regex.dropHash,n=v.pluck,W=v.getValidValue,l=v.pluckNumber,X=v.getFirstValue,Ka=v.parseUnsafeString,sa=v.FC_CONFIG_STRING,O=v.getDashStyle,La=v.toRaphaelColor,I=v.toPrecision,Ma=v.hasSVG,ta=v.isIE,aa=v.hasTouch,ba="rgba(192,192,192,"+(ta?.002:1E-6)+")",K=Math,R=K.sin,S=K.cos,T=K.round,D=K.min,G=K.max,P=K.abs,ua=K.pow,va=K.ceil,U=K.floor,Na=2*Math.PI,wa=v.getMouseCoordinate,
ga=v.getFirstColor,Y=v.setLineHeight,ka=v.pluckFontSize,Oa=v.graphics.getDarkColor,xa=v.graphics.getLightColor,C=v.graphics.convertColor,Pa=v.POSITION_BOTTOM,la=v.POSITION_RIGHT,ca=v.chartAPI,ma=v.ZEROSTRING,ja=v.ONESTRING,ha=v.HUNDREDSTRING,Z=v.PXSTRING,Qa=v.COMMASTRING,K=!/fusioncharts\.com$/i.test(fa.location.hostname),ya,za,Aa=v.componentDispose,V=function(c,b){var d=wa(b.container,c),a=d.chartX,e=d.chartY,f=b.canvasLeft,k=b.canvasTop,p=b.canvasLeft+b.canvasWidth,m=b.canvasHeight+b.canvasTop;
d.insideCanvas=!1;d.originalEvent=c;a>f&&a<p&&e>k&&e<m&&(d.insideCanvas=!0);return d},Ra=function(c,b,d){var a;b&&c&&(d||(d={}),d.originalEvent&&(d=d.originalEvent),d.touches&&(d=d.touches[0]),b.dispatchEvent?(pa?a=new pa(c,{bubbles:!!d.bubbles,cancelable:!!d.cancelable,clientX:d.clientX||d.pageX&&d.pageX-Q.body.scrollLeft-Q.documentElement.scrollLeft||0,clientY:d.clientY||d.pageY&&d.pageY-Q.body.scrollTop-Q.documentElement.scrollTop||0,screenX:d.screenX||0,screenY:d.screenY||0,pageX:d.pageX||0,pageY:d.pageY||
0}):Q.createEvent&&(a=Q.createEvent("HTMLEvents"),a.initEvent(c,!!d.bubbles,!!d.cancelable)),a.eventName=c,a&&b.dispatchEvent(a)):Q.createEventObject&&b.fireEvent&&(a=Q.createEventObject(),a.eventType=c,a.eventName=c,b.fireEvent("on"+c,a)))};ca("zoomscatter",{friendlyName:"ZoomScatter Chart",isXY:!0,standaloneInit:!0,defaultSeriesType:"zoomscatter",defaultZeroPlaneHighlighted:!1,creditLabel:K,rendererId:"zoomscatter",chart:function(c,b){var d=ca.base,a=this.dataObj.chart||{};a._canvasleftmargin=a.canvasleftmargin;
a._canvasrightmargin=a.canvasrightmargin;a._canvastopmargin=a.canvastopmargin;a._canvasbottommargin=a.canvasbottommargin;delete a.canvasleftmargin;delete a.canvasrightmargin;delete a.canvastopmargin;delete a.canvasbottommargin;return d.chart.call(this,c,b)},init:function(c,b,d){var a=this.chartInstance||d,e=a.jsVars;d=e._reflowData||(e._reflowData={});var f=e._reflowClean,k=a.options,p=k.args,m,h;/^\s*absolute\s*$/i.test(M.core.options.SVGDefinitionURL)&&(N._url=(N._g&&N._g.win||fa).location.href.replace(/#.*?$/,
z));this.dataObj=b=b?b:{};h=b.chart=b.chart||b.graph||b.map||{};delete b.graph;delete b.map;d&&!this.stateless&&(m=d.hcJSON,delete d.hcJSON,na(this,d,!0),this.preReflowAdjustments&&this.preReflowAdjustments.call(this),d.hcJSON=m);this.containerElement=c;this.config={};this.smartLabel=e.smartLabel;this.smartLabel.useEllipsesOnOverflow(l(h.useellipseswhenoverflow,h.useellipsewhenoverflow,1));this.colorManager=new v.colorManager(b,this);this.linkClickFN=Ga(b,a);this.numberFormatter=new Ha(b.chart,this);
if(!this.standaloneInit)return a._chartMessageImageStyle={imageHAlign:n(p.typeNotSupportedMessageImageHAlign,k.baseChartMessageImageHAlign).toLowerCase(),imageVAlign:n(p.typeNotSupportedMessageImageVAlign,k.baseChartMessageImageVAlign).toLowerCase(),imageAlpha:l(p.typeNotSupportedMessageImageAlpha,k.baseChartMessageImageAlpha),imageScale:l(p.typeNotSupportedMessageImageScale,k.baseChartMessageImageScale)},a._chartMessageStyle={fontFamily:p.typeNotSupportedMessageFont||k.baseChartMessageFont,fontSize:p.typeNotSupportedMessageFontSize||
k.baseChartMessageFontSize,color:p.typeNotSupportedMessageColor||k.baseChartMessageColor},new v.createDialog(c,k.typeNotSupportedMessage,a);c=this.chart(c.offsetWidth||parseFloat(c.style.width),c.offsetHeight||parseFloat(c.style.height),a);d&&!this.stateless&&(d.hcJSON&&na(c,d.hcJSON,!0),this.postReflowAdjustments&&this.postReflowAdjustments.call(this),f&&this.cleanedData&&(this.cleanedData(this,f),this.cleanedData(d,f)));return c},point:function(c,b,d,a){var e,f,k,p,m=d.data||[],h={components:{},
graphics:{},config:{sumX:0,sumY:0,sumXY:0,sumXsqure:0,xValues:[],sumYsqure:0,yValues:[]}},A=this.numberFormatter;c=a.yaxisrange||(a.yaxisrange={});k=a.xaxisrange||(a.xaxisrange={});this.placeVerticalXYSpaceManager=this.nonBarXYSpaceManager;a=h.config.status=l(d.showregressionline,a.showregressionline,0);0===d.visible&&(b.visible=!1);b.name=W(d.seriesname);b.data=m;b.components={};m=d.data||[];if(0===l(d.includeinlegend)||void 0===b.name)b.showInLegend=!1;p=0;for(f=m.length;p<f;p+=1)e=m[p],d=A.getCleanValue(e.x),
e=A.getCleanValue(e.y),c.max=c.max>e?c.max:e,c.min=c.min<e?c.min:e,k.max=k.max>d?k.max:d,k.min=k.min<d?k.min:d,b.data[p].i=p,a&&(h.config.sumX+=d,h.config.sumY+=e,h.config.sumXY+=d*e,h.config.sumXsqure+=ua(d,2),h.config.xValues.push(d),h.config.sumYsqure+=ua(e,2),h.config.yValues.push(e));b.components.regressionObj=h;return b},nonBarXYSpaceManager:function(c,b,d,a){var e,f,k,p=c[sa],m,h,A=!0,q=0,r=b.chart,u=!1,g,t,x,w=c.chart,Ba=p.marginLeftExtraSpace,y=p.marginTopExtraSpace,Ca=p.marginBottomExtraSpace,
L=p.marginRightExtraSpace;m=d-(Ba+L+w.marginRight+w.marginLeft);var H=a-(Ca+w.marginBottom+w.marginTop),E=.3*m;a=.3*H;var F=m-E;d=H-a;var q=p.drawFullAreaBorder=l(r.drawfullareaborder,1),z=n(r.legendposition,Pa).toLowerCase();e=c.xAxis.showLine?c.xAxis.lineThickness:0;f=c.yAxis[0].showLine?c.yAxis[0].lineThickness:0;k=p.isDual&&c.yAxis[1].showLine?c.yAxis[1].lineThickness:0;var D=this.placeVerticalAxis,C=v.stepYAxisValues,B=v.adjustVerticalCanvasMargin,Sa=v.adjustHorizontalCanvasMargin,Da=v.adjustVerticalAxisTitle,
Ea=function(a,b,c){var d=b._originalText;a=a[sa].smartLabel;b.text=b.rotation?a.getSmartText(d,c,b._actualWidth).text:a.getSmartText(d,b._actualWidth,c).text;b.centerYAxisName=!0};g=l(r.yaxisnamepadding,5);t=l(r.yaxisvaluespadding,r.labelypadding,4);h=n(r.showplotborder,p.is3d?ma:ja)===ja;h=p.plotBorderThickness=h?p.is3d?1:l(r.plotborderthickness,1):0;x=G(l(w.plotBorderWidth,1),0);h=G(x,h/2);"area"!==this.defaultSeriesType||q||(h=x);t<x&&(t=x);!p.isDual&&w.marginRight<x&&void 0===r.chartrightmargin&&
(q=x-c.chart.marginRight,m>E+q&&(m-=q,E=.3*m,F=m-E));c.legend.enabled&&z===la&&(F-=this.placeLegendBlockRight(c,b,F/2,H));p.isDual&&(u=!0,m=p[1],A=c.yAxis[1].opposite,q=n(r.rotateyaxisname,A?"cw":"ccw"),q=q===ma?"none":q,m.verticalAxisNamePadding=g,m.verticalAxisValuesPadding=t+k,m.rotateVerticalAxisName=q,m.verticalAxisNameWidth=l(r.syaxisnamewidth),F-=D(c.yAxis[1],m,c,b,H,F/2,A,u));m=p[0];q=n(r.rotateyaxisname,A?"ccw":"cw");q=q===ma?"none":q;m.verticalAxisNamePadding=g;m.verticalAxisValuesPadding=
t+f;m.rotateVerticalAxisName=q;m.verticalAxisNameWidth=l(u?r.pyaxisnamewidth:r.yaxisnamewidth);F-=Sa(c,b,F,c.yAxis[0],c.yAxis[1]);A=F+E;c.legend.enabled&&z!==la&&(d-=this.placeLegendBlockBottom(c,b,A,d/2));d-=this.titleSpaceManager(c,b,A,d/2);m=p.x;m.horizontalAxisNamePadding=l(r.xaxisnamepadding,5);m.horizontalLabelPadding=l(r.labelpadding,r.labelxpadding,4)+e;m.labelDisplay=n(r.labeldisplay,"auto").toLowerCase();m.rotateLabels=l(r.rotatelabels,r.rotatexaxislabels,0);m.staggerLines=l(r.staggerlines,
2);m.slantLabels=l(r.slantlabels,r.slantlabel,0);c.yAxis[0].opposite?(c.xAxis.lineEndExtension=f,c.xAxis.lineStartExtension=k):(c.xAxis.lineEndExtension=k,c.xAxis.lineStartExtension=f);m.horizontalLabelPadding<h&&(m.horizontalLabelPadding=h);g={left:0,right:0};g=w.managePlotOverflow&&this.canvasPaddingModifiers&&this.calculateCanvasOverflow(c,!0)||g;e=g.left+g.right;f=.6*A;e>f&&(k=g.left/e,g.left-=k*(e-f),g.right-=(1-k)*(e-f));this.xAxisMinMaxSetter(c,b,A,g.left,g.right);d-=B(c,b,d,c.xAxis);c.title.alignWithCanvas||
("left"===c.title.align&&c.yAxis[0].title.text&&Ea(c,c.yAxis[0].title,a+d),"right"===c.title.align&&u&&c.yAxis[1].title.text&&Ea(c,c.yAxis[1].title,a+d));u&&(C(a+d,c,r,c.yAxis[1],p[1].lYLblIdx),Da(c,c.yAxis[1].title,a+d));C(a+d,c,r,c.yAxis[0],p[0].lYLblIdx);Da(c,c.yAxis[0].title,a+d);c.legend.enabled&&z===la&&(c=c.legend,b=a+d,c.height>b&&"gradient"!==c.type&&(c.height=b,c.scroll.enabled=!0,b=(c.scroll.scrollBarWidth=10)+(c.scroll.scrollBarPadding=2),c.width+=b,w.marginRight+=b));w.marginLeft+=Ba;
w.marginTop+=y;w.marginBottom+=Ca;w.marginRight+=L}},ca.scatterbase);da.prototype={_configure:function(){var c=this.axisData,b=this.attr,d=this.renderer,a=d.logic,e=a.dataObj.chart,d=d.numberFormatter;this.isVertical?this.trendLines=a.dataObj.trendlines:this.vTrendLines=a.dataObj.vtrendlines;c.axisName=Ka(b.axisName);this.config.axisValuePadding=l(b.axisValuePadding,4);this.config.axisNamePadding=l(b.axisNamePadding,5);this.config.numDivLines=l(b.numDivLines,4);this.config.axisMinValue=d.getCleanValue(b.axisMinValue);
this.config.axisMaxValue=d.getCleanValue(b.axisMaxValue);this.config.setAdaptiveMin=l(b.setAdaptiveMin,1);this.config.adjustDiv=n(b.adjustDiv,1);this.config.axisNameWidth=n(b.axisNameWidth);this.config.rotateAxisName=l(b.rotateAxisName,0);this.config.useEllipsesWhenOverflow=l(b.useEllipsesWhenOverflow,1);this.config.divLineColor=b.divLineColor;this.config.divLineAlpha=b.divLineAlpha;this.config.divLineThickness=b.divLineThickness;this.config.divLineIsDashed=b.divLineIsDashed;this.config.divLineDashLen=
b.divLineDashLen;this.config.divLineDashGap=b.divLineDashGap;this.config.showAlternateGridColor=b.showAlternateGridColor;this.config.alternateGridColor=b.alternateGridColor;this.config.alternateGridAlpha=b.alternateGridAlpha;this.config.showZeroPlane=l(b.showZeroPlane,1);this.config.zeroPlaneColor=n(b.zeroPlaneColor,b.divLineColor);this.config.zeroPlaneThickness=n(b.zeroPlaneThickness,b.divLineThickness);this.config.zeroPlaneAlpha=l(b.zeroPlaneAlpha,b.divLineAlpha);this.config.showZeroPlaneValue=
l(b.showZeroPlaneValue,1);this.config.showAxisLine=b.showAxisLine;this.config.axisLineThickness=b.axisLineThickness;this.config.axisLineAlpha=b.axisLineAlpha;this.config.axisLineColor=C(b.axisLineColor,b.axisLineAlpha);this.config.trendlineToolText=n(b.trendlineToolText);this.config.trendlineColor=n(b.trendlineColor,"333333");this.config.trendlineThickness=n(b.trendlineThickness,1);this.config.trendlineAlpha=l(b.trendlineAlpha);this.config.showTrendlinesOnTop=l(b.showTrendlinesOnTop,0);this.config.trendlineValuesOnOpp=
n(b.trendlineValuesOnOpp,b.trendlineValuesOnOpp,0);this.config.trendlinesAreDashed=l(b.trendlinesAreDashed,0);this.config.trendlinesDashLen=l(b.trendlinesDashLen,5);this.config.trendlinesDashGap=l(b.trendlinesDashGap,2);this.config.showTrendlines=l(b.showTrendlines,1);this.config.showTrendlineLabels=l(b.showTrendlineLabels,1);this.config.labelDisplay=n(b.labelDisplay,"auto").toLowerCase();this.config.showLabels=l(b.showLabels,1);this.config.rotateLabels=l(b.rotateLabels,0);this.config.slantLabel=
l(b.slantLabel,0);this.config.labelStep=l(b.labelStep,0);this.config.showAxisValues=l(b.showAxisValues,1);this.config.showLimits=l(b.showLimits,this.config.showAxisValues);this.config.showDivLineValues=l(b.showDivLineValues,this.config.showAxisValues);c=(c=X(b.axisNameBorderColor,z))?C(c,l(b.axisNameBorderAlpha,b.axisNameAlpha,100)):z;this.config.name={};this.config.name.style={fontFamily:n(b.axisNameFont,b.outCanfontFamily),fontSize:n(b.axisNameFontSize,parseInt(b.outCanfontSize,10))+Z,color:C(n(b.axisNameFontColor,
b.outCancolor),l(b.axisNameFontAlpha,b.axisNameAlpha,100)),fontWeight:l(b.axisNameFontBold,1)?"bold":"normal",fontStyle:l(b.axisNameFontItalic)?"italic":"normal",border:c||b.axisNameBgColor?l(b.axisNameBorderThickness,1)+"px solid":void 0,borderColor:c,borderThickness:l(b.axisNameBorderThickness,1),borderPadding:l(b.axisNameBorderPadding,2),borderRadius:l(b.axisNameBorderRadius,0),backgroundColor:b.axisNameBgColor?C(b.axisNameBgColor,l(b.axisNameBgAlpha,b.axisNameAlpha,100)):z,borderDash:l(b.axisNameBorderDashed,
0)?O(l(b.axisNameBorderDashLen,4),l(b.axisNameBorderDashGap,2),l(b.axisNameBorderThickness,1)):"none"};this.config.name.style.lineHeight=Y(this.config.name.style);c=(c=X(e.trendvaluebordercolor,z))?C(c,l(e.trendvalueborderalpha,e.trendvaluealpha,100)):z;this.config.trend={};this.config.trend.trendStyle={fontFamily:n(e.trendvaluefont,b.outCanfontFamily),color:n(e.trendvaluefontcolor,b.trendlineColor,b.outCancolor,"333333"),fontSize:ka(e.trendvaluefontsize,parseInt(b.outCanfontSize,10))+Z,fontWeight:l(e.trendvaluefontbold)?
"bold":"normal",fontStyle:l(e.trendvaluefontitalic)?"italic":"normal",border:c||e.trendvaluebgcolor?l(e.trendvalueborderthickness,1)+"px solid":"",borderColor:c,borderThickness:l(e.trendvalueborderthickness,1),borderPadding:l(e.trendvalueborderpadding,2),borderRadius:l(e.trendvalueborderradius,0),backgroundColor:e.trendvaluebgcolor?C(e.trendvaluebgcolor,l(e.trendvaluebgalpha,e.trendvaluealpha,100)):z,borderDash:l(e.trendvalueborderdashed,0)?O(l(e.trendvalueborderdashlen,4),l(e.trendvalueborderdashgap,
2),l(e.trendvalueborderthickness,1)):"none"};this.config.trend.trendStyle.lineHeight=Y(this.config.trend.trendStyle);this.config.labels={};this.config.lines={};this.config.band={};this.config.labels.style={fontFamily:n(b.labelFont,b.outCanfontFamily),fontSize:l(b.labelFontSize,parseInt(b.outCanfontSize,10))+Z,color:n(b.labelFontColor,b.outCancolor)};this.config.labels.style.lineHeight=Y(this.config.labels.style)},getValue:function(c){var b=this.renderer,d=b.viewPortConfig,a=b.canvasWidth,e=b.canvasHeight,
b=this.max,f=this.min,k=b-f;this.isVertical?(a=e*d.scaleY/k,c=b-(d.y*d.scaleY+Number(c))/a):(a=a*d.scaleX/k,c=f+(d.x*d.scaleX+Number(c))/a);return c},dispose:function(){Aa(this)},_getVisibleConfig:function(){var c=this.renderer,b=c.viewPortConfig,d,a=this.max,e=this.min,f=a-e;this.isVertical?(f/=c.canvasHeight,d=b.scaleY,c=c.canvasHeight/d,e=a-f*b.y,a-=f*(b.y+c)):(f/=c.canvasWidth,d=b.scaleX,c=c.canvasWidth/d,a=e+f*b.x,e+=f*(b.x+c));return{maxValue:e,minValue:a}},_setTickIntervalAfterZoom:function(){var c,
b=this.renderer;c=b.viewPortConfig;var d=this.axisData,a=this.config,e=b.logic.dataObj.chart,f=this.isVertical,b=v.getAxisLimits,k=a.numDivLines,p=a.setAdaptiveMin,m=a.adjustDiv,h,A;c=f?c.scaleY:c.scaleX;A=l(f?e.yaxisrange.max:e.xaxisrange.max);f=l(f?e.yaxisrange.min:e.xaxisrange.min);e=1===c?a.axisMaxValue:d.max;d=1===c?a.axisMinValue:d.min;p=h=!p;m=l(1===c?a.adjustDiv:0);a=b(A,f,e,d,h,p,k*c,m);this.axisData.min=Number(I(a.Min,10));this.axisData.max=Number(I(a.Max,10));this.axisData.tickInterval=
Number(I(a.divGap,10));this.min=Number(I(a.Min,10));this.max=Number(I(a.Max,10));this.tickInterval=Number(I(a.divGap,10))},setDataLimit:function(c,b){var d=this.config,a=v.getAxisLimits,e=d.axisMaxValue,f=d.axisMinValue,k=d.numDivLines,p=d.adjustDiv,m,d=m=!d.setAdaptiveMin,a=a(l(c,e),l(b,f),e,f,m,d,k,p);this.axisData.min=Number(I(a.Min,10));this.axisData.max=Number(I(a.Max,10));this.axisData.tickInterval=Number(I(a.divGap,10));this.min=Number(I(a.Min,10));this.max=Number(I(a.Max,10));this.tickInterval=
Number(I(a.divGap,10))},_roundOf:function(c){return T(1E3*c)/1E3},getPixel:function(c){var b=this.renderer,d=b.viewPortConfig,a=b.canvasHeight,e=b.canvasWidth,f=b.canvasTop,b=b.canvasLeft;d||(d={x:b,y:f,scaleX:1,scaleY:1});this.isVertical?(e=-a*d.scaleY/(this.max-this.min),c=f+((c-this.min)*e+(a*d.scaleY-d.y*d.scaleY))):(e=e*d.scaleX/(this.max-this.min),c=b+((c-this.min)*e-d.x*d.scaleX));return c},getPVR:function(){var c=this.renderer,b=c.viewPortConfig,d=c.canvasWidth,c=c.canvasHeight,a=this.max-
this.min;return this.isVertical?c*b.scaleY/a:d*b.scaleX/a},draw:function(){var c=this.isVertical,b=this.renderer,d=b.layers,a=b.paper,e=b.viewPortConfig,f=this.viewPortRatio||{},k=this.axisData,p=k.axisContainer,m=k.axisPlotLineContainer,h=k.axisBandContainer,l=k.axisNameContainer,q=k.axisTrendContainerTop,r=k.axisTrendContainerBottom,u=k.axisTrendLabelContainer,g=d.axisBottom,t=d.axisTop,x,w,n,y,v,L,H;L=e.y*e.scaleY;H=e.x*e.scaleX;x=d.axisBandGroup=d.axisBandGroup||a.group("dataset-Band-group",g);
w=d.axisPlotLineGroup=d.axisPlotLineGroup||a.group("dataset-Line-group",g);v=d.axisTrendGroupBottom=d.axisTrendGroupBottom||a.group("dataset-Trend-group-bottom",g);n=d.axisNameGroup=d.axisNameGroup||a.group("dataset-Name-group",g);y=d.axisLabelGroup=d.axisLabelGroup||a.group("dataset-Label-group",g);t=d.axisTrendGroupTop=d.axisTrendGroupTop||a.group("dataset-Trend-group-top",t);d.axisLineGroup=d.axisLineGroup||a.group("axis-Line-group",g);p||(k.axisContainer=p=a.group("dataset-axis",y));h||(k.axisBandContainer=
h=a.group("dataset-axis-bands",x),h.attr({"clip-rect":b.canvasLeft+","+b.canvasTop+","+b.canvasWidth+","+b.canvasHeight}));m||(k.axisPlotLineContainer=m=a.group("dataset-axis-lines",w),m.attr({"clip-rect":b.canvasLeft+","+b.canvasTop+","+b.canvasWidth+","+b.canvasHeight}));q||(k.axisTrendContainerTop=q=a.group("dataset-axis-trend-top",t),q.attr({"clip-rect":b.canvasLeft+","+b.canvasTop+","+b.canvasWidth+","+b.canvasHeight}));r||(k.axisTrendContainerBottom=r=a.group("dataset-axis-trend-bottom",v),
r.attr({"clip-rect":b.canvasLeft+","+b.canvasTop+","+b.canvasWidth+","+b.canvasHeight}));u||(k.axisTrendLabelContainer=u=a.group("dataset-axis-trend-label",t),c?u.attr({"clip-rect":[0,b.canvasTop,b.chartWidth,b.canvasHeight]}):u.attr({"clip-rect":[b.canvasLeft,b.canvasBottom,b.canvasWidth,b.chartHeight-b.canvasBottom]}));l||(k.axisNameContainer=a.group("dataset-axis-name",n));f.scaleX!==e.scaleX||f.scaleY!==e.scaleY?(f.scaleX=e.scaleX,f.scaleY=e.scaleY,h.attr({"clip-rect":b.canvasLeft+","+b.canvasTop+
","+b.canvasWidth+","+b.canvasHeight}),m.attr({"clip-rect":b.canvasLeft+","+b.canvasTop+","+b.canvasWidth+","+b.canvasHeight}),q.attr({"clip-rect":b.canvasLeft+","+b.canvasTop+","+b.canvasWidth+","+b.canvasHeight}),r.attr({"clip-rect":b.canvasLeft+","+b.canvasTop+","+b.canvasWidth+","+b.canvasHeight}),c?u.attr({"clip-rect":[0,b.canvasTop,b.chartWidth,b.canvasHeight]}):u.attr({"clip-rect":[b.canvasLeft,b.canvasBottom,b.canvasWidth,b.chartHeight-b.canvasBottom]}),this._drawLabel(),this._drawAxisName(),
this._drawPlotBand(),this._drawPlotLine()):(c?(c=L-e.y*e.scaleY,p.transform("t0,"+c),m.transform("t0,"+c),h.transform("t0,"+c),q.transform("t0,"+c),r.transform("t0,"+c)):(c=H-e.x*e.scaleX,p.transform("t"+c+",0"),m.transform("t"+c+",0"),h.transform("t"+c+",0"),q.transform("t"+c+",0"),r.transform("t"+c+",0")),this._drawLabel(),this._drawPlotLine(),this._drawPlotBand());this._drawTrendLine()},_drawLabel:function(){var c=this.axisData,b=this.config,d,a=this.config.labels.style,e,f,k=this.isVertical,p=
this.max,m=this.min,h=this.renderer,l=h.canvasBottom,q=h.canvasLeft,r=c.axisContainer,u=c.labelPadding,g=c.paper,t=c.labelMaxH,x=c.labelMaxW,w=this.graphics.labels||[],n=0,y,v,L,H={fontFamily:a.fontFamily,fontSize:a.fontSize,fontWeight:a.fontWeight,fontStyle:a.fontStyle,lineHeight:a.lineHeight},E,z={},C=function(){b.showZeroPlane&&0>e&&0<e+d?(e=0,f+=d):e<f?e=f:(e+=d,f+=d)};a.lineHeight&&(y=a.lineHeight,-1!==y.indexOf("px")&&(y=y.replace("px",""),y=parseFloat(y)));if(this.config.labels.isDraw){n=P(this.getPixel(m)-
this.getPixel(m+c.tickInterval));k?c.labelMaxH>n&&(v=va(c.labelMaxH/n)):c.labelMaxW>n&&(v=va(c.labelMaxW/n));v>b.labels.step&&(b.labels.step=v);this.config.labels.step?d=c.tickInterval*this.config.labels.step:d=c.tickInterval;L=this.config.labels.rotation;c=this._getVisibleConfig();n=m+d*U((c.minValue-3*d-m)/d);v=m+d*U((c.maxValue+3*d-m)/d);n=n<m?m:n;v=v>p?p:v;a={fill:a.color,"line-height":y,"font-size":a.fontSize};f=e=n;for(n=0;e<=v;){if(!(e<c.minValue||e>c.maxValue||!this.config.labels.drawNormalVal&&
(!this.config.labels.drawLimitVal||e!==m&&e!==p)||!this.config.labels.drawNormalVal&&e!==m&&e!==p||!(this.config.labels.drawLimitVal||e!==m&&e!==p)||0===this.config.showZeroPlaneValue&&0===this.config.showZeroPlane&&0===e)){if(1===b.showZeroPlane&&1===b.showZeroPlaneValue&&(0>e&&0<e+d||0<e&&0>e-d))if(k){if(this.getPixel(e)+t>=this.getPixel(0)&&this.getPixel(0)>=this.getPixel(e)-t){C();continue}}else if(this.getPixel(e)+x>=this.getPixel(0)&&this.getPixel(0)>=this.getPixel(e)-x){C();continue}k?(y=""+
h.logic.numberFormatter.yAxis(e),this.graphics.labels||(h.addCSSDefinition(".Fusioncharts-axis-labelssdfsd-yAxis",H),r.attr({"class":"Fusioncharts-axis-labelssdfsd-yAxis"})),E={x:q-u,y:this.getPixel(e),"text-anchor":"end",text:y}):(y=""+h.logic.numberFormatter.xAxis(e),this.graphics.labels||(r.attr({"class":"Fusioncharts-axis-labelssdfsd-xAxis"}),h.addCSSDefinition(".Fusioncharts-axis-labelssdfsd-xAxis",H)),E={x:this.getPixel(e),y:l+u,text:y},L?(a["text-anchor"]="end",a["vertical-align"]="center",
z.transform="r "+L):a["vertical-align"]="top");w[n]?(y=w[n],y.attr({"text-anchor":"middle","vertical-align":"center"}),y.attr(E)):w[n]=y=g.text(E,r);y.attr(z);y.attr(a);n+=1}C()}if(w[n])for(e=n;e<w.length;e++)w[e].attr({text:""});this.graphics.labels=w}else if(w[n])for(e=n;e<w.length;e++)w[e].attr({text:""})},_drawAxisName:function(){var c=this.axisData,b=this.config,d=b.name.style,a=b.name.value,e="fusioncharts-axis",f=this.isVertical,k=this.renderer,p=k.smartLabel,m=k.canvasBottom,h=k.canvasLeft,
A=k.canvasTop,q=k.canvasHeight,r=k.canvasWidth,u=c.axisNameContainer,g=c.axisNamePadding,t=c.nameMaxH,x=c.nameMaxW,w=this.graphics.axisName||{},n=l(b.name.rotation,f?270:90),c=c.paper,y,v={fontFamily:d.fontFamily,fontSize:d.fontSize,lineHeight:d.lineHeight,fontWeight:d.fontWeight,fontStyle:d.fontStyle};y=w;b.name.isDraw?(b={fontFamily:d.fontFamily,fill:d.color,"vertical-align":"center",transform:f?"r"+n:"","font-size":d.fontSize,"line-height":d.lineHeight},p.setStyle({fontSize:d.fontSize,fontFamily:d.fontFamily,
lineHeight:d.lineHeight,fontWeight:d.fontWeight}),f?(this.graphics.axisName||k.addCSSDefinition("."+e+"-yAxis",v),f=n?p.getSmartText(a,k.canvasHeight,x):p.getSmartText(a,x,k.canvasHeight),a=f.tooltext,e={"class":e+"-yAxis",text:f.text,x:h-g-x/2,y:A+q/2}):(this.graphics.axisName||k.addCSSDefinition("."+e+"-xAxis",v),f=p.getSmartText(a,x,t),a=f.tooltext,e+="-xAxis",e={"class":e,text:f.text,x:h+r/2,y:m+g+t/2}),this.graphics.axisName?(y.attr(e),y.attr(b).tooltip(a)):(y=c.text(e,u).tooltip(a),y.attr(b)),
a&&y.trackTooltip(!0),setTimeout(function(){y.attr({"line-height":d.lineHeight,"text-bound":[d.backgroundColor,d.borderColor,d.borderThickness,d.borderPadding,d.borderRadius,d.borderDash]})},0),this.graphics.axisName=y):this.graphics.axisName&&w.remove()},_drawPlotLine:function(){var c=this.axisData,b=this.config,d=c.tickInterval,a,e,f=this.isVertical,k=this.max,p=this.min,m=this.renderer;e=m.logic.dataObj.chart;var h=c.axisPlotLineContainer,c=c.paper,A=this.graphics.line||[];a=this.graphics.axisLine||
[];var q=m.layers,r=0,u,g,t,x=C(b.divLineColor,b.divLineAlpha),w=b.divLineThickness;t=b.divLineIsDashed?O(b.divLineDashLen,b.divLineDashGap,w):"none";var n=C(b.zeroPlaneColor,b.zeroPlaneAlpha),y=b.zeroPlaneThickness;t={stroke:x,"stroke-width":w,"stroke-dasharray":t};e=l(e.xaxislinethickness,e.axislinethickness,1);b.showAxisLine?(e=f?["M",m.canvasLeft-b.axisLineThickness/2,m.canvasBottom,"L",m.canvasLeft-b.axisLineThickness/2,m.canvasTop]:["M",m.canvasLeft-e,m.canvasBottom+b.axisLineThickness/2,"L",
m.canvasRight,m.canvasBottom+b.axisLineThickness/2],a[0]?(q=a[0],q.attr({path:e,stroke:b.axisLineColor,"stroke-width":b.axisLineThickness})):(q=c.path({path:e,stroke:b.axisLineColor,"stroke-width":b.axisLineThickness},q.axisLineGroup),a[0]=q)):a[0]&&(q=a[0],q.attr({path:"M0,0"}));this.graphics.axisLine=a;if(b.lines.isDraw){a=this._getVisibleConfig();r=p+d*U((a.minValue-3*d-p)/d);q=p+d*U((a.maxValue+3*d-p)/d);r=r<p?p:r;q=q>k?k:q;e=a=r;for(r=0;a<q;)a===p||a===k||0===b.showZeroPlaneValue&&0===b.showZeroPlane&&
0===a||(0===a&&1===b.showZeroPlane&&1===b.showZeroPlaneValue&&(t.stroke=n,t["stroke-width"]=y),g=f?{path:"M"+m.canvasLeft+" "+this.getPixel(a)+"L"+m.canvasRight+" "+this.getPixel(a)}:{path:"M"+this.getPixel(a)+" "+m.canvasTop+"L"+this.getPixel(a)+" "+m.canvasBottom},A[r]?(u=A[r],u.attr(g),u.attr(t)):(u=c.path(g,h),u.attr(t),A[r]=u),0===a&&1===b.showZeroPlane&&1===b.showZeroPlaneValue&&(t.stroke=x,t["stroke-width"]=w),r+=1),b.showZeroPlane&&0>a&&0<a+d?(a=0,e+=d):a<e?a=e:(a+=d,e+=d);if(A[r])for(a=r;a<
A.length;a++)A[a].attr({path:[]});this.graphics.line=A}else if(A[r])for(a=r;a<A.length;a++)A[a].attr({path:[]})},_drawPlotBand:function(){var c=this.axisData,b=this.config,d=c.tickInterval,a,e,f,k=this.isVertical,p=this.max;a=this.min;var m=this.renderer,h=c.axisBandContainer,c=c.paper,l=this.graphics.band||[],q=0,r;r=b.alternateGridColor;var u=b.alternateGridAlpha,g,t;if(b.showAlternateGridColor&&b.band.isDraw){t=this._getVisibleConfig();q=a+d*U((t.minValue-3*d-a)/d);t=a+d*U((t.maxValue+3*d-a)/d);
q=q<a?a:q;t=t>p?p:t;p=T((q-a)/d)+1;u={fill:La(C(r,u)),"stroke-width":0};r=this.getPVR();e=a=q;for(q=0;a<t;p+=1)0===p%2&&(f=b.showZeroPlane&&0>a&&0<a+d?a:a!==e?e-a:d,g=k?{x:m.canvasLeft,y:this.getPixel(a+P(f)),width:m.canvasWidth,height:P(f*r)}:{x:this.getPixel(a),y:m.canvasTop,width:P(f*r),height:m.canvasHeight},l[q]?(f=l[q],f.attr(g),f.attr(u)):(f=c.rect(g,h),f.attr(u),l[q]=f),q+=1),b.showZeroPlane&&0>a&&0<a+d?(a=0,e+=d):a<e?a=e:(a+=d,e+=d);if(l[q])for(a=q;a<l.length;a++)l[a].attr({x:0,y:0,width:0,
height:0,fill:null,"stroke-width":0});this.graphics.band=l}else if(l[q])for(a=q;a<l.length;a++)l[a].attr({x:0,y:0,width:0,height:0,fill:null,"stroke-width":0})},_drawTrendLine:function(){var c=this.axisData,b=this.config,d=b.trend.trendStyle,a=c.labelPadding,e,f,k=this.renderer,p=k.layers.tracker,m,h,A=c.axisTrendContainerTop,q=c.axisTrendContainerBottom,r=c.axisTrendLabelContainer,u=c.paper,g=this.components.trendObj||[],t,x,w,v,y,z=this.vTrendLines,L=this.trendLines,H,E,F,D,G,J,B;f={fontFamily:d.fontFamily,
fontSize:d.fontSize,lineHeight:d.lineHeight,fontWeight:d.fontWeight,fontStyle:d.fontStyle};this.components.trendObj||k.addCSSDefinition(".Fusioncharts-axis-trendlines-label",f);J=this._getVisibleConfig();F={};G={"class":"Fusioncharts-axis-trendlines-label","line-height":d.lineHeight};if(H=L||z){t=e=0;for(f=H[0].line.length;e<f;e+=1)if(B=H[0].line[e],B.endvalue=l(B.endvalue,0),m=n(B.tooltext,this.config.trendlineToolText),z&&B.startvalue>=J.minValue&&B.startvalue<=J.maxValue||B.endvalue&&B.endvalue>=
J.minValue&&B.endvalue<=J.maxValue||B.endvalue&&B.startvalue<=J.minValue&&B.endvalue>=J.maxValue||L&&B.startvalue>J.minValue&&B.startvalue<=J.maxValue||B.endvalue&&B.endvalue>=J.minValue&&B.endvalue<=J.maxValue||B.endvalue&&B.startvalue>=J.minValue&&B.endvalue<=J.maxValue)z?(D=B.displayvalue||"",x=this.getPixel(B.startvalue),E=l(B.istrendzone,1),w=B.endvalue?this.getPixel(B.endvalue):0,B.endvalue&&E?(E={fill:C(n(B.color,b.trendlineColor),n(B.alpha,b.trendlineAlpha,99)),"stroke-width":0,path:["M",
x,k.canvasTop,"L",x,k.canvasBottom,"L",w,k.canvasBottom,"L",w,k.canvasTop,"Z"]},D={x:x+(w-x)/2,y:k.canvasBottom+c.trendBottomPadding,fill:C(n(B.color,d.color),n(B.alpha,b.trendlineAlpha,99)),"vertical-align":"top",text:D}):(E=l(B.thickness,b.trendlineThickness,1),E={stroke:C(n(B.color,b.trendlineColor),n(B.alpha,b.trendlineAlpha,99)),"stroke-width":E,"stroke-dasharray":n(B.dashed,b.trendlinesAreDashed)===ja?O(l(B.dashlen,b.trendlinesDashLen),l(B.dashgap,b.trendlinesDashGap),E):"none",path:B.endvalue?
["M",x,k.canvasTop,"L",w,k.canvasBottom]:["M",x,k.canvasTop,"L",x,k.canvasBottom]},D={x:B.endvalue?w:x,y:k.canvasBottom+c.trendBottomPadding,fill:C(n(B.color,d.color),n(B.alpha,b.trendlineAlpha,99)),"vertical-align":"top",text:D})):L&&(D=B.displayvalue||"",h=l(B.valueonright,0),E=l(B.istrendzone,0),x=this.getPixel(B.startvalue),w=B.endvalue?this.getPixel(B.endvalue):0,B.endvalue&&E?(E={fill:C(n(B.color,b.trendlineColor),n(B.alpha,b.trendlineAlpha,99)),"stroke-width":0,path:["M",k.canvasLeft,x,"L",
k.canvasRight,x,"L",k.canvasRight,w,"L",k.canvasLeft,w,"Z"]},D={x:h?k.canvasRight+c.canvasBorderWidth:k.canvasLeft-a,y:x+(w-x)/2,"text-anchor":h?"start":"end",fill:C(n(B.color,d.color),n(B.alpha,b.trendlineAlpha,99)),text:D}):(E=l(B.thickness,b.trendlineThickness,1),E={stroke:C(n(B.color,b.trendlineColor),n(B.alpha,b.trendlineAlpha,99)),"stroke-width":E,"stroke-dasharray":n(B.dashed,b.trendlinesAreDashed)===ja?O(l(B.dashlen,b.trendlinesDashLen),l(B.dashgap,b.trendlinesDashGap),E):"none",path:B.endvalue?
["M",k.canvasLeft,x,"L",k.canvasRight,w]:["M",k.canvasLeft,x,"L",k.canvasRight,x]},D={x:h?k.canvasRight+c.canvasBorderWidth:k.canvasLeft-a,y:B.endvalue?h?w:x:x,"text-anchor":h?"start":"end",fill:C(n(B.color,d.color),n(B.alpha,b.trendlineAlpha,99)),text:D})),h=l(B.showontop),h=1===h||1===b.showTrendlinesOnTop?A:q,y={path:m?E.path:["M",0,0],fill:ba,stroke:ba,"stroke-width":E["stroke-width"]||0,"stroke-dasharray":E["stroke-dasharray"]||"none"},g[t]?(x=g[t].graphics.drawing,w=g[t].graphics.label,v=g[t].graphics.hot,
h.appendChild(x),v.attr(y),x.attr(E),w.attr(D).tooltip(B.valueToolText),x.attr(F),w.attr(G),B.valueToolText?w.trackTooltip(!0):w.trackTooltip(!1)):(x=u.path(E,h),x.attr(F),v=u.path(y,p),w=u.text(D,r),w.attr(G).tooltip(B.valueToolText),B.valueToolText?w.trackTooltip(!0):w.trackTooltip(!1),g[t]={},g[t].graphics={},g[t].graphics.drawing=x,g[t].graphics.label=w,g[t].graphics.hot=v),m?v.tooltip(m).trackTooltip(!0):v.trackTooltip(!1),t+=1;if(g[t])for(e=t;e<g.length;e++)g[e].graphics.drawing.attr({path:["M",
0,0]}),g[e].graphics.label.attr({text:"","text-bound":[]});this.components.trendObj=g;c.trendBackgroundSetter&&(clearTimeout(c.trendBackgroundSetter),c.trendBackgroundSetter=void 0);c.trendBackgroundSetter=setTimeout(function(){for(e=0;e<t;e++)g[e].graphics.label.attr({"line-height":d.lineHeight,"text-bound":[d.backgroundColor,d.borderColor,d.borderThickness,d.borderPadding,d.borderRadius,d.borderDash]});c.trendBackgroundSetter=void 0},0)}},placeAxis:function(c){return this.isVertical?this._placeVerticalAxis(c):
this._placeHorizontalAxis(c)},_placeVerticalAxis:function(c){var b=this.renderer,d=b.smartLabel,a=this.axisData,e=this.config,f=e.name,k,p=a.labelPadding=this.config.axisValuePadding,m=this.config.axisNamePadding,h=this.config.useEllipsesWhenOverflow,A=this.config.labels.style,q=this.config.name.style,r=this.config.trend.trendStyle,u=a.axisName,g=this.trendLines,t,x,w,n=0,y=0,v=0,z=t=0,H={left:0,right:0},E=t="";this.renderer.viewPortConfig&&this._setTickIntervalAfterZoom();0>p&&(a.labelPadding=2);
e.showAxisLine?(a.labelPadding=l(p,2)+e.axisLineThickness,0>a.labelPadding&&(a.labelPadding=(0>e.axisLineThickness?0:e.axisLineThickness)+2),a.canvasBorderWidth=0,c-=e.axisLineThickness):(a.labelPadding=l(p,2)+b.canvasBorderWidth,0>a.labelPadding&&(a.labelPadding=(0>b.canvasBorderWidth?0:b.canvasBorderWidth)+2),a.canvasBorderWidth=0>b.canvasBorderWidth?0:b.canvasBorderWidth,c-=a.canvasBorderWidth);k=a.tickInterval;x=a.max;p=a.min;e.name.rotation=0;e.labels.step=e.labelStep;e.labels.isDraw=e.showLabels;
e.lines.isDraw=1;e.band.isDraw=1;e.labels.drawNormalVal=e.showDivLineValues;e.labels.drawLimitVal=e.showLimits;10>P(this.getPixel(p)-this.getPixel(p+a.tickInterval))&&(e.lines.isDraw=0,e.band.isDraw=0,e.labels.drawNormalVal=0);1!==e.showLimits&&1!==e.showDivLineValues&&(e.labels.isDraw=0);d.setStyle({fontSize:A.fontSize,fontFamily:A.fontFamily,lineHeight:A.lineHeight,fontWeight:A.fontWeight});for(A=p;A<=x;A+=k)p=""+b.logic.numberFormatter.yAxis(A),p.length>n&&(w=p,n=p.length);A=d.getOriSize(w);A.width+
a.labelPadding>c&&(e.labels.isDraw=0);e.labels.isDraw&&(a.labelMaxW=A.width,a.labelMaxH=A.height,y=A.width+a.labelPadding);if(g){d.setStyle({fontSize:r.fontSize,fontFamily:r.fontFamily,lineHeight:r.lineHeight,fontWeight:r.fontWeight});A=0;for(r=g[0].line.length;A<r;A+=1)w=g[0].line[A],p=w.displayvalue||w.startvalue||"",(n=l(w.valueonright,0))?p.length>E.length&&(E=p):p.length>t.length&&(t=p);A=d.getOriSize(E);z=A.width;A=d.getOriSize(t);t=A.width;t>y&&t>c&&(t=c);y=G(y,t+a.labelPadding);z>c-y&&(z=
D(z,c-y));A=0;for(r=g[0].line.length;A<r;A+=1)w=g[0].line[A],p=w.origText||w.displayvalue||w.startvalue||"",w.origText=p,t=(n=l(w.valueonright,0))?d.getSmartText(p,z,b.canvasHeight,h):d.getSmartText(p,y,b.canvasHeight,h),w.displayvalue=t.text,t.tooltext?w.valueToolText=t.tooltext:delete w.valueToolText}0>=c-y-z||""===u?(f.isDraw=!1,f.value=""):(d.setStyle({fontSize:q.fontSize,fontFamily:q.fontFamily,lineHeight:q.lineHeight,fontWeight:q.fontWeight}),f.isDraw=!0,this.config.rotateAxisName?(e.name.rotation=
270,b=d.getSmartText(u,b.canvasHeight,c-y-z),f.value=u,a.nameMaxW=D(b.height)):(b=d.getSmartText(u,c-y-z,b.canvasHeight),f.value=u,a.nameMaxW=D(b.width,c-y),a.nameMaxH=b.height,0<e.axisNameWidth&&(a.nameMaxW=D(a.nameMaxW,e.axisNameWidth))),v=a.nameMaxW+m,a.axisNamePadding=this.config.axisNamePadding+y,a.axisNamePadding+a.nameMaxW>c&&(a.axisNamePadding=c-a.nameMaxW,v=a.nameMaxW+a.axisNamePadding-y));H.left=y+v;H.right=z;return H},_placeHorizontalAxis:function(c){var b=this.renderer,d=b.smartLabel,
a=this.axisData,e=this.config,f=e.name,k;k=a.labelPadding=this.config.axisValuePadding;var p=this.config.axisNamePadding,m=this.config.useEllipsesWhenOverflow,h=this.config.labels.style,A=this.config.name.style,q=this.config.trend.trendStyle,r=a.axisName,u=this.vTrendLines,g=0,t,x,w,n=0,y=0,v=0,z={top:0,bottom:0},D;this.renderer.viewPortConfig&&this._setTickIntervalAfterZoom();0>k&&(a.labelPadding=2);e.showAxisLine?(a.labelPadding=l(k,2)+e.axisLineThickness,0>a.labelPadding&&(a.labelPadding=(0>e.axisLineThickness?
0:e.axisLineThickness)+2),a.canvasBorderWidth=0,c-=e.axisLineThickness):(a.labelPadding=l(k,2)+b.canvasBorderWidth,0>a.labelPadding&&(a.labelPadding=(0>b.canvasBorderWidth?0:b.canvasBorderWidth)+2),a.canvasBorderWidth=0>b.canvasBorderWidth?0:b.canvasBorderWidth,c-=a.canvasBorderWidth);k=a.tickInterval;t=a.max;x=a.min;D=P(this.getPixel(x)-this.getPixel(x+a.tickInterval));e.labels.rotation=0;e.labels.step=e.labelStep;e.labels.isDraw=e.showLabels;e.lines.isDraw=1;e.band.isDraw=1;e.labels.drawNormalVal=
e.showDivLineValues;e.labels.drawLimitVal=e.showLimits;if(e.rotateLabels||"rotate"===e.labelDisplay){if("rotate"===e.labelDisplay||1===e.rotateLabels)e.labels.rotation=270;e.slantLabel&&(e.labels.rotation=315)}10>D&&(e.lines.isDraw=0,e.band.isDraw=0,e.labels.drawNormalVal=0);1!==e.showLimits&&1!==e.showDivLineValues&&(e.labels.isDraw=0);d.setStyle({fontSize:h.fontSize,fontFamily:h.fontFamily,lineHeight:h.lineHeight,fontWeight:h.fontWeight});for(h=x;h<=t;h+=k)x=""+b.logic.numberFormatter.xAxis(h),
x.length>n&&(w=x,n=x.length);h=d.getOriSize(w);e.labels.rotation?h.width+a.labelPadding>c&&(e.labels.isDraw=0):h.height+a.labelPadding>c&&(e.labels.isDraw=0);e.labels.isDraw&&(e.labels.rotation?(a.labelMaxW=h.height,a.labelMaxH=h.width,y=h.width+a.labelPadding):(a.labelMaxW=h.width,a.labelMaxH=h.height,y=h.height+a.labelPadding));y=G(y,a.labelPadding);w=c-y;if(u)for(a.trendBottomPadding=y+2,d.setStyle({fontSize:q.fontSize,fontFamily:q.fontFamily,lineHeight:q.lineHeight,fontWeight:q.fontWeight}),h=
0,e=u[0].line.length;h<e;h+=1)n=u[0].line[h],x=n.origText||n.displayvalue||n.startvalue||"",n.origText=x,k=d.getSmartText(x,b.canvasWidth,q.lineHeight,m),t=k.height+2,0>w-t?n.displayvalue="":(n.displayvalue=k.text,g=g<k.height?k.height:g),k.tooltext?n.valueToolText=k.tooltext:delete n.valueToolText;w-=g;y+=g;0>=w||""===r?(f.isDraw=!1,f.value=""):(d.setStyle({fontSize:A.fontSize,fontFamily:A.fontFamily,lineHeight:A.lineHeight,fontWeight:A.fontWeight}),f.isDraw=!0,d=d.getSmartText(r,b.canvasWidth,w),
f.value=r,a.nameMaxW=b.canvasWidth,a.nameMaxH=d.height,v=d.height+p,a.axisNamePadding=this.config.axisNamePadding+y,a.axisNamePadding+d.height>c&&(a.axisNamePadding=c-d.height,v=d.height+a.axisNamePadding-y));z.bottom=y+v;return z}};da.prototype.constructor=da;ya=function(c,b){return c.x-b.x};za=function(c,b){return c.y-b.y};ea.prototype={buildKdTree:function(c){this.tree=this._buildKdTree(c,!1)},getNeighbour:function(c,b){var d=this.tree,a={x1:c.x-this.xLimit,x2:Number(c.x)+this.xLimit,y1:c.y-this.yLimit,
y2:Number(c.y)+this.yLimit},e=this._getIsWithinLimitFn(c);if(d)return this._searchBtwnLimit(a,d,b,e)},_search:function(c,b,d){var a=d?"x":"y";if(this._isWithinLimit(b.point1,c))return b.point1;if(c[a]<b.point1[a])return b.left?this._search(c,b.left,!d):b.point1;if(c[a]>b.point1[a])if(b.middle1)if(b.point2){if(this._isWithinLimit(b.point2,c))return b.point2;if(c[a]<b.point2[a])return this._search(c,b.middle1,!d);if(c[a]>b.point2[a])if(b.middle2)if(b.point3){if(this._isWithinLimit(b.point3,c))return b.point3;
if(c[a]<b.point3[a])return this._search(c,b.middle2,!d);if(c[a]>b.point3[a])return b.right?this._search(c,b.right,!d):b.point3}else return b.middle2.point1;else return b.point2}else return b.middle1.point1;else return b.point1},_getIsWithinLimitFn:function(c){var b=this;return function(d){return d&&1>=Math.pow((d.x-c.x)/b.xLimit,2)+Math.pow((d.y-c.y)/b.yLimit,2)?!0:!1}},_compair2closest:function(c,b){if(c){if(b)return b.i>c.i?b:c}else return b;return c},_searchBtwnLimit:function(c,b,d,a){var e=d?
"x":"y",f=d?c.x1:c.y1,k=d?c.x2:c.y2,p,m,h;if(b)return p=b.point1?b.point1[e]:k,m=b.point2?b.point2[e]:k,e=b.point3?b.point3[e]:k,a(b.point1)&&(h=this._compair2closest(h,b.point1)),p>=f&&b.left&&(h=this._compair2closest(h,this._searchBtwnLimit(c,b.left,!d,a))),p<=k&&b.middle1&&(a(b.point2)&&(h=this._compair2closest(h,b.point2)),m>=f&&(h=this._compair2closest(h,this._searchBtwnLimit(c,b.middle1,!d,a))),m<=k&&b.middle2&&(a(b.point3)&&(h=this._compair2closest(h,b.point3)),e>=f&&(h=this._compair2closest(h,
this._searchBtwnLimit(c,b.middle2,!d,a))),e<=k&&b.right&&(h=this._compair2closest(h,this._searchBtwnLimit(c,b.right,!d,a))))),h},_isWithinLimit:function(c,b){return 1>=Math.sqrt(Math.pow((b.x-c.x)/this.xLimit,2)+Math.pow((b.y-c.y)/this.yLimit,2))?!0:!1},_buildKdTree:function(c,b){var d=c&&c.length,a,e;if(d)return c.sort(b?ya:za),7<d?(d=Math.floor(d/4),a=2*(d+1)-1,e=3*(d+1)-1,{left:this._buildKdTree(c.slice(0,d),!b),point1:c[d],middle1:this._buildKdTree(c.slice(d+1,a),!b),point2:c[a],middle2:this._buildKdTree(c.slice(a+
1,e),!b),point3:c[e],right:this._buildKdTree(c.slice(e+1),!b)}):{left:2<=d?{point1:c[0]}:void 0,point1:1<=d?1===d?c[0]:c[1]:void 0,middle1:3<=d?{point1:c[2]}:void 0,point2:4<=d?c[3]:void 0,middle2:5<=d?{point1:c[4]}:void 0,point3:6<=d?c[5]:void 0,right:7==d?{point1:c[6]}:void 0}},getElementsWithinRange:function(c){var b=this.tree;this.kdPoints=[];return this._withinRange(c,!0,b)},_withinRange:function(c,b,d){var a=d.point,e=b?"y":"x",f=b?"x":"y",k=a[e],p=a[f],m=c[e].max,e=c[e].min,h=c[f].max,f=c[f].min;
a&&(k<e?d.right&&this._withinRange(c,!b,d.right):k>m?d.left&&this._withinRange(c,!b,d.left):(p>f&&p<h&&this.kdPoints.push(a),d.left&&this._withinRange(c,!b,d.left),d.right&&this._withinRange(c,!b,d.right)))},_setSearchLimit:function(c,b){this.xLimit=c;this.yLimit=b},destroy:function(){}};ea.prototype.constructor=ea;ia.prototype={init:function(c,b){var d=c.logic.dataObj.chart,a=c.logic.dataObj.dataset?c.logic.dataObj.dataset[b]:{},e=c.logic.colorManager,f=e.getPlotColor(),k=c.getFillColor,p=n(a.anchorbordercolor,
d.anchorbordercolor),e=ga(n(p,e.getColor("plotBorderColor"))),p=l(a.anchorborderthickness,d.anchorborderthickness,p?1:0),f=ga(n(a.anchorbgcolor,a.color,d.anchorbgcolor,f)),m=n(a.anchoralpha,a.alpha,d.anchoralpha,ha),h=n(a.anchorbgalpha,a.alpha,d.anchorbgalpha,ha),A=n(a.showhovereffect,d.showhovereffect,d.plothovereffect,0),q=ga(n(a.plotfillhovercolor,a.hovercolor,d.plotfillhovercolor,d.hovercolor,f)),r=n(a.plotfillhoveralpha,a.hoveralpha,d.plotfillhoveralpha,d.hoveralpha,ha),u=ga(n(a.plotfillhovercolor,
a.hovercolor,d.plotfillhovercolor,d.hovercolor,q)),g=n(a.plotfillhoveralpha,a.hoveralpha,d.plotfillhoveralpha,d.hoveralpha,ha),t=l(a.borderhoverthickness,d.borderhoverthickness,1),x=c.datasets[b].components.regressionObj||{},w,v,y=c.paper,z=c.viewPortConfig.imageContainer;x.config.showYOnX=l(a.showyonx,d.showyonx,1);w=n(a.regressionlinecolor,d.regressionlinecolor,Oa(f,20));v=n(a.regressionlinealpha,d.regressionlinealpha,m);x.config.regressionLineColor=k(w,v);x.config.regressionLineThickness=l(a.regressionlinethickness,
d.regressionlinethickness,p||1);this.config=this.config||{};this.components=this.components||{};this.graphics=this.graphics||{};this.components.regressionObj=x;this.chart=c;this.axes=this.components.axes||{};this.axes.components={xAxis:c.xAxis[0],yAxis:c.yAxis[0]};this.components.kDTree=new ea;this.jsonData=a.data||[];this.config.animation={};this.config.animation.enabled=l(d.animation,1);this.config.chunkSize=Math.floor(D(this.jsonData.length/5,5E4));this.config.staticRadius=l(d.staticradius,0);
this.config.radius=l(a.radius,a.anchorradius,d.radius,d.anchorradius,this.config.staticRadius?3:.5);this.config.plotToolText=n(a.plottooltext,d.plottooltext);this.config.plotCosmetics={fillStyle:k(f,m*h/100),strokeStyle:k(e,m),lineWidth:p};this.config.hoverCosmetics={showHoverEffect:A,fill:k(q,r),borderColor:k(u,g),borderThickness:t};this.config.tooltip={toolTipVisible:l(a.showtooltip,d.showtooltip,1),seriesNameInToolTip:l(a.seriesnameintooltip,d.seriesnameintooltip,1),toolTipSepChar:n(a.tooltipsepchar,
d.tooltipsepchar,Qa)};this.config.lastViewPort={};this.config.index=b;this.visible=0===a.visible?!1:!0;this.graphics.container=y.group("grid-container",z);this.visible?this.show():this.hide()},draw:function(c){var b,d;d=this.chart;var a=d.viewPortConfig,e=this.config;b=e.lastViewPort||{};var f=!1;if(c)this._pixelatedDraw();else{if(b.scaleX!==a.scaleX||b.scaleY!==a.scaleY)b.scaleX=a.scaleX,b.scaleY=a.scaleY,c=this.axes.components.xAxis,b=this.axes.components.yAxis,c=c.getPVR(),b=b.getPVR(),d=G(e.zoomedRadius=
D(e.staticRadius?e.radius:e.radius*D(a.scaleX,a.scaleY),d.canvasWidth/2,d.canvasHeight/2),2),this.components.kDTree._setSearchLimit(d/c,d/b),this._deleteGridImages(),this.graphics._grid={},f=!0;this._gridDraw(f)}},_deleteGridImages:function(){var c,b,d,a,e,f=this.graphics,k=f._imagePool||(f._imagePool=[]),p=f._canvasPool||(f._canvasPool=[]),m=f._grid||[];if((b=this.config._batchDarwTimers)&&b.length)for(;b.length;)clearTimeout(b.shift());for(d in m)if(e=m[d])for(a in e)(b=e[a])&&b.drawState&&(c=b.image,
c.attr({src:"",width:0,height:0}),k.push(c),delete b.image,c=b.canvas,p.push(c),delete b.canvas,delete b.ctx);delete f._grid},_pixelatedDraw:function(){var c,b,d,a,e,f=this.chart;a=this.config;var k=a.lastViewPort||{};d=f.viewPortConfig;var p=this.graphics._grid||[],m=d.scaleX/k.scaleX,k=d.scaleY/k.scaleY,h=f.canvasWidth*m,f=f.canvasHeight*k;a=a._batchDarwTimers;clearTimeout(this.timer);if(a&&a.length)for(;a.length;)clearTimeout(a.shift());this.graphics.container.transform("t"+T(-d.x*d.scaleX)+","+
T(-d.y*d.scaleY));for(c in p)if(e=p[c])for(b in e)(a=e[b])&&a.drawState&&(d=a.image,d.attr({x:a.xPixel*m,y:a.yPixel*k,width:h,height:f}))},_gridDraw:function(c){var b=this,d=b.chart.viewPortConfig;clearTimeout(b.timer);b.graphics.container.transform("t"+T(-d.x*d.scaleX)+","+T(-d.y*d.scaleY));c?b._gridManager():b.timer=setTimeout(function(){b._gridManager()},10)},_gridManager:function(){var c,b,d,a,e,f,k,p,m,h=this,l=h.config,q=h.graphics._grid,r=l._drawGrid||(l._drawGrid=[]),u=h.chart;e=u.viewPortConfig;
f=e.scaleX;var g=e.scaleY;k=Math.ceil(g);a=Math.ceil(f);var t=u.canvasWidth,u=u.canvasHeight,x=h.axes.components.xAxis,n=h.axes.components.yAxis,v=x.min,y=x.max,z=n.min,C=n.max,H=(y-v)/f,E=(C-z)/g,F=l.radius*D(e.scaleX,e.scaleY)+l.plotCosmetics.lineWidth,I=P(F/(t*e.scaleX/(x.max-x.min))),F=P(F/(u*e.scaleY/(n.max-n.min)));b=t/f;m=u/g;c=D(1,b/10,m/10);var g={},K=[];f=e.x+c;b=e.x-c+b;p=e.y+c;c=e.y+m-c;e=h._getFocusedGrid(f,p);m=g[e.row]||(g[e.row]={});m[e.col]=!0;e=h._getFocusedGrid(b,p);m=g[e.row]||
(g[e.row]={});m[e.col]=!0;e=h._getFocusedGrid(b,c);m=g[e.row]||(g[e.row]={});m[e.col]=!0;e=h._getFocusedGrid(f,c);m=g[e.row]||(g[e.row]={});m[e.col]=!0;f=h._getFocusedGrid();e=f.row;f=f.col;b=G(e-1,0);e=D(e+1,k-1);k=G(f-1,0);f=D(f+1,a-1);a=C-b*E;for(p=b;p<=e;p+=1){q[p]||(q[p]={});b=v+k*H;for(m=k;m<=f;m+=1)c=q[p][m],c||(d=G(a-E,n.min),c=D(b+H,x.max),c=q[p][m]={xPixel:m*t,yPixel:p*u,xMinValue:b,yMinValue:d,xMaxValue:c,yMaxValue:a,drawState:0,xMinWPad:G(b-I,v),yMinWPad:G(d-F,z),xMaxWPad:D(c+I,y),yMaxWPad:D(a+
F,C)}),c.drawState||(g[p]&&g[p][m]?r.push({row:p,col:m}):K.push({row:p,col:m})),b+=H;a-=E}(r.length||K.length)&&h._drawGridArr(function(){l._drawGrid=K;h._drawGridArr()})},_drawGridArr:function(c){var b,d,a,e=this.chart,f=e.viewPortConfig,k=this.config,p=k._drawGrid,m=[],h=this.graphics.container,l=e.paper,q=e.canvasWidth,e=e.canvasHeight,r=this.graphics._grid,u=this.graphics._imagePool||[],g=this.graphics._canvasPool||[],t=k.plotCosmetics,f=k.radius*D(f.scaleX,f.scaleY);if(p.length){for(;p.length;)b=
p.shift(),b=r[b.row][b.col],2!==b.drawState&&(b.drawState=2,b.image=u.length?u.shift():l.image("",h),b.image.attr({x:b.xPixel,y:b.yPixel,width:q,height:e}),b.canvas=g.length?d=g.shift():d=fa.document.createElement("canvas"),d.setAttribute("width",q),d.setAttribute("height",e),a=b.ctx=d.getContext("2d"),1>f?(a.strokeStyle=t.fillStyle,a.lineWidth=.5):(a.fillStyle=t.fillStyle,a.strokeStyle=t.strokeStyle,a.lineWidth=t.lineWidth),m.push(b));k._batchDrawindex=this.jsonData.length-1;this._drawGridArrBatch(m,
c,!k.animation.enabled)}else c&&c()},_drawGridArrBatch:function(c,b,d){var a,e,f,k,p,m,h,l,q,r,u,g,t=this,n=t.chart;e=n.canvasWidth;g=t.config;q=g.plotCosmetics;f=g._batchDrawindex;p=t.jsonData;h=p.length-1;k=f-g.chunkSize;var w=t.axes.components.yAxis;m=g.zoomedRadius;var v=t.axes.components.xAxis.getPVR(),w=w.getPVR(),y=t.components.regressionObj,z=y.config.status,D=y.config.showYOnX,C=y.config.regressionLineColor,E=y.config.regressionLineThickness,F=t._store||[],G=q.lineWidth||1>m;for(q=0;q<c.length;q+=
1)c[q].ctx.beginPath();for(k=0>=k?0:k;f>=k;--f)if(u=p[f],!(u&&isNaN(u.x)||isNaN(u.y)))for(q=0;q<c.length;q+=1)e=c[q],u.x<e.xMinWPad||u.x>e.xMaxWPad||u.y<e.yMinWPad||u.y>e.yMaxWPad||(r=e.ctx,a=T((u.x-e.xMinValue)*v),e=T((e.yMaxValue-u.y)*w),(l=F[a])||(l=F[a]={}),l[e]||(l[e]=!0,1>m?(r.moveTo(a,e),r.lineTo(a+1,e)):(r.moveTo(a+m,e),r.arc(a,e,m,0,Na))));for(q=0;q<c.length;q+=1)e=c[q],r=e.ctx,r.fill(),G&&r.stroke(),r.closePath();g._batchDrawindex=f;if(0<=f){if(!d)for(q=0;q<c.length;q+=1)f=c[q].image,p=
c[q].canvas,f.attr({src:p.toDataURL("image/png")});(g._batchDarwTimers||(g._batchDarwTimers=[])).push(setTimeout(function(){t.chart&&t._drawGridArrBatch(c,b,d)},0))}else{delete t._store;if(z)for(g=t.components.regressionObj.config.regresionPoints,g||(g=ca.xybase.getRegressionLineSeries(y.config,D,h),t.components.regressionObj.regresionPoints=g),q=0;q<c.length;q+=1)e=c[q],k=e.xMinValue,h=e.yMaxValue,f=e.image,p=e.canvas,r=e.ctx,e=n.canvasWidth,f=(g[0].x-k)*v,p=(h-g[0].y)*w,k=(g[1].x-k)*v,m=(h-g[1].y)*
w,h=(m-p)*(0-k)/(k-f)+m,f=(m-p)*(e-k)/(k-f)+m,r.beginPath(),r.strokeStyle=C,r.lineWidth=E,r.moveTo(0,h),r.lineTo(e,f),r.stroke(),r.closePath();for(q=0;q<c.length;q+=1)e=c[q],f=e.image,p=e.canvas,r=e.ctx,e.drawState=1,r.strokeStyle="#FF0000",r.lineWidth=2,r.beginPath(),r.fillStyle="red",r.font="15px Arial",f.attr({src:p.toDataURL("image/png")});t.tree||setTimeout(function(){t._buildKdTree()},250);b&&b()}},_getFocusedGrid:function(c,b){var d=this.chart,a=d.viewPortConfig,e=d.canvasWidth/a.scaleX,d=
d.canvasHeight/a.scaleY,f=isNaN(c)?a.x+e/2:c,a=isNaN(b)?a.y+d/2:b;return{row:U(a/d),col:U(f/e)}},_buildKdTree:function(){this._kdPoints=this.jsonData.slice();this.components.kDTree||(this.components.kDTree=new ea);this.components.kDTree.buildKdTree(this._kdPoints);delete this._kdPoints},getElement:function(c){if(this.components.kDTree)return this.components.kDTree.getNeighbour(c,!1)},dispose:function(){Aa(this)},show:function(){var c,b;c=this.chart.logic.chartInstance.jsVars._reflowData;var d=this.config.index;
this.visible=!0;b=c.dataObj||(c.dataObj={});b=b.dataset||(b.dataset=[]);(b[d]||(b[d]={})).visible=1;c=c.hcJSON||(c.hcJSON={});c=c.series||(c.series=[]);(c[d]||(c[d]={})).visible=!0;this.graphics.container.show()},hide:function(){var c,b;c=this.chart.logic.chartInstance.jsVars._reflowData;var d=this.config.index;this.visible=!1;b=c.dataObj||(c.dataObj={});b=b.dataset||(b.dataset=[]);(b[d]||(b[d]={})).visible=0;c=c.hcJSON||(c.hcJSON={});c=c.series||(c.series=[]);(c[d]||(c[d]={})).visible=!1;this.graphics.container.hide()}};
ia.prototype.constructor=ia;ca("renderer.zoomscatter",{getFillColor:function(c,b){b=parseFloat(b/100);0>b?b=0:1<b&&(b=1);c||(c="#FFFFFF");if(ta&&!Ma)return b?c:"transparent";c=c.replace(/^#?([a-f0-9]+)/ig,"$1");c=v.graphics.HEXtoRGB(c);c[3]=b.toString();return"rgba("+c.join(",")+")"},resize:function(){var c=this.elements,b=c.canvasBorder,c=c.canvas,d=this.viewPortConfig,a=this.options.chart.plotBorderWidth,e=a/2,f=this.canvasHeight-=a,k=this.canvasWidth-=2*a,p=this.canvasLeft+=a;this.canvasBottom-=
a;this.canvasRight-=a;c?c.attr({x:p,y:this.canvasTop,height:f,width:k}):this.drawCanvas();b&&b.attr({x:p-e,y:this.canvasTop-e,height:f+a,width:k+a,"stroke-width":a});d.imageContainer.attr({"clip-rect":this.canvasLeft+","+this.canvasTop+","+this.canvasWidth+","+this.canvasHeight}).transform("t"+this.canvasLeft+","+this.canvasTop);d.trackerElem.attr({x:this.canvasLeft,y:this.canvasTop,width:this.canvasWidth,height:this.canvasHeight});d.tracker&&d.tracker.attr({"clip-rect":this.canvasLeft+","+this.canvasTop+
","+this.canvasWidth+","+this.canvasHeight})},drawGraph:function(){this._initialize()},spaceManager:function(){var c=this.logic.dataObj.chart||{},b=this.yAxis[0],d=this.xAxis[0],a=l(c._canvasleftmargin,c.canvasleftmargin),e=l(c._canvasrightmargin,c.canvasrightmargin),f=l(c._canvastopmargin,c.canvastopmargin),c=l(c._canvasbottommargin,c.canvasbottommargin),k,p,m,h,n,q,r,u;q=n=0;var g={},t=this.chartHeight,x=this.chartWidth,w=t-this.origCanvasBottom,v=x-this.origCanvasRight;if(a||0===a)n+=a-this.origCanvasLeft,
k=!0;if(e||0===e)n+=e-this.origCanvasRight,p=!0;if(f||0===f)q+=f-this.origCanvasTop,m=!0;if(c||0===c)q+=c-this.origCanvasBottom,h=!0;n=G(n,.5*this.origCanvasWidth);q=G(q,.5*this.origCanvasHeight);u=r=0;g.left=k?a-this.origCanvasLeft:n;g.right=p?e-v:n;g.top=m?f-this.origCanvasTop:q;g.bottom=h?c-w:q;b&&(u=b&&b.placeAxis(n,g),u.left=D(u.left,n),u.right=D(u.right,n-u.left),this.canvasWidth=this.origCanvasWidth-(k?a-this.origCanvasLeft:u.left)-(p?e-v:u.right),this.canvasLeft=k?a:this.origCanvasLeft+u.left,
this.canvasRight=p?x-e:this.origCanvasRight-u.right);d&&(r=d&&d.placeAxis(q,g),r.bottom=D(r.bottom,q),r.top=D(r.top,q-r.bottom),this.canvasHeight=this.origCanvasHeight-(h?c-w:r.bottom)-(m?f-this.origCanvasTop:r.top),this.canvasTop=m?f:this.origCanvasTop+r.top,this.canvasBottom=h?t-c:this.origCanvasBottom-r.bottom);this.viewPortConfig&&this.viewPortConfig.imageContainer.attr({x:this.canvasLeft,y:this.canvasRight});return{x:r,y:u}},updateManager:function(c){var b,d=this.datasets,a=d.length;for(b=0;b<
a;b+=1)d[b].plot.draw(c);c||this.drawQuadrant()},drawAxes:function(){var c=this.xAxis[0],b=this.yAxis[0];c&&b&&(c.renderer.viewPortConfig=this.viewPortConfig,b.renderer.viewPortConfig=this.viewPortConfig);b&&b.draw();c&&c.draw()},initAxes:function(){var c=this.paper,b=this.logic,d=this.layers,a=b.dataObj.chart,b=b.colorManager,e=v.chartPaletteStr.chart2D;d.axisBottom=c.group("axis-bottom").insertAfter(d.background);d.axisTop=c.group("axis-top").insertAfter(d.dataset);c={outCanfontFamily:n(a.outcnvbasefont,
a.basefont,"Verdana,sans"),outCanfontSize:ka(a.outcnvbasefontsize,a.basefontsize,10),outCancolor:n(a.outcnvbasefontcolor,a.basefontcolor,b.getColor(e.baseFontColor)).replace(/^#?([a-f0-9]+)/ig,"#$1"),axisNamePadding:a.xaxisnamepadding,axisValuePadding:a.labelpadding,axisNameFont:a.xaxisnamefont,axisNameFontSize:a.xaxisnamefontsize,axisNameFontColor:a.xaxisnamefontcolor,axisNameFontBold:a.xaxisnamefontbold,axisNameFontItalic:a.xaxisnamefontitalic,axisNameBgColor:a.xaxisnamebgcolor,axisNameBorderColor:a.xaxisnamebordercolor,
axisNameAlpha:a.xaxisnamealpha,axisNameFontAlpha:a.xaxisnamefontalpha,axisNameBgAlpha:a.xaxisnamebgalpha,axisNameBorderAlpha:a.xaxisnameborderalpha,axisNameBorderPadding:a.xaxisnameborderpadding,axisNameBorderRadius:a.xaxisnameborderradius,axisNameBorderThickness:a.xaxisnameborderthickness,axisNameBorderDashed:a.xaxisnameborderdashed,axisNameBorderDashLen:a.xaxisnameborderdashlen,axisNameBorderDashGap:a.xaxisnameborderdashgap,useEllipsesWhenOverflow:a.useellipseswhenoverflow,divLineColor:n(a.vdivlinecolor,
b.getColor(e.divLineColor)),divLineAlpha:n(a.vdivlinealpha,b.getColor("divLineAlpha")),divLineThickness:l(a.vdivlinethickness,1),divLineIsDashed:Boolean(l(a.vdivlinedashed,a.vdivlineisdashed,0)),divLineDashLen:l(a.vdivlinedashlen,4),divLineDashGap:l(a.vdivlinedashgap,2),showAlternateGridColor:l(a.showalternatevgridcolor,0),alternateGridColor:n(a.alternatevgridcolor,b.getColor("altVGridColor")),alternateGridAlpha:n(a.alternatevgridalpha,b.getColor("altVGridAlpha")),numDivLines:a.numvdivlines,labelFont:a.labelfont,
labelFontSize:a.labelfontsize,labelFontColor:a.labelfontcolor,axisName:a.xaxisname,axisMinValue:a.xaxisminvalue,axisMaxValue:a.xaxismaxvalue,setAdaptiveMin:a.setadaptivexmin,adjustDiv:a.adjustvdiv,labelDisplay:a.labeldisplay,showLabels:a.showlabels,rotateLabels:a.rotatelabels,slantLabel:l(a.slantlabels,a.slantlabel),labelStep:l(a.labelstep,a.xaxisvaluesstep),showAxisValues:l(a.showxaxisvalues,a.showxaxisvalue),showLimits:a.showvlimits,showDivLineValues:l(a.showvdivlinevalues,a.showvdivlinevalues),
showZeroPlane:a.showvzeroplane,zeroPlaneColor:a.vzeroplanecolor,zeroPlaneThickness:a.vzeroplanethickness,zeroPlaneAlpha:a.vzeroplanealpha,showZeroPlaneValue:a.showvzeroplanevalue,trendlineColor:a.trendlinecolor,trendlineToolText:a.trendlinetooltext,trendlineThickness:a.trendlinethickness,trendlineAlpha:a.trendlinealpha,showTrendlinesOnTop:a.showtrendlinesontop,showAxisLine:l(a.showxaxisline,a.showaxislines,a.drawAxisLines,0),axisLineThickness:l(a.xaxislinethickness,a.axislinethickness,1),axisLineAlpha:l(a.xaxislinealpha,
a.axislinealpha,100),axisLineColor:n(a.xaxislinecolor,a.axislinecolor,"#000000")};d={outCanfontFamily:n(a.outcnvbasefont,a.basefont,"Verdana,sans"),outCanfontSize:ka(a.outcnvbasefontsize,a.basefontsize,10),outCancolor:n(a.outcnvbasefontcolor,a.basefontcolor,b.getColor(e.baseFontColor)).replace(/^#?([a-f0-9]+)/ig,"#$1"),axisNamePadding:a.yaxisnamepadding,axisValuePadding:a.yaxisvaluespadding,axisNameFont:a.yaxisnamefont,axisNameFontSize:a.yaxisnamefontsize,axisNameFontColor:a.yaxisnamefontcolor,axisNameFontBold:a.yaxisnamefontbold,
axisNameFontItalic:a.yaxisnamefontitalic,axisNameBgColor:a.yaxisnamebgcolor,axisNameBorderColor:a.yaxisnamebordercolor,axisNameAlpha:a.yaxisnamealpha,axisNameFontAlpha:a.yaxisnamefontalpha,axisNameBgAlpha:a.yaxisnamebgalpha,axisNameBorderAlpha:a.yaxisnameborderalpha,axisNameBorderPadding:a.yaxisnameborderpadding,axisNameBorderRadius:a.yaxisnameborderradius,axisNameBorderThickness:a.yaxisnameborderthickness,axisNameBorderDashed:a.yaxisnameborderdashed,axisNameBorderDashLen:a.yaxisnameborderdashlen,
axisNameBorderDashGap:a.yaxisnameborderdashgap,axisNameWidth:a.yaxisnamewidth,useEllipsesWhenOverflow:a.useellipseswhenoverflow,rotateAxisName:l(a.rotateyaxisname,1),axisName:a.yaxisname,divLineColor:n(a.divlinecolor,b.getColor(e.divLineColor)),divLineAlpha:n(a.divlinealpha,b.getColor("divLineAlpha")),divLineThickness:l(a.divlinethickness,1),divLineIsDashed:Boolean(l(a.divlinedashed,a.divlineisdashed,0)),divLineDashLen:l(a.divlinedashlen,4),divLineDashGap:l(a.divlinedashgap,2),showAlternateGridColor:l(a.showalternatehgridcolor,
1),alternateGridColor:n(a.alternatehgridcolor,b.getColor("altHGridColor")),alternateGridAlpha:n(a.alternatehgridalpha,b.getColor("altHGridAlpha")),numDivLines:a.numdivlines,axisMinValue:a.yaxisminvalue,axisMaxValue:a.yaxismaxvalue,setAdaptiveMin:a.setadaptiveymin,adjustDiv:a.adjustdiv,labelStep:a.yaxisvaluesstep,showAxisValues:l(a.showyaxisvalues,a.showyaxisvalue),showLimits:a.showlimits,showDivLineValues:l(a.showdivlinevalues,a.showdivlinevalue),showZeroPlane:a.showzeroplane,zeroPlaneColor:a.zeroplanecolor,
zeroPlaneThickness:a.zeroplanethickness,zeroPlaneAlpha:a.zeroplanealpha,showZeroPlaneValue:a.showzeroplanevalue,trendlineColor:a.trendlinecolor,trendlineToolText:a.trendlinetooltext,trendlineThickness:a.trendlinethickness,trendlineAlpha:a.trendlinealpha,showTrendlinesOnTop:a.showtrendlinesontop,showAxisLine:l(a.showyaxisline,a.showaxislines,a.drawAxisLines,0),axisLineThickness:l(a.yaxislinethickness,a.axislinethickness,1),axisLineAlpha:l(a.yaxislinealpha,a.axislinealpha,100),axisLineColor:n(a.yaxislinecolor,
a.axislinecolor,"#000000")};this.xAxis=[];this.yAxis=[];a.xaxisrange&&(this.xAxis[0]=c=new da(c,this,!0,!1,!1),this.yAxis[0]=d=new da(d,this,!0,!0,!0),c.setDataLimit(a.xaxisrange.max,a.xaxisrange.min),d.setDataLimit(a.yaxisrange.max,a.yaxisrange.min));this.origCanvasWidth=this.canvasWidth;this.origCanvasHeight=this.canvasHeight;this.origCanvasLeft=this.canvasLeft;this.origCanvasBottom=this.canvasBottom;this.origCanvasRight=this.canvasRight;this.origCanvasTop=this.canvasTop},_initialize:function(){var c,
b,d,a,e,f,k,p,m={},h=this;d=h.eventListeners||(h.eventListeners=[]);e=h.paper;var A=h.plots=h.elements.plots;b=h.layers;var q=h.options;c=h.elements;var r=q.chart;f=(a=h.logic.dataObj)&&a.chart;var q=h.datasets=q.series,r=X(r.rendererId,r.defaultSeriesType),u=b.background,g=b.dataset=b.dataset||e.group("dataset").insertAfter(u),t=1-l(f.stepzoom,25)/100,u=function(a){return function(){var b,c=this.visible,d=h.datasets,e=0;for(b=0;b<a;b+=1)!1===d[b].showInLegend&&(e+=1);this.visible=h.elements.legend.elements.item[a-
e].legendItemBackground.data("legendItem").visible=c?!1:!0}},x=function(){return function(){var a=this.plot;h.legendClick(a,!a.visible);a.visible?a.show():a.hide()}},w=function(a){return function(){h.logic.chartInstance.ref=h.container;return h.getEventArgs&&h.getEventArgs(h.datasets[a].plot)}},v=function(a,b,c){return function(d,e){b.call(h,A[a],c,{numUpdate:d,hasAxisChanged:e})}},y=h.container,z=h.canvasLeft,D=h.canvasTop,C=h.viewPortConfig||{},E=h.toolbar,F=C&&C.imageContainer,G=E.x,I,J,B=function(a){a=
a<G-I;this.tooltip(m[a?"btnSelectZoomToolText":"btnPanToolText"]);return a};if(a.dataset){J=h.options.chart.toolbar.button.spacing;E.x-=J;h.buttonToolText=m={showToolBarButtonTooltext:a=l(f.showtoolbarbuttontooltext,1),resetButton:n(f.btnresetcharttooltext,"Reset Chart"),zoomOutButton:n(f.btnzoomouttooltext,"Zoom out to previous level"),zoomInButton:n(f.btnzoomintooltext,"<strong>Zoom in</strong><br/>Or double-click on plot to zoom-in"),btnSelectZoomToolText:n(f.btnSelectZoomToolText,"<strong>Select a region to zoom-in</strong><br/>Click to enable pan mode."),
btnPanToolText:n(f.btnPanToolText,"<strong>Drag to move across chart</strong><br/>Click to enable select-zoom mode.")};b.tracker=b.tracker||e.group("hot").insertAfter(g);b.buttons=b.buttons||(b.buttons=e.group("buttons").trackTooltip(!0));h.initAxes();k=h.xAxis[0];p=h.yAxis[0];h.drawCanvas();C=h.viewPortConfig={};C.status="zoom";C.maxZoomLimit=l(f.maxzoomlimit,1E3);C.viewPortHistory=[{scaleX:1,scaleY:1,x:0,y:0}];C.imageContainer=F=e.group("dataset-orphan",b.dataset);F.transform("t"+z+","+D);F.attr({"clip-rect":h.canvasLeft+
","+h.canvasTop+","+h.canvasWidth+","+h.canvasHeight});C.trackerElem=e.rect(h.canvasLeft,h.canvasTop,h.canvasWidth,h.canvasHeight,0,b.tracker).attr({fill:ba,stroke:ba});C.trackerElem.attr({cursor:"default"});h.initQuadrant();N.addSymbol({zoomInIcon:function(a,b,c){a-=.2*c;b-=.2*c;var d=.8*c,e=N.rad(43),f=N.rad(48),g=a+d*S(e),e=b+d*R(e),h=a+d*S(f),f=b+d*R(f),k=N.rad(45),r=g+c*S(k),p=e+c*R(k),m=h+c*S(k)-1;c=f+c*R(k)-1;return["M",g,e,"A",d,d,0,1,0,h,f,"Z","M",g+1,e+1,"L",r,p,m,c,h+1,f+1,"Z","M",a-2,
b,"L",a+2,b,"Z","M",a,b-2,"L",a,b+2,"Z"]},toogleIcon:function(a,b,c){var d=[],e=a-11.25-.2*c,f=b-.2*c,g=.8*c,h=N.rad(43),k=N.rad(48),r=e+g*S(h),h=f+g*R(h),p=e+g*S(k),k=f+g*R(k),m=c,l=N.rad(45),q=r+m*S(l),t=h+m*R(l),n=p+m*S(l)-1,m=k+m*R(l)-1,d=d.concat(["M",r,h,"A",g,g,0,1,0,p,k,"Z","M",r+1,h+1,"L",q,t,n,m,n+1,m-1,n+1.5,m+1.5,n-1,m+1,n,m,p+1,k+1,"Z","M",e-2,f,"L",e+2,f,"Z","M",e,f-2,"L",e,f+2,"Z"]);a+=11.25;c*=2.5;return d.concat(["M",a-c/16,b-c/8,"L",a+c/16,b-c/8,"L",a+c/16,b-c/3.2,"L",a+6*c/32,b-
10*c/32,"L",a,b-c/2,"L",a-6*c/32,b-10*c/32,"L",a-c/16,b-c/3.2,"Z","M",a+2*c/32,b-3*c/32,"L",a+10*c/32,b-2*c/32,"L",a+10*c/32,b-6*c/32,"L",a+16*c/32,b,"L",a+10*c/32,b+6*c/32,"L",a+10*c/32,b+2*c/32,"L",a+2*c/32,b+3*c/32,"Z","M",a+2*c/32,b+5*c/32,"L",a+2*c/32,b+10*c/32,"L",a+6*c/32,b+10*c/32,"L",a,b+16*c/32,"L",a-6*c/32,b+10*c/32,"L",a-2*c/32,b+10*c/32,"L",a-2*c/32,b+5*c/32,"Z","M",a-4*c/32,b-2*c/32,"L",a-10*c/32,b-2*c/32,"L",a-10*c/32,b-6*c/32,"L",a-16*c/32,b,"L",a-10*c/32,b+6*c/32,"L",a-10*c/32,b+
2*c/32,"L",a-4*c/32,b+2*c/32,"Z"])}});if(E.length)for(f=0;f<E.length;f+=1)E[f].attr({config:{hover:{fill:"#FFFFFF",stroke:"#C2C2C2"},disable:{fill:"#FFFFFF",stroke:"#E3E3E3"},pressed:{fill:"#EFEFEF",stroke:"#C2C2C2"}},fill:["#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF",!0]});h.toogleButton=E.add("toogleIcon",function(a){var b="zoom"===C.status;a=B.apply(this,[wa(h.container,a[0]).chartX]);(!a&&b||a&&!b)&&h.toogleDragPan(!0)},{x:E.x-=45,w:45,disableGradient:!0}).buttonhover(function(a){B.apply(this,[a[1]])},
function(){},void 0,void 0,function(a){B.apply(this,[a[1]])});I=(G-E.x-2*J)/2;h.toolbar.push(e.path("M"+(E.x-6)+",5,V26",b.buttons).attr({stroke:"#CCCCCC","stroke-width":1}));h.resetButton=E.add("resetIcon",function(){var a=h.viewPortConfig;1<a.viewPortHistory.length&&(k.axisData.axisContainer.transform("t0,0"),k.axisData.axisPlotLineContainer.transform("t0,0"),k.axisData.axisBandContainer.transform("t0,0"),p.axisData.axisContainer.transform("t0,0"),p.axisData.axisPlotLineContainer.transform("t0,0"),
p.axisData.axisBandContainer.transform("t0,0"),a.isReset=!0,h.zoomSelection(0,0,h.canvasWidth,h.canvasHeight),a.viewPortHistory.splice(1),a.trackerElem.attr({cursor:"default"}),h.updateButtonVisual(),h.updateSelectionBox(0,0,0,0));M.raiseEvent("zoomReset",{},h.fusionCharts,[h.fusionCharts.id])},{x:E.x-=30,tooltip:a&&m.resetButton,disableGradient:!0});h.zoomOutButton=E.add("zoomOutIcon",function(){var a=h.viewPortConfig.viewPortHistory;1<a.length&&(a=a.slice(-2,-1)[0],h.updateVisual(a.x,a.y,a.scaleX,
a.scaleY))},{tooltip:a&&m.zoomOutButton,disableGradient:!0});h.zoomInButton=E.add("zoomInIcon",function(){h.zoom(t)},{tooltip:a&&m.zoomInButton,disableGradient:!0});Ia(y,aa?"touchstart":"mousemove",h.searchMouseMove);d.push(oa(y,"touchstart mousemove",h.searchMouseMove,h));h.zoomPanManager(F);C.updateAnimDuration=500;A||(A=h.plots=h.plots||[],c.plots=A);f=0;for(e=q.length;f<e;f++)d=q[f]||{},b=d.updatePlot="updatePlot"+qa(n(d.type,d.plotType,r)),b=h[b],c=d.drawPlot="drawPlot"+qa(n(d.type,d.plotType,
r)),c=h[c]||h.drawPlot,(a=A[f])||(a=new ia,a.init(h,f),a.items=[],a.data=d.data||[],a.name=d.name,a.userID=d.userID,a.setVisible=u(f,d),a.legendClick=x(f),a.getEventArgs=w(f),a.realtimeUpdate=v(f,b||c,d),d.plot=a,d.legendClick=a.legendClick,d.getEventArgs=a.getEventArgs,d.setVisible=a.setVisible),f&&q[f-1]&&(d.previousData=q[f-1].data);h.updateVisual()}},updateButtonVisual:function(){var c,b,d,a,e;d=this.viewPortConfig;c=d.status;1<d.viewPortHistory.length?(d=[],a=["resetButton","zoomOutButton","zoomInButton"]):
(d=["resetButton","zoomOutButton"],a=["zoomInButton"]);e="zoom"===c?"0-#E6E6E6-#E6E6E6:49-#bfbfbf:49-#bfbfbf:51-#FFFFFF:51-#FFFFFF":"0-#FFFFFF-#FFFFFF:49-#bfbfbf:49-#bfbfbf:51-#E6E6E6:51-#E6E6E6";for(c=0;c<d.length;c+=1)b=d[c],this[b].attr({config:{hover:{fill:"#FFFFFF","stroke-width":1,stroke:"#E3E3E3",cursor:"default"},normal:{fill:"#FFFFFF",stroke:"#E3E3E3","stroke-width":1,cursor:"default"},disable:{fill:"#FFFFFF","stroke-width":1,stroke:"#E3E3E3","stroke-opacity":1,cursor:"default"},pressed:{fill:"#FFFFFF",
"stroke-width":1,stroke:"#E3E3E3",cursor:"default"}},"button-disabled":!1,stroke:"#E3E3E3","stroke-opacity":1});for(c=0;c<a.length;c+=1)b=a[c],this[b].attr({config:{hover:{fill:"#FFFFFF","stroke-width":1,stroke:"#aaaaaa",cursor:"pointer"},normal:{fill:"#FFFFFF",stroke:"#C2C2C2","stroke-width":1,cursor:"pointer"},disable:{fill:"#FFFFFF","stroke-width":1,stroke:"#E3E3E3","stroke-opacity":1,cursor:"pointer"},pressed:{fill:"#EFEFEF","stroke-width":1,stroke:"#C2C2C2",cursor:"pointer"}},"button-disabled":!1,
fill:["#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF",!0],stroke:"#C2C2C2","stroke-opacity":1});this.toogleButton.attr({config:{pressed:{fill:[e,e,e,e,!0]}},fill:[e,e,e,e,!0]})},highlightPoint:function(c,b,d,a,e,f){var k=this,p=k.viewPortConfig,m=k.paper,h=p.tracker,l=k.datasets[e],q=l&&l.plot;e=l&&q.config.zoomedRadius||0;var r=l&&q.config.hoverCosmetics,l=r&&r.fill,q=r&&r.borderColor,r=r&&r.borderThickness,n={},n=function(a){v.plotEventHandler.call(this,k,a)},g=function(a){v.plotEventHandler.call(this,
k,a,"dataplotRollover")},t=function(a){v.plotEventHandler.call(this,k,a,"dataplotRollout")};h||(h=p.tracker=m.circle(0,0,0,k.layers.tracker).attr({"clip-rect":k.canvasLeft+","+k.canvasTop+","+k.canvasWidth+","+k.canvasHeight}).click(n).trackTooltip(!0).hover(g,t));a&&h.data("eventArgs",{x:a.x,y:a.y,tooltip:a.tooltip,link:a.link});p.lastHoveredPoint=a;n=Number(c)?{r:e,fill:l,stroke:q,"stroke-width":r}:{r:e,fill:ba,stroke:ba,"stroke-width":0};h.attr(n).tooltip(f).transform("t"+(b+k.canvasLeft)+","+
(d+k.canvasTop));a&&Ra("mouseover",h&&h.node,p.lastMouseEvent)},toogleDragPan:function(c){var b=this.viewPortConfig,d=b.status;c&&(b.status="zoom"===d?"pan":"zoom",M.raiseEvent("zoomModeChanged",{panModeActive:this.viewPortConfig.status},this.fusionCharts,[this.fusionCharts.id]));this.updateButtonVisual()},zoomPanManager:function(){var c,b=[],d=[],a=this,e=a.eventListeners||(a.eventListeners=[]),f=a.viewPortConfig,k=!1,p=0,m,h={},l=function(b){var c=b.chartX,d=b.chartY,e=a.canvasLeft,f=a.canvasTop,
h=a.canvasRight,k=a.canvasBottom;c<e&&(b.chartX=G(c,e));c>h&&(b.chartX=D(c,h));d<f&&(b.chartY=G(d,f));d>k&&(b.chartY=D(d,k))},q={start:function(d){f=a.viewPortConfig;aa=d.touches?!0:!1;b[0]=V(d,a);a.updateSelectionBox(0,0,0,0);aa&&(k=!1,c=d.touches.length,2===c&&(k=!0,h.x=f.x,h.y=f.y,h.scaleX=f.scaleX,h.scaleY=f.scaleY,b[0]=V(d.touches.item(0),a),b[1]=V(d.touches.item(1),a)));f.isDragging=!1;"pan"===f.status&&(f.panStartX=f.x,f.panStartY=f.y,f.trackerElem.attr({cursor:"move"}))},on:function(c){var e,
g,m,p;m=f.panStartX;var l=f.panStartY;e=f.scaleX;g=f.scaleY;var q=a.xAxis[0],n=a.yAxis[0];aa=c.touches?!0:!1;d[0]=V(c,a);aa&&c&&(p=c.touches.length,2===p?(k=!0,d[0]=V(c.touches.item(0),a),d[1]=V(c.touches.item(1),a)):k=!1);!f.isDragging&&(!aa||2<P(d[0].chartX-b[0].chartX)||2<P(d[0].chartY-b[0].chartY))&&(f.isDragging=!0,a.highlightPoint(!1),"zoom"===f.status&&(b[0].pointValue=a.getValue({x:b[0].chartX,y:b[0].chartY}),M.raiseEvent("selectionStart",{chartX:b[0].chartX,chartY:b[0].chartY,pageX:b[0].pageX,
pageY:b[0].pageY,selectionTop:b[0].chartX+a.canvasLeft,selectionLeft:b[0].chartY+a.canvasTop,selectionWidth:0,selectionHeight:0,startXVAlue:b[0].pointValue.x,startYVAlue:b[0].pointValue.y},a.fusionCharts,[a.fusionCharts.id])));if(f.isDragging)if(k){if(b[0].insideCanvas||b[1].insideCanvas)m=a._getTouchViewPort(b,d,h),a.updateVisual(m.x,m.y,m.scaleX,m.scaleY,!0)}else"zoom"===f.status?a.updateSelectionBox(b[0].chartX,b[0].chartY,d[0].chartX,d[0].chartY):"pan"!==f.status||1===e&&1===g||!b[0].insideCanvas||
(c=b&&d[0].chartX-b[0].chartX,p=b&&d[0].chartY-b[0].chartY,m-=c/e,l-=p/g,e=a.canvasWidth*(e-1)/e,g=a.canvasHeight*(g-1)/g,f.x=m>e?e:0>m?0:m,f.y=l>g?g:0>l?0:l,a.updateManager(),q.draw(),n.draw())},end:function(c){var e=V(c,a),g=a.canvasLeft,q=a.canvasTop,n;n=a.canvasWidth/4;var w=a.canvasHeight/4,e=isNaN(e.chartX)||isNaN(e.chartY)?d[0]||b[0]:e;if(f.isDragging){if(k){if(b[0].insideCanvas||b[1].insideCanvas)c=a._getTouchViewPort(b,d,h),a.updateVisual(c.x,c.y,c.scaleX,c.scaleY);k=!1}else"zoom"===f.status&&
(c=e,n=b[0],l(n),l(c),q=a.getOriginalPositions(n.chartX-g,n.chartY-q,c.chartX-g,c.chartY-q))&&(c.pointValue=a.getValue({x:c.chartX,y:c.chartY}),M.raiseEvent("selectionEnd",{chartX:c.chartX,chartY:c.chartY,pageX:c.pageX,pageY:c.pageY,selectionTop:c.chartX+a.canvasLeft,selectionLeft:c.chartY+a.canvasTop,selectionWidth:Math.abs(c.chartX-n.chartX),selectionHeight:Math.abs(c.chartY-n.chartY),startXVAlue:n.pointValue.x,startYVAlue:n.pointValue.y,endXValue:c.pointValue.x,endYValue:c.pointValue.y},a.fusionCharts,
[a.fusionCharts.id]),n.chartX!==c.chartX&&n.chartY!==c.chartY&&a.zoomSelection(q[0],q[1],q[2],q[3]),a.updateSelectionBox(0,0,0,0));f.isDragging=!1;c=d[0]||b[0];c.data=a;a.searchMouseMove(c)}else e.insideCanvas&&(p+=1,setTimeout(function(){p=0;m=void 0},500),2===p?(c&&c.touches?!0:!1)===m&&(g=e.chartX-g,q=e.chartY-q,q=a.getOriginalPositions(g-n,q-w,g+n,q+w),a.zoomSelection(q[0],q[1],q[2],q[3]),c.preventDefault()):m=c&&c.touches?!0:!1);f.trackerElem.attr({cursor:"default"})}};e.push(oa(a.container,
"pointerdrag",function(a){q[a.state](a.originalEvent)}))},_getTouchViewPort:function(c,b,d){var a,e,f=this.canvasLeft,k=this.canvasTop;a=this.canvasWidth;e=this.canvasHeight;var p=D(c[0].chartX,c[1].chartX)-f,m=D(c[0].chartY,c[1].chartY)-k,h=Math.abs(c[1].chartX-c[0].chartX);c=Math.abs(c[1].chartY-c[0].chartY);f=D(b[0].chartX,b[1].chartX)-f;k=D(b[0].chartY,b[1].chartY)-k;h=Math.abs(b[1].chartX-b[0].chartX)/h*d.scaleX;b=Math.abs(b[1].chartY-b[0].chartY)/c*d.scaleY;p=d.x+p/d.scaleX-f/h;d=d.y+m/d.scaleY-
k/b;p=0>p?0:p;d=0>d?0:d;b=1>b?1:b;h=1>h?1:h;a-=a/h;e-=e/b;return{x:p>a?a:p,y:d>e?e:d,scaleX:h,scaleY:b}},updateSelectionBox:function(c,b,d,a){var e=this.paper,f=this.viewPortConfig,k=f.cursor,p=f.selectionBox,m=this.canvasRight,h=this.canvasLeft,l=this.canvasTop,q=this.canvasBottom,n=c<d?c:d,u=b<a?b:a,g=c>d?c:d,t=b>a?b:a,x=d-c,w=b-a,k=k?0<x&&0<w?"ne-resize":0>x&&0<w?"nw-resize":0>x&&0>w?"sw-resize":0<x&&0>w?"se-resize":"default":"default",n=n<h?h:n>m?m:n,u=u<l?l:u>q?q:u,x=c===d&&b===a?0:(g>m?m:g<
h?h:g)-n,w=c===d&&b===a?0:(t>q?q:t<l?l:t)-u;p?p.attr({x:n,y:u,width:x,height:w,cursor:k}):f.selectionBox=e.rect(n,u,x,w).attr({"stroke-width":1,stroke:"red",fill:"#00FF00",opacity:.2,cursor:k});f.trackerElem.attr({cursor:k});f.cursor=k;f.selectionDimensions||(f.selectionDimensions={startX:0,endX:0,startY:0,endY:0});f.selectionDimensions.startX=c;f.selectionDimensions.endX=b;f.selectionDimensions.startY=d;f.selectionDimensions.endY=a},getOriginalPositions:function(c,b,d,a){var e=this.viewPortConfig,
f=e.scaleX,k=e.scaleY,l=e.x,e=e.y,m=D(c,d);c=G(c,d);d=D(b,a);b=G(b,a);c=c>this.canvasWidth?this.canvasWidth:c;b=b>this.canvasHeight?this.canvasHeight:b;m=0>m?0:m;d=0>d?0:d;return[l+m/f,e+d/k,(c-m)/f,(b-d)/k]},getValue:function(c){var b=this.viewPortConfig;c=this.getOriginalPositions(c.x,c.y,c.x,c.y);var d=this.xAxis[0],a=this.yAxis[0];return{x:d.min+(c[0]-this.canvasLeft)/(this.canvasWidth*b.scaleX/(d.max-d.min)),y:a.max-(c[1]-this.canvasTop)/(this.canvasHeight*b.scaleY/(a.max-a.min))}},zoomSelection:function(c,
b,d,a){d&&a&&(d=Math.abs(this.canvasWidth/d),a=Math.abs(this.canvasHeight/a),this.updateVisual(c,b,d,a))},updateVisual:function(c,b,d,a,e){var f,k,l,m,h,n=this.viewPortConfig;f=this.canvasWidth;l=this.canvasHeight;var q=f;h=l;var r=n.viewPortHistory;h=r.slice(-1)[0];var u=[],u=n.status;k=this.xAxis[0];m=this.yAxis[0];q=n.maxZoomLimit;n.x=isNaN(c)?c=h.x:c;n.y=isNaN(b)?b=h.y:b;n.scaleX=d||(d=h.scaleX);n.scaleY=a||(a=h.scaleY);d>q&&(n.x=c=D(c,f-f/q),n.scaleX=d=q);a>q&&(n.y=b=D(b,l-l/q),n.scaleY=a=q);
if(e)this.updateManager(e);else for(1<d||1<a?("zoom"===u&&this.toogleDragPan(!0),d>=h.scaleX||a>=h.scaleY?(r.push({scaleX:d,scaleY:a,x:c,y:b}),u=["zoomed","zoomIn"]):(r.pop(),h=r.slice(-1)[0],n.x=h.x,n.y=h.y,n.scaleX=h.scaleX,n.scaleY=h.scaleY,u=["zoomed","zoomOut"])):(1<r.length&&r.pop(),"pan"===u&&this.toogleDragPan(!0),u=["zoomed","zoomOut"]),this.toogleDragPan(),this.spaceManager(),this.resize(),q=this.canvasWidth,h=this.canvasHeight,c&&(c=n.x*=q/f),b&&(n.y*=h/l),this.updateManager(),k.draw(),
m.draw(),f=k.getValue(0),k=k.getValue(q),l=m.getValue(0),m=m.getValue(h),0===arguments.length&&(u=z),h=0;h<u.length;h+=1)"zoomed"===u[h]&&M.raiseEvent("zoomed",{level:r.length,startX:f,startY:l,endX:k,endY:m},this.fusionCharts,[this.fusionCharts.id]),"zoomIn"===u[h]?M.raiseEvent("zoomedIn",{level:r.length,startX:f,startY:l,endX:k,endY:m},this.fusionCharts,[this.fusionCharts.id]):"zoomOut"!==u[h]||n.isReset||M.raiseEvent("zoomedOut",{level:r.length,startX:f,startY:l,endX:k,endY:m},this.fusionCharts,
[this.fusionCharts.id]);this.highlightPoint(!1);n.isReset=!1},zoom:function(c){var b,d,a=this.viewPortConfig;b=a.x;d=a.y;var e=this.canvasWidth,f=this.canvasHeight,k=e/a.scaleX,l=f/a.scaleY,a=k*c;c*=l;a=a>e?e:a;c=c>f?f:c;b=b+k/2-a/2;d=d+l/2-c/2;b=0>b?0:b;d=0>d?0:d;b=b+a>e?e-a:b;d=d+c>f?f-c:d;this.zoomSelection(b,d,a,c)},getSymbolPath:function(c,b,d,a,e,f,k){e=this.datasets[f.__i].plot.config.plotCosmetics||{};var p=f.plot.config.plotCosmetics.fillStyle.match(/\d+/g),p=v.graphics.RGBtoHex(p)||f.color&&
ga("string"===typeof f.color?f.color:f.color.FCcolor.color)||z;f=D(d,a)/1.8;c+=d/2;b+=a/2;a=p.replace(ra,"");d=xa(a,60).replace(ra,Ja);k?a={FCcolor:{color:a,angle:0,ratio:"0",alpha:"100"}}:(k=xa(a,40),a={FCcolor:{color:a+","+a+","+k+","+a+","+a,ratio:"0,30,30,30,10",angle:0,alpha:"100,100,100,100,100"}});a.FCcolor.angle=270;a.FCcolor.ratio="0,100,0";return{path:"M "+c+" "+b+" m -"+f+", 0 a "+f+","+f+" 0 1,0 "+2*f+",0 a "+f+","+f+" 0 1,0 -"+2*f+",0",color:n(e.fillStyle,a),strokeWidth:l(e.lineWidth,
.5),strokeColor:n(e.strokeStyle,d)}},initQuadrant:function(){var c,b,d,a,e,f,k,p,m,h,v,q,r,u;b=this.xAxis[0];h=this.yAxis[0];var g=this.logic.dataObj.chart;d=this.logic.colorManager;u=this.smartLabel;var t=this.logic.hcJSON._FCconf.inCanvasStyle;a=this.viewPortConfig;e=a.imageContainer;f=a.quadrantContainer;k=this.paper;var x=this._quadrantConfig;l(g.drawquadrant,0)&&(f||(a.quadrantContainer=k.group("quadrant",e)),a=b.min,e=b.max,f=h.min,k=h.max,p=l(g.quadrantxval,(a+e)/2),m=l(g.quadrantyval,(f+k)/
2),m>=f&&m<=k&&p>=a&&p<=e&&(d=C(n(g.quadrantlinecolor,g.canvasbordercolor,d.getColor("canvasBorderColor")),n(g.quadrantlinealpha,g.quadrantlinealpha,ha)),h=l(g.quadrantlinethickness,g.canvasborderthickness,1),b=l(g.quadrantlinedashed,g.quadrantlineisdashed,0),v=l(g.quadrantlinedashLen,4),c=l(g.quadrantlinedashgap,2),b=b?O(v,c,h):"none",x||(x=this._quadrantConfig={}),x.xVal=p,x.yVal=m,x.quadrantLineColor=d,x.quadrantLineThickness=h,x.dashStyle=b,v=W(g.quadrantlabeltl,z),b=W(g.quadrantlabeltr,z),d=
W(g.quadrantlabelbl,z),h=W(g.quadrantlabelbr,z),c=x.quadrantLabelPadding=l(g.quadrantlabelpadding,3),q=this.canvasWidth,r=this.canvasHeight,a=q/(e-a)*(p-a),e=q-a,f=r/(k-f)*(m-f),a-=c,e-=c,k=r-f-c,f-=c,u.setStyle(t),0<k&&(v!==z&&0<a&&(m=X(g.quadrantlabeltlbordercolor,g.quadrantlabelbordercolor,z),k=n(g.quadrantlabeltlbgcolor,g.quadrantlabelbgcolor),u=l(g.quadrantlabeltlborderthickness,g.quadrantlabelborderthickness,1),m=m?C(m,l(g.quadrantlabeltlborderalpha,g.quadrantlabelborderalpha,g.quadrantlabeltlalpha,
g.quadrantlabelalpha,100)):z,c=x.tlConfig,c||(c=x.tlConfig={styleObj:{}}),c.label=v,c.styleObj.fontSize=n(l(g.quadrantlabeltlfontsize,g.quadrantlabelfontsize),parseInt(t.fontSize,10))+Z,c.styleObj.lineHeight=t.lineHeight,c.styleObj.fontFamily=n(g.quadrantlabeltlfont,g.quadrantlabelfont,t.fontFamily),c.styleObj.color=C(n(g.quadrantlabeltlfontcolor,g.quadrantlabelfontcolor,t.color),l(g.quadrantlabeltlfontalpha,g.quadrantlabelfontalpha,100)),c.styleObj.fontWeight=l(g.quadrantlabeltlfontbold,g.quadrantlabelfontbold)?
"bold":"normal",c.styleObj.fontStyle=l(g.quadrantlabeltlfontitalic,g.quadrantlabelfontitalic)?"italic":"normal",Y(c.styleObj),v=l(g.quadrantlabeltlborderpadding,g.quadrantlabelborderpadding,2),p=l(g.quadrantlabeltlborderradius,g.quadrantlabelborderradius,0),k=k?C(k,l(g.quadrantlabeltlbgalpha,g.quadrantlabelbgalpha,g.quadrantlabeltlalpha,g.quadrantlabelalpha,100)):z,r=l(g.quadrantlabeltlborderdashed,g.quadrantlabelborderdashed,0)?O(l(g.quadrantlabeltlborderdashlen,g.quadrantlabelborderdashlen,4),l(g.quadrantlabeltlborderdashgap,
g.quadrantlabelborderdashgap,2),u):"none",c["text-bound"]=[k,m,u,v,p,r]),b!==z&&0<e&&(m=X(g.quadrantlabeltrbordercolor,g.quadrantlabelbordercolor,z),k=n(g.quadrantlabeltrbgcolor,g.quadrantlabelbgcolor),u=l(g.quadrantlabeltrborderthickness,g.quadrantlabelborderthickness,1),m=m?C(m,l(g.quadrantlabeltrborderalpha,g.quadrantlabelborderalpha,g.quadrantlabeltralpha,g.quadrantlabelalpha,100)):z,b=x.trConfig,b||(b=x.trConfig={styleObj:{}}),b.label=W(g.quadrantlabeltr,z),b.styleObj.fontSize=n(l(g.quadrantlabeltrfontsize,
g.quadrantlabelfontsize),parseInt(t.fontSize,10))+Z,b.styleObj.lineHeight=t.lineHeight,b.styleObj.fontFamily=n(g.quadrantlabeltrfont,g.quadrantlabelfont,t.fontFamily),b.styleObj.color=C(n(g.quadrantlabeltrfontcolor,g.quadrantlabelfontcolor,t.color),l(g.quadrantlabeltrfontalpha,g.quadrantrabelfontalpha,100)),b.styleObj.fontWeight=l(g.quadrantlabeltrfontbold,g.quadrantlabelfontbold)?"bold":"normal",b.styleObj.fontStyle=l(g.quadrantlabeltrfontitalic,g.quadrantlabelfontitalic)?"italic":"normal",Y(b.styleObj),
v=l(g.quadrantlabeltrborderpadding,g.quadrantlabelborderpadding,2),p=l(g.quadrantlabeltrborderradius,g.quadrantlabelborderradius,0),k=k?C(k,l(g.quadrantlabeltrbgalpha,g.quadrantlabelbgalpha,g.quadrantlabeltralpha,g.quadrantlabelalpha,100)):z,r=l(g.quadrantlabeltrborderdashed,g.quadrantlabelborderdashed,0)?O(l(g.quadrantlabeltrborderdashlen,g.quadrantlabelborderdashlen,4),l(g.quadrantlabeltrborderdashgap,g.quadrantlabelborderdashgap,2),u):"none",b["text-bound"]=[k,m,u,v,p,r])),0<f&&(d!==z&&0<a&&(m=
X(g.quadrantlabelblbordercolor,g.quadrantlabelbordercolor,z),k=n(g.quadrantlabelblbgcolor,g.quadrantlabelbgcolor),u=l(g.quadrantlabelblborderthickness,g.quadrantlabelborderthickness,1),m=m?C(m,l(g.quadrantlabelblborderalpha,g.quadrantlabelborderalpha,g.quadrantlabelblalpha,g.quadrantlabelalpha,100)):z,b=x.blConfig,b||(b=x.blConfig={styleObj:{}}),b.label=d,b.styleObj.fontSize=n(l(g.quadrantlabelblfontsize,g.quadrantlabelfontsize),parseInt(t.fontSize,10))+Z,b.styleObj.lineHeight=t.lineHeight,b.styleObj.fontFamily=
n(g.quadrantlabelblfont,g.quadrantlabelfont,t.fontFamily),b.styleObj.color=C(n(g.quadrantlabelblfontcolor,g.quadrantlabelfontcolor,t.color),l(g.quadrantlabelblfontalpha,g.quadrantlabelfontalpha,100)),b.styleObj.fontWeight=l(g.quadrantlabelblfontbold,g.quadrantlabelfontbold)?"bold":"normal",b.styleObj.fontStyle=l(g.quadrantlabelblfontitalic,g.quadrantlabelfontitalic)?"italic":"normal",Y(b.styleObj),v=l(g.quadrantlabelblborderpadding,g.quadrantlabelborderpadding,2),p=l(g.quadrantlabelblborderradius,
g.quadrantlabelborderradius,0),k=k?C(k,l(g.quadrantlabelblbgalpha,g.quadrantlabelbgalpha,g.quadrantlabelblalpha,g.quadrantlabelalpha,100)):z,r=l(g.quadrantlabelblborderdashed,g.quadrantlabelborderdashed,0)?O(l(g.quadrantlabelblborderdashlen,g.quadrantlabelborderdashlen,4),l(g.quadrantlabelblborderdashgap,g.quadrantlabelborderdashgap,2),u):"none",b["text-bound"]=[k,m,u,v,p,r]),h!==z&&0<e&&(m=X(g.quadrantlabelbrbordercolor,g.quadrantlabelbordercolor,z),k=n(g.quadrantlabelbrbgcolor,g.quadrantlabelbgcolor),
u=l(g.quadrantlabelbrborderthickness,g.quadrantlabelborderthickness,1),m=m?C(m,l(g.quadrantlabelbrborderalpha,g.quadrantlabelborderalpha,g.quadrantlabelbralpha,g.quadrantlabelalpha,100)):z,d=x.brConfig,d||(d=x.brConfig={styleObj:{}}),d.label=W(g.quadrantlabelbr,z),d.styleObj.fontSize=n(l(g.quadrantlabelbrfontsize,g.quadrantlabelfontsize),parseInt(t.fontSize,10))+Z,d.styleObj.lineHeight=t.lineHeight,d.styleObj.fontFamily=n(g.quadrantlabelbrfont,g.quadrantlabelfont,t.fontFamily),d.styleObj.color=C(n(g.quadrantlabelbrfontcolor,
g.quadrantlabelfontcolor,t.color),l(g.quadrantlabelbrfontalpha,g.quadrantrabelfontalpha,100)),d.styleObj.fontWeight=l(g.quadrantlabelbrfontbold,g.quadrantlabelfontbold)?"bold":"normal",d.styleObj.fontStyle=l(g.quadrantlabelbrfontitalic,g.quadrantlabelfontitalic)?"italic":"normal",Y(d.styleObj),k=k?C(k,l(g.quadrantlabelbrbgalpha,g.quadrantlabelbgalpha,g.quadrantlabelbralpha,g.quadrantlabelalpha,100)):z,v=l(g.quadrantlabelbrborderpadding,g.quadrantlabelborderpadding,2),p=l(g.quadrantlabelbrborderradius,
g.quadrantlabelborderradius,0),r=l(g.quadrantlabelbrborderdashed,g.quadrantlabelborderdashed,0)?O(l(g.quadrantlabelbrborderdashlen,g.quadrantlabelborderdashlen,4),l(g.quadrantlabelbrborderdashgap,g.quadrantlabelborderdashgap,2),u):"none",d["text-bound"]=[k,m,u,v,p,r]))))},drawLabels:function(){},drawQuadrant:function(){var c=this._quadrantConfig||(this._quadrantConfig={tlConfig:{},trConfig:{},blConfig:{},brConfig:{},graphics:{}}),b,d=this.smartLabel,a=c.graphics||(c.graphics={}),e=a.tlLabel,f=a.trLabel,
k=a.blLabel,l=a.brLabel,m=this.options.chart.textDirection;b=this.xAxis[0];var h=this.yAxis[0],n=this.paper,q=this.viewPortConfig.quadrantContainer,r=c.tlConfig&&c.tlConfig.label,u=c.trConfig&&c.trConfig.label,g=c.blConfig&&c.blConfig.label,t=c.brConfig&&c.brConfig.label,v=this.canvasLeft,w=this.canvasTop,z=c.quadrantLabelPadding,y=b.getPixel(b.min)-v+z,C=b.getPixel(b.max)-v-z,D=h.getPixel(h.min)-w-z,z=h.getPixel(h.max)-w+z;b=b.getPixel(c.xVal)-v;var H=h.getPixel(c.yVal)-w,h=b-y,w=C-b,v=H-z,E=D-H,
F=a.horizontalQuadLine,G=a.verticalQuadLine;F||(F=a.horizontalQuadLine=n.path(q).attr({stroke:c.quadrantLineColor,"stroke-width":c.quadrantLineThickness}));F.attr({path:"M0 "+H+"L"+this.canvasWidth+" "+H,"stroke-dasharray":c.dashStyle});G||(G=a.verticalQuadLine=n.path(q).attr({stroke:c.quadrantLineColor,"stroke-width":c.quadrantLineThickness}));G.attr({path:"M"+b+" 0L"+b+" "+this.canvasHeight,"stroke-dasharray":c.dashStyle});r&&(e||(e=a.tlLabel=n.text(q).attr({"text-anchor":"start","vertical-align":"top",
direction:m,"text-bound":c.tlConfig["text-bound"]}).css(c.tlConfig.styleObj)),d.setStyle(c.tlConfig.styleObj),b=d.getSmartText(r,h,v),r&&e.attr({x:y,y:z,text:b.text}));u&&(f||(f=a.trLabel=n.text(q).attr({"text-anchor":"end","vertical-align":"top",direction:m,"text-bound":c.trConfig["text-bound"]}).css(c.trConfig.styleObj)),d.setStyle(c.trConfig.styleObj),b=d.getSmartText(u,w,v),u&&f.attr({x:C,y:z,text:b.text}));g&&(k||(k=a.blLabel=n.text(q).attr({"text-anchor":"start","vertical-align":"bottom",direction:m,
"text-bound":c.blConfig["text-bound"]}).css(c.blConfig.styleObj)),d.setStyle(c.blConfig.styleObj),b=d.getSmartText(g,h,E),g&&k.attr({x:y,y:D,text:b.text}));t&&(l||(l=a.brLabel=n.text(q).attr({"text-anchor":"end","vertical-align":"bottom",direction:m,"text-bound":c.brConfig["text-bound"]}).css(c.brConfig.styleObj)),d.setStyle(c.brConfig.styleObj),b=d.getSmartText(t,w,E),t&&l.attr({x:C,y:D,text:b.text}))},dispose:function(){var c,b,d,a;c=this.viewPortConfig;var e=this.datasets,f=e.length||0;c&&(c.imageContainer.remove(),
c.tracker&&c.tracker.remove(),delete this.viewPortConfig);delete this.resetButton;delete this.toogleButton;delete this.zoomOutButton;delete this.zoomInButton;delete this.origCanvasBottom;delete this.origCanvasHeight;delete this.origCanvasLeft;delete this.origCanvasRight;delete this.origCanvasTop;delete this.origCanvasWidth;for(c=0;c<f;c++)if(a=e[c].plot){d=a&&a.axes&&a.axes.components;for(b in d)d.hasOwnProperty(b)&&d[b].dispose();a.dispose&&a.dispose()}this.base.dispose.apply(this)},_bestNeighbour:function(c){var b=
this.xAxis[0],d=this.yAxis[0],a=this.viewPortConfig,e=this.logic.dataObj,f=e&&e.chart,k,l,m,h,v,q,r,u,g,t,x,w,C,y,D;C=this.datasets;l=C.length-1;y=-a.x*a.scaleX;k=-a.y*a.scaleY;var I=b.getPVR();for(w=d.getPVR();0<=l;--l)if(q=C[l].plot,h=q.config.hoverCosmetics.showHoverEffect,x=q.config.tooltip.toolTipVisible,q.components.kDTree&&q.visible&&(r=q.getElement(c),m=this._dist(c,r),!u||m<g))if(v=l,u=r,g=m,t=C[v]&&C[v].plot.config.zoomedRadius||0,g<=t)break;g<=G(t+2,5)?(c=Math.round(y+(u.x-b.min)*I),k=
Math.round(k+(d.max-u.y)*w),w=n(u.tooltext,q.config.plotToolText),q=(t=this.datasets[v])&&t.plot,g=t&&q.config.tooltip.toolTipSepChar,t=t&&q.config.tooltip.seriesNameInToolTip,C=u.x,y=u.y,u&&(D=this.logic.numberFormatter.yAxis(y),C=this.logic.numberFormatter.xAxis(C),D=Number(x)?void 0!==w?Fa(w,[4,5,6,7,8,9,10,11],{yaxisName:d.axisData.axisName,xaxisName:b.axisData.axisName,yDataValue:D,xDataValue:C},u,f,e.dataset[v]):(t?q.name?q.name+g:"":"")+"x:"+C+g+"y:"+D:z),a.lastHoveredPoint!==u&&this.highlightPoint(h,
c,k,u,v,D)):this.highlightPoint(!1)},_dist:function(c,b){var d,a;d=this.xAxis[0];a=this.yAxis[0];if(c&&b)return d=(c.x-b.x)*d.getPVR(),a=(c.y-b.y)*a.getPVR(),Math.sqrt(Math.pow(d,2)+Math.pow(a,2))},searchMouseMove:function(c){var b,d,a,e=c.data,f=e.viewPortConfig,k=e.xAxis[0],l=e.yAxis[0];e.container&&!f.isDragging&&((b=V(c,e))&&b.insideCanvas?(d=e.canvasTop,a=e.canvasLeft,f.lastMouseCoordinate={x:k.getValue(b.chartX-a),y:l.getValue(b.chartY-d)},clearTimeout(f.neighbourSearchTimer),f.lastMouseEvent=
c,f.neighbourSearchTimer=setTimeout(function(){f.isDragging||e._bestNeighbour(f.lastMouseCoordinate)},100)):e.highlightPoint(!1))}},ca["renderer.cartesian"])}]);
