text: // All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  // See http://js.arcgis.com/3.24/esri/copyright.txt for details.
  //>>built
  define("esri/dijit/geoenrichment/ReportPlayer/core/charts/chartUtils/builder/columnBarLine/_ColumnBarChartSeriesCalculator","dojo/_base/lang ../../ThemeCalculator ../../ChartSorting ../../../../supportClasses/conditionalStyling/ConditionalStyleUtil ../utils/ChartDataUtil ../utils/TooltipInfoBuilder ./_ComparisonUtil ./_AxisBuilder ./_PointLabelUtil".split(" "),function(D,v,B,C,x,E,F,G,n){return{calcSeriesColumnBar:function(a){var f=a.chart,g=a.visualProperties,d=a.seriesItems,r=1===d.length,w=a.seriesItemsWithComparison||
  d,h=a.chartType,y=a.comparisonInfo,z=a.themeSettings,t=a.viewModel,l=1===w.length&&a.sorting,x=1<w.length&&g.renderColumnBarsInOppositeDirections,p=[],b={minYValue:Infinity,maxYValue:-Infinity,stackedValues:g.isStacked?[]:null};n.createPointToLabelMap(f);var u={};w.forEach(function(e,d){if(e.points.length){var m={name:e.label,data:[],isComparisonSeries:e.isComparisonSeries,params:{plot:e.isComparisonSeries&&F.getComparisonPlotName(h,y)||void 0}},k=this._collectStatisticsForSeries(a,e,d,b);v.provideMissingIconsForPoints(e.points,
  h);e.points.forEach(function(a,A){var c=k.values[A],b=c||0,f=A+1,q;g.conditionalStyling&&(q=(q=C.getConditionalStyle(b,g.conditionalStyling))&&q.backgroundColor);q=q||v.calcColorForPoint(a,e,A,d,r?1:2,h,z,e.isComparisonSeries,y);var l=E.getTooltipInfo(c,n.getPointLabel(a,t),e.label,k.minInSeries,k.maxInSeries,k.valuesSum,k.absValuesSum,k.avgInSeries,g,h,q,g.conditionalStyling,a.fieldInfo,y?!e.isComparisonSeries:void 0),p=u[f]=u[f]||[];p.push(l);l.getGroup=function(){return p};c={x:f,y:b*(x&&d>=w.length/
  2?-1:1),originalValue:c,isUnavailableData:isNaN(c),valueProp:"y",unsortedIndex:A,name:n.getPointLabel(a,t),_valuesSumsInSeries:k.absValuesSum,point:a,fill:q,tooltip:l,icon:v.calcIconForPoint(a,q,h),bgIcon:v.calcBackgroundIconForPoint(a,h,z,g),stroke:{width:0}};g.yAxis.showValuesAsWeightsInSeries&&(c.y/=k.absValuesSum/100);m.data.push(c)});l&&l!==B.NONE&&(m.data.sort(function(a,b){return(a.y-b.y)*(l===B.DESC?-1:1)}),m.data.forEach(function(a,b){a.x=b+1}));m.data.forEach(function(a){n.updatePointIndexToLabelMap(f,
  a.x,a.point,t)});p.push(m)}},this);b.stackedValues&&(b.stackedValues.sort(function(a,b){return b-a}),b.minYValue=b.stackedValues[b.stackedValues.length-1],b.maxYValue=b.stackedValues[0]);G.prettifyYAxis(b.minYValue,b.maxYValue,g.yAxis.baseLineValue,f,g,h,z,t,p.length);a.plotStat&&(D.mixin(a.plotStat,b),a.plotStat.pointIndexToTooltipsHash=u);return p},_collectStatisticsForSeries:function(a,f,g,d){var r=a.visualProperties,w=a.viewModel,h=a.seriesItems,y=a.previewFeatureIndex,z=a.isMultiFeatureChart,
  t=a.excludedSeriesHash,l=a.selectedComparisonIndex,v=a.ge,p=a.chartType;a=1<h.length&&r.renderColumnBarsInOppositeDirections;var b=2===h.length&&a?x.CHART_DATA_SMOOTH:null;r.conditionalStyling&&(a=C.getStatistics(r.conditionalStyling))&&h.length&&(b=x.getChartData(a,h[0].points.length,b,!1));var u=[],e=0,n=0,m=1E6,k=-1E6;f.points.forEach(function(a,d){var c=x.getPreviewValue(a,d,g,!1,p,r,w,z?d:y,b,f.isComparisonSeries,l,v,!1),c=(u[d]=c)||0;t&&t[f.label]||(e+=c,n+=Math.abs(c),m=Math.min(m,c),k=Math.max(k,
  c))});f.points.forEach(function(a,b){var c=u[b],c=r.yAxis.showValuesAsWeightsInSeries?c/n*100:c;d.stackedValues?(d.stackedValues[b]=d.stackedValues[b]||0,d.stackedValues[b]+=c):(d.minYValue=Math.min(c,d.minYValue),d.maxYValue=Math.max(c,d.maxYValue))});return{values:u,valuesSum:e,absValuesSum:n,minInSeries:m,maxInSeries:k,avgInSeries:e/f.points.length}}}});