Current Path : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/main/amcharts/3.21/ |
Current File : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/main/amcharts/3.21/xy.min.js |
(function(){var t=window.AmCharts;t.AmRectangularChart=t.Class({inherits:t.AmCoordinateChart,construct:function(i){t.AmRectangularChart.base.construct.call(this,i);this.theme=i;this.createEvents("zoomed","changed");this.marginRight=this.marginBottom=this.marginTop=this.marginLeft=20;this.depth3D=this.angle=0;this.plotAreaFillColors="#FFFFFF";this.plotAreaFillAlphas=0;this.plotAreaBorderColor="#000000";this.plotAreaBorderAlpha=0;this.maxZoomFactor=20;this.zoomOutButtonImageSize=19;this.zoomOutButtonImage="lens";this.zoomOutText="Show all";this.zoomOutButtonColor="#e5e5e5";this.zoomOutButtonAlpha=0;this.zoomOutButtonRollOverAlpha=1;this.zoomOutButtonPadding=8;this.trendLines=[];this.autoMargins=!0;this.marginsUpdated=!1;this.autoMarginOffset=10;t.applyTheme(this,i,"AmRectangularChart")},initChart:function(){t.AmRectangularChart.base.initChart.call(this);this.updateDxy();!this.marginsUpdated&&this.autoMargins&&(this.resetMargins(),this.drawGraphs=!1);this.processScrollbars();this.updateMargins();this.updatePlotArea();this.updateScrollbars();this.updateTrendLines();this.updateChartCursor();this.updateValueAxes();this.scrollbarOnly||this.updateGraphs()},drawChart:function(){t.AmRectangularChart.base.drawChart.call(this);this.drawPlotArea();if(t.ifArray(this.chartData)){var i=this.chartCursor;i&&i.draw()}},resetMargins:function(){var t={},i;if("xy"==this.type){var a=this.xAxes,e=this.yAxes;for(i=0;i<a.length;i++){var s=a[i];s.ignoreAxisWidth||(s.setOrientation(!0),s.fixAxisPosition(),t[s.position]=!0)}for(i=0;i<e.length;i++)a=e[i],a.ignoreAxisWidth||(a.setOrientation(!1),a.fixAxisPosition(),t[a.position]=!0)}else{e=this.valueAxes;for(i=0;i<e.length;i++)a=e[i],a.ignoreAxisWidth||(a.setOrientation(this.rotate),a.fixAxisPosition(),t[a.position]=!0);(i=this.categoryAxis)&&!i.ignoreAxisWidth&&(i.setOrientation(!this.rotate),i.fixAxisPosition(),i.fixAxisPosition(),t[i.position]=!0)}t.left&&(this.marginLeft=0);t.right&&(this.marginRight=0);t.top&&(this.marginTop=0);t.bottom&&(this.marginBottom=0);this.fixMargins=t},measureMargins:function(){var t=this.valueAxes,i,a=this.autoMarginOffset,e=this.fixMargins,s=this.realWidth,r=this.realHeight,o=a,h=a,l=s;i=r;var n;for(n=0;n<t.length;n++)t[n].handleSynchronization(),i=this.getAxisBounds(t[n],o,l,h,i),o=Math.round(i.l),l=Math.round(i.r),h=Math.round(i.t),i=Math.round(i.b);if(t=this.categoryAxis)i=this.getAxisBounds(t,o,l,h,i),o=Math.round(i.l),l=Math.round(i.r),h=Math.round(i.t),i=Math.round(i.b);e.left&&o<a&&(this.marginLeft=Math.round(-o+a),!isNaN(this.minMarginLeft)&&this.marginLeft<this.minMarginLeft&&(this.marginLeft=this.minMarginLeft));e.right&&l>=s-a&&(this.marginRight=Math.round(l-s+a),!isNaN(this.minMarginRight)&&this.marginRight<this.minMarginRight&&(this.marginRight=this.minMarginRight));e.top&&h<a+this.titleHeight&&(this.marginTop=Math.round(this.marginTop-h+a+this.titleHeight),!isNaN(this.minMarginTop)&&this.marginTop<this.minMarginTop&&(this.marginTop=this.minMarginTop));e.bottom&&i>r-a&&(this.marginBottom=Math.round(this.marginBottom+i-r+a),!isNaN(this.minMarginBottom)&&this.marginBottom<this.minMarginBottom&&(this.marginBottom=this.minMarginBottom));this.initChart()},getAxisBounds:function(t,i,a,e,s){if(!t.ignoreAxisWidth){var r=t.labelsSet,o=t.tickLength;t.inside&&(o=0);if(r)switch(r=t.getBBox(),t.position){case"top":t=r.y;e>t&&(e=t);break;case"bottom":t=r.y+r.height;s<t&&(s=t);break;case"right":t=r.x+r.width+o+3;a<t&&(a=t);break;case"left":t=r.x-o,i>t&&(i=t)}}return{l:i,t:e,r:a,b:s}},drawZoomOutButton:function(){var i=this;if(!i.zbSet){var a=i.container.set();i.zoomButtonSet.push(a);var e=i.color,s=i.fontSize,r=i.zoomOutButtonImageSize,o=i.zoomOutButtonImage.replace(/\.[a-z]*$/i,""),h=i.langObj.zoomOutText||i.zoomOutText,l=i.zoomOutButtonColor,n=i.zoomOutButtonAlpha,u=i.zoomOutButtonFontSize,d=i.zoomOutButtonPadding;isNaN(u)||(s=u);(u=i.zoomOutButtonFontColor)&&(e=u);var u=i.zoomOutButton,c;u&&(u.fontSize&&(s=u.fontSize),u.color&&(e=u.color),u.backgroundColor&&(l=u.backgroundColor),isNaN(u.backgroundAlpha)||(i.zoomOutButtonRollOverAlpha=u.backgroundAlpha));var m=u=0,m=i.pathToImages;if(o){if(t.isAbsolute(o)||void 0===m)m="";c=i.container.image(m+o+i.extension,0,0,r,r);t.setCN(i,c,"zoom-out-image");a.push(c);c=c.getBBox();u=c.width+5}void 0!==h&&(e=t.text(i.container,h,e,i.fontFamily,s,"start"),t.setCN(i,e,"zoom-out-label"),s=e.getBBox(),m=c?c.height/2-3:s.height/2,e.translate(u,m),a.push(e));c=a.getBBox();e=1;t.isModern||(e=0);l=t.rect(i.container,c.width+2*d+5,c.height+2*d-2,l,1,1,l,e);l.setAttr("opacity",n);l.translate(-d,-d);t.setCN(i,l,"zoom-out-bg");a.push(l);l.toBack();i.zbBG=l;c=l.getBBox();a.translate(i.marginLeftReal+i.plotAreaWidth-c.width+d,i.marginTopReal+d);a.hide();a.mouseover(function(){i.rollOverZB()}).mouseout(function(){i.rollOutZB()}).click(function(){i.clickZB()}).touchstart(function(){i.rollOverZB()}).touchend(function(){i.rollOutZB();i.clickZB()});for(n=0;n<a.length;n++)a[n].attr({cursor:"pointer"});void 0!==i.zoomOutButtonTabIndex&&(a.setAttr("tabindex",i.zoomOutButtonTabIndex),a.setAttr("role","menuitem"),a.keyup(function(t){13==t.keyCode&&i.clickZB()}));i.zbSet=a}},rollOverZB:function(){this.rolledOverZB=!0;this.zbBG.setAttr("opacity",this.zoomOutButtonRollOverAlpha)},rollOutZB:function(){this.rolledOverZB=!1;this.zbBG.setAttr("opacity",this.zoomOutButtonAlpha)},clickZB:function(){this.rolledOverZB=!1;this.zoomOut()},zoomOut:function(){this.zoomOutValueAxes()},drawPlotArea:function(){var i=this.dx,a=this.dy,e=this.marginLeftReal,s=this.marginTopReal,r=this.plotAreaWidth-1,o=this.plotAreaHeight-1,h=this.plotAreaFillColors,l=this.plotAreaFillAlphas,n=this.plotAreaBorderColor,u=this.plotAreaBorderAlpha;"object"==typeof l&&(l=l[0]);h=t.polygon(this.container,[0,r,r,0,0],[0,0,o,o,0],h,l,1,n,u,this.plotAreaGradientAngle);t.setCN(this,h,"plot-area");h.translate(e+i,s+a);this.set.push(h);0!==i&&0!==a&&(h=this.plotAreaFillColors,"object"==typeof h&&(h=h[0]),h=t.adjustLuminosity(h,-.15),r=t.polygon(this.container,[0,i,r+i,r,0],[0,a,a,0,0],h,l,1,n,u),t.setCN(this,r,"plot-area-bottom"),r.translate(e,s+o),this.set.push(r),i=t.polygon(this.container,[0,0,i,i,0],[0,o,o+a,a,0],h,l,1,n,u),t.setCN(this,i,"plot-area-left"),i.translate(e,s),this.set.push(i));(e=this.bbset)&&this.scrollbarOnly&&e.remove()},updatePlotArea:function(){var t=this.updateWidth(),i=this.updateHeight(),a=this.container;this.realWidth=t;this.realWidth=i;a&&this.container.setSize(t,i);var a=this.marginLeftReal,e=this.marginTopReal,t=t-a-this.marginRightReal-this.dx,i=i-e-this.marginBottomReal;1>t&&(t=1);1>i&&(i=1);this.plotAreaWidth=Math.round(t);this.plotAreaHeight=Math.round(i);this.plotBalloonsSet.translate(a,e)},updateDxy:function(){this.dx=Math.round(this.depth3D*Math.cos(this.angle*Math.PI/180));this.dy=Math.round(-this.depth3D*Math.sin(this.angle*Math.PI/180));this.d3x=Math.round(this.columnSpacing3D*Math.cos(this.angle*Math.PI/180));this.d3y=Math.round(-this.columnSpacing3D*Math.sin(this.angle*Math.PI/180))},updateMargins:function(){var t=this.getTitleHeight();this.titleHeight=t;this.marginTopReal=this.marginTop-this.dy;this.fixMargins&&!this.fixMargins.top&&(this.marginTopReal+=t);this.marginBottomReal=this.marginBottom;this.marginLeftReal=this.marginLeft;this.marginRightReal=this.marginRight},updateValueAxes:function(){var t=this.valueAxes,i;for(i=0;i<t.length;i++){var a=t[i];this.setAxisRenderers(a);this.updateObjectSize(a)}},setAxisRenderers:function(i){i.axisRenderer=t.RecAxis;i.guideFillRenderer=t.RecFill;i.axisItemRenderer=t.RecItem;i.marginsChanged=!0},updateGraphs:function(){var t=this.graphs,i;for(i=0;i<t.length;i++){var a=t[i];a.index=i;a.rotate=this.rotate;this.updateObjectSize(a)}},updateObjectSize:function(t){t.width=this.plotAreaWidth-1;t.height=this.plotAreaHeight-1;t.x=this.marginLeftReal;t.y=this.marginTopReal;t.dx=this.dx;t.dy=this.dy},updateChartCursor:function(){var i=this.chartCursor;i&&(i=t.processObject(i,t.ChartCursor,this.theme),this.updateObjectSize(i),this.addChartCursor(i),i.chart=this)},processScrollbars:function(){var i=this.chartScrollbar;i&&(i=t.processObject(i,t.ChartScrollbar,this.theme),this.addChartScrollbar(i))},updateScrollbars:function(){},removeChartCursor:function(){t.callMethod("destroy",[this.chartCursor]);this.chartCursor=null},zoomTrendLines:function(){var t=this.trendLines,i;for(i=0;i<t.length;i++){var a=t[i];a.valueAxis.recalculateToPercents?a.set&&a.set.hide():(a.x=this.marginLeftReal,a.y=this.marginTopReal,a.draw())}},handleCursorValueZoom:function(){},addTrendLine:function(t){this.trendLines.push(t)},zoomOutValueAxes:function(){for(var t=this.valueAxes,i=0;i<t.length;i++)t[i].zoomOut()},removeTrendLine:function(t){var i=this.trendLines,a;for(a=i.length-1;0<=a;a--)i[a]==t&&i.splice(a,1)},adjustMargins:function(t,i){var a=t.position,e=t.scrollbarHeight+t.offset;t.enabled&&("top"==a?i?this.marginLeftReal+=e:this.marginTopReal+=e:i?this.marginRightReal+=e:this.marginBottomReal+=e)},getScrollbarPosition:function(t,i,a){var e="bottom",s="top";t.oppositeAxis||(s=e,e="top");t.position=i?"bottom"==a||"left"==a?e:s:"top"==a||"right"==a?e:s},updateChartScrollbar:function(t,i){if(t){t.rotate=i;var a=this.marginTopReal,e=this.marginLeftReal,s=t.scrollbarHeight,r=this.dx,o=this.dy,h=t.offset;"top"==t.position?i?(t.y=a,t.x=e-s-h):(t.y=a-s+o-h,t.x=e+r):i?(t.y=a+o,t.x=e+this.plotAreaWidth+r+h):(t.y=a+this.plotAreaHeight+h,t.x=this.marginLeftReal)}},showZB:function(t){var i=this.zbSet;t&&(i=this.zoomOutText,""!==i&&i&&this.drawZoomOutButton());if(i=this.zbSet)this.zoomButtonSet.push(i),t?i.show():i.hide(),this.rollOutZB()},handleReleaseOutside:function(i){t.AmRectangularChart.base.handleReleaseOutside.call(this,i);(i=this.chartCursor)&&i.handleReleaseOutside&&i.handleReleaseOutside()},handleMouseDown:function(i){t.AmRectangularChart.base.handleMouseDown.call(this,i);var a=this.chartCursor;a&&a.handleMouseDown&&!this.rolledOverZB&&a.handleMouseDown(i)},update:function(){t.AmRectangularChart.base.update.call(this);this.chartCursor&&this.chartCursor.update&&this.chartCursor.update()},handleScrollbarValueZoom:function(t){this.relativeZoomValueAxes(t.target.valueAxes,t.relativeStart,t.relativeEnd);this.zoomAxesAndGraphs()},zoomValueScrollbar:function(t){if(t&&t.enabled){var i=t.valueAxes[0],a=i.relativeStart,e=i.relativeEnd;i.reversed&&(e=1-a,a=1-i.relativeEnd);t.percentZoom(a,e)}},zoomAxesAndGraphs:function(){if(!this.scrollbarOnly){var t=this.valueAxes,i;for(i=0;i<t.length;i++)t[i].zoom(this.start,this.end);t=this.graphs;for(i=0;i<t.length;i++)t[i].zoom(this.start,this.end);(i=this.chartCursor)&&i.clearSelection();this.zoomTrendLines()}},handleValueAxisZoomReal:function(t,i){var a=t.relativeStart,e=t.relativeEnd;if(a>e)var s=a,a=e,e=s;this.relativeZoomValueAxes(i,a,e);this.updateAfterValueZoom()},updateAfterValueZoom:function(){this.zoomAxesAndGraphs();this.zoomScrollbar()},relativeZoomValueAxes:function(i,a,e){this.hideBalloonReal();a=t.fitToBounds(a,0,1);e=t.fitToBounds(e,0,1);if(a>e){var s=a;a=e;e=s}var s=1/this.maxZoomFactor,r=t.getDecimals(s)+4;e-a<s&&(e=a+(e-a)/2,a=e-s/2,e+=s/2,1<e&&(a-=e-1,e=1),0>a&&(a=0,e=s));a=t.roundTo(a,r);e=t.roundTo(e,r);s=!1;if(i){for(r=0;r<i.length;r++){var o=i[r].zoomToRelativeValues(a,e,!0);o&&(s=o)}this.showZB()}return s},addChartCursor:function(i){t.callMethod("destroy",[this.chartCursor]);i&&(this.listenTo(i,"moved",this.handleCursorMove),this.listenTo(i,"zoomed",this.handleCursorZoom),this.listenTo(i,"zoomStarted",this.handleCursorZoomStarted),this.listenTo(i,"panning",this.handleCursorPanning),this.listenTo(i,"onHideCursor",this.handleCursorHide));this.chartCursor=i},handleCursorChange:function(){},handleCursorMove:function(t){var i,a=this.valueAxes;for(i=0;i<a.length;i++)if(!t.panning){var e=a[i];e&&e.showBalloon&&e.showBalloon(t.x,t.y)}},handleCursorZoom:function(t){if(this.skipZoomed)this.skipZoomed=!1;else{var i=this.startX0,a=this.endX0,e=this.endY0,s=this.startY0,r=t.startX,o=t.endX,h=t.startY,l=t.endY;this.startX0=this.endX0=this.startY0=this.endY0=NaN;this.handleCursorZoomReal(i+r*(a-i),i+o*(a-i),s+h*(e-s),s+l*(e-s),t)}},handleCursorHide:function(){var t,i=this.valueAxes;for(t=0;t<i.length;t++)i[t].hideBalloon();i=this.graphs;for(t=0;t<i.length;t++)i[t].hideBalloonReal()}})})();(function(){var t=window.AmCharts;t.AmXYChart=t.Class({inherits:t.AmRectangularChart,construct:function(i){this.type="xy";t.AmXYChart.base.construct.call(this,i);this.cname="AmXYChart";this.theme=i;this.createEvents("zoomed");t.applyTheme(this,i,this.cname)},initChart:function(){t.AmXYChart.base.initChart.call(this);this.dataChanged&&this.updateData();this.drawChart();!this.marginsUpdated&&this.autoMargins&&(this.marginsUpdated=!0,this.measureMargins());var i=this.marginLeftReal,a=this.marginTopReal,e=this.plotAreaWidth,s=this.plotAreaHeight;this.graphsSet.clipRect(i,a,e,s);this.bulletSet.clipRect(i,a,e,s);this.trendLinesSet.clipRect(i,a,e,s);this.drawGraphs=!0;this.showZB()},prepareForExport:function(){var t=this.bulletSet;t.clipPath&&this.container.remove(t.clipPath)},createValueAxes:function(){var i=[],a=[];this.xAxes=i;this.yAxes=a;var e=this.valueAxes,s,r;for(r=0;r<e.length;r++){s=e[r];var o=s.position;if("top"==o||"bottom"==o)s.rotate=!0;s.setOrientation(s.rotate);o=s.orientation;"V"==o&&a.push(s);"H"==o&&i.push(s)}0===a.length&&(s=new t.ValueAxis(this.theme),s.rotate=!1,s.setOrientation(!1),e.push(s),a.push(s));0===i.length&&(s=new t.ValueAxis(this.theme),s.rotate=!0,s.setOrientation(!0),e.push(s),i.push(s));for(r=0;r<e.length;r++)this.processValueAxis(e[r],r);i=this.graphs;for(r=0;r<i.length;r++)this.processGraph(i[r],r)},drawChart:function(){t.AmXYChart.base.drawChart.call(this);var i=this.chartData;this.legend&&(this.legend.valueText=void 0);if(0<this.realWidth&&0<this.realHeight){t.ifArray(i)?(this.chartScrollbar&&this.updateScrollbars(),this.zoomChart()):this.cleanChart();if(i=this.scrollbarH)this.hideXScrollbar?(i&&i.destroy(),this.scrollbarH=null):i.draw();if(i=this.scrollbarV)this.hideYScrollbar?(i.destroy(),this.scrollbarV=null):i.draw();this.zoomScrollbar()}this.autoMargins&&!this.marginsUpdated||this.dispDUpd()},cleanChart:function(){t.callMethod("destroy",[this.valueAxes,this.graphs,this.scrollbarV,this.scrollbarH,this.chartCursor])},zoomChart:function(){this.zoomObjects(this.valueAxes);this.zoomObjects(this.graphs);this.zoomTrendLines();this.prevPlotAreaWidth=this.plotAreaWidth;this.prevPlotAreaHeight=this.plotAreaHeight},validateData:function(){if(this.zoomOutOnDataUpdate)for(var i=this.valueAxes,a=0;a<i.length;a++)i[a].minZoom=NaN,i[a].maxZoom=NaN;t.AmXYChart.base.validateData.call(this)},zoomObjects:function(t){var i=t.length,a,e;for(a=0;a<i;a++)e=t[a],e.zoom(0,this.chartData.length-1)},updateData:function(){this.parseData();var t=this.chartData,i=t.length-1,a=this.graphs,e=this.dataProvider,s=-Infinity,r=Infinity,o,h;if(e){for(o=0;o<a.length;o++)if(h=a[o],h.data=t,h.zoom(0,i),h=h.valueField){var l;for(l=0;l<e.length;l++){var n=Number(e[l][h]);null!==n&&(n>s&&(s=n),n<r&&(r=n))}}isNaN(this.minValue)||(r=this.minValue);isNaN(this.maxValue)||(s=this.maxValue);for(o=0;o<a.length;o++)h=a[o],h.maxValue=s,h.minValue=r;if(t=this.chartCursor)t.type="crosshair",t.valueBalloonsEnabled=!1;this.dataChanged=!1;this.dispatchDataUpdated=!0}},processValueAxis:function(t){t.chart=this;t.minMaxField="H"==t.orientation?"x":"y";t.min=NaN;t.max=NaN},processGraph:function(i){t.isString(i.xAxis)&&(i.xAxis=this.getValueAxisById(i.xAxis));t.isString(i.yAxis)&&(i.yAxis=this.getValueAxisById(i.yAxis));i.xAxis||(i.xAxis=this.xAxes[0]);i.yAxis||(i.yAxis=this.yAxes[0]);i.valueAxis=i.yAxis},parseData:function(){t.AmXYChart.base.parseData.call(this);this.chartData=[];var i=this.dataProvider,a=this.valueAxes,e=this.graphs,s;if(i)for(s=0;s<i.length;s++){var r={axes:{},x:{},y:{}},o=this.dataDateFormat,h=i[s],l;for(l=0;l<a.length;l++){var n=a[l].id;r.axes[n]={};r.axes[n].graphs={};var u;for(u=0;u<e.length;u++){var d=e[u],c=d.id;if(d.xAxis.id==n||d.yAxis.id==n){var m={};m.serialDataItem=r;m.index=s;var g={},p=h[d.valueField];null!==p&&(p=Number(p),isNaN(p)||(g.value=p));p=h[d.xField];null!==p&&("date"==d.xAxis.type&&(p=t.getDate(h[d.xField],o).getTime()),p=Number(p),isNaN(p)||(g.x=p));p=h[d.yField];null!==p&&("date"==d.yAxis.type&&(p=t.getDate(h[d.yField],o).getTime()),p=Number(p),isNaN(p)||(g.y=p));p=h[d.errorField];null!==p&&(p=Number(p),isNaN(p)||(g.error=p));m.values=g;this.processFields(d,m,h);m.serialDataItem=r;m.graph=d;r.axes[n].graphs[c]=m}}}this.chartData[s]=r}this.start=0;this.end=this.chartData.length-1},formatString:function(i,a,e){var s=a.graph,r=s.numberFormatter;r||(r=this.nf);var o,h;"date"==a.graph.xAxis.type&&(o=t.formatDate(new Date(a.values.x),s.dateFormat,this),h=RegExp("\\[\\[x\\]\\]","g"),i=i.replace(h,o));"date"==a.graph.yAxis.type&&(o=t.formatDate(new Date(a.values.y),s.dateFormat,this),h=RegExp("\\[\\[y\\]\\]","g"),i=i.replace(h,o));i=t.formatValue(i,a.values,["value","x","y"],r);-1!=i.indexOf("[[")&&(i=t.formatDataContextValue(i,a.dataContext));return i=t.AmXYChart.base.formatString.call(this,i,a,e)},addChartScrollbar:function(i){t.callMethod("destroy",[this.chartScrollbar,this.scrollbarH,this.scrollbarV]);if(i){this.chartScrollbar=i;this.scrollbarHeight=i.scrollbarHeight;var a="backgroundColor backgroundAlpha selectedBackgroundColor selectedBackgroundAlpha scrollDuration resizeEnabled hideResizeGrips scrollbarHeight updateOnReleaseOnly".split(" ");if(!this.hideYScrollbar){var e=new t.ChartScrollbar(this.theme);e.skipEvent=!0;e.chart=this;this.listenTo(e,"zoomed",this.handleScrollbarValueZoom);t.copyProperties(i,e,a);e.rotate=!0;this.scrollbarV=e}this.hideXScrollbar||(e=new t.ChartScrollbar(this.theme),e.skipEvent=!0,e.chart=this,this.listenTo(e,"zoomed",this.handleScrollbarValueZoom),t.copyProperties(i,e,a),e.rotate=!1,this.scrollbarH=e)}},updateTrendLines:function(){var i=this.trendLines,a;for(a=0;a<i.length;a++){var e=i[a],e=t.processObject(e,t.TrendLine,this.theme);i[a]=e;e.chart=this;var s=e.valueAxis;t.isString(s)&&(e.valueAxis=this.getValueAxisById(s));s=e.valueAxisX;t.isString(s)&&(e.valueAxisX=this.getValueAxisById(s));e.id||(e.id="trendLineAuto"+a+"_"+(new Date).getTime());e.valueAxis||(e.valueAxis=this.yAxes[0]);e.valueAxisX||(e.valueAxisX=this.xAxes[0])}},updateMargins:function(){t.AmXYChart.base.updateMargins.call(this);var i=this.scrollbarV;i&&(this.getScrollbarPosition(i,!0,this.yAxes[0].position),this.adjustMargins(i,!0));if(i=this.scrollbarH)this.getScrollbarPosition(i,!1,this.xAxes[0].position),this.adjustMargins(i,!1)},updateScrollbars:function(){t.AmXYChart.base.updateScrollbars.call(this);var i=this.scrollbarV;i&&(this.updateChartScrollbar(i,!0),i.valueAxes=this.yAxes,i.gridAxis||(i.gridAxis=this.yAxes[0]));if(i=this.scrollbarH)this.updateChartScrollbar(i,!1),i.valueAxes=this.xAxes,i.gridAxis||(i.gridAxis=this.xAxes[0])},removeChartScrollbar:function(){t.callMethod("destroy",[this.scrollbarH,this.scrollbarV]);this.scrollbarV=this.scrollbarH=null},handleReleaseOutside:function(i){t.AmXYChart.base.handleReleaseOutside.call(this,i);t.callMethod("handleReleaseOutside",[this.scrollbarH,this.scrollbarV])},update:function(){t.AmXYChart.base.update.call(this);this.scrollbarH&&this.scrollbarH.update&&this.scrollbarH.update();this.scrollbarV&&this.scrollbarV.update&&this.scrollbarV.update()},zoomScrollbar:function(){this.zoomValueScrollbar(this.scrollbarV);this.zoomValueScrollbar(this.scrollbarH)},handleCursorZoomReal:function(t,i,a,e){isNaN(t)||isNaN(i)||this.relativeZoomValueAxes(this.xAxes,t,i);isNaN(a)||isNaN(e)||this.relativeZoomValueAxes(this.yAxes,a,e);this.updateAfterValueZoom()},handleCursorZoomStarted:function(){if(this.xAxes){var t=this.xAxes[0];this.startX0=t.relativeStart;this.endX0=t.relativeEnd;t.reversed&&(this.startX0=1-t.relativeEnd,this.endX0=1-t.relativeStart)}this.yAxes&&(t=this.yAxes[0],this.startY0=t.relativeStart,this.endY0=t.relativeEnd,t.reversed&&(this.startY0=1-t.relativeEnd,this.endY0=1-t.relativeStart))},updateChartCursor:function(){t.AmXYChart.base.updateChartCursor.call(this);var i=this.chartCursor;if(i){i.valueLineEnabled=!0;i.categoryLineAxis||(i.categoryLineAxis=this.xAxes[0]);var a=this.valueAxis;if(i.valueLineBalloonEnabled){var e=i.categoryBalloonAlpha,s=i.categoryBalloonColor,r=i.color;void 0===s&&(s=i.cursorColor);for(var o=0;o<this.valueAxes.length;o++){var a=this.valueAxes[o],h=a.balloon;h||(h={});h=t.extend(h,this.balloon,!0);h.fillColor=s;h.balloonColor=s;h.fillAlpha=e;h.borderColor=s;h.color=r;a.balloon=h}}else for(e=0;e<this.valueAxes.length;e++)a=this.valueAxes[e],a.balloon&&(a.balloon=null);i.zoomable&&(this.hideYScrollbar||(i.vZoomEnabled=!0),this.hideXScrollbar||(i.hZoomEnabled=!0))}},handleCursorPanning:function(i){var a=i.deltaX,e=i.delta2X,s;isNaN(e)&&(e=a,s=!0);var r=this.endX0,o=this.startX0,h=r-o,e=r-h*e,r=h;s||(r=0);a=t.fitToBounds(o-h*a,0,1-r);e=t.fitToBounds(e,r,1);this.relativeZoomValueAxes(this.xAxes,a,e);h=i.deltaY;i=i.delta2Y;isNaN(i)&&(i=h,s=!0);e=this.endY0;a=this.startY0;o=e-a;h=e+o*h;e=o;s||(e=0);s=t.fitToBounds(a+o*i,0,1-e);h=t.fitToBounds(h,e,1);this.relativeZoomValueAxes(this.yAxes,s,h);this.updateAfterValueZoom()},handleValueAxisZoom:function(t){this.handleValueAxisZoomReal(t,"V"==t.valueAxis.orientation?this.yAxes:this.xAxes)},showZB:function(){var i,a=this.valueAxes;if(a)for(var e=0;e<a.length;e++){var s=a[e];0!==s.relativeStart&&(i=!0);1!=s.relativeEnd&&(i=!0)}t.AmXYChart.base.showZB.call(this,i)}})})(); //# sourceMappingURL=xy.map.js