UNPKG

highcharts

Version:
13 lines 2.98 kB
/** * Highcharts JS v12.6.0 (2026-04-13) * @module highcharts/modules/no-data-to-display * @requires highcharts * * Plugin for displaying a message when there is no data visible in chart. * * (c) 2010-2026 Highsoft AS * Author: Øystein Moseng * * A commercial license may be required depending on use. * See www.highcharts.com/license */import*as t from"../highcharts.js";var e={};e.n=t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},e.d=(t,o)=>{for(var a in o)e.o(o,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:o[a]})},e.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);let o=t.default;var a=e.n(o);let r=t.default.AST;var n=e.n(r);let i={lang:{noData:"No data to display"},noData:{attr:{zIndex:1},position:{x:0,y:0,align:"center",verticalAlign:"middle"},style:{fontWeight:"bold",fontSize:"0.8em",color:"#666666"}}},{doc:s,win:l}=a();function c(t){return d(t)&&"number"==typeof t.nodeType}function d(t,e){let o;return!!t&&"object"==typeof t&&(!e||"[object Array]"!==(o=Object.prototype.toString.call(t))&&"[object Array Iterator]"!==o)}Array.prototype.find;function h(){let t=this.series||[],e=t.length;for(;e--;)if(t[e].hasData()&&!t[e].options.isInternal)return!0;return this.loadingShown}function p(){this.noDataLabel&&(this.noDataLabel=this.noDataLabel.destroy())}function f(t){let e=this.options,o=t||e&&e.lang.noData||"",a=e&&(e.noData||{});this.renderer&&(this.noDataLabel||(this.noDataLabel=this.renderer.label(o,0,0,void 0,void 0,void 0,a.useHTML,void 0,"no-data").add()),this.styledMode||this.noDataLabel.attr(n().filterUserAttributes(a.attr||{})).css(a.style||{}),this.noDataLabel.align(function(t,e){let o;for(o in t||(t={}),e)t[o]=e[o];return t}(this.noDataLabel.getBBox(),a.position||{}),!1,"plotBox"))}function u(){this.hasData()?this.hideNoData():this.showNoData()}let y=a();({compose:function(t,e){let o=t.prototype;o.showNoData||(o.hasData=h,o.hideNoData=p,o.showNoData=f,function(t,e,o,r={}){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 s=t.addEventListener;s&&s.call(t,e,o,!!a().supportsPassiveEvents&&{passive:void 0===r.passive?-1!==e.indexOf("touch"):r.passive,capture:!1}),i[e]||(i[e]=[]);let l={fn:o,order:"number"==typeof r.order?r.order:1/0};i[e].push(l),i[e].sort((t,e)=>t.order-e.order)}(t,"render",u),function(t,...e){let o,a=[t,...e],r={},n=function(t,e){return"object"!=typeof t&&(t={}),function(t,e,o){for(let o in t)Object.hasOwnProperty.call(t,o)&&e.call((0,t[o]),t[o],o,t)}(e,function(o,a){if("__proto__"!==a&&"constructor"!==a){let r;!d(o,!0)||(r=o?.constructor,d(o,!0)&&!c(o)&&r?.name&&"Object"!==r.name)||c(o)?t[a]=e[a]:t[a]=n(t[a]||{},o)}}),t};!0===t&&(r=a[1],a=Array.prototype.slice.call(a,2));let i=a.length;for(o=0;o<i;o++)r=n(r,a[o])}(!0,e,i))}}).compose(y.Chart,y.defaultOptions);let b=a();export{b as default};