/*
jQWidgets v3.7.1 (2015-Feb)
Copyright (c) 2011-2015 jQWidgets.
License: http://jqwidgets.com/license/
*/
(function(n){n.extend(n.jqx._jqxChart.prototype,{_moduleWaterfall:!0,_isSummary:function(n,t){for(var r=this.seriesGroups[n],i=0;i<r.series.length;i++)if(undefined!==r.series[i].summary&&(summaryValue=this._getDataValue(t,r.series[i].summary,n),undefined!==summaryValue))return!0;return!1},_applyWaterfall:function(n,t,i,r,u,f,e,o,s){var it=this.seriesGroups[i],d,c,h,a,v,w,y;if(n.length==0)return n;var g=r,l={},nt=[],p=undefined,tt=[];for(h=0;h<it.series.length;h++)tt.push(this._isSerieVisible(i,h));for(d={},c=0;c<t;c++){var b=r,k=0,rt=this._isSummary(i,c);for(h=0;h<n.length;h++)if(tt[h]){if(a=0,rt){a=b==r?u:0;n[h][c].value=l[h];n[h][c].summary=!0;p=n[h][c].value<a;o&&(p=!p);y=0;y=isNaN(f)?this._getDataPointOffsetDiff(n[h][c].value,a,a,NaN,e,r,o):this._getDataPointOffsetDiff(n[h][c].value+k,k==0?u:k,a||u,f,e,r,o);n[h][c].to=b+(p?y:-y);n[h][c].from=b;s&&(k+=n[h][c].value,b=n[h][c].to);continue}(v=s?-1:h,isNaN(n[h][c].value))||(undefined===d[v]&&(a=u,d[v]=!0),p=n[h][c].value<a,o&&(p=!p),w=NaN,y=NaN,w=s?g:c==0?r:n[h][nt[h]].to,y=0,y=isNaN(f)?this._getDataPointOffsetDiff(n[h][c].value,a,a,NaN,e,r,o):this._getDataPointOffsetDiff(n[h][c].value+(isNaN(l[v])?0:l[v]),isNaN(l[v])?u:l[v],a||u,f,e,w,o),n[h][c].to=g=w+(p?y:-y),n[h][c].from=w,isNaN(l[v])?l[v]=n[h][c].value:l[v]+=n[h][c].value,v==-1&&(isNaN(l[h])?l[h]=n[h][c].value:l[h]+=n[h][c].value),s||(nt[h]=c))}}return n}})})(jqxBaseFramework)