/* Highcharts JS v7.0.3 (2019-02-06) Data grouping module (c) 2010-2019 Torstein Hnsi License: www.highcharts.com/license */ (function(e){"object"===typeof module&&module.exports?(e["default"]=e,module.exports=e):"function"===typeof define&&define.amd?define(function(){return e}):e("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(e){return function(d){var e=d.addEvent,H=d.arrayMax,I=d.arrayMin,v=d.Axis,J=d.defaultPlotOptions,C=d.defined,K=d.extend,L=d.format,n=d.isNumber,D=d.merge,w=d.pick,M=d.Point,x=d.Series,N=d.Tooltip,h=d.approximations={sum:function(a){var c=a.length,b;if(!c&&a.hasNulls)b=null;else if(c)for(b= 0;c--;)b+=a[c];return b},average:function(a){var c=a.length;a=h.sum(a);n(a)&&c&&(a/=c);return a},averages:function(){var a=[];[].forEach.call(arguments,function(c){a.push(h.average(c))});return void 0===a[0]?void 0:a},open:function(a){return a.length?a[0]:a.hasNulls?null:void 0},high:function(a){return a.length?H(a):a.hasNulls?null:void 0},low:function(a){return a.length?I(a):a.hasNulls?null:void 0},close:function(a){return a.length?a[a.length-1]:a.hasNulls?null:void 0},ohlc:function(a,c,b,k){a=h.open(a); c=h.high(c);b=h.low(b);k=h.close(k);if(n(a)||n(c)||n(b)||n(k))return[a,c,b,k]},range:function(a,c){a=h.low(a);c=h.high(c);if(n(a)||n(c))return[a,c];if(null===a&&null===c)return null}},F=function(a,c,b,k){var f=this,d=f.data,r=f.options&&f.options.data,E=[],l=[],p=[],m=a.length,g,e,t=!!c,u=[],y=f.pointArrayMap,v=y&&y.length,z=["x"].concat(y||["y"]),A=0,w=0,x,q;k="function"===typeof k?k:h[k]?h[k]:h[f.getDGApproximation&&f.getDGApproximation()||"average"];v?y.forEach(function(){u.push([])}):u.push([]); x=v||1;for(q=0;q<=m&&!(a[q]>=b[0]);q++);for(q;q<=m;q++){for(;void 0!==b[A+1]&&a[q]>=b[A+1]||q===m;){g=b[A];f.dataGroupInfo={start:f.cropStart+w,length:u[0].length};e=k.apply(f,u);f.pointClass&&!C(f.dataGroupInfo.options)&&(f.dataGroupInfo.options=D(f.pointClass.prototype.optionsToObject.call({series:f},f.options.data[f.cropStart+w])),z.forEach(function(a){delete f.dataGroupInfo.options[a]}));void 0!==e&&(E.push(g),l.push(e),p.push(f.dataGroupInfo));w=q;for(g=0;gthis.chart.plotSizeX/d||c&&e.forced)&&(f=!0);return f?d:0};v.prototype.setDataGrouping=function(a,c){var b;c=w(c,!0);a||(a={forced:!1,units:null});if(this instanceof v)for(b=this.series.length;b--;)this.series[b].update({dataGrouping:a}, !1);else this.chart.options.series.forEach(function(b){b.dataGrouping=a},!1);this.ordinalSlope=null;c&&this.chart.redraw()};return d.dataGrouping=O}(e)}); //# sourceMappingURL=datagrouping.js.map