Icard/angular-clarity-master(work.../node_modules/highcharts/modules/xrange.js

9 lines
7.0 KiB
JavaScript
Raw Normal View History

2024-07-16 14:55:36 +00:00
!/**
* Highcharts JS v11.4.1 (2024-04-04)
*
* X-range series
*
* (c) 2010-2024 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(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function i(t,e,i,s){t.hasOwnProperty(e)||(t[e]=s.apply(null,i),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}i(e,"Series/XRange/XRangeSeriesDefaults.js",[e["Core/Utilities.js"]],function(t){let{correctFloat:e,isNumber:i,isObject:s}=t;return{colorByPoint:!0,dataLabels:{formatter:function(){let t=this.point.partialFill;if(s(t)&&(t=t.amount),i(t)&&t>0)return e(100*t)+"%"},inside:!0,verticalAlign:"middle",style:{whiteSpace:"nowrap"}},tooltip:{headerFormat:'<span style="font-size: 0.8em">{point.x} - {point.x2}</span><br/>',pointFormat:'<span style="color:{point.color}"></span> {series.name}: <b>{point.yCategory}</b><br/>'},borderRadius:3,pointRange:0}}),i(e,"Series/XRange/XRangePoint.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){let{column:{prototype:{pointClass:i}}}=t.seriesTypes,{extend:s}=e;class o extends i{static getColorByCategory(t,e){let i=t.options.colors||t.chart.options.colors,s=i?i.length:t.chart.options.chart.colorCount,o=e.y%s,r=i&&i[o];return{colorIndex:o,color:r}}resolveColor(){let t=this.series;if(t.options.colorByPoint&&!this.options.color){let e=o.getColorByCategory(t,this);t.chart.styledMode||(this.color=e.color),this.options.colorIndex||(this.colorIndex=e.colorIndex)}else this.color=this.options.color||t.color}constructor(t,e){super(t,e),this.y||(this.y=0)}setState(){super.setState.apply(this,arguments),this.series.drawPoint(this,this.series.getAnimationVerb())}getLabelConfig(){let t=super.getLabelConfig.call(this),e=this.series.yAxis.categories;return t.x2=this.x2,t.yCategory=this.yCategory=e&&e[this.y],t.key=this.category||this.name,t}isValid(){return"number"==typeof this.x&&"number"==typeof this.x2}}return s(o.prototype,{ttBelow:!1,tooltipDateKeys:["x","x2"]}),o}),i(e,"Series/XRange/XRangeSeries.js",[e["Core/Globals.js"],e["Core/Color/Color.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"],e["Series/XRange/XRangeSeriesDefaults.js"],e["Series/XRange/XRangePoint.js"]],function(t,e,i,s,o,r){let{composed:a,noop:l}=t,{parse:n}=e,{column:h}=i.seriesTypes,{addEvent:p,clamp:d,defined:c,extend:g,find:u,isNumber:f,isObject:x,merge:y,pick:m,pushUnique:C,relativeLength:A}=s;function b(){let t,e;if(this.isXAxis){for(let i of(t=m(this.dataMax,-Number.MAX_VALUE),this.series))if(i.x2Data)for(let s of i.x2Data)s&&s>t&&(t=s,e=!0);e&&(this.dataMax=t)}}class w extends h{static compose(t){C(a,"Series.XRange")&&p(t,"afterGetSeriesExtremes",b)}init(){super.init.apply(this,arguments),this.options.stacking=void 0}getColumnMetrics(){let t=()=>{for(let t of this.chart.series){let e=t.xAxis;t.xAxis=t.yAxis,t.yAxis=e}};t();let e=super.getColumnMetrics();return t(),e}cropData(t,e,i,s){let o=super.cropData(this.x2Data,e,i,s);return o.xData=t.slice(o.start,o.end),o}findPointIndex(t){let e;let{cropStart:i,points:s}=this,{id:o}=t;if(o){let t=u(s,t=>t.id===o);e=t?t.index:void 0}if(void 0===e){let i=u(s,e=>e.x===t.x&&e.x2===t.x2&&!e.touched);e=i?i.index:void 0}return this.cropped&&f(e)&&f(i)&&e>=i&&(e-=i),e}alignDataLabel(t){let e=t.plotX;t.plotX=m(t.dlBox&&t.dlBox.centerX,t.plotX),t.dataLabel&&t.shapeArgs?.width&&t.dataLabel.css({width:`${t.shapeArgs.width}px`}),super.alignDataLabel.apply(this,arguments),t.plotX=e}translatePoint(t){let e=this.xAxis,i=this.yAxis,s=this.columnMetrics,o=this.options,r=o.minPointLength||0,a=(t.shapeArgs&&t.shapeArgs.width||0)/2,l=this.pointXOffset=s.offset,n=m(t.x2,t.x+(t.len||0)),h=o.borderRadius,p=this.chart.plotTop,g=this.chart.plotLeft,u=t.plotX,C=e.translate(n,0,0,0,1),b=Math.abs(C-u),w=this.chart.inverted,R=m(o.borderWidth,1)%2/2,M,X,S=s.offset,P=Math.round(s.width),v,j,D,L;r&&((M=r-b)<0&&(M=0),u-=M/2,C+=M/2),u=Math.max(u,-10),C=d(C,-10,e.len+10),c(t.options.poin