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

10 lines
7.0 KiB
JavaScript
Raw Permalink Normal View History

2024-07-16 14:55:36 +00:00
!/**
* Highcharts JS v11.4.1 (2024-04-04)
*
* Timeline series
*
* (c) 2010-2024 Highsoft AS
* Author: Daniel Studencki
*
* 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/timeline",["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/Timeline/TimelinePoint.js",[e["Core/Series/Point.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){let{line:{prototype:{pointClass:s}},pie:{prototype:{pointClass:n}}}=e.seriesTypes,{defined:o,isNumber:r,merge:a,objectEach:l,pick:h}=i;return class extends s{alignConnector(){let t=this.series,e=this.dataLabel,i=e.connector,s=e.options||{},n=s.connectorWidth||0,r=this.series.chart,a=i.getBBox(),l={x:a.x+(e.translateX||0),y:a.y+(e.translateY||0)};r.inverted?l.y-=n/2:l.x+=n/2,i[r.isInsidePlot(l.x,l.y)?"animate":"attr"]({d:this.getConnectorPath()}),i.addClass("highcharts-color-"+this.colorIndex),t.chart.styledMode||i.attr({stroke:s.connectorColor||this.color,"stroke-width":s.connectorWidth,opacity:e[o(e.newOpacity)?"newOpacity":"opacity"]})}drawConnector(){let{dataLabel:t,series:e}=this;t&&(t.connector||(t.connector=e.chart.renderer.path(this.getConnectorPath()).attr({zIndex:-1}).add(t)),this.series.chart.isInsidePlot(t.x||0,t.y||0)&&this.alignConnector())}getConnectorPath(){let{plotX:t=0,plotY:e=0,series:i,dataLabel:s}=this,n=i.chart,o=i.xAxis.len,a=n.inverted,h=a?"x2":"y2";if(s){let d=s.targetPosition,p=(s.alignAttr||s)[h[0]]<i.yAxis.len/2,c={x1:t,y1:e,x2:t,y2:r(d.y)?d.y:s.y};return a&&(c={x1:e,y1:o-t,x2:d.x||s.x,y2:o-t}),p&&(c[h]+=s[a?"width":"height"]||0),l(c,(t,e)=>{c[e]-=(s.alignAttr||s)[e[0]]}),n.renderer.crispLine([["M",c.x1,c.y1],["L",c.x2,c.y2]],s.options?.connectorWidth||0)}return[]}constructor(t,e){super(t,e),this.name??(this.name="Event"),this.y=1}isValid(){return null!==this.options.y}setState(){let t=super.setState;this.isNull||t.apply(this,arguments)}setVisible(t,e){let i=this.series;e=h(e,i.options.ignoreHiddenPoint),n.prototype.setVisible.call(this,t,!1),i.processData(),e&&i.chart.redraw()}applyOptions(e,i){return e=t.prototype.optionsToObject.call(this,e),this.userDLOptions=a(this.userDLOptions,e.dataLabels),super.applyOptions(e,i)}}}),i(e,"Series/Timeline/TimelineSeriesDefaults.js",[],function(){return{colorByPoint:!0,stickyTracking:!1,ignoreHiddenPoint:!0,legendType:"point",lineWidth:4,tooltip:{headerFormat:'<span style="color:{point.color}"></span> <span style="font-size: 0.8em"> {point.key}</span><br/>',pointFormat:"{point.description}"},states:{hover:{lineWidthPlus:0}},dataLabels:{enabled:!0,allowOverlap:!0,alternate:!0,backgroundColor:"#ffffff",borderWidth:1,borderColor:"#999999",borderRadius:3,color:"#333333",connectorWidth:1,distance:void 0,formatter:function(){return(this.series.chart.styledMode?'<span class="highcharts-color-'+this.point.colorIndex+'"> </span>':'<span style="color:'+this.point.color+'"> </span>')+('<span class="highcharts-strong">'+(this.key||""))+"</span><br/>"+(this.point.label||"")},style:{textOutline:"none",fontWeight:"normal",fontSize:"0.8em"},shadow:!1,verticalAlign:"middle"},marker:{enabledThreshold:0,symbol:"square",radius:6,lineWidth:2,height:15},showInLegend:!1,colorKey:"x",legendSymbol:"rectangle"}}),i(e,"Series/Timeline/TimelineSeries.js",[e["Core/Series/SeriesRegistry.js"],e["Series/Timeline/TimelinePoint.js"],e["Series/Timeline/TimelineSeriesDefaults.js"],e["Core/Utilities.js"]],function(t,e,i,s){let{column:n,line:o}=t.seriesTypes,{addEvent:r,arrayMax:a,arrayMin:l,defined:h,extend:d,merge:p,pick:c}=s;class u extends o{alignDataLabel(t,e,i,s){let n,o,r;let a=this.chart.inverted,l=this.visibilityMap.filter(t=>!!t),h=this.visiblePointsCount||0,d=l.indexOf(t),p=this.options.dataLabels,u=t.userDLOptions||{},y=p.alternate?d&&d!==h-1?2:1.5:1,f=Math.floor(this.xAxis.len/h),g=e.padding;t.visible&&(n=Math.abs(u.x||t.options.dat