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

9 lines
11 KiB
JavaScript
Raw Permalink Normal View History

2024-07-16 14:55:36 +00:00
!/**
* Highcharts Gantt JS v11.4.1 (2024-04-04)
*
* GridAxis
*
* (c) 2016-2024 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/grid-axis",["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 e(t,i,e,s){t.hasOwnProperty(i)||(t[i]=s.apply(null,e),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:t[i]}})))}e(i,"Core/Axis/GridAxis.js",[i["Core/Axis/Axis.js"],i["Core/Globals.js"],i["Core/Utilities.js"]],function(t,i,e){var s,o;let{dateFormats:r}=i,{addEvent:n,defined:h,erase:l,find:a,isArray:d,isNumber:c,merge:g,pick:f,timeUnits:u,wrap:p}=e;function m(t){return e.isObject(t,!0)}function k(t,i){let e={width:0,height:0};if(i.forEach(function(i){let s=t[i],o=0,r=0,n;m(s)&&(o=(n=m(s.label)?s.label:{}).getBBox?n.getBBox().height:0,n.textStr&&!c(n.textPxLength)&&(n.textPxLength=n.getBBox().width),r=c(n.textPxLength)?Math.round(n.textPxLength):0,n.textStr&&(r=Math.round(n.getBBox().width)),e.height=Math.max(o,e.height),e.width=Math.max(r,e.width))}),"treegrid"===this.options.type&&this.treeGrid&&this.treeGrid.mapOfPosToGridNode){let t=this.treeGrid.mapOfPosToGridNode[-1].height||0;e.width+=this.options.labels.indentation*(t-1)}return e}function x(t){let{grid:i}=this,e=3===this.side;if(e||t.apply(this),!i?.isColumn){let t=i?.columns||[];e&&(t=t.slice().reverse()),t.forEach(t=>{t.getOffset()})}e&&t.apply(this)}function b(t){if(!0===(this.options.grid||{}).enabled){let{axisTitle:i,height:e,horiz:o,left:r,offset:n,opposite:h,options:l,top:a,width:d}=this,c=this.tickSize(),g=i&&i.getBBox().width,u=l.title.x,p=l.title.y,m=f(l.title.margin,o?5:10),k=i?this.chart.renderer.fontMetrics(i).f:0,x=(o?a+e:r)+(o?1:-1)*(h?-1:1)*(c?c[0]/2:0)+(this.side===s.bottom?k:0);t.titlePosition.x=o?r-(g||0)/2-m+u:x+(h?d:0)+n+u,t.titlePosition.y=o?x-(h?e:0)+(h?k:-k)/2+n+p:a-m+p}}function P(){let{chart:i,options:{grid:e={}},userOptions:s}=this;if(e.enabled&&function(t){let i=t.options;i.labels.align=f(i.labels.align,"center"),t.categories||(i.showLastLabel=!1),t.labelRotation=0,i.labels.rotation=0,i.minTickInterval=1}(this),e.columns){let o=this.grid.columns=[],r=this.grid.columnIndex=0;for(;++r<e.columns.length;){let n=g(s,e.columns[r],{isInternal:!0,linkedTo:0,scrollbar:{enabled:!1}},{grid:{columns:void 0}}),h=new t(this.chart,n,"yAxis");h.grid.isColumn=!0,h.grid.columnIndex=r,l(i.axes,h),l(i[this.coll]||[],h),o.push(h)}}}function y(){let{axisTitle:t,grid:i,options:e}=this;if(!0===(e.grid||{}).enabled){let o=this.min||0,r=this.max||0,n=this.ticks[this.tickPositions[0]];if(t&&!this.chart.styledMode&&n?.slotWidth&&!this.options.title.style.width&&t.css({width:`${n.slotWidth}px`}),this.maxLabelDimensions=this.getMaxLabelDimensions(this.ticks,this.tickPositions),this.rightWall&&this.rightWall.destroy(),this.grid&&this.grid.isOuterAxis()&&this.axisLine){let t=e.lineWidth;if(t){let i=this.getLinePath(t),n=i[0],h=i[1],l=((this.tickSize("tick")||[1])[0]-1)*(this.side===s.top||this.side===s.left?-1:1);if("M"===n[0]&&"L"===h[0]&&(this.horiz?(n[2]+=l,h[2]+=l):(n[1]+=l,h[1]+=l)),!this.horiz&&this.chart.marginRight){let t=["L",this.left,n[2]||0],i=[n,t],s=["L",this.chart.chartWidth-this.chart.marginRight,this.toPixels(r+this.tickmarkOffset)],l=[["M",h[1]||0,this.toPixels(r+this.tickmarkOffset)],s];this.grid.upperBorder||o%1==0||(this.grid.upperBorder=this.grid.renderBorder(i)),this.grid.upperBorder&&(this.grid.upperBorder.attr({stroke:e.lineColor,"stroke-width":e.lineWidth}),this.grid.upperBorder.animate({d:i})),this.grid.lowerBorder||r%1==0||(this.grid.lowerBorder=this.grid.renderBorder(l)),this.grid.lowerBorder&&(this.grid.lowerBorder.attr({stroke:e.lineColor,"stroke-width":e.lineWidth}),this.grid.lowerBorder.animate({d:l}))}this.grid.axisLineExtra?(this.grid.axisLineExtra.attr({stroke:e.lineColor,"stroke-width":e.lineWidth}),this.grid.axisLineExtra.animate({d:i})):this.grid.axisLineExtra=this.grid.renderBorder(i),this.axisLine[this.showAxis?"show":"hide"]()}}if((i&&i.