// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
define("esri/dijit/geoenrichment/ReportPlayer/core/charts/chartUtils/plots/_ClusteredColumnsBase","dojo/_base/lang dojo/_base/array dojo/_base/declare dojo/has dojox/charting/plot2d/CartesianBase dojox/charting/plot2d/_PlotEvents dojox/charting/plot2d/common dojox/lang/functional dojox/lang/functional/reversed dojox/lang/utils ./labelsRendering/_ColumnsLabelRenderingFix ./animation/_ClusteredColumnsAnimation ./_MinVisibleColumn".split(" "),function(n,p,v,F,G,H,r,I,J,m,K,L,M){var N=J.lambda("item.purgeGroup()");
return v("dojox.charting.plot2d.Columns",[G,H,K,L,M],{_animationInfos:null,defaultParams:{gap:0,animate:null,enableCache:!1},optionalParams:{minBarSize:1,maxBarSize:1,stroke:{},outline:{},shadow:{},fill:{},filter:{},styleFunc:null,font:"",fontColor:"",labelHorizontalAlign:null},constructor:function(a,c){this.opt=n.clone(n.mixin(this.opt,this.defaultParams));m.updateWithObject(this.opt,c);m.updateWithPattern(this.opt,c,this.optionalParams);this.animate=this.opt.animate;this.renderingOptions={"shape-rendering":"crispEdges"}},
getSeriesStats:function(){var a=r.collectSimpleStats(this.series,function(a){return null==a});a.hmin-=.5;a.hmax+=.5;return a},render:function(a,c){if(this.zoom&&!this.isDataDirty())return this.performZoom(a,c);this.resetEvents();this.dirty=this.isDirty();var e;this.dirty&&(p.forEach(this.series,N),this._eventSeries={},this.cleanGroup(),e=this.getGroup(),I.forEachRev(this.series,function(a){a.cleanGroup(e)}));var h=this.chart.theme,n=this._hScaler.scaler.getTransformerFromModel(this._hScaler),w=this._vScaler.scaler.getTransformerFromModel(this._vScaler),
x=Math.max(0,this._vScaler.bounds.lower),y=w(x),r=this.events(),t=this.getBarProperties(),z=this.series.length;p.forEach(this.series,function(a){a.hidden&&z--});this._animationInfos=[];for(var u=this.series.length-1;0<=u;--u){var b=this.series[u];if(this.dirty||b.dirty){b.cleanGroup();this.opt.enableCache&&(b._rectFreePool=(b._rectFreePool?b._rectFreePool:[]).concat(b._rectUsePool?b._rectUsePool:[]),b._rectUsePool=[]);var A=h.next("column",[this.opt,b]),m=Array(b.data.length);if(b.hidden)b.dyn.fill=
A.series.fill;else{z--;e=b.group;for(var q=p.some(b.data,function(a){return"number"===typeof a||a&&!a.hasOwnProperty("x")}),v=q?Math.min(b.data.length,Math.ceil(this._hScaler.bounds.to)):b.data.length,f=q?Math.max(0,Math.floor(this._hScaler.bounds.from-1)):0;f<v;++f){var d=b.data[f];if(null!=d){var g=this.getValue(d,f,u,q),B=w(g.y),C=Math.abs(B-y),k;this.opt.styleFunc||"number"!==typeof d?(k="number"!==typeof d?[d]:[],this.opt.styleFunc&&k.push(this.opt.styleFunc(d)),k=h.addMixin(A,"column",k,!0)):
k=h.post(A,"column");if(1<=t.width&&0<=C){var l={x:c.l+n(g.x+.5)+t.gap+t.thickness*z,y:a.height-c.b-(g.y>x?B:y),width:t.width,height:C},l=this._drawColumn(e,d,l,k,a,c,b),D=l.shape,l=l.rect;if(r){var E={element:"column",index:f,run:b,shape:D,cx:g.x+.5,cy:g.y,x:q?f:b.data[f].x,y:q?b.data[f]:b.data[f].y};this._connectEvents(E);m[f]=E}!isNaN(g.py)&&g.py>x&&(l.height=B-w(g.py));this.createLabel(e,d,l,k);this.animate&&(d={shape:D,voffset:a.height-c.b-y,vsize:C},this._animationInfos.push(d),this._animateColumn(d))}}}this._eventSeries[b.name]=
m;b.dirty=!1}}else h.skip(),this._reconnectEvents(b.name)}this.dirty=!1;F("dojo-bidi")&&this._checkOrientation(this.group,a,c);return this},_drawColumn:function(a,c,e,h,m,n,p){},getValue:function(a,c,e,h){h?(e="number"===typeof a?a:a.y,a=c):(e=a.y,a=a.x-1);return{x:a,y:e}},getBarProperties:function(){var a=this.series.length;p.forEach(this.series,function(c){c.hidden&&a--});var c=r.calculateBarSize(this._hScaler.bounds.scale,this.opt,a);return{gap:c.gap,width:c.size,thickness:c.size,clusterSize:a}}})});