UNPKG

highcharts

Version:
13 lines 2.41 kB
!/** * Highcharts Gantt JS v13.0.1 (2026-08-17) * @module highcharts/modules/static-scale * @requires highcharts * * StaticScale * * (c) 2016-2026 Highsoft AS * Author: Torstein Hønsi, 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/static-scale",["highcharts/highcharts"],function(t){return e(t)}):"object"==typeof exports?exports["highcharts/modules/static-scale"]=e(t._Highcharts):t.Highcharts=e(t.Highcharts)}("u"<typeof window?this:window,t=>(()=>{"use strict";var e={944(e){e.exports=t}};let i={};function r(t){let a=i[t];if(void 0!==a)return a.exports;let o=i[t]={exports:{}};return e[t](o,o.exports,r),o.exports}r.n=t=>{let e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{if(Array.isArray(e))for(var i=0;i<e.length;){var a=e[i++],o=e[i++];r.o(t,a)?0===o&&i++:0===o?Object.defineProperty(t,a,{enumerable:!0,value:e[i++]}):Object.defineProperty(t,a,{enumerable:!0,get:o})}else for(var a in e)r.o(e,a)&&!r.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);let a={};r.d(a,{default:()=>d});var o=r(944),s=r.n(o);let{composed:h}=s();function n(){let t=this.chart.userOptions.chart;!this.horiz&&(0,o.isNumber)(this.options.staticScale)&&(!t?.height||t.scrollablePlotArea?.minHeight)&&(this.staticScale=this.options.staticScale)}function l(){if("adjustHeight"!==this.redrawTrigger){for(let t of this.axes||[]){let e=t.chart,i=t.options.staticScale;if(t.staticScale&&i&&(0,o.defined)(t.min)&&(0,o.defined)(t.max)){let r=(t.brokenAxis?.unitLength??t.max+t.tickInterval-t.min)*i,a=(r=Math.max(r,i))-e.plotHeight;!e.scrollablePixelsY&&Math.abs(a)>=1&&(e.plotHeight=r,e.redrawTrigger="adjustHeight",e.setSize(void 0,e.chartHeight+a,!!e.initiatedScale&&void 0)),t.series.forEach(function(t){let i=t.sharedClipKey&&e.sharedClips[t.sharedClipKey];i&&i.attr(e.inverted?{width:e.plotHeight}:{height:e.plotHeight})})}}this.initiatedScale=!0}this.redrawTrigger=void 0}let c=s();!function(t,e){if((0,o.pushUnique)(h,"StaticScale")){let i=e.prototype;(0,o.addEvent)(t,"afterSetOptions",n),i.adjustHeight=l,(0,o.addEvent)(e,"render",i.adjustHeight)}}(c.Axis,c.Chart);let d=s();return a.default})());