UNPKG

highcharts

Version:
1,354 lines (1,292 loc) 506 kB
// SPDX-License-Identifier: LicenseRef-Highcharts /** * @license Highcharts JS v13.0.1 (2026-08-17) * @module highcharts/highcharts-more * @requires highcharts * * (c) 2009-2026 Highsoft AS * * A commercial license may be required depending on use, * see www.highcharts.com/license */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(root["_Highcharts"], root["_Highcharts"]["SeriesRegistry"], root["_Highcharts"]["Series"]["types"]["column"], root["_Highcharts"]["Templating"], root["_Highcharts"]["Point"], root["_Highcharts"]["Color"], root["_Highcharts"]["Chart"], root["_Highcharts"]["SVGElement"], root["_Highcharts"]["Series"], root["_Highcharts"]["StackItem"]); else if(typeof define === 'function' && define.amd) define("highcharts/highcharts-more", ["highcharts/highcharts"], function (amd1) {return factory(amd1,amd1["SeriesRegistry"],amd1["Series"],["types"],["column"],amd1["Templating"],amd1["Point"],amd1["Color"],amd1["Chart"],amd1["SVGElement"],amd1["Series"],amd1["StackItem"]);}); else if(typeof exports === 'object') exports["highcharts/highcharts-more"] = factory(root["_Highcharts"], root["_Highcharts"]["SeriesRegistry"], root["_Highcharts"]["Series"]["types"]["column"], root["_Highcharts"]["Templating"], root["_Highcharts"]["Point"], root["_Highcharts"]["Color"], root["_Highcharts"]["Chart"], root["_Highcharts"]["SVGElement"], root["_Highcharts"]["Series"], root["_Highcharts"]["StackItem"]); else root["Highcharts"] = factory(root["Highcharts"], root["Highcharts"]["SeriesRegistry"], root["Highcharts"]["Series"]["types"]["column"], root["Highcharts"]["Templating"], root["Highcharts"]["Point"], root["Highcharts"]["Color"], root["Highcharts"]["Chart"], root["Highcharts"]["SVGElement"], root["Highcharts"]["Series"], root["Highcharts"]["StackItem"]); })(typeof window === 'undefined' ? this : window, (__WEBPACK_EXTERNAL_MODULE__944__, __WEBPACK_EXTERNAL_MODULE__512__, __WEBPACK_EXTERNAL_MODULE__448__, __WEBPACK_EXTERNAL_MODULE__984__, __WEBPACK_EXTERNAL_MODULE__260__, __WEBPACK_EXTERNAL_MODULE__620__, __WEBPACK_EXTERNAL_MODULE__960__, __WEBPACK_EXTERNAL_MODULE__28__, __WEBPACK_EXTERNAL_MODULE__820__, __WEBPACK_EXTERNAL_MODULE__184__) => { return /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = ({ /***/ 960 (module) { module.exports = __WEBPACK_EXTERNAL_MODULE__960__; /***/ }, /***/ 620 (module) { module.exports = __WEBPACK_EXTERNAL_MODULE__620__; /***/ }, /***/ 260 (module) { module.exports = __WEBPACK_EXTERNAL_MODULE__260__; /***/ }, /***/ 28 (module) { module.exports = __WEBPACK_EXTERNAL_MODULE__28__; /***/ }, /***/ 448 (module) { module.exports = __WEBPACK_EXTERNAL_MODULE__448__; /***/ }, /***/ 820 (module) { module.exports = __WEBPACK_EXTERNAL_MODULE__820__; /***/ }, /***/ 512 (module) { module.exports = __WEBPACK_EXTERNAL_MODULE__512__; /***/ }, /***/ 184 (module) { module.exports = __WEBPACK_EXTERNAL_MODULE__184__; /***/ }, /***/ 984 (module) { module.exports = __WEBPACK_EXTERNAL_MODULE__984__; /***/ }, /***/ 944 (module) { module.exports = __WEBPACK_EXTERNAL_MODULE__944__; /***/ } /******/ }); /************************************************************************/ /******/ // The module cache /******/ const __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ const cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ const module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ /******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = (module) => { /******/ const getter = module && module.__esModule ? /******/ () => (module['default']) : /******/ () => (module); /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter/value functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ if(Array.isArray(definition)) { /******/ var i = 0; /******/ while(i < definition.length) { /******/ var key = definition[i++]; /******/ var binding = definition[i++]; /******/ if(!__webpack_require__.o(exports, key)) { /******/ if(binding === 0) { /******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] }); /******/ } else { /******/ Object.defineProperty(exports, key, { enumerable: true, get: binding }); /******/ } /******/ } else if(binding === 0) { i++; } /******/ } /******/ } else { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /************************************************************************/ let __webpack_exports__ = {}; // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ highcharts_more_src) }); // EXTERNAL MODULE: external {"amd":["highcharts/highcharts"],"commonjs":["highcharts"],"commonjs2":["highcharts"],"root":["Highcharts"]} var highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_ = __webpack_require__(944); var highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default = /*#__PURE__*/__webpack_require__.n(highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_); // EXTERNAL MODULE: external {"amd":["highcharts/highcharts","SeriesRegistry"],"commonjs":["highcharts","SeriesRegistry"],"commonjs2":["highcharts","SeriesRegistry"],"root":["Highcharts","SeriesRegistry"]} var highcharts_SeriesRegistry_commonjs_highcharts_SeriesRegistry_commonjs2_highcharts_SeriesRegistry_root_Highcharts_SeriesRegistry_ = __webpack_require__(512); var highcharts_SeriesRegistry_commonjs_highcharts_SeriesRegistry_commonjs2_highcharts_SeriesRegistry_root_Highcharts_SeriesRegistry_default = /*#__PURE__*/__webpack_require__.n(highcharts_SeriesRegistry_commonjs_highcharts_SeriesRegistry_commonjs2_highcharts_SeriesRegistry_root_Highcharts_SeriesRegistry_); ;// ./code/es-modules/Series/CenteredUtilities.js /* * * * (c) 2010-2026 Highsoft AS * Author: Torstein Hønsi * * Integration of this software requires a license. * - For commercial use, see www.highcharts.com/license * - For non-commercial, see www.highcharts.com/license-eula * * * */ const { deg2rad } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()); /** * @internal */ var CenteredUtilities; (function (CenteredUtilities) { /* * * * Declarations * * */ /* * * * Functions * * */ /** * Get the center of the pie based on the size and center options relative * to the plot area. Borrowed by the polar and gauge series types. * * @internal * @function Highcharts.CenteredSeriesMixin.getCenter */ function getCenter() { const options = this.options, chart = this.chart, slicingRoom = 2 * (options.slicedOffset || 0), plotWidth = chart.plotWidth - 2 * slicingRoom, plotHeight = chart.plotHeight - 2 * slicingRoom, centerOption = options.center, smallestSize = Math.min(plotWidth, plotHeight), thickness = options.thickness; let handleSlicingRoom, size = options.size, innerSize = options.innerSize || 0, i, value; if (typeof size === 'string') { size = parseFloat(size); } if (typeof innerSize === 'string') { innerSize = parseFloat(innerSize); } const positions = [ (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.pick)(centerOption?.[0], '50%'), (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.pick)(centerOption?.[1], '50%'), // Prevent from negative values (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.pick)(size && size < 0 ? void 0 : options.size, '100%'), (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.pick)(innerSize && innerSize < 0 ? void 0 : options.innerSize || 0, '0%') ]; for (i = 0; i < 4; ++i) { value = positions[i]; handleSlicingRoom = i < 2 || (i === 2 && /%$/.test(value)); // I == 0: centerX, relative to width // i == 1: centerY, relative to height // i == 2: size, relative to smallestSize // i == 3: innerSize, relative to size positions[i] = (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.relativeLength)(value, [plotWidth, plotHeight, smallestSize, positions[2]][i]) + (handleSlicingRoom ? slicingRoom : 0); } // Inner size cannot be larger than size (#3632) if (positions[3] > positions[2]) { positions[3] = positions[2]; } // Thickness overrides innerSize, need to be less than pie size (#6647) if ((0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.isNumber)(thickness) && thickness * 2 < positions[2] && thickness > 0) { positions[3] = positions[2] - thickness * 2; } (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.fireEvent)(this, 'afterGetCenter', { positions }); return positions; } CenteredUtilities.getCenter = getCenter; /** * GetStartAndEndRadians - Calculates start and end angles in radians. * Used in series types such as pie and sunburst. * * @internal * @function Highcharts.CenteredSeriesMixin.getStartAndEndRadians * * @param {number} [start] * Start angle in degrees. * * @param {number} [end] * Start angle in degrees. * * @return {Highcharts.RadianAngles} * Returns an object containing start and end angles as radians. */ function getStartAndEndRadians(start, end) { const startAngle = (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.isNumber)(start) ? start : 0, // Must be a number endAngle = (((0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.isNumber)(end) && // Must be a number end > startAngle && // Must be larger than the start angle // difference must be less than 360 degrees (end - startAngle) < 360) ? end : startAngle + 360), correction = -90; return { start: deg2rad * (startAngle + correction), end: deg2rad * (endAngle + correction) }; } CenteredUtilities.getStartAndEndRadians = getStartAndEndRadians; })(CenteredUtilities || (CenteredUtilities = {})); /* * * * Default Export * * */ /** @internal */ /* harmony default export */ const Series_CenteredUtilities = (CenteredUtilities); /* * * * API Declarations * * */ /** * @internal * @interface Highcharts.RadianAngles */ /** * @name Highcharts.RadianAngles#end * @type {number} */ /** * @name Highcharts.RadianAngles#start * @type {number} */ ''; // Keeps doclets above in JS file ;// ./code/es-modules/Extensions/Pane/PaneComposition.js /* * * * Imports * * */ /* * * * Functions * * */ /** @internal */ function chartGetHoverPane(eventArgs) { const chart = this; let hoverPane; if (eventArgs) { chart.pane.forEach((pane) => { const x = eventArgs.chartX - chart.plotLeft, y = eventArgs.chartY - chart.plotTop; if (isInsidePane(x, y, pane.center)) { hoverPane = pane; } }); } return hoverPane; } /** @internal */ function compose(ChartClass, PointerClass) { const chartProto = ChartClass.prototype; if (!chartProto.getHoverPane) { chartProto.collectionsWithUpdate.push('pane'); chartProto.getHoverPane = chartGetHoverPane; (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.addEvent)(ChartClass, 'afterIsInsidePlot', onChartAfterIsInsiderPlot); (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.addEvent)(PointerClass, 'afterGetHoverData', onPointerAfterGetHoverData); (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.addEvent)(PointerClass, 'beforeGetHoverData', onPointerBeforeGetHoverData); } } /** * Check whether element is inside or outside pane. * @internal * @param {number} x * Element's x coordinate * @param {number} y * Element's y coordinate * @param {Array<number>} center * Pane's center (x, y) and diameter * @param {number} startAngle * Pane's normalized start angle in radians (<-PI, PI>) * @param {number} endAngle * Pane's normalized end angle in radians (<-PI, PI>) */ function isInsidePane(x, y, center, startAngle, endAngle) { let insideSlice = true; const cx = center[0], cy = center[1], twoPi = 2 * Math.PI; const distance = Math.sqrt(Math.pow(x - cx, 2) + Math.pow(y - cy, 2)); if ((0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.defined)(startAngle) && (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.defined)(endAngle)) { // Round angle to N-decimals to avoid numeric errors let angle = Math.atan2((0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.correctFloat)(y - cy, 8), (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.correctFloat)(x - cx, 8)); // Normalize angle to [0, 2π) angle = (angle + twoPi) % (twoPi); startAngle = (startAngle + twoPi) % (twoPi); endAngle = (endAngle + twoPi) % (twoPi); // Ignore full circle panes: if (Math.abs(endAngle - startAngle) > 1e-6) { // If the normalized start angle is greater than the end angle, // it means the arc wraps around 0°. In this case, we check // if the angle falls into either [startAngle, 2π) or [0, endAngle]. if (startAngle > endAngle) { insideSlice = (angle >= startAngle || angle <= endAngle); } else { // In this case, we simply check if angle is within the // [startAngle, endAngle] range insideSlice = angle >= startAngle && angle <= endAngle; } } } else { // If no start/end angles are defined, treat it as a full circle insideSlice = true; } // Round up radius because x and y values are rounded return distance <= Math.ceil(center[2] / 2) && insideSlice; } /** * Check if (x, y) position is within pane for polar. * @internal */ function onChartAfterIsInsiderPlot(e) { const chart = this; if (chart.polar) { if (e.options.inverted) { [e.x, e.y] = [e.y, e.x]; } e.isInsidePlot = chart.pane.some((pane) => isInsidePane(e.x, e.y, pane.center, pane.axis && pane.axis.normalizedStartAngleRad, pane.axis && pane.axis.normalizedEndAngleRad)); } } /** * @internal */ function onPointerAfterGetHoverData(eventArgs) { const chart = this.chart; if (eventArgs.hoverPoint && eventArgs.hoverPoint.plotX && eventArgs.hoverPoint.plotY && chart.hoverPane && !isInsidePane(eventArgs.hoverPoint.plotX, eventArgs.hoverPoint.plotY, chart.hoverPane.center)) { eventArgs.hoverPoint = void 0; } } /** @internal */ function onPointerBeforeGetHoverData(eventArgs) { const chart = this.chart; if (chart.polar) { // Find pane we are currently hovering over. chart.hoverPane = chart.getHoverPane(eventArgs); // Edit filter method to handle polar eventArgs.filter = function (s) { return (s.visible && !(!eventArgs.shared && s.directTouch) && // #3821 (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.pick)(s.options.enableMouseTracking, true) && (!chart.hoverPane || s.xAxis.pane === chart.hoverPane)); }; } else { chart.hoverPane = void 0; } } /* * * * Default Export * * */ /** @internal */ const PaneComposition = { compose }; /** @internal */ /* harmony default export */ const Pane_PaneComposition = (PaneComposition); ;// ./code/es-modules/Extensions/Pane/PaneDefaults.js /* * * * (c) 2010-2026 Highsoft AS * Author: Torstein Hønsi * * Integration of this software requires a license. * - For commercial use, see www.highcharts.com/license * - For non-commercial, see www.highcharts.com/license-eula * * * */ const { defaultOptions } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()); /* * * * API Options * * */ /** * A background item or an array of such for the pane. When used in * `Highcharts.setOptions` for theming, the background must be a single item. * * @sample highcharts/pane/background * Pane background options * @sample {highcharts} highcharts/series-solidgauge/pane-borderradius * Solid gauge with background settings * * @type {null|*|Array<*>} * @requires highcharts-more * @optionparent pane.background */ const background = { /** * An additional class name to apply to the pane background. * * @sample {highcharts} highcharts/css/pane/ * Panes styled by CSS * @sample {highstock} highcharts/css/pane/ * Panes styled by CSS * @sample {highmaps} highcharts/css/pane/ * Panes styled by CSS * * @type {string} * @since 5.0.0 * @requires highcharts-more * @apioption pane.background.className */ /** * The shape of the pane background. When `solid`, the background * is circular. When `arc`, the background extends only from the min * to the max of the value axis. * * @type {Highcharts.PaneBackgroundShapeValue} * @since 2.3.0 * @product highcharts * @requires highcharts-more */ shape: 'arc', /** * The specific border radius of the pane background when the shape is * `arc`. Can be a number (pixels) or a percentage string. Defaults to the * value of `pane.borderRadius`. * * @since 11.4.2 * @sample highcharts/series-solidgauge/pane-borderradius Circular gauge * and pane with equal border radius * @product highcharts * @type {number|string} * @requires highcharts-more */ borderRadius: void 0, /** * The pixel border width of the pane background. * * @sample highcharts/pane/background * Pane background options * @since 2.3.0 * @product highcharts * @requires highcharts-more */ borderWidth: 0, /** * The pane background border color. * * @sample highcharts/pane/background * Pane background options * @type {Highcharts.ColorType} * @since 2.3.0 * @product highcharts * @requires highcharts-more */ borderColor: 'var(--highcharts-neutral-color-20)', /** * The background color or gradient for the pane. * * @sample highcharts/pane/background * Pane background options * @type {Highcharts.ColorType} * @since 2.3.0 * @product highcharts * @requires highcharts-more */ backgroundColor: 'var(--highcharts-neutral-color-3)', /** @ignore-option */ from: -Number.MAX_VALUE, // Corrected to axis min /** * The inner radius of the pane background. Can be either numeric * (pixels) or a percentage string. Defaults to match the `pane.innerSize`. * * @type {number|string} * @since 2.3.0 * @product highcharts * @requires highcharts-more * @apioption pane.background.innerRadius */ /** @ignore-option */ to: Number.MAX_VALUE, // Corrected to axis max /** * The outer radius of the circular pane background. Can be either * numeric (pixels) or a percentage string. * * @type {number|string} * @since 2.3.0 * @product highcharts * @requires highcharts-more */ outerRadius: '100%' }; /** * The pane serves as a container for axes and backgrounds for circular * gauges and polar charts. * * When used in `Highcharts.setOptions` for theming, the pane must be a single * object, otherwise arrays are supported. * * @type {*|Array<*>} * @since 2.3.0 * @product highcharts * @requires highcharts-more * @optionparent pane */ const pane = { /** * The end angle of the polar X axis or gauge value axis, given in * degrees where 0 is north. Defaults to [startAngle](#pane.startAngle) * + 360 for polar charts, `startAngle` + 240 for gauges. * * @sample {highcharts} highcharts/pane/size * Responsive pane size and center * @sample {highcharts} highcharts/demo/gauge-vu-meter/ * VU-meter with custom start and end angle * * @type {number} * @since 2.3.0 * @product highcharts * @requires highcharts-more * @apioption pane.endAngle */ /** * The border radius of the elements of the pane. This affects the pane * background, plot bands and solid gauges, unless they have specific * border radius settings. * * @sample highcharts/pane/borderradius * Border radius * @type {number|string} * @since 13.0.0 * @product highcharts */ borderRadius: 3, /** * The center of a polar chart or angular gauge, given as an array of [x, y] * positions. Positions can be given as integers that transform to pixels, * or as percentages of the plot area size. * * By default, the center is calculated to fit the plot area, depending on * the `startAngle` and `endAngle`, `margin`, background shape, axis labels, * and gauge data labels. * * @sample {highcharts} highcharts/pane/size * Responsive pane size and center * @sample {highcharts} highcharts/demo/gauge-vu-meter/ * Two gauges with different center * * @type {Array<string|number>} * @default ["50%", undefined] * @since 2.3.0 * @product highcharts * @requires highcharts-more * @apioption pane.center */ /** * The inner size of the pane, either as a number defining pixels, or a * percentage defining a percentage of the pane's size. Defaults to 0 on * polar charts, 80% on gauges. * * @sample {highcharts} highcharts/pane/size-percent * Gauge with pane sizing * @sample {highcharts} highcharts/series-polar/column-inverted-inner * The inner size set to 20% * * @type {number|string} * @product highcharts * @requires highcharts-more * @apioption pane.innerSize */ /** * The size of the pane, either as a number defining pixels, or a percentage * defining a percentage of the available plot area (the smallest of the * plot height or plot width). * * By default, the size is calculated to fit the plot area, depending on the * `startAngle` and `endAngle`, `margin`, background shape, axis labels, * and gauge data labels. * * @sample {highcharts} highcharts/pane/size-percent * Gauge with pane sizing * @sample {highcharts} highcharts/pane/size * Responsive pane size and center * @sample {highcharts} highcharts/demo/gauge-vu-meter/ * Smaller size * * @type {number|string} * @default undefined * @product highcharts * @apioption pane.size */ /** * The start angle of the polar X axis or gauge axis, given in degrees * where 0 is north. Defaults to 0 for polar charts, -135 for gauges. * * @sample {highcharts} highcharts/pane/size * Responsive pane size and center * @sample {highcharts} highcharts/demo/gauge-vu-meter/ * VU-meter with custom start and end angle * * @since 2.3.0 * @product highcharts * @type {number} * @requires highcharts-more * @apioption pane.startAngle */ /** * The thickness of the pane in terms of pixels. This applies to the pane * background, plot bands and solid gauges. Use this for a fixed width pane * across different sizes, where `size` and `innerSize` are not practical. * * @sample {highcharts} highcharts/pane/thickness * Pane thickness * * @since 13.0.0 * @product highcharts * @type {number} * @requires highcharts-more * @apioption pane.thickness */ /** * The margin between the pane and the plot area when auto-fitting the pane. * This does not apply when an explicit `pane.size` is set. An array sets * individual margins for the sides in the order [top, right, bottom, left]. * * By default, the margin is approximated to make room for the radial axis * labels of a gauge chart. * * @type {number|Array<number>} * @since 13.0.0 * @sample {highcharts} highcharts/pane/margin */ margin: void 0 }; defaultOptions.pane = pane; /* * * * Default Export * * */ /** @internal */ const PaneDefaults = { pane, background }; /** @internal */ /* harmony default export */ const Pane_PaneDefaults = (PaneDefaults); ;// ./code/es-modules/Extensions/Pane/Pane.js /* * * * (c) 2010-2026 Highsoft AS * Author: Torstein Hønsi * * Integration of this software requires a license. * - For commercial use, see www.highcharts.com/license * - For non-commercial, see www.highcharts.com/license-eula * * * */ /* * * * Class * * */ /** * The Pane object allows options that are common to a set of X and Y axes. * * In the future, this can be extended to basic Highcharts and Highcharts Stock. * * @internal * @class * @name Highcharts.Pane * @param {Highcharts.PaneOptions} options * @param {Highcharts.Chart} chart */ class Pane { /* * * * Constructor * * */ constructor(options, chart) { this.coll = 'pane'; // Member of chart.pane this.init(options, chart); } /* * * * Functions * * */ /** * Initialize the Pane object * * @internal * @function Highcharts.Pane#init * * @param {Highcharts.PaneOptions} options * * @param {Highcharts.Chart} chart */ init(options, chart) { this.chart = chart; this.background = []; chart.pane.push(this); this.setOptions(options); } /** * Check if the chart has a series of a specific type * @internal */ hasSeriesType(type) { return Boolean(this.chart.options?.chart?.type === type || this.chart.options?.series?.some((s) => s.type === type)); } /** * Set options override. Angular charts have a default background (#3318) * and an inner size. * * @internal */ setOptions(options) { this.options = (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.merge)(Pane_PaneDefaults.pane, this.chart.angular ? { // Add a single background element with default properties background: {}, // An inner size for plot bands and axis layout innerSize: '85%' } : {}, options); } /** * Render the pane with its backgrounds. * * @internal * @function Highcharts.Pane#render */ render() { const options = this.options, renderer = this.chart.renderer; if (!this.group) { this.group = renderer.g('pane-group') .attr({ zIndex: options.zIndex || 0 }) .add(); } this.updateCenter(); let backgroundOption = this.options.background; // Render the backgrounds if (backgroundOption) { backgroundOption = (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.splat)(backgroundOption); const len = Math.max(backgroundOption.length, this.background.length || 0); for (let i = 0; i < len; i++) { // #6641 - if axis exists, chart is circular and apply // background if (backgroundOption[i] && this.axis) { this.renderBackground((0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.merge)(Pane_PaneDefaults.background, // Defaults inherited from the `pane` option { borderRadius: this.options.borderRadius }, backgroundOption[i]), i); } else if (this.background[i]) { this.background[i] = this.background[i].destroy(); this.background.splice(i, 1); } } } } /** * Render an individual pane background. * * @internal * @function Highcharts.Pane#renderBackground * * @param {Highcharts.PaneBackgroundOptions} backgroundOptions * Background options * * @param {number} i * The index of the background in this.backgrounds */ renderBackground(backgroundOptions, i) { const attribs = { 'class': 'highcharts-pane ' + (backgroundOptions.className || '') }; let method = 'animate'; if (!this.chart.styledMode) { (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.extend)(attribs, { 'fill': backgroundOptions.backgroundColor, 'stroke': backgroundOptions.borderColor, 'stroke-width': backgroundOptions.borderWidth }); } if (!this.background[i]) { this.background[i] = this.chart.renderer .path() .add(this.group); method = 'attr'; } this.background[i][method]({ 'd': this.axis.getPlotBandPath(backgroundOptions.from, backgroundOptions.to, backgroundOptions) }).attr(attribs); } /** * Gets the center for the pane and its axis. * * @internal * @function Highcharts.Pane#updateCenter */ updateCenter() { const { axis, chart, options } = this, { plotHeight, plotWidth } = chart, centerY = options.center?.[1], m = options.margin, labels = this.axis?.options.labels, thickness = options.thickness, marginLoose = Array.isArray(m) ? m : [m, m, m, m], margin = []; let size = options.size, sizeFromAngle, appliedCenterMargin = 0, axisLabelMargin = 0; // Get the required margin in order to display the data label in or // below the center const dataLabelMargin = Math.min(chart.series .reduce((max, s) => { if (!s.is('gauge') || s.yAxis?.pane !== this) { return max; } const dl = (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.splat)(s.options.dataLabels)[0]; let dlMargin = 0; if (dl && dl.enabled !== false) { // 30 is an approximation of the default data label // height. It is not yet rendered. dlMargin = (1 - (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.getAlignFactor)(dl.verticalAlign)) * 30 + (dl.y || 0); } return Math.max(max, dlMargin); }, 0), plotHeight * 0.3); // Get the required margin to make room for the radial axis labels. if (labels?.enabled) { const fontSize = String(labels.style?.fontSize || ''), // Approximate the line height because we don't have the // actual label to measure lineHeightGuess = (/px$/.test(fontSize) ? parseFloat(fontSize) : /em$/.test(fontSize) ? parseFloat(fontSize) * 12 : 12) * 1.2, // 1.2 is a line height approximation m = Math.max(labels.distance || 0, 0) + lineHeightGuess / 2; axisLabelMargin = m; } marginLoose.forEach((m, i) => { margin[i] = m ?? Math.max(axisLabelMargin || 0); }); // Handle auto-positioning when size and center are undefined if (axis && (size === void 0 || centerY === void 0)) { const { endAngleRad, startAngleRad } = axis, deg2rad = Math.PI * 2 / 360, crossingBottom = (startAngleRad < Math.PI / 2 && endAngleRad > Math.PI / 2) || // Circle background should fill out the plot area (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.splat)(options.background).some((b) => b?.shape === 'circle'), maxAngle = crossingBottom ? Math.PI : Math.max(Math.abs(startAngleRad + Math.PI / 2), Math.abs(endAngleRad + Math.PI / 2)), sin = Math.sin(maxAngle - Math.PI / 2), // The size doesn't increase further to angles below this // minimum. For linear gauges, this means that the pivot is kept // visible. minimumAngle = 90, sizeRatio = 0.5 + 0.5 * Math.max(sin, Math.sin(deg2rad * (minimumAngle - 90))); sizeFromAngle = (plotHeight - margin[0] - margin[2]) / sizeRatio; if (size === void 0) { size = Math.max(Math.min(sizeFromAngle, plotWidth - margin[1] - margin[3]), 1); // Make sure there is space for the data label (centerMargin) const overflow = size + margin[0] + margin[2] + 2 * (dataLabelMargin - plotHeight); if (overflow > 0) { appliedCenterMargin = overflow; size = Math.max(1, size - appliedCenterMargin); } } } // Run the standard centering this.center = (axis || {}).center = Series_CenteredUtilities.getCenter.call(this); // Apply the auto-positioning if ((0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.isNumber)(size) && size >= 0) { this.center[2] = size; if ((0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.isNumber)(thickness)) { this.center[3] = this.center[2] - thickness * 2; } else { this.center[3] = Math.min(size, (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.relativeLength)(options.innerSize || 0, size)); } } if (!(0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.defined)(centerY)) { if (options.size) { this.center[1] = plotHeight / 2; } else if ((0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.isNumber)(sizeFromAngle)) { this.center[1] = (sizeFromAngle + this.center[2] - appliedCenterMargin) / 4 + margin[0]; } } } /** * Destroy the pane item * * @ignore * @internal * @function Highcharts.Pane#destroy * / destroy: function () { erase(this.chart.pane, this); this.background.forEach(function (background) { background.destroy(); }); this.background.length = 0; this.group = this.group.destroy(); }, */ /** * Update the pane item with new options * * @internal * @function Highcharts.Pane#update * @param {Highcharts.PaneOptions} options * New pane options * @param {boolean} [redraw] */ update(options, redraw) { (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.merge)(true, this.options, options); this.setOptions(this.options); this.render(); this.chart.axes.forEach(function (axis) { if (axis.pane === this) { axis.pane = null; axis.update({}, redraw); } }, this); } } /* * * * Static Properties * * */ Pane.compose = Pane_PaneComposition.compose; /* * * * Default Export * * */ /** @internal */ /* harmony default export */ const Pane_Pane = (Pane); /* * * * API Declarations * * */ /** * @typedef {"arc"|"circle"|"solid"} Highcharts.PaneBackgroundShapeValue */ ''; // Keeps doclets above in JS file ;// ./code/es-modules/Series/AreaRange/AreaRangePoint.js /* * * * (c) 2010-2026 Highsoft AS * Author: Torstein Hønsi * * Integration of this software requires a license. * - For commercial use, see www.highcharts.com/license * - For non-commercial, see www.highcharts.com/license-eula * * * */ const { area: { prototype: { pointClass: AreaPoint, pointClass: { prototype: areaProto } } } } = (highcharts_SeriesRegistry_commonjs_highcharts_SeriesRegistry_commonjs2_highcharts_SeriesRegistry_root_Highcharts_SeriesRegistry_default()).seriesTypes; /* * * * Class * * */ /** @internal */ class AreaRangePoint extends AreaPoint { /* * * * Functions * * */ /** * @internal */ setState() { const prevState = this.state, series = this.series, isPolar = series.chart.polar; if (!(0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.defined)(this.plotHigh)) { // Boost doesn't calculate plotHigh this.plotHigh = series.yAxis.toPixels(this.high, true); } if (!(0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.defined)(this.plotLow)) { // Boost doesn't calculate plotLow this.plotLow = this.plotY = series.yAxis.toPixels(this.low, true); } series.lowerStateMarkerGraphic = series.stateMarkerGraphic; series.stateMarkerGraphic = series.upperStateMarkerGraphic; // Change state also for the top marker this.graphic = this.graphics && this.graphics[1]; this.plotY = this.plotHigh; if (isPolar && (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.isNumber)(this.plotHighX)) { this.plotX = this.plotHighX; } // Top state: areaProto.setState.apply(this, arguments); this.state = prevState; // Now restore defaults this.plotY = this.plotLow; this.graphic = this.graphics && this.graphics[0]; if (isPolar && (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.isNumber)(this.plotLowX)) { this.plotX = this.plotLowX; } series.upperStateMarkerGraphic = series.stateMarkerGraphic; series.stateMarkerGraphic = series.lowerStateMarkerGraphic; // Lower marker is stored at stateMarkerGraphic // to avoid reference duplication (#7021) series.lowerStateMarkerGraphic = void 0; const originalSettings = series.modifyMarkerSettings(); // Bottom state areaProto.setState.apply(this, arguments); // Restore previous state series.restoreMarkerSettings(originalSettings); } haloPath() { const isPolar = this.series.chart.polar; let path = []; // Bottom halo this.plotY = this.plotLow; if (isPolar && (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.isNumber)(this.plotLowX)) { this.plotX = this.plotLowX; } if (this.isInside) { path = areaProto.haloPath.apply(this, arguments); } // Top halo this.plotY = this.plotHigh; if (isPolar && (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.isNumber)(this.plotHighX)) { this.plotX = this.plotHighX; } if (this.isTopInside) { path = path.concat(areaProto.haloPath.apply(this, arguments)); } return path; } isValid() { return (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.isNumber)(this.low) && (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.isNumber)(this.high); } } /* * * * Default Export * * */ /** @internal */ /* harmony default export */ const AreaRange_AreaRangePoint = (AreaRangePoint); /* * * * API Options * * */ /** * Range series only. The high or maximum value for each data point. * * @name Highcharts.Point#high * @type {number|undefined} */ /** * Range series only. The low or minimum value for each data point. * * @name Highcharts.Point#low * @type {number|undefined} */ ''; // Keeps doclets above in JS file. // EXTERNAL MODULE: external {"amd":["highcharts/highcharts","Series","types","column"],"commonjs":["highcharts","Series","types","column"],"commonjs2":["highcharts","Series","types","column"],"root":["Highcharts","Series","types","column"]} var highcharts_Series_types_column_commonjs_highcharts_Series_types_column_commonjs2_highcharts_Series_types_column_root_Highcharts_Series_types_column_ = __webpack_require__(448); var highcharts_Series_types_column_commonjs_highcharts_Series_types_column_commonjs2_highcharts_Series_types_column_root_Highcharts_Series_types_column_default = /*#__PURE__*/__webpack_require__.n(highcharts_Series_types_column_commonjs_highcharts_Series_types_column_commonjs2_highcharts_Series_types_column_root_Highcharts_Series_types_column_); ;// ./code/es-modules/Series/RangeDataLabel.js /* * * * (c) 2010-2026 Highsoft AS * Author: Andrzej Buleczka * * */ /* * * * Declarations * * */ var RangeDataLabel; (function (RangeDataLabel) { const plotYKeys = { close: ['plotClose'], high: ['highPlot', 'plotHigh'], low: ['lowPlot', 'plotLow'], median: ['medianPlot'], open: ['plotOpen'], q1: ['q1Plot'], q3: ['q3Plot'], y: ['plotY'] }; /* * * * Functions * * */ function getPointPlotY(point, pointValKey) { const keys = plotYKeys[pointValKey] ?? []; for (const key of keys) { const value = point[key]; if ((0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.isNumber)(value)) { return value; } } } function getBelow(point, options, plotY) { const plotHigh = getPointPlotY(point, 'high'), plotLow = getPointPlotY(point, 'low'); if ((0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.isNumber)(plotHigh) && (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.isNumber)(plotLow)) { return options.inside ? plotY === Math.min(plotHigh, plotLow) : plotY === Math.max(plotHigh, plotLow); } return false; } function compose(SeriesClass) { const seriesProto = SeriesClass.prototype; seriesProto.alignDataLabel = alignDataLabel; return SeriesClass; } RangeDataLabel.compose = compose; /** * Default formatter for range series data labels. Renders the value of * the point key the label is aligned to, so the legacy high and low * labels keep showing their respective values without an explicit format. * Does not modify `point.y`. Falls back to `point.y` (the value of * `series.pointValKey`) for an unresolved key. * @internal */ function formatter(options) { const rawValue = options.alignToKey ? this.getNestedProperty(options.alignToKey) : this.y, value = (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.isNumber)(rawValue) ? rawValue : this.y; return (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.isNumber)(value) ? this.series.chart.numberFormatter(value, -1) : ''; } RangeDataLabel.formatter = formatter; /** * Rewrite a label's `format` so that `{y}` and `{point.y}` references * resolve to the value of the point key the label is aligned to, keeping * the legacy per-label `{y}` behavior of range data labels. * @internal */ function applyAlignToKeyValue(options) { const { alignToKey, format } = options; // An explicit `format` ignores `alignToKey`, so its `{y}` (and // `{point.y}`) tokens point at the whole point. Rewrite them to the // aligned key so each range label keeps rendering its own value. // The default formatter already reads `alignToKey`. if (alignToKey && format) { options.format = format.replace(/\{(?:point\.)?y([:}])/g, '{point.' + alignToKey + '$1'); } } RangeDataLabel.applyAlignToKeyValue = applyAlignToKeyValue; function resolveAlignToKey(series, rawKey) { return rawKey && series.pointArrayMap.indexOf(rawKey) > -1 ? rawKey : series.pointValKey; } RangeDataLabel.resolveAlignToKey = resolveAlignToKey; function alignDataLabel(point, dataLabel, options, alignTo, isNew) { const series = this, alignToKey = resolveAlignToKey(series, options.alignToKey), plotY = getPointPlotY(point, alignToKey), shapeArgs = point.shapeArgs, originalPlotY = point.plotY, originalDlBox = point.dlBox, originalBelow = point.below; if ((0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.isNumber)(plotY)) { point.plotY = plotY; if (shapeArgs && !options.inside) { point.dlBox = { x: shapeArgs.x ?? 0, y: (0,highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_.crisp)(plotY, series.borderWidth, series.chart.inverted), width: shapeArgs.width ?? 0, height: 0 }; } const below = point.below = getBelow(point, options, plotY); if (series.chart.inverted) { options.align ?? (options.align = below ? 'right' : 'left'); } else { options.verticalAlign ?? (options.verticalAlign = below ? 'top' : 'bottom'); } } highcharts_Series_types_column_commonjs_highcharts_Series_types_column_commonjs2_highcharts_Series_types_column_root_Highcharts_Series_types_column_default().prototype.alignDataLabel.call(series, point, dataLabel, options, alignTo, isNew); point.plotY = originalPlotY; point.dlBox = originalDlBox; point.below = originalBelow; } RangeDataLabel.alignDataLabel = alignDataLabel; })(RangeDataLabel || (RangeDataLabel = {})); /* * * * Default Export * * */ /* harmony default export */ const Series_RangeDataLabel = (RangeDataLabel); ;// ./code/es-modules/Series/AreaRange/AreaRangeSeries.js /* * * * (c) 2010-2026 Highsoft AS * Author: Torstein Hønsi * * Integration of this software requires a license. * - For commercial use, see www.highcharts.com/license * - For non-commercial, see www.highcharts.com/license-eula * * * */ const { noop } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()); const { area: AreaSeries, area: { prototype: AreaRangeSeries_areaProto } } = (highcharts_SeriesRegistry_commonjs_highcharts_SeriesRegistry_commonjs2_highcharts_SeriesRegistry_root_Highcharts_SeriesRegistry_default()).seriesTypes; /* * * * Constants * * */ /** * The area range series is a cartesian series with higher and lower values for * each point along an X axis, where the area between the values is shaded. * * @sample {highcharts} highcharts/demo/arearange/ * Area range chart * @sample {highstock} stock/demo/arearange/ * Area range chart * * @extends plotOptions.area * @product highcharts highstock * @excluding stack, stacking * @requires highcharts-more * @optionparent plotOptions.arearange * * @internal */ const areaRangeSeriesOptions = { /** * @see [fillColor](#plotOptions.arearange.fillColor) * @see [fillOpacity](#plotOptions.arearange.fillOpacity) * * @apioption plotOptions.arearange.color */ /** * @default low * @apioption plotOptions.arearange.colorKey */ /** * @see [color]