/** * Highcharts JS v11.2.0 (2023-10-30) * * X-range series * * (c) 2010-2021 Torstein Honsi, Lars A. V. Cabrera * * License: www.highcharts.com/license */!function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/modules/xrange",["highcharts"],function(o){return t(o),t.Highcharts=o,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var o=t?t._modules:{};function e(t,o,e,i){t.hasOwnProperty(o)||(t[o]=i.apply(null,e),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:o,module:t[o]}})))}e(o,"Series/XRange/XRangeSeriesDefaults.js",[o["Core/Utilities.js"]],function(t){var o=t.correctFloat,e=t.isNumber,i=t.isObject;return{colorByPoint:!0,dataLabels:{formatter:function(){var t=this.point.partialFill;if(i(t)&&(t=t.amount),e(t)&&t>0)return o(100*t)+"%"},inside:!0,verticalAlign:"middle"},tooltip:{headerFormat:'{point.x} - {point.x2}
',pointFormat:' {series.name}: {point.yCategory}
'},borderRadius:3,pointRange:0}}),e(o,"Series/XRange/XRangePoint.js",[o["Core/Series/SeriesRegistry.js"],o["Core/Utilities.js"]],function(t,o){var e,i=this&&this.__extends||(e=function(t,o){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])})(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw TypeError("Class extends value "+String(o)+" is not a constructor or null");function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}),r=t.seriesTypes.column.prototype.pointClass,n=o.extend,s=function(t){function o(){var o=null!==t&&t.apply(this,arguments)||this;return o.options=void 0,o.series=void 0,o}return i(o,t),o.getColorByCategory=function(t,o){var e=t.options.colors||t.chart.options.colors,i=e?e.length:t.chart.options.chart.colorCount,r=o.y%i,n=e&&e[r];return{colorIndex:r,color:n}},o.prototype.resolveColor=function(){var t=this.series;if(t.options.colorByPoint&&!this.options.color){var e=o.getColorByCategory(t,this);t.chart.styledMode||(this.color=e.color),this.options.colorIndex||(this.colorIndex=e.colorIndex)}else this.color||(this.color=t.color)},o.prototype.init=function(){return t.prototype.init.apply(this,arguments),this.y||(this.y=0),this},o.prototype.setState=function(){t.prototype.setState.apply(this,arguments),this.series.drawPoint(this,this.series.getAnimationVerb())},o.prototype.getLabelConfig=function(){var o=t.prototype.getLabelConfig.call(this),e=this.series.yAxis.categories;return o.x2=this.x2,o.yCategory=this.yCategory=e&&e[this.y],o.key=this.category||this.name,o},o.prototype.isValid=function(){return"number"==typeof this.x&&"number"==typeof this.x2},o}(r);return n(s.prototype,{ttBelow:!1,tooltipDateKeys:["x","x2"]}),s}),e(o,"Series/XRange/XRangeSeries.js",[o["Core/Globals.js"],o["Core/Color/Color.js"],o["Core/Series/SeriesRegistry.js"],o["Core/Utilities.js"],o["Series/XRange/XRangeSeriesDefaults.js"],o["Series/XRange/XRangePoint.js"]],function(t,o,e,i,r,n){var s,a=this&&this.__extends||(s=function(t,o){return(s=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])})(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw TypeError("Class extends value "+String(o)+" is not a constructor or null");function e(){this.constructor=t}s(t,o),t.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}),p=t.noop,l=o.parse,h=e.seriesTypes.column,c=i.addEvent,u=i.clamp,d=i.defined,f=i.extend,y=i.find,g=i.isNumber,x=i.isObject,v=i.merge,m=i.pick,C=i.relativeLength,b=[];function A(){var t,o;if(this.isXAxis){t=m(this.dataMax,-Number.MAX_VALUE);for(var e=0,i=this.series;et&&(t=a,o=!0)}}o&&(this.dataMax=t)}}var w=function(t){function o(){var o=null!==t&&t.apply(this,arguments)||this;return o.data=void 0,o.options=void 0,o.points=void 0,o}return a(o,t),o.compose=function(t){i.pushUnique(b,t)&&c(t,"afterGetSeriesExtremes",A)},o.prototype.init=function(){t.prototype.init.apply(this,arguments),this.options.stacking=void 0},o.prototype.getColumnMetrics=function(){var o=this,e=function(){for(var t=0,e=o.chart.series;t=e&&(o-=e),o},o.prototype.alignDataLabel=function(o){var e=o.plotX;o.plotX=m(o.dlBox&&o.dlBox.centerX,o.plotX),t.prototype.alignDataLabel.apply(this,arguments),o.plotX=e},o.prototype.translatePoint=function(t){var o,e,i,r,n,s,a=this.xAxis,p=this.yAxis,l=this.columnMetrics,h=this.options,c=h.minPointLength||0,f=(t.shapeArgs&&t.shapeArgs.width||0)/2,y=this.pointXOffset=l.offset,b=m(t.x2,t.x+(t.len||0)),A=h.borderRadius,w=this.chart.plotTop,R=this.chart.plotLeft,M=t.plotX,j=a.translate(b,0,0,0,1),P=Math.abs(j-M),S=this.chart.inverted,X=m(h.borderWidth,1)%2/2,_=l.offset,O=Math.round(l.width);c&&((o=c-P)<0&&(o=0),M-=o/2,j+=o/2),M=Math.max(M,-10),j=u(j,-10,a.len+10),d(t.options.pointWidth)&&(_-=(Math.ceil(t.options.pointWidth)-O)/2,O=Math.ceil(t.options.pointWidth)),h.pointPlacement&&g(t.plotY)&&p.categories&&(t.plotY=p.translate(t.y,0,1,0,1,h.pointPlacement));var D=Math.floor(Math.min(M,j))+X,L=Math.floor(Math.max(M,j))+X-D,B=Math.min(C("object"==typeof A?A.radius:A||0,O),Math.min(L,O)/2),E={x:D,y:Math.floor(t.plotY+_)+X,width:L,height:O,r:B};t.shapeArgs=E,S?t.tooltipPos[1]+=y+f:t.tooltipPos[0]-=f+y-E.width/2,r=(i=E.x)+E.width,i<0||r>a.len?(i=u(i,0,a.len),n=(r=u(r,0,a.len))-i,t.dlBox=v(E,{x:i,width:r-i,centerX:n?n/2:null})):t.dlBox=null;var F=t.tooltipPos,I=S?1:0,T=S?0:1,N=this.columnMetrics?this.columnMetrics.offset:-l.width/2;S?F[I]+=E.width/2:F[I]=u(F[I]+(a.reversed?-1:0)*E.width,a.left-R,a.left+a.len-R-1),F[T]=u(F[T]+(S?-1:1)*N,p.top-w,p.top+p.len-w-1),(e=t.partialFill)&&(x(e)&&(e=e.amount),g(e)||(e=0),t.partShapeArgs=v(E),s=Math.max(Math.round(P*e+t.plotX-M),0),t.clipRectArgs={x:a.reversed?E.x+P-s:E.x,y:E.y,width:s,height:E.height})},o.prototype.translate=function(){t.prototype.translate.apply(this,arguments);for(var o=0,e=this.points;o=0&&r<=this.yAxis.len&&(e.x||0)+(e.width||0)>=0&&i<=this.xAxis.len:t.prototype.isPointInside.apply(this,arguments)},o.defaultOptions=v(h.defaultOptions,r),o}(h);return f(w.prototype,{pointClass:n,pointArrayMap:["x2","y"],getExtremesFromAll:!0,parallelArrays:["x","x2","y"],requireSorting:!1,type:"xrange",animate:e.series.prototype.animate,autoIncrement:p,buildKDTree:p}),e.registerSeriesType("xrange",w),w}),e(o,"masters/modules/xrange.src.js",[o["Core/Globals.js"],o["Series/XRange/XRangeSeries.js"]],function(t,o){o.compose(t.Axis)})});//# sourceMappingURL=xrange.js.map