var DvtPieChart=function(a,b,d,e){this.Init(a,b,d,e)};DvtPieChart.LABEL_POS_UNSPEC=-1;DvtPieChart.LABEL_POS_NONE=0;DvtPieChart.LABEL_POS_INSIDE=1;DvtPieChart.LABEL_POS_OUTSIDE=2;DvtPieChart.LABEL_POS_OUTSIDE_FEELERS=3;DvtPieChart.LABEL_TYPE_UNSPEC=-1;DvtPieChart.LABEL_TYPE_PERCENT=0;DvtPieChart.LABEL_TYPE_VALUE=1;DvtPieChart.LABEL_TYPE_TEXT=2;DvtPieChart.LABEL_TYPE_TEXT_PERCENT=3;DvtPieChart.LABEL_TYPE_TEXT_VALUE=4;DvtPieChart.LABEL_TYPE_CUSTOM=5;DvtPieChart.EXPLODE=0;DvtPieChart.UNITE=1;
DvtObj.createSubclass(DvtPieChart,DvtContainer,"DvtPieChart");
DvtPieChart.prototype.Init=function(a,b){DvtPieChart.superclass.Init.call(this,a);this._eventManager=b;this._anchorOffset=90;this._yRadius=this._xRadius=this._depth=0;this._center=new DvtPoint(0,0);this._pieInfo=null;this._frame=new DvtRectangle(0,0,0,0);this._bAutoExplode=!1;this._slices=[];this._maxExplodePixels=0;this._is3D=!1;this._shapesContainer=new DvtContainer(a);this._numSelectedObjsInFront=this._numFrontObjs=0;this._animationDuration=1;this._maxSliceIndex=-1};
DvtPieChart.prototype.__getEventManager=function(){return this._eventManager};DvtPieChart.prototype.setPosition=function(a,b,d,e){this._center=a;this._xRadius=b;this._yRadius=d;this._frame=new DvtRectangle(e.x,e.y,e.w,e.h)};
DvtPieChart.prototype.processEvent=function(a){var b=a.getType();b==DvtHideShowCategoryEvent.TYPE_HIDE||b==DvtHideShowCategoryEvent.TYPE_SHOW?DvtHideShowCategoryHandler.processEvent(a,this._slices):(b==DvtCategoryRolloverEvent.TYPE_OVER||b==DvtCategoryRolloverEvent.TYPE_OUT)&&DvtCategoryRolloverHandler.processEvent(a,this._slices)};DvtPieChart.prototype.__getShowPopupBehaviors=function(){return null};
DvtPieChart.prototype.render=function(){var a;this.contains(this._shapesContainer)||(this._shapesContainer||(this._shapesContainer=new DvtContainer(this.getContext())),this.addChild(this._shapesContainer),!this._is3D&&this._pieInfo.hasVisualEffects()&&(a=DvtColorUtils.makeRGBA(78,87,101,0.45),a=new DvtShadow(a,4,7,7,54,2,3,!1,!1,!1)));DvtPieChart._layoutSlices(this._slices,this._anchorOffset);for(var b=this._slices.length,d=0;d<b;d++){var e=this._slices[d];e.preRender()}var g=DvtPieChart._orderSlicesForRendering(this._slices);
DvtPieChart._layoutLabelsAndFeelers(this);b=g.length;for(d=0;d<b;d++)e=g[d],e.render();b=g.length;for(d=0;d<b;d++)e=g[d],e.renderLabelAndFeeler();DvtAgent.getAgent().isWebkit()&&this.getContext()instanceof DvtSvgContext||a&&this._shapesContainer.addDrawEffect(a);this._pieInfo.isInitFx()&&!this._bInitFxDone&&(this._doInitFx(),this._bInitFxDone=!0);b=g.length;for(d=0;d<b;d++)e=g[d],e._selected&&e.setSelected(!0),e.explodeSlice(e.getExplode())};
DvtPieChart.prototype.addSliceInfo=function(a){var b=a.getExplode();b>this._maxExplodePixels&&(this._maxExplodePixels=b);b=a.getIndex();b>this._maxSliceIndex&&(this._maxSliceIndex=b);a=this.CreateSlice(this,a);this._slices.push(a);return a};DvtPieChart.prototype.getMaxSliceIndex=function(){return this._maxSliceIndex};DvtPieChart.__computeTotal=function(a){for(var b=0,a=a._slices,d=0;d<a.length;d++){var e=a[d].getSliceInfo().getValue();0<=e&&(b+=e)}return b};
DvtPieChart._computeMaxExplodePixels=function(a){for(var b=a.length,d=0,e=0;e<b;e++){var g=a[e].getExplode();g>d&&(d=g)}return d};DvtPieChart.prototype.CreateSlice=function(a,b){return new DvtPieSlice(a,b)};
DvtPieChart._layoutSlices=function(a,b){var d,e,g,h=0,k=a?a.length:0;360<b&&(b-=360);0>b&&(b+=360);var m=g=0;0<k&&(m=DvtPieChart.__computeTotal(a[0].getPieChart()));for(d=0;d<k;d++)e=a[d],value=e.getSliceInfo().getValue(),g=0==m?0:100*(Math.abs(value)/m),h=3.6*g,g=b-h,0>g&&(g+=360),e.setAngleStart(g),e.setAngleExtent(h),b=e.getAngleStart()};
DvtPieChart._orderSlicesForRendering=function(a){var b=[],d,e=a?a.length:0,g,h=-1,k,m;for(d=0;d<e;d++)if(g=a[d],k=g.getAngleStart(),g=g.getAngleExtent(),g=k+g,360<g&&(g-=360),0>g&&(g+=360),90==g||90>k&&90<g){h=d;m=g-90;break}k=[];for(d=h;d<e;d++)k.push(a[d]);for(d=0;d<h;d++)k.push(a[d]);h=a=0;m=180+m;for(d=0;d<e;d++)if(g=k[d]){if(a+g.getAngleExtent()>m){h=d;break}b.push(g);a+=g.getAngleExtent()}for(d=e-1;d>=h;d--)(g=k[d])&&b.push(g);return b};DvtPieChart.prototype.is3D=function(){return this._is3D};
DvtPieChart.prototype.set3D=function(a){this._is3D=a};DvtPieChart.prototype.__calcMaxExplodeDistance=function(){var a=0.047*Math.min(this._frame.w,this._frame.h);0>a&&(a=0);return a};DvtPieChart.prototype.explodeAll=function(){this.animateExplode(0,-1)};DvtPieChart.prototype.uniteAll=function(){this.animateExplode(1,-1)};DvtPieChart.prototype.isPieAllExploded=function(){var a=!0,b,d,e=this._slices.length;for(d=0;d<e;d++)if(b=this._slices[d],0==b.getExplode()){a=!1;break}return a};
DvtPieChart.prototype.isPieAllUnited=function(){var a=!0,b,d,e=this._slices.length;for(d=0;d<e;d++)if(b=this._slices[d],0<b.getExplode()){a=!1;break}return a};DvtPieChart.prototype.animateSingleSliceExplode=function(a,b){var d,e,g=this._slices.length,h=-1;for(d=0;d<g;d++)if(e=slices[d],sliceInfo=e.getSliceInfo(),sliceInfo.getId()==b){h=d;break}-1<h&&this.animateExplode(a,h)};DvtPieChart.prototype.getAnimationDuration=function(){return this._animationDuration};
DvtPieChart.prototype.animateExplode=function(a,b){var d=this._slices.length,e;this._animationDuration=2;this.getContext()instanceof DvtSvgContext&&DvtAgent.getAgent().isWebkit()&&(this._animationDuration=1);var g=new DvtAnimator(this.getContext(),this._animationDuration),h=0,h=this.__calcMaxExplodeDistance(),h=a==DvtPieChart.EXPLODE?h:0;if(-1==b){var k=[];for(e=0;e<d;e++)k[e]=h;g.addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this,this._getSliceExplodes,this._setSliceExplodes,k)}else this._pieInfo.isSliceInteractive()&&
0<=b&&b<d&&(d=this._slices[b],g.addProp(DvtAnimator.TYPE_NUMBER,d,d.getExplode,d.explodeSlice,h));g.play()};DvtPieChart.prototype._doInitFx=function(){for(var a=[],b=this._slices.length,d=0;d<b;d++){var e=this._slices[d].getSliceLabel();(a[d]=e)&&e.setAlpha(0)}(new DvtAnimFadeIn(this._context,a,this.getPieInfo().getAnimationDuration())).play()};DvtPieChart._layoutLabelsAndFeelers=function(a){var b=a._slices;b&&0<b.length&&(new DvtSliceLabelLayout(a)).layoutLabelsAndFeelers()};
DvtPieChart.prototype.setAnchorOffset=function(a){this._anchorOffset=a};DvtPieChart.prototype.getCenter=function(){return this._center};DvtPieChart.prototype.setFill=function(){};DvtPieChart.prototype.__getFrame=function(){return this._frame};DvtPieChart.prototype.__getMaxExplodePixels=function(){return this._maxExplodePixels};DvtPieChart.prototype.getPieInfo=function(){return this._pieInfo};DvtPieChart.prototype.setPieInfo=function(a){this._pieInfo=a};DvtPieChart.prototype.getRadiusX=function(){return this._xRadius};
DvtPieChart.prototype.getSliceColor=function(a){return(a=this._slices[a])?a.getSliceInfo().getFillColor():null};DvtPieChart.prototype._getSliceDisplayable=function(a){return 0<=a&&a<this._slices.length&&(a=this._slices[a].getTopSurface())&&0<a.length?a[0]:null};DvtPieChart.prototype.__dispatchTestEvent=function(a,b){this._getSliceDisplayable(b).dispatchDisplayableEvent(a)};DvtPieChart.prototype.getSliceText=function(a){if(a=this._slices[a])if(a=a.getSliceLabel())return a.getTextString();return null};
DvtPieChart.prototype.getSliceTooltip=function(a){if(a=this._slices[a])if(a=a.getSliceInfo().getTooltip())return DvtGraphParser.convertLineBreaks(a);return null};DvtPieChart.prototype.__getShapesContainer=function(){return this._shapesContainer};DvtPieChart.prototype.getRadiusY=function(){return this._yRadius};DvtPieChart.prototype.__getSlices=function(){return this._slices};
DvtPieChart.prototype.animateUpdate=function(a,b){var d=new DvtDataAnimationHandler(this.getContext(),this);d.constructAnimation(b.__getSlices(),this.__getSlices());var d=d.getAnimation(),e=new DvtCustomAnimation(this.getContext(),this,this.getPieInfo().getAnimationDuration());e.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this,this._getAnimationParams,this._setAnimationParams,this._getAnimationParams());d=new DvtParallelPlayable(this.getContext(),d,e);a.add(d,0)};
DvtPieChart.prototype.animateInsert=function(){};DvtPieChart.prototype.animateDelete=function(){};DvtPieChart.prototype._getAnimationParams=function(){return[1]};DvtPieChart.prototype._setAnimationParams=function(){this.removeChildren();this._shapesContainer&&this._shapesContainer.destroy();this._shapesContainer=null;this.render()};DvtPieChart.prototype._getSliceExplodes=function(){for(var a=[],b=this._slices.length,d=0;d<b;d++)a[d]=this._slices[d].getSliceInfo().getExplode();return a};
DvtPieChart.prototype._setSliceExplodes=function(a){for(var b=this._slices.length,d=0;d<b;d++){var e=this._slices[d],g=a[d];e.getSliceInfo().getExplode()!=g&&(e.explodeSlice(g),g>this._maxExplodePixels&&(this._maxExplodePixels=g))}};DvtPieChart.prototype.getDepth=function(){return this._depth};DvtPieChart.prototype.setDepth=function(a){this._depth=a};
DvtPieChart.prototype.bringToFrontOfSelection=function(a){var b=a.getPieChart()._shapesContainer;if(b){var d=b.getNumChildren();1<d-this._numFrontObjs&&(b.removeChild(a._topSurface[0]),b.addChildAt(a._topSurface[0],d-this._numFrontObjs-1))}};
DvtPieChart.prototype.pushToBackOfSelection=function(a){var b=this._slices.length,d=0;for(i=0;i<b;i++)this._slices[i].isSelected()&&d++;this._numSelectedObjsInFront=d;if(b=a.getPieChart()._shapesContainer)d=b.getNumChildren()-this._numFrontObjs-1-this._numSelectedObjsInFront,0<=d&&(b.removeChild(a._topSurface[0]),b.addChildAt(a._topSurface[0],d))};DvtPieChart.prototype.setNumFrontObjs=function(a){this._numFrontObjs=a};var DvtPieInfo=function(){this._init()};
DvtObj.createSubclass(DvtPieInfo,DvtObj,"DvtPieInfo");DvtPieInfo.prototype._init=function(){this._labelPosition=DvtPieChart.LABEL_POS_UNSPEC;this._labelType=DvtPieChart.LABEL_TYPE_UNSPEC;this._feelerColor="#000000";this._labelVF=this._arSliceLabels=this._converter=this._style=null;this._isSliceInteractive=!1;this._fillType=DvtFill.NONE;this._hasVisualEffects=!0;this._id=null;this._isInitFx=!1};DvtPieInfo.prototype.isInitFx=function(){return this._isInitFx};
DvtPieInfo.prototype.setInitFx=function(a){this._isInitFx=a};DvtPieInfo.prototype.getFeelerColor=function(){return this._feelerColor};DvtPieInfo.prototype.setFeelerColor=function(a){this._feelerColor=a};DvtPieInfo.prototype.getFillType=function(){return this._fillType};DvtPieInfo.prototype.setFillType=function(a){this._fillType=a};DvtPieInfo.prototype.getCSSStyle=function(){return this._style};DvtPieInfo.prototype.setCSSStyle=function(a){this._style=a};DvtPieInfo.prototype.getId=function(){return this._id};
DvtPieInfo.prototype.setId=function(a){this._id=a};DvtPieInfo.prototype.getLabelPosition=function(){return this._labelPosition};DvtPieInfo.prototype.setLabelPosition=function(a){this._labelPosition=a};DvtPieInfo.prototype.getLabels=function(){return this._arSliceLabels};DvtPieInfo.prototype.setLabels=function(a){this._arSliceLabels=a};DvtPieInfo.prototype.getLabelType=function(){return this._labelType};DvtPieInfo.prototype.setLabelType=function(a){this._labelType=a};
DvtPieInfo.prototype.getConverter=function(){return this._converter};DvtPieInfo.prototype.setConverter=function(a){this._converter=a};DvtPieInfo.prototype.isSliceInteractive=function(){return this._isSliceInteractive};DvtPieInfo.prototype.setSliceInteractive=function(a){this._isSliceInteractive=a};DvtPieInfo.prototype.getValueFormat=function(){return this._labelVF};DvtPieInfo.prototype.setValueFormat=function(a){this._labelVF=a};DvtPieInfo.prototype.hasVisualEffects=function(){return this._hasVisualEffects};
DvtPieInfo.prototype.setVisualEffects=function(a){this._hasVisualEffects=a};DvtPieInfo.prototype.getAnimationDuration=function(){return this._duration};DvtPieInfo.prototype.setAnimationDuration=function(a){this._duration=a};var DvtPieRenderUtils=function(){};DvtObj.createSubclass(DvtPieRenderUtils,DvtObj,"DvtPieRenderUtils");DvtPieRenderUtils.TWOD="2D";DvtPieRenderUtils.THREED="3D";DvtPieRenderUtils.CRUST="CRUST";DvtPieRenderUtils.SIDE="SIDE";DvtPieRenderUtils.OVERLAY="OVERLAY";
DvtPieRenderUtils.BORDER="BORDER";DvtPieRenderUtils.reflectAngleOverYAxis=function(a,b,d,e,g){var h={x:0,y:0},k=DvtMath.degreesToRads(360-a),a=Math.cos(k),k=Math.sin(k);h.x=b+a*e;h.y=d+k*g;return h};DvtPieRenderUtils._hexToDecimal=function(a){return parseInt(a,16)};DvtPieRenderUtils._hexToRatio=function(a,b){var d=DvtPieRenderUtils._hexToDecimal(a),e=DvtPieRenderUtils._hexToDecimal(b);return d/e};
DvtPieRenderUtils.getGradientColors=function(a,b){var d;if(b==DvtPieRenderUtils.TWOD)d=[],d[0]=DvtColorUtils.getRGB(DvtColorUtils.getPastel(a,0.1)),d[1]=d[0],d[2]=DvtColorUtils.getRGB(DvtColorUtils.getDarker(a,0.9));else if(b==DvtPieRenderUtils.BORDER)d=[],d[0]=DvtColorUtils.makeRGB(255,255,255),d[1]=DvtColorUtils.makeRGB(0,0,0),d[2]=DvtColorUtils.makeRGB(0,0,0);else if(b==DvtPieRenderUtils.OVERLAY)d=[],d[0]=DvtColorUtils.makeRGB(255,255,255),d[1]=DvtColorUtils.makeRGB(255,255,255),d[2]=DvtColorUtils.makeRGB(DvtPieRenderUtils._hexToDecimal("6c"),
DvtPieRenderUtils._hexToDecimal("76"),DvtPieRenderUtils._hexToDecimal("80"));else{var e=DvtColorUtils.getRGB(DvtColorUtils.getDarker(a,0.88)),g=DvtColorUtils.getRGB(DvtColorUtils.getPastel(a,0.05)),h=DvtColorUtils.getRGB(DvtColorUtils.getPastel(a,0.15)),k=DvtColorUtils.getRGB(DvtColorUtils.getPastel(a,0.35));b==DvtPieRenderUtils.CRUST?(d=[],d[0]=e,d[1]=h,d[2]=k,d[3]=e):"SIDE"==b?(d=[],d[0]=e,d[1]=k):"3D"==b&&(d=[],d[0]=k,d[1]=h,d[2]=e,d[3]=g,d[4]=k)}return d};
DvtPieRenderUtils.getGradientAlphas=function(a,b){var d=null==a||isNaN(a)||0==a?1:a,e;b==DvtPieRenderUtils.TWOD?(e=[],e[0]=d,e[1]=d,e[2]=d):b==DvtPieRenderUtils.BORDER?(e=[],e[0]=d/1.59375,e[1]=d/5.3125,e[2]=d/2.65625):b==DvtPieRenderUtils.OVERLAY?(e=[],e[0]=d/2.55,e[1]=d/3.1875,e[2]=0):b==DvtPieRenderUtils.THREED?(e=[],e[0]=d,e[1]=d,e[2]=d,e[3]=d,e[4]=d):b==DvtPieRenderUtils.CRUST?(e=[],e[0]=d,e[1]=d,e[2]=d,e[3]=d):b==DvtPieRenderUtils.SIDE&&(e=[],e[0]=d,e[1]=d);return e};
DvtPieRenderUtils.getGradientRatios=function(a){var b;a==DvtPieRenderUtils.TWOD?b=[0.2,0.5,1]:a==DvtPieRenderUtils.BORDER?b=[0,0.5,1]:a==DvtPieRenderUtils.OVERLAY?b=[0,0.18,1]:a==DvtPieRenderUtils.THREED?b=[0,0.29,0.55,0.84,1]:a==DvtPieRenderUtils.CRUST?b=[0,0.43,0.91,1]:a==DvtPieRenderUtils.SIDE&&(b=[0,1]);return b};var DvtPieSlice=function(a,b){this.Init(a,b)};DvtObj.createSubclass(DvtPieSlice,DvtObj,"DvtPieSlice");
DvtPieSlice.prototype.Init=function(a,b){this._pieChart=a;this._sliceInfo=b;this._angleExtent=this._angleStart=0;this._crustSurface=this._rightSurface=this._leftSurface=this._topSurface=null;this._explodeOffsetY=this._explodeOffsetX=0;this._sliceLabelString=this._sliceLabelPosition=this._sliceLabel=null;this._hasFeeler=!1;this._outsideFeelerEnd=this._outsideFeelerMid=this._outsideFeelerStart=this._feelerHoriz=this._feelerRad=null;this._selecting=this._selected=!1;this._radiusX=this._pieChart.getRadiusX();
this._radiusY=this._pieChart.getRadiusY()};DvtPieSlice.prototype.getPieChart=function(){return this._pieChart};DvtPieSlice.prototype.render=function(){for(var a=DvtPieSlice._sortPieSurfaces(this._topSurface,this._leftSurface,this._rightSurface,this._crustSurface,this._angleStart,this._angleExtent),b=a.length,d=0;d<b;d++){var e=a[d];shapeCount=e.length;for(var g=0;g<shapeCount;g++)this._pieChart.__getShapesContainer().addChild(e[g]),e[g].render&&e[g].render()}};
DvtPieSlice.prototype.renderLabelAndFeeler=function(){this._sliceLabel&&(this._pieChart.addChild(this._sliceLabel),DvtPieSlice._associate(this,[this._sliceLabel]),this._pieChart.getPieInfo().getLabelPosition()==DvtPieChart.LABEL_POS_OUTSIDE_FEELERS&&this._renderOutsideFeeler())};
DvtPieSlice.prototype._feelerFromPts=function(a,b){var d=this._pieChart.getContext(),d=new DvtLine(d,a.x,a.y,b.x,b.y),e=this._pieChart.getPieInfo().getFeelerColor(),e=new DvtSolidStroke(e);d.setStroke(e);if(!this._pieChart.contains(d)){var e=this._pieChart.__getShapesContainer(),g=e.getChildIndex(this._topSurface[0]);e.addChildAt(d,g)}return d};
DvtPieSlice.prototype._renderOutsideFeeler=function(){if(this._hasFeeler){var a=this._feelerFromPts(this._outsideFeelerStart,this._outsideFeelerMid),b=this._feelerFromPts(this._outsideFeelerMid,this._outsideFeelerEnd);this._feelerRad=a;this._feelerHoriz=b}};DvtPieSlice.prototype.preRender=function(){this.explodeSlice(this._sliceInfo.getExplode());this._createSurfaces()};
DvtPieSlice.prototype._createSurfaces=function(){var a=this._pieChart.getPieInfo().getFillType(),b,d;if(a==DvtFill.GRADIENT){var e,g,h=0;e=!this._pieChart.is3D()?"2D":"3D";b=DvtPieRenderUtils.getGradientColors(this._sliceInfo.getFillColor(),e);g=DvtPieRenderUtils.getGradientAlphas(this._sliceInfo.getFillAlpha(),e);e=DvtPieRenderUtils.getGradientRatios(e);var h=297,k=[Math.floor(this._pieChart.getCenter().x-this._pieChart.getRadiusX()),Math.floor(this._pieChart.getCenter().y-this._pieChart.getRadiusY()),
Math.ceil(2*this._pieChart.getRadiusX()),Math.ceil(2*this._pieChart.getRadiusY())];b=new DvtLinearGradientFill(h,b,g,e,k)}else a==DvtFill.PATTERN?b=new DvtPatternFill(this._sliceInfo.getFillPattern(),this._sliceInfo.getFillColor()):(b=new DvtSolidFill(this._sliceInfo.getFillColor(),this._sliceInfo.getFillAlpha()),d=new DvtSolidFill(DvtColorUtils.getRGB(DvtColorUtils.getDarker(this._sliceInfo.getFillColor(),0.6)),this._sliceInfo.getFillAlpha()));this._topSurface=DvtPieSlice.createTopSurface(this,b);
if(this._pieChart.is3D()&&(0<this._pieChart.getDepth()||this._pieChart.getRadiusX()!=this._pieChart.getRadiusY())){b=d;if(a==DvtFill.GRADIENT||a==DvtFill.PATTERN)d=DvtPieSlice._generateLateralGradientFill(this,DvtPieRenderUtils.CRUST),b=DvtPieSlice._generateLateralGradientFill(this,DvtPieRenderUtils.SIDE);this._leftSurface=DvtPieSlice.createLeftSide(this,b);this._rightSurface=DvtPieSlice.createRightSide(this,b);this._crustSurface=DvtPieSlice.createCrust(this,d)}};
DvtPieSlice._sortPieSurfaces=function(a,b,d,e,g,h){var k=[];b&&d&&e&&(270>=g&&270<g+h?(k.push(b),k.push(d),k.push(e)):270<g||90>=g+h?(k.push(b),k.push(e),k.push(d)):(k.push(d),k.push(e),k.push(b)));k.push(a);return k};DvtPieSlice.oppositeDirection=function(a,b,d){return 0<a-b!=0<a-d};
DvtPieSlice.prototype.explodeSlice=function(a){this._sliceInfo.setExplode(a);if(0!=a){var a=(360-(this._angleStart+this._angleExtent/2))*DvtMath.RADS_PER_DEGREE,b=this._pieChart.getRadiusY()/this._pieChart.getRadiusX(),d=this._sliceInfo.getExplode(),e=this._pieChart.__calcMaxExplodeDistance();e<d&&(d=e);this._explodeOffsetX=Math.cos(a)*d;this._explodeOffsetY=Math.sin(a)*b*d;this._pieChart.getContext()instanceof DvtSvgContext&&DvtAgent.getAgent().isWebkit()&&(this._explodeOffsetX=Math.round(this._explodeOffsetX),
this._explodeOffsetY=Math.round(this._explodeOffsetY))}else this._explodeOffsetY=this._explodeOffsetX=0;this._topSurface&&DvtPieSlice._translateShapes(this._topSurface,this._explodeOffsetX,this._explodeOffsetY);this._rightSurface&&DvtPieSlice._translateShapes(this._rightSurface,this._explodeOffsetX,this._explodeOffsetY);this._leftSurface&&DvtPieSlice._translateShapes(this._leftSurface,this._explodeOffsetX,this._explodeOffsetY);this._crustSurface&&DvtPieSlice._translateShapes(this._crustSurface,this._explodeOffsetX,
this._explodeOffsetY);if(this._hasFeeler){a=this._outsideFeelerStart.x;b=this._outsideFeelerStart.y;d=a+this._explodeOffsetX;e=b+this._explodeOffsetY;this._feelerRad.setX1(d);this._feelerRad.setY1(e);var g=this._outsideFeelerMid.x,h=this._outsideFeelerMid.y;DvtPieSlice.oppositeDirection(g,a,d)?(this._feelerRad.setX2(d),this._feelerHoriz.setX1(d)):(this._feelerRad.setX2(g),this._feelerHoriz.setX1(g));DvtPieSlice.oppositeDirection(h,b,e)?(this._feelerRad.setY2(e),this._feelerHoriz.setY1(e)):(this._feelerRad.setY2(h),
this._feelerHoriz.setY1(h))}else this._sliceLabel&&this._translateLabel(this._sliceLabel,this._explodeOffsetX,this._explodeOffsetY);this.fixSVGFilter()};DvtPieSlice.prototype.fixSVGFilter=function(){if(this._pieChart.getContext()instanceof DvtSvgContext){var a=this._pieChart.__getShapesContainer().getImpl().getElem();DvtSvgDocumentUtils.fixWebkitFilters(a)}};
DvtPieSlice.prototype._translateLabel=function(a,b,d){a&&(a.setTranslateX(this._sliceLabelPosition.x+b),a.setTranslateY(this._sliceLabelPosition.y+d))};DvtPieSlice._translateShapes=function(a,b,d){if(a)for(var e=a.length,g=0;g<e;g++){var h=a[g];h.setTranslateX(b);h.setTranslateY(d)}};
DvtPieSlice.generateSliceLabelString=function(a){var b=a.getPieChart();if(b.getPieInfo().getLabelPosition()==DvtPieChart.LABEL_POS_NONE)return null;var d=b.getPieInfo().getLabelType();if(d==DvtPieChart.LABEL_TYPE_CUSTOM)return(d=a.getSliceInfo().getText())?d:"?";var e="",g="",h="",k="",m=b.getPieInfo().getConverter(),n=b.getPieInfo().getValueFormat(),o=a.getSliceInfo().getValue(),k=0,b=DvtPieChart.__computeTotal(b),k=0==b?0:100*(Math.abs(o)/b);if(m&&m.getAsString&&m.getAsObject)e=m.getAsString(k/
100);else try{e=n.getFormattedValue(k/100)}catch(q){k=k.toString();if(5<k.length)k=k.slice(0,5);else for(0>k.indexOf(".",0)&&4>k.length&&(k+=".");5>k.length;)k+="0";e=k+"%"}if(!isNaN(o))if(m&&m.getAsString&&m.getAsObject)g=m.getAsString(o);else try{g=n.getFormattedValue(o)}catch(s){g=o.toString(),n&&(g=n.getFormattedValue(o))}(a=a.getSliceInfo().getText())&&(h=a);return d==DvtPieChart.LABEL_TYPE_PERCENT||d==DvtPieChart.LABEL_TYPE_UNSPEC?e:d==DvtPieChart.LABEL_TYPE_VALUE?g:d==DvtPieChart.LABEL_TYPE_TEXT?
h:d==DvtPieChart.LABEL_TYPE_TEXT_PERCENT?h+", "+e:d==DvtPieChart.LABEL_TYPE_TEXT_VALUE?h+", "+g:null};DvtPieSlice.prototype.getAngleExtent=function(){return this._angleExtent};DvtPieSlice.prototype.setAngleExtent=function(a){this._angleExtent=a};DvtPieSlice.prototype.getAngleStart=function(){return this._angleStart};DvtPieSlice.prototype.setAngleStart=function(a){this._angleStart=a};DvtPieSlice.prototype.getExplode=function(){return this._sliceInfo.getExplode()};
DvtPieSlice.prototype.__getExplodeOffsetX=function(){return this._explodeOffsetX};DvtPieSlice.prototype.__getExplodeOffsetY=function(){return this._explodeOffsetY};DvtPieSlice.prototype.setOutsideFeelerPoints=function(a,b,d){this._outsideFeelerStart=a;this._outsideFeelerMid=b;this._outsideFeelerEnd=d;this._hasFeeler=!0};DvtPieSlice.prototype.setNoOutsideFeeler=function(){this._outsideFeelerEnd=this._outsideFeelerMid=this._outsideFeelerStart=null;this._hasFeeler=!1};
DvtPieSlice.prototype.getSliceInfo=function(){return this._sliceInfo};DvtPieSlice.prototype.setSliceInfo=function(a){this._sliceInfo=a};DvtPieSlice.prototype.getSliceLabel=function(){return this._sliceLabel};DvtPieSlice.prototype.setSliceLabel=function(a){if(this._sliceLabel=a)this._sliceLabelPosition={x:a.getTranslateX(),y:a.getTranslateY()}};DvtPieSlice.prototype.getSliceLabelString=function(){return this._sliceLabelString};
DvtPieSlice.prototype.setSliceLabelString=function(a){this._sliceLabelString=a};DvtPieSlice.prototype.getTopSurface=function(){return this._topSurface};DvtPieSlice.prototype.getId=function(){return this._sliceInfo.getId()};DvtPieSlice.prototype.GetAnimationParams=function(){return[this.getSliceInfo().getValue(),this._radiusX,this._radiusY]};DvtPieSlice.prototype.SetAnimationParams=function(a){this.getSliceInfo().setValue(a[0]);this._radiusX=a[1];this._radiusY=a[2]};
DvtPieSlice.prototype.animateUpdate=function(a,b){var d=b.GetAnimationParams(),e=this.GetAnimationParams();if(!DvtArrayUtils.equals(d,e)){var g=new DvtCustomAnimation(this._pieChart.getContext(),this,this.getPieChart().getPieInfo().getAnimationDuration());g.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this,this.GetAnimationParams,this.SetAnimationParams,e);a.add(g,0);this.SetAnimationParams(d)}};
DvtPieSlice.prototype.animateInsert=function(a){var b=new DvtCustomAnimation(this._pieChart.getContext(),this,this.getPieChart().getPieInfo().getAnimationDuration());b.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this,this.GetAnimationParams,this.SetAnimationParams,this.GetAnimationParams());a.add(b,0);this.SetAnimationParams([0,0,0])};
DvtPieSlice.prototype.animateDelete=function(a,b){var d=b.addSliceInfo(this.getSliceInfo()),e=b.__getSlices();e.splice(e.length-1,1);var g=this.getPieChart().__getSlices(),h=DvtArrayUtils.indexOf(g,this)-1;if(0<=h){g=g[h].getId();for(h=0;h<e.length;h++)if(e[h].getId()===g){e.splice(h+1,0,d);break}}else e.splice(0,0,d);e=new DvtCustomAnimation(b.getContext(),this,this.getPieChart().getPieInfo().getAnimationDuration());e.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,d,d.GetAnimationParams,d.SetAnimationParams,
[0,0,0]);e.setOnEnd(d._removeDeletedSlice,d);a.add(e,0)};DvtPieSlice.prototype._removeDeletedSlice=function(){var a=this.getPieChart().__getSlices(),b=DvtArrayUtils.indexOf(a,this);0<=b&&a.splice(b,1)};DvtPieSlice.prototype.getAction=function(){return this.getSliceInfo().getAction()};
DvtPieSlice.prototype.getDisplayables=function(){var a=[];this._topSurface&&(a=a.concat(this._topSurface));this._leftSurface&&(a=a.concat(this._leftSurface));this._rightSurface&&(a=a.concat(this._rightSurface));this._crustSurface&&(a=a.concat(this._crustSurface));this._sliceLabel&&a.push(this._sliceLabel);this._feelerRad&&a.push(this._feelerRad);this._feelerHoriz&&a.push(this._feelerHoriz);return a};
DvtPieSlice.prototype.getPhysicalShape=function(a){a.setDataColor(this.getSliceInfo().getFillColor());a.setZorder(!1);a.setSelectedShadow(!1);a.setCursor(DvtSelectionEffectUtils.getSelectingCursor());return a};DvtPieSlice.prototype.isSelectable=function(){return!0};DvtPieSlice.prototype.isSelected=function(){return this._selected};
DvtPieSlice.prototype.setSelected=function(a){(this._selected=a)?this._pieChart.bringToFrontOfSelection(this):this._selecting||this._pieChart.pushToBackOfSelection(this);var b=this.getDisplayables();for(i=0;i<b.length;i++)b[i].setSelected&&this.getPhysicalShape(b[i]).setSelected(a);this.fixSVGFilter()};
DvtPieSlice.prototype.showHoverEffect=function(){this._selecting=!0;this._pieChart.bringToFrontOfSelection(this);var a=this.getDisplayables();for(i=0;i<a.length;i++)a[i].showHoverEffect&&this.getPhysicalShape(a[i]).showHoverEffect();this.fixSVGFilter()};
DvtPieSlice.prototype.hideHoverEffect=function(){this._selecting=!1;this._selected||this._pieChart.pushToBackOfSelection(this);var a=this.getDisplayables();for(i=0;i<a.length;i++)a[i].hideHoverEffect&&this.getPhysicalShape(a[i]).hideHoverEffect();this.fixSVGFilter()};DvtPieSlice.prototype.getDatatip=function(a){return a==this._sliceLabel&&this._sliceLabel&&this._sliceLabel.isTruncated()?this.getSliceLabelString():this.getSliceInfo().getTooltip()};DvtPieSlice.prototype.getDatatipColor=function(){return this.getSliceInfo().getFillColor()};
DvtPieSlice.prototype.getShowPopupBehaviors=function(){return this._pieChart.__getShowPopupBehaviors()};DvtPieSlice.prototype.getContextMenuId=function(){return this.getSliceInfo().getContextMenuId()};DvtPieSlice.prototype.getCategories=function(){return[this.getSliceInfo().getId().getSeries()]};DvtPieSlice.SURFACE_CRUST=0;DvtPieSlice.SURFACE_LEFT=1;DvtPieSlice.SURFACE_RIGHT=2;DvtPieSlice.SURFACE_TOP=3;
DvtPieSlice.createTopSurface=function(a,b){var d=a.getPieChart(),e=d.getContext(),g=a._sliceInfo,h=d.getCenter(),k=DvtArc.PIE;360==a.getAngleExtent()&&(k=DvtArc.OPEN);e=new DvtSelectableArc(e,h.x,h.y,a._radiusX,a._radiusY,a.getAngleStart(),a.getAngleExtent(),k);e.setDataColor(g.getFillColor());e.setZOrderManager(this._Chart);e.setTranslateX(a.__getExplodeOffsetX());e.setTranslateY(a.__getExplodeOffsetY());e.setFill(b);g.getStrokeColor()&&e.setStroke(new DvtSolidStroke(g.getStrokeColor(),g.getStrokeAlpha()));
e.setAriaRole("img");g=a.getSliceInfo().getTooltip();e.setAriaProperty("label",g);g=[e];if(!a.getSliceInfo().getStrokeColor()&&d.getPieInfo().hasVisualEffects()&&d.is3D()&&0<d.getDepth()&&d.getPieInfo().getFillType()==DvtFill.GRADIENT&&(180<=a.getAngleStart()||180<=a.getAngleStart()+a.getAngleExtent()||360==a.getAngleExtent()))d=DvtPieSlice._createGradientPieBorder(a,b),d.setTranslateX(a.__getExplodeOffsetX()),d.setTranslateY(a.__getExplodeOffsetY()),g.push(d);DvtPieSlice._associate(a,g);return g};
DvtPieSlice.createCrust=function(a,b){return DvtPieSlice._createLateralSurface(a,DvtPieSlice.SURFACE_CRUST,b)};DvtPieSlice.createRightSide=function(a,b){return DvtPieSlice._createLateralSurface(a,DvtPieSlice.SURFACE_RIGHT,b)};DvtPieSlice.createLeftSide=function(a,b){return DvtPieSlice._createLateralSurface(a,DvtPieSlice.SURFACE_LEFT,b)};DvtPieSlice._associate=function(a,b){if(b)for(var d=0;d<b.length;d++)a._pieChart.__getEventManager().associate(b[d],a)};
DvtPieSlice._createGradientPieBorder=function(a,b){var d=a.getSliceInfo(),e=DvtPieRenderUtils.BORDER,g=DvtPieRenderUtils.getGradientColors(null,e),d=DvtPieRenderUtils.getGradientAlphas(d.getStrokeAlpha(),e),e=DvtPieRenderUtils.getGradientRatios(e),h=b.getBounds();grAngle=120;g=new DvtLinearGradientStroke(grAngle,g,d,e,h);g.setWidth(1);d=a.getAngleStart();e=a.getAngleExtent();h=180>d?180-d:0;d=0<h?180:d;e-=h;360<d+e&&(e=360-d);var h=a.getPieChart(),k=h.getCenter(),d=new DvtArc(h.getContext(),k.x,k.y,
h.getRadiusX(),h.getRadiusY(),d,e,DvtArc.OPEN);d.setStroke(g);return d};
DvtPieSlice._createLateralSurface=function(a,b,d){if(0==a.getAngleExtent())return[];var e=[];if(0<a.getSliceInfo().getFillAlpha())if(b==DvtPieSlice.SURFACE_LEFT||b==DvtPieSlice.SURFACE_RIGHT)e.push(DvtPieSlice._generateLateralShape(a,b,null,d));else if(b==DvtPieSlice.SURFACE_CRUST)for(var g=DvtPieSlice._createCrustPathCommands(a),h=g.length,k=0;k<h;k++)e.push(DvtPieSlice._generateLateralShape(a,b,g[k],d));DvtPieSlice._associate(a,e);return e};
DvtPieSlice._generateLateralGradientFill=function(a,b){var d=0,e=a.getSliceInfo().getFillColor(),g=a.getSliceInfo().getFillAlpha(),h=a.getPieChart();b==DvtPieRenderUtils.CRUST&&(d=h.getDepth());var e=DvtPieRenderUtils.getGradientColors(e,b),g=DvtPieRenderUtils.getGradientAlphas(g,b),k=DvtPieRenderUtils.getGradientRatios(b),d=[Math.floor(h.getCenter().x-h.getRadiusX()),Math.floor(h.getCenter().y-h.getRadiusY())+d,Math.ceil(2*h.getRadiusX()),Math.ceil(2*h.getRadiusY())];return new DvtLinearGradientFill(0,
e,g,k,d)};
DvtPieSlice._generateLateralShape=function(a,b,d,e){var g=a.getPieChart().getContext(),h=a.getSliceInfo();if(b==DvtPieSlice.SURFACE_LEFT||b==DvtPieSlice.SURFACE_RIGHT){for(var d=[],k=a.getAngleStart(),m=a.getAngleExtent(),n=a.getPieChart(),o=n.getCenter().x,q=n.getCenter().y,s=a._radiusX,t=a._radiusY,u=n.getDepth(),b=b==DvtPieSlice.SURFACE_LEFT?DvtPieRenderUtils.reflectAngleOverYAxis(k+m,o,q,s,t):DvtPieRenderUtils.reflectAngleOverYAxis(k,o,q,s,t),b=DvtPieSlice._generateInnerPoints(o,q,b.x,b.y,u),
d=DvtPieSlice._pointArrayHelper(d,b[0]),o=b.length,q=1;q<o;q++)d=DvtPieSlice._pointArrayHelper(d,b[q]);g=new DvtSelectablePolygon(g,d);g.setDataColor(h.getFillColor());g.setZOrderManager(n);g.setTranslateX(a.__getExplodeOffsetX());g.setTranslateY(a.__getExplodeOffsetY());g.setFill(e);h.getStrokeColor()&&g.setStroke(new DvtSolidStroke(h.getStrokeColor(),h.getStrokeAlpha()));return g}return d?(g=new DvtSelectablePath(g,null),g.setDataColor(h.getFillColor()),g.setZOrderManager(n),g.setCmds(d),g.setTranslateX(a.__getExplodeOffsetX()),
g.setTranslateY(a.__getExplodeOffsetY()),g.setFill(e),h.getStrokeColor()&&g.setStroke(new DvtSolidStroke(h.getStrokeColor(),h.getStrokeAlpha())),g):null};
DvtPieSlice._createCrustPathCommands=function(a){var b=a.getAngleStart(),d=a.getAngleExtent(),e=b+d,g=a.getPieChart(),h=g.getCenter().x,k=g.getCenter().y,m=a._radiusX,a=a._radiusY,g=g.getDepth(),n=[];180>b&&360<e?(n.push(DvtPieSlice._makeOuterPath(h,k,b,180-b,m,a,g)),n.push(DvtPieSlice._makeOuterPath(h,k,180,180,m,a,g)),n.push(DvtPieSlice._makeOuterPath(h,k,360,e-360,m,a,g))):360<e?(n.push(DvtPieSlice._makeOuterPath(h,k,b,360-b,m,a,g)),n.push(DvtPieSlice._makeOuterPath(h,k,360,e-360,m,a,g))):180>
b&&180<e?(n.push(DvtPieSlice._makeOuterPath(h,k,b,180-b,m,a,g)),n.push(DvtPieSlice._makeOuterPath(h,k,180,e-180,m,a,g))):n.push(DvtPieSlice._makeOuterPath(h,k,b,d,m,a,g));return n};
DvtPieSlice._makeOuterPath=function(a,b,d,e,g,h,k){var m=[],n=[],o={x:0,y:0},q=DvtMath.degreesToRads(d),e=DvtMath.degreesToRads(e),s,t,u,v,w,x,y,o=DvtPieRenderUtils.reflectAngleOverYAxis(d,a,b,g,h);m.push(DvtPathUtils.moveTo(o.x,o.y));d=Math.ceil(Math.abs(e)/DvtMath.QUARTER_PI);e=-(e/d);s=-q;v=o.x;y=q=o.y;for(var z=g/Math.cos(e/2),A=h/Math.cos(e/2),q=0;q<d;q++)s+=e,t=s-e/2,w=a+Math.cos(s)*g,x=b+Math.sin(s)*h,u=a+Math.cos(t)*z,t=b+Math.sin(t)*A,m.push(DvtPathUtils.quadTo(u,t,w,x)),n.push(DvtPathUtils.quadTo(u,
t+k,v,y+k)),v=w,y=x;m.push(DvtPathUtils.lineTo(w,x+k));if(0<n.length){a=n.length;for(q=0;q<a;q++)b=n.pop(),m.push(b)}m.push(DvtPathUtils.lineTo(o.x,o.y));n="";o=m.length;for(q=0;q<o;q++)n+=m[q]+" ";return n};DvtPieSlice._generateInnerPoints=function(a,b,d,e,g){return[{x:a,y:b},{x:d,y:e},{x:d,y:e+g},{x:a,y:b+g}]};DvtPieSlice._pointArrayHelper=function(a,b){a||(a=[]);a.push(b.x);a.push(b.y);return a};var DvtSliceInfo=function(){this.Init()};DvtObj.createSubclass(DvtSliceInfo,DvtObj,"DvtSliceInfo");
DvtSliceInfo.prototype.Init=function(){this._explode=0;this._action=this._text=this._contextMenuId=this._tooltip=this._value=this._strokeAlpha=this._strokeColor=this._fp=this._fillAlpha=this._fillColor=this._index=this._id=null};DvtSliceInfo.prototype.getText=function(){return this._text};DvtSliceInfo.prototype.setText=function(a){this._text=a};DvtSliceInfo.prototype.getExplode=function(){return this._explode};DvtSliceInfo.prototype.setExplode=function(a){this._explode=a};
DvtSliceInfo.prototype.getFillAlpha=function(){return this._fillAlpha};DvtSliceInfo.prototype.setFillAlpha=function(a){this._fillAlpha=a};DvtSliceInfo.prototype.getFillColor=function(){return this._fillColor};DvtSliceInfo.prototype.setFillColor=function(a){this._fillColor=a};DvtSliceInfo.prototype.getFillPattern=function(){return this._fp};DvtSliceInfo.prototype.setFillPattern=function(a){this._fp=a};DvtSliceInfo.prototype.getId=function(){return this._id};
DvtSliceInfo.prototype.setIndex=function(a){this._index=a};DvtSliceInfo.prototype.getIndex=function(){return this._index};DvtSliceInfo.prototype.setId=function(a){this._id=a};DvtSliceInfo.prototype.getStrokeAlpha=function(){return this._strokeAlpha};DvtSliceInfo.prototype.setStrokeAlpha=function(a){this._strokeAlpha=a};DvtSliceInfo.prototype.getStrokeColor=function(){return this._strokeFill};DvtSliceInfo.prototype.setStrokeColor=function(a){this._strokeFill=a};DvtSliceInfo.prototype.getTooltip=function(){return this._tooltip};
DvtSliceInfo.prototype.setTooltip=function(a){this._tooltip=a};DvtSliceInfo.prototype.getContextMenuId=function(){return this._contextMenuId};DvtSliceInfo.prototype.setContextMenuId=function(a){this._contextMenuId=a};DvtSliceInfo.prototype.getValue=function(){return this._value};DvtSliceInfo.prototype.setValue=function(a){this._value=a};DvtSliceInfo.prototype.getAction=function(){return this._action};DvtSliceInfo.prototype.setAction=function(a){this._action=a};var DvtSliceLabelInfo=function(){this._init()};
DvtObj.createSubclass(DvtSliceLabelInfo,DvtObj,"DvtSliceLabelInfo");DvtSliceLabelInfo.prototype._init=function(){this._slice=this._sliceLabel=null;this._initialNumLines=this._y=this._x=this._height=this._width=this._position=this._angle=-1;this._hasFeeler=!1;this._minY=this._maxY=-1};DvtSliceLabelInfo.prototype.getAngle=function(){return this._angle};DvtSliceLabelInfo.prototype.setAngle=function(a){this._angle=a};DvtSliceLabelInfo.prototype.getHeight=function(){return this._height};
DvtSliceLabelInfo.prototype.setHeight=function(a){this._height=a};DvtSliceLabelInfo.prototype.getInitialNumLines=function(){return this._initialNumLines};DvtSliceLabelInfo.prototype.setInitialNumLines=function(a){this._initialNumLines=a};DvtSliceLabelInfo.prototype.getMaxY=function(){return this._maxY};DvtSliceLabelInfo.prototype.setMaxY=function(a){this._maxY=a};DvtSliceLabelInfo.prototype.getMinY=function(){return this._minY};DvtSliceLabelInfo.prototype.setMinY=function(a){this._minY=a};
DvtSliceLabelInfo.prototype.boundY=function(a){a=Math.max(a,this._minY);return a=Math.min(a,this._maxY)};DvtSliceLabelInfo.prototype.hasFeeler=function(){return this._hasFeeler};DvtSliceLabelInfo.prototype.setHasFeeler=function(a){this._hasFeeler=a};DvtSliceLabelInfo.prototype.getPosition=function(){return this._position};DvtSliceLabelInfo.prototype.setPosition=function(a){this._position=a};DvtSliceLabelInfo.prototype.getSlice=function(){return this._slice};
DvtSliceLabelInfo.prototype.setSlice=function(a){this._slice=a};DvtSliceLabelInfo.prototype.getSliceLabel=function(){return this._sliceLabel};DvtSliceLabelInfo.prototype.setSliceLabel=function(a){this._sliceLabel=a};DvtSliceLabelInfo.prototype.getWidth=function(){return this._width};DvtSliceLabelInfo.prototype.setWidth=function(a){this._width=a};DvtSliceLabelInfo.prototype.getX=function(){return this._x};DvtSliceLabelInfo.prototype.setX=function(a){this._x=a};DvtSliceLabelInfo.prototype.getY=function(){return this._y};
DvtSliceLabelInfo.prototype.setY=function(a){this._y=a};var DvtSliceLabelLayout=function(a){this._init(a)};DvtObj.createSubclass(DvtSliceLabelLayout,DvtObj,"DvtSliceLabelLayout");DvtSliceLabelLayout._FONT_METRIC_CHAR="M";DvtSliceLabelLayout._FEELER_MINLENGTH=9;DvtSliceLabelLayout._ISA_FULL_RATIO=0.9;DvtSliceLabelLayout._FEELER_RIGHT_SPECIAL_ANGLE=351;DvtSliceLabelLayout._FEELER_LEFT_SPECIAL_ANGLE=189;DvtSliceLabelLayout._MAX_LINES_PER_LABEL=3;DvtSliceLabelLayout._COLLISION_MARGIN=1;
DvtSliceLabelLayout._LEFT_SIDE_LABELS=1;DvtSliceLabelLayout._RIGHT_SIDE_LABELS=2;DvtSliceLabelLayout._LABEL_LEADING=-1.8;DvtSliceLabelLayout._ROUNDING_TOLERANCE=1.0E-4;DvtSliceLabelLayout._FEELER_RAD_MINSIZE=0.1;DvtSliceLabelLayout._FEELER_HORIZ_MINSIZE=0.1;DvtSliceLabelLayout._LABEL_TO_FEELER_OFFSET=0.7;DvtSliceLabelLayout._LABEL_TO_FEELER_DISTANCE=3;DvtSliceLabelLayout._NO_COLLISION=0;DvtSliceLabelLayout._HALF_COLLISION=1;DvtSliceLabelLayout._ALL_COLLISION=2;
DvtSliceLabelLayout.prototype._init=function(a){this._pieChart=a;this._isaTop;this._isaBottom;this._isaLeft;this._isaRight;this._isaHeight;this._isaXRadius;this._isaYRadius;this._avgHeightFont=-1};DvtSliceLabelLayout.prototype.layoutLabelsAndFeelers=function(){var a=this._pieChart.getPieInfo().getLabelPosition();a!=DvtPieChart.LABEL_POS_NONE&&(a==DvtPieChart.LABEL_POS_INSIDE?this._layoutInsideLabels():this._layoutOutsideLabelsAndFeelers())};
DvtSliceLabelLayout.prototype._layoutInsideLabels=function(){if(null!=this._pieChart){slices=this._pieChart.__getSlices();var a=slices.length;if(0<a)for(i=0;i<a;i++){var b=slices[i],d;d=b.getAngleStart()+b.getAngleExtent()/2;var e=0,g=0,h=DvtSliceLabelLayout._createLabel(b);d=DvtPieRenderUtils.reflectAngleOverYAxis(d,this._pieChart.getCenter().x,this._pieChart.getCenter().y,0.66*this._pieChart.getRadiusX(),0.66*this._pieChart.getRadiusY());e=d.x;g=d.y;h.setTranslateX(e);h.setTranslateY(g);h.alignCenter();
h.alignMiddle();b.setSliceLabel(h)}}};
DvtSliceLabelLayout.prototype._layoutOutsideLabelsAndFeelers=function(){if(null!=this._pieChart){var a=[],b=[],d,a=this._pieChart.__getSlices(),a=DvtSliceLabelLayout._createLabel(a[0]);a.setText(DvtSliceLabelLayout._FONT_METRIC_CHAR);this._avgHeightFont=DvtSliceLabelLayout._getTextDimension(this._pieChart,a,-1,-1,-1).y;this._pieChart.__getMaxExplodePixels();this._isaXRadius=this._pieChart.getRadiusX();this._isaYRadius=this._pieChart.getRadiusY();a=this._pieChart.__getFrame();this._isaLeft=a.x;this._isaRight=
a.x+a.w;this._isaTop=a.y;this._isaBottom=a.y+a.h;this._isaHeight=this._isaBottom-this._isaTop;this._originalLabels=[];var e=this._generateInitialLayout(),a=e[0],b=e[1];d=this._refineInitialLayout(a,DvtSliceLabelLayout._LEFT_SIDE_LABELS);var g=this._refineInitialLayout(b,DvtSliceLabelLayout._RIGHT_SIDE_LABELS);d==DvtSliceLabelLayout._HALF_COLLISION&&g!=DvtSliceLabelLayout._NO_COLLISION&&this._columnLabels(a,!0,!0,!0);d!=DvtSliceLabelLayout._NO_COLLISION&&g==DvtSliceLabelLayout._HALF_COLLISION&&this._columnLabels(b,
!1,!0,!0);this._setLabelsAndFeelers(a,DvtSliceLabelLayout._LEFT_SIDE_LABELS);for(d=0;d<a.length;d++)a[d]=null;this._setLabelsAndFeelers(b,DvtSliceLabelLayout._RIGHT_SIDE_LABELS);for(d=0;d<b.length;d++)b[d]=null;e[0]=null;e[1]=null}};
DvtSliceLabelLayout._createLabel=function(a){var b=a.getPieChart();if(b.getPieInfo().getLabelPosition()==DvtPieChart.LABEL_POS_NONE)return null;var d=b.getContext(),d=new DvtTextArea(d,0,0);d.alignBaseline();d.setWordWrap(!0);d.setAngle(0);b=b.getPieInfo().getCSSStyle();DvtSliceLabelLayout._setFontPropsOnLabel(b,d);b=DvtPieSlice.generateSliceLabelString(a);d.setText(b);a.setSliceLabelString(b);return d};DvtSliceLabelLayout._setFontPropsOnLabel=function(a,b){null==b||null==a||b.setCSSStyle(a)};
DvtSliceLabelLayout.prototype._refineInitialLayout=function(a,b){if(a&&0<a.length){var d=this._isaTop,e=!1,g=!1,h=!1,k=0,m,n=!1,o=n;m=!1;for(var q=b==DvtSliceLabelLayout._LEFT_SIDE_LABELS,s=0;s<a.length;s++)m=a[s],o=n,90<m.getPosition()&&(n=!0),k=m.getY()+m.getHeight(),(m=d-m.getY()>DvtSliceLabelLayout._COLLISION_MARGIN)&&(n?n&&!o?g=!0:h=!0:e=!0),k>d&&(d=k);if(e&&h||g)return this._columnLabels(a,q,!0,!0),DvtSliceLabelLayout._ALL_COLLISION;if(e)return this._columnLabels(a,q,!0,!1),DvtSliceLabelLayout._HALF_COLLISION;
return h?(this._columnLabels(a,q,!1,!0),DvtSliceLabelLayout._HALF_COLLISION):DvtSliceLabelLayout._NO_COLLISION}};
DvtSliceLabelLayout.prototype._setLabelsAndFeelers=function(a,b){if(!(null==a||0>=a.length)){var d,e,g,h,k=b==DvtSliceLabelLayout._LEFT_SIDE_LABELS;this._pieChart.getDepth();var m,n=-1,o=-1,q=-1;for(d=0;d<a.length;d++)h=a[d],e=h.getSlice(),g=h.getSliceLabel(),DvtSliceLabelLayout._adjustForDepth(h.getAngle(),this._pieChart.getDepth()),o=h.getX(),n=h.getY(),q=h.getHeight(),labelInfoWidth=h.getWidth(),m=n,m+=this._avgHeightFont,g.setTranslateY(m),g.setTranslateX(o),DvtStyleUtils.isLocaleR2L()&&k&&(DvtAgent.getAgent().isWebkit()&&
!DvtAgent.getAgent().isTouchDevice()?g.alignStart():g.alignEnd()),n<this._isaTop||n+q>this._isaBottom?e.setSliceLabel(null):e.setSliceLabel(g),h.hasFeeler()&&e.getSliceLabel()?DvtSliceLabelLayout._calculateFeeler(h,e,k):e.setNoOutsideFeeler()}};
DvtSliceLabelLayout._calculateFeeler=function(a,b,d){var e=b.getPieChart(),g=a.getX(),h=a.getY()+a.getHeight()*DvtSliceLabelLayout._LABEL_TO_FEELER_OFFSET,k=DvtSliceLabelLayout._FEELER_HORIZ_MINSIZE*e.getRadiusX();d?(g+=DvtSliceLabelLayout._LABEL_TO_FEELER_DISTANCE,k=g+k):(g-=DvtSliceLabelLayout._LABEL_TO_FEELER_DISTANCE,k=g-k);if(e.getPieInfo().getLabelPosition()==DvtPieChart.LABEL_POS_OUTSIDE_FEELERS){var m={x:0,y:0},k={x:k,y:h},g={x:g,y:h},m=a.getAngle(),h=DvtSliceLabelLayout._adjustForDepth(m,
e.getDepth()),m=DvtPieRenderUtils.reflectAngleOverYAxis(m,e.getCenter().x,e.getCenter().y+h,e.getRadiusX(),e.getRadiusY()),a=DvtMath.degreesToRads(a.getPosition()),e=Math.abs(Math.atan2(k.x-m.x,m.y-k.y)),h=(m.y-k.y)*Math.tan(a);if(a>Math.PI/2&&e>Math.PI/2&&e<a||a<Math.PI/2&&e<Math.PI/2&&e>a)k.x=d?m.x-h:m.x+h;b.setOutsideFeelerPoints(m,k,g)}};DvtSliceLabelLayout._adjustForDepth=function(a,b){var d=0;189<a&&351>a&&(d=b);return d};
DvtSliceLabelLayout.prototype._getMiddleLabel=function(a){bestAngle=91;bestIndex=-1;for(var b=0;b<a.length;b++)pa=a[b].getPosition(),Math.abs(pa-90)<bestAngle&&(bestAngle=Math.abs(pa-90),bestIndex=b);return bestIndex};
DvtSliceLabelLayout.prototype._setOptimalLabelPosition=function(a,b,d){a.setX(b);this._truncateSliceLabel(a.getSlice(),a,b,d);b=this._pieChart.getRadiusY()*(1+DvtSliceLabelLayout._FEELER_RAD_MINSIZE);d=DvtMath.degreesToRads(a.getPosition());b*=Math.cos(d);d=DvtSliceLabelLayout._adjustForDepth(a.getAngle(),this._pieChart.getDepth());b=this._pieChart.getCenter().y-b-a.getHeight()*DvtSliceLabelLayout._LABEL_TO_FEELER_OFFSET+d;a.setY(a.boundY(b))};
DvtSliceLabelLayout.prototype._columnLabels=function(a,b,d,e){var g=this._isaTop,h=this._isaBottom,k,m=this._pieChart.getCenter().x;k=this._pieChart.getRadiusX()*(1+DvtSliceLabelLayout._FEELER_RAD_MINSIZE+DvtSliceLabelLayout._FEELER_HORIZ_MINSIZE);m=b?m-k:m+k;for(k=0;k<a.length;k++)a[k].setMinY(g),g+=a[k].getHeight();for(k=a.length-1;0<=k;k--)h-=a[k].getHeight(),a[k].setMaxY(h);if(a[0].getMinY()>=a[0].getMaxY())for(k=0;k<a.length;k++)d=a[k],d.setX(m),this._truncateSliceLabel(d.getSlice(),d,m,b),d.setY((d.getMinY()+
d.getMaxY())/2),d.setHasFeeler(!0);else{g=this._getMiddleLabel(a);k=a[g];h=90>=k.getPosition();d&&!e&&k.getMinY()>this._pieChart.getCenter().y&&(e=!0);e&&!d&&k.getMaxY()<this._pieChart.getCenter().y&&(d=!0);if(d&&h||e&&!h)this._setOptimalLabelPosition(k,m,b),k.setHasFeeler(!0);var h=k.getY(),n=k.getY()+k.getHeight(),o,q;if(d)for(k=g-1;0<=k;k--)d=a[k],q=d.getHeight(),this._setOptimalLabelPosition(d,m,b),d.setHasFeeler(!0),o=d.getY(),h=o+q<h?o:h-q,d.setY(h);if(e)for(k=g+1;k<a.length;k++)d=a[k],q=d.getHeight(),
this._setOptimalLabelPosition(d,m,b),d.setHasFeeler(!0),o=d.getY(),n=o>n?o+q:n+q,d.setY(n-q)}};
DvtSliceLabelLayout.prototype._truncateSliceLabel=function(a,b,d,e){var g=b.getSliceLabel(),h=g.getCSSStyle(),k=0,k=this._pieChart.getNumChildren(),m=!1;this._pieChart.contains(g)||(this._pieChart.addChild(g),m=!0);g.setCSSStyle(h);a=a.getSliceLabelString();g.setText(a);m&&this._pieChart.removeChildAt(k);k=e?d-this._isaLeft:this._isaRight-d;d=DvtSliceLabelLayout._getTextDimension(this._pieChart,g,k,-1,b.getInitialNumLines());b.setWidth(d.x);return b.getHeight()!=d.y?(b.setHeight(d.y),!0):!1};
DvtSliceLabelLayout.prototype._generateInitialLayout=function(){var a=Array(2),b=[],d=[],e,g,h,k=0,m=0,n,o,q;slices=this._pieChart.__getSlices();o=slices.length;if(0<o)for(n=0;n<o;n++)e=slices[n],q=DvtSliceLabelLayout._createLabel(e),k=e.getAngleStart()+e.getAngleExtent()/2,360<k&&(k-=360),0>k&&(k+=360),g=DvtPieRenderUtils.reflectAngleOverYAxis(k,this._pieChart.getCenter().x,this._pieChart.getCenter().y,this._isaXRadius,this._isaYRadius),h=90<=k&&270>k?g.x-this._isaLeft:this._isaRight-g.x,h=DvtSliceLabelLayout._getTextDimension(this._pieChart,
q,h,-1,DvtSliceLabelLayout._MAX_LINES_PER_LABEL),DvtSliceLabelLayout._is3DSpecialRegion(k,this._pieChart.is3D())&&(g.y-=h.y),165>k&&15<k?g.y-=1.4*h.y:15>k||345<k?(g.y-=0.7*h.y,g.x+=0.25*h.y):165<k&&195>k&&(g.y-=0.7*h.y,g.x-=0.25*h.y),m=DvtSliceLabelLayout._adjustForDepth(k,this._pieChart.getDepth()),g.y+=m,1==o&&(g.x-=h.x/2),g.y<this._isaTop&&(g.y=this._isaTop),g.y+h.y>this._isaBottom&&(g.y=this._isaBottom-h.y),90<=k&&270>k?(q.alignEnd(),m=k-90,DvtSliceLabelLayout._createLabelInfo(e,q,k,m,h,g,b)):
(m=90>=k?Math.abs(90-k):180-(k-270),DvtSliceLabelLayout._createLabelInfo(e,q,k,m,h,g,d));a[0]=b;a[1]=d;return a};DvtSliceLabelLayout._isOnHorizontalAxis=function(a){return a<DvtSliceLabelLayout._ROUNDING_TOLERANCE||Math.abs(a-180)<DvtSliceLabelLayout._ROUNDING_TOLERANCE||Math.abs(a-360)<DvtSliceLabelLayout._ROUNDING_TOLERANCE};
DvtSliceLabelLayout._createLabelInfo=function(a,b,d,e,g,h,k){for(var m=-1,n,o=0;o<k.length;o++)if(n=k[o],n.getPosition()>e){m=o;break}-1==m&&(m=k.length);n=new DvtSliceLabelInfo;n.setPosition(e);n.setAngle(d);n.setSliceLabel(b);n.setSlice(a);n.setWidth(g.x);n.setHeight(g.y);n.setInitialNumLines(b.getNumLines());n.setX(h.x);n.setY(h.y);k.splice(m,0,n)};
DvtSliceLabelLayout._is3DSpecialRegion=function(a,b){return b?a<=DvtSliceLabelLayout._FEELER_LEFT_SPECIAL_ANGLE&&180<a||a>=DvtSliceLabelLayout._FEELER_RIGHT_SPECIAL_ANGLE&&360>a:!1};DvtSliceLabelLayout._getTextDimension=function(a,b,d,e,g){e=a.getNumChildren();a.addChild(b);b.setLeading(DvtSliceLabelLayout._LABEL_LEADING);b.setWordWrap(!0);b.setMaxLines(g);b.setMaxWidth(d);d={x:0,y:0};b=b.getDimensions();d.x=b.w;d.y=b.h;a.removeChildAt(e);return d};var DvtAnimOnDisplay=function(){};
DvtObj.createSubclass(DvtAnimOnDisplay,DvtObj,"DvtAnimOnDisplay");DvtAnimOnDisplay.createAnimation=function(a,b,d){var b=[],e=a.getType();"bar"===e||"horizontalBar"===e||"line"===e||"area"===e||"combo"===e?DvtAnimOnDisplay._animBarLineArea(a,d,b):("bubble"===e||"scatter"===e)&&DvtAnimOnDisplay._animBubbleScatter(a,d,b);return 0<b.length?new DvtParallelPlayable(a.getContext(),b):null};
DvtAnimOnDisplay._animBarLineArea=function(a,b,d){var e=a.getObjects(),g=e?e.length:0;if(g){var h,k,m;h=a.getType();0<=h.indexOf("bar")||h.indexOf("Bar");for(var n=0;n<g;n++){k=e[n];h=k.getDisplayables()[0];m=null;if(h instanceof DvtPolyline)m=DvtAnimOnDisplay._getLinePlayable(a,h,b);else if(h instanceof DvtPolygon)k=k.getSeriesType(),"bar"===k?m=DvtAnimOnDisplay._getBarPlayable(a,h,b):"area"===k&&(m=DvtAnimOnDisplay._getAreaPlayable(a,h,b));else{if(!k.getSeriesItem().markerDisplayed)continue;m=new DvtAnimFadeIn(a.getContext(),
h,b-0.8,0.8)}m&&d.push(m)}}};DvtAnimOnDisplay._animBubbleScatter=function(a,b,d){var e=a.getObjects(),g=e?e.length:0,h=a.getType();if(g)for(var k,m=0;m<g;m++)k=e[m],k=k.getDisplayables()[0],k instanceof DvtMarker&&(k="bubble"===h?DvtAnimOnDisplay._getBubblePlayable(a,k,b):DvtAnimOnDisplay._getScatterPlayable(a,k,b),d.push(k))};
DvtAnimOnDisplay._getAreaPlayable=function(a,b,d){var e=b.getPoints(),g=e.slice(0),h=e.length;if(4>=h)return null;var k=e[h-1],h=h-4;for(j=0;j<h;j+=2)e[j+1]=k;b.setPoints(e);a=new DvtCustomAnimation(a.getContext(),b,d);a.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,b,b.getPoints,b.setPoints,g);return a};
DvtAnimOnDisplay._getBarPlayable=function(a,b,d){var e=b.getPoints(),g=e.slice(0),h=a.yAxis.getBaselineCoord();DvtChartTypeUtils.isHorizontal(a)?(e[0]=h,e[2]=h,DvtChartTypeUtils.isStacked(a)&&(e[4]=h,e[6]=h)):(e[1]=h,e[3]=h,DvtChartTypeUtils.isStacked(a)&&(e[5]=h,e[7]=h));b.setPoints(e);a=new DvtCustomAnimation(a.getContext(),b,d);a.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,b,b.getPoints,b.setPoints,g);return a};
DvtAnimOnDisplay._getBubblePlayable=function(a,b,d){var a=a.getContext(),e=new DvtPoint(b.getScaleX(),b.getScaleY());b.setScaleX(1);b.setScaleY(1);var e=new DvtAnimScaleBy(a,b,e,d),g=new DvtAnimFadeIn(a,b,d),h=b.getSize(),k=b.getMatrix().clone();k.translate(h/2,h/2);b.setMatrix(k);b=new DvtAnimMoveBy(a,b,new DvtPoint(-h/2,-h/2),d);return new DvtParallelPlayable(a,[e,g,b])};
DvtAnimOnDisplay._getLinePlayable=function(a,b,d){var e=b.getPoints(),g=e.slice(0);DvtAnimOnDisplay._getMeanPoints(e);b.setPoints(e);a=new DvtCustomAnimation(a.getContext(),b,d);a.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,b,b.getPoints,b.setPoints,g);return a};DvtAnimOnDisplay._getScatterPlayable=function(a,b,d){return new DvtAnimPopIn(a.getContext(),b,!0,d)};
DvtAnimOnDisplay._getMeanPoints=function(a){var b=0,d=Number.MAX_VALUE,e=Number.MIN_VALUE,g=a.length,h;for(h=1;h<g;h+=2){var k=a[h];k<d&&(d=k);k>e&&(e=k);b+=k}4<g?b=(b-d-e)/((g-4)/2):(b=a[1],a[2]=a[0]);b=Math.round(b);for(h=1;h<g;h+=2)a[h]=b};var DvtAnimOnDC=function(){};DvtObj.createSubclass(DvtAnimOnDC,DvtObj,"DvtAnimOnDC");
DvtAnimOnDC.createAnimation=function(a,b,d,e,g){d=null;if(!DvtAnimOnDC._canAnimate(a,b))return null;var h=b.getContext(),k=[],m=[];b.getObjects();"pie"===b.getType()?(k.push(a.pieChart),m.push(b.pieChart)):DvtAnimOnDC._buildAnimLists(h,k,a,m,b,e);a=new DvtDataAnimationHandler(h,g);a.constructAnimation(k,m);0<a.getNumPlayables()&&(d=a.getAnimation());return d};
DvtAnimOnDC._buildAnimLists=function(a,b,d,e,g,h){var a=d.peers,k=a.length;if(!(0>=k&&0>=g.getObjects().length)){var m,n,o,q,s,t;s=d.type;0<=s.indexOf("bar")||s.indexOf("Bar");n=b;for(b=0;2>b;b++){for(m=0;m<k;m++)o=a[m],q=o.getDisplayables()[0],t=null,q instanceof DvtPolyline?t=new DvtDCLineArea(o,h):q instanceof DvtPolygon?(q=o.getSeriesType(),"bar"===q?t=new DvtDC2DBar(o,h):"area"===q&&(t=new DvtDCLineArea(o,h))):q instanceof DvtMarker&&(bMarkerDisplayed="scatter"===s||"bubble"===s?!0:1==b?o.getSeriesItem().markerDisplayed:
DvtChartDataUtils.getSeriesItem(d,o.getSeriesIndex()).markerDisplayed)&&(t=new DvtDCMarker(o,h)),t&&(n.push(t),t.setOldChart(d));n=e;a=g.getObjects();k=a.length}}};DvtAnimOnDC._canAnimate=function(a,b){var d=a.type,e=b.getType();return d!==e?!1:"pie"===a.type&&(!a||!b)?!1:"pie"!==a.type&&(0===a.peers.length||0===b.getObjects().length)?!1:!0};var DvtDCAbstract=function(a,b){this.Init(a,b)};DvtObj.createSubclass(DvtDCAbstract,DvtObj,"DvtDCAbstract");DvtDCAbstract.prototype.animateUpdate=function(){};
DvtDCAbstract.prototype.animateInsert=function(){};DvtDCAbstract.prototype.animateDelete=function(){};DvtDCAbstract.prototype.getId=function(){return this._animId};DvtDCAbstract.prototype.Init=function(a,b){this._peer=a;this._duration=b;this._shape=a.getDisplayables()[0];this._animId=a.getSeries()+"/"+a.getGroup()};DvtDCAbstract.prototype.setOldChart=function(a){this._oldChart=a};var DvtDC2DBar=function(a,b){this.Init(a,b)};DvtObj.createSubclass(DvtDC2DBar,DvtDCAbstract,"DvtDC2DBar");
DvtDC2DBar.prototype.animateUpdate=function(a,b){var d=b._getAnimationParams(),e=this._getAnimationParams();if(!DvtArrayUtils.equals(d,e)){var g=this._oldChart,h=this._peer.getChart(),k=this._peer.getSeriesIndex(),m=b._peer.getSeriesIndex(),n=this._peer.getGroupIndex(),o=b._peer.getGroupIndex();"none"!==DvtChartStyleUtils.getAnimationIndicators(h)&&this._makeDirPointer(d,g,m,o,h,k,n);this._setAnimationParams(d);d=new DvtCustomAnimation(this._shape.getContext(),this,this._duration);d.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,
this,this._getAnimationParams,this._setAnimationParams,e);this._indicator&&d.setOnEnd(this._onEndAnimation,this);a.add(d,0)}};
DvtDC2DBar.prototype.animateInsert=function(a){var b=this._shape,d=DvtChartTypeUtils.isHorizontal(this._peer.getChart()),e=b.getPoints(),g=e.slice(0);e.push(b.getAlpha());g.push(0);d?(d=(g[7]-g[1])/2,g[1]+=d,g[3]+=d,g[5]-=d,g[7]-=d):(d=(g[2]-g[0])/2,g[0]+=d,g[2]-=d,g[4]-=d,g[6]+=d);this._setAnimationParamsPlusAlpha(g);b=new DvtCustomAnimation(b.getContext(),this,this._duration);b.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this,this._getAnimationParamsPlusAlpha,this._setAnimationParamsPlusAlpha,
e);a.add(b,0)};DvtDC2DBar.prototype.animateDelete=function(a,b){var d=this._shape,e=DvtChartTypeUtils.isHorizontal(this._peer.getChart());b.addChild(d);var g=d.getPoints(),h=g.slice(0);e?(e=(g[7]-g[1])/2,h[1]+=e,h[3]+=e,h[5]-=e,h[7]-=e):(e=(g[2]-g[0])/2,h[0]+=e,h[2]-=e,h[4]-=e,h[6]+=e);h.push(0);d=new DvtCustomAnimation(d.getContext(),this,this._duration);d.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this,this._getAnimationParamsPlusAlpha,this._setAnimationParamsPlusAlpha,h);a.add(d,0)};
DvtDC2DBar.prototype._getAnimationParams=function(){return this._shape.getPoints()};DvtDC2DBar.prototype._getAnimationParamsPlusAlpha=function(){var a=this._shape.getPoints();a.slice(0);a.push(this._shape.getAlpha());return a};DvtDC2DBar.prototype._getIndicatorPos=function(a){var b,d=a[0],e=a[1];this._bVertical?(b=(a[2]-a[0])/2,a=(a[5]-a[3])/2,this._bStacked?(d+=b,e+=a):(d+=b,e+=this._offset)):(b=(a[0]-a[6])/2,a=(a[3]-a[1])/2,d=this._bStacked?d-b:d+this._offset,e+=a);this._xPos=d;this._yPos=e};
DvtDC2DBar.prototype.Init=function(a,b){DvtDC2DBar.superclass.Init.call(this,a,b);this._indicator=null;this._bVertical=!DvtChartTypeUtils.isHorizontal(a.getChart());this._bStacked=DvtChartTypeUtils.isStacked(a.getChart())};
DvtDC2DBar.prototype._makeDirPointer=function(a,b,d,e,g,h,k){b=DvtDCUtils.getDirection(b,d,e,g,h,k);b!==DvtDCUtils.DIR_NOCHANGE&&(b=b===DvtDCUtils.DIR_DOWN,this._offset=-10,!this._bStacked&&!this._bVertical&&(this._offset=DvtStyleUtils.isLocaleR2L()?-8:8),this._getIndicatorPos(a),fc=b?DvtChartStyleUtils.getAnimationDownColor(g):DvtChartStyleUtils.getAnimationUpColor(g),a=DvtDCUtils.drawDirectionPointer(b,this._xPos,this._yPos,this._offset,fc,this._shape.getContext(),!this._bVertical),g.getPlotArea().addChild(a),
this._indicator=a)};DvtDC2DBar.prototype._setAnimationParams=function(a){this._shape.setPoints(a);if(this._indicator){var b=this._peer.getChart().getPlotArea(),d=this._indicator;b.removeChild(d);this._getIndicatorPos(a);d.setTranslateX(this._xPos);d.setTranslateY(this._yPos);b.addChild(d)}};DvtDC2DBar.prototype._setAnimationParamsPlusAlpha=function(a){var b=a[a.length-1];this._shape.setPoints(a.slice(0,a.length-1));this._shape.setAlpha(b)};
DvtDC2DBar.prototype._onEndAnimation=function(){this._peer.getChart().getPlotArea().removeChild(this._indicator);this._indicator=null};var DvtDCLineArea=function(a,b){this.Init(a,b)};DvtObj.createSubclass(DvtDCLineArea,DvtDCAbstract,"DvtDCLineArea");
DvtDCLineArea.prototype.animateUpdate=function(a,b){var d=b._getAnimationParams(),e=this._getAnimationParams();this._finalState=null;if(!DvtArrayUtils.equals(d,e)){var g=this._oldChart,h=this._peer.getChart(),k=DvtChartDataUtils.getGroups(g),m=DvtChartDataUtils.getGroups(h),n=k.length,o=m.length,q=DvtDCUtils.compareGroups(k,m),s=q[0],t=q[1],q=q[2],u=0<t.length||0<q.length,v=[],w=0,x=null,y=null;u&&(x=[],y=[]);this._arDirection=this._arPointers=null;"none"!==DvtChartStyleUtils.getAnimationIndicators(h)&&
0<s.length&&!u&&(this._arPointers=[],this._arDirection=[]);for(var s=b._getAnimationParams(),z=this._getAnimationParams(),A=this._peer.getSeriesIndex(),F=b._peer.getSeriesIndex(),C=0,E=0,I=0,G=0;C<n||E<o;)if(C<n&&E<o)if(k[C]===m[E]){v[w]=DvtDCUtils.UPDATE;var I=2*C,G=2*E,L=s[I++],I=s[I];null!=this._arPointers&&this._makeDirPointer(L,I,g,F,E,h,A,E,w);C++;E++;w++;u&&(x.push(L),x.push(I),y.push(z[G++]),y.push(z[G]))}else-1<DvtArrayUtils.getIndex(q,k[C])?(v[w]=DvtDCUtils.DELETE,I=2*C,x.push(s[I++]),x.push(s[I]),
y.push(0),y.push(0),C++,null!=this._arPointers&&(this._arPointers[w]=null,this._arDirection[w]=null),w++):-1<DvtArrayUtils.getIndex(t,m[E])?(v[w]=DvtDCUtils.INSERT,G=2*E,x.push(0),x.push(0),y.push(z[G++]),y.push(z[G]),E++,null!=this._arPointers&&(this._arPointers[w]=null,this._arDirection[w]=null),w++):(C++,E++);else{if(C<n)for(;C<n;)v[w]=DvtDCUtils.DELETE=1,I=2*C,x.push(s[I++]),x.push(s[I]),y.push(0),y.push(0),C++,null!=this._arPointers&&(this._arPointers[w]=null,this._arDirection[w]=null),w++;else for(;E<
o;)v[w]=DvtDCUtils.INSERT,G=2*E,x.push(0),x.push(0),y.push(z[G++]),y.push(z[G]),E++,null!=this._arPointers&&(this._arPointers[w]=null,this._arDirection[w]=null),w++;break}if(u){w=o=t=o=n=m=0;d=v.length;for(g=0;g<d;g++)if(v[g]!=DvtDCUtils.UPDATE){t=v[g];k=1;for(u=g+1;u<d&&!(v[u]!=t);u++)k++;m=u===d;if(0===g)if(t===DvtDCUtils.INSERT){t=2*(g+k);m=x[t];n=x[t+1];for(u=0;u<k;u++)0<u&&g++,t=2*g,x[t++]=m,x[t]=n}else{t=2*(g+k);m=y[t];n=y[t+1];for(u=0;u<k;u++)0<u&&g++,t=2*g,y[t++]=m,y[t]=n}else if(g===d-1||
m)if(t===DvtDCUtils.INSERT)t=2*(g-1),m=x[t],n=x[t+1],t=2*g,x[t++]=m,x[t]=n;else{t=2*(g-1);m=y[t];n=y[t+1];for(u=0;u<k;u++)0<u&&g++,t=2*g,y[t++]=m,y[t]=n}else if(t===DvtDCUtils.INSERT){u=2*(g-1);m=x[u++];n=x[u];u=2*(g+k);o=x[u++];t=x[u];o=(o-m)/(k+1);w=(t-n)/(k+1);for(u=0;u<k;u++)0<u&&g++,t=2*g,m+=o,n+=w,x[t++]=m,x[t]=n}else{u=2*(g-1);m=y[u++];n=y[u];u=2*(g+k);o=y[u++];t=y[u];o=(o-m)/(k+1);w=(t-n)/(k+1);for(u=0;u<k;u++)0<u&&g++,t=2*g,m+=o,n+=w,y[t++]=m,y[t]=n}}h.getType();"area"===this._peer.getSeriesType()&&
(I=s.length-4,G=z.length-4,x.push(s[I]),x.push(s[++I]),x.push(s[++I]),x.push(s[++I]),y.push(z[G]),y.push(z[++G]),y.push(z[++G]),y.push(z[++G]));d=x;0<q.length&&(this._finalState=e);e=y}this._setAnimationParams(d);h=new DvtCustomAnimation(this._shape.getContext(),this,this._duration);h.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this,this._getAnimationParams,this._setAnimationParams,e);h.setOnEnd(this._onEndAnimation,this);a.add(h,0)}};
DvtDCLineArea.prototype._onEndAnimation=function(){if(this._finalState)this._shape.setPoints(this._finalState);else if(null!==this._arPointers){for(var a=this._arPointers,b=a.length,d=this._peer.getChart().getPlotArea(),e,g=0;g<b;g++)(e=a[g])&&d.removeChild(e);this._arDirections=this._arPointers=null}};DvtDCLineArea.prototype.animateInsert=function(a){var b=new DvtAnimFadeIn(this._shape.getContext(),this._shape,this._duration);a.add(b,0)};
DvtDCLineArea.prototype.animateDelete=function(a,b){b.addChild(this._shape);var d=new DvtAnimFadeOut(this._shape.getContext(),this._shape,this._duration);a.add(d,0)};DvtDCLineArea.prototype._getAnimationParams=function(){return this._shape.getPoints()};DvtDCLineArea.prototype.Init=function(a,b){DvtDCLineArea.superclass.Init.call(this,a,b);this._animId=a.getSeries()};
DvtDCLineArea.prototype._makeDirPointer=function(a,b,d,e,g,h,k,m,n){var o=null,q=!1,d=DvtDCUtils.getDirection(d,e,g,h,k,m);d!==DvtDCUtils.DIR_NOCHANGE&&(o=(q=d==DvtDCUtils.DIR_DOWN)?DvtChartStyleUtils.getAnimationDownColor(h):DvtChartStyleUtils.getAnimationUpColor(h),d=(d=this._shape.getStroke())?d.getWidth():5,o=DvtDCUtils.drawDirectionPointer(q,a,b,d,o,this._shape.getContext(),!1),h.getPlotArea().addChild(o));this._arPointers[n]=o;this._arDirection[n]=q};
DvtDCLineArea.prototype._setAnimationParams=function(a){this._shape.setPoints(a);if(null!==this._arPointers)for(var b,d,e=this._peer.getChart().getPlotArea(),g=this._arPointers.length,h=0;h<g;h++)if(b=this._arPointers[h])e.removeChild(b),d=this._arDirection?12:-12,b.setTranslateY(a[2*h+1]+d),e.addChild(b)};var DvtDCMarker=function(a,b){this.Init(a,b)};DvtObj.createSubclass(DvtDCMarker,DvtDCAbstract,"DvtDCMarker");
DvtDCMarker.prototype.animateUpdate=function(a,b){var d=b._shape,e=this._shape,g=e.getMatrix().clone(),h=new DvtMatrix(this._context);h.translate(-e.getX(),-e.getY());h.scale(d.getWidth()/e.getWidth(),d.getHeight()/e.getHeight());h.translate(d.getX(),d.getY());if(!g.equals(h)){var k=new DvtCustomAnimation(this._shape.getContext(),this,this._duration);this._shape.setMatrix(h);k.getAnimator().addProp(DvtAnimator.TYPE_MATRIX,this._shape,this._shape.getMatrix,this._shape.setMatrix,g);if(this.isValueChange(b)&&
"none"!==DvtChartStyleUtils.getAnimationIndicators(this._peer.getChart())){var g=b._shape,m;"scatter"===b._peer.getChart().getType()?(h="#FFFF2B",m=0.7):(h="#D5D500",m=0.4);m=new DvtSolidFill(h,m);h=this._shape.getAlpha();this._shape.setAlpha(0);g.setFill(m);this._peer.getChart().getPlotArea().addChild(g);m=new DvtMatrix(this._context);m.translate(-d.getX(),-d.getY());m.scale(e.getWidth()/d.getWidth(),e.getHeight()/d.getHeight());m.translate(e.getX(),e.getY());k.getAnimator().addProp(DvtAnimator.TYPE_NUMBER,
this._shape,this._shape.getAlpha,this._shape.setAlpha,h);k.getAnimator().addProp(DvtAnimator.TYPE_MATRIX,g,g.getMatrix,g.setMatrix,m);k.getAnimator().addProp(DvtAnimator.TYPE_NUMBER,g,g.getAlpha,g.setAlpha,0);this._overlay=g;k.setOnEnd(this._onEndAnimation,this)}a.add(k,0)}};DvtDCMarker.prototype.animateInsert=function(a){var b=new DvtAnimFadeIn(this._shape.getContext(),this._shape,this._duration);a.add(b,0)};
DvtDCMarker.prototype.animateDelete=function(a,b){b.addChild(this._shape);var d=new DvtAnimFadeOut(this._shape.getContext(),this._shape,this._duration);a.add(d,0)};
DvtDCMarker.prototype.isValueChange=function(a){var b=!1;if(a)var b=a._peer.getSeriesIndex(),d=a._peer.getGroupIndex(),e=this._peer.getSeriesIndex(),g=this._peer.getGroupIndex(),a=a._oldChart.getData(),h=this._peer.getChart().getData(),k=a.series[b].data[d].y,m=a.series[b].data[d].z,n=h.series[e].data[g].y,o=h.series[e].data[g].z,b=h.series[e].data[g].x!==a.series[b].data[d].x||n!==k||o!==m;return b};
DvtDCMarker.prototype._onEndAnimation=function(){this._overlay&&(this._peer.getChart().getPlotArea().removeChild(this._overlay),this._overlay=null)};var DvtDCUtils={};DvtObj.createSubclass(DvtDCUtils,DvtObj,"DvtDCUtils");DvtDCUtils.DIR_UP=0;DvtDCUtils.DIR_DOWN=1;DvtDCUtils.DIR_NOCHANGE=2;DvtDCUtils.UPDATE=0;DvtDCUtils.DELETE=1;DvtDCUtils.INSERT=2;
DvtDCUtils.getDirection=function(a,b,d,e,g,h){a=DvtChartDataUtils.getValue(a,b,d);e=DvtChartDataUtils.getValue(e,g,h);return e>a?DvtDCUtils.DIR_UP:e<a?DvtDCUtils.DIR_DOWN:DvtDCUtils.DIR_NOCHANGE};
DvtDCUtils.drawDirectionPointer=function(a,b,d,e,g,h,k){k=k?(DvtStyleUtils.isLocaleR2L()?!a:a)?DvtPathUtils.moveTo(2,-5)+DvtPathUtils.lineTo(2,5)+DvtPathUtils.lineTo(-5,0)+DvtPathUtils.lineTo(2,-5):DvtPathUtils.moveTo(-5,-5)+DvtPathUtils.lineTo(-5,5)+DvtPathUtils.lineTo(2,0)+DvtPathUtils.lineTo(-5,-5):a?DvtPathUtils.moveTo(-5,0)+DvtPathUtils.lineTo(5,0)+DvtPathUtils.lineTo(0,7)+DvtPathUtils.lineTo(-5,0):DvtPathUtils.moveTo(-5,0)+DvtPathUtils.lineTo(5,0)+DvtPathUtils.lineTo(0,-7)+DvtPathUtils.lineTo(-5,
0);k+=DvtPathUtils.closePath();h=new DvtPath(h,k);g=new DvtSolidFill(g);h.setFill(g);e+=12;d+=a?e:-e;h.setTranslateX(b);h.setTranslateY(d);return h};DvtDCUtils.compareGroups=function(a,b){var d=[],e=[],g=[],h=a.length,b=b.slice(0);if(a)for(var k=0;k<h;k++){for(var m=a[k],n=!1,o=0;o<b.length;o++)if(m===b[o]){b.splice(o,1);n=!0;d.push(m);break}n||g.push(m)}for(h=0;h<b.length;h++)b[h]&&e.push(b[h]);return[d,e,g]};var DvtChart=function(){};DvtObj.createSubclass(DvtChart,DvtContainer,"DvtChart");
DvtChart.newInstance=function(a,b,d,e){return new DvtChartImpl(a,b,d,e)};
DvtChart.prototype.Init=function(a,b,d,e){DvtChart.superclass.Init.call(this,a);this._callback=b;this._callbackObj=d;this.Bundle=new DvtChartBundle;this.EventHandler=new DvtChartEventManager(this);this.EventHandler.addListeners(this);this.setOptions(e);this.setId("chart1000"+Math.floor(1E4*Math.random()));a.getDocumentUtils().isFilterSupported()||(DvtSelectionEffectUtils.DEFAULT_SEL_TYPE=DvtSelectionEffectUtils.SEL_TYPE_STROKE_NO_FILTERS);this._animation=null};
DvtChart.prototype.setOptions=function(a){this.Options=DvtChartDefaults.calcOptions(a);"dim"==DvtChartEventUtils.getRolloverBehavior(this)?this.EventHandler.setSeriesRolloverHandler(new DvtChartSeriesRolloverHandler(this,this.EventHandler)):this.EventHandler.setSeriesRolloverHandler(null);if(this.getContext()instanceof DvtXmlContext||this.getContext()instanceof DvtCanvasContext)this.Options.chart.animationOnDisplay="none",this.Options.chart.animationOnDataChange="none"};
DvtChart.prototype.render=function(a,b,d){var e=DvtChartStyleUtils.getAnimationOnDataChange(this),g=null;this.Data&&"none"!==e&&(g={type:this.getType(),data:this.Data,peers:this.getObjects().slice(0),getData:function(){return this.data},pieChart:this.pieChart},this.clearObjects());a?(this.Data=DvtJSONUtils.clone(a),DvtChartDataUtils.processDataObject(this)):this.Data&&(this.Data.selection=DvtChartDataUtils.getCurrentSelection(this));!isNaN(b)&&!isNaN(d)&&(this.Width=b,this.Height=d);DvtAgent.getAgent().isTouchDevice()&&
this.EventHandler.setTouchRegionBounds(new DvtRectangle(0,0,parseInt(b),parseInt(d)));var h=new DvtContainer(this.getContext());this.addChild(h);DvtChartRenderer.render(this,h,new DvtRectangle(0,0,this.Width,this.Height));this._animation&&(this._animationStopped=!0,this._animation.stop());var k=DvtChartStyleUtils.getAnimationOnDisplay(this),m=DvtChartStyleUtils.getAnimationDuration(this),n=new DvtRectangle(0,0,this.Width,this.Height),o=!1;this._container?"none"!=e&&a&&((this._animation=DvtBlackBoxAnimationHandler.getCombinedAnimation(this.getContext(),
e,this._container,h,n,m))?o=!0:(this._delContainer=new DvtContainer(this.getContext(),"DelTainer"),this._animation=DvtAnimOnDC.createAnimation(g,this,e,m,this._delContainer),0<this._delContainer.getNumChildren()&&this.getPlotArea().addChild(this._delContainer))):"none"!==k&&(this._animation=DvtBlackBoxAnimationHandler.getInAnimation(this.getContext(),k,h,n,m),this._animation||(this._animation=DvtAnimOnDisplay.createAnimation(this,k,m)));this._animation&&(this._animation.play(),this._animation.setOnEnd(this._onAnimationEnd,
this));o?this._oldContainer=this._container:this._container&&this.removeChild(this._container);this._container=h;if(this.__isDataCursorEnabled()){this._dcContainer&&this.removeChild(this._dcContainer);this._dataCursor=DvtChartTypeUtils.isHorizontal(this)?new DvtDataCursorHorizontal(this.getContext()):new DvtDataCursorVertical(this.getContext());switch(this.Options.chart.dataCursorBehavior){case "auto":this._dataCursor.setBehavior(DvtDataCursor.BEHAVIOR_AUTO);break;case "snap":this._dataCursor.setBehavior(DvtDataCursor.BEHAVIOR_SNAP);
break;case "smooth":this._dataCursor.setBehavior(DvtDataCursor.BEHAVIOR_SMOOTH)}this._dataCursor.getBehavior()==DvtDataCursor.BEHAVIOR_AUTO&&(DvtChartTypeUtils.isLine(this)||DvtChartTypeUtils.isArea(this)?this._dataCursor.setBehavior(DvtDataCursor.BEHAVIOR_SMOOTH):this._dataCursor.setBehavior(DvtDataCursor.BEHAVIOR_SNAP));this._dataCursor.setDataCursorBounds(new DvtRectangle(0,0,parseInt(b),parseInt(d)));this._dcContainer=a=new DvtContainer(this.getContext(),"dccont");a.addChild(this._dataCursor);
this.addChild(this._dcContainer);this.EventHandler.setDataCursorHandler(new DvtChartDCEH(this));this.legend&&(this.EventHandler.setSeriesFocusHandler(this.legend._eventHandler.SeriesFocusHandler),this._currentSeriesCategory&&DvtChartSeriesFocusHandler.HighlightSeries(this,this.legend,null,this._currentSeriesCategory))}this.getContext().queueRender()};
DvtChart.prototype.__isDataCursorEnabled=function(){return DvtChartTypeUtils.isPie(this)?!1:"on"===this.Options.chart.dataCursor||"auto"===this.Options.chart.dataCursor&&DvtAgent.getAgent().isTouchDevice()&&(DvtChartTypeUtils.isLine(this)||DvtChartTypeUtils.isArea(this))&&"none"===this.Options.chart.dataSelection?!0:!1};DvtChart.prototype.__dispatchEvent=function(a){DvtEventDispatcher.dispatchEvent(this._callback,this._callbackObj,this,a)};
DvtChart.prototype._onAnimationEnd=function(){this._oldContainer&&(this.removeChild(this._oldContainer),this._oldContainer=null);this._delContainer&&0<this._delContainer.getNumChildren()&&this.getPlotArea().removeChild(this._delContainer);this._delContainer=null;this._animationStopped=!1;this._animation=null;this._currentSeriesCategory&&DvtChartSeriesFocusHandler.HighlightSeries(this,this.legend,null,this._currentSeriesCategory)};var DvtChartImpl=function(a,b,d,e){this.Init(a,b,d,e)};
DvtObj.createSubclass(DvtChartImpl,DvtChart,"DvtChartImpl");DvtChartImpl.prototype.Init=function(a,b,d,e){DvtChartImpl.superclass.Init.call(this,a,b,d,e);this.pieChart=this.y2Axis=this.yAxis=this.xAxis=this.legend=null;this._peers=[];this._seriesStyleArray=[];this._numSelectedObjsInFront=this._numFrontObjs=0};
DvtChartImpl.prototype.setOptions=function(a){DvtChartImpl.superclass.setOptions.call(this,a);a=this.Options.chart.dataSelection;this._selectionHandler="single"==a?new DvtSelectionHandler(DvtSelectionHandler.TYPE_SINGLE):"multiple"==a?new DvtSelectionHandler(DvtSelectionHandler.TYPE_MULTIPLE):null;this.EventHandler.setSelectionHandler(this._selectionHandler)};DvtChartImpl.prototype.getEventManager=function(){return this.EventHandler};
DvtChartImpl.prototype.processEvent=function(a,b){var d=a.getType();if(d==DvtHideShowCategoryEvent.TYPE_HIDE||d==DvtHideShowCategoryEvent.TYPE_SHOW){if("none"!=DvtChartEventUtils.getHideAndShowBehavior(this)){d=d==DvtHideShowCategoryEvent.TYPE_HIDE?"hidden":"visible";DvtChartEventUtils.setVisibility(this,a.getCategory(),d);this.render(null,this.Width,this.Height);return}}else if(d==DvtCategoryRolloverEvent.TYPE_OVER||d==DvtCategoryRolloverEvent.TYPE_OUT)"dim"==DvtChartEventUtils.getRolloverBehavior(this)&&
(DvtCategoryRolloverHandler.processEvent(a,this.getObjects()),this._distributeToChildren(a,b));else if(d==DvtSelectionEvent.TYPE){for(var d=a.getSelection(),e=[],g=0;g<d.length;g++){var h=d[g];h.getSeries()==DvtPieChartUtils.OTHER_SLICE_SERIES_ID?(otherItems=DvtPieChartUtils.getOtherSliceIds(this),e=e.concat(otherItems)):e.push(h)}a=new DvtSelectionEvent(e)}this.__dispatchEvent(a)};
DvtChartImpl.prototype._distributeToChildren=function(a,b){this.legend&&this.legend!=b&&this.legend.processEvent(a,b);this.pieChart&&this.pieChart!=b&&this.pieChart.processEvent(a,b)};DvtChartImpl.prototype.clearObjects=function(){this._peers.length=0};DvtChartImpl.prototype.registerObject=function(a){this._peers.push(a)};DvtChartImpl.prototype.getObjects=function(){return this._peers};DvtChartImpl.prototype.getData=function(){return this.Data?this.Data:{}};DvtChartImpl.prototype.getOptions=function(){return this.Options};
DvtChartImpl.prototype.getBundle=function(){return this.Bundle};DvtChartImpl.prototype.getSeriesStyleArray=function(){return this._seriesStyleArray};DvtChartImpl.prototype.getPlotArea=function(){return this._plotArea};DvtChartImpl.prototype.setPlotArea=function(a){this._plotArea=a};DvtChartImpl.prototype.getType=function(){return this.Options.chart.type};
DvtChartImpl.prototype.getGapRatio=function(){if(null!==this.Options.layout.gapRatio&&!isNaN(this.Options.layout.gapRatio))return this.Options.layout.gapRatio;var a=Math.min(this.Width/400,1),b=Math.min(this.Height/300,1);return Math.min(a,b)};DvtChartImpl.prototype.getSelectionHandler=function(){return this._selectionHandler};DvtChartImpl.prototype.isSelectionSupported=function(){return this._selectionHandler?!0:!1};
DvtChartImpl.prototype.bringToFrontOfSelection=function(a){var b=a.getParent();if(b){var d=b.getNumChildren();1<d-this._numFrontObjs&&(b.removeChild(a),b.addChildAt(a,d-this._numFrontObjs-1))}(!a.isSelected()||!a.isHoverEffectShown())&&this._numSelectedObjsInFront++};
DvtChartImpl.prototype.pushToBackOfSelection=function(a){0<this._numSelectedObjsInFront&&this._numSelectedObjsInFront--;var b=a.getParent();if(b){var d=b.getNumChildren()-this._numFrontObjs-1-this._numSelectedObjsInFront;0<=d&&(b.removeChild(a),b.addChildAt(a,d))}};DvtChartImpl.prototype.setNumFrontObjs=function(a){this._numFrontObjs=a};var DvtChartAxis=function(a,b,d,e){this.Init(a,b,d,e)};DvtObj.createSubclass(DvtChartAxis,DvtAxis,"DvtChartAxis");DvtChartAxis.prototype.getOptions=function(){return this.Info.Options};
DvtChartAxis.prototype.getValueAt=function(){return this.Info?this.Info.getValueAt(value):null};DvtChartAxis.prototype.getCoordAt=function(a){return this.Info?this.Info.getCoordAt(a):null};DvtChartAxis.prototype.getBoundedValueAt=function(){return this.Info?this.Info.getBoundedValueAt(value):null};DvtChartAxis.prototype.getBoundedCoordAt=function(a){return this.Info?this.Info.getBoundedCoordAt(a):null};
DvtChartAxis.prototype.getUnboundedCoordAt=function(a){return this.Info?this.Info.getUnboundedCoordAt(a):null};DvtChartAxis.prototype.getBaselineCoord=function(){return this.Info?this.Info.getBaselineCoord():null};DvtChartAxis.prototype.getPosition=function(){return this.Options.position};DvtChartAxis.prototype.isGroupAxis=function(){return this.Info instanceof DvtGroupAxisInfo};DvtChartAxis.prototype.isTimeAxis=function(){return this.Info instanceof DvtTimeAxisInfo};
DvtChartAxis.prototype.getGroupWidth=function(){return this.isGroupAxis()?Math.abs(this.getCoordAt(1)-this.getCoordAt(0)):this.isTimeAxis()?this.Info.getGroupWidth():0};DvtChartAxis.prototype.getAxisLine=function(a){return this.Info?this.Info.getAxisLine(a):null};DvtChartAxis.prototype.getGridLines=function(a){return this.Info?this.Info.getGridLines(a):[]};DvtChartAxis.prototype.getMajorTickCount=function(){return this.Info?this.Info.getMajorTickCount():null};
DvtChartAxis.prototype.setMajorTickCount=function(a){this.Info&&this.Info.setMajorTickCount(a)};DvtChartAxis.prototype.getMinorTickCount=function(){return this.Info?this.Info.getMinorTickCount():null};DvtChartAxis.prototype.setMinorTickCount=function(a){this.Info&&this.Info.setMinorTickCount(a)};DvtChartAxis.prototype.getMajorIncrement=function(){return this.Info?this.Info.getMajorIncrement():null};
DvtChartAxis.prototype.getMinorIncrement=function(){return this.Info?this.Info.getMinorIncrement():null};var DvtChartBundle=function(){};DvtObj.createSubclass(DvtChartBundle,DvtBundle,"DvtChartBundle");DvtChartBundle.EMPTY_TEXT="No data to display";DvtChartBundle.DEFAULT_GROUP_NAME="Group {0}";DvtChartBundle.LABEL_SERIES="Series: {0}";DvtChartBundle.LABEL_GROUP="Group: {0}";DvtChartBundle.LABEL_VALUE="Value: {0}";DvtChartBundle.LABEL_X="X: {0}";DvtChartBundle.LABEL_Y="Y: {0}";
DvtChartBundle.LABEL_Z="Z: {0}";DvtChartBundle.LABEL_LOW="Low: {0}";DvtChartBundle.LABEL_HIGH="High: {0}";DvtChartBundle.LABEL_OTHER="Other";DvtChartBundle.prototype.SCALING_SUFFIX_THOUSAND="K";DvtChartBundle.prototype.SCALING_SUFFIX_MILLION="M";DvtChartBundle.prototype.SCALING_SUFFIX_BILLION="B";DvtChartBundle.prototype.SCALING_SUFFIX_TRILLION="T";DvtChartBundle.prototype.SCALING_SUFFIX_QUADRILLION="Q";var DvtGraphEventHandler=function(){};
DvtObj.createSubclass(DvtGraphEventHandler,DvtEventManager,"DvtGraphEventHandler");DvtGraphEventHandler.prototype.Init=function(a,b,d){DvtGraphEventHandler.superclass.Init.call(this,a,b,d);this.SeriesFocusHandler=this.GraphKeyboardHandler=this.GraphPanHandler=this.DataCursorHandler=this.HideShowSeriesHandler=this.SeriesRolloverHandler=null};DvtGraphEventHandler.prototype.setSeriesRolloverHandler=function(a){this.SeriesRolloverHandler=a};
DvtGraphEventHandler.prototype.setHideShowSeriesHandler=function(a){this.HideShowSeriesHandler=a};DvtGraphEventHandler.prototype.setDataCursorHandler=function(a){this.DataCursorHandler=a};DvtGraphEventHandler.prototype.setGraphPanHandler=function(a){this.GraphPanHandler=a};DvtGraphEventHandler.prototype.setSeriesFocusHandler=function(a){this.SeriesFocusHandler=a};DvtGraphEventHandler.prototype.setGraphKeyboardHandler=function(a){this.GraphKeyboardHandler=a};
DvtGraphEventHandler.prototype.HandleTouchHoverStartInternal=function(a){var b=a.touch,d=a.targetObj,e=b.pageX,g=b.pageY,h=this._context.getRelativePosition(e,g),k=this.GetLogicalObject(d),b=b.identifier;this.DataCursorHandler&&this.DataCursorHandler.processMove(e,g,d,k);this.TouchManager.setTooltipEnabled(b,this.IsTooltipShowable(k,h));this.SeriesRolloverHandler&&this.SeriesRolloverHandler.processMouseOver(k);this.HandleTouchHoverStartGraphInternal(a);return!1};
DvtGraphEventHandler.prototype.HandleTouchHoverStartGraphInternal=function(){};DvtGraphEventHandler.prototype.HandleTouchHoverMoveInternal=function(a){var b=a.touch,d=a.targetObj,e=b.pageX,g=b.pageY,h=this._context.getRelativePosition(e,g),k=this.GetLogicalObject(d),b=b.identifier;this.DataCursorHandler&&this.DataCursorHandler.processMove(e,g,d);this.TouchManager.setTooltipEnabled(b,this.IsTooltipShowable(k,h));this.HandleTouchHoverMoveGraphInternal(a);return!1};
DvtGraphEventHandler.prototype.HandleTouchHoverMoveGraphInternal=function(){};DvtGraphEventHandler.prototype.HandleTouchHoverEndInternal=function(a){var b=a.touch,d=this.GetLogicalObject(a.targetObj);this.DataCursorHandler&&this.DataCursorHandler.processEnd();if(this._processHideShowPopup(d)&&(b=this.TouchManager.getTouchInfo(b.identifier)))b.fireClick=!1;this.SeriesRolloverHandler&&this.SeriesRolloverHandler.processMouseOut(d);this.HandleTouchHoverEndGraphInternal(a)};
DvtGraphEventHandler.prototype.HandleTouchHoverEndGraphInternal=function(){};DvtGraphEventHandler.prototype.HandleTouchHoverOverInternal=function(a){var b=this.GetLogicalObject(a.targetObj);if(this.SeriesRolloverHandler&&(this.SeriesRolloverHandler.processMouseOver(b),this.IsMagnifyLensEnabled()&&b)){var d=this.GetMagnifyLens();null!==b.getCategories()[0]&&d.setDirty(!0)}this.HandleTouchHoverOverGraphInternal(a)};DvtGraphEventHandler.prototype.HandleTouchHoverOverGraphInternal=function(){};
DvtGraphEventHandler.prototype.HandleTouchHoverOutInternal=function(a){var b=this.GetLogicalObject(a.targetObj);this.SeriesRolloverHandler&&this.SeriesRolloverHandler.processMouseOut(b);this.HandleTouchHoverOutGraphInternal(a)};DvtGraphEventHandler.prototype.HandleTouchHoverOutGraphInternal=function(){};
DvtGraphEventHandler.prototype.HandleTouchClickInternal=function(a){var b=a.touch,b=this._context.getRelativePosition(b.pageX,b.pageY),d=this.GetLogicalObject(a.targetObj);this.SeriesFocusHandler&&this.SeriesFocusHandler.processSeriesFocus(b,d);return this.HandleTouchClickGraphInternal(a)};DvtGraphEventHandler.prototype.HandleTouchClickGraphInternal=function(){};DvtGraphEventHandler.prototype._processHideShowPopup=function(){return!1};DvtGraphEventHandler.prototype.IsMagnifyLensEnabled=function(){return!1};
var DvtChartEventManager=function(a){this.Init(a.getContext(),a.processEvent,a);this._chart=a};DvtObj.createSubclass(DvtChartEventManager,DvtGraphEventHandler,"DvtChartEventManager");DvtChartEventManager.prototype.OnMouseMove=function(a){DvtChartEventManager.superclass.OnMouseMove.call(this,a);this.DataCursorHandler&&this.DataCursorHandler.processMove(a.pageX,a.pageY,a.target)};
DvtChartEventManager.prototype.OnMouseOut=function(a){DvtChartEventManager.superclass.OnMouseOut.call(this,a);this.DataCursorHandler&&this.DataCursorHandler.processOut(pos)};DvtChartEventManager.prototype.OnMouseOver=function(a){DvtChartEventManager.superclass.OnMouseOver.call(this,a);(a=this.GetLogicalObject(a.target))&&this.SeriesRolloverHandler&&this.SeriesRolloverHandler.processMouseOver(a)};
DvtChartEventManager.prototype.OnMouseOut=function(a){DvtChartEventManager.superclass.OnMouseOut.call(this,a);(a=this.GetLogicalObject(a.target))&&this.SeriesRolloverHandler&&this.SeriesRolloverHandler.processMouseOut(a)};
DvtChartEventManager.prototype.OnClickInternal=function(a){var b=this.GetLogicalObject(a.target),a=this._context.getRelativePosition(a.pageX,a.pageY);this.SeriesFocusHandler&&this.SeriesFocusHandler.processSeriesFocus(a,b);b&&b.getAction()&&this.FireEvent(new DvtActionEvent(DvtActionEvent.SUBTYPE_ACTION,b.getAction(),b.getId()))};
DvtChartEventManager.prototype.HandleTouchClickInternal=function(a){DvtChartEventManager.superclass.HandleTouchClickInternal.call(this,a);(a=this.GetLogicalObject(a.targetObj))&&a.getAction()&&this.FireEvent(new DvtActionEvent(DvtActionEvent.SUBTYPE_ACTION,a.getAction(),a.getId()))};DvtChartEventManager.prototype.IsTooltipShowableInternal=function(){return this.DataCursorHandler?!this.DataCursorHandler.isDataCursorShown():!0};var DvtSeriesRolloverHandler=function(a){this.Init(a)};
DvtObj.createSubclass(DvtSeriesRolloverHandler,DvtObj,"DvtSeriesRolloverHandler");DvtSeriesRolloverHandler.prototype.Init=function(){};DvtSeriesRolloverHandler.prototype.processMouseOver=function(a){this.ProcessEvent(a,!0)};DvtSeriesRolloverHandler.prototype.processMouseOut=function(a){this.ProcessEvent(a,!1)};DvtSeriesRolloverHandler.prototype.ProcessEvent=function(){};var DvtChartSeriesRolloverHandler=function(a,b){this.Init(a,b)};
DvtObj.createSubclass(DvtChartSeriesRolloverHandler,DvtSeriesRolloverHandler,"DvtChartSeriesRolloverHandler");DvtChartSeriesRolloverHandler.prototype.Init=function(a,b){DvtChartSeriesRolloverHandler.superclass.Init.call(this);this._chart=a;this.EventHandler=b;this._bDim="dim"==DvtChartEventUtils.getRolloverBehavior(this._chart)};
DvtChartSeriesRolloverHandler.prototype.ProcessEvent=function(a,b){this._rolloverHandled=!1;if(a&&null==this._chart._currentSeriesCategory){var d=this.getRolloverContainer();if(b){var e=a.getCategories?a.getCategories():null;e&&0<e.length&&(this.EventHandler.FireEvent(new DvtCategoryRolloverEvent(DvtCategoryRolloverEvent.TYPE_OVER,e[0]),d),this._rolloverHandled=!0)}else if((e=a.getCategories?a.getCategories():null)&&0<e.length)this.EventHandler.FireEvent(new DvtCategoryRolloverEvent(DvtCategoryRolloverEvent.TYPE_OUT,
e[0]),d),this._rolloverHandled=!0}};DvtChartSeriesRolloverHandler.prototype.isRolloverHandled=function(){return this._rolloverHandled};DvtChartSeriesRolloverHandler.prototype.getRolloverContainer=function(){return this._chart};var DvtLegendSeriesRolloverHandler=function(a,b,d){this.Init(a,b,d)};DvtObj.createSubclass(DvtLegendSeriesRolloverHandler,DvtChartSeriesRolloverHandler,"DvtLegendSeriesRolloverHandler");
DvtLegendSeriesRolloverHandler.prototype.Init=function(a,b,d){this._chart=a;this._legend=d;this.EventHandler=b;this._bDim="dim"==this._legend.__getOptions().rolloverBehavior};DvtLegendSeriesRolloverHandler.prototype.getRolloverContainer=function(){return this._legend};var DvtSeriesFocusHandler=function(){this.Init()};DvtObj.createSubclass(DvtSeriesFocusHandler,DvtObj,"DvtSeriesFocusHandler");DvtSeriesFocusHandler.prototype.Init=function(){this._seriesFocusHandled=!1};
DvtSeriesFocusHandler.prototype.processSeriesFocus=function(a,b){this._seriesFocusHandled=!1;this.isSeriesFocusable(b)?(this._renderSeriesFocus(this.getSeriesCategory(b)),this._seriesFocusHandled=!0):null!=this.getCurrentSeriesCategory()&&this.isClearSeriesFocus(a)&&(this._renderSeriesFocus(null),this._seriesFocusHandled=!0)};
DvtSeriesFocusHandler.prototype._renderSeriesFocus=function(a){var b=this.getCurrentSeriesCategory();b!=a&&(null==a?(this.SeriesFocusCleared(this.getCurrentSeriesCategory()),this.setCurrentSeriesCategory(null)):(this.SeriesFocusChanged(b,a),this.setCurrentSeriesCategory(a)))};DvtSeriesFocusHandler.prototype.SeriesFocusCleared=function(){};DvtSeriesFocusHandler.prototype.SeriesFocusChanged=function(){};DvtSeriesFocusHandler.prototype.getSeriesCategory=function(){};
DvtSeriesFocusHandler.prototype.getCurrentSeriesCategory=function(){};DvtSeriesFocusHandler.prototype.setCurrentSeriesCategory=function(){};DvtSeriesFocusHandler.prototype.isClearSeriesFocus=function(){return!1};DvtSeriesFocusHandler.prototype.isSeriesFocusHandled=function(){return this._seriesFocusHandled};DvtSeriesFocusHandler.prototype.isSeriesFocusable=function(){return!1};var DvtChartSeriesFocusHandler=function(a,b){this.Init(a,b)};
DvtObj.createSubclass(DvtChartSeriesFocusHandler,DvtSeriesFocusHandler,"DvtChartSeriesFocusHandler");DvtChartSeriesFocusHandler.prototype.Init=function(a,b){DvtChartSeriesFocusHandler.superclass.Init.call(this);this._Chart=a;this._legend=b};DvtChartSeriesFocusHandler.prototype.SeriesFocusCleared=function(a){var b=this._Chart,a=new DvtCategoryRolloverEvent(DvtCategoryRolloverEvent.TYPE_OUT,a);DvtCategoryRolloverHandler.processEvent(a,b.getObjects());DvtCategoryRolloverHandler.processEvent(a,this._legend.__getObjects())};
DvtChartSeriesFocusHandler.prototype.SeriesFocusChanged=function(a,b){DvtChartSeriesFocusHandler.HighlightSeries(this._Chart,this._legend,a,b)};
DvtChartSeriesFocusHandler.HighlightSeries=function(a,b,d,e){d&&(d=new DvtCategoryRolloverEvent(DvtCategoryRolloverEvent.TYPE_OUT,d),DvtCategoryRolloverHandler.processEvent(d,a.getObjects()),DvtCategoryRolloverHandler.processEvent(d,b.__getObjects()));e=new DvtCategoryRolloverEvent(DvtCategoryRolloverEvent.TYPE_OVER,e);DvtCategoryRolloverHandler.processEvent(e,a.getObjects());DvtCategoryRolloverHandler.processEvent(e,b.__getObjects())};
DvtChartSeriesFocusHandler.prototype.isSeriesFocusable=function(a){var b=this._Chart;return a&&b._dataCursor?!0:!1};DvtChartSeriesFocusHandler.prototype.getSeriesCategory=function(a){return(a.getCategories?a.getCategories():null)[0]};DvtChartSeriesFocusHandler.prototype.getCurrentSeriesCategory=function(){return this._Chart._currentSeriesCategory};DvtChartSeriesFocusHandler.prototype.setCurrentSeriesCategory=function(a){this._Chart._currentSeriesCategory=a};
DvtChartSeriesFocusHandler.prototype.isClearSeriesFocus=function(a){var b=this._Chart;if(b.legend){var d=b.legend.getDimensions(),e=b.legend.localToStage(new DvtPoint(d.x,d.y));d.x=e.x;d.y=e.y;e=b._plotRect;b=e.getDimensions();e=e.localToStage(new DvtPoint(b.x,b.y));b.x=e.x;b.y=e.y;return!d.containsPoint(a.x,a.y)&&!b.containsPoint(a.x,a.y)}return!1};var DvtChartObjPeer=function(a,b,d,e){this.Init(a,b,d,e)};DvtObj.createSubclass(DvtChartObjPeer,DvtObj,"DvtChartObjPeer");
DvtChartObjPeer.prototype.Init=function(a,b,d,e){this._chart=a;this._displayables=b;this._group=this._series=null;this._seriesIndex=isNaN(d)?-1:d;0<=this._seriesIndex&&(this._series=DvtChartDataUtils.getSeries(a,this._seriesIndex));this._groupIndex=isNaN(e)?-1:e;0<=this._groupIndex&&(this._group=DvtChartDataUtils.getGroup(a,this._groupIndex));this._categories=null!=this._series?[this._series]:[];if(a=DvtChartDataUtils.getDataItem(a,d,e))a.categories&&(this._categories=this._categories.concat(a.categories)),
this._dataItemId=a.id,this._action=a.action;this._isSelected=!1};DvtChartObjPeer.associate=function(a,b,d,e){a&&(d=new DvtChartObjPeer(b,[a],d,e),b.registerObject(d),b.getEventManager().associate(a,d))};DvtChartObjPeer.prototype.getId=function(){return null!=this._series&&null!=this._group?new DvtChartDataItem(this._dataItemId,this._series,this._group):null};DvtChartObjPeer.prototype.getDataItemId=function(){return this._dataItemId};DvtChartObjPeer.prototype.getSeries=function(){return this._series};
DvtChartObjPeer.prototype.getSeriesIndex=function(){return this._seriesIndex};DvtChartObjPeer.prototype.getGroup=function(){return this._group};DvtChartObjPeer.prototype.getGroupIndex=function(){return this._groupIndex};DvtChartObjPeer.prototype.getAction=function(){return this._action};DvtChartObjPeer.prototype.getChart=function(){return this._chart};DvtChartObjPeer.prototype.getSeriesType=function(){return DvtChartStyleUtils.getSeriesType(this._chart,this._seriesIndex)};
DvtChartObjPeer.prototype.getSeriesItem=function(){return DvtChartDataUtils.getSeriesItem(this._chart,this._seriesIndex)};DvtChartObjPeer.prototype.getDatatip=function(a){return DvtChartTooltipUtils.getDatatip(a,this._chart,this._seriesIndex,this._groupIndex)};DvtChartObjPeer.prototype.getDatatipColor=function(){return DvtChartTooltipUtils.getDatatipColor(this._chart,this._seriesIndex,this._groupIndex)};
DvtChartObjPeer.prototype.isSelectable=function(){return this.getChart().isSelectionSupported()&&this.getId()};DvtChartObjPeer.prototype.isSelected=function(){return this._isSelected};DvtChartObjPeer.prototype.setSelected=function(a){this._isSelected=a;for(var b=0;b<this._displayables.length;b++)this._displayables[b].setSelected&&this._displayables[b].setSelected(a)};
DvtChartObjPeer.prototype.showHoverEffect=function(){for(var a=0;a<this._displayables.length;a++)this._displayables[a].showHoverEffect&&this._displayables[a].showHoverEffect()};DvtChartObjPeer.prototype.hideHoverEffect=function(){for(var a=0;a<this._displayables.length;a++)this._displayables[a].hideHoverEffect&&this._displayables[a].hideHoverEffect()};DvtChartObjPeer.prototype.getDisplayables=function(){return this._displayables};DvtChartObjPeer.prototype.getCategories=function(){return this._categories};
var DvtChartDataItem=function(a,b,d){this.Init(a,b,d)};DvtObj.createSubclass(DvtChartDataItem,DvtObj,"DvtChartDataItem");DvtChartDataItem.prototype.Init=function(a,b,d){this._id=a;this._series=b;this._group=d};DvtChartDataItem.prototype.getId=function(){return this._id};DvtChartDataItem.prototype.getSeries=function(){return this._series};DvtChartDataItem.prototype.getGroup=function(){return this._group};
DvtChartDataItem.prototype.equals=function(a){return a?this._group===a.getGroup()&&this._series===a.getSeries():!1};var DvtChartDefaults={};DvtObj.createSubclass(DvtChartDefaults,DvtObj,"DvtChartDefaults");
DvtChartDefaults.VERSION_1={chart:{type:"bar",stack:"off",backgroundColor:null,emptyText:null,dataSelection:"none",hideAndShowBehavior:"none",rolloverBehavior:"none",sorting:"off",otherThreshold:0,animationOnDataChange:"none",animationOnDisplay:"none",timeAxisType:"disabled",__sparkBarSpacing:"subpixel",__spark:!1,dataCursor:"auto",dataCursorBehavior:"auto"},title:{style:"font-size: 12px; color: #003d5b; font-weight: bold",hAlign:"start"},subtitle:{style:"font-size: 12px; color: #003d5b;"},footnote:{style:"font-size: 10px; color: #333333;",
hAlign:"start"},titleSeparator:{upperColor:"#74779A",lowerColor:"#FFFFFF",rendered:!1},xAxis:{minValue:null,maxValue:null,majorIncrement:null,minorIncrement:null,scaledFromBaseline:"on",timeRangeMode:"explicit",layout:{gapRatio:1}},yAxis:{minValue:null,maxValue:null,majorIncrement:null,minorIncrement:null,scaledFromBaseline:"on",layout:{gapRatio:1}},y2Axis:{minValue:null,maxValue:null,majorIncrement:null,minorIncrement:null,scaledFromBaseline:"on",layout:{gapRatio:1},alignTickMarks:!0},plotArea:{backgroundColor:null},
legend:{position:"auto",rendered:!0,layout:{gapRatio:1}},styleDefaults:{colors:"#003366,#CC3300,#666699,#006666,#FF9900,#993366,#99CC33,#624390,#669933,#FFCC33,#006699,#EBEA79".split(","),shapes:"square,circle,diamond,plus,triangleDown,triangleUp".split(","),seriesEffect:"gradient",threeDEffect:"off",borderColor:null,groupTooltipType:"auto",seriesTooltipType:"auto",valueTooltipType:"auto",animationDuration:1E3,animationIndicators:"all",animationUpColor:"#0099FF",animationDownColor:"#FF3300",lineWidth:3,
lineStyle:"solid",markerDisplayed:!1,markerColor:null,markerShape:"auto",markerSize:8,pieFeelerColor:"#BAC5D6",pieLabelStyle:"font-size: 11px; color: #003d5b; font-weight: bold",sliceLabel:{position:"outside",style:"font-size: 11px; color: #333333;",textType:"percent"},otherColor:"#4b4b4b"},layout:{gapRatio:null,outerGapWidth:10,outerGapHeight:8,titleSubtitleGapWidth:14,titleSeparatorGap:6,titlePlotAreaGap:10,footnoteGap:7,legendMaxSize:0.3,legendGap:10,axisMaxSize:0.33,tickLabelGapHeight:5,tickLabelGapWidth:7},
__layout:{maxBarWidth:0.5,barGroupGap:0.25}};DvtChartDefaults.calcOptions=function(a){var b=DvtChartDefaults._getDefaults(a);return a?DvtJSONUtils.merge(a,b):b};DvtChartDefaults._getDefaults=function(){return DvtJSONUtils.clone(DvtChartDefaults.VERSION_1)};DvtChartDefaults.getGapSize=function(a,b){return Math.ceil(b*a.getGapRatio())};var DvtChartAxisUtils={};DvtObj.createSubclass(DvtChartAxisUtils,DvtObj,"DvtChartAxisUtils");DvtChartAxisUtils._BAR_AXIS_OFFSET=0.5;
DvtChartAxisUtils.getMinMaxValue=function(a,b){var d="y2"==b;d&&(b="y");for(var e="y"==b,g="withoutRescale"==DvtChartEventUtils.getHideAndShowBehavior(a),h="bubble"===a.getType(),k=Number.NEGATIVE_INFINITY,m=Number.POSITIVE_INFINITY,n=a.getData(),o=DvtChartDataUtils.getSeriesCount(a),q=0;q<o;q++){var s=DvtChartDataUtils.getSeriesItem(a,q);if(g||DvtChartStyleUtils.isSeriesRendered(a,q))if(d==(s.assignedToY2?!0:!1))if(s=s.data)for(var t=0;t<s.length;t++)if(g||DvtChartStyleUtils.isDataItemRendered(a,
q,t)){var u;e?u=DvtChartDataUtils.getCumulativeValue(a,q,t,g):null!==s[t]&&(n.timeAxisType&&"enabled"==n.timeAxisType&&"undefined"==typeof s[t].x&&(u=DvtChartDataUtils.getGroupLabel(a,t),isNaN(u)||(s[t].x=u)),u=s[t][b]);if(!isNaN(u)){var v=0;h&&s[t].markerSize&&(e?v=s[t]._yAxisRadius:"x"==b&&(v=s[t]._xAxisRadius));k=Math.max(k,u+v);m=Math.min(m,u-v)}}}return{minValue:m,maxValue:k}};
DvtChartAxisUtils.getXAxisPosition=function(a){return DvtChartTypeUtils.isHorizontal(a)?DvtStyleUtils.isLocaleR2L()?"right":"left":"bottom"};DvtChartAxisUtils.getYAxisPosition=function(a){return DvtChartTypeUtils.isHorizontal(a)?"bottom":DvtStyleUtils.isLocaleR2L()?"right":"left"};DvtChartAxisUtils.getY2AxisPosition=function(a){return DvtChartTypeUtils.isHorizontal(a)?"top":DvtStyleUtils.isLocaleR2L()?"left":"right"};
DvtChartAxisUtils.hasGroupAxis=function(a){return DvtChartTypeUtils.isBar(a)||DvtChartTypeUtils.isLine(a)||DvtChartTypeUtils.isArea(a)||DvtChartTypeUtils.isCombo(a)?!0:!1};DvtChartAxisUtils.getGroupAxisOffset=function(a){return DvtChartTypeUtils.hasBarSeries(a)?DvtChartAxisUtils._BAR_AXIS_OFFSET:0};DvtChartAxisUtils.getXAxisValue=function(a,b){if(null===a||isNaN(a.x))return b;if(a)return a.x};var DvtChartDataUtils={};DvtObj.createSubclass(DvtChartDataUtils,DvtObj,"DvtChartDataUtils");
DvtChartDataUtils.hasData=function(a){var b=a.getData();if(!b||!b.series||1>b.series.length)return!1;b=1;if(DvtChartTypeUtils.isLine(a)||DvtChartTypeUtils.isArea(a)||DvtChartTypeUtils.isCombo(a))b=2;for(var d=DvtChartDataUtils.getSeriesCount(a),e=0;e<d;e++){var g=DvtChartDataUtils.getSeriesItem(a,e);if(g&&g.data&&g.data.length>=b)return!0}return!1};
DvtChartDataUtils.processDataObject=function(a){if(DvtChartDataUtils.hasData(a)){for(var b=0,d=a.getSeriesStyleArray(),e=DvtChartDataUtils.getSeriesCount(a),g=0;g<e;g++){var h=DvtChartDataUtils.getSeries(a,g),k=DvtChartDataUtils.getSeriesItem(a,g);h&&0>DvtArrayUtils.indexOf(d,h)&&d.push(h);k&&k.data&&k.data.length>b&&(b=k.data.length)}d=a.getData();d.groups||(d.groups=[]);for(a=a.getBundle();d.groups.length<b;)e=a.getRBString(DvtChartBundle.DEFAULT_GROUP_NAME,d.groups.length+1,"DvtChartBundle.DEFAULT_GROUP_NAME"),
d.groups.push(e)}};DvtChartDataUtils.getSeriesCount=function(a){return a.getData().series.length};DvtChartDataUtils.getSeries=function(a,b){var d=DvtChartDataUtils.getSeriesItem(a,b);return d?d.id?d.id:d.name||""===d.name?d.name:""+b:null};DvtChartDataUtils.getSeriesLabel=function(a,b){var d=DvtChartDataUtils.getSeriesItem(a,b);return d&&(d.name||""===d.name)?d.name:null};
DvtChartDataUtils.getSeriesIndex=function(a,b){for(var d=DvtChartDataUtils.getSeriesCount(a),e=0;e<d;e++)if(DvtChartDataUtils.getSeries(a,e)==b)return e;return-1};DvtChartDataUtils.getSeriesStyleIndex=function(a,b){if(b){var d=a.getSeriesStyleArray();return DvtArrayUtils.indexOf(d,b)}return DvtChartDataUtils.getSeriesIndex(a,b)};DvtChartDataUtils.getSeriesItem=function(a,b){if(isNaN(b)||null===b)return null;var d=a.getData();if(d.series&&d.series.length>b)return d.series[b]};
DvtChartDataUtils.getDataItem=function(a,b,d){if(isNaN(d)||null===d)return null;if((a=DvtChartDataUtils.getSeriesItem(a,b))&&a.data&&a.data.length>d)return a.data[d]};DvtChartDataUtils.getGroupCount=function(a){return a.getData().groups.length};DvtChartDataUtils.getGroup=function(a,b){var d=a.getData().groups;return 0<=b&&b<d.length&&(d=d[b])?d.id?d.id:d.name||""===d.name?d.name:d:null};
DvtChartDataUtils.getGroupLabel=function(a,b){var d=a.getData().groups;return 0<=b&&b<d.length&&(d=d[b])?d.name?d.name:d:null};DvtChartDataUtils.getGroups=function(a){for(var b=a.getData().groups.length,d=[],e=0;e<b;e++)d.push(DvtChartDataUtils.getGroup(a,e));return d};DvtChartDataUtils.getValue=function(a,b,d){a=DvtChartDataUtils.getDataItem(a,b,d);return!isNaN(a)||null===a?a:a.y};
DvtChartDataUtils.getCumulativeValue=function(a,b,d,e){if(DvtChartTypeUtils.isStacked(a)){for(var g=DvtChartTypeUtils.isCombo(a),h=DvtChartStyleUtils.getSeriesType(a,b),k=DvtChartDataUtils.isAssignedToY2(a,b),m=0,n=0;n<=b;n++)if((e||DvtChartStyleUtils.isSeriesRendered(a,n))&&!(g&&h!=DvtChartStyleUtils.getSeriesType(a,n))&&k==DvtChartDataUtils.isAssignedToY2(a,n))var o=DvtChartDataUtils.getValue(a,n,d),m=m+o;return m}return DvtChartDataUtils.getValue(a,b,d)};
DvtChartDataUtils.isAssignedToY2=function(a,b){var d=DvtChartDataUtils.getSeriesItem(a,b);return d&&d.assignedToY2&&DvtChartTypeUtils.isDualY(a)?!0:!1};DvtChartDataUtils.hasMixedFrequency=function(a){return"mixedFrequency"==a.getData().timeAxisType};
DvtChartDataUtils.getInitialSelection=function(a){var b=a.getData().selection;b||(b=[]);for(var a=a.getObjects(),d=0;d<b.length;d++){var e=b[d].id;if(e&&(!b[d].series||!b[d].group))for(var g=0;g<a.length;g++){var h=a[g];if(e===h.getDataItemId()){b[d].series=h.getSeries();b[d].group=h.getGroup();break}}}return b};
DvtChartDataUtils.getCurrentSelection=function(a){var b=[];if(a=a.getSelectionHandler())for(var a=a.getSelectedIds(),d=0;d<a.length;d++){var e=a[d];b.push({series:e.getSeries(),group:e.getGroup(),id:e.getId()})}return b};var DvtChartEventUtils={};DvtObj.createSubclass(DvtChartEventUtils,DvtObj,"DvtChartEventUtils");DvtChartEventUtils.getHideAndShowBehavior=function(a){return a.getOptions().chart.hideAndShowBehavior};DvtChartEventUtils.getRolloverBehavior=function(a){return a.getOptions().chart.rolloverBehavior};
DvtChartEventUtils.getLegendScrolling=function(a){return a.getOptions().legend.scrolling};
DvtChartEventUtils.setVisibility=function(a,b,d){var e=DvtChartEventUtils.getHideAndShowBehavior(a),g=DvtChartDataUtils.getSeriesItem(a,DvtChartDataUtils.getSeriesIndex(a,b));if(b==DvtPieChartUtils.OTHER_SLICE_SERIES_ID&&DvtPieChartUtils.getOtherSliceVisibility(a)!==d){if("hidden"==d&&1>=DvtPieChartUtils.getNumVisibleSlices(a))return!1;DvtPieChartUtils.setOtherSliceVisibility(a,d)}else if(g&&g.visibility!==d){if("hidden"==d&&("withRescale"==e||"pie"==a.getType())&&1>=DvtChartEventUtils._getNumVisibleSeries(a))return!1;
g.visibility=d}else{if(!DvtChartTypeUtils.isScatter(a)&&!DvtChartTypeUtils.isBubble(a)||"hidden"==d&&"withRescale"==e&&0>=DvtChartEventUtils._getNumVisibleDataItems(a,b))return!1;e=DvtChartStyleUtils.getHiddenCategories(a);"hidden"==d?e.push(b):(g=DvtArrayUtils.indexOf(e,b),e.splice(g,1));if((a=a.getData())&&a.legend&&a.legend.sections)for(e=0;e<a.legend.sections.length;e++)if((g=a.legend.sections[e])&&g.items)for(var h=0;h<g.items.length;h++)g.items[h].id==b&&(g.items[h].visibility=d)}return!0};
DvtChartEventUtils._getNumVisibleSeries=function(a){for(var b=0,d=DvtChartDataUtils.getSeriesCount(a),e=0;e<d;e++)"visible"==DvtChartStyleUtils.getVisibility(a,e)&&b++;return b};
DvtChartEventUtils._getNumVisibleDataItems=function(a,b){for(var d=0,e=DvtChartDataUtils.getSeriesCount(a),g=DvtChartDataUtils.getGroupCount(a),h=0;h<e;h++)for(var k=0;k<g;k++){var m=DvtChartDataUtils.getDataItem(a,h,k);(!m||!(m.categories&&0<=DvtArrayUtils.indexOf(m.categories,b)))&&DvtChartStyleUtils.isDataItemRendered(a,h,k)&&d++}return d};var DvtChartRefObjUtils={};DvtObj.createSubclass(DvtChartRefObjUtils,DvtObj,"DvtChartRefObjUtils");
DvtChartRefObjUtils.getObjects=function(a){var b=DvtChartRefObjUtils.getXAxisObjects(a),d=DvtChartRefObjUtils.getYAxisObjects(a),a=DvtChartRefObjUtils.getY2AxisObjects(a);return b.concat(d,a)};DvtChartRefObjUtils.getXAxisObjects=function(a){return(a=a.getData())&&a.xAxis&&a.xAxis.referenceObjects?a.xAxis.referenceObjects:[]};DvtChartRefObjUtils.getYAxisObjects=function(a){return(a=a.getData())&&a.yAxis&&a.yAxis.referenceObjects?a.yAxis.referenceObjects:[]};
DvtChartRefObjUtils.getY2AxisObjects=function(a){return(a=a.getData())&&a.y2Axis&&a.y2Axis.referenceObjects?a.y2Axis.referenceObjects:[]};DvtChartRefObjUtils.getType=function(a,b){return"area"==b.type?"area":"line"};DvtChartRefObjUtils.getLocation=function(a,b){return"front"==b.location?"front":"back"};var DvtChartSeriesEffectUtils={};DvtObj.createSubclass(DvtChartSeriesEffectUtils,DvtObj,"DvtChartSeriesEffectUtils");
DvtChartSeriesEffectUtils.getBarFill=function(a,b,d,e){b=DvtChartStyleUtils.getColor(a,b,d);return"gradient"==DvtChartStyleUtils.getSeriesEffect(a)?(a=e?270:0,e=[DvtColorUtils.getPastel(b,0.15),DvtColorUtils.getPastel(b,0.45),DvtColorUtils.getPastel(b,0.25),b,DvtColorUtils.getPastel(b,0.15),DvtColorUtils.getDarker(b,0.9)],new DvtLinearGradientFill(a,e,null,[0,0.15,0.3,0.65,0.85,1])):new DvtSolidFill(b)};
DvtChartSeriesEffectUtils.getAreaFill=function(a,b,d){b=DvtChartStyleUtils.getColor(a,b,d);return"gradient"==DvtChartStyleUtils.getSeriesEffect(a)?(a=DvtChartTypeUtils.isSpark(a)?[DvtColorUtils.getDarker(b,0.5),b,DvtColorUtils.getPastel(b,0.5)]:[DvtColorUtils.getPastel(b,0.5),b,DvtColorUtils.getDarker(b,0.7)],new DvtLinearGradientFill(270,a,null,[0,0.5,1])):new DvtSolidFill(b)};
DvtChartSeriesEffectUtils.getMarkerFill=function(a,b,d){var e=DvtChartStyleUtils.getMarkerColor(a,b,d);if("bubble"==a.getType()&&"gradient"==DvtChartStyleUtils.getSeriesEffect(a)){if("human"==DvtChartStyleUtils.getMarkerShape(a,b,d))return a=[DvtColorUtils.getPastel(e,0.2),DvtColorUtils.getPastel(e,0.1),e,DvtColorUtils.getDarker(e,0.8)],new DvtLinearGradientFill(315,a,null,[0,0.3,0.7,1]);a=[DvtColorUtils.getPastel(e,0.15),e,DvtColorUtils.getDarker(e,0.9),DvtColorUtils.getDarker(e,0.8)];return new DvtRadialGradientFill(a,
null,[0,0.5,0.75,1])}return new DvtSolidFill(e)};var DvtChartStyleUtils={};DvtObj.createSubclass(DvtChartStyleUtils,DvtObj,"DvtChartStyleUtils");DvtChartStyleUtils._SERIES_TYPE_RAMP=["bar","line","area"];
DvtChartStyleUtils.getSeriesType=function(a,b){if(DvtChartTypeUtils.isBar(a))return"bar";if(DvtChartTypeUtils.isLine(a))return"line";if(DvtChartTypeUtils.isArea(a))return"area";if(DvtChartTypeUtils.isCombo(a)){var d=DvtChartDataUtils.getSeriesItem(a,b),d=d?d.type:null;return!d||"auto"==d?(d=DvtChartDataUtils.getSeries(a,b),d=DvtChartDataUtils.getSeriesStyleIndex(a,d)%DvtChartStyleUtils._SERIES_TYPE_RAMP.length,DvtChartStyleUtils._SERIES_TYPE_RAMP[d]):d}return"auto"};
DvtChartStyleUtils.getSeriesEffect=function(a){return a.getOptions().styleDefaults.seriesEffect};DvtChartStyleUtils.getColor=function(a,b,d){if((d=DvtChartDataUtils.getDataItem(a,b,d))&&d.color||(d=DvtChartDataUtils.getSeriesItem(a,b))&&d.color)return d.color;var d=a.getOptions(),e=d.styleDefaults.colors,b=DvtChartDataUtils.getSeries(a,b),a=DvtChartDataUtils.getSeriesStyleIndex(a,b)%e.length;return d.styleDefaults.colors[a]};
DvtChartStyleUtils.getBorderColor=function(a,b,d){return(d=DvtChartDataUtils.getDataItem(a,b,d))&&d.borderColor?d.borderColor:(b=DvtChartDataUtils.getSeriesItem(a,b))&&b.borderColor?b.borderColor:a.getOptions().styleDefaults.borderColor};
DvtChartStyleUtils.getMarkerColor=function(a,b,d){var e=DvtChartDataUtils.getDataItem(a,b,d);if(e&&e.color)return e.color;return(e=DvtChartDataUtils.getSeriesItem(a,b))&&e.markerColor?e.markerColor:(e=a.getOptions().styleDefaults.markerColor)?e:DvtChartStyleUtils.getColor(a,b,d)};
DvtChartStyleUtils.getMarkerShape=function(a,b,d){var e=a.getOptions(),g=e.styleDefaults.markerShape,h=DvtChartDataUtils.getSeriesItem(a,b);h&&h.markerShape&&(g=h.markerShape);(d=DvtChartDataUtils.getDataItem(a,b,d))&&d.markerShape&&(g=d.markerShape);"auto"==g&&("bubble"==a.getType()?g="circle":(b=DvtChartDataUtils.getSeries(a,b),a=DvtChartDataUtils.getSeriesStyleIndex(a,b),e=e.styleDefaults.shapes,g=e[a%e.length]));return g};
DvtChartStyleUtils.getMarkerSize=function(a,b,d){if((d=DvtChartDataUtils.getDataItem(a,b,d))&&d.markerSize)return d.markerSize;if((b=DvtChartDataUtils.getSeriesItem(a,b))&&b.markerSize)return b.markerSize;a=a.getOptions();if(null!==a.styleDefaults.markerSize)return a.styleDefaults.markerSize};
DvtChartStyleUtils.getMarkerDisplayed=function(a,b,d){var e=a.getType();if("scatter"==e||"bubble"==e)return!0;return(d=DvtChartDataUtils.getDataItem(a,b,d))&&(!0===d.markerDisplayed||!1===d.markerDisplayed)?d.markerDisplayed:(b=DvtChartDataUtils.getSeriesItem(a,b))&&(!0===b.markerDisplayed||!1===b.markerDisplayed)?b.markerDisplayed:a.getOptions().styleDefaults.markerDisplayed};
DvtChartStyleUtils.getLineWidth=function(a,b){var d=DvtChartDataUtils.getSeriesItem(a,b);return d&&d.lineWidth?d.lineWidth:a.getOptions().styleDefaults.lineWidth};DvtChartStyleUtils.getLineStyle=function(a,b){var d=DvtChartDataUtils.getSeriesItem(a,b);return d&&d.lineStyle?d.lineStyle:a.getOptions().styleDefaults.lineStyle};DvtChartStyleUtils.getPieSliceExplode=function(a,b){var d=DvtChartDataUtils.getSeriesItem(a,b);return d&&d.pieSliceExplode?d.pieSliceExplode:0};
DvtChartStyleUtils.getBarSpacing=function(a){return a.getOptions().chart.__sparkBarSpacing};DvtChartStyleUtils.getBarWidth=function(a,b,d){var e=a.getOptions(),d=d.getGroupWidth(),g=e.__layout.barGroupGap*d;"pixel"==DvtChartStyleUtils.getBarSpacing(a)?(g=Math.floor(g),a=Math.max(Math.floor(d-2*g),1)):(d-=g,a=DvtChartTypeUtils.isStacked(a)?DvtChartTypeUtils.hasY2BarData(a)?d/2:d:d/b,e=e.__layout.maxBarWidth*d,a=Math.min(a,e));return a};
DvtChartStyleUtils.getBarOffset=function(a,b,d){d=-(b*d/2);if(DvtChartTypeUtils.isStacked(a)||DvtChartDataUtils.hasMixedFrequency(a))d=DvtChartTypeUtils.hasY2BarData(a)?DvtStyleUtils.isLocaleR2L()?0:-b:-b/2;return d};DvtChartStyleUtils.getY2BarOffset=function(a,b){return DvtChartTypeUtils.isStacked(a)?DvtStyleUtils.isLocaleR2L()?-b:b:0};DvtChartStyleUtils.getVisibility=function(a,b){var d=DvtChartDataUtils.getSeriesItem(a,b);return d&&d.visibility?d.visibility:"visible"};
DvtChartStyleUtils.isSeriesRendered=function(a,b){return"hidden"==DvtChartStyleUtils.getVisibility(a,b)?!1:!0};DvtChartStyleUtils.isDataItemRendered=function(a,b,d){if("hidden"==DvtChartStyleUtils.getVisibility(a,b))return!1;var e=DvtChartStyleUtils.getHiddenCategories(a),a=DvtChartDataUtils.getDataItem(a,b,d);if(0<e.length&&a&&a.categories)for(b=0;b<a.categories.length;b++)if(0<=DvtArrayUtils.indexOf(e,a.categories[b]))return!1;return!0};DvtChartStyleUtils.getAnimationOnDisplay=function(a){return a.getOptions().chart.animationOnDisplay};
DvtChartStyleUtils.getAnimationOnDataChange=function(a){return a.getOptions().chart.animationOnDataChange};DvtChartStyleUtils.getAnimationDuration=function(a){return a.getOptions().styleDefaults.animationDuration/1E3};DvtChartStyleUtils.getAnimationIndicators=function(a){return a.getOptions().styleDefaults.animationIndicators};DvtChartStyleUtils.getAnimationUpColor=function(a){return a.getOptions().styleDefaults.animationUpColor};DvtChartStyleUtils.getAnimationDownColor=function(a){return a.getOptions().styleDefaults.animationDownColor};
DvtChartStyleUtils.getHiddenCategories=function(a){a=a.getData();a._hiddenCategories||(a._hiddenCategories=[]);return a._hiddenCategories};var DvtChartTextUtils={};DvtObj.createSubclass(DvtChartTextUtils,DvtObj,"DvtChartTextUtils");DvtChartTextUtils.createText=function(a,b,d,e,g,h,k,m){d=new DvtText(b.getContext(),d,g,h);d.setCSSStyle(new DvtCSSStyle(e));e=d.getTextString();if(d=d.truncateToSpace(b,k,m))e.length>d.getTextString().length&&a.associate(d,new DvtSimpleObjPeer(e)),b.addChild(d);return d};
var DvtChartTooltipUtils={};DvtObj.createSubclass(DvtChartTooltipUtils,DvtObj,"DvtChartTooltipUtils");DvtChartTooltipUtils.hasDatatips=function(a){a=a.getOptions();return"none"==a.styleDefaults.seriesTooltipType&&"none"==a.styleDefaults.groupTooltipType&&"none"==a.styleDefaults.valueTooltipType?!1:!0};DvtChartTooltipUtils.getDatatipColor=function(a,b,d){return DvtChartStyleUtils.getColor(a,b,d)};
DvtChartTooltipUtils.getDatatip=function(a,b,d,e){if(0>d||0>e)return null;if((a=DvtChartDataUtils.getDataItem(b,d,e))&&a.tooltip)return a.tooltip;a=[];DvtChartTooltipUtils._addSeriesStrings(a,b,d,e);DvtChartTooltipUtils._addGroupStrings(a,b,d,e);DvtChartTooltipUtils._addValueStrings(a,b,d,e);return DvtChartTooltipUtils._convertLinesToString(a)};
DvtChartTooltipUtils.getOtherSliceDatatip=function(a,b,d){if(0>d)return null;var e=[],g=a.getOptions(),h=a.getBundle();if("none"!=g.styleDefaults.seriesTooltipType){var k=h.getTranslatedString(DvtChartBundle.LABEL_OTHER,null);e.push(k)}DvtChartTooltipUtils._addGroupStrings(e,a,0,d);"none"!=g.styleDefaults.valueTooltipType&&(a=g.styleDefaults.pieValueFormat?g.styleDefaults.pieValueFormat.converter:null,d=Math.round(100*b)/100,a&&a.getAsString&&a.getAsObject&&(d=a.getAsString(b)),b=h.getRBString(DvtChartBundle.LABEL_VALUE,
d,"DvtChartBundle.LABEL_VALUE"),e.push(b));return DvtChartTooltipUtils._convertLinesToString(e)};
DvtChartTooltipUtils.getRefObjTooltip=function(a,b){if(b.tooltip)return b.tooltip;var d=[];b.text&&d.push(b.text);var e=a.getBundle(),g=DvtChartRefObjUtils.getType(a,b);"line"==g?(e=e.getRBString(DvtChartBundle.LABEL_VALUE,Math.round(100*b.lineValue)/100,"DvtChartBundle.LABEL_VALUE"),d.push(e)):"area"==g&&(g=e.getRBString(DvtChartBundle.LABEL_LOW,Math.round(100*b.lowValue)/100,"DvtChartBundle.LABEL_LOW"),e=e.getRBString(DvtChartBundle.LABEL_HIGH,Math.round(100*b.highValue)/100,"DvtChartBundle.LABEL_HIGH"),
d.push(g),d.push(e));return DvtChartTooltipUtils._convertLinesToString(d)};DvtChartTooltipUtils._addSeriesStrings=function(a,b,d){if("none"!=b.getOptions().styleDefaults.seriesTooltipType){var e=b.getBundle();if(b=DvtChartDataUtils.getSeriesLabel(b,d))e=e.getRBString(DvtChartBundle.LABEL_SERIES,b,"DvtChartBundle.LABEL_SERIES"),a.push(e)}};
DvtChartTooltipUtils._addGroupStrings=function(a,b,d,e){var g=b.getOptions(),h=b.getData(),d=DvtChartDataUtils.getDataItem(b,d,e);if("none"!=g.styleDefaults.groupTooltipType&&(g=b.getBundle(),b=h.timeAxisType&&"disabled"!=h.timeAxisType?b.xAxis.__getInfo().formatLabel(d.x):DvtChartDataUtils.getGroupLabel(b,e)))b=g.getRBString(DvtChartBundle.LABEL_GROUP,b,"DvtChartBundle.LABEL_GROUP"),a.push(b)};
DvtChartTooltipUtils._addValueStrings=function(a,b,d,e){var g=b.getOptions();if("none"!=g.styleDefaults.valueTooltipType){var h=b.getBundle(),k=DvtChartDataUtils.getDataItem(b,d,e),m=g.styleDefaults.x1Format&&g.styleDefaults.x1Format.converter?g.styleDefaults.x1Format.converter:null,n=g.styleDefaults.y1Format&&g.styleDefaults.y1Format.converter?g.styleDefaults.y1Format.converter:null,o=g.styleDefaults.y2Format&&g.styleDefaults.y2Format.converter?g.styleDefaults.y2Format.converter:null,q=g.styleDefaults.zFormat&&
g.styleDefaults.zFormat.converter?g.styleDefaults.zFormat.converter:null;"scatter"==b.getType()||"bubble"==b.getType()?(e=Math.round(100*k.x)/100,d=Math.round(100*k.y)/100,m&&m.getAsString&&m.getAsObject&&(e=m.getAsString(k.x)),n&&n.getAsString&&n.getAsObject&&(d=n.getAsString(k.y)),e=h.getRBString(DvtChartBundle.LABEL_X,e,"DvtChartBundle.LABEL_X"),d=h.getRBString(DvtChartBundle.LABEL_Y,d,"DvtChartBundle.LABEL_Y"),a.push(e),a.push(d),"bubble"==b.getType()&&(b=Math.round(100*k.z)/100,q&&q.getAsString&&
q.getAsObject&&(b=q.getAsString(k.z)),h=h.getRBString(DvtChartBundle.LABEL_Z,b,"DvtChartBundle.LABEL_Z"),a.push(h))):("pie"==b.getType()?(k=g.styleDefaults.pieValueFormat?g.styleDefaults.pieValueFormat.converter:null,q=Math.round(100*DvtChartDataUtils.getValue(b,d,e))/100,k&&k.getAsString&&k.getAsObject&&(q=k.getAsString(DvtChartDataUtils.getValue(b,d,e))),h=h.getRBString(DvtChartBundle.LABEL_VALUE,q,"DvtChartBundle.LABEL_VALUE")):(k=Math.round(100*DvtChartDataUtils.getValue(b,d,e))/100,(q=DvtChartDataUtils.isAssignedToY2(b,
d)?o:n)&&q.getAsString&&q.getAsObject&&(k=q.getAsString(DvtChartDataUtils.getValue(b,d,e))),h=h.getTranslatedString(DvtChartBundle.LABEL_VALUE,k,"DvtChartBundle.LABEL_VALUE")),a.push(h))}};DvtChartTooltipUtils._convertLinesToString=function(a){for(var b="",d=0;d<a.length;d++)0<b.length&&(b+="\n"),b+=a[d];return b};var DvtChartTypeUtils={};DvtObj.createSubclass(DvtChartTypeUtils,DvtObj,"DvtChartTypeUtils");DvtChartTypeUtils.isSpark=function(a){return a.getOptions().chart.__spark};
DvtChartTypeUtils.isCombo=function(a){return"combo"==a.getType()};DvtChartTypeUtils.isHorizontal=function(a){return"horizontalBar"==a.getType()};DvtChartTypeUtils.isStacked=function(a){if("on"!=a.getOptions().chart.stack||DvtChartDataUtils.hasMixedFrequency(a))return!1;a=a.getType();return"bar"==a||"line"==a||"area"==a||"combo"==a||"horizontalBar"==a};DvtChartTypeUtils.isBar=function(a){a=a.getType();return"bar"==a||"horizontalBar"==a};DvtChartTypeUtils.isLine=function(a){return"line"==a.getType()};
DvtChartTypeUtils.isArea=function(a){return"area"==a.getType()};DvtChartTypeUtils.isScatter=function(a){return"scatter"==a.getType()};DvtChartTypeUtils.isBubble=function(a){return"bubble"==a.getType()};DvtChartTypeUtils.isPie=function(a){return"pie"==a.getType()};DvtChartTypeUtils.isDualY=function(a){var b=a.getType();return!DvtChartTypeUtils.hasAxes(a)||"scatter"==b||"bubble"==b?!1:!0};DvtChartTypeUtils.hasAxes=function(a){return"pie"!=a.getType()};
DvtChartTypeUtils.hasY2Data=function(a,b){if(!DvtChartTypeUtils.isDualY(a))return!1;for(var d=a.getData(),e=DvtChartDataUtils.getSeriesCount(a),g=0;g<e;g++)if(!(b&&DvtChartStyleUtils.getSeriesType(a,g)!=b)&&d.series[g].assignedToY2)return!0;return!1};DvtChartTypeUtils.hasY2BarData=function(a){return DvtChartTypeUtils.hasY2Data(a,"bar")};
DvtChartTypeUtils.hasBarSeries=function(a){if(DvtChartTypeUtils.isBar(a))return!0;if(DvtChartTypeUtils.isCombo(a))for(var b=DvtChartDataUtils.getSeriesCount(a),d=0;d<b;d++)if(DvtChartStyleUtils.isSeriesRendered(a,d)&&"bar"==DvtChartStyleUtils.getSeriesType(a,d))return!0;return!1};var DvtChartMarkerUtils={};DvtObj.createSubclass(DvtChartMarkerUtils,DvtObj,"DvtChartMarkerUtils");DvtChartMarkerUtils._MIN_RADIUS=5;DvtChartMarkerUtils._MAX_RADIUS_PERCENT=0.125;
DvtChartMarkerUtils._DEFAULT_MARKER_SIZE_PERCENT=0.2;
DvtChartMarkerUtils.calcBubbleSizes=function(a,b,d){var e=DvtChartAxisUtils.getMinMaxValue(a,"z"),g=e.minValue,h=e.maxValue,e=DvtChartAxisUtils.getMinMaxValue(a,"x"),e=Math.max(0,e.maxValue)-Math.min(0,e.minValue),k=DvtChartAxisUtils.getMinMaxValue(a,"y"),k=Math.max(0,k.maxValue)-Math.min(0,k.minValue),m=a.getOptions(),n=(1-m.layout.axisMaxSize)*b,m=(1-m.layout.axisMaxSize)*d,o=Math.PI*Math.pow(DvtChartMarkerUtils._MIN_RADIUS,2),b=DvtChartMarkerUtils._MAX_RADIUS_PERCENT*Math.min(b,d),b=Math.PI*Math.pow(b,
2),b=DvtChartMarkerUtils._adjustBubbleSizeRangeForCount(a,o,b,g,h),o=b.minArea,b=b.maxArea,b=DvtChartMarkerUtils._adjustBubbleSizeRangeForDataRange(a,o,b,g,h),o=b.minArea,b=b.maxArea,h=h-g,b=b-o;a.getData();for(var d=DvtChartDataUtils.getSeriesCount(a),q=0;q<d;q++)for(var s=DvtChartDataUtils.getSeriesItem(a,q),t=s.data?s.data.length:0,u=0;u<t;u++){var v=s.data[u];v&&v.z&&(1===d&&1===t?(v.markerSize=DvtChartMarkerUtils._DEFAULT_MARKER_SIZE_PERCENT*Math.min(n,m),e=0===e?100:e,k=0===k?100:k):v.markerSize=
2*Math.sqrt((o+(v.z-g)/h*b)/Math.PI),v._xAxisRadius=0.5*(v.markerSize/n)*e,v._yAxisRadius=0.5*(v.markerSize/m)*k)}};DvtChartMarkerUtils.sortMarkers=function(a){a.sort(DvtChartMarkerUtils._compareSize)};DvtChartMarkerUtils._compareSize=function(a,b){var d=a.getSize(),e=b.getSize();return d>e?-1:d<e?1:0};
DvtChartMarkerUtils._adjustBubbleSizeRangeForCount=function(a,b,d,e,g){var h=0,k=0;a.getData();for(var m=DvtChartDataUtils.getSeriesCount(a),n=0;n<m;n++)for(var o=DvtChartDataUtils.getSeriesItem(a,n),q=o.data.length,s=0;s<q;s++){var t=o.data[n];t&&t.z&&(h++,k+=t.z)}a=(k/h-e)/(g-e);e=15+Math.floor(30*(1-a));g=30+Math.floor(150*(1-a));h>=g?d=b+0.15*(d-b):h>=e&&(d-=0.85/(g-e)*(h-e)*(d-b));e=5+Math.floor(15*(1-a));a=30+Math.floor(70*(1-a));h<e?b+=0.0050*(d-b):h<a&&(b+=(0.0050-0.0050/(a-e)*(h-e))*(d-b));
return{minArea:b,maxArea:d}};DvtChartMarkerUtils._adjustBubbleSizeRangeForDataRange=function(a,b,d,e,g){if(0!=g-e){var h=a=d/b;0<g&&0<e?h=g/e:0>e&&0>g&&(h=e/g);h<a&&(e=d/h-b,0<e&&(b+=e))}else b=d;return{minArea:b,maxArea:d}};var DvtPieChartUtils={};DvtObj.createSubclass(DvtPieChartUtils,DvtObj,"DvtPieChartUtils");DvtPieChartUtils.OTHER_SLICE_SERIES_ID="_dvtOther";
DvtPieChartUtils.getSliceId=function(a,b){var d=DvtChartDataUtils.getDataItem(a,b,0),d=d?d.id:null,e=DvtChartDataUtils.getSeries(a,b),g=DvtChartDataUtils.getGroup(a,0);return new DvtChartDataItem(d,e,g)};DvtPieChartUtils.getOtherSliceId=function(a){a=DvtChartDataUtils.getGroup(a,0);return new DvtChartDataItem(null,DvtPieChartUtils.OTHER_SLICE_SERIES_ID,a)};DvtPieChartUtils.getRenderedSeriesIndices=function(a){return DvtPieChartUtils._getSeriesIndicesArrays(a).rendered};
DvtPieChartUtils.hasOtherSeries=function(a){return 0<DvtPieChartUtils._getSeriesIndicesArrays(a).other.length};DvtPieChartUtils.getOtherValue=function(a){for(var b=DvtPieChartUtils._getSeriesIndicesArrays(a).other,d=0,e=0;e<b.length;e++){var g=b[e];DvtChartStyleUtils.isSeriesRendered(a,g)&&(g=DvtChartDataUtils.getValue(a,g,0),0<g&&(d+=g))}return d};
DvtPieChartUtils.getOtherSliceIds=function(a){for(var b=DvtPieChartUtils._getSeriesIndicesArrays(a).other,d=[],e=0;e<b.length;e++)d.push(DvtPieChartUtils.getSliceId(a,b[e]));return d};DvtPieChartUtils.getOtherSliceVisibility=function(a){for(var b=DvtPieChartUtils._getSeriesIndicesArrays(a).other,d=0;d<b.length;d++)if(DvtChartStyleUtils.isSeriesRendered(a,b[d]))return"visible";return"hidden"};
DvtPieChartUtils.setOtherSliceVisibility=function(a,b){for(var d=DvtPieChartUtils._getSeriesIndicesArrays(a).other,e=0;e<d.length;e++)DvtChartDataUtils.getSeriesItem(a,d[e]).visibility=b};DvtPieChartUtils.getNumVisibleSlices=function(a){for(var b=0,d=DvtPieChartUtils._getSeriesIndicesArrays(a).rendered,e=0;e<d.length;e++)DvtChartStyleUtils.isSeriesRendered(a,d[e])&&b++;"visible"===DvtPieChartUtils.getOtherSliceVisibility(a)&&b++;return b};
DvtPieChartUtils.isOtherSliceSelected=function(a,b){for(var d=DvtPieChartUtils.getOtherSliceIds(a),e=0;e<d.length;e++){for(var g=d[e],h=!1,k=0;k<b.length;k++)if(b[k].id&&g.getId()===b[k].id||g.getSeries()===b[k].series&&g.getGroup()===b[k].group){h=!0;break}if(!h)return!1}return!0};
DvtPieChartUtils._getSeriesIndicesArrays=function(a){for(var b=[],d=[],e=DvtChartDataUtils.getSeriesCount(a),g=a.getOptions(),h=g.chart.otherThreshold*DvtPieChartUtils.getTotalValue(a),k=0;k<e;k++){var m=DvtChartDataUtils.getValue(a,k,0);0<h&&m<h?d.push(k):b.push(k)}"on"==g.chart.sorting&&b.sort(function(b,d){return DvtChartDataUtils.getValue(a,d,0)-DvtChartDataUtils.getValue(a,b,0)});return{rendered:b,other:d}};
DvtPieChartUtils.getTotalValue=function(a){for(var b=DvtChartDataUtils.getSeriesCount(a),d=0,e=0;e<b;e++){var g=DvtChartDataUtils.getValue(a,e,0);0<g&&(d+=g)}return d};var DvtChartRenderer={};DvtObj.createSubclass(DvtChartRenderer,DvtObj,"DvtChartRenderer");DvtChartRenderer._EMPTY_TEXT_GAP_WIDTH=2;DvtChartRenderer._EMPTY_TEXT_GAP_HEIGHT=1;
DvtChartRenderer.render=function(a,b,d){DvtChartRenderer._renderBackground(a,b,d);DvtChartDataUtils.hasData(a)?(DvtChartRenderer._renderTitles(a,b,d),DvtChartLegendRenderer.render(a,b,d),DvtChartAxisRenderer.render(a,b,d),DvtChartRenderer._renderPlotArea(a,b,d)):DvtChartRenderer._renderEmptyText(a,b,d)};
DvtChartRenderer._renderBackground=function(a,b,d){var e=a.getData(),g=a.getOptions(),a=new DvtRect(a.getContext(),d.x,d.y,d.w,d.h);b.addChild(a);g.chart.backgroundColor?a.setFill(new DvtSolidFill(g.chart.backgroundColor)):a.setFill(new DvtSolidFill("#000000",0.0010));a.setAriaRole("img");a.setAriaProperty("label",e.shortDesc)};
DvtChartRenderer._renderTitles=function(a,b,d){var e=a.getData(),g=a.getOptions(),h=DvtChartDefaults.getGapSize(a,g.layout.outerGapWidth),k=DvtChartDefaults.getGapSize(a,g.layout.outerGapHeight);d.x+=h;d.w-=2*h;d.y+=k;d.h-=2*k;if(e.title){var h=DvtChartTextUtils.createText(a.getEventManager(),b,e.title,g.title.style,d.x,d.y,d.w,d.h),m;h?(DvtLayoutUtils.alignTextStart(h),m=h.getDimensions(),k=m.h+DvtChartDefaults.getGapSize(a,g.titleSeparator.rendered?g.layout.titleSeparatorGap:g.layout.titlePlotAreaGap)):
(k=0,m=new DvtRectangle(0,0,0,0));if(e.subtitle){var n=new DvtText(a.getContext(),e.subtitle,d.x,d.y);n.setCSSStyle(new DvtCSSStyle(g.subtitle.style));DvtLayoutUtils.alignTextStart(n);b.addChild(n);var o=n.getDimensions(),q=DvtChartDefaults.getGapSize(a,g.layout.titleSubtitleGapWidth),s=m.w+q+o.w;if(s>d.w){if(n.setY(d.y+k),o=n.getTextString(),b.removeChild(n),n=n.truncateToSpace(a,d.w,d.h))DvtLayoutUtils.alignTextStart(n),b.addChild(n),o.length>n.getTextString().length&&a.getEventManager().associate(n,
new DvtSimpleObjPeer(o)),o=n.getDimensions(),k+=o.h,DvtStyleUtils.isLocaleR2L()&&(n&&n.setX(d.w-o.w),h&&h.setX(d.w-m.w))}else n.setY(m.h-o.h+d.y),DvtLayoutUtils.align(d,g.title.hAlign,h,s),DvtStyleUtils.isLocaleR2L()?(n.setX(h.getX()),h&&h.setX(h.getX()+o.w+q)):n.setX(h.getX()+s-o.w);n.setAriaProperty("hidden",null)}else DvtLayoutUtils.align(d,g.title.hAlign,h,m.w);h.setAriaProperty("hidden",null);d.y+=k;d.h-=k;g.titleSeparator.rendered&&(h=new DvtLine(a.getContext(),d.x,d.y,d.x+d.w,d.y),k=new DvtLine(a.getContext(),
d.x,d.y+1,d.x+d.w,d.y+1),h.setStroke(new DvtSolidStroke(g.titleSeparator.upperColor)),k.setStroke(new DvtSolidStroke(g.titleSeparator.lowerColor)),b.addChild(h),b.addChild(k),h=2+DvtChartDefaults.getGapSize(a,g.layout.titlePlotAreaGap),d.y+=h,d.h-=h)}if(e.footnote&&(b=DvtChartTextUtils.createText(a.getEventManager(),b,e.footnote,g.footnote.style,d.x,0,d.w,d.h)))e=b.getDimensions(),b.setY(d.y+d.h-e.h),d.h-=e.h+DvtChartDefaults.getGapSize(a,g.layout.footnoteGap),DvtLayoutUtils.alignTextStart(b),DvtLayoutUtils.align(d,
g.footnote.hAlign,b,e.w),b.setAriaProperty("hidden",null)};DvtChartRenderer._renderPlotArea=function(a,b,d){if(DvtChartTypeUtils.hasAxes(a)){var e=new DvtContainer(a.getContext());e.setTranslateX(d.x);e.setTranslateY(d.y);b.addChild(e);a.setPlotArea(e);b=new DvtRectangle(0,0,d.w,d.h);DvtPlotAreaRenderer.render(a,e,b)}else DvtPieRenderer.render(a,b,d);d.w=0;d.h=0};
DvtChartRenderer._renderEmptyText=function(a,b,d){var e=a.getOptions(),g=e.chart.emptyText;g||(g=a.getBundle().getRBString(DvtChartBundle.EMPTY_TEXT,null,"DvtChartBundle.EMPTY_TEXT"));var h=d.x+d.w/2,k=d.y+d.h/2,m=d.w-2*DvtChartRenderer._EMPTY_TEXT_GAP_WIDTH,d=d.h-2*DvtChartRenderer._EMPTY_TEXT_GAP_HEIGHT,a=new DvtText(a.getContext(),g,h,k);a.setCSSStyle(new DvtCSSStyle(e.title.style));a.alignMiddle();a.alignCenter();a=a.truncateToSpace(b,m,d);b.addChild(a);a.setAriaProperty("hidden",null)};
var DvtChartAxisRenderer={};DvtObj.createSubclass(DvtChartAxisRenderer,DvtObj,"DvtChartAxisRenderer");DvtChartAxisRenderer._CHART_AXIS_BUFFER=14;
DvtChartAxisRenderer.render=function(a,b,d){if(DvtChartTypeUtils.hasAxes(a)){d.w-=DvtChartDefaults.getGapSize(a,DvtChartAxisRenderer._CHART_AXIS_BUFFER);"bubble"==a.getType()&&DvtChartMarkerUtils.calcBubbleSizes(a,d.w,d.h);var e=a.getOptions(),g=DvtChartDefaults.getGapSize(a,e.layout.tickLabelGapWidth),h=DvtChartDefaults.getGapSize(a,e.layout.tickLabelGapHeight),k=DvtChartTypeUtils.isHorizontal(a),m=k?g:h,n=k?h:g,g=DvtChartAxisRenderer._createYAxis(a,b,d),h=DvtChartAxisRenderer._createY2Axis(a,b,
d);DvtLayoutUtils.position(d,g.position,g.axis,g.width,g.height,n);h&&DvtLayoutUtils.position(d,h.position,h.axis,h.width,h.height,n);"bubble"==a.getType()&&DvtChartMarkerUtils.calcBubbleSizes(a,d.w,d.h);"pixel"==DvtChartStyleUtils.getBarSpacing(a)&&DvtChartTypeUtils.isBar(a)&&(n=DvtChartDataUtils.getGroupCount(a),d.w>n&&(n*=Math.floor(d.w/n),d.x+=(d.w-n)/2,d.w=n));b=DvtChartAxisRenderer._createXAxis(a,b,d);b.axis.render(b.data,b.width,b.height);DvtLayoutUtils.position(d,b.position,b.axis,b.width,
b.height,m);k?(g.axis.setTranslateX(d.x),g.axis.render(g.data,d.w,g.height),h&&(this._alignYAxes(g.axis,h.axis,e),h.axis.setTranslateX(d.x),h.axis.render(h.data,d.w,h.height))):(g.axis.render(g.data,g.width,d.h),h&&(this._alignYAxes(g.axis,h.axis,e),h.axis.render(h.data,h.width,d.h)));a.xAxis=b.axis;a.yAxis=g.axis;a.y2Axis=h?h.axis:null}};
DvtChartAxisRenderer._createXAxis=function(a,b,d){var e=a.getData(),g=a.getOptions(),h=DvtChartAxisUtils.getXAxisPosition(a),k=DvtJSONUtils.clone(g.xAxis);k.layout.gapRatio=a.getGapRatio();k.position=h;k.scaledFromBaseline=g.xAxis.scaledFromBaseline;var m={};m.title=e.xAxis?e.xAxis.title:null;m.groups=e.groups;m.timeAxisType=e.timeAxisType?e.timeAxisType:"disabled";e="disabled"==m.timeAxisType;if(!DvtChartAxisUtils.hasGroupAxis(a)||!e){var n=DvtChartAxisUtils.getMinMaxValue(a,"x");m.minDataValue=
n.minValue;m.maxDataValue=n.maxValue}k.startGroupOffset=DvtChartAxisUtils.getGroupAxisOffset(a);k.endGroupOffset=DvtChartAxisUtils.getGroupAxisOffset(a);n=new DvtChartAxis(a.getContext(),null,null,k);b.addChild(n);var o=(b="top"==h||"bottom"==h)?d.w:g.layout.axisMaxSize*d.w,d=b?g.layout.axisMaxSize*d.h:d.h,g=n.getPreferredSize(m,o,d);!e&&DvtChartTypeUtils.hasBarSeries(a)&&(k.startGroupOffset+=DvtChartAxisRenderer._getOffsetForBarChart(a,n,k,b),k.endGroupOffset+=DvtChartAxisRenderer._getOffsetForBarChart(a,
n,k,b),n.Init(a.getContext(),null,null,k),g=n.getPreferredSize(m,o,d));return{axis:n,data:m,position:h,width:g.width,height:g.height}};
DvtChartAxisRenderer._getOffsetForBarChart=function(a,b,d,e){var g=DvtChartDefaults.getGapSize(a,d.layout.tickLabelGapWidth),d=DvtChartDefaults.getGapSize(a,d.layout.tickLabelGapHeight),e=e?g:d;isNaN(e)&&(e=0);DvtChartTypeUtils.isStacked(a)||DvtChartDataUtils.hasMixedFrequency(a)?(g=DvtChartDataUtils.getSeriesCount(a),a=DvtChartStyleUtils.getBarWidth(a,g,b)):a=b.getGroupWidth()/2;return e+a};
DvtChartAxisRenderer._createYAxis=function(a,b,d){var e=a.getData(),g=a.getOptions(),h=DvtChartAxisUtils.getYAxisPosition(a),k=DvtJSONUtils.clone(g.yAxis);k.layout.gapRatio=a.getGapRatio();k.position=h;k.scaledFromBaseline=g.yAxis.scaledFromBaseline;var m={},n=DvtChartAxisUtils.getMinMaxValue(a,"y");m.minDataValue=n.minValue;m.maxDataValue=n.maxValue;m.title=e.yAxis?e.yAxis.title:null;m.timeAxisType="disabled";a=new DvtChartAxis(a.getContext(),null,null,k);b.addChild(a);b="top"==h||"bottom"==h;d=
a.getPreferredSize(m,b?d.w:g.layout.axisMaxSize*d.w,b?g.layout.axisMaxSize*d.h:d.h);return{axis:a,data:m,position:h,width:d.width,height:d.height}};
DvtChartAxisRenderer._createY2Axis=function(a,b,d){var e=a.getData(),g=a.getOptions();if(DvtChartTypeUtils.hasY2Data(a)){var h=DvtChartAxisUtils.getY2AxisPosition(a),k=DvtJSONUtils.clone(g.y2Axis);k.layout.gapRatio=a.getGapRatio();k.position=h;k.scaledFromBaseline=g.y2Axis.scaledFromBaseline;var m={},n=DvtChartAxisUtils.getMinMaxValue(a,"y2");m.minDataValue=n.minValue;m.maxDataValue=n.maxValue;m.title=e.y2Axis?e.y2Axis.title:null;m.timeAxisType="disabled";a=new DvtChartAxis(a.getContext(),null,null,
k);b.addChild(a);b="top"==h||"bottom"==h;d=a.getPreferredSize(m,b?d.w:g.layout.axisMaxSize*d.w,b?g.layout.axisMaxSize*d.h:d.h);return{axis:a,data:m,position:h,width:d.width,height:d.height}}};DvtChartAxisRenderer._alignYAxes=function(a,b,d){var e=a.getMajorTickCount(),a=a.getMinorTickCount();d.y2Axis.alignTickMarks&&null==d.y2Axis.majorIncrement&&(b.setMajorTickCount(e),b.setMinorTickCount(a),d=b.getOptions(),d.majorIncrement=b.getMajorIncrement(),d.minorIncrement=b.getMinorIncrement())};
var DvtChartLegendRenderer={};DvtObj.createSubclass(DvtChartLegendRenderer,DvtObj,"DvtChartLegendRenderer");
DvtChartLegendRenderer.render=function(a,b,d){var e=a.getOptions(),g=e.legend.position,h=e.legend.rendered,k=e.legend.scrolling;if("none"!=g&&h){var m=DvtJSONUtils.clone(e.legend);delete m.position;m.layout.gapRatio=a.getGapRatio();m.hideAndShowBehavior=DvtChartEventUtils.getHideAndShowBehavior(a);m.rolloverBehavior=DvtChartEventUtils.getRolloverBehavior(a);m.scrolling=DvtChartEventUtils.getLegendScrolling(a);var n=DvtChartLegendRenderer._getLegendData(a),h=DvtLegend.newInstance(a.getContext(),a.processEvent,
a,m);null!=a.getId()&&h.setId(a.getId()+"legend");b.addChild(h);var o;"auto"==g&&"asNeeded"!==k?(m.orientation="horizontal",h.setOptions(m),horizSize=h.getPreferredSize(n,d.w,e.layout.legendMaxSize*d.h),horizArea=horizSize.width*horizSize.height,m.orientation="vertical",h.setOptions(m),vertSize=h.getPreferredSize(n,e.layout.legendMaxSize*d.w,d.h),vertArea=vertSize.width*vertSize.height,vertArea<=horizArea?(o=vertSize,g="end"):(o=horizSize,g="bottom")):"auto"==g&&"asNeeded"==k&&(g="end");b=DvtStyleUtils.isLocaleR2L();
"start"==g?g=b?"right":"left":"end"==g&&(g=b?"left":"right");m.orientation="left"==g||"right"==g?"vertical":"horizontal";h.setOptions(m);o||(o=(b="top"==g||"bottom"==g)?d.w:e.layout.legendMaxSize*d.w,b=b?e.layout.legendMaxSize*d.h:d.h,o=h.getPreferredSize(n,o,b));h.render(n,o.width,o.height);e=DvtChartDefaults.getGapSize(a,e.layout.legendGap);DvtLayoutUtils.position(d,g,h,o.width,o.height,e);a.legend=h}};
DvtChartLegendRenderer._getLegendData=function(a){var b=a.getData(),d={};d.title=b.legend?b.legend.title:null;d.sections=[];var e=DvtChartLegendRenderer._getSeriesItems(a);0<e.length&&d.sections.push({items:e});DvtChartLegendRenderer._addLegendSections(a,d.sections);a=DvtChartLegendRenderer._getRefObjItems(a);0<a.length&&d.sections.push({items:a,title:b.legend?b.legend.referenceObjectTitle:null});return d};
DvtChartLegendRenderer._getSeriesItems=function(a){var b=[],d;if("pie"==a.getType()){for(var e=DvtPieChartUtils.getRenderedSeriesIndices(a),g,h=0;h<e.length;h++)g=e[h],(d=DvtChartLegendRenderer._createLegendItem(a,g))&&b.push(d);DvtPieChartUtils.hasOtherSeries(a)&&(d={id:DvtPieChartUtils.OTHER_SLICE_SERIES_ID,text:a.getBundle().getTranslatedString(DvtChartBundle.LABEL_OTHER,null),visibility:DvtPieChartUtils.getOtherSliceVisibility(a),color:a.getOptions().styleDefaults.otherColor,borderColor:a.getOptions().styleDefaults.borderColor},
b.push(d))}else{e=DvtChartDataUtils.getSeriesCount(a);for(g=0;g<e;g++)(d=DvtChartLegendRenderer._createLegendItem(a,g))&&b.push(d)}DvtChartTypeUtils.isStacked(a)&&!DvtChartTypeUtils.isHorizontal(a)&&b.reverse();return b};
DvtChartLegendRenderer._createLegendItem=function(a,b){var d=DvtChartDataUtils.getSeriesItem(a,b);if(!d||"off"==d.displayInLegend)return null;var e=DvtChartDataUtils.getSeries(a,b),g=DvtChartDataUtils.getSeriesLabel(a,b),d={id:e,text:g,visibility:d.visibility};"line"==a.getType()?(d.lineStyle=DvtChartStyleUtils.getLineStyle(a,b),DvtChartStyleUtils.getMarkerDisplayed(a,b)?(d.shape="lineWithMarker",d.markerShape=DvtChartStyleUtils.getMarkerShape(a,b),d.markerColor=DvtChartStyleUtils.getMarkerColor(a,
b)):d.shape="line"):d.shape="scatter"==a.getType()||"bubble"==a.getType()?DvtChartStyleUtils.getMarkerShape(a,b):"square";d.color=DvtChartStyleUtils.getColor(a,b);d.borderColor=DvtChartStyleUtils.getBorderColor(a,b);return d};DvtChartLegendRenderer._addLegendSections=function(a,b){var d=a.getData();if(d&&d.legend&&d.legend.sections)for(var e=0;e<d.legend.sections.length;e++){var g=d.legend.sections[e];g&&g.items&&b.push({title:g.title,items:g.items})}};
DvtChartLegendRenderer._getRefObjItems=function(a){var b=DvtChartRefObjUtils.getObjects(a);if(0>=b.length)return[];for(var d=[],e=0;e<b.length;e++){var g=b[e];if(g&&!("on"!=g.displayInLegend||!g.color||!g.text)){var h="area"==DvtChartRefObjUtils.getType(a,g)?"square":"line";d.push({shape:h,text:g.text,color:g.color,lineStyle:g.lineStyle})}}return d};var DvtPlotAreaRenderer={};DvtObj.createSubclass(DvtPlotAreaRenderer,DvtObj,"DvtPlotAreaRenderer");DvtPlotAreaRenderer._MIN_TOUCH_MARKER_SIZE=16;
DvtPlotAreaRenderer.render=function(a,b,d){a._currentMarkers=[];a._currentAreas=[];DvtPlotAreaRenderer._renderBackgroundObjects(a,b,d);DvtPlotAreaRenderer._renderGridLines(a,b,d);DvtPlotAreaRenderer._renderForegroundObjects(a,b,d)};
DvtPlotAreaRenderer._renderBackgroundObjects=function(a,b,d){var e=a.getOptions(),g=new DvtRect(a.getContext(),d.x,d.y,d.w,d.h),e=e.plotArea.backgroundColor?new DvtSolidFill(e.plotArea.backgroundColor):new DvtSolidFill("#000000",0.0010);g.setFill(e);b.addChild(g);a._plotRect=g;DvtRefObjRenderer.renderBackgroundObjects(a,b,d);g=a.getType();("area"==g||"combo"==g)&&DvtPlotAreaRenderer._renderAreas(a,b,d)};
DvtPlotAreaRenderer._renderGridLines=function(a,b,d){var e=a.getContext(),g=a.xAxis,h=g.getGridLines(e),k=g.getPosition();DvtPlotAreaRenderer._positionGridLines(b,d,h,"top"==k||"bottom"==k);var m=a.yAxis,h=m.getGridLines(e),k=m.getPosition();DvtPlotAreaRenderer._positionGridLines(b,d,h,"top"==k||"bottom"==k);if(a=a.y2Axis)h=a.getGridLines(e),k=a.getPosition(),DvtPlotAreaRenderer._positionGridLines(b,d,h,"top"==k||"bottom"==k);(h=g.getAxisLine(e))&&DvtPlotAreaRenderer._positionAxisLine(b,d,h,g.getPosition());
(g=m.getAxisLine(e))&&DvtPlotAreaRenderer._positionAxisLine(b,d,g,m.getPosition());(e=a?a.getAxisLine(e):null)&&DvtPlotAreaRenderer._positionAxisLine(b,d,e,a.getPosition())};DvtPlotAreaRenderer._positionGridLines=function(a,b,d,e){for(var g=0;g<d.length;g++){var h=d[g];a.addChild(h);e?(h.setY1(b.y),h.setY2(b.y+b.h)):(h.setX1(b.x),h.setX2(b.x+b.w))}};
DvtPlotAreaRenderer._positionAxisLine=function(a,b,d,e){d&&(a.addChild(d),"top"==e?(d.setX1(b.x),d.setX2(b.x+b.w),d.setY1(b.y),d.setY2(b.y)):"bottom"==e?(d.setX1(b.x),d.setX2(b.x+b.w),d.setY1(b.y+b.h),d.setY2(b.y+b.h)):"left"==e?(d.setX1(b.x),d.setX2(b.x),d.setY1(b.y),d.setY2(b.y+b.h)):"right"==e&&(d.setX1(b.x+b.w),d.setX2(b.x+b.w),d.setY1(b.y),d.setY2(b.y+b.h)))};
DvtPlotAreaRenderer._renderForegroundObjects=function(a,b,d){var e=a.getType();"bar"==e||"horizontalBar"==e?DvtPlotAreaRenderer._renderBars(a,b):"line"==e?DvtPlotAreaRenderer._renderLines(a,b,d):"combo"==e?(DvtPlotAreaRenderer._renderBars(a,b),DvtPlotAreaRenderer._renderLines(a,b,d)):"scatter"==e?DvtPlotAreaRenderer._renderDataMarkers(a,b,!0):"bubble"==e&&(e=DvtPlotAreaRenderer._getClippedGroup(a,b,d),DvtPlotAreaRenderer._renderDataMarkers(a,e,!0));DvtRefObjRenderer.renderForegroundObjects(a,b,d);
b=DvtChartDataUtils.getInitialSelection(a);DvtPlotAreaRenderer._setInitialSelection(a,b)};DvtPlotAreaRenderer._renderDataMarkers=function(a,b,d){for(var e=[],g=DvtChartDataUtils.getSeriesCount(a),h=0;h<g;h++)var k=DvtPlotAreaRenderer._getMarkersForSeries(a,h),e=e.concat(k);d&&DvtChartMarkerUtils.sortMarkers(e);d=e.length;for(h=0;h<d;h++)b.addChild(e[h]);a._currentMarkers.push(e)};
DvtPlotAreaRenderer._renderDataMarkersForSeries=function(a,b,d){for(var e=DvtPlotAreaRenderer._getMarkersForSeries(a,d),g=e.length,d=0;d<g;d++)b.addChild(e[d]);a._currentMarkers.push(e)};
DvtPlotAreaRenderer._getMarkersForSeries=function(a,b){if(!DvtChartStyleUtils.isSeriesRendered(a,b))return[];var d=a.getContext(),e=a.xAxis,g=a.yAxis;DvtChartDataUtils.isAssignedToY2(a,b)&&(g=a.y2Axis);for(var h=DvtChartTooltipUtils.hasDatatips(a),k=DvtChartTypeUtils.isBubble(a),m=[],n=DvtChartDataUtils.getSeriesItem(a,b),o=0;o<n.data.length;o++){var q=n.data[o];if(DvtChartStyleUtils.isDataItemRendered(a,b,o)&&null!==DvtChartDataUtils.getValue(a,b,o)){var s=DvtMarker.convertShapeString(DvtChartStyleUtils.getMarkerShape(a,
b,o)),t=DvtChartStyleUtils.getBorderColor(a,b,o),u=DvtChartStyleUtils.getMarkerSize(a,b,o),v=DvtChartStyleUtils.getMarkerDisplayed(a,b,o),w=DvtChartAxisUtils.getXAxisValue(q,o),x=DvtChartDataUtils.getCumulativeValue(a,b,o),y,z;k?(y=e.getUnboundedCoordAt(w),z=g.getUnboundedCoordAt(x)):(y=e.getCoordAt(w),z=g.getCoordAt(x));null===y||null===z||(q=u/2,y-=q,z-=q,q=null,v?(q=new DvtMarker(d,s,y,z,u,u),a.isSelectionSupported()&&(q.setCursor(DvtSelectionEffectUtils.getSelectingCursor()),q.setDataColor(DvtChartStyleUtils.getMarkerColor(a,
b,o))),q.setFill(DvtChartSeriesEffectUtils.getMarkerFill(a,b,o)),t&&q.setStroke(new DvtSolidStroke(t))):(a.isSelectionSupported()?(q=new DvtSelectableLineMarker(d,DvtMarker.SQUARE,y,z,u,u),q.setDataColor(DvtChartStyleUtils.getColor(a,b,o)),q.setCursor(DvtSelectionEffectUtils.getSelectingCursor()),q.setZOrderManager(a)):h&&(q=new DvtMarker(d,DvtMarker.SQUARE,y,z,u,u)),null!=q&&q.setFill(new DvtSolidFill("#FFFFFF",0.0010))),null!=q&&(DvtAgent.getAgent().isTouchDevice()&&u<DvtPlotAreaRenderer._MIN_TOUCH_MARKER_SIZE&&
(y=e.getCoordAt(w)-DvtPlotAreaRenderer._MIN_TOUCH_MARKER_SIZE/2,z=g.getCoordAt(x)-DvtPlotAreaRenderer._MIN_TOUCH_MARKER_SIZE/2,s=new DvtRect(d,y,z,DvtPlotAreaRenderer._MIN_TOUCH_MARKER_SIZE,DvtPlotAreaRenderer._MIN_TOUCH_MARKER_SIZE),s.setFill(new DvtSolidFill("#FFFFFF",0.0010)),q.addChild(s)),q.setAriaRole("img"),s=DvtChartTooltipUtils.getDatatip(null,a,b,o),q.setAriaProperty("label",s),m.push(q),DvtChartObjPeer.associate(q,a,b,o)))}}return m};
DvtPlotAreaRenderer._renderBars=function(a,b){for(var d=a.getContext(),e=a.getData(),g=a.xAxis,h=DvtChartTypeUtils.isHorizontal(a),k=DvtChartTypeUtils.isStacked(a),m="pixel"==DvtChartStyleUtils.getBarSpacing(a),n=[],o=DvtChartDataUtils.getSeriesCount(a),q=0;q<o;q++)DvtChartStyleUtils.isSeriesRendered(a,q)&&"bar"==DvtChartStyleUtils.getSeriesType(a,q)&&n.push(q);DvtStyleUtils.isLocaleR2L()&&!k&&n.reverse();for(var e=e.groups?e.groups.length:0,o=n.length,s=a.yAxis.getBaselineCoord(),t=DvtChartStyleUtils.getBarWidth(a,
o,g),u=DvtChartStyleUtils.getBarOffset(a,t,o),v=DvtChartStyleUtils.getY2BarOffset(a,t),w=0;w<o;w++){for(var q=n[w],x=DvtChartDataUtils.isAssignedToY2(a,q),y=x?a.y2Axis:a.yAxis,z=0;z<e;z++){var A=DvtChartDataUtils.getDataItem(a,q,z),A=DvtChartAxisUtils.getXAxisValue(A,z),F=DvtChartDataUtils.getValue(a,q,z),C=DvtChartDataUtils.getCumulativeValue(a,q,z),E=g.getCoordAt(A),A=y.getBoundedCoordAt(C),F=k?y.getBoundedCoordAt(C-F):s;if(!(A==F&&null===y.getCoordAt(C))){C=!1;1>Math.abs(A-F)&&(C=!0,A>F?A=F+3:
A<=F&&(A=F-3));var E=x?Math.round(E+u+v):Math.round(E+u),I=E+t,A=h?[A,E,A,I,F,I,F,E]:[E,A,I,A,I,F,E,F];a.isSelectionSupported()?(A=new DvtSelectablePolygon(d,A),A.setDataColor(DvtChartStyleUtils.getColor(a,q,z)),A.setCursor(DvtSelectionEffectUtils.getSelectingCursor()),A.setZOrderManager(a)):A=new DvtPolygon(d,A);b.addChild(A);C?A.setFill(new DvtSolidFill("#FFFFFF",0.0010)):(A.setFill(DvtChartSeriesEffectUtils.getBarFill(a,q,z,h)),(C=DvtChartStyleUtils.getBorderColor(a,q,z))&&A.setStroke(new DvtSolidStroke(C)));
m&&A.setPixelHinting(!0);DvtChartObjPeer.associate(A,a,q,z);C=[];C.push(A);a._currentMarkers.push(C);A.setAriaRole("img");C=DvtChartTooltipUtils.getDatatip(null,a,q,z);A.setAriaProperty("label",C)}}!k&&!DvtChartDataUtils.hasMixedFrequency(a)&&(u+=t)}};
DvtPlotAreaRenderer._renderLines=function(a,b,d){for(var e=a.getContext(),g=[],h=DvtChartDataUtils.getSeriesCount(a),k=0;k<h;k++)DvtChartStyleUtils.isSeriesRendered(a,k)&&"line"==DvtChartStyleUtils.getSeriesType(a,k)&&g.push(k);d=DvtPlotAreaRenderer._getClippedGroup(a,b,d);for(h=0;h<g.length;h++){var k=g[h],m=DvtChartStyleUtils.getColor(a,k),n=DvtChartStyleUtils.getLineWidth(a,k),o=DvtStroke.convertTypeString(DvtChartStyleUtils.getLineStyle(a,k)),m=new DvtSolidStroke(m,1,n);m.setStyle(o);o=DvtPlotAreaRenderer._getPointsForSeries(a,
k);for(n=0;n<o.length;n++){var q=o[n];q&&1<q.length&&(q=new DvtPolyline(e,q),q.setStroke(m),d.addChild(q),DvtChartObjPeer.associate(q,a,k))}}for(h=0;h<g.length;h++)DvtPlotAreaRenderer._renderDataMarkersForSeries(a,b,g[h])};
DvtPlotAreaRenderer._renderAreas=function(a,b,d){for(var e=a.getContext(),g=DvtChartTypeUtils.isStacked(a),h=[],k=DvtChartDataUtils.getSeriesCount(a),m=0;m<k;m++)DvtChartStyleUtils.isSeriesRendered(a,m)&&"area"==DvtChartStyleUtils.getSeriesType(a,m)&&h.push(m);g&&h.reverse();for(k=0;k<h.length;k++){for(var m=h[k],n=DvtPlotAreaRenderer._getPointsForSeries(a,m),o=a.yAxis.getBaselineCoord(),q=0;q<n.length;q++){var s=n[q];if(s&&2<s.length){s.push(s[s.length-2],o);s.push(s[0],o);s=new DvtPolygon(e,s);
DvtPlotAreaRenderer._getClippedGroup(a,b,d).addChild(s);s.setFill(DvtChartSeriesEffectUtils.getAreaFill(a,m));var t=DvtChartStyleUtils.getBorderColor(a,m);t&&s.setStroke(new DvtSolidStroke(t));a._currentAreas.push(s);DvtChartObjPeer.associate(s,a,m)}}g||DvtPlotAreaRenderer._renderDataMarkersForSeries(a,b,m)}if(g)for(k=0;k<h.length;k++)DvtPlotAreaRenderer._renderDataMarkersForSeries(a,b,h[k])};
DvtPlotAreaRenderer._getPointsForSeries=function(a,b){var d=a.xAxis,e=a.yAxis;DvtChartDataUtils.isAssignedToY2(a,b)&&(e=a.y2Axis);for(var g=[],h=[],k=DvtChartDataUtils.getSeriesItem(a,b),m=0;m<k.data.length;m++){var n=k.data[m];if(null===DvtChartDataUtils.getValue(a,b,m))0<h.length&&(g.push(h),h=[]);else{var o=DvtChartAxisUtils.getXAxisValue(n,m),n=DvtChartDataUtils.getCumulativeValue(a,b,m),o=d.getCoordAt(o),n=e.getUnboundedCoordAt(n);h.push(o,n)}}0<h.length&&g.push(h);return g};
DvtPlotAreaRenderer._getClippedGroup=function(a,b,d){var e=new DvtContainer(b.getContext());b.addChild(e);a=new DvtClipPath(a.getId());a.addRect(d.x,d.y,d.w,d.h);e.setClipPath(a);return e};DvtPlotAreaRenderer._setInitialSelection=function(a,b){var d=a.getSelectionHandler();if(d){for(var e=a.getObjects(),g=[],h=0;h<b.length;h++)for(var k=0;k<e.length;k++){var m=e[k];m.getSeries()===b[h].series&&m.getGroup()===b[h].group&&g.push(m.getId())}d.processInitialSelections(g,e)}};var DvtPieRenderer={};
DvtObj.createSubclass(DvtPieRenderer,DvtObj,"DvtPieRenderer");DvtPieRenderer._THREED_TILT=0.41;DvtPieRenderer._THREED_DEPTH=0.1;DvtPieRenderer._RADIUS=0.4;DvtPieRenderer._RADIUS_LABELS=0.33;DvtPieRenderer._VIRTUAL_COORDINATE_SYSTEM_MAX_SIZE=32E3;DvtPieRenderer.render=function(a,b,d){DvtPieRenderer._renderPie(a,b,d)};
DvtPieRenderer._renderPie=function(a,b,d){var e=a.getOptions(),g=DvtChartDataUtils.getGroupLabel(a,0);if(g){var g=new DvtText(a.getContext(),g,0,0),h=new DvtCSSStyle;h.parseInlineStyle(e.styleDefaults.pieLabelStyle);g.setCSSStyle(h);b.addChild(g);h=g.getDimensions();d.h-=h.h;DvtLayoutUtils.position(d,"bottom",g,h.w,h.h,0)}g=new DvtPieChart(a.getContext(),a.getEventManager());b.addChild(g);h=new DvtPieInfo;g.setPieInfo(h);h.setFillType(DvtPieRenderer._getSeriesEffect(e.styleDefaults.seriesEffect));
h.setFeelerColor(e.styleDefaults.pieFeelerColor);var k=new DvtCSSStyle;k.parseInlineStyle(e.styleDefaults.sliceLabel.style);h.setCSSStyle(k);h.setLabelPosition(DvtPieRenderer._getLabelPosition(e.styleDefaults.sliceLabel.position));h.setLabelType(DvtPieRenderer._getLabelType(e.styleDefaults.sliceLabel.textType));e.styleDefaults.sliceLabel.converter&&h.setConverter(e.styleDefaults.sliceLabel.converter);h.setAnimationDuration(DvtChartStyleUtils.getAnimationDuration(a));"auto"===DvtChartStyleUtils.getAnimationOnDisplay(a)&&
h.setInitFx(!0);var k=new DvtPoint(d.x+Math.floor(d.w/2),d.y+Math.floor(d.h/2)),m=h.getLabelPosition()==DvtPieChart._LABEL_POS_OUTSIDE_FEELERS?DvtPieRenderer._RADIUS_LABELS:DvtPieRenderer._RADIUS,m=Math.floor(Math.min(d.w,d.h)*m);if(e="on"==e.styleDefaults.threeDEffect?!0:!1){g.set3D(e);e=d.h*DvtPieRenderer._THREED_DEPTH;g.setDepth(e);k.y-=Math.floor(e/2);var e=1,n=d.w/d.h,o=a.getContext().getStage().getDimensions(),n=o.w/o.h;1<n&&(e=1/n,n=1);m=DvtPieRenderer._computePieRadius(d,h,o);n-=n*DvtPieRenderer._THREED_TILT;
g.setPosition(k,DvtPieRenderer._virtToDest(m*e,o.w),DvtPieRenderer._virtToDest(m*n,o.h),d)}else g.setPosition(k,m,m,d);DvtPieRenderer._renderSlices(a,g)?g.render():DvtChartRenderer._renderEmptyText(a,b,d);a.pieChart=g;b=DvtChartDataUtils.getInitialSelection(a);DvtPieRenderer._setInitialSelection(a,b)};
DvtPieRenderer._computePieRadius=function(a,b,d){if(b.getLabelPosition()==DvtPieChart.LABEL_POS_NONE||b.getLabelPosition()==DvtPieChart.LABEL_POS_INSIDE)return DvtPieRenderer._calcVirtRadius(a.w<a.h?a.w/2-5:a.h/2-5,d);var e=b.getCSSStyle().getFontSize(),e=e?parseFloat(e):DvtCSSStyle.DEFAULT_FONT_SIZE,g=a.h/2,g=g-e,g=b.getLabelPosition()==DvtPieChart.LABEL_POS_OUTSIDE_FEELERS||b.getLabelPosition()==DvtPieChart.LABEL_POS_OUTSIDE||0<b.getAnimationDuration()?g/1.125:g/1.0625,a=a.w*DvtPieRenderer._RADIUS_LABELS;
return g<a?DvtPieRenderer._calcVirtRadius(g,d):DvtPieRenderer._calcVirtRadius(a,d)};DvtPieRenderer._calcVirtRadius=function(a,b){return b.w<b.h?DvtPieRenderer._destToVirt(a,b.w):DvtPieRenderer._destToVirt(a,b.h)};DvtPieRenderer._destToVirt=function(a,b){return parseInt(a*DvtPieRenderer._VIRTUAL_COORDINATE_SYSTEM_MAX_SIZE/b)};DvtPieRenderer._virtToDest=function(a,b){return a*b/DvtPieRenderer._VIRTUAL_COORDINATE_SYSTEM_MAX_SIZE};
DvtPieRenderer._renderSlices=function(a,b){for(var d=[],e=a.getOptions(),g,h,k=DvtPieChartUtils.getRenderedSeriesIndices(a),m,n=DvtPieChartUtils.getOtherValue(a),o=0;o<k.length;o++)if(m=k[o],DvtChartStyleUtils.isSeriesRendered(a,m)&&(g=DvtChartDataUtils.getValue(a,m,0),!(0>=g))){var q=new DvtSliceInfo;q.setId(DvtPieChartUtils.getSliceId(a,m));q.setText(DvtChartDataUtils.getSeries(a,m));q.setValue(g);q.setTooltip(DvtChartTooltipUtils.getDatatip(null,a,m,0));q.setExplode(DvtChartStyleUtils.getPieSliceExplode(a,
m));g=DvtChartStyleUtils.getColor(a,m);h=DvtChartStyleUtils.getBorderColor(a,m);q.setFillColor(DvtColorUtils.getRGB(g));q.setFillAlpha(DvtColorUtils.getAlpha(g));h&&(q.setStrokeColor(DvtColorUtils.getRGB(h)),q.setStrokeAlpha(DvtColorUtils.getAlpha(h)));(g=DvtChartDataUtils.getDataItem(a,m,0))&&g.action&&q.setAction(g.action);d.push(q)}0<n&&(k=new DvtSliceInfo,o=a.getBundle().getTranslatedString(DvtChartBundle.LABEL_OTHER,null),k.setId(DvtPieChartUtils.getOtherSliceId(a)),k.setText(o),k.setValue(n),
k.setTooltip(DvtChartTooltipUtils.getOtherSliceDatatip(a,n,0)),g=e.styleDefaults.otherColor,h=e.styleDefaults.borderColor,k.setFillColor(DvtColorUtils.getRGB(g)),k.setFillAlpha(DvtColorUtils.getAlpha(g)),h&&(k.setStrokeColor(DvtColorUtils.getRGB(h)),k.setStrokeAlpha(DvtColorUtils.getAlpha(h))),d.push(k));DvtStyleUtils.isLocaleR2L()&&d.reverse();for(o=0;o<d.length;o++)b.addSliceInfo(d[o]);return 0<d.length};
DvtPieRenderer._getLabelType=function(a){switch(a){case "text":return DvtPieChart.LABEL_TYPE_TEXT;case "value":return DvtPieChart.LABEL_TYPE_VALUE;case "textAndPercent":return DvtPieChart.LABEL_TYPE_TEXT_PERCENT;default:return DvtPieChart.LABEL_TYPE_PERCENT}};DvtPieRenderer._getLabelPosition=function(a){switch(a){case "inside":return DvtPieChart.LABEL_POS_INSIDE;case "outside":return DvtPieChart.LABEL_POS_OUTSIDE_FEELERS;default:return DvtPieChart.LABEL_POS_NONE}};
DvtPieRenderer._getSeriesEffect=function(a){switch(a){case "gradient":return DvtFill.GRADIENT;case "pattern":return DvtFill.PATTERN;default:return DvtFill.COLOR}};
DvtPieRenderer._setInitialSelection=function(a,b){var d=a.getSelectionHandler();if(d){for(var e=a.pieChart.__getSlices(),g=[],h=0;h<b.length;h++)for(var k=0;k<e.length;k++){var m=e[k].getId();(b[h].id&&m.getId()===b[h].id||m.getSeries()===b[h].series&&m.getGroup()===b[h].group)&&g.push(m)}DvtPieChartUtils.isOtherSliceSelected(a,b)&&(h=DvtPieChartUtils.getOtherSliceId(a),g.push(h));d.processInitialSelections(g,e)}};var DvtRefObjRenderer={};DvtObj.createSubclass(DvtRefObjRenderer,DvtObj,"DvtRefObjRenderer");
DvtRefObjRenderer.renderBackgroundObjects=function(a,b,d){DvtRefObjRenderer._renderObjects(a,b,d,"back")};DvtRefObjRenderer.renderForegroundObjects=function(a,b,d){DvtRefObjRenderer._renderObjects(a,b,d,"front")};
DvtRefObjRenderer._renderObjects=function(a,b,d,e){DvtRefObjRenderer._renderObjectsForAxis(a,b,d,e,a.xAxis,DvtChartRefObjUtils.getXAxisObjects(a));DvtRefObjRenderer._renderObjectsForAxis(a,b,d,e,a.yAxis,DvtChartRefObjUtils.getYAxisObjects(a));DvtRefObjRenderer._renderObjectsForAxis(a,b,d,e,a.y2Axis,DvtChartRefObjUtils.getY2AxisObjects(a))};
DvtRefObjRenderer._renderObjectsForAxis=function(a,b,d,e,g,h){if(h&&g&&!g.isGroupAxis())for(var k=g.getPosition(),k="top"==k||"bottom"==k,m=0;m<h.length;m++){var n=h[m];if(n&&n.color&&DvtChartRefObjUtils.getLocation(a,n)==e){var o=null,q=DvtChartRefObjUtils.getType(a,n);if("area"==q){if(!isNaN(n.lowValue)&&!isNaN(n.highValue)){o=g.getCoordAt(n.lowValue);q=g.getCoordAt(n.highValue);if(null===o&&null===q){if(o=g.getBoundedCoordAt(n.lowValue),q=g.getBoundedCoordAt(n.highValue),o==q)continue}else null===
o?o=g.getBoundedCoordAt(n.lowValue):null===q&&(q=g.getBoundedCoordAt(n.highValue));o=k?[o,0,q,0,q,d.h,o,d.h]:[0,o,0,q,d.w,q,d.w,o];o=new DvtPolygon(a.getContext(),o);o.setFill(new DvtSolidFill(n.color))}}else if("line"==q&&!isNaN(n.lineValue)){o=g.getCoordAt(n.lineValue);if(null===o)continue;o=k?new DvtLine(a.getContext(),o,0,o,d.h):new DvtLine(a.getContext(),0,o,d.w,o);q=new DvtSolidStroke(n.color,1,n.lineWidth?n.lineWidth:1);n.lineStyle&&q.setStyle(DvtStroke.convertTypeString(n.lineStyle));o.setStroke(q);
o.setPixelHinting(!0)}n=DvtChartTooltipUtils.getRefObjTooltip(a,n);a.getEventManager().associate(o,new DvtSimpleObjPeer(n));b.addChild(o);o.setAriaRole("img");o.setAriaProperty("label",n)}}};var DvtDataCursor=function(a){this.Init(a)};DvtObj.createSubclass(DvtDataCursor,DvtContainer,"DvtDataCursor");DvtDataCursor.DEFAULT_BACKGROUND_COLOR="#ffffff";DvtDataCursor.BEHAVIOR_SNAP="SNAP";DvtDataCursor.BEHAVIOR_SMOOTH="SMOOTH";DvtDataCursor.BEHAVIOR_AUTO="AUTO";
DvtDataCursor.prototype.Init=function(a){this._context=a;this.getImpl()||this.setImpl(a.getImplFactory().newContainer("dc"));DvtDataCursor.superclass.Init.call(this,a);this._textContainer=new DvtContainer(a,"dcTextContainer");this._textHolder=new DvtContainer(a,"dcTextHolder");this._textContainer.addChild(this._textHolder);this.addChild(this._textContainer);this._textItems=[];this._cursorLineWidth=2;this._pointerHeight=0;this._dataTooltipBorderWidth=2;this._cursorTopOffset=5;this._lineColor="black";
this.setMouseEnabled(!1);this._behavior=DvtDataCursor.BEHAVIOR_AUTO;this._dataCursorBounds=new DvtRectangle(0,0,1E3,1E3)};
DvtDataCursor.prototype.Render=function(){this._font||(this._font=new DvtFont);var a=this._borderColor;this._cursorText&&this._textHolder.removeChildren();var b=new DvtTextArea(this._context,0,0);this._textHolder.addChild(b);b.setMouseEnabled(!1);this._cursorText=b;DvtTextUtils.applyFont(this._cursorText,this._font);this._cursorText.setMaxWidth(1E8);this._cursorText.alignTop();this._cursorText.alignMiddle();this._cursorText.setText(this._tooltipLines);var d=this._cursorText.getDimensions(),b=d.h+
4+this._dataTooltipBorderWidth,d=d.w+4+this._dataTooltipBorderWidth;this._cursorText.setTranslateX(d/2);this._cursorText.setTranslateY(2+this._dataTooltipBorderWidth/2);if(!this._dataTextBox){var e=new DvtRect(this._context,0,0,d,b);this._tooltipFill||(this._tooltipFill=new DvtSolidFill(DvtDataCursor.DEFAULT_BACKGROUND_COLOR));e.setFill(this._tooltipFill);e.setMouseEnabled(!1);this._dataTextBox=e;this._textContainer.addChildAt(this._dataTextBox,0)}this._dataTextBox.setWidth(d);this._dataTextBox.setHeight(b);
this._dataTextBox.setStroke(new DvtSolidStroke(a,1,this._dataTooltipBorderWidth));this._renderCursorLines();this._setTranslatePosition()};DvtDataCursor.prototype.setBounds=function(a){this._bounds=a};DvtDataCursor.prototype.setCurrentPoint=function(a){this._currentPoint=a};DvtDataCursor.prototype.setText=function(a){this._tooltipLines=a};DvtDataCursor.prototype.setFont=function(a){this._font=a};DvtDataCursor.prototype.setLineColor=function(a){this._lineColor=a};
DvtDataCursor.prototype.getLineColor=function(){return this._lineColor};DvtDataCursor.prototype.setBehavior=function(a){this._behavior=a};DvtDataCursor.prototype.getBehavior=function(){return this._behavior};DvtDataCursor.prototype.setTooltipFill=function(a){this._tooltipFill=a};DvtDataCursor.prototype.setDataCursorBounds=function(a){this._dataCursorBounds=a};
DvtDataCursor.prototype._fitInBounds=function(a,b,d){a.x+=b;a.y+=d;a=DvtGeomUtils.GetOffsetValues(a,this._dataCursorBounds,5);this._textContainer.setTranslateX(a.offsetX+b);this._textContainer.setTranslateY(a.offsetY+d);this._adjustShapes(a)};DvtDataCursor.prototype.getCursorLineBounds=function(){var a=this._rect.getDimensions();a.x+=this._rect.getTranslateX()+this.getTranslateX();a.y+=this._rect.getTranslateY()+this.getTranslateY();return a};DvtDataCursor.prototype._adjustShapes=function(){};
DvtDataCursor.prototype.getTextContainer=function(){return this._textContainer};var DvtDataCursorHorizontal=function(a){DvtDataCursorHorizontal.superclass.Init.call(this,a)};DvtObj.createSubclass(DvtDataCursorHorizontal,DvtDataCursor,"DvtDataCursorHorizontal");
DvtDataCursorHorizontal.prototype._renderCursorLines=function(){if(!this._rect){var a=new DvtContainer(this._context,"dcLine"),b=new DvtRect(this._context,0,0,10,this._cursorLineWidth);b.setMouseEnabled(!1);b.setFill(new DvtSolidFill(this._lineColor,1));a.addChild(b);this.addChildAt(a,0);this._rect=a;this._mainLine=b}a=this._dataTextBox.getWidth();this._rect.setTranslateY(-this._cursorLineWidth/2);a=this._bounds.w-a+this._cursorTopOffset-this._dataTooltipBorderWidth/2;0>a&&(a=0);this._mainLine.setWidth(a)};
DvtDataCursorHorizontal.prototype._setTranslatePosition=function(){this.setTranslateX(this._bounds.x);this.setTranslateY(this._currentPoint.y);var a=new DvtRectangle(this._bounds.x,this._currentPoint.y,this._dataTextBox.getWidth(),this._dataTextBox.getHeight()),a=DvtGeomUtils.getPaddedRectangle(a,this._dataTooltipBorderWidth/2);this._fitInBounds(a,this._bounds.w-this._dataTextBox.getWidth()+this._cursorTopOffset,-this._dataTextBox.getHeight()/2)};
DvtDataCursorHorizontal.prototype._adjustShapes=function(a){a=this._mainLine.getWidth()+a.offsetX;0>a&&(a=0);this._mainLine.setWidth(a)};var DvtDataCursorVertical=function(a){DvtDataCursorVertical.superclass.Init.call(this,a)};DvtObj.createSubclass(DvtDataCursorVertical,DvtDataCursor,"DvtDataCursorVertical");
DvtDataCursorVertical.prototype._renderCursorLines=function(){if(!this._rect){var a=new DvtContainer(this._context,"dcLine"),b=new DvtRect(this._context,0,0,this._cursorLineWidth,10);b.setMouseEnabled(!1);b.setFill(new DvtSolidFill(this._lineColor,1));var d=new DvtRect(this._context,this._cursorLineWidth,this._cursorLineWidth,this._cursorLineWidth,10);d.setMouseEnabled(!1);d.setFill(new DvtSolidFill(this._lineColor,0.35));a.addChild(b);this.addChildAt(a,0);this._rect=a;this._mainLine=b}a=this._dataTextBox.getHeight();
this._rect.setTranslateX(-this._cursorLineWidth/2);this._rect.setTranslateY(a+this._pointerHeight+this._dataTooltipBorderWidth/2);a=this._bounds.h+this._cursorTopOffset-a-this._pointerHeight-this._dataTooltipBorderWidth;0>a&&(a=0);this._mainLine.setHeight(a)};
DvtDataCursorVertical.prototype._setTranslatePosition=function(){this.setTranslateX(this._currentPoint.x);this.setTranslateY(this._bounds.y-this._cursorTopOffset+this._dataTooltipBorderWidth/2);var a=new DvtRectangle(this._currentPoint.x,this._bounds.y-this._cursorTopOffset,this._dataTextBox.getWidth(),this._dataTextBox.getHeight()),a=DvtGeomUtils.getPaddedRectangle(a,this._dataTooltipBorderWidth/2);this._fitInBounds(a,-this._dataTextBox.getWidth()/2,0)};
DvtDataCursorVertical.prototype._adjustShapes=function(a){var b=this._mainLine.getHeight()-a.offsetY;0>b&&(b=0);this._mainLine.setHeight(b);this._rect.setTranslateY(this._rect.getTranslateY()+a.offsetY)};var DvtDCEH=function(a,b,d){this._Init(a,b,d)};DvtObj.createSubclass(DvtDCEH,DvtObj,"DvtDCEH");
DvtDCEH.prototype._Init=function(a,b,d){this._context=a;this._isNumericMainAxis=this._useAllInGroup=this._horizontal=this._dataCursorShown=!1;this._dataCursor=b;this._markerContainer=d;this._threeDHorizontalOffset=0};DvtDCEH.prototype.processMove=function(a,b,d,e){if(d){b=this._context.getRelativePosition(a,b);a=b.x;b=b.y;if(e=this.getActionablePlotRect(a,b,e))return this._showDataCursor(e,a,b,d),this._dataCursorShown=!0;this._removeDataCursor();return this._dataCursorShown=!1}this._removeDataCursor()};
DvtDCEH.prototype.processEnd=function(){this._removeDataCursor()};DvtDCEH.prototype.processOut=function(a){this.getPlotRect().containsPoint(a.x,a.y)||this._removeDataCursor()};
DvtDCEH.prototype._showDataCursor=function(a,b,d,e){var g=this._markerContainer.getChildAt(0).getChildAt(1),h=this._dataCursor;h.setBounds(a);var k=this.getClosestMatch(b,d,e,a);if(null==k)return this._removeDataCursor(),!1;var m=DvtGeomUtils.getCenterPoint(k.matchRegion),e=m.x,m=m.y;h.getBehavior()==DvtDataCursor.BEHAVIOR_SNAP&&(h instanceof DvtDataCursorVertical?(b=e,b<a.x?b=a.x:b>a.x+a.w&&(b=a.x+a.w)):(d=m,d<a.y?d=a.y:d>a.y+a.h&&(d=a.y+a.h)));this._threeDHorizontalOffset&&(a=a.x+a.w-this._threeDHorizontalOffset,
b>a&&(b=a));h.setCurrentPoint(new DvtPoint(b,d));a=k.sidx;d=k.gidx;k=this.getTooltipText(k);a=this.getSeriesColor(a,d);if(!this._marker){var d=new DvtContainer(this._context,"dotContainer"),b=new DvtMarker(this._context,DvtMarker.CIRCLE,0,0,16,16),n=new DvtMarker(this._context,DvtMarker.CIRCLE,2,2,12,12),o=new DvtMarker(this._context,DvtMarker.CIRCLE,4,4,8,8),q=new DvtSolidFill("black",1);b.setFill(q);q=new DvtSolidFill("white",1);n.setFill(q);d.setMouseEnabled(!1);b.setMouseEnabled(!1);n.setMouseEnabled(!1);
o.setMouseEnabled(!1);d.addChild(b);d.addChild(n);d.addChild(o);this._coloredDot=o;this._marker=d}d=this._marker;o=this._coloredDot;q=new DvtSolidFill(a,1);o.setFill(q);m-=8;d.setTranslateX(e-8);d.setTranslateY(m);this._markerContainer.addChildAt(d,1);this._marker.setVisible(!0);h._borderColor=a;!k||""==k?(h.setVisible(!1),h.getTextContainer().setVisible(!1)):(h.setVisible(!0),h.getTextContainer().setVisible(!0));h.setText(k);h.Render();this._markerContainer.addChild(g);g=this._markerContainer.getChildAt(2);
null!=g&&(g.setTranslateX(this._dataCursor.getTranslateX()-this._dataCursor._dataTextBox.getWidth()/2),g.setTranslateY(this._dataCursor.getTranslateY()));return!0};DvtDCEH.prototype._removeDataCursor=function(){var a=this._dataCursor;a.getVisible()&&(a.setVisible(!1),a.getTextContainer().setVisible(!1));this._marker&&this._marker.setVisible(!1)};DvtDCEH.prototype.isDataCursorShown=function(){return this._dataCursorShown};
DvtDCEH.AddPotentialMatch=function(a,b,d,e){var g=b.matchRegion;if(e){if(g.y+g.h<d.y||g.y>d.y+d.h)return!1}else if(g.x+g.w<d.x||g.x>d.x+d.w)return!1;a.push(b);return!0};DvtDCEH.GetClosestMatchSecondDirection=function(a,b,d,e){for(var g=null,h=1E8,k=0;k<a.length;k++){var m=a[k],n=Math.abs(((b?m.matchRegion.x:m.matchRegion.y)+(b?m.matchRegion.x+m.matchRegion.w:m.matchRegion.y+m.matchRegion.h))/2-(b?d:e));n<h&&(h=n,g=m)}return g};
DvtDCEH.GetClosestMatchesFirstDirection=function(a,b,d,e){for(var g=1E7,h=[],k=0;k<a.length;k++){var m=a[k],n=Math.abs(((b?m.matchRegion.y:m.matchRegion.x)+(b?m.matchRegion.y+m.matchRegion.h:m.matchRegion.x+m.matchRegion.w))/2-(b?e:d));n<=g&&(n<g&&(h=[]),h.push(m),g=n)}return h};DvtDCEH.prototype.getActionablePlotRect=function(){return null};DvtDCEH.prototype.getPlotRect=function(){return null};DvtDCEH.prototype.getSeriesColor=function(){return"black"};DvtDCEH.prototype.getTooltipText=function(){return"Base class should override"};
DvtDCEH.prototype.getTargetSeriesIndex=function(){return-1};DvtDCEH.prototype.findMatches=function(){return null};
DvtDCEH.prototype.getClosestMatch=function(a,b,d,e){var g=this._horizontal,h=this._useAllInGroup,k=this._isNumericMainAxis,m=this.getTargetSeriesIndex(d),n=[];if(d=this.findMatches(a,b,d,n,e,m))return d;d=DvtDCEH.GetClosestMatchesFirstDirection(n,g,a,b);if(!k){for(var k=1E6,e=-1E6,o=null,m=0;m<d.length;m++)o=d[m],k=Math.min(k,g?o.matchRegion.y:o.matchRegion.x),e=Math.max(e,g?o.matchRegion.y+o.matchRegion.h:o.matchRegion.x+o.matchRegion.w),o=o.gidx;for(m=0;m<n.length;m++){var q=n[m],s=q.gidx;h?o==
s&&d.push(q):(s=((g?q.matchRegion.y:q.matchRegion.x)+(g?q.matchRegion.y+q.matchRegion.h:q.matchRegion.x+q.matchRegion.w))/2,e>=s&&k<=s&&d.push(q))}}return DvtDCEH.GetClosestMatchSecondDirection(d,g,a,b)};DvtDCEH.getGlobalBounds=function(a){var b=a.getDimensions(a.getParent()),a=a.getParent().localToStage(new DvtPoint(b.x,b.y));b.x=a.x;b.y=a.y;return b};var DvtChartDCEH=function(a){this._Init(a)};DvtObj.createSubclass(DvtChartDCEH,DvtDCEH,"DvtChartDCEH");
DvtChartDCEH.prototype._Init=function(a){DvtChartDCEH.superclass._Init.call(this,a.getContext(),a._dataCursor,a._dcContainer);this._Chart=a;this._horizontal=DvtChartTypeUtils.isHorizontal(a);this._useAllInGroup=DvtChartTypeUtils.isArea(a)||DvtChartTypeUtils.isLine(a);this._isNumericMainAxis=DvtChartTypeUtils.isScatter(a)||DvtChartTypeUtils.isBubble(a);this._isStockChart=!1;this._isArea=DvtChartTypeUtils.isArea(a)};
DvtChartDCEH.prototype.getPlotRect=function(){var a=this._Chart._plotRect,b=a.getDimensions(),a=a.localToStage(new DvtPoint(b.x,b.y));b.x=a.x;b.y=a.y;return b};DvtChartDCEH.prototype.getActionablePlotRect=function(a,b){var d=this.getPlotRect();return d.containsPoint(a,b)?d:null};
DvtChartDCEH.prototype.findMatches=function(a,b,d,e){a=this._Chart;b=a.getEventManager();if(!a._currentMarkers)return null;var g=null;if(a._currentSeriesCategory){var h=DvtChartDataUtils.getSeriesIndex(a,a._currentSeriesCategory);-1!=h&&(g||(g={}),g[h]=!0)}if(null==g&&this._isArea){var k=a._currentAreas;if(k)for(h=0;h<k.length;h++){var m=k[h];d==m&&(g||(g={}),g[b.GetLogicalObject(m).getSeriesIndex()]=!0)}}for(h=0;h<a._currentMarkers.length;h++){d=a._currentMarkers[h];k=d.length;for(m=0;m<k;m++){var n=
d[m],o=b.GetLogicalObject(n),q=o.getSeriesIndex();if(!g||g&&g[q]){var s=DvtDCEH.getGlobalBounds(n),n={obj:n,matchRegion:s,gidx:o.getGroupIndex(),sidx:q,marker:null};e.push(n)}}}return null};DvtChartDCEH.prototype.getSeriesColor=function(a,b){return DvtChartTooltipUtils.getDatatipColor(this._Chart,a,b)};DvtChartDCEH.prototype.getTooltipText=function(a){return DvtChartTooltipUtils.getDatatip(a.obj,this._Chart,a.sidx,a.gidx)};