/*
 Highcharts JS v7.0.3 (2019-02-06)
 X-range series

 (c) 2010-2019 Torstein Honsi, Lars A. V. Cabrera

 License: www.highcharts.com/license
*/
(function(f){"object"===typeof module&&module.exports?(f["default"]=f,module.exports=f):"function"===typeof define&&define.amd?define(function(){return f}):f("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(f){(function(c){var f=c.addEvent,u=c.defined,x=c.Color,v=c.seriesTypes.column,y=c.correctFloat,w=c.isNumber,r=c.isObject,n=c.merge,t=c.pick,z=c.seriesType,A=c.Axis,h=c.Point,B=c.Series;z("xrange","column",{colorByPoint:!0,dataLabels:{verticalAlign:"middle",inside:!0,formatter:function(){var a=
this.point.partialFill;r(a)&&(a=a.amount);u(a)||(a=0);return y(100*a)+"%"}},tooltip:{headerFormat:'\x3cspan style\x3d"font-size: 10px"\x3e{point.x} - {point.x2}\x3c/span\x3e\x3cbr/\x3e',pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cb\x3e{point.yCategory}\x3c/b\x3e\x3cbr/\x3e'},borderRadius:3,pointRange:0},{type:"xrange",parallelArrays:["x","x2","y"],requireSorting:!1,animate:c.seriesTypes.line.prototype.animate,cropShoulder:1,getExtremesFromAll:!0,
autoIncrement:c.noop,getColumnMetrics:function(){function a(){d.series.forEach(function(a){var b=a.xAxis;a.xAxis=a.yAxis;a.yAxis=b})}var b,d=this.chart;a();b=v.prototype.getColumnMetrics.call(this);a();return b},cropData:function(a,b,d,m){b=B.prototype.cropData.call(this,this.x2Data,b,d,m);b.xData=a.slice(b.start,b.end);return b},translatePoint:function(a){var b=this.xAxis,d=this.yAxis,m=this.columnMetrics,e=this.options,c=e.minPointLength||0,l=a.plotX,k=t(a.x2,a.x+(a.len||0)),g=b.translate(k,0,0,
0,1),k=Math.abs(g-l),f=this.chart.inverted,p=t(e.borderWidth,1)%2/2,q=m.offset,h=Math.round(m.width);c&&(c-=k,0>c&&(c=0),l-=c/2,g+=c/2);l=Math.max(l,-10);g=Math.min(Math.max(g,-10),b.len+10);u(a.options.pointWidth)&&(q-=(Math.ceil(a.options.pointWidth)-h)/2,h=Math.ceil(a.options.pointWidth));e.pointPlacement&&w(a.plotY)&&d.categories&&(a.plotY=d.translate(a.y,0,1,0,1,e.pointPlacement));a.shapeArgs={x:Math.floor(Math.min(l,g))+p,y:Math.floor(a.plotY+q)+p,width:Math.round(Math.abs(g-l)),height:h,r:this.options.borderRadius};
e=a.shapeArgs.x;c=e+a.shapeArgs.width;0>e||c>b.len?(e=Math.min(b.len,Math.max(0,e)),c=Math.max(0,Math.min(c,b.len)),g=c-e,a.dlBox=n(a.shapeArgs,{x:e,width:c-e,centerX:g?g/2:null})):a.dlBox=null;f?(a.tooltipPos[1]+=k/2*(b.reversed?1:-1),a.tooltipPos[0]+=m.width/2,a.tooltipPos[1]=Math.max(Math.min(a.tooltipPos[1],b.len-1),0),a.tooltipPos[0]=Math.max(Math.min(a.tooltipPos[0],d.len-1),0)):(a.tooltipPos[0]+=k/2*(b.reversed?-1:1),a.tooltipPos[1]-=m.width/2,a.tooltipPos[0]=Math.max(Math.min(a.tooltipPos[0],
b.len-1),0),a.tooltipPos[1]=Math.max(Math.min(a.tooltipPos[1],d.len-1),0));if(d=a.partialFill)r(d)&&(d=d.amount),w(d)||(d=0),b=a.shapeArgs,a.partShapeArgs={x:b.x,y:b.y,width:b.width,height:b.height,r:this.options.borderRadius},a.clipRectArgs={x:b.x,y:b.y,width:Math.max(Math.round(k*d+(a.plotX-l)),0),height:b.height}},translate:function(){v.prototype.translate.apply(this,arguments);this.points.forEach(function(a){this.translatePoint(a)},this)},drawPoint:function(a,b){var d=this.options,c=this.chart.renderer,
e=a.graphic,f=a.shapeType,l=a.shapeArgs,k=a.partShapeArgs,g=a.clipRectArgs,h=a.partialFill,p=a.selected&&"select",q=d.stacking&&!d.borderRadius;if(a.isNull)e&&(a.graphic=e.destroy());else{if(e)a.graphicOriginal[b](n(l));else a.graphic=e=c.g("point").addClass(a.getClassName()).add(a.group||this.group),a.graphicOriginal=c[f](l).addClass(a.getClassName()).addClass("highcharts-partfill-original").add(e);k&&(a.graphicOverlay?(a.graphicOverlay[b](n(k)),a.clipRect.animate(n(g))):(a.clipRect=c.clipRect(g.x,
g.y,g.width,g.height),a.graphicOverlay=c[f](k).addClass("highcharts-partfill-overlay").add(e).clip(a.clipRect)));this.chart.styledMode||(a.graphicOriginal.attr(this.pointAttribs(a,p)).shadow(d.shadow,null,q),k&&(r(h)||(h={}),r(d.partialFill)&&(h=n(h,d.partialFill)),b=h.fill||x(a.color||this.color).brighten(-.3).get(),a.graphicOverlay.attr(this.pointAttribs(a,p)).attr({fill:b}).shadow(d.shadow,null,q)))}},drawPoints:function(){var a=this,b=a.getAnimationVerb();a.points.forEach(function(c){a.drawPoint(c,
b)})},getAnimationVerb:function(){return this.chart.pointCount<(this.options.animationLimit||250)?"animate":"attr"}},{applyOptions:function(){var a,b=h.prototype.applyOptions.apply(this,arguments),c=b.series;if(c.options.colorByPoint&&!b.options.color){a=c.options.colors||c.chart.options.colors;var f=b.y%(a?a.length:c.chart.options.chart.colorCount);a=a&&a[f];c.chart.styledMode||(b.color=a);b.options.colorIndex||(b.colorIndex=f)}return b},init:function(){h.prototype.init.apply(this,arguments);this.y||
(this.y=0);return this},setState:function(){h.prototype.setState.apply(this,arguments);this.series.drawPoint(this,this.series.getAnimationVerb())},getLabelConfig:function(){var a=h.prototype.getLabelConfig.call(this),b=this.series.yAxis.categories;a.x2=this.x2;a.yCategory=this.yCategory=b&&b[this.y];return a},tooltipDateKeys:["x","x2"],isValid:function(){return"number"===typeof this.x&&"number"===typeof this.x2}});f(A,"afterGetSeriesExtremes",function(){var a=this.series,b,c;this.isXAxis&&(b=t(this.dataMax,
-Number.MAX_VALUE),a.forEach(function(a){a.x2Data&&a.x2Data.forEach(function(a){a>b&&(b=a,c=!0)})}),c&&(this.dataMax=b))})})(f)});
//# sourceMappingURL=xrange.js.map
