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

9 lines
86 KiB
JavaScript
Raw Normal View History

2024-07-16 14:55:36 +00:00
!/**
* Highcharts JS v11.4.1 (2024-04-04)
*
* Annotations module
*
* (c) 2009-2024 Torstein Honsi
*
* 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/annotations-advanced",["highcharts"],function(i){return t(i),t.Highcharts=i,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var i=t?t._modules:{};function s(t,i,s,n){t.hasOwnProperty(i)||(t[i]=n.apply(null,s),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:t[i]}})))}s(i,"Extensions/Annotations/AnnotationChart.js",[i["Core/Utilities.js"]],function(t){var i;let{addEvent:s,erase:n,find:o,fireEvent:e,pick:a,wrap:r}=t;function l(t,i){let s=this.initAnnotation(t);return this.options.annotations.push(s.options),a(i,!0)&&(s.redraw(),s.graphic.attr({opacity:1})),s}function h(){let t=this;t.plotBoxClip=this.renderer.clipRect(this.plotBox),t.controlPointsGroup=t.renderer.g("control-points").attr({zIndex:99}).clip(t.plotBoxClip).add(),t.options.annotations.forEach((i,s)=>{if(!t.annotations.some(t=>t.options===i)){let n=t.initAnnotation(i);t.options.annotations[s]=n.options}}),t.drawAnnotations(),s(t,"redraw",t.drawAnnotations),s(t,"destroy",function(){t.plotBoxClip.destroy(),t.controlPointsGroup.destroy()}),s(t,"exportData",function(i){let s=t.annotations,n=(this.options.exporting&&this.options.exporting.csv||{}).columnHeaderFormatter,o=!i.dataRows[1].xValues,e=t.options.lang&&t.options.lang.exportData&&t.options.lang.exportData.annotationHeader,a=i.dataRows[0].length,r=t.options.exporting&&t.options.exporting.csv&&t.options.exporting.csv.annotations&&t.options.exporting.csv.annotations.itemDelimiter,l=t.options.exporting&&t.options.exporting.csv&&t.options.exporting.csv.annotations&&t.options.exporting.csv.annotations.join;s.forEach(t=>{t.options.labelOptions&&t.options.labelOptions.includeInDataExport&&t.labels.forEach(t=>{if(t.options.text){let s=t.options.text;t.points.forEach(t=>{let n=t.x,o=t.series.xAxis?t.series.xAxis.index:-1,e=!1;if(-1===o){let t=i.dataRows[0].length,a=Array(t);for(let i=0;i<t;++i)a[i]="";a.push(s),a.xValues=[],a.xValues[o]=n,i.dataRows.push(a),e=!0}if(e||i.dataRows.forEach(t=>{!e&&t.xValues&&void 0!==o&&n===t.xValues[o]&&(l&&t.length>a?t[t.length-1]+=r+s:t.push(s),e=!0)}),!e){let t=i.dataRows[0].length,e=Array(t);for(let i=0;i<t;++i)e[i]="";e[0]=n,e.push(s),e.xValues=[],void 0!==o&&(e.xValues[o]=n),i.dataRows.push(e)}})}})});let h=0;i.dataRows.forEach(t=>{h=Math.max(h,t.length)});let p=h-i.dataRows[0].length;for(let t=0;t<p;t++){let s=function(t){let i;return n&&!1!==(i=n(t))?i:(i=e+" "+t,o)?{columnTitle:i,topLevelColumnTitle:i}:i}(t+1);o?(i.dataRows[0].push(s.topLevelColumnTitle),i.dataRows[1].push(s.columnTitle)):i.dataRows[0].push(s)}})}function p(){this.plotBoxClip.attr(this.plotBox),this.annotations.forEach(t=>{t.redraw(),t.graphic.animate({opacity:1},t.animationConfig)})}function c(t){let i=this.annotations,s="annotations"===t.coll?t:o(i,function(i){return i.options.id===t});s&&(e(s,"remove"),n(this.options.annotations,s.options),n(i,s),s.destroy())}function d(){this.annotations=[],this.options.annotations||(this.options.annotations=[])}function u(t){this.chart.hasDraggedAnnotation||t.apply(this,Array.prototype.slice.call(arguments,1))}return(i||(i={})).compose=function(t,i,n){let o=i.prototype;if(!o.addAnnotation){let e=n.prototype;s(i,"afterInit",d),o.addAnnotation=l,o.callbacks.push(h),o.collectionsWithInit.annotations=[l],o.collectionsWithUpdate.push("annotations"),o.drawAnnotations=p,o.removeAnnotation=c,o.initAnnotation=function(i){let s=new(t.types[i.type]||t)(this,i);return this.annotations.push(s),s},r(e,"onContainerMouseDown",u)}},i}),s(i,"Extensions/Annotations/AnnotationDefaults.js",[i["Core/Utilities.js"]],function(t){let{defined:i}=t;return{visible:!0,animation:{},crop:!0,draggable:"xy",labelOptions:{align:"center",allowOverlap:!1,backgroundColor:"rgba(0, 0, 0, 0.75)",borderColor:"#000000",borderRadius:3,borderWidth:1,className:"highcharts-no-tooltip",crop:!1,formatter:function(){return i(this.y)?""+this.y:"Annotation label"},includeIn