UNPKG

highcharts

Version:
13 lines 3.98 kB
!/** * Highcharts Gantt JS v12.6.0 (2026-04-13) * @module highcharts/modules/current-date-indicator * @requires highcharts * * CurrentDateIndicator * * (c) 2010-2026 Highsoft AS * Author: Lars A. V. Cabrera * * A commercial license may be required depending on use. * See www.highcharts.com/license */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts):"function"==typeof define&&define.amd?define("highcharts/modules/current-date-indicator",["highcharts/highcharts"],function(t){return e(t)}):"object"==typeof exports?exports["highcharts/modules/current-date-indicator"]=e(t._Highcharts):t.Highcharts=e(t.Highcharts)}("u"<typeof window?this:window,t=>(()=>{"use strict";var e={944:e=>{e.exports=t}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var n={};o.d(n,{default:()=>x});var i=o(944),a=o.n(i);let{doc:c,win:l}=a();function s(t,e,r,o={}){let n="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(n,"hcEvents")||(n.hcEvents={});let i=n.hcEvents;a().Point&&t instanceof a().Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);let c=t.addEventListener;c&&c.call(t,e,r,!!a().supportsPassiveEvents&&{passive:void 0===o.passive?-1!==e.indexOf("touch"):o.passive,capture:!1}),i[e]||(i[e]=[]);let l={fn:r,order:"number"==typeof o.order?o.order:1/0};return i[e].push(l),i[e].sort((t,e)=>t.order-e.order),function(){!function(t,e,r){function o(e,r){let o=t.removeEventListener;o&&o.call(t,e,r,!1)}function n(r){let n,i;t.nodeName&&(e?(n={})[e]=!0:n=r,h(n,function(t,e){if(r[e])for(i=r[e].length;i--;)o(e,r[e][i].fn)}))}let i="function"==typeof t&&t.prototype||t;if(Object.hasOwnProperty.call(i,"hcEvents")){let t=i.hcEvents;if(e){let i=t[e]||[];r?(t[e]=i.filter(function(t){return r!==t.fn}),o(e,r)):(n(t),t[e]=[])}else n(t),delete i.hcEvents}}(t,e,r)}}function f(t){return u(t)&&"number"==typeof t.nodeType}function u(t,e){let r;return!!t&&"object"==typeof t&&(!e||"[object Array]"!==(r=Object.prototype.toString.call(t))&&"[object Array Iterator]"!==r)}function p(t,...e){let r,o=[t,...e],n={},i=function(t,e){return"object"!=typeof t&&(t={}),h(e,function(r,o){if("__proto__"!==o&&"constructor"!==o){let n;!u(r,!0)||(n=r?.constructor,u(r,!0)&&!f(r)&&n?.name&&"Object"!==n.name)||f(r)?t[o]=e[o]:t[o]=i(t[o]||{},r)}}),t};!0===t&&(n=o[1],o=Array.prototype.slice.call(o,2));let a=o.length;for(r=0;r<a;r++)n=i(n,o[r]);return n}function h(t,e,r){for(let o in t)Object.hasOwnProperty.call(t,o)&&e.call(r||t[o],t[o],o,t)}Array.prototype.find;let{composed:d}=a(),y={color:"#ccd3ff",width:2,label:{format:"%[abdYHM]",formatter:function(t,e){return this.axis.chart.time.dateFormat(e||"",t,!0)},rotation:0,style:{fontSize:"0.7em"}}};function b(){let t=this.options,e=t.currentDateIndicator;if(e){let r="object"==typeof e?p(y,e):p(y);r.value=Date.now(),r.className="highcharts-current-date-indicator",t.plotLines||(t.plotLines=[]),t.plotLines.push(r)}}function v(){this.label&&this.label.attr({text:this.getLabelText(this.options.label)})}function m(t,e){let r=this.options;return r&&r.className&&-1!==r.className.indexOf("highcharts-current-date-indicator")&&r.label&&"function"==typeof r.label.formatter?(r.value=Date.now(),r.label.formatter.call(this,r.value,r.label.format,this)):t.call(this,e)}let g=a();({compose:function(t,e){var r,o,n;if(r="CurrentDateIndication",0>d.indexOf(r)&&d.push(r)){let r;s(t,"afterSetOptions",b),s(e,"render",v),o=e.prototype,r=o[n="getLabelText"],o[n]=function(){let t=arguments,e=this;return m.apply(this,[function(){return r.apply(e,arguments.length?arguments:t)}].concat([].slice.call(arguments)))}}}}).compose(g.Axis,g.PlotLineOrBand);let x=a();return n.default})());