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

9 lines
36 KiB
JavaScript
Raw Permalink Normal View History

2024-07-16 14:55:36 +00:00
!/**
* Highcharts JS v11.4.1 (2024-04-04)
*
* Standalone navigator module
*
* (c) 2009-2024 Mateusz Bernacik
*
* 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/navigator",["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,"Stock/Navigator/ChartNavigatorComposition.js",[i["Core/Globals.js"],i["Core/Utilities.js"]],function(t,i){let e;let{isTouchDevice:s}=t,{addEvent:a,merge:r,pick:o}=i,n=[];function h(){this.navigator&&this.navigator.setBaseSeries(null,!1)}function l(){let t,i,e;let s=this.legend,a=this.navigator;if(a){t=s&&s.options,i=a.xAxis,e=a.yAxis;let{scrollbarHeight:r,scrollButtonSize:n}=a;this.inverted?(a.left=a.opposite?this.chartWidth-r-a.height:this.spacing[3]+r,a.top=this.plotTop+n):(a.left=o(i.left,this.plotLeft+n),a.top=a.navigatorOptions.top||this.chartHeight-a.height-r-(this.scrollbar?.options.margin||0)-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(t&&"bottom"===t.verticalAlign&&"proximate"!==t.layout&&t.enabled&&!t.floating?s.legendHeight+o(t.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0)),i&&e&&(this.inverted?i.options.left=e.options.left=a.left:i.options.top=e.options.top=a.top,i.setAxisSize(),e.setAxisSize())}}function d(t){!this.navigator&&!this.scroller&&(this.options.navigator.enabled||this.options.scrollbar.enabled)&&(this.scroller=this.navigator=new e(this),o(t.redraw,!0)&&this.redraw(t.animation))}function c(){let t=this.options;(t.navigator.enabled||t.scrollbar.enabled)&&(this.scroller=this.navigator=new e(this))}function g(){let t=this.options,i=t.navigator,e=t.rangeSelector;if((i&&i.enabled||e&&e.enabled)&&(!s&&"x"===this.zooming.type||s&&"x"===this.zooming.pinchType))return!1}function u(t){let i=t.navigator;if(i&&t.xAxis[0]){let e=t.xAxis[0].getExtremes();i.render(e.min,e.max)}}function x(t){let i=t.options.navigator||{},e=t.options.scrollbar||{};!this.navigator&&!this.scroller&&(i.enabled||e.enabled)&&(r(!0,this.options.navigator,i),r(!0,this.options.scrollbar,e),delete t.options.navigator,delete t.options.scrollbar)}return{compose:function(t,s){if(i.pushUnique(n,t)){let i=t.prototype;e=s,i.callbacks.push(u),a(t,"afterAddSeries",h),a(t,"afterSetChartSize",l),a(t,"afterUpdate",d),a(t,"beforeRender",c),a(t,"beforeShowResetZoom",g),a(t,"update",x)}}}}),e(i,"Core/Axis/NavigatorAxisComposition.js",[i["Core/Globals.js"],i["Core/Utilities.js"]],function(t,i){let{isTouchDevice:e}=t,{addEvent:s,correctFloat:a,defined:r,isNumber:o,pick:n}=i;function h(){this.navigatorAxis||(this.navigatorAxis=new d(this))}function l(t){let i;let s=this.chart,a=s.options,o=a.navigator,n=this.navigatorAxis,h=s.zooming.pinchType,l=a.rangeSelector,d=s.zooming.type;if(this.isXAxis&&(o?.enabled||l?.enabled)){if("y"===d&&"zoom"===t.trigger)i=!1;else if(("zoom"===t.trigger&&"xy"===d||e&&"xy"===h)&&this.options.range){let i=n.previousZoom;r(t.min)?n.previousZoom=[this.min,this.max]:i&&(t.min=i[0],t.max=i[1],n.previousZoom=void 0)}}void 0!==i&&t.preventDefault()}class d{static compose(t){t.keepProps.includes("navigatorAxis")||(t.keepProps.push("navigatorAxis"),s(t,"init",h),s(t,"setExtremes",l))}constructor(t){this.axis=t}destroy(){this.axis=void 0}toFixedRange(t,i,e,s){let h=this.axis,l=(h.pointRange||0)/2,d=n(e,h.translate(t,!0,!h.horiz)),c=n(s,h.translate(i,!0,!h.horiz));return r(e)||(d=a(d+l)),r(s)||(c=a(c-l)),o(d)&&o(c)||(d=c=void 0),{min:d,max:c}}}return d}),e(i,"Stock/Navigator/NavigatorDefaults.js",[i["Core/Color/Color.js"],i["Core/Series/SeriesRegistry.js"]],function(t,i){let{parse:e}=t,{seriesTypes:s}=i;return{height:40,margin:25,maskInside:!0,handles:{width:7,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:e("#667aff").setOpacity(.3).get(),outlineColor:"#999999",outlineWidth:1,series