UNPKG

fusioncharts

Version:

FusionCharts JavaScript charting framework

2 lines 24 kB
!function(t){"object"==typeof module&&"undefined"!=typeof module.exports?module.exports=t:t()}(function(){(window.webpackJsonpFusionCharts=window.webpackJsonpFusionCharts||[]).push([[9],{1100:function(t,e,o){"use strict";var i=o(181);e.__esModule=!0,e["default"]=void 0;var a=i(o(1101));e.ZoomScatter=a["default"];var n={name:"zoomscatter",type:"package",requiresFusionCharts:!0,extension:function(t){t.addDep(a["default"])}};e["default"]=n},1101:function(t,e,o){"use strict";var i=o(181);e.__esModule=!0,e["default"]=void 0;var a=i(o(1102))["default"];e["default"]=a},1102:function(t,e,o){"use strict";var i=o(181);e.__esModule=!0,e["default"]=void 0;var a=i(o(201)),n=i(o(584)),r=i(o(1103)),s=o(187),l=o(1071),c=o(195),h=o(199),g=(0,c.getDep)("redraphael","plugin");g.addSymbol(l.symbolList);var d=function(t){function e(){var e;return(e=t.call(this)||this).highlightEnabled=!1,e.isXY=!0,e.zoom=!0,e.zoomX=!0,e.zoomY=!0,e.defaultZeroPlaneHighlighted=!1,e}(0,a["default"])(e,t),e.getName=function(){return"ZoomScatter"};var o=e.prototype;return o.getName=function(){return"ZoomScatter"},o.__setDefaultConfig=function(){t.prototype.__setDefaultConfig.call(this);var e=this.config;e.friendlyName="ZoomScatter Chart",e.defaultDatasetType="zoomscatter",e.enablemousetracking=!0,e.animation=0},o.configureAttributes=function(e){var o,i=this.config;t.prototype.configureAttributes.call(this,e),o=this.getFromEnv("dataSource").chart,i.stepZoom=400/(100-(0,s.pluckNumber)(o.stepzoom,25)),i.stepZoom<=2&&(i.stepZoom=1.9),i.showToolBarButtonTooltext=(0,s.pluckNumber)(o.showtoolbarbuttontooltext,1),i.btnResetChartToolText=i.showToolBarButtonTooltext?(0,s.pluck)(o.btnresetcharttooltext,"Reset Chart"):"",i.btnZoomOutToolText=i.showToolBarButtonTooltext?(0,s.pluck)(o.btnzoomouttooltext,"Zoom out to previous level"):"",i.btnZoomInToolText=i.showToolBarButtonTooltext?(0,s.pluck)(o.btnzoomintooltext,"<strong>Zoom in</strong><br/>Or double-click on plot to zoom-in"):"",i.btnSelectZoomToolText=i.showToolBarButtonTooltext?(0,s.pluck)(o.btnselectzoomtooltext,"<strong>Select a region to zoom-in</strong><br/>Click to enable pan mode."):"",i.btnPanToolText=i.showToolBarButtonTooltext?(0,s.pluck)(o.btnpantooltext,"<strong>Drag to move across chart</strong><br/>Click to enable select-zoom mode."):""},e.includeInputOptions=function(){return["DragPan","DragZoomIn","ZoomResetButton","ZoomOutButton","ZoomInButton","DbTapZoom","PinchZoom"]},o.getInputConfigurations=function(){var t=this,e=t.config,o=function(){t.addJob("spaceManage",function(){t._manageInteractiveSpace()},h.priorityList.configure)};return{dragZoomIn:{scaleX:!0,scaleY:!0,boxStyle:{"stroke-width":1,stroke:"red",fill:"#00FF00",opacity:.2,cursor:"ne-resize"},dragendFn:o,tooltext:e.btnSelectZoomToolText,zoomDecimalLimit:2},zoomResetButton:{tooltext:e.btnResetChartToolText,hookFn:o},zoomOutButton:{tooltext:e.btnZoomOutToolText,hookFn:o},zoomInButton:{tooltext:e.btnZoomInToolText,stepzoom:e.stepZoom,zoomDecimalLimit:2,hookFn:o},dragPan:{tooltext:e.btnPanToolText},dbTapZoom:{stepzoom:e.stepZoom,zoomDecimalLimit:2,hookFn:o},pinchZoom:{zoomDecimalLimit:2}}},o._checkInvalidSpecificData=function(){if(!this.getFromEnv("dataSource").dataset)return!0},o.getDatasets=function(){var t=[];return this.iterateComponents(function(e){e.getType&&"dataset"===e.getType()&&t.push(e)}),t},o.getDSdef=function(){return r["default"]},o.getDSGroupdef=function(){},e}(n["default"]);d.prototype._manageInteractiveSpace=s._manageInteractiveSpace;var u=d;e["default"]=u},1103:function(t,e,o){"use strict";var i=o(181);e.__esModule=!0,e["default"]=void 0;var a=i(o(201)),n=i(o(588)),r=i(o(589)),s=o(199),l=o(187),c=i(o(288)),h=window,g=function(){this.hide()},d=Math.PI,u=l.preDefStr.DEFAULT,m=2*d,f=function(t,e){return t*e>=0},p=function(t,e,o,i,a,n,r,s){var l,c,h,g,d,u,m,p,x,v;return v=(l=i-e)*r+(h=t-o)*s+(d=o*e-t*i),0!==(x=l*a+h*n+d)&&0!==v&&f(x,v)?0:(p=(c=s-n)*o+(g=a-r)*i+(u=r*n-a*s),0!==(m=c*t+g*e+u)&&0!==p&&f(m,p)?0:(l*g-c*h,1))},x=function(t,e,o){if(!(isNaN(t.x)||isNaN(t.y)||isNaN(e.x)||isNaN(e.y)))return p(t.x,t.y,e.x,e.y,o.xMinWPad,o.yMaxWPad,o.xMaxWPad,o.yMaxWPad)||p(t.x,t.y,e.x,e.y,o.xMaxWPad,o.yMaxWPad,o.xMaxWPad,o.yMinWPad)||p(t.x,t.y,e.x,e.y,o.xMaxWPad,o.yMinWPad,o.xMinWPad,o.yMinWPad)},v=function(t){var e=(t.config.axisRange.max-t.config.axisRange.min)/(t.getVisibleConfig().maxValue-t.getVisibleConfig().minValue);return e=Math.round(1e3*e)/1e3},y=function(t){return[t-1,t,t+1]},b=function(t,e,o){return t>=e&&t<=o},P=function(t,e,o){return b(t,e,o)||b(t,o,e)},S=function(t,e){var o=e,i=t;return(o=parseFloat(o/100))<0?o=0:o>1&&(o=1),i||(i="#FFFFFF"),l.isIE&&!l.hasSVG?o?i:"transparent":(i=i.replace(/^#?([a-f0-9]+)/gi,"$1"),(i=(0,l.HEXtoRGB)(i))[3]=o.toString(),"rgba("+i.join(",")+")")},T=function(t){var e,o,i=[],a=t.getVisibleConfig(),n=a.maxValue-a.minValue,r=a.minValue+n/2,s=t.config,l=s.axisRange;return e=Math.abs((r-(s.isReverse?l.max:l.min))/n),o=i.focusedGrid=Math.floor(e),i.push(o),e%1>.5?i.push(o+1):e%1<.5&&i.unshift(o-1),i},k=function(t){function e(){return t.apply(this,arguments)||this}(0,a["default"])(e,t);var o=e.prototype;return o.getType=function(){return"dataset"},o.getName=function(){return"zoomScatter"},o.configureAttributes=function(e){t.prototype.configureAttributes.call(this,e);var o,i,a,n,r,s,c,h=this.config,g=this.getFromEnv("chart"),d=g.config,u=g.getFromEnv("dataSource").chart,m=(0,l.pluck)(e.anchorbordercolor,u.anchorbordercolor),f=(0,l.getFirstColor)((0,l.pluck)(m,h.plotBorderColor)),p=(0,l.pluckNumber)(e.anchorborderthickness,u.anchorborderthickness,m?1:0),x=(0,l.getFirstColor)((0,l.pluck)(e.anchorbgcolor,e.color,u.anchorbgcolor,h.plotColor)),v=(0,l.pluck)(e.anchoralpha,e.alpha,u.anchoralpha,l.HUNDREDSTRING),y=(0,l.pluck)(e.anchorbgalpha,e.alpha,u.anchorbgalpha,l.HUNDREDSTRING),b={color:h.lineColor,alpha:h.lineAlpha};h.plotCosmetics={fillStyle:S(x,v*y/100),strokeStyle:S(f,v),borderWidth:p,lineWidth:h.lineThickness,lineStrokeStyle:(0,l.toRaphaelColor)(b)},this.config.JSONData=e,h.anchorBorderThickness=(0,l.pluckNumber)(e.anchorborderthickness,u.anchorborderthickness,m?1:0),h.chunkSize=Math.floor(Math.min((e.data||[]).length/5,5e4)),c=h.staticRadius=(0,l.pluckNumber)(u.staticradius,0),h.radius=(0,l.pluckNumber)(e.radius,e.anchorradius,u.radius,u.anchorradius,c?3:.5),s=h.showHoverEffect,o=(0,l.getFirstColor)((0,l.pluck)(e.plotfillhovercolor,e.hovercolor,u.plotfillhovercolor,u.hovercolor,h.anchorbgcolor)),i=(0,l.pluck)(e.plotfillhoveralpha,e.hoveralpha,u.plotfillhoveralpha,u.hoveralpha,l.HUNDREDSTRING),a=(0,l.getFirstColor)((0,l.pluck)(e.plotfillhovercolor,e.hovercolor,u.plotfillhovercolor,u.hovercolor,o)),r=(0,l.pluck)(e.plotfillhoveralpha,e.hoveralpha,u.plotfillhoveralpha,u.hoveralpha,l.HUNDREDSTRING),n=(0,l.pluckNumber)(e.borderhoverthickness,u.borderhoverthickness,1),h.hoverCosmetics={showHoverEffect:s,fill:S(o,i),borderColor:S(a,r),borderThickness:n},h.tooltip={toolTipVisible:d.showtooltip,seriesNameInToolTip:d.seriesnameintooltip,toolTipSepChar:d.tooltipsepchar},h.lastViewPort={},this.disableScrollBars(),this.setState("dirty",!0)},o.hasDrawingRefChanged=function(){var t,e=this.getFromEnv("xAxis"),o=this.getFromEnv("yAxis"),i=this.config,a=i.axisConfig=i.axisConfig||{},n=v(e),r=this.getFromEnv("chartConfig"),s=v(o);return t=a.xZoomScale!==n||a.yZoomScale!==s||i.prevCanvasHeight!==r.canvasHeight||i.prevCanvasWidth!==r.canvasWidth,a.xZoomScale=n,a.yZoomScale=s,i.prevCanvasHeight=r.canvasHeight,i.prevCanvasWidth=r.canvasWidth,t},o.saveScrollPos=function(){var t=this.getFromEnv("xAxis"),e=this.getFromEnv("yAxis"),o=this.config,i=o.axisConfig=o.axisConfig||{};i.xScrollPos=t.config.apparentScrollPos,i.yScrollPos=e.config.apparentScrollPos},o.disableScrollBars=function(){var t=this.getFromEnv("xAxis"),e=this.getFromEnv("yAxis");t.setScrollType("none"),e.setScrollType("none")},o.calculateZoomedRadius=function(){var t=this.config,e=this.getFromEnv("chart").config,o=t.axisConfig;t.zoomedRadius=Math.min(t.staticRadius?t.radius:t.radius*Math.min(o.xZoomScale,o.yZoomScale),e.canvasWidth/2,e.canvasHeight/2)},o.setupKdTree=function(){var t,e,o,i=this,a=i.components.data,n=a.length,l=[];for(e=0;e<n;++e)o=(t=a[e]).config.setValue,isNaN(o.x)||isNaN(o.y)||(o.index=e,l.push({x:o.x,y:o.y,index:e,data:t,r:1}));i.addJob("kdtree",function(){i.dataTree=(new r["default"]).buildKdTree(l)},s.priorityList.kdTree)},o._getHoveredPlot=function(t,e){var o,i,a,n=this.getFromEnv("xAxis"),r=this.getFromEnv("yAxis");if(i=n.getValue(t+n.getTranslation()),a=r.getValue(e+r.getTranslation()),o=this.dataTree&&this.dataTree.getNeighbour({x:i,y:a,options:this.zoomRadiusOb},!0))return o.data.x=o.x,o.data.y=o.y,{pointIndex:o.index||o.i,hovered:!0,pointObj:o.data}},o._decideTooltipType=function(t,e){var o=this.getFromEnv("toolTipController"),i=this.config.currentToolTip,a=this.components.data[t],n=a&&(a.config.finalTooltext||a.config.toolText),r=e.originalEvent;n&&(i?o.draw(r,n,i):i=this.config.currentToolTip=o.draw(r,n))},o._firePlotEvent=function(t,e,o){var i,a=this.getFromEnv("chart"),n=this.components,r=this.getFromEnv("toolTipController"),s=n.data[e],l=this.getFromEnv("paper").canvas.style;if(s)switch(i=s.config.setLink,t){case"fc-mouseover":this._decideTooltipType(e,o),this.highlightPoint(this.config.showHoverEffect,s),a.plotEventHandler(this.getGraphicalElement("tracker"),o,"dataplotRollover"),i&&(l.cursor="pointer");break;case"fc-mouseout":r.hide(this.config.currentToolTip),i&&(l.cursor=u),this.highlightPoint(!1),a.plotEventHandler(this.getGraphicalElement("tracker"),o,"dataplotRollout");break;case"fc-click":a.plotEventHandler(this.getGraphicalElement("tracker"),o,"dataplotClick");break;case"fc-mousemove":this._decideTooltipType(e,o)}},o.highlightPoint=function(t,e){var o,i=this.getFromEnv("chart").config,a=this.getFromEnv("animationManager"),n=this.getGraphicalElement("tracker"),r=this.getFromEnv("xAxis"),s=this.getFromEnv("yAxis"),l=this&&this.config,c=l&&l.zoomedRadius||0,h=l&&l.hoverCosmetics,d=h&&h.fill,u=h&&h.borderColor,m=h&&h.borderThickness,f={},p=e&&e.link;t&&(f={r:c,fill:d,stroke:u,"stroke-width":m,cx:r.getPixel(e.x),cy:s.getPixel(e.y)}),a.setAnimationState(t?"mouseover":"mouseout"),o=a.setAnimation({el:n||"circle",attr:t&&f,container:this.getContainer("plotGroup"),component:this,doNotRemove:!0,callback:!t&&g}),t&&o.show(),n||this.addGraphicalElement("tracker",o),e&&o.data("eventArgs",{x:e.x,y:e.y,tooltip:e.config.toolText,link:p}),i.lastHoveredPoint=e,f.cursor=p?"pointer":""},o.drawCommonElements=function(){},o.animateCommonElements=function(){},o.remove=function(){t.prototype.remove.call(this),this._deleteGridImages()},o.drawPlots=function(){var t,e,o,i,a,n=this.getFromEnv("animationManager"),r=this.getFromEnv("xAxis"),s=this.getFromEnv("yAxis"),l=this.config,c=this.getContainer("plotGroup"),h=this.getContainer("containerLine"),g=this.getContainer("containerPlot"),d=!1,u=this.config.anchorBorderThickness;this.saveScrollPos(),i=n.setAnimation({el:h||"group",attr:{name:"lineGroup"},container:c,component:this,label:"group"}),a=n.setAnimation({el:g||"group",attr:{name:"plotGroup"},container:c,component:this,label:"group"}),this.getState("visible")?(i.show(),a.show()):(i.hide(),a.hide()),!h&&this.addContainer("containerLine",i),!g&&this.addContainer("containerPlot",a),(this.hasDrawingRefChanged()||this.wasLastDrawPixelated||this.getState("dirty"))&&(this.wasLastDrawPixelated=!1,this.calculateZoomedRadius(),t=v(r),e=v(s),o=l.radius*Math.min(t,e),this.zoomRadiusOb={rx:r.getValue(o+u)-r.getValue(0),ry:s.getValue(0)-s.getValue(o+u)},this._deleteGridImages(),this._graphics._grid={},d=!0),this._gridDraw(d),this.setState("dirty",!1)},o._deleteGridImages=function(){var t,e,o,i,a,n,r,s,l=this.config,c=this._graphics,h=c._imagePool||(c._imagePool=[]),g=c._canvasPool||(c._canvasPool=[]),d=c._lineImagePool||(c._lineImagePool=[]),u=c._lineCanvasPool||(c._lineCanvasPool=[]),m=c._grid||[],f=l._batchDrawTimers;if(f&&f.length)for(;f.length;)this.removeJob(f.shift());for(n in m)if(s=m[n])for(r in s)(a=s[r])&&a.drawState&&((t=a.image).attr({src:"",width:0,height:0}),h.push(t),delete a.image,i=a.canvas,g.push(i),delete a.canvas,delete a.ctx,(e=a.lineImage)&&(e.attr({src:"",width:0,height:0}),d.push(e),delete a.lineImage,o=a.lineCanvas,u.push(o),delete a.lineCanvas,delete a.lineCtx));delete c._grid},o._gridDraw=function(t){var e=this,o=e.config;clearTimeout(o.timer),t?e._gridManager():o.timer=e.addJob("_gridManagerId",function(){e._gridManager()},s.priorityList.label)},o.getAllGrids=function(){var t,e,o,i,a,n,r,s,l,c=this.config,h=this.getFromEnv("chart").config,g=this.getFromEnv("xAxis"),d=this.getFromEnv("yAxis"),u=T(g),m=T(d),f=y(u.focusedGrid),p=y(m.focusedGrid),x=[],b=[],P=0,S=0,k=this._graphics._grid,C={},w=v(g),E=v(d),M=Math.ceil(E),F=Math.ceil(w),_=Math.max(m.focusedGrid-1,0),I=Math.min(m.focusedGrid+1,M-1),N=Math.max(u.focusedGrid-1,0),D=Math.min(u.focusedGrid+1,F-1),A=g.getAxisConfig("axisDimention").axisLength||h.canvasWidth,R=d.getAxisConfig("axisDimention").axisLength||h.canvasHeight,V=g.config,L=d.config,G=V.axisRange.min,W=V.axisRange.max,B=L.axisRange.min,Z=L.axisRange.max,z=c.radius*Math.min(w,E)+c.plotCosmetics.borderWidth,H=Math.abs(z/(A*w/(g.config.axisRange.max-g.config.axisRange.min))),O=Math.abs(z/(R*E/(d.config.axisRange.max-d.config.axisRange.min))),J=d.getPixel(d.config.axisRange.max),U=g.getPixel(g.config.axisRange.min);for(k||(this.config.grids=k={}),P=_;P<=I;++P)for(k[P]=C=k[P]||{},s=J+P*R,i=d.getValue(s),a=d.getValue(s+R),S=N;S<=D;++S)r=S===F-1?z:0,l=U+S*A-(n=0===S?z:0),o=g.getValue(l),e=g.getValue(l+A+n+r),C[S]=t=C[S]||{xPixel:l,width:Math.abs(g.getPixel(e)-l),yPixel:s,height:d.getPixel(a)-s,xLeftValue:o,yTopValue:i,xRightValue:e,yBottomValue:a,drawState:0,xMinWPad:Math.max(Math.min(o,e)-H,G),yMinWPad:Math.max(Math.min(i,a)-O,B),xMaxWPad:Math.min(Math.max(o,e)+H,W),yMaxWPad:Math.min(Math.max(i,a)+O,Z),i:P,j:S},t.drawState||(~u.indexOf(S)&&~m.indexOf(P)?x.push(t):~f.indexOf(S)&&~p.indexOf(P)&&b.push(t));return{focused:x,nearBy:b}},o.allocatePosition=function(){var t,e,o,i,a,n=this.config,r=this.components.data,s=r.length,l=this.getFromEnv("xAxis"),c=this.getFromEnv("yAxis"),h=n.zoomedRadius;for(o=0;o<s;o++)i=(a=r[o].config).setValue,t=l.getPixel(i.x),e=c.getPixel(i.y),a.props={element:{attr:{polypath:[0,t,e,h||a.anchorProps.radius]}},label:{attr:{}}}},o._gridManager=function(){var t,e,o=this;t=o.getAllGrids(),o.config._drawGrid=t.focused,(t.focused.length||t.nearBy.length)&&(o.config._drawGrid=t.focused,e=function(){o.config._drawGrid=t.nearBy,o._drawGridArr()},o._drawGridArr(e))},o._drawGridArr=function(t){var e,o,i,a,n,r,s,l,c,g=this.config,d=g.drawLine,u=g._drawGrid,m=[],f=this.getFromEnv("animationManager"),p=this.getContainer("containerLine"),x=this.getContainer("containerPlot"),y=this.getFromEnv("xAxis"),b=this.getFromEnv("yAxis"),P=v(y),S=v(b),T=this._graphics._imagePool||[],k=this._graphics._canvasPool||[],C=this._graphics._lineImagePool||[],w=this._graphics._lineCanvasPool||[],E=g.plotCosmetics,M=g.radius*Math.min(P,S);if(u.length){for(;u.length;)l=(e=u.shift()).xPixel,c=e.yPixel,r=e.width,s=e.height,2!==e.drawState&&(e.drawState=2,d&&(C.length&&(e.lineImage=C.shift()),e.lineImage=f.setAnimation({el:e.lineImage||"image",attr:{x:l,y:c,width:r,height:s},container:p,component:this,label:"image"}),w.length?e.lineCanvas=i=w.shift():e.lineCanvas=i=h.document.createElement("canvas"),i.setAttribute("width",r),i.setAttribute("height",s),(n=e.lineCtx=i.getContext("2d")).fillStyle=E.fillStyle,n.strokeStyle=E.lineStrokeStyle,n.lineWidth=E.lineWidth),T.length&&(e.image=T.shift()),e.image=f.setAnimation({el:e.image||"image",attr:{x:l,y:c,width:r,height:s},container:x,component:this,label:"image"}),k.length?e.canvas=o=k.shift():e.canvas=o=h.document.createElement("canvas"),o.setAttribute("width",r),o.setAttribute("height",s),a=e.ctx=o.getContext("2d"),M<1?(a.strokeStyle=E.fillStyle,a.lineWidth=.5):(a.fillStyle=E.fillStyle,a.strokeStyle=E.strokeStyle,a.lineWidth=E.borderWidth),m.push(e));g._batchDrawindex=this.config.JSONData.data&&this.config.JSONData.data.length-1||0,this._drawGridArrBatch(m,t,!g.animation.enabled)}else t&&t()},o._drawGridArrBatch=function(t,e,o){var i,a,n,r,c,h,g,d,u,f,p,v,y,b,S,T,k,C,w,E,M,F,_,I,N=this,D=N.config,A=D.drawLine,R=D.plotCosmetics,V=D._batchDrawindex,L=N.components.data,G=V-D.chunkSize,W=N.getFromEnv("xAxis"),B=N.getFromEnv("yAxis"),Z=N.getFromEnv("chart"),z=N.getFromEnv("animationManager"),H=Z.getFromEnv("dataSource"),O=D.JSONData,J=D.zoomedRadius,U=(0,l.pluckNumber)(O.showregressionline,Z.config.showregressionline,0),j=D._store||[],K=R.lineWidth||J<1;for(U&&(E=(0,l.toRaphaelColor)((0,l.pluck)(O.regressionlinecolor,H.chart.regressionlinecolor,D.anchorbordercolor,D.lineColor,"fff000")),M=(0,l.pluckNumber)(O.regressionlinethickness,H.chart.regressionlinethickness,1),F=(0,l.pluckNumber)(O.regressionlinealpha,H.chart.regressionlinealpha,100)/100),d=0;d<t.length;d+=1)t[d].ctx.beginPath(),A&&t[d].lineCtx.beginPath();for(G=G<=0?0:G;V>=G;V-=1)if((v=L[V]&&L[V].config.setValue)&&!isNaN(v.x)&&!isNaN(v.y))for(d=0;d<t.length;d+=1)u=t[d],P(v.x,u.xMinWPad,u.xMaxWPad)&&P(v.y,u.yMinWPad,u.yMaxWPad)?(f=u.ctx,p=u.lineCtx,i=W.getPixel(v.x)-u.xPixel,a=B.getPixel(v.y)-u.yPixel,(g=j[i])||(g=j[i]={}),g[a]||(g[a]=!0,A&&(y=V&&L[V-1].config.setValue,b=V<L.length-1&&L[V+1].config.setValue,!y||isNaN(y.x)||isNaN(y.y)||(_=W.getPixel(y.x)-u.xPixel,I=B.getPixel(y.y)-u.yPixel,p.moveTo(Math.round(_),Math.round(I)),p.lineTo(i,a),P(b.x,u.xMinWPad,u.xMaxWPad)&&P(b.y,u.yMinWPad,u.yMaxWPad)||isNaN(b.x)||isNaN(b.y)||p.lineTo(W.getPixel(b.x)-u.xPixel,B.getPixel(b.y)-u.yPixel))),J<1?(f.moveTo(i,a),f.lineTo(i+1,a)):(f.moveTo(i+J,a),f.arc(i,a,J,0,m)))):A&&V&&x(v,L[V-1].config.setValue,u)&&(y=L[V-1].config.setValue,_=W.getPixel(y.x)-u.xPixel,I=B.getPixel(y.y)-u.yPixel,i=W.getPixel(v.x)-u.xPixel,a=B.getPixel(v.y)-u.yPixel,(p=u.lineCtx).moveTo(Math.round(_),Math.round(I)),p.lineTo(i,a));for(d=0;d<t.length;d+=1)(f=(u=t[d]).ctx).fill(),K&&f.stroke(),f.closePath(),A&&(p=u.lineCtx,K&&p.stroke(),p.closePath());if(D._batchDrawindex=V,V>=0){if(!o)for(d=0;d<t.length;d+=1)k=t[d].image,C=t[d].canvas,z.setAnimation({el:k,attr:{src:C.toDataURL("image/png")},component:N}),D.drawLine&&(S=t[d].lineImage,T=t[d].lineCanvas,z.setAnimation({el:S,src:C.toDataURL("image/png"),component:N}));(D._batchDrawTimers||(D._batchDrawTimers=[])).push(N.addJob("_drawGridArrBatchID",function(){N.getFromEnv("chart")&&N._drawGridArrBatch(t,e,o)},s.priorityList.draw))}else{if(N.setupKdTree(),delete D._store,U)for(w=D.regressionPoints,d=0;d<t.length;d+=1)k=(u=t[d]).image,C=u.canvas,f=u.ctx,w.length&&(n=W.getPixel(w[0].x)-u.xPixel,c=B.getPixel(w[0].y)-u.yPixel,r=W.getPixel(w[1].x)-u.xPixel,h=B.getPixel(w[1].y)-u.yPixel,f.beginPath(),f.strokeStyle=E,f.lineWidth=M,f.globalAlpha=F,f.moveTo(n,c),f.lineTo(r,h),f.stroke(),f.closePath());for(d=0;d<t.length;d+=1)k=(u=t[d]).image,C=u.canvas,u.drawState=1,z.setAnimation({el:k,attr:{src:C.toDataURL("image/png")},component:N}),A&&(S=u.lineImage,T=u.lineCanvas,z.setAnimation({el:S,attr:{src:T.toDataURL("image/png")},component:N}));e&&e()}},o.getRegressionPoints=function(){var t,e,o=this.config.regressionPoints,i=-Infinity,a=Infinity,n=-Infinity,r=Infinity;if(o&&o.length){for(e=o.length,t=0;t<e;t++)i=Math.max(i,o[t].x),a=Math.min(a,o[t].x),n=Math.max(n,o[t].y),r=Math.min(r,o[t].y);return{max:n,min:r,xMax:i,xMin:a}}},o.show=function(){var t=this.getContainer("containerLine"),e=this.getContainer("containerPlot"),o=this.getFromEnv("legend");o&&o.getItem(this.config.legendItemId)&&o.getItem(this.config.legendItemId).removeLegendState("hidden"),this.setState("visible",!0),t.show(),e.show(),this.setState("dirty",!0)},o.setContainerVisibility=function(){},o.draw=function(){var t=this,e=t.config,o=t.getFromEnv("xAxis"),i=o.getPixel(0),a=o.getPixel(1),n=t.getFromEnv("groupMaxWidth"),r=e.drawn,l=(t.getSkippingInfo&&t.getSkippingInfo()||{}).skippingApplied;n||(n=Math.abs(a-i),t.addToEnv("groupMaxWidth",n)),!r&&t.createContainer(),t.setContainerVisibility(!0),l&&t.hidePlots(),t.drawPlots(),t.drawCommonElements&&!t.config.skipCommonElements&&t.drawCommonElements(),e.drawn?t.drawLabel(void 0,void 0):t.addJob("labelDrawID",function(){t.drawLabel(void 0,void 0)},s.priorityList.label),e.drawn=!0,t.removePlots()},o.hide=function(){var t=this.getContainer("containerLine"),e=this.getContainer("containerPlot"),o=this.getFromEnv("legend");o&&o.getItem(this.config.legendItemId)&&o.getItem(this.config.legendItemId).setLegendState("hidden"),t.hide(),e.hide(),this.setState("dirty",!0),this.setState("visible",!1)},o._addLegend=function(){var t,e,o=this.getFromEnv("chart"),i=o.getFromEnv("dataSource").chart,a=o.getFromEnv("legend"),n=this.config,r=this.config.JSONData,s=(0,l.pluck)(r.anchorbordercolor,i.anchorbordercolor),c=(0,l.getFirstColor)((0,l.pluck)(s,n.plotBorderColor)),h=(0,l.getFirstColor)((0,l.pluck)(r.anchorbgcolor,r.color,i.anchorbgcolor,n.plotColor)),g=(0,l.pluck)(r.anchoralpha,r.alpha,i.anchoralpha,l.HUNDREDSTRING),d=(0,l.pluck)(r.anchorbgalpha,r.alpha,i.anchorbgalpha,l.HUNDREDSTRING),u=S(h,g*d/100),m=S(c,g);e={enabled:n.includeInLegend,type:this.type,anchorSide:2,label:(0,l.getFirstValue)(this.config.JSONData.seriesname)},n.includeinlegend?((t=a.getItem(this.config.legendItemId))?t.configure({style:a.config.itemStyle,hiddenStyle:a.config.itemHiddenStyle,datasetVisible:a.config.datasetVisible,hoverStyle:a.config.itemHoverStyle}):(this.config.legendItemId=a.createItem(this),t=a.getItem(this.config.legendItemId),this.addExtEventListener("fc-click",function(){t.itemClickFn()},t)),t.configure(e),t.setStateCosmetics("default",{symbol:{fill:u,stroke:m,rawFillColor:h,rawStrokeColor:n.anchorbordercolor,"stroke-width":n.anchorBorderThickness}}),this.getState("visible")?t.removeLegendState("hidden"):t.setLegendState("hidden")):this.config.legendItemId&&a.disposeItem(this.config.legendItemId)},o._setConfigure=function(){var t,e,o,i,a,n,r,s,h,g,d,u,m=-Infinity,f=+Infinity,p=m,x=f,v=f,y=m,b=this.components.data||(this.components.data=[]),P=this.getFromEnv("chart"),S=this.config,T=this.config.JSONData,k=P.getFromEnv("dataSource").chart,C=T.data||[],w=C.length,E=this.getFromEnv("number-formatter"),M=(0,l.parseUnsafeString)(k.yaxisname),F=(0,l.parseUnsafeString)(k.xaxisname),_=S.lineDashed,I=S.lineDashStyle,N=(0,l.pluckNumber)(T.showregressionline,P.config.showregressionline,0),D=(0,l.pluckNumber)(T.showyonx,k.showyonx,1),A=S.parentYAxis,R=S.toolTipSepChar,V=S.seriesname;for(t=0;t<w;t+=1)i=C[t],(e=(o=b[t]||(b[t]={})).config||(o.config={})).setValue=a={x:E.getCleanValue(i.x),y:E.getCleanValue(i.y),index:t},y<a.x&&(y=a.x,S.rightMostData=o),v>a.x&&(v=a.x,S.leftMostData=o),p=Math.max(p,a.y),x=Math.min(x,a.y),S.showRegressionLine&&this.pointValueWatcher(a.x,a.y,S.regressionObj),e.setLink=(0,l.pluck)(i.link),e.anchorProps=this._parseAnchorProperties(t),e.showValue=(0,l.pluckNumber)(i.showvalue,S.showValues),e.dashed=(0,l.pluckNumber)(i.dashed,_),e.color=(0,l.pluck)(i.color,S.lineColor),e.alpha=(0,l.pluck)(i.alpha,S.lineAlpha),e.dashStyle=e.dashed?I:"none",e.toolTipValue=r=E.dataLabels(a.y,A),e.setDisplayValue=u=(0,l.parseUnsafeString)(i.displayvalue),g=e.formatedVal=(0,l.pluck)(i.toolTipValue,E.dataLabels(a.y,A)),d=E.xAxis(a.x),e.displayValue=(0,l.pluck)(u,r),e.setTooltext=(0,l.getValidValue)((0,l.parseUnsafeString)((0,l.pluck)(i.tooltext,S.plotToolText))),S.showTooltip?void 0!==e.setTooltext?(s=[4,5,6,7,8,9,10,11],h={yaxisName:M,xaxisName:F,yDataValue:g,xDataValue:d},n=(0,l.parseTooltext)(e.setTooltext,s,h,i,k,T)):null===g?n=!1:(n=V?V+R:l.BLANKSTRING,n+=a.x?d+R:l.BLANKSTRING,n+=r):n=!1,e.toolText=n,o?o.graphics||(b[t].graphics={}):o=b[t]={graphics:{}},e.hoverEffects=this._parseHoverEffectOptions(o),e.anchorProps.isAnchorHoverRadius=e.hoverEffects.anchorRadius;S.xMax=y,S.xMin=v,S.yMin=x,S.yMax=p,S.regressionPoints=N?(0,c["default"])(T.data.slice(),D)[1]:[],this.ErrorValueConfigure&&this.ErrorValueConfigure()},e}(n["default"]);e["default"]=k}}])}); //# sourceMappingURL=http://localhost:3052/3.14.0/map/eval/fusioncharts.zoomscatter.js.map