/*
 Highcharts JS v7.1.3 (2019-08-14)

 (c) 2010-2019 Highsoft AS
 Author: Sebastian Domas

 License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/histogram-bellcurve",["highcharts"],function(b){a(b);a.Highcharts=b;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function b(a,f,b,l){a.hasOwnProperty(f)||(a[f]=l.apply(null,b))}a=a?a._modules:{};b(a,"mixins/derived-series.js",[a["parts/Globals.js"],a["parts/Utilities.js"]],function(a,f){var k=f.defined,b=a.Series,
h=a.addEvent;return{hasDerivedData:!0,init:function(){b.prototype.init.apply(this,arguments);this.initialised=!1;this.baseSeries=null;this.eventRemovers=[];this.addEvents()},setDerivedData:a.noop,setBaseSeries:function(){var a=this.chart,d=this.options.baseSeries;this.baseSeries=k(d)&&(a.series[d]||a.get(d))||null},addEvents:function(){var a=this;var d=h(this.chart,"afterLinkSeries",function(){a.setBaseSeries();a.baseSeries&&!a.initialised&&(a.setDerivedData(),a.addBaseSeriesEvents(),a.initialised=
!0)});this.eventRemovers.push(d)},addBaseSeriesEvents:function(){var a=this;var d=h(a.baseSeries,"updatedData",function(){a.setDerivedData()});var k=h(a.baseSeries,"destroy",function(){a.baseSeries=null;a.initialised=!1});a.eventRemovers.push(d,k)},destroy:function(){this.eventRemovers.forEach(function(a){a()});b.prototype.destroy.apply(this,arguments)}}});b(a,"modules/histogram.src.js",[a["parts/Globals.js"],a["parts/Utilities.js"],a["mixins/derived-series.js"]],function(a,f,b){function k(a){return function(c){for(var e=
1;a[e]<=c;)e++;return a[--e]}}var h=f.isNumber,q=f.objectEach;f=a.seriesType;var d=a.correctFloat,n=a.arrayMax,r=a.arrayMin;a=a.merge;var g={"square-root":function(a){return Math.ceil(Math.sqrt(a.options.data.length))},sturges:function(a){return Math.ceil(Math.log(a.options.data.length)*Math.LOG2E)},rice:function(a){return Math.ceil(2*Math.pow(a.options.data.length,1/3))}};f("histogram","column",{binsNumber:"square-root",binWidth:void 0,pointPadding:0,groupPadding:0,grouping:!1,pointPlacement:"between",
tooltip:{headerFormat:"",pointFormat:'<span style="font-size: 10px">{point.x} - {point.x2}</span><br/><span style="color:{point.color}">\u25cf</span> {series.name} <b>{point.y}</b><br/>'}},a(b,{setDerivedData:function(){var a=this.baseSeries.yData;a.length&&(a=this.derivedData(a,this.binsNumber(),this.options.binWidth),this.setData(a,!1))},derivedData:function(a,e,g){var c=n(a),b=d(r(a)),f=[],m={},l=[];g=this.binWidth=this.options.pointRange=d(h(g)?g||1:(c-b)/e);for(e=b;e<c&&(this.userOptions.binWidth||
d(c-e)>=g||0>=d(b+f.length*g-e));e=d(e+g))f.push(e),m[e]=0;0!==m[b]&&(f.push(d(b)),m[d(b)]=0);var p=k(f.map(function(a){return parseFloat(a)}));a.forEach(function(a){a=d(p(a));m[a]++});q(m,function(a,c){l.push({x:Number(c),y:a,x2:d(Number(c)+g)})});l.sort(function(a,c){return a.x-c.x});return l},binsNumber:function(){var a=this.options.binsNumber,e=g[a]||"function"===typeof a&&a;return Math.ceil(e&&e(this.baseSeries)||(h(a)?a:g["square-root"](this.baseSeries)))}}))});b(a,"modules/bellcurve.src.js",
[a["parts/Globals.js"],a["parts/Utilities.js"],a["mixins/derived-series.js"]],function(a,b,p){function f(a){var b=a.length;a=a.reduce(function(a,b){return a+b},0);return 0<b&&a/b}function h(a,b){var c=a.length;b=d(b)?b:f(a);a=a.reduce(function(a,c){c-=b;return a+c*c},0);return 1<c&&Math.sqrt(a/(c-1))}function k(a,b,c){a-=b;return Math.exp(-(a*a)/(2*c*c))/(c*Math.sqrt(2*Math.PI))}var d=b.isNumber;b=a.seriesType;var n=a.correctFloat;a=a.merge;b("bellcurve","areaspline",{intervals:3,pointsInInterval:3,
marker:{enabled:!1}},a(p,{setMean:function(){this.mean=n(f(this.baseSeries.yData))},setStandardDeviation:function(){this.standardDeviation=n(h(this.baseSeries.yData,this.mean))},setDerivedData:function(){1<this.baseSeries.yData.length&&(this.setMean(),this.setStandardDeviation(),this.setData(this.derivedData(this.mean,this.standardDeviation),!1))},derivedData:function(a,b){var c=this.options.intervals,e=this.options.pointsInInterval,d=a-c*b;c=c*e*2+1;e=b/e;var f=[],g;for(g=0;g<c;g++)f.push([d,k(d,
a,b)]),d+=e;return f}}));""});b(a,"masters/modules/histogram-bellcurve.src.js",[],function(){})});
//# sourceMappingURL=histogram-bellcurve.js.map