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