@dpuse/dpuse-tool-highcharts-visualiser 0.0.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +329 -0
  3. package/dist/AnimationUtilities-Bby2idBR.js +1176 -0
  4. package/dist/AnimationUtilities-Bby2idBR.js.map +1 -0
  5. package/dist/BorderRadius-2zMZW_aK.js +1445 -0
  6. package/dist/BorderRadius-2zMZW_aK.js.map +1 -0
  7. package/dist/SVGElement-BmvC_qu3.js +394 -0
  8. package/dist/SVGElement-BmvC_qu3.js.map +1 -0
  9. package/dist/SeriesRegistry-0cj0ZJqn.js +374 -0
  10. package/dist/SeriesRegistry-0cj0ZJqn.js.map +1 -0
  11. package/dist/TextPath-DK4Jkzd7.js +133 -0
  12. package/dist/TextPath-DK4Jkzd7.js.map +1 -0
  13. package/dist/dependency-wheel.src-BHmwx9rW.js +194 -0
  14. package/dist/dependency-wheel.src-BHmwx9rW.js.map +1 -0
  15. package/dist/dpuse-tool-highcharts-visualiser.es.js +10154 -0
  16. package/dist/dpuse-tool-highcharts-visualiser.es.js.map +1 -0
  17. package/dist/highchartsMoreCustom-CcpfmVny.js +1110 -0
  18. package/dist/highchartsMoreCustom-CcpfmVny.js.map +1 -0
  19. package/dist/pattern-fill.src-BPmr3DQg.js +169 -0
  20. package/dist/pattern-fill.src-BPmr3DQg.js.map +1 -0
  21. package/dist/sankey.src-DocCurOx.js +524 -0
  22. package/dist/sankey.src-DocCurOx.js.map +1 -0
  23. package/dist/streamgraph.src-Bn6PY8Fd.js +19 -0
  24. package/dist/streamgraph.src-Bn6PY8Fd.js.map +1 -0
  25. package/dist/types/eslint.config.d.ts +3 -0
  26. package/dist/types/src/highchartsMoreCustom.d.ts +2 -0
  27. package/dist/types/src/index.d.ts +18 -0
  28. package/dist/types/tests/highchartsMoreCustom.test.d.ts +1 -0
  29. package/dist/types/tests/importIndex.test.d.ts +1 -0
  30. package/dist/types/vite.config.d.ts +2 -0
  31. package/dist/types/vitest.config.d.ts +2 -0
  32. package/package.json +75 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dpuse-tool-highcharts-visualiser.es.js","names":["H","PaletteDefaults","charts","H","doc","SVG_NS","win","D","H","doc","defaultOptions","isFirefox","win","isMS","charts","deg2rad","noop","H","composed","H","F","deg2rad","A","AxisDefaults","D","F","H","defaultOptions","animObject","PlotLineOrBandAxis","A","F","H","R","doc","animObject","format","composed","H","charts","isTouchDevice","composed","A","F","H","R","T","Series","format","marginNames","distribute","animObject","composed","A","D","Foundation","H","SeriesRegistry","doc","defaultOptions","numberFormat","seriesTypes","Series","win","animObject","A","H","onChartRender","composed","A","SeriesRegistry","onAxisInit","getDeferredAnimation","LineSeries","Series","SeriesRegistry","LineSeries","SeriesRegistry","AreaSeries","LineSeries","SeriesRegistry","SeriesRegistry","A","F","format","H","Series","SeriesRegistry","ColumnDataLabel","composed","ColumnSeries","SeriesRegistry","SeriesRegistry","A","CU","H","Series","ColumnSeries","noop","SeriesRegistry","H","R","SeriesRegistry","composed","GeometryUtilities","G","Highcharts","DataLabel","Legend","LegendSymbol","Pointer","Series","SeriesRegistry","Tooltip","Animation","Defaults","RendererUtilities","ColumnDataLabel","DateTimeAxis","LogarithmicAxis","PieDataLabel","Responsive","StackingAxis","D","Adaptive","H","simulatedEventTarget","win","addClass","removeClass","cloneMouseEvent","doc","getFakeMouseEvent","cloneTouchEvent","escapeStringForHTML","getElement","getHeadingTagNameForElement","removeElement","removeChildNodes","reverseChildNodes","stripHTMLTagsFromString","visuallyHideElement","F","format","H","stripHTMLTags","HU","fireEventOnWrappedOrUnwrappedElement","doc","getChartTitle","getAxisDescription","getAxisRangeDescription","getSeriesFirstPointElement","getSeriesA11yElement","unhideChartElementFromAT","hideSeriesFromAT","getSeriesFromName","getPointFromXY","scrollAxisToPoint","H","HU","doc","H","CU","HU","getFakeMouseEvent","CU","H","stripHTMLTags","HU","getChartTitle","doc","H","HU","doc","stripHTMLTagsFromString","getAnnotationsInfoHTML","getPointAnnotationTexts","CU","F","H","HU","format","doc","getChartTitle","A11yI18n","getElement","getAxisDescription","getAxisRangeDescription","getChartTitle","getFakeMouseEvent","H","doc","win","A","H","CU","stripHTMLTags","HU","Legend","animObject","doc","getChartTitle","H","compose","isTouchDevice","H","isTouchDevice","SeriesRegistry","seriesTypes","rect","setFixedRange","D","H","composed","defaultOptions","H","composed","D","H","composed","defaultOptions","D","H","defaultOptions","A","T","HU","CU","format","getFakeMouseEvent","getAxisRangeDescription","F","defaultPointDescriptionFormatter","defaultSeriesDescriptionFormatter","describeSeries","H","composed","H","doc","getFakeMouseEvent","win","H","CU","HU","doc","unhideChartElementFromAT","H","SeriesRegistry","H","Series","doc","NewDataAnnouncer","SeriesKeyboardNavigation","CU","HU","H","doc","D","H","HU","KeyboardNavigation","LegendComponent","MenuComponent","RangeSelectorComponent","A11yI18n","defaultOptionsA11Y","highContrastTheme","defaultLangOptions","Highcharts","Accessibility"],"sources":["../node_modules/highcharts/es-modules/Core/Renderer/RendererUtilities.js","../node_modules/highcharts/es-modules/Core/Color/Palette.js","../node_modules/highcharts/es-modules/Core/Renderer/SVG/SVGLabel.js","../node_modules/highcharts/es-modules/Core/Renderer/SVG/Symbols.js","../node_modules/highcharts/es-modules/Core/Renderer/SVG/TextBuilder.js","../node_modules/highcharts/es-modules/Core/Renderer/SVG/SVGRenderer.js","../node_modules/highcharts/es-modules/Core/Renderer/HTML/HTMLElement.js","../node_modules/highcharts/es-modules/Core/Axis/AxisDefaults.js","../node_modules/highcharts/es-modules/Core/Axis/Tick.js","../node_modules/highcharts/es-modules/Core/Axis/Axis.js","../node_modules/highcharts/es-modules/Core/Axis/DateTimeAxis.js","../node_modules/highcharts/es-modules/Core/Axis/LogarithmicAxis.js","../node_modules/highcharts/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js","../node_modules/highcharts/es-modules/Core/Axis/PlotLineOrBand/PlotLineOrBand.js","../node_modules/highcharts/es-modules/Core/Tooltip.js","../node_modules/highcharts/es-modules/Core/Pointer.js","../node_modules/highcharts/es-modules/Core/Legend/Legend.js","../node_modules/highcharts/es-modules/Core/Chart/Chart.js","../node_modules/highcharts/es-modules/Extensions/ScrollablePlotArea.js","../node_modules/highcharts/es-modules/Core/Axis/Stacking/StackingAxis.js","../node_modules/highcharts/es-modules/Series/Line/LineSeries.js","../node_modules/highcharts/es-modules/Series/Area/AreaSeriesDefaults.js","../node_modules/highcharts/es-modules/Series/Area/AreaSeries.js","../node_modules/highcharts/es-modules/Series/Spline/SplineSeries.js","../node_modules/highcharts/es-modules/Series/AreaSpline/AreaSplineSeries.js","../node_modules/highcharts/es-modules/Core/Series/DataLabel.js","../node_modules/highcharts/es-modules/Series/Column/ColumnDataLabel.js","../node_modules/highcharts/es-modules/Series/Bar/BarSeries.js","../node_modules/highcharts/es-modules/Series/Scatter/ScatterSeriesDefaults.js","../node_modules/highcharts/es-modules/Series/Scatter/ScatterSeries.js","../node_modules/highcharts/es-modules/Series/Pie/PiePoint.js","../node_modules/highcharts/es-modules/Series/Pie/PieSeriesDefaults.js","../node_modules/highcharts/es-modules/Series/Pie/PieSeries.js","../node_modules/highcharts/es-modules/Series/Pie/PieDataLabel.js","../node_modules/highcharts/es-modules/Core/Geometry/GeometryUtilities.js","../node_modules/highcharts/es-modules/Core/Series/OverlappingDataLabels.js","../node_modules/highcharts/es-modules/Core/Responsive.js","../node_modules/highcharts/es-modules/masters/highcharts.src.js","../node_modules/highcharts/es-modules/Extensions/Themes/Adaptive.js","../node_modules/highcharts/es-modules/masters/themes/adaptive.src.js","../node_modules/highcharts/es-modules/Accessibility/Utils/HTMLUtilities.js","../node_modules/highcharts/es-modules/Accessibility/A11yI18n.js","../node_modules/highcharts/es-modules/Accessibility/Utils/ChartUtilities.js","../node_modules/highcharts/es-modules/Accessibility/Utils/DOMElementProvider.js","../node_modules/highcharts/es-modules/Accessibility/Utils/EventProvider.js","../node_modules/highcharts/es-modules/Accessibility/AccessibilityComponent.js","../node_modules/highcharts/es-modules/Accessibility/KeyboardNavigationHandler.js","../node_modules/highcharts/es-modules/Accessibility/Components/ContainerComponent.js","../node_modules/highcharts/es-modules/Accessibility/FocusBorder.js","../node_modules/highcharts/es-modules/Accessibility/Utils/Announcer.js","../node_modules/highcharts/es-modules/Accessibility/Components/AnnotationsA11y.js","../node_modules/highcharts/es-modules/Accessibility/Components/InfoRegionsComponent.js","../node_modules/highcharts/es-modules/Accessibility/Components/MenuComponent.js","../node_modules/highcharts/es-modules/Accessibility/KeyboardNavigation.js","../node_modules/highcharts/es-modules/Accessibility/Components/LegendComponent.js","../node_modules/highcharts/es-modules/Stock/Navigator/ChartNavigatorComposition.js","../node_modules/highcharts/es-modules/Core/Axis/NavigatorAxisComposition.js","../node_modules/highcharts/es-modules/Stock/Navigator/NavigatorDefaults.js","../node_modules/highcharts/es-modules/Stock/Navigator/NavigatorSymbols.js","../node_modules/highcharts/es-modules/Stock/Utilities/StockUtilities.js","../node_modules/highcharts/es-modules/Stock/Navigator/NavigatorComposition.js","../node_modules/highcharts/es-modules/Core/Axis/ScrollbarAxis.js","../node_modules/highcharts/es-modules/Stock/Scrollbar/ScrollbarDefaults.js","../node_modules/highcharts/es-modules/Stock/Scrollbar/Scrollbar.js","../node_modules/highcharts/es-modules/Stock/Navigator/Navigator.js","../node_modules/highcharts/es-modules/Accessibility/Components/NavigatorComponent.js","../node_modules/highcharts/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js","../node_modules/highcharts/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js","../node_modules/highcharts/es-modules/Accessibility/ProxyElement.js","../node_modules/highcharts/es-modules/Accessibility/ProxyProvider.js","../node_modules/highcharts/es-modules/Accessibility/Components/RangeSelectorComponent.js","../node_modules/highcharts/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js","../node_modules/highcharts/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js","../node_modules/highcharts/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js","../node_modules/highcharts/es-modules/Accessibility/Components/ZoomComponent.js","../node_modules/highcharts/es-modules/Accessibility/HighContrastMode.js","../node_modules/highcharts/es-modules/Accessibility/HighContrastTheme.js","../node_modules/highcharts/es-modules/Accessibility/Options/A11yDefaults.js","../node_modules/highcharts/es-modules/Accessibility/Options/LangDefaults.js","../node_modules/highcharts/es-modules/Accessibility/Options/DeprecatedOptions.js","../node_modules/highcharts/es-modules/Accessibility/Accessibility.js","../node_modules/highcharts/es-modules/masters/modules/accessibility.src.js","../src/index.ts"],"sourcesContent":["/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\n/* *\n *\n * Imports\n *\n * */\nimport { clamp, pick, pushUnique, stableSort } from '../../Shared/Utilities.js';\n/* *\n *\n * Namespace\n *\n * */\n/** @internal */\nvar RendererUtilities;\n(function (RendererUtilities) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * General distribution algorithm for distributing labels of differing size\n * along a confined length in two dimensions. The algorithm takes an array\n * of objects containing a size, a target and a rank. It will place the\n * labels as close as possible to their targets, skipping the lowest ranked\n * labels if necessary.\n * @internal\n */\n function distribute(boxes, len, maxDistance) {\n // Original array will be altered with added .pos\n const origBoxes = boxes, reducedLen = origBoxes.reducedLen || len, sortByRank = (a, b) => (b.rank || 0) - (a.rank || 0), sortByTarget = (a, b) => a.target - b.target, restBoxes = [], // The outranked overshoot\n boxesLength = boxes.length, forDeletion = [], push = restBoxes.push;\n let i, overlapping = true, box, target, total = 0, equalRank;\n // If the total size exceeds the len, remove those boxes with the lowest\n // rank\n i = boxesLength;\n while (i--) {\n total += boxes[i].size;\n }\n // Sort by rank, then slice away overshoot\n if (total > reducedLen) {\n stableSort(boxes, sortByRank);\n equalRank = boxes[0].rank === boxes[boxes.length - 1].rank;\n // When all boxes have equal rank (pie data labels, flags - #10073),\n // decimate from the center outwards by repeatedly splitting index\n // ranges. This guarantees progress and avoids cursor/step stalling\n // on repeated indices (#23541). When ranks differ, remove the\n // lowest ranked boxes from the end.\n if (equalRank) {\n const ranges = [[0, boxesLength - 1]];\n while (ranges.length && total > reducedLen) {\n const range = ranges.shift();\n if (!range) {\n break;\n }\n i = Math.floor((range[0] + range[1]) / 2);\n box = boxes[i];\n if (pushUnique(forDeletion, i)) {\n total -= box.size;\n }\n if (range[0] < i) {\n ranges.push([range[0], i - 1]);\n }\n if (i < range[1]) {\n ranges.push([i + 1, range[1]]);\n }\n }\n }\n else {\n i = boxesLength - 1;\n while (total > reducedLen && i >= 0) {\n box = boxes[i];\n if (pushUnique(forDeletion, i)) {\n total -= box.size;\n }\n i--;\n }\n }\n // Clean out the boxes marked for deletion\n forDeletion\n .sort((a, b) => b - a)\n .forEach((i) => push.apply(restBoxes, boxes.splice(i, 1)));\n }\n // Order by target\n stableSort(boxes, sortByTarget);\n // So far we have been mutating the original array. Now\n // create a copy with target arrays\n boxes = boxes.map((box) => ({\n size: box.size,\n targets: [box.target],\n align: pick(box.align, 0.5)\n }));\n while (overlapping) {\n // Initial positions: target centered in box\n i = boxes.length;\n while (i--) {\n box = boxes[i];\n // Composite box, average of targets\n target = (Math.min.apply(0, box.targets) +\n Math.max.apply(0, box.targets)) / 2;\n box.pos = clamp(target - box.size * box.align, 0, len - box.size);\n }\n // Detect overlap and join boxes\n i = boxes.length;\n overlapping = false;\n while (i--) {\n // Overlap\n if (i > 0 &&\n boxes[i - 1].pos + boxes[i - 1].size >\n boxes[i].pos) {\n // Add this size to the previous box\n boxes[i - 1].size += boxes[i].size;\n boxes[i - 1].targets = boxes[i - 1]\n .targets\n .concat(boxes[i].targets);\n boxes[i - 1].align = 0.5;\n // Overlapping right, push left\n if (boxes[i - 1].pos + boxes[i - 1].size > len) {\n boxes[i - 1].pos = len - boxes[i - 1].size;\n }\n boxes.splice(i, 1); // Remove this item\n overlapping = true;\n }\n }\n }\n // Add the rest (hidden boxes)\n push.apply(origBoxes, restBoxes);\n // Now the composite boxes are placed, we need to put the original boxes\n // within them\n i = 0;\n boxes.some((box) => {\n let posInCompositeBox = 0;\n // Exceeded maxDistance => abort\n return (box.targets || []).some(() => {\n origBoxes[i].pos = box.pos + posInCompositeBox;\n // If the distance between the position and the target exceeds\n // maxDistance, abort the loop and decrease the length in\n // increments of 10% to recursively reduce the number of\n // visible boxes by rank. Once all boxes are within the\n // maxDistance, we're good.\n if (typeof maxDistance !== 'undefined' &&\n Math.abs(origBoxes[i].pos - origBoxes[i].target) > maxDistance) {\n // Reset the positions that are already set\n origBoxes\n .slice(0, i + 1)\n .forEach((box) => delete box.pos);\n // Try with a smaller length\n origBoxes.reducedLen =\n (origBoxes.reducedLen || len) - (len * 0.1);\n // Recurse\n if (origBoxes.reducedLen > len * 0.1) {\n distribute(origBoxes, len, maxDistance);\n }\n // Exceeded maxDistance => abort\n return true;\n }\n posInCompositeBox += origBoxes[i].size;\n i++;\n return false;\n });\n });\n // Add the rest (hidden) boxes and sort by target\n stableSort(origBoxes, sortByTarget);\n return origBoxes;\n }\n RendererUtilities.distribute = distribute;\n})(RendererUtilities || (RendererUtilities = {}));\n/* *\n *\n * Default Export\n *\n * */\n/** @internal */\nexport default RendererUtilities;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Honsi\n *\n * A commercial license may be required depending on use.\n * See www.highcharts.com/license\n *\n *\n * */\n'use strict';\nimport Color from './Color.js';\nimport H from '../Globals.js';\nconst { charts } = H;\nimport PaletteDefaults from './PaletteDefaults.js';\nimport { diffObjects, extend, isString, objectEach, merge } from '../../Shared/Utilities.js';\n/* *\n *\n * Constants\n *\n * */\nconst defaultColors = [\n '#2caffe',\n '#544fc5',\n '#00e272',\n '#fe6a35',\n '#6b8abc',\n '#d568fb',\n '#2ee0ca',\n '#fa4b42',\n '#feb56a',\n '#91e8e1'\n];\nconst defaultDarkOverrideColors = [\n null, // Use the same color for the first item in dark mode\n '#00e272',\n '#efdf00'\n];\n/* *\n * Build the text content for the style tag\n */\nconst getStyles = (specifier, cssVars) => {\n const reduceToCSS = (\n // For browsers that don't support color-scheme and light-dark, we need\n // to first set the CSS variables as the light scheme.\n supportsColorScheme) => {\n let css = '';\n objectEach(cssVars.light, (value, key) => {\n css += supportsColorScheme && value !== cssVars.dark[key] ?\n ` ${key}: light-dark(${value}, ${cssVars.dark[key]});\\n` :\n ` ${key}: ${value};\\n`;\n });\n return css;\n };\n const legacy = reduceToCSS(), lightDark = reduceToCSS(true);\n const css = `${specifier || ':root'} {\n${legacy}\n}\n@supports (color: light-dark(#fff, #000)) {\n ${specifier || ':root'} {\n${lightDark}\n }\n}\n.highcharts-container {\n color-scheme: light dark;\n}\n.highcharts-light .highcharts-container {\n color-scheme: light;\n}\n.highcharts-dark .highcharts-container {\n color-scheme: dark;\n}`;\n return css;\n};\n/* *\n *\n * Class\n *\n * */\n/* eslint-disable valid-jsdoc */\n/**\n * A Palette class holding the palette colors and lifecycle methods for each\n * chart.\n *\n * @class\n * @name Highcharts.Palette\n *\n * @param {Highcharts.Chart} chart\n * The chart instance\n * @param {Highcharts.PaletteOptions} options\n * Palette options\n */\nexport default class Palette {\n /* *\n *\n * Constructor\n *\n * */\n constructor(renderer, options) {\n this.defaultOptions = PaletteDefaults;\n this.options = merge(PaletteDefaults);\n this.cssVars = { light: {}, dark: {} };\n this.renderer = renderer;\n this.update(options);\n }\n /**\n * Inject the CSS for the palette into the document head or chart\n * container.\n *\n * @internal\n *\n * @param {Highcharts.PaletteOptions} options\n * Palette options\n */\n injectCSS(options) {\n const { cssVars, renderer } = this, hasSpecificPalette = Object.keys(diffObjects(options, this.defaultOptions)).length > 0, colorCount = Math.max(options.colors?.length || 0, defaultColors.length);\n let colorScheme = 'light';\n const addKebab = (color, key) => {\n if (isString(color)) {\n // Kebab-case the key. Sequences of numbers should be kept\n // but with a preceding dash.\n key = key\n .replace(/([0-9]+)/g, '-$1')\n .replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`);\n cssVars[colorScheme][`--highcharts-${key}`] = color;\n }\n };\n for (const cScheme of ['light', 'dark']) {\n const paletteColors = options[cScheme] || {}, interpolated = {}, neutralColor = new Color(paletteColors?.neutralColor || ''), backgroundColor = new Color(paletteColors?.backgroundColor || ''), highlightColor = new Color(paletteColors?.highlightColor || '');\n colorScheme = cScheme;\n // Interpolate keys\n [3, 5, 10, 20, 40, 60, 80, 100].forEach((fraction) => {\n interpolated[`neutralColor${fraction}`] = backgroundColor\n .tweenTo(neutralColor, fraction / 100);\n interpolated[`highlightColor${fraction}`] = backgroundColor\n .tweenTo(highlightColor, fraction / 100);\n });\n // Extended data colors per scheme\n for (let i = 0; i < colorCount; i++) {\n const color = \n // 1. priority to scheme-specific colors\n paletteColors?.colors?.[i] ||\n // 2. then fall back to palette-level colors\n options.colors?.[i] ||\n // 3. then fall back to dark default colors\n (cScheme === 'dark' ? defaultDarkOverrideColors : [])?.[i] ||\n // 4. finally, use default colors\n defaultColors[i];\n addKebab(color || '#888a', `color${i}`);\n }\n // The rest are stored as named properties\n objectEach(paletteColors, addKebab);\n objectEach(interpolated, addKebab);\n // Default to the light scheme, the dark scheme doesn't define\n // all colors.\n if (cScheme === 'light') {\n extend(cssVars.dark, cssVars.light);\n }\n }\n // Add a style tag to the chart renderer box\n const defs = renderer.defs.element, specifier = hasSpecificPalette ?\n `*[data-highcharts-chart=\"${renderer.chartIndex}\"]` :\n '', style = defs\n .querySelector('style.highcharts-palette') ||\n renderer.box.ownerDocument.createElement('style');\n if (!style.parentNode) {\n style.nonce = 'highcharts';\n style.className = 'highcharts-palette';\n defs.appendChild(style);\n }\n style.textContent = getStyles(specifier, cssVars);\n }\n /**\n * Update the palette with new options. May be called directly as\n * `chart.palette.update()` or indirectly from `chart.update({ palette })`.\n *\n * @function Highcharts.Palette#update\n *\n * @param {Highcharts.PaletteOptions} options\n * New palette options\n */\n update(options) {\n const renderTo = this.renderer.box.parentElement, chart = charts?.[this.renderer.chartIndex];\n options = merge(true, this.options, options);\n if (chart) {\n chart.options.palette = options;\n }\n if (options.injectCSS !== false) {\n this.injectCSS(options);\n }\n if (renderTo) {\n if (isString(options.colorScheme) &&\n ['light', 'dark', 'inherit'].includes(options.colorScheme)) {\n renderTo.style.colorScheme = options.colorScheme;\n }\n else {\n renderTo.style.removeProperty('color-scheme');\n }\n }\n }\n}\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\nimport SVGElement from './SVGElement.js';\nimport { defined, extend, getAlignFactor, isNumber, merge, pick, removeEvent } from '../../../Shared/Utilities.js';\n/* *\n *\n * Class\n *\n * */\n/**\n * SVG label to render text.\n *\n * @class\n * @name Highcharts.SVGLabel\n * @augments Highcharts.SVGElement\n */\nclass SVGLabel extends SVGElement {\n /* *\n *\n * Constructor\n *\n * */\n constructor(renderer, str, x, y, shape, // @todo (SymbolKey|string),\n anchorX, anchorY, useHTML, baseline, className) {\n super(renderer, 'g');\n /** @internal */\n this.paddingLeftSetter = this.paddingSetter;\n /** @internal */\n this.paddingRightSetter = this.paddingSetter;\n /** @internal */\n this.doUpdate = false;\n this.textStr = str;\n this.x = x;\n this.y = y;\n this.anchorX = anchorX;\n this.anchorY = anchorY;\n this.baseline = baseline;\n this.className = className;\n this.addClass(className === 'button' ?\n 'highcharts-no-tooltip' :\n 'highcharts-label');\n if (className) {\n this.addClass('highcharts-' + className);\n }\n // Create the text element. An undefined text content prevents redundant\n // box calculation (#16121)\n this.text = renderer.text(void 0, 0, 0, useHTML).attr({ zIndex: 1 });\n // Validate the shape argument\n let hasBGImage;\n if (typeof shape === 'string') {\n hasBGImage = /^url\\((.*?)\\)$/.test(shape);\n if (hasBGImage || this.renderer.symbols[shape]) {\n this.symbolKey = shape;\n }\n }\n this.bBox = SVGLabel.emptyBBox;\n this.padding = 3;\n this.baselineOffset = 0;\n this.needsBox = renderer.styledMode || hasBGImage;\n this.deferredAttr = {};\n this.alignFactor = 0;\n }\n /* *\n *\n * Functions\n *\n * */\n /** @internal */\n alignSetter(value) {\n const alignFactor = getAlignFactor(value);\n this.textAlign = value;\n if (alignFactor !== this.alignFactor) {\n this.alignFactor = alignFactor;\n // Bounding box exists, means we're dynamically changing\n if (this.bBox && isNumber(this.xSetting)) {\n this.attr({ x: this.xSetting }); // #5134\n }\n this.updateTextPadding(); // #23595\n }\n }\n /** @internal */\n anchorXSetter(value, key) {\n this.anchorX = value;\n this.boxAttr(key, Math.round(value) - this.getCrispAdjust() - this.xSetting);\n }\n /** @internal */\n anchorYSetter(value, key) {\n this.anchorY = value;\n this.boxAttr(key, value - this.ySetting);\n }\n /**\n * Set a box attribute, or defer it, if the box is not yet created.\n * @internal\n */\n boxAttr(key, value) {\n if (this.box) {\n this.box.attr(key, value);\n }\n else {\n this.deferredAttr[key] = value;\n }\n }\n /**\n * Pick up some properties and apply them to the text instead of the\n * wrapper.\n * @internal\n */\n css(styles) {\n if (styles) {\n const textStyles = {};\n // Create a copy to avoid altering the original object\n // (#537)\n styles = merge(styles);\n SVGLabel.textProps.forEach((prop) => {\n if (typeof styles[prop] !== 'undefined') {\n textStyles[prop] = styles[prop];\n delete styles[prop];\n }\n });\n this.text.css(textStyles);\n // Update existing text, box (#9400, #12163, #18212, #23595)\n if ('fontSize' in textStyles ||\n 'fontWeight' in textStyles ||\n 'width' in textStyles) {\n this.updateTextPadding();\n }\n else if ('textOverflow' in textStyles) {\n this.updateBoxSize();\n }\n if ('color' in textStyles) {\n this.updateBackground();\n }\n }\n return SVGElement.prototype.css.call(this, styles);\n }\n /**\n * Destroy and release memory.\n * @internal\n */\n destroy() {\n // Added by button implementation\n removeEvent(this.element, 'mouseenter');\n removeEvent(this.element, 'mouseleave');\n if (this.text) {\n this.text.destroy();\n }\n if (this.box) {\n this.box = this.box.destroy();\n }\n // Call base implementation to destroy the rest\n SVGElement.prototype.destroy.call(this);\n return void 0;\n }\n /** @internal */\n fillSetter(value, key) {\n if (value) {\n this.needsBox = true;\n }\n // For animation getter (#6776)\n this.fill = value;\n this.boxAttr(key, value);\n }\n /**\n * Return the bounding box of the box, not the group.\n * @internal\n */\n getBBox(reload, rot) {\n // If we have a text string and the DOM bBox was 0, it typically means\n // that the label was first rendered hidden, so we need to update the\n // bBox (#15246)\n if ((this.textStr && this.bBox.width === 0 && this.bBox.height === 0) || this.rotation) {\n this.updateBoxSize();\n }\n const { padding, height = 0, translateX = 0, translateY = 0, width = 0 } = this, paddingLeft = pick(this.paddingLeft, padding), rotation = rot ?? (this.rotation || 0);\n let bBox = {\n width,\n height,\n x: translateX + this.bBox.x - paddingLeft,\n y: translateY + this.bBox.y - padding + this.baselineOffset\n };\n if (rotation) {\n bBox = this.getRotatedBox(bBox, rotation);\n }\n return bBox;\n }\n /** @internal */\n getCrispAdjust() {\n return (this.renderer.styledMode && this.box ?\n this.box.strokeWidth() :\n (this['stroke-width'] ?\n parseInt(this['stroke-width'], 10) :\n 0)) % 2 / 2;\n }\n /** @internal */\n heightSetter(value) {\n this.heightSetting = value;\n this.doUpdate = true;\n }\n /**\n * This method is executed in the end of `attr()`, after setting all\n * attributes in the hash. In can be used to efficiently consolidate\n * multiple attributes in one SVG property -- e.g., translate, rotate and\n * scale are merged in one \"transform\" attribute in the SVG node.\n * Also updating height or width should trigger update of the box size.\n *\n * @internal\n * @function Highcharts.SVGLabel#afterSetters\n */\n afterSetters() {\n super.afterSetters();\n if (this.doUpdate) {\n this.updateBoxSize();\n this.doUpdate = false;\n }\n this.updateBackground();\n }\n /**\n * After the text element is added, get the desired size of the border\n * box and add it before the text in the DOM.\n * @internal\n */\n onAdd() {\n this.text.add(this);\n this.attr({\n // Alignment is available now (#3295, 0 not rendered if given\n // as a value)\n text: pick(this.textStr, ''),\n x: this.x || 0,\n y: this.y || 0\n });\n if (this.box && defined(this.anchorX)) {\n this.attr({\n anchorX: this.anchorX,\n anchorY: this.anchorY\n });\n }\n }\n /** @internal */\n paddingSetter(value, key) {\n if (!isNumber(value)) {\n this[key] = void 0;\n }\n else if (value !== this[key]) {\n this[key] = value;\n this.updateTextPadding();\n }\n }\n /** @internal */\n rSetter(value, key) {\n this.boxAttr(key, value);\n }\n /** @internal */\n strokeSetter(value, key) {\n // For animation getter (#6776)\n this.stroke = value;\n this.boxAttr(key, value);\n }\n /** @internal */\n 'stroke-widthSetter'(value, key) {\n if (value) {\n this.needsBox = true;\n }\n this['stroke-width'] = value;\n this.boxAttr(key, value);\n }\n /** @internal */\n 'text-alignSetter'(value) {\n // The text-align variety is for the pre-animation getter. The code\n // should be unified to either textAlign or text-align.\n this.textAlign = this['text-align'] = value;\n this.updateTextPadding();\n }\n /** @internal */\n textSetter(text) {\n if (typeof text !== 'undefined') {\n // Must use .attr to ensure transforms are done (#10009)\n this.text.attr({ text });\n }\n this.updateTextPadding();\n this.reAlign();\n }\n updateBackground() {\n if (this.fill === 'contrast') {\n this.box?.attr({\n fill: this.renderer.getContrast(this.text.styles.color || '#000'),\n 'fill-opacity': 0.65\n });\n }\n }\n /**\n * This function runs after the label is added to the DOM (when the bounding\n * box is available), and after the text of the label is updated to detect\n * the new bounding box and reflect it in the border box.\n * @internal\n */\n updateBoxSize() {\n const text = this.text, attribs = {}, padding = this.padding, \n // #12165 error when width is null (auto)\n // #12163 when fontweight: bold, recalculate bBox without cache\n // #3295 && 3514 box failure when string equals 0\n bBox = this.bBox = (((!isNumber(this.widthSetting) ||\n !isNumber(this.heightSetting) ||\n this.textAlign) && defined(text.textStr)) ?\n text.getBBox(void 0, 0) :\n SVGLabel.emptyBBox);\n let crispAdjust;\n this.width = this.getPaddedWidth();\n this.height = (this.heightSetting || bBox.height || 0) + 2 * padding;\n const metrics = this.renderer.fontMetrics(text);\n // Update the label-scoped y offset. Math.min because of inline\n // style (#9400)\n this.baselineOffset = padding + Math.min(\n // When applicable, use the font size of the first line (#15707)\n (this.text.firstLineMetrics || metrics).b, \n // When the height is 0, there is no bBox, so go with the font\n // metrics. Highmaps CSS demos.\n bBox.height || Infinity);\n // #15491: Vertical centering\n if (this.heightSetting) {\n this.baselineOffset += (this.heightSetting - metrics.h) / 2;\n }\n if (this.needsBox && !text.textPath) {\n // Create the border box if it is not already present\n if (!this.box) {\n // Symbol definition exists (#5324)\n const box = this.box = this.symbolKey ?\n this.renderer.symbol(this.symbolKey) :\n this.renderer.rect();\n box.addClass(// Don't use label className for buttons\n (this.className === 'button' ?\n '' : 'highcharts-label-box') +\n (this.className ?\n ' highcharts-' + this.className + '-box' : ''));\n box.add(this);\n }\n crispAdjust = this.getCrispAdjust();\n attribs.x = crispAdjust;\n attribs.y = ((this.baseline ? -this.baselineOffset : 0) + crispAdjust);\n // Apply the box attributes\n attribs.width = Math.round(this.width);\n attribs.height = Math.round(this.height);\n this.box.attr(extend(attribs, this.deferredAttr));\n this.deferredAttr = {};\n }\n }\n /**\n * This function runs after setting text or padding, but only if padding\n * is changed.\n * @internal\n */\n updateTextPadding() {\n const text = this.text, textAlign = text.styles.textAlign || this.textAlign;\n if (!text.textPath) {\n this.updateBoxSize();\n // Determine y based on the baseline\n const textY = this.baseline ? 0 : this.baselineOffset, textX = (this.paddingLeft ?? this.padding) +\n // Compensate for alignment\n getAlignFactor(textAlign) * (this.widthSetting ?? this.bBox.width);\n // Update if anything changed\n if (textX !== text.x || textY !== text.y) {\n text.attr({\n align: textAlign,\n x: textX\n });\n if (typeof textY !== 'undefined') {\n text.attr('y', textY);\n }\n }\n // Record current values\n text.x = textX;\n text.y = textY;\n }\n }\n /** @internal */\n widthSetter(value) {\n // `width:auto` => null\n this.widthSetting = isNumber(value) ? value : void 0;\n this.doUpdate = true;\n }\n /** @internal */\n getPaddedWidth() {\n const padding = this.padding;\n const paddingLeft = pick(this.paddingLeft, padding);\n const paddingRight = pick(this.paddingRight, padding);\n return ((this.widthSetting || this.bBox.width || 0) +\n paddingLeft +\n paddingRight);\n }\n /** @internal */\n xSetter(value) {\n this.x = value; // For animation getter\n if (this.alignFactor) {\n value -= this.alignFactor * this.getPaddedWidth();\n // Force animation even when setting to the same value (#7898)\n this['forceAnimate:x'] = true;\n }\n if (this.anchorX) {\n // #22907, force anchorX to animate after x set\n this['forceAnimate:anchorX'] = true;\n }\n this.xSetting = Math.round(value);\n this.attr('translateX', this.xSetting);\n }\n /** @internal */\n ySetter(value) {\n if (this.anchorY) {\n // #22907, force anchorY to animate after y set\n this['forceAnimate:anchorY'] = true;\n }\n this.ySetting = this.y = Math.round(value);\n this.attr('translateY', this.ySetting);\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/** @internal */\nSVGLabel.emptyBBox = {\n width: 0,\n height: 0,\n x: 0,\n y: 0\n};\n/**\n * For labels, these CSS properties are applied to the `text` node directly.\n *\n * @internal\n * @name Highcharts.SVGLabel#textProps\n * @type {Array<string>}\n */\nSVGLabel.textProps = [\n 'color', 'direction', 'fontFamily', 'fontSize', 'fontStyle',\n 'fontWeight', 'lineClamp', 'lineHeight', 'textAlign', 'textDecoration',\n 'textOutline', 'textOverflow', 'whiteSpace', 'width'\n];\n/* *\n *\n * Default Export\n *\n * */\nexport default SVGLabel;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport { defined, isNumber, pick } from '../../../Shared/Utilities.js';\n/* *\n *\n * Functions\n *\n * */\n/* eslint-disable require-jsdoc, valid-jsdoc */\n/**\n * Arc symbol path.\n *\n * @param {number} cx\n * Center X\n * @param {number} cy\n * Center Y\n * @param {number} w\n * Width\n * @param {number} h\n * Height\n * @param {Highcharts.SymbolOptions} [options]\n * Options\n * @return {Highcharts.SVGPathArray}\n * Path\n */\nfunction arc(cx, cy, w, h, options) {\n const arc = [];\n if (options) {\n let start = options.start || 0, end = options.end || 0;\n const rx = pick(options.r, w), ry = pick(options.r, h || w), \n // Subtract a small number to prevent cos and sin of start and end\n // from becoming equal on 360 arcs (#1561). See \"Arc proximity\"\n // tests at samples/unit-tests/svgrenderer/symbol/demo.js\n proximity = 0.0001, fullCircle = (Math.abs(end - start - 2 * Math.PI) <\n proximity);\n if (fullCircle) {\n start = Math.PI / 2;\n end = Math.PI * 2.5 - proximity;\n }\n const innerRadius = options.innerR, open = pick(options.open, fullCircle), cosStart = fullCircle ? 0 : Math.cos(start), sinStart = fullCircle ? 1 : Math.sin(start), cosEnd = fullCircle ? 0 : Math.cos(end), sinEnd = fullCircle ? 1 : Math.sin(end), \n // Proximity takes care of rounding errors around PI (#6971)\n longArc = pick(options.longArc, end - start - Math.PI < proximity ? 0 : 1);\n let arcSegment = [\n 'A', // ArcTo\n rx, // X radius\n ry, // Y radius\n 0, // Slanting\n longArc, // Long or short arc\n pick(options.clockwise, 1), // Clockwise\n // Use a static pixel offset for full circle (#21701)\n cx + (fullCircle ? 0.001 : rx * cosEnd),\n cy + ry * sinEnd\n ];\n arcSegment.params = { start, end, cx, cy }; // Memo for border radius\n arc.push([\n 'M',\n cx + rx * cosStart,\n cy + ry * sinStart\n ], arcSegment);\n if (defined(innerRadius)) {\n arcSegment = [\n 'A', // ArcTo\n innerRadius, // X radius\n innerRadius, // Y radius\n 0, // Slanting\n longArc, // Long or short arc\n // Clockwise - opposite to the outer arc clockwise\n defined(options.clockwise) ? 1 - options.clockwise : 0,\n cx + (fullCircle ? -0.001 : innerRadius * cosStart),\n cy + innerRadius * sinStart\n ];\n // Memo for border radius\n arcSegment.params = {\n start: end,\n end: start,\n cx,\n cy\n };\n arc.push(open ?\n [\n 'M',\n cx + innerRadius * cosEnd,\n cy + innerRadius * sinEnd\n ] : [\n 'L',\n cx + innerRadius * cosEnd,\n cy + innerRadius * sinEnd\n ], arcSegment);\n }\n if (!open) {\n arc.push(['Z']);\n }\n }\n return arc;\n}\n/**\n * Callout shape used for default tooltips.\n *\n * @param {number} x\n * Center X\n * @param {number} y\n * Center Y\n * @param {number} w\n * Width\n * @param {number} h\n * Height\n * @param {Highcharts.SymbolOptions} [options]\n * Options\n * @return {Highcharts.SVGPathArray}\n * Path\n */\nfunction callout(x, y, w, h, options) {\n const arrowLength = 6, halfDistance = 6, r = Math.min((options?.r) || 0, w, h), safeDistance = r + halfDistance, anchorX = options?.anchorX, anchorY = options?.anchorY || 0;\n const path = roundedRect(x, y, w, h, { r });\n if (!isNumber(anchorX)) {\n return path;\n }\n // Do not render a connector, if anchor starts inside the label\n if (anchorX < w && anchorX > 0 && anchorY < h && anchorY > 0) {\n return path;\n }\n // Anchor on right side\n if (x + anchorX > w - safeDistance) {\n // Chevron\n if (anchorY > y + safeDistance &&\n anchorY < y + h - safeDistance) {\n path.splice(3, 1, ['L', x + w, anchorY - halfDistance], ['L', x + w + arrowLength, anchorY], ['L', x + w, anchorY + halfDistance], ['L', x + w, y + h - r]);\n // Simple connector\n }\n else {\n if (anchorX < w) { // Corner connector\n const isTopCorner = anchorY < y + safeDistance, cornerY = isTopCorner ? y : y + h, sliceStart = isTopCorner ? 2 : 5;\n path.splice(sliceStart, 0, ['L', anchorX, anchorY], ['L', x + w - r, cornerY]);\n }\n else { // Side connector\n path.splice(3, 1, ['L', x + w, h / 2], ['L', anchorX, anchorY], ['L', x + w, h / 2], ['L', x + w, y + h - r]);\n }\n }\n // Anchor on left side\n }\n else if (x + anchorX < safeDistance) {\n // Chevron\n if (anchorY > y + safeDistance &&\n anchorY < y + h - safeDistance) {\n path.splice(7, 1, ['L', x, anchorY + halfDistance], ['L', x - arrowLength, anchorY], ['L', x, anchorY - halfDistance], ['L', x, y + r]);\n // Simple connector\n }\n else {\n if (anchorX > 0) { // Corner connector\n const isTopCorner = anchorY < y + safeDistance, cornerY = isTopCorner ? y : y + h, sliceStart = isTopCorner ? 1 : 6;\n path.splice(sliceStart, 0, ['L', anchorX, anchorY], ['L', x + r, cornerY]);\n }\n else { // Side connector\n path.splice(7, 1, ['L', x, h / 2], ['L', anchorX, anchorY], ['L', x, h / 2], ['L', x, y + r]);\n }\n }\n }\n else if ( // Replace bottom\n anchorY > h &&\n anchorX < w - safeDistance) {\n path.splice(5, 1, ['L', anchorX + halfDistance, y + h], ['L', anchorX, y + h + arrowLength], ['L', anchorX - halfDistance, y + h], ['L', x + r, y + h]);\n }\n else if ( // Replace top\n anchorY < 0 &&\n anchorX > safeDistance) {\n path.splice(1, 1, ['L', anchorX - halfDistance, y], ['L', anchorX, y - arrowLength], ['L', anchorX + halfDistance, y], ['L', w - r, y]);\n }\n return path;\n}\n/**\n * Circle symbol path.\n *\n * @param {number} x\n * X coordinate\n * @param {number} y\n * Y coordinate\n * @param {number} w\n * Width\n * @param {number} h\n * Height\n * @return {Highcharts.SVGPathArray}\n * Path\n */\nfunction circle(x, y, w, h) {\n // Return a full arc\n return arc(x + w / 2, y + h / 2, w / 2, h / 2, {\n start: Math.PI * 0.5,\n end: Math.PI * 2.5,\n open: false\n });\n}\n/**\n * Diamond symbol path.\n *\n * @param {number} x\n * X coordinate\n * @param {number} y\n * Y coordinate\n * @param {number} w\n * Width\n * @param {number} h\n * Height\n * @return {Highcharts.SVGPathArray}\n * Path\n */\nfunction diamond(x, y, w, h) {\n return [\n ['M', x + w / 2, y],\n ['L', x + w, y + h / 2],\n ['L', x + w / 2, y + h],\n ['L', x, y + h / 2],\n ['Z']\n ];\n}\n// #15291\n/**\n * Rect symbol path.\n *\n * @param {number} x\n * X coordinate\n * @param {number} y\n * Y coordinate\n * @param {number} w\n * Width\n * @param {number} h\n * Height\n * @param {Highcharts.SymbolOptions} [options]\n * Options\n * @return {Highcharts.SVGPathArray}\n * Path\n */\nfunction rect(x, y, w, h, options) {\n if (options?.r) {\n return roundedRect(x, y, w, h, options);\n }\n return [\n ['M', x, y],\n ['L', x + w, y],\n ['L', x + w, y + h],\n ['L', x, y + h],\n ['Z']\n ];\n}\n/**\n * Rounded rectangle symbol path.\n *\n * @param {number} x\n * X coordinate\n * @param {number} y\n * Y coordinate\n * @param {number} w\n * Width\n * @param {number} h\n * Height\n * @param {Highcharts.SymbolOptions} [options]\n * Options\n * @return {Highcharts.SVGPathArray}\n * Path\n */\nfunction roundedRect(x, y, w, h, options) {\n const r = options?.r || 0;\n return [\n ['M', x + r, y],\n ['L', x + w - r, y], // Top side\n ['A', r, r, 0, 0, 1, x + w, y + r], // Top-right corner\n ['L', x + w, y + h - r], // Right side\n ['A', r, r, 0, 0, 1, x + w - r, y + h], // Bottom-right corner\n ['L', x + r, y + h], // Bottom side\n ['A', r, r, 0, 0, 1, x, y + h - r], // Bottom-left corner\n ['L', x, y + r], // Left side\n ['A', r, r, 0, 0, 1, x + r, y],\n ['Z'] // Top-left corner\n ];\n}\n/**\n * Triangle symbol path.\n *\n * @param {number} x\n * X coordinate\n * @param {number} y\n * Y coordinate\n * @param {number} w\n * Width\n * @param {number} h\n * Height\n * @return {Highcharts.SVGPathArray}\n * Path\n */\nfunction triangle(x, y, w, h) {\n return [\n ['M', x + w / 2, y],\n ['L', x + w, y + h],\n ['L', x, y + h],\n ['Z']\n ];\n}\n/**\n * Inverted triangle symbol path.\n *\n * @param {number} x\n * X coordinate\n * @param {number} y\n * Y coordinate\n * @param {number} w\n * Width\n * @param {number} h\n * Height\n * @return {Highcharts.SVGPathArray}\n * Path\n */\nfunction triangleDown(x, y, w, h) {\n return [\n ['M', x, y],\n ['L', x + w, y],\n ['L', x + w / 2, y + h],\n ['Z']\n ];\n}\nconst Symbols = {\n /**\n * Arc symbol path.\n *\n * @param {number} cx\n * Center X\n * @param {number} cy\n * Center Y\n * @param {number} w\n * Width\n * @param {number} h\n * Height\n * @param {Highcharts.SymbolOptions} [options]\n * Options\n * @return {Highcharts.SVGPathArray}\n * Path\n */\n arc,\n /**\n * Callout shape used for default tooltips.\n *\n * @param {number} cx\n * Center X\n * @param {number} cy\n * Center Y\n * @param {number} w\n * Width\n * @param {number} h\n * Height\n * @param {Highcharts.SymbolOptions} [options]\n * Options\n * @return {Highcharts.SVGPathArray}\n * Path\n */\n callout,\n /**\n * Circle symbol path.\n *\n * @param {number} x\n * X coordinate\n * @param {number} y\n * Y coordinate\n * @param {number} w\n * Width\n * @param {number} h\n * Height\n * @return {Highcharts.SVGPathArray}\n * Path\n */\n circle,\n /**\n * Diamond symbol path.\n *\n * @param {number} x\n * X coordinate\n * @param {number} y\n * Y coordinate\n * @param {number} w\n * Width\n * @param {number} h\n * Height\n * @return {Highcharts.SVGPathArray}\n * Path\n */\n diamond,\n /**\n * Rect symbol path.\n *\n * @param {number} x\n * X coordinate\n * @param {number} y\n * Y coordinate\n * @param {number} w\n * Width\n * @param {number} h\n * Height\n * @param {Highcharts.SymbolOptions} [options]\n * Options\n * @return {Highcharts.SVGPathArray}\n * Path\n */\n rect,\n /**\n * Rounded rectangle symbol path.\n *\n * @param {number} x\n * X coordinate\n * @param {number} y\n * Y coordinate\n * @param {number} w\n * Width\n * @param {number} h\n * Height\n * @param {Highcharts.SymbolOptions} [options]\n * Options\n * @return {Highcharts.SVGPathArray}\n * Path\n */\n roundedRect,\n /**\n * Rect symbol path.\n *\n * @param {number} x\n * X coordinate\n * @param {number} y\n * Y coordinate\n * @param {number} w\n * Width\n * @param {number} h\n * Height\n * @param {Highcharts.SymbolOptions} [options]\n * Options\n * @return {Highcharts.SVGPathArray}\n * Path\n */\n square: rect,\n /**\n * Triangle symbol path.\n *\n * @param {number} x\n * X coordinate\n * @param {number} y\n * Y coordinate\n * @param {number} w\n * Width\n * @param {number} h\n * Height\n * @return {Highcharts.SVGPathArray}\n * Path\n */\n triangle,\n /**\n * Inverted triangle symbol path.\n *\n * @param {number} x\n * X coordinate\n * @param {number} number\n * Y coordinate\n * @param {number} w\n * Width\n * @param {number} h\n * Height\n * @return {Highcharts.SVGPathArray}\n * Path\n */\n 'triangle-down': triangleDown\n};\n/* *\n *\n * Default Export\n *\n * */\nexport default Symbols;\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * @interface Highcharts.SymbolOptions\n */ /**\n* @name anchorX\n* @type {number|undefined}\n*/ /**\n* @name anchorY\n* @type {number|undefined}\n*/ /**\n* @name backgroundSize\n* @type {\"contain\"|\"cover\"|\"within\"}\n*/ /**\n* @name clockwise\n* @type {0|1|undefined}\n*/ /**\n* @name context\n* @type {string|undefined}\n*/ /**\n* @name end\n* @type {number|undefined}\n*/ /**\n* @name height\n* @type {number|undefined}\n*/ /**\n* @name innerR\n* @type {number|undefined}\n*/ /**\n* @name longArc\n* @type {0|1|undefined}\n*/ /**\n* @name open\n* @type {boolean|undefined}\n*/ /**\n* @name r\n* @type {number|undefined}\n*/ /**\n* @name start\n* @type {number|undefined}\n*/ /**\n* @name width\n* @type {number|undefined}\n*/ /**\n* @name x\n* @type {number|undefined}\n*/ /**\n* @name y\n* @type {number|undefined}\n*/\n''; // Keeps doclets above in file\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport AST from '../HTML/AST.js';\nimport H from '../../Globals.js';\nconst { doc, SVG_NS, win } = H;\nimport { attr, extend, fireEvent, isString, objectEach, pick } from '../../../Shared/Utilities.js';\n// Function used to test string length including an ellipsis\nconst stringWithEllipsis = (text, currentIndex) => text.substring(0, currentIndex) + '\\u2026';\n/* *\n *\n * Class\n *\n * */\n/**\n * SVG Text Builder\n * @internal\n * @class\n * @name Highcharts.TextBuilder\n */\nclass TextBuilder {\n /**\n * Constructs a new TextBuilder instance.\n * @internal\n */\n constructor(svgElement) {\n const textStyles = svgElement.styles;\n this.renderer = svgElement.renderer;\n this.svgElement = svgElement;\n this.width = svgElement.textWidth;\n this.textLineHeight = textStyles?.lineHeight;\n this.textOutline = textStyles?.textOutline;\n this.ellipsis = Boolean(textStyles?.textOverflow === 'ellipsis');\n this.lineClamp = textStyles?.lineClamp;\n this.noWrap = Boolean(textStyles?.whiteSpace === 'nowrap');\n }\n /**\n * Build an SVG representation of the pseudo HTML given in the object's\n * svgElement.\n *\n * @internal\n */\n buildSVG() {\n const wrapper = this.svgElement, textNode = wrapper.element, renderer = wrapper.renderer, textStr = pick(wrapper.textStr, '').toString(), hasMarkup = textStr.indexOf('<') !== -1, childNodes = textNode.childNodes, tempParent = !wrapper.added && renderer.box, regexMatchBreaks = /<br.*?>/g, \n // The buildText code is quite heavy, so if we're not changing\n // something that affects the text, skip it (#6113).\n textCache = [\n textStr,\n this.ellipsis,\n this.noWrap,\n this.textLineHeight,\n this.textOutline,\n wrapper.getStyle('font-size'),\n wrapper.styles.lineClamp,\n this.width\n ].join(',');\n if (textCache === wrapper.textCache) {\n return;\n }\n wrapper.textCache = textCache;\n delete wrapper.actualWidth;\n // Remove old text\n for (let i = childNodes.length; i--;) {\n textNode.removeChild(childNodes[i]);\n }\n // Simple strings, add text directly and return\n if (!hasMarkup &&\n !this.ellipsis &&\n !this.width &&\n !wrapper.textPath &&\n (textStr.indexOf(' ') === -1 ||\n (this.noWrap && !regexMatchBreaks.test(textStr)))) {\n textNode.appendChild(doc.createTextNode(this.unescapeEntities(textStr)));\n // Complex strings, add more logic\n }\n else if (textStr !== '') {\n if (tempParent) {\n // Attach it to the DOM to read offset width and font size\n tempParent.appendChild(textNode);\n }\n // Step 1. Parse the markup safely and directly into a tree\n // structure.\n const ast = new AST(textStr);\n // Step 2. Do as many as we can of the modifications to the tree\n // structure before it is added to the DOM\n this.modifyTree(ast.nodes);\n ast.addToDOM(textNode);\n // Step 3. Some modifications can't be done until the structure is\n // in the DOM, because we need to read computed metrics.\n this.modifyDOM();\n // Add title if an ellipsis was added\n if (this.ellipsis &&\n (textNode.textContent || '').indexOf('\\u2026') !== -1) {\n wrapper.attr('title', this.unescapeEntities(wrapper.textStr || '', ['&lt;', '&gt;']) // #7179\n );\n }\n if (tempParent) {\n tempParent.removeChild(textNode);\n }\n }\n // Apply the text outline\n if (isString(this.textOutline) && wrapper.applyTextOutline) {\n wrapper.applyTextOutline(this.textOutline);\n }\n }\n /**\n * Modify the DOM of the generated SVG structure. This function only does\n * operations that cannot be done until the elements are attached to the\n * DOM, like doing layout based on rendered metrics of the added elements.\n * @internal\n */\n modifyDOM() {\n const wrapper = this.svgElement;\n const x = attr(wrapper.element, 'x');\n wrapper.firstLineMetrics = void 0;\n // Remove empty tspans (including breaks) from the beginning because\n // SVG's getBBox doesn't count empty lines. The use case is tooltip\n // where the header is empty. By doing this in the DOM rather than in\n // the AST, we can inspect the textContent directly and don't have to\n // recurse down to look for valid content.\n let firstChild;\n while ((firstChild = wrapper.element.firstChild)) {\n if (/^[\\s\\u200B]*$/.test(firstChild.textContent || ' ')) {\n wrapper.element.removeChild(firstChild);\n }\n else {\n break;\n }\n }\n // Modify hard line breaks by applying the rendered line height\n [].forEach.call(wrapper.element.querySelectorAll('tspan.highcharts-br'), (br, i) => {\n if (br.nextSibling && br.previousSibling) { // #5261\n if (i === 0 && br.previousSibling.nodeType === 1) {\n wrapper.firstLineMetrics = wrapper.renderer\n .fontMetrics(br.previousSibling);\n }\n attr(br, {\n // Since the break is inserted in front of the next\n // line, we need to use the next sibling for the line\n // height\n dy: this.getLineHeight(br.nextSibling),\n x\n });\n }\n });\n // Constrain the line width, either by ellipsis or wrapping\n const width = this.width || 0;\n if (!width) {\n return;\n }\n // Insert soft line breaks into each text node\n const modifyTextNode = (textNode, parentElement) => {\n const text = textNode.textContent || '';\n const words = text\n .replace(/([^\\^])-/g, '$1- ') // Split on hyphens\n // .trim()\n .split(' '); // #1273\n const hasWhiteSpace = !this.noWrap && (words.length > 1 || wrapper.element.childNodes.length > 1);\n const dy = this.getLineHeight(parentElement), ellipsisWidth = Math.max(0, \n // Subtract the font face to make room for\n // the ellipsis itself\n width - 0.8 * dy);\n let lineNo = 0;\n let startAt = wrapper.actualWidth;\n if (hasWhiteSpace) {\n const lines = [];\n // Remove preceding siblings in order to make the text length\n // calculation correct in the truncate function\n const precedingSiblings = [];\n while (parentElement.firstChild &&\n parentElement.firstChild !== textNode) {\n precedingSiblings.push(parentElement.firstChild);\n parentElement.removeChild(parentElement.firstChild);\n }\n while (words.length) {\n // Apply the previous line\n if (words.length && !this.noWrap && lineNo > 0) {\n lines.push(textNode.textContent || '');\n textNode.textContent = words.join(' ')\n .replace(/- /g, '-');\n }\n // For each line, truncate the remaining\n // words into the line length.\n this.truncate(textNode, void 0, words, lineNo === 0 ? (startAt || 0) : 0, width, ellipsisWidth, \n // Build the text to test for\n (t, currentIndex) => words\n .slice(0, currentIndex)\n .join(' ')\n .replace(/- /g, '-'));\n startAt = wrapper.actualWidth;\n lineNo++;\n // Line clamp. Break out after n lines and append an\n // ellipsis regardless of the text length.\n if (this.lineClamp && lineNo >= this.lineClamp) {\n // Only if there are remaining words that should have\n // been rendered.\n if (words.length) {\n this.truncate(textNode, textNode.textContent || '', void 0, 0, \n // Target width\n width, ellipsisWidth, stringWithEllipsis);\n textNode.textContent = textNode.textContent\n ?.replace('\\u2026', '') + '\\u2026';\n }\n break;\n }\n }\n // Reinsert the preceding child nodes\n precedingSiblings.forEach((childNode) => {\n parentElement.insertBefore(childNode, textNode);\n });\n // Insert the previous lines before the original text node\n lines.forEach((line) => {\n // Insert the line\n parentElement.insertBefore(doc.createTextNode(line), textNode);\n // Insert a break\n const br = doc.createElementNS(SVG_NS, 'tspan');\n br.textContent = '\\u200B'; // Zero-width space\n attr(br, { dy, x });\n parentElement.insertBefore(br, textNode);\n });\n }\n else if (this.ellipsis) {\n if (text) {\n this.truncate(textNode, text, void 0, 0, \n // Target width\n width, ellipsisWidth, stringWithEllipsis);\n }\n }\n };\n // Recurse down the DOM tree and handle line breaks for each text node\n const modifyChildren = ((node) => {\n const childNodes = [].slice.call(node.childNodes);\n childNodes.forEach((childNode) => {\n if (childNode.nodeType === win.Node.TEXT_NODE) {\n modifyTextNode(childNode, node);\n }\n else {\n // Reset word-wrap width readings after hard breaks\n if (childNode.className.baseVal\n .indexOf('highcharts-br') !== -1) {\n wrapper.actualWidth = 0;\n }\n // Recurse down to child node\n modifyChildren(childNode);\n }\n });\n });\n modifyChildren(wrapper.element);\n }\n /**\n * Get the rendered line height of a <text>, <tspan> or pure text node.\n * @internal\n * @param {DOMElementType|Text} node\n * The node to check for.\n * @return {number}\n * The rendered line height.\n */\n getLineHeight(node) {\n // If the node is a text node, use its parent\n const element = (node.nodeType === win.Node.TEXT_NODE) ?\n node.parentElement :\n node;\n return this.textLineHeight ?\n parseInt(this.textLineHeight.toString(), 10) :\n this.renderer.fontMetrics(element || this.svgElement.element).h;\n }\n /**\n * Transform a pseudo HTML AST node tree into an SVG structure. We do as\n * much heavy lifting as we can here, before doing the final processing in\n * the modifyDOM function. The original data is mutated.\n *\n * @param {ASTNode[]} nodes The AST nodes\n */\n modifyTree(nodes) {\n const modifyChild = (node, i) => {\n const { attributes = {}, children, style = {}, tagName } = node, styledMode = this.renderer.styledMode;\n // Apply styling to text tags\n if (tagName === 'b' || tagName === 'strong') {\n if (styledMode) {\n // eslint-disable-next-line dot-notation\n attributes['class'] = 'highcharts-strong';\n }\n else {\n style.fontWeight = 'bold';\n }\n }\n else if (tagName === 'i' || tagName === 'em') {\n if (styledMode) {\n // eslint-disable-next-line dot-notation\n attributes['class'] = 'highcharts-emphasized';\n }\n else {\n style.fontStyle = 'italic';\n }\n }\n // Modify styling\n if (style?.color) {\n style.fill = style.color;\n }\n // Handle breaks\n if (tagName === 'br') {\n attributes['class'] = 'highcharts-br'; // eslint-disable-line dot-notation\n node.textContent = '\\u200B'; // Zero-width space\n // Trim whitespace off the beginning of new lines\n const nextNode = nodes[i + 1];\n if (nextNode?.textContent) {\n nextNode.textContent =\n nextNode.textContent.replace(/^ +/gm, '');\n }\n // If an anchor has direct text node children, the text is unable to\n // wrap because there is no `getSubStringLength` function on the\n // element. Therefore we need to wrap the child text node or nodes\n // in a tspan. #16173.\n }\n else if (tagName === 'a' &&\n children &&\n children.some((child) => child.tagName === '#text')) {\n node.children = [{ children, tagName: 'tspan' }];\n }\n if (tagName !== '#text' && tagName !== 'a') {\n node.tagName = 'tspan';\n }\n extend(node, { attributes, style });\n // Recurse\n if (children) {\n children\n .filter((c) => c.tagName !== '#text')\n .forEach(modifyChild);\n }\n };\n nodes.forEach(modifyChild);\n fireEvent(this.svgElement, 'afterModifyTree', { nodes });\n }\n /*\n * Truncate the text node contents to a given length. Used when the css\n * width is set. If the `textOverflow` is `ellipsis`, the text is truncated\n * character by character to the given length. If not, the text is\n * word-wrapped line by line.\n */\n truncate(textNode, text, words, startAt, width, ellipsisWidth, getString) {\n const svgElement = this.svgElement;\n const { rotation } = svgElement;\n // Cache the lengths to avoid checking the same twice\n const lengths = [];\n // Word wrap cannot be truncated to shorter than one word, ellipsis\n // text can be completely blank.\n let minIndex = words && !startAt ? 1 : 0;\n let maxIndex = (text || words || '').length;\n let currentIndex = maxIndex;\n let str;\n let actualWidth;\n if (!words) {\n width = ellipsisWidth;\n }\n const getSubStringLength = function (charEnd, concatenatedEnd) {\n // `charEnd` is used when finding the character-by-character\n // break for ellipsis, concatenatedEnd is used for word-by-word\n // break for word wrapping.\n const end = concatenatedEnd || charEnd;\n const parentNode = textNode.parentNode;\n if (parentNode && typeof lengths[end] === 'undefined') {\n // Modern browsers\n if (parentNode.getSubStringLength) {\n // Fails with DOM exception on unit-tests/legend/members\n // of unknown reason. Desired width is 0, text content\n // is \"5\" and end is 1.\n try {\n lengths[end] = startAt +\n parentNode.getSubStringLength(0, words ? end + 1 : end);\n }\n catch {\n // Ignore error\n }\n }\n }\n return lengths[end];\n };\n svgElement.rotation = 0; // Discard rotation when computing box\n actualWidth = getSubStringLength(textNode.textContent.length);\n if (startAt + actualWidth > width) {\n // Do a binary search for the index where to truncate the text\n while (minIndex <= maxIndex) {\n currentIndex = Math.ceil((minIndex + maxIndex) / 2);\n // When checking words for word-wrap, we need to build the\n // string and measure the subStringLength at the concatenated\n // word length.\n if (words) {\n str = getString(words, currentIndex);\n }\n actualWidth = getSubStringLength(currentIndex, str && str.length - 1);\n if (minIndex === maxIndex) {\n // Complete\n minIndex = maxIndex + 1;\n }\n else if (actualWidth > width) {\n // Too large. Set max index to current.\n maxIndex = currentIndex - 1;\n }\n else {\n // Within width. Set min index to current.\n minIndex = currentIndex;\n }\n }\n // If max index was 0 it means the shortest possible text was also\n // too large. For ellipsis that means only the ellipsis, while for\n // word wrap it means the whole first word.\n if (maxIndex === 0) {\n // Remove ellipsis\n textNode.textContent = '';\n // If the new text length is one less than the original, we don't\n // need the ellipsis\n }\n else if (!(text && maxIndex === text.length - 1)) {\n textNode.textContent = str || getString(text || words, currentIndex);\n }\n // Add ellipsis on individual lines\n if (this.ellipsis && actualWidth > width) {\n this.truncate(textNode, textNode.textContent || '', void 0, 0, width, ellipsisWidth, stringWithEllipsis);\n }\n }\n // When doing line wrapping, prepare for the next line by removing the\n // items from this line.\n if (words) {\n words.splice(0, currentIndex);\n }\n svgElement.actualWidth = actualWidth;\n svgElement.rotation = rotation; // Apply rotation again.\n }\n /**\n * Un-escape HTML entities based on the public `renderer.escapes` list\n *\n * @param {string} inputStr\n * The string to unescape\n *\n * @param {Array<string>} [except]\n * Exceptions\n *\n * @return {string}\n * The processed string\n */\n unescapeEntities(inputStr, except) {\n objectEach(this.renderer.escapes, function (value, key) {\n if (!except || except.indexOf(value) === -1) {\n inputStr = inputStr.toString().replace(new RegExp(value, 'g'), key);\n }\n });\n return inputStr;\n }\n}\n/** @internal */\nexport default TextBuilder;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport AST from '../HTML/AST.js';\nimport D from '../../Defaults.js';\nconst { defaultOptions } = D;\nimport Color from '../../Color/Color.js';\nimport H from '../../Globals.js';\nconst { charts, deg2rad, doc, isFirefox, isMS, isWebKit, noop, SVG_NS, symbolSizes, win } = H;\nimport Palette from '../../Color/Palette';\nimport SVGElement from './SVGElement.js';\nimport SVGLabel from './SVGLabel.js';\nimport Symbols from './Symbols.js';\nimport TextBuilder from './TextBuilder.js';\nimport { addEvent, attr, createElement, crisp, css, defined, destroyObjectProperties, extend, isArray, isNumber, isObject, isString, merge, pick, pInt, replaceNested } from '../../../Shared/Utilities.js';\nimport { uniqueKey } from '../../Utilities.js';\n/* *\n *\n * Variables\n *\n * */\nlet hasInternalReferenceBug;\n/* *\n *\n * Class\n *\n * */\n/* eslint-disable no-invalid-this, valid-jsdoc */\n/**\n * Allows direct access to the Highcharts rendering layer in order to draw\n * primitive shapes like circles, rectangles, paths or text directly on a chart,\n * or independent from any chart. The SVGRenderer represents a wrapper object\n * for SVG in modern browsers.\n *\n * An existing chart's renderer can be accessed through {@link Chart.renderer}.\n * The renderer can also be used completely decoupled from a chart.\n *\n * See [How to use the SVG Renderer](\n * https://www.highcharts.com/docs/advanced-chart-features/renderer) for a\n * comprehensive tutorial.\n *\n * @sample highcharts/members/renderer-on-chart\n * Annotating a chart programmatically.\n * @sample highcharts/members/renderer-basic\n * Independent SVG drawing.\n *\n * @example\n * // Use directly without a chart object.\n * let renderer = new Highcharts.Renderer(parentNode, 600, 400);\n *\n * @class\n * @name Highcharts.SVGRenderer\n *\n * @param {Highcharts.HTMLDOMElement} container\n * Where to put the SVG in the web page.\n *\n * @param {number} width\n * The width of the SVG.\n *\n * @param {number} height\n * The height of the SVG.\n *\n * @param {Highcharts.CSSObject} [style]\n * The box style, if not in styleMode\n *\n * @param {boolean} [forExport=false]\n * Whether the rendered content is intended for export.\n *\n * @param {boolean} [allowHTML=true]\n * Whether the renderer is allowed to include HTML text, which will be\n * projected on top of the SVG.\n *\n * @param {boolean} [styledMode=false]\n * Whether the renderer belongs to a chart that is in styled mode.\n * If it does, it will avoid setting presentational attributes in\n * some cases, but not when set explicitly through `.attr` and `.css`\n * etc.\n */\nclass SVGRenderer {\n /**\n * The root `svg` node of the renderer.\n *\n * @name Highcharts.SVGRenderer#box\n * @type {Highcharts.SVGDOMElement}\n */\n /**\n * The wrapper for the root `svg` node of the renderer.\n *\n * @name Highcharts.SVGRenderer#boxWrapper\n * @type {Highcharts.SVGElement}\n */\n /**\n * A pointer to the `defs` node of the root SVG.\n *\n * @name Highcharts.SVGRenderer#defs\n * @type {Highcharts.SVGElement}\n */\n /**\n * Whether the rendered content is intended for export.\n *\n * @name Highcharts.SVGRenderer#forExport\n * @type {boolean | undefined}\n */\n /**\n * Page url used for internal references.\n *\n * @internal\n * @name Highcharts.SVGRenderer#url\n * @type {string}\n */\n /**\n * Initialize the SVGRenderer. Overridable initializer function that takes\n * the same parameters as the constructor.\n *\n * @function Highcharts.SVGRenderer#init\n *\n * @param {Highcharts.HTMLDOMElement} container\n * Where to put the SVG in the web page.\n *\n * @param {number} width\n * The width of the SVG.\n *\n * @param {number} height\n * The height of the SVG.\n *\n * @param {Highcharts.CSSObject} [style]\n * The box style, if not in styleMode\n *\n * @param {boolean} [forExport=false]\n * Whether the rendered content is intended for export.\n *\n * @param {boolean} [allowHTML=true]\n * Whether the renderer is allowed to include HTML text, which will be\n * projected on top of the SVG.\n *\n * @param {boolean} [styledMode=false]\n * Whether the renderer belongs to a chart that is in styled mode. If it\n * does, it will avoid setting presentational attributes in some cases, but\n * not when set explicitly through `.attr` and `.css` etc.\n */\n constructor(container, width, height, style, forExport, allowHTML, styledMode, palette, chartIndex) {\n /** @internal */\n this.x = 0;\n /** @internal */\n this.y = 0;\n const renderer = this, boxWrapper = renderer\n .createElement('svg')\n .attr({\n version: '1.1',\n 'class': 'highcharts-root'\n }), element = boxWrapper.element;\n container.appendChild(element);\n // Always use ltr on the container, otherwise text-anchor will be\n // flipped and text appear outside labels, buttons, tooltip etc (#3482)\n attr(container, 'dir', 'ltr');\n // For browsers other than IE, add the namespace attribute (#1978)\n if (container.innerHTML.indexOf('xmlns') === -1) {\n attr(element, 'xmlns', this.SVG_NS);\n }\n this.box = element;\n this.boxWrapper = boxWrapper;\n this.alignedObjects = [];\n this.url = this.getReferenceURL();\n // Add description\n const desc = this.createElement('desc').add();\n desc.element.appendChild(doc.createTextNode('Created with Highcharts 13.0.0'));\n this.defs = this.createElement('defs').add();\n this.allowHTML = allowHTML;\n this.forExport = forExport;\n this.styledMode = styledMode;\n this.chartIndex = chartIndex || 0;\n this.gradients = {}; // Object where gradient SvgElements are stored\n this.cache = {}; // Cache for numerical bounding boxes\n this.cacheKeys = [];\n this.asyncCounter = 0;\n this.rootFontSize = boxWrapper.getStyle('font-size');\n renderer.setSize(width, height, false);\n if (!styledMode) {\n boxWrapper.css(this.getStyle(style || {}));\n // Create the palette\n this.palette = new Palette(this, palette || defaultOptions.palette);\n }\n // Issue 110 workaround:\n // In Firefox, if a div is positioned by percentage, its pixel position\n // may land between pixels. The container itself doesn't display this,\n // but an SVG element inside this container will be drawn at subpixel\n // precision. In order to draw sharp lines, this must be compensated\n // for. This doesn't seem to work inside iframes though (like in\n // jsFiddle).\n let subPixelFix, rect;\n if (isFirefox && container.getBoundingClientRect) {\n subPixelFix = function () {\n css(container, { left: 0, top: 0 });\n rect = container.getBoundingClientRect();\n css(container, {\n left: (Math.ceil(rect.left) - rect.left) + 'px',\n top: (Math.ceil(rect.top) - rect.top) + 'px'\n });\n };\n // Run the fix now\n subPixelFix();\n // Run it on resize\n renderer.unSubPixelFix = addEvent(win, 'resize', subPixelFix);\n }\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * General method for adding a definition to the SVG `defs` tag. Can be used\n * for gradients, fills, filters etc. Styled mode only. A hook for adding\n * general definitions to the SVG's defs tag. Definitions can be referenced\n * from the CSS by its `id`. Read more in\n * [gradients, shadows and patterns](https://www.highcharts.com/docs/chart-design-and-style/gradients-shadows-and-patterns).\n * Styled mode only.\n *\n * @function Highcharts.SVGRenderer#definition\n *\n * @param {Highcharts.ASTNode} def\n * A serialized form of an SVG definition, including children.\n *\n * @return {Highcharts.SVGElement}\n * The inserted node.\n */\n definition(def) {\n const ast = new AST([def]);\n return ast.addToDOM(this.defs.element);\n }\n /**\n * Get the prefix needed for internal URL references to work in certain\n * cases. Some older browser versions had a bug where internal url\n * references in SVG attributes, on the form `url(#some-id)`, would fail if\n * a base tag was present in the page. There were also issues with\n * `history.pushState` related to this prefix.\n *\n * Related issues: #24, #672, #1070, #5244.\n *\n * The affected browsers are:\n * - Chrome <= 53 (May 2018)\n * - Firefox <= 51 (January 2017)\n * - Safari/Mac <= 12.1 (2018 or 2019)\n * - Safari/iOS <= 13\n *\n * @internal\n *\n * @todo Remove this hack when time has passed. All the affected browsers\n * are evergreens, so it is increasingly unlikely that users are affected by\n * the bug.\n *\n * @return {string}\n * The prefix to use. An empty string for modern browsers.\n */\n getReferenceURL() {\n if ((isFirefox || isWebKit) &&\n doc.getElementsByTagName('base').length) {\n // Detect if a clip path is taking effect by performing a hit test\n // outside the clipped area. If the hit element is the rectangle\n // that was supposed to be clipped, the bug is present. This only\n // has to be performed once per page load, so we store the result\n // locally in the module.\n if (!defined(hasInternalReferenceBug)) {\n const id = uniqueKey();\n const ast = new AST([{\n tagName: 'svg',\n attributes: {\n width: 8,\n height: 8\n },\n children: [{\n tagName: 'defs',\n children: [{\n tagName: 'clipPath',\n attributes: {\n id\n },\n children: [{\n tagName: 'rect',\n attributes: {\n width: 4,\n height: 4\n }\n }]\n }]\n }, {\n tagName: 'rect',\n attributes: {\n id: 'hitme',\n width: 8,\n height: 8,\n 'clip-path': `url(#${id})`,\n fill: 'rgba(0,0,0,0.001)'\n }\n }]\n }]);\n const svg = ast.addToDOM(doc.body);\n css(svg, {\n position: 'fixed',\n top: 0,\n left: 0,\n zIndex: 9e5\n });\n const hitElement = doc.elementFromPoint(6, 6);\n hasInternalReferenceBug = hitElement?.id === 'hitme';\n doc.body.removeChild(svg);\n }\n if (hasInternalReferenceBug) {\n // Scan alert #[72]: Loop for nested patterns\n return replaceNested(win.location.href.split('#')[0], // Remove hash\n [/<[^>]*>/g, ''], // Wing cut HTML\n [/([\\('\\)])/g, '\\\\$1'], // Escape parentheses and quotes\n [/ /g, '%20'] // Replace spaces (needed for Safari only)\n );\n }\n }\n return '';\n }\n /**\n * Get the global style setting for the renderer.\n *\n * @internal\n * @function Highcharts.SVGRenderer#getStyle\n * @param {Highcharts.CSSObject} style\n * Style settings.\n * @return {Highcharts.CSSObject}\n * The style settings mixed with defaults.\n */\n getStyle(style) {\n this.style = extend({\n fontFamily: '-apple-system, BlinkMacSystemFont, \"Segoe UI\", ' +\n 'Roboto, Helvetica, Arial, \"Apple Color Emoji\", ' +\n '\"Segoe UI Emoji\", \"Segoe UI Symbol\", sans-serif',\n fontSize: '1rem'\n }, style);\n return this.style;\n }\n /**\n * Apply the global style on the renderer, mixed with the default styles.\n *\n * @function Highcharts.SVGRenderer#setStyle\n *\n * @param {Highcharts.CSSObject} style\n * CSS to apply.\n */\n setStyle(style) {\n this.boxWrapper.css(this.getStyle(style));\n }\n /**\n * Detect whether the renderer is hidden. This happens when one of the\n * parent elements has `display: none`. Used internally to detect when we\n * need to render preliminarily in another div to get the text bounding\n * boxes right.\n *\n * @function Highcharts.SVGRenderer#isHidden\n *\n * @return {boolean}\n * True if it is hidden.\n */\n isHidden() {\n return !this.boxWrapper.getBBox().width;\n }\n /**\n * Destroys the renderer and its allocated members.\n *\n * @function Highcharts.SVGRenderer#destroy\n *\n * @return {null}\n * Pass through value.\n */\n destroy() {\n const renderer = this, rendererDefs = renderer.defs;\n renderer.box = null;\n renderer.boxWrapper = renderer.boxWrapper.destroy();\n // Call destroy on all gradient elements\n destroyObjectProperties(renderer.gradients || {});\n renderer.gradients = null;\n renderer.defs = rendererDefs.destroy();\n // Remove sub pixel fix handler (#982)\n if (renderer.unSubPixelFix) {\n renderer.unSubPixelFix();\n }\n renderer.alignedObjects.length = 0;\n return null;\n }\n /**\n * Create a wrapper for an SVG element. Serves as a factory for\n * {@link SVGElement}, but this function is itself mostly called from\n * primitive factories like {@link SVGRenderer#path}, {@link\n * SVGRenderer#rect} or {@link SVGRenderer#text}.\n *\n * @function Highcharts.SVGRenderer#createElement\n *\n * @param {string} nodeName\n * The node name, for example `rect`, `g` etc.\n *\n * @return {Highcharts.SVGElement}\n * The generated SVGElement.\n */\n createElement(nodeName) {\n return new this.Element(this, nodeName);\n }\n /**\n * Get converted radial gradient attributes according to the radial\n * reference. Used internally from the {@link SVGElement#colorGradient}\n * function.\n *\n * @internal\n * @function Highcharts.SVGRenderer#getRadialAttr\n */\n getRadialAttr(radialReference, gradAttr) {\n return {\n cx: (radialReference[0] - radialReference[2] / 2) +\n (gradAttr.cx || 0) * radialReference[2],\n cy: (radialReference[1] - radialReference[2] / 2) +\n (gradAttr.cy || 0) * radialReference[2],\n r: (gradAttr.r || 0) * radialReference[2]\n };\n }\n /**\n * Create a drop shadow definition and return its id\n *\n * @internal\n * @function Highcharts.SVGRenderer#shadowDefinition\n * @param {boolean|Highcharts.ShadowOptionsObject} [shadowOptions]\n * The shadow options. If `true`, the default options are applied.\n */\n shadowDefinition(shadowOptions) {\n const id = [\n `highcharts-drop-shadow-${this.chartIndex}`,\n ...Object.keys(shadowOptions)\n .map((key) => `${key}-${shadowOptions[key]}`)\n ].join('-').toLowerCase().replace(/[^a-z\\d\\-]/g, ''), options = merge({\n color: '#000000',\n offsetX: 0,\n offsetY: 2,\n opacity: 0.05,\n width: 6\n }, shadowOptions);\n if (!this.defs.element.querySelector(`#${id}`)) {\n this.definition({\n tagName: 'filter',\n attributes: {\n id,\n filterUnits: options.filterUnits\n },\n children: this.getShadowFilterContent(options)\n });\n }\n return id;\n }\n /**\n * Get shadow filter content.\n * NOTE! Overridden in es5 module for IE11 compatibility.\n *\n * @internal\n * @function Highcharts.SVGRenderer#getShadowFilterContent\n * @param {ShadowOptionsObject} options\n * The shadow options.\n * @return {Array<AST.Node>}\n * The shadow filter content.\n */\n getShadowFilterContent(options) {\n return [{\n tagName: 'feDropShadow',\n attributes: {\n dx: options.offsetX,\n dy: options.offsetY,\n 'flood-color': options.color,\n // Tuned and modified to keep a preserve compatibility\n // with the old settings\n 'flood-opacity': Math.min(options.opacity * 5, 1),\n stdDeviation: options.width / 2\n }\n }];\n }\n /**\n * Parse a simple HTML string into SVG tspans. Called internally when text\n * is set on an SVGElement. The function supports a subset of HTML tags, CSS\n * text features like `width`, `text-overflow`, `white-space`, and also\n * attributes like `href` and `style`.\n *\n * @internal\n * @function Highcharts.SVGRenderer#buildText\n * @param {Highcharts.SVGElement} wrapper\n * The parent SVGElement.\n */\n buildText(wrapper) {\n new TextBuilder(wrapper).buildSVG();\n }\n /**\n * Returns white for dark colors and black for bright colors, based on W3C's\n * definition of [Relative luminance](\n * https://www.w3.org/WAI/GL/wiki/Relative_luminance).\n *\n * @function Highcharts.SVGRenderer#getContrast\n *\n * @param {Highcharts.ColorString} color\n * The color to get the contrast for.\n *\n * @return {Highcharts.ColorString}\n * The contrast color, either `#000000` or `#FFFFFF`.\n */\n getContrast(color) {\n if (color === 'transparent') {\n return '#000000';\n }\n // #6216, #17273\n const rgba256 = Color.parse(color).rgba, \n // For each rgb channel, compute the luminosity based on all\n // channels. Subtract this from 0.5 and multiply by a huge number,\n // so that all colors with luminosity < 0.5 result in a negative\n // number, and all colors > 0.5 end up very high. This is then\n // clamped into the range 0-1, to result in either black or white.\n // The subtraction of 0.5, multiplication by 9e9, and clamping are\n // workarounds for lack of support for the round() function. As of\n // 2025, it is too fresh in Chrome, and doesn't work in Safari.\n channelFunc = ' clamp(0,calc(9e9*(0.5 - (0.2126*r + 0.7152*g + 0.0722*b))),1)';\n // The color is parsable by the Color class parsers\n if (isNumber(rgba256[0]) || !Color.useColorMix) {\n const rgba = rgba256.map((b8) => {\n const c = b8 / 255;\n return c <= 0.04 ?\n c / 12.92 :\n Math.pow((c + 0.055) / 1.055, 2.4);\n }), \n // Relative luminance\n l = 0.2126 * rgba[0] + 0.7152 * rgba[1] + 0.0722 * rgba[2];\n // Use white or black based on which provides more contrast\n return 1.05 / (l + 0.05) > (l + 0.05) / 0.05 ?\n '#FFFFFF' :\n '#000000';\n }\n // Not parsable, use CSS functions instead\n return 'color(' +\n 'from ' + color + ' srgb' +\n channelFunc + channelFunc + channelFunc +\n ')';\n }\n /**\n * Create a button with preset states. Styles for the button can either be\n * set as arguments, or a general theme for all buttons can be set by the\n * `global.buttonTheme` option.\n *\n * @function Highcharts.SVGRenderer#button\n *\n * @param {string} text\n * The text or HTML to draw.\n *\n * @param {number} x\n * The x position of the button's left side.\n *\n * @param {number} y\n * The y position of the button's top side.\n *\n * @param {Highcharts.EventCallbackFunction<Highcharts.SVGElement>} callback\n * The function to execute on button click or touch.\n *\n * @param {Highcharts.SVGAttributes} [theme]\n * SVG attributes for the normal state.\n *\n * @param {Highcharts.SVGAttributes} [hoverState]\n * SVG attributes for the hover state.\n *\n * @param {Highcharts.SVGAttributes} [selectState]\n * SVG attributes for the pressed state.\n *\n * @param {Highcharts.SVGAttributes} [disabledState]\n * SVG attributes for the disabled state.\n *\n * @param {Highcharts.SymbolKeyValue} [shape=rect]\n * The shape type.\n *\n * @param {boolean} [useHTML=false]\n * Whether to use HTML to render the label.\n *\n * @return {Highcharts.SVGElement}\n * The button element.\n */\n button(text, x, y, callback, theme = {}, hoverState, selectState, disabledState, shape, useHTML) {\n const label = this.label(text, x, y, shape, void 0, void 0, useHTML, void 0, 'button'), styledMode = this.styledMode, args = arguments;\n let curState = 0;\n theme = merge(defaultOptions.global.buttonTheme, theme);\n // @todo Consider moving this to a lower level, like .attr\n if (styledMode) {\n delete theme.fill;\n delete theme.stroke;\n delete theme['stroke-width'];\n }\n const states = theme.states || {}, normalStyle = theme.style || {};\n delete theme.states;\n delete theme.style;\n // Presentational\n const stateAttribs = [\n AST.filterUserAttributes(theme)\n ], \n // The string type is a mistake, it is just for compliance with\n // SVGAttribute and is not used in button theme.\n stateStyles = [normalStyle];\n if (!styledMode) {\n ['hover', 'select', 'disabled'].forEach((stateName, i) => {\n stateAttribs.push(merge(stateAttribs[0], AST.filterUserAttributes(args[i + 5] || states[stateName] || {})));\n stateStyles.push(stateAttribs[i + 1].style);\n delete stateAttribs[i + 1].style;\n });\n }\n // Add the events. IE9 and IE10 need mouseover and mouseout to function\n // (#667).\n addEvent(label.element, isMS ? 'mouseover' : 'mouseenter', function () {\n if (curState !== 3) {\n label.setState(1);\n }\n });\n addEvent(label.element, isMS ? 'mouseout' : 'mouseleave', function () {\n if (curState !== 3) {\n label.setState(curState);\n }\n });\n label.setState = (state = 0) => {\n // Hover state is temporary, don't record it\n if (state !== 1) {\n label.state = curState = state;\n }\n // Update visuals\n label\n .removeClass(/highcharts-button-(normal|hover|pressed|disabled)/)\n .addClass('highcharts-button-' +\n ['normal', 'hover', 'pressed', 'disabled'][state]);\n if (!styledMode) {\n label.attr(stateAttribs[state]);\n const css = stateStyles[state];\n if (isObject(css)) {\n label.css(css);\n }\n }\n };\n label.attr(stateAttribs[0]);\n // Presentational attributes\n if (!styledMode) {\n label.css(extend({ cursor: 'default' }, normalStyle));\n // HTML labels don't need to handle pointer events because click and\n // mouseenter/mouseleave is bound to the underlying <g> element.\n // Should this be reconsidered, we need more complex logic to share\n // events between the <g> and its <div> counterpart, and avoid\n // triggering mouseenter/mouseleave when hovering from one to the\n // other (#17440).\n if (useHTML) {\n label.text.css({ pointerEvents: 'none' });\n }\n }\n return label\n .on('touchstart', (e) => e.stopPropagation())\n .on('click', function (e) {\n if (curState !== 3) {\n callback?.call(label, e);\n }\n });\n }\n /**\n * Make a straight line crisper by not spilling out to neighbor pixels.\n *\n * @function Highcharts.SVGRenderer#crispLine\n *\n * @param {Highcharts.SVGPathArray} points\n * The original points on the format `[['M', 0, 0], ['L', 100, 0]]`.\n *\n * @param {number} width\n * The width of the line.\n *\n * @return {Highcharts.SVGPathArray}\n * The original points array, but modified to render crisply.\n */\n crispLine(points, width) {\n const [start, end] = points;\n // Normalize to a crisp line\n if (defined(start[1]) && start[1] === end[1]) {\n start[1] = end[1] = crisp(start[1], width);\n }\n if (defined(start[2]) && start[2] === end[2]) {\n start[2] = end[2] = crisp(start[2], width);\n }\n return points;\n }\n /**\n * Draw a path, wraps the SVG `path` element.\n *\n * @sample highcharts/members/renderer-path-on-chart/\n * Draw a path in a chart\n * @sample highcharts/members/renderer-path/\n * Draw a path independent from a chart\n *\n * @example\n * let path = renderer.path(['M', 10, 10, 'L', 30, 30, 'z'])\n * .attr({ stroke: '#ff00ff' })\n * .add();\n *\n * @function Highcharts.SVGRenderer#path\n *\n * @param {Highcharts.SVGPathArray} [path]\n * An SVG path definition in array form.\n *\n * @return {Highcharts.SVGElement}\n * The generated wrapper element.\n *\n */ /**\n * Draw a path, wraps the SVG `path` element.\n *\n * @function Highcharts.SVGRenderer#path\n *\n * @param {Highcharts.SVGAttributes|Highcharts.SVGPathArray} [path]\n * The initial attributes.\n *\n * @return {Highcharts.SVGElement}\n * The generated wrapper element.\n */\n path(path) {\n const attribs = (this.styledMode ? {} : {\n fill: 'none'\n });\n if (isArray(path)) {\n attribs.d = path;\n }\n else if (isObject(path)) { // Attributes\n extend(attribs, path);\n }\n return this.createElement('path').attr(attribs);\n }\n /* eslint-disable jsdoc/check-param-names */\n /**\n * Draw a circle, wraps the SVG `circle` element.\n *\n * @sample highcharts/members/renderer-circle/\n * Drawing a circle\n *\n * @function Highcharts.SVGRenderer#circle\n *\n * @param {number} [x]\n * The center x position.\n *\n * @param {number} [y]\n * The center y position.\n *\n * @param {number} [r]\n * The radius.\n *\n * @return {Highcharts.SVGElement}\n * The generated wrapper element.\n */ /**\n * Draw a circle, wraps the SVG `circle` element.\n *\n * @function Highcharts.SVGRenderer#circle\n *\n * @param {Highcharts.SVGAttributes} [attribs]\n * The initial attributes.\n *\n * @return {Highcharts.SVGElement}\n * The generated wrapper element.\n */\n circle(x, y, r) {\n const attribs = (isObject(x) ?\n x :\n typeof x === 'undefined' ? {} : { x: x, y: y, r: r }), wrapper = this.createElement('circle');\n // Setting x or y translates to cx and cy\n wrapper.xSetter = wrapper.ySetter = function (value, key, element) {\n element.setAttribute('c' + key, value);\n };\n return wrapper.attr(attribs);\n }\n /* eslint-disable jsdoc/check-param-names */\n /**\n * Draw and return an arc.\n *\n * @sample highcharts/members/renderer-arc/\n * Drawing an arc\n *\n * @function Highcharts.SVGRenderer#arc\n *\n * @param {number} [x=0]\n * Center X position.\n *\n * @param {number} [y=0]\n * Center Y position.\n *\n * @param {number} [r=0]\n * The outer radius' of the arc.\n *\n * @param {number} [innerR=0]\n * Inner radius like used in donut charts.\n *\n * @param {number} [start=0]\n * The starting angle of the arc in radians, where 0 is to the right and\n * `-Math.PI/2` is up.\n *\n * @param {number} [end=0]\n * The ending angle of the arc in radians, where 0 is to the right and\n * `-Math.PI/2` is up.\n *\n * @return {Highcharts.SVGElement}\n * The generated wrapper element.\n */ /**\n * Draw and return an arc. Overloaded function that takes arguments object.\n *\n * @function Highcharts.SVGRenderer#arc\n *\n * @param {Highcharts.SVGAttributes} attribs\n * Initial SVG attributes.\n *\n * @return {Highcharts.SVGElement}\n * The generated wrapper element.\n */\n arc(x, y, r, innerR, start, end) {\n let options;\n if (isObject(x)) {\n options = x;\n y = options.y;\n r = options.r;\n innerR = options.innerR;\n start = options.start;\n end = options.end;\n x = options.x;\n }\n else {\n options = { innerR, start, end };\n }\n // Arcs are defined as symbols for the ability to set\n // attributes in attr and animate\n const arc = this.symbol('arc', x, y, r, r, options);\n arc.r = r; // #959\n return arc;\n }\n /* eslint-enable jsdoc/check-param-names */\n /* eslint-disable jsdoc/check-param-names */\n /**\n * Draw and return a rectangle.\n *\n * @function Highcharts.SVGRenderer#rect\n *\n * @param {number} [x]\n * Left position.\n *\n * @param {number} [y]\n * Top position.\n *\n * @param {number} [width]\n * Width of the rectangle.\n *\n * @param {number} [height]\n * Height of the rectangle.\n *\n * @param {number} [r]\n * Border corner radius.\n *\n * @param {number} [strokeWidth]\n * A stroke width can be supplied to allow crisp drawing.\n *\n * @return {Highcharts.SVGElement}\n * The generated wrapper element.\n */ /**\n * Draw and return a rectangle.\n *\n * @sample highcharts/members/renderer-rect-on-chart/\n * Draw a rectangle in a chart\n * @sample highcharts/members/renderer-rect/\n * Draw a rectangle independent from a chart\n *\n * @function Highcharts.SVGRenderer#rect\n *\n * @param {Highcharts.SVGAttributes} [attributes]\n * General SVG attributes for the rectangle.\n *\n * @return {Highcharts.SVGElement}\n * The generated wrapper element.\n */\n rect(x, y, width, height, r, strokeWidth) {\n const attribs = (isObject(x) ?\n x :\n typeof x === 'undefined' ?\n {} :\n {\n x,\n y,\n r,\n width: Math.max(width || 0, 0),\n height: Math.max(height || 0, 0)\n }), wrapper = this.createElement('rect');\n if (!this.styledMode) {\n if (typeof strokeWidth !== 'undefined') {\n attribs['stroke-width'] = strokeWidth;\n extend(attribs, wrapper.crisp(attribs));\n }\n attribs.fill = 'none';\n }\n wrapper.rSetter = function (value, _key, element) {\n wrapper.r = value;\n attr(element, {\n rx: value,\n ry: value\n });\n };\n wrapper.rGetter = function () {\n return wrapper.r || 0;\n };\n return wrapper.attr(attribs);\n }\n /* eslint-enable jsdoc/check-param-names */\n /**\n * Draw and return a rectangle with advanced corner rounding options.\n *\n * @function Highcharts.SVGRenderer#roundedRect\n *\n * @param {Highcharts.SVGAttributes} attribs\n * Attributes.\n *\n * @return {Highcharts.SVGElement}\n * The generated wrapper element.\n */\n roundedRect(attribs) {\n return this.symbol('roundedRect').attr(attribs);\n }\n /**\n * Resize the {@link SVGRenderer#box} and re-align all aligned child\n * elements.\n *\n * @sample highcharts/members/renderer-g/\n * Show and hide grouped objects\n *\n * @function Highcharts.SVGRenderer#setSize\n *\n * @param {number} width\n * The new pixel width.\n *\n * @param {number} height\n * The new pixel height.\n *\n * @param {boolean|Partial<Highcharts.AnimationOptionsObject>} [animate=true]\n * Whether and how to animate.\n */\n setSize(width, height, animate) {\n const renderer = this;\n renderer.width = width;\n renderer.height = height;\n renderer.boxWrapper.animate({\n width: width,\n height: height\n }, {\n step: function () {\n this.attr({\n viewBox: '0 0 ' + this.attr('width') + ' ' +\n this.attr('height')\n });\n },\n duration: pick(animate, true) ? void 0 : 0\n });\n renderer.alignElements();\n }\n /**\n * Create and return an svg group element. Child\n * {@link Highcharts.SVGElement} objects are added to the group by using the\n * group as the first parameter in {@link Highcharts.SVGElement#add|add()}.\n *\n * @function Highcharts.SVGRenderer#g\n *\n * @param {string} [name]\n * The group will be given a class name of `highcharts-{name}`. This can be\n * used for styling and scripting.\n *\n * @return {Highcharts.SVGElement}\n * The generated wrapper element.\n */\n g(name) {\n const elem = this.createElement('g');\n return name ?\n elem.attr({ 'class': 'highcharts-' + name }) :\n elem;\n }\n /**\n * Display an image.\n *\n * @sample highcharts/members/renderer-image-on-chart/\n * Add an image in a chart\n * @sample highcharts/members/renderer-image/\n * Add an image independent of a chart\n *\n * @function Highcharts.SVGRenderer#image\n *\n * @param {string} href\n * The image source.\n *\n * @param {number} [x]\n * The X position.\n *\n * @param {number} [y]\n * The Y position.\n *\n * @param {number} [width]\n * The image width. If omitted, it defaults to the image file width.\n *\n * @param {number} [height]\n * The image height. If omitted it defaults to the image file height.\n *\n * @param {Function} [onload]\n * Event handler for image load.\n *\n * @return {Highcharts.SVGElement}\n * The generated wrapper element.\n */\n image(href, x, y, width, height, onload) {\n const attribs = { preserveAspectRatio: 'none' };\n // Optional properties (#11756)\n if (isNumber(x)) {\n attribs.x = x;\n }\n if (isNumber(y)) {\n attribs.y = y;\n }\n if (isNumber(width)) {\n attribs.width = width;\n }\n if (isNumber(height)) {\n attribs.height = height;\n }\n const elemWrapper = this.createElement('image').attr(attribs), onDummyLoad = function (e) {\n elemWrapper.attr({ href });\n onload.call(elemWrapper, e);\n };\n // Add load event if supplied\n if (onload) {\n // We have to use a dummy HTML image since IE support for SVG image\n // load events is very buggy. First set a transparent src, wait for\n // dummy to load, and then add the real src to the SVG image.\n elemWrapper.attr({\n /* eslint-disable-next-line max-len */\n href: 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='\n });\n const dummy = new win.Image();\n addEvent(dummy, 'load', onDummyLoad);\n dummy.src = href;\n if (dummy.complete) {\n onDummyLoad({});\n }\n }\n else {\n elemWrapper.attr({ href });\n }\n return elemWrapper;\n }\n /**\n * Draw a symbol out of pre-defined shape paths from\n * {@link SVGRenderer#symbols}.\n * It is used in Highcharts for point makers, which cake a `symbol` option,\n * and label and button backgrounds like in the tooltip and stock flags.\n *\n * @function Highcharts.SVGRenderer#symbol\n *\n * @param {string} symbol\n * The symbol name.\n *\n * @param {number} [x]\n * The X coordinate for the top left position.\n *\n * @param {number} [y]\n * The Y coordinate for the top left position.\n *\n * @param {number} [width]\n * The pixel width.\n *\n * @param {number} [height]\n * The pixel height.\n *\n * @param {Highcharts.SymbolOptionsObject} [options]\n * Additional options, depending on the actual symbol drawn.\n *\n * @return {Highcharts.SVGElement}\n * SVG symbol.\n */\n symbol(symbol, x, y, width, height, options) {\n const ren = this, imageRegex = /^url\\((.*?)\\)$/, isImage = imageRegex.test(symbol), sym = (!isImage && (this.symbols[symbol] ? symbol : 'circle')), \n // Get the symbol definition function\n symbolFn = (sym && this.symbols[sym]);\n let obj, path, imageSrc, centerImage;\n if (symbolFn) {\n // Check if there's a path defined for this symbol\n if (typeof x === 'number') {\n path = symbolFn.call(this.symbols, x || 0, y || 0, width || 0, height || 0, options);\n }\n obj = this.path(path);\n if (!ren.styledMode) {\n obj.attr('fill', 'none');\n }\n // Expand properties for use in animate and attr\n extend(obj, {\n symbolName: (sym || void 0),\n x: x,\n y: y,\n width: width,\n height: height\n });\n if (options) {\n extend(obj, options);\n }\n // Image symbols\n }\n else if (isImage) {\n imageSrc = symbol.match(imageRegex)[1];\n // Create the image synchronously, add attribs async\n const img = obj = this.image(imageSrc);\n // The image width is not always the same as the symbol width. The\n // image may be centered within the symbol, as is the case when\n // image shapes are used as label backgrounds, for example in flags.\n img.imgwidth = pick(options?.width, symbolSizes[imageSrc]?.width);\n img.imgheight = pick(options?.height, symbolSizes[imageSrc]?.height);\n /**\n * Set the size and position\n */\n centerImage = (obj) => obj.attr({\n width: obj.width,\n height: obj.height\n });\n /**\n * Width and height setters that take both the image's physical size\n * and the label size into consideration, and translates the image\n * to center within the label.\n */\n ['width', 'height'].forEach((key) => {\n img[`${key}Setter`] = function (value, key) {\n this[key] = value;\n const { alignByTranslate, element, width, height, imgwidth, imgheight } = this, imgSize = key === 'width' ? imgwidth : imgheight;\n let scale = 1;\n // Scale and center the image within its container. The name\n // `backgroundSize` is taken from the CSS spec, but the\n // value `within` is made up. Other possible values in the\n // spec, `cover` and `contain`, can be implemented if\n // needed.\n if (options &&\n options.backgroundSize === 'within' &&\n width &&\n height &&\n imgwidth &&\n imgheight) {\n scale = Math.min(width / imgwidth, height / imgheight);\n // Update both width and height to keep the ratio\n // correct (#17315)\n attr(element, {\n width: Math.round(imgwidth * scale),\n height: Math.round(imgheight * scale)\n });\n }\n else if (element && imgSize) {\n element.setAttribute(key, imgSize);\n }\n if (!alignByTranslate && imgwidth && imgheight) {\n this.translate(((width || 0) - (imgwidth * scale)) / 2, ((height || 0) - (imgheight * scale)) / 2);\n }\n };\n });\n if (defined(x)) {\n img.attr({\n x: x,\n y: y\n });\n }\n img.isImg = true;\n if (defined(img.imgwidth) && defined(img.imgheight)) {\n centerImage(img);\n }\n else {\n // Initialize image to be 0 size so export will still function\n // if there's no cached sizes.\n img.attr({ width: 0, height: 0 });\n // Create a dummy JavaScript image to get the width and height.\n createElement('img', {\n onload: function () {\n const chart = charts[ren.chartIndex];\n // Special case for SVGs on IE11, the width is not\n // accessible until the image is part of the DOM\n // (#2854).\n if (this.width === 0) {\n css(this, {\n position: 'absolute',\n top: '-999em'\n });\n doc.body.appendChild(this);\n }\n // Center the image\n symbolSizes[imageSrc] = {\n width: this.width,\n height: this.height\n };\n img.imgwidth = this.width;\n img.imgheight = this.height;\n if (img.element) {\n centerImage(img);\n }\n // Clean up after #2854 workaround.\n if (this.parentNode) {\n this.parentNode.removeChild(this);\n }\n // Fire the load event when all external images are\n // loaded\n ren.asyncCounter--;\n if (!ren.asyncCounter && chart && !chart.hasLoaded) {\n chart.onload();\n }\n },\n src: imageSrc\n });\n this.asyncCounter++;\n }\n }\n return obj;\n }\n /**\n * Define a clipping rectangle. The clipping rectangle is later applied\n * to {@link SVGElement} objects through the {@link SVGElement#clip}\n * function.\n *\n * This function is deprecated as of v11.2. Instead, use a regular shape\n * (`rect`, `path` etc), and the `SVGElement.clipTo` function.\n *\n * @example\n * let circle = renderer.circle(100, 100, 100)\n * .attr({ fill: 'red' })\n * .add();\n * let clipRect = renderer.clipRect(100, 100, 100, 100);\n *\n * // Leave only the lower right quarter visible\n * circle.clip(clipRect);\n *\n * @deprecated 11.2.0\n *\n * @function Highcharts.SVGRenderer#clipRect\n *\n * @param {number} [x]\n *\n * @param {number} [y]\n *\n * @param {number} [width]\n *\n * @param {number} [height]\n *\n * @return {Highcharts.ClipRectElement}\n * A clipping rectangle.\n */\n clipRect(x, y, width, height) {\n return this.rect(x, y, width, height, 0);\n }\n /**\n * Draw text. The text can contain a subset of HTML, like spans and anchors\n * and some basic text styling of these. For more advanced features like\n * border and background, use {@link Highcharts.SVGRenderer#label} instead.\n * To update the text after render, run `text.attr({ text: 'New text' })`.\n *\n * @sample highcharts/members/renderer-text-on-chart/\n * Annotate the chart freely\n * @sample highcharts/members/renderer-on-chart/\n * Annotate with a border and in response to the data\n * @sample highcharts/members/renderer-text/\n * Formatted text\n *\n * @function Highcharts.SVGRenderer#text\n *\n * @param {string} [str]\n * The text of (subset) HTML to draw.\n *\n * @param {number} [x]\n * The x position of the text's lower left corner.\n *\n * @param {number} [y]\n * The y position of the text's lower left corner.\n *\n * @param {boolean} [useHTML=false]\n * Use HTML to render the text.\n *\n * @return {Highcharts.SVGElement}\n * The text object.\n */\n text(str, x, y, useHTML) {\n const renderer = this, attribs = {};\n if (useHTML && (renderer.allowHTML || !renderer.forExport)) {\n return renderer.html(str, x, y);\n }\n attribs.x = Math.round(x || 0); // X always needed for line-wrap logic\n if (y) {\n attribs.y = Math.round(y);\n }\n if (defined(str)) {\n attribs.text = str;\n }\n const wrapper = renderer.createElement('text').attr(attribs);\n if (!useHTML || (renderer.forExport && !renderer.allowHTML)) {\n wrapper.xSetter = function (value, key, element) {\n const tspans = element.getElementsByTagName('tspan'), parentVal = element.getAttribute(key);\n for (let i = 0, tspan; i < tspans.length; i++) {\n tspan = tspans[i];\n // If the x values are equal, the tspan represents a line\n // break\n if (tspan.getAttribute(key) === parentVal) {\n tspan.setAttribute(key, value);\n }\n }\n element.setAttribute(key, value);\n };\n }\n return wrapper;\n }\n /**\n * Utility to return the baseline offset and total line height from the font\n * size.\n *\n * @function Highcharts.SVGRenderer#fontMetrics\n *\n * @param {Highcharts.SVGElement|Highcharts.SVGDOMElement|number} ref\n * The element to inspect for a current font size. If a number is given,\n * it's used as a fall back for direct font size in pixels.\n *\n * @return {Highcharts.FontMetricsObject}\n * The font metrics.\n */\n fontMetrics(ref) {\n const f = isNumber(ref) ? ref : pInt((SVGElement.prototype.getStyle.call(ref, 'font-size') || 0));\n // Empirical values found by comparing font size and bounding box\n // height. Applies to the default font family.\n // https://jsfiddle.net/highcharts/7xvn7/\n const h = f < 24 ? f + 3 : Math.round(f * 1.2), b = Math.round(h * 0.8);\n return {\n // Line height\n h,\n // Baseline\n b,\n // Font size\n f\n };\n }\n /**\n * Correct X and Y positioning of a label for rotation (#1764).\n *\n * @internal\n * @function Highcharts.SVGRenderer#rotCorr\n */\n rotCorr(baseline, rotation, alterY) {\n let y = baseline;\n if (rotation && alterY) {\n y = Math.max(y * Math.cos(rotation * deg2rad), 4);\n }\n return {\n x: (-baseline / 3) * Math.sin(rotation * deg2rad),\n y: y\n };\n }\n /**\n * Compatibility function to convert the legacy one-dimensional path array\n * into an array of segments.\n *\n * It is used in maps to parse the `path` option, and in SVGRenderer.dSetter\n * to support legacy paths from demos.\n *\n * @internal\n * @function Highcharts.SVGRenderer#pathToSegments\n */\n pathToSegments(path) {\n const ret = [];\n const segment = [];\n const commandLength = {\n A: 8,\n C: 7,\n H: 2,\n L: 3,\n M: 3,\n Q: 5,\n S: 5,\n T: 3,\n V: 2\n };\n // Short, non-typesafe parsing of the one-dimensional array. It splits\n // the path on any string. This is not type checked against the tuple\n // types, but is shorter, and doesn't require specific checks for any\n // command type in SVG.\n for (let i = 0; i < path.length; i++) {\n // Command skipped, repeat previous or insert L/l for M/m\n if (isString(segment[0]) &&\n isNumber(path[i]) &&\n segment.length === commandLength[(segment[0].toUpperCase())]) {\n path.splice(i, 0, segment[0].replace('M', 'L').replace('m', 'l'));\n }\n // Split on string\n if (typeof path[i] === 'string') {\n if (segment.length) {\n ret.push(segment.slice(0));\n }\n segment.length = 0;\n }\n segment.push(path[i]);\n }\n ret.push(segment.slice(0));\n return ret;\n /*\n // Fully type-safe version where each tuple type is checked. The\n // downside is filesize and a lack of flexibility for unsupported\n // commands\n const ret: SVGPath = [],\n commands = {\n A: 7,\n C: 6,\n H: 1,\n L: 2,\n M: 2,\n Q: 4,\n S: 4,\n T: 2,\n V: 1,\n Z: 0\n };\n\n let i = 0,\n lastI = 0,\n lastCommand;\n\n while (i < path.length) {\n const item = path[i];\n\n let command;\n\n if (typeof item === 'string') {\n command = item;\n i += 1;\n } else {\n command = lastCommand || 'M';\n }\n\n // Upper case\n const commandUC = command.toUpperCase();\n\n if (commandUC in commands) {\n\n // No numeric parameters\n if (command === 'Z' || command === 'z') {\n ret.push([command]);\n\n // One numeric parameter\n } else {\n const val0 = path[i];\n if (typeof val0 === 'number') {\n\n // Horizontal line to\n if (command === 'H' || command === 'h') {\n ret.push([command, val0]);\n i += 1;\n\n // Vertical line to\n } else if (command === 'V' || command === 'v') {\n ret.push([command, val0]);\n i += 1;\n\n // Two numeric parameters\n } else {\n const val1 = path[i + 1];\n if (typeof val1 === 'number') {\n // lineTo\n if (command === 'L' || command === 'l') {\n ret.push([command, val0, val1]);\n i += 2;\n\n // moveTo\n } else if (command === 'M' || command === 'm') {\n ret.push([command, val0, val1]);\n i += 2;\n\n // Smooth quadratic bezier\n } else if (command === 'T' || command === 't') {\n ret.push([command, val0, val1]);\n i += 2;\n\n // Four numeric parameters\n } else {\n const val2 = path[i + 2],\n val3 = path[i + 3];\n if (\n typeof val2 === 'number' &&\n typeof val3 === 'number'\n ) {\n // Quadratic bezier to\n if (\n command === 'Q' ||\n command === 'q'\n ) {\n ret.push([\n command,\n val0,\n val1,\n val2,\n val3\n ]);\n i += 4;\n\n // Smooth cubic bezier to\n } else if (\n command === 'S' ||\n command === 's'\n ) {\n ret.push([\n command,\n val0,\n val1,\n val2,\n val3\n ]);\n i += 4;\n\n // Six numeric parameters\n } else {\n const val4 = path[i + 4],\n val5 = path[i + 5];\n\n if (\n typeof val4 === 'number' &&\n typeof val5 === 'number'\n ) {\n // Curve to\n if (\n command === 'C' ||\n command === 'c'\n ) {\n ret.push([\n command,\n val0,\n val1,\n val2,\n val3,\n val4,\n val5\n ]);\n i += 6;\n\n // Seven numeric parameters\n } else {\n const val6 = path[i + 6];\n\n // Arc to\n if (\n typeof val6 ===\n 'number' &&\n (\n command === 'A' ||\n command === 'a'\n )\n ) {\n ret.push([\n command,\n val0,\n val1,\n val2,\n val3,\n val4,\n val5,\n val6\n ]);\n i += 7;\n\n }\n\n }\n }\n }\n }\n }\n }\n\n }\n }\n }\n }\n\n // An unmarked command following a moveTo is a lineTo\n lastCommand = command === 'M' ? 'L' : command;\n\n if (i === lastI) {\n break;\n }\n lastI = i;\n }\n return ret;\n */\n }\n /**\n * Draw a label, which is an extended text element with support for border\n * and background. Highcharts creates a `g` element with a text and a `path`\n * or `rect` inside, to make it behave somewhat like a HTML div. Border and\n * background are set through `stroke`, `stroke-width` and `fill` attributes\n * using the {@link Highcharts.SVGElement#attr|attr} method. To update the\n * text after render, run `label.attr({ text: 'New text' })`.\n *\n * @sample highcharts/members/renderer-label-on-chart/\n * A label on the chart\n *\n * @function Highcharts.SVGRenderer#label\n *\n * @param {string} str\n * The initial text string or (subset) HTML to render.\n *\n * @param {number} x\n * The x position of the label's left side.\n *\n * @param {number} [y]\n * The y position of the label's top side or baseline, depending on the\n * `baseline` parameter.\n *\n * @param {string} [shape='rect']\n * The shape of the label's border/background, if any. Defaults to `rect`.\n * Other possible values are `callout` or other shapes defined in\n * {@link Highcharts.SVGRenderer#symbols}.\n *\n * @param {number} [anchorX]\n * In case the `shape` has a pointer, like a flag, this is the coordinates\n * it should be pinned to.\n *\n * @param {number} [anchorY]\n * In case the `shape` has a pointer, like a flag, this is the coordinates\n * it should be pinned to.\n *\n * @param {boolean} [useHTML=false]\n * Whether to use HTML to render the label.\n *\n * @param {boolean} [baseline=false]\n * Whether to position the label relative to the text baseline, like\n * {@link Highcharts.SVGRenderer#text|renderer.text}, or to the upper border\n * of the rectangle.\n *\n * @param {string} [className]\n * Class name for the group.\n *\n * @return {Highcharts.SVGElement}\n * The generated label.\n */\n label(str, x, y, shape, anchorX, anchorY, useHTML, baseline, className) {\n return new SVGLabel(this, str, x, y, shape, anchorX, anchorY, useHTML, baseline, className);\n }\n /**\n * Re-align all aligned elements.\n *\n * @internal\n * @function Highcharts.SVGRenderer#alignElements\n */\n alignElements() {\n this.alignedObjects.forEach((el) => el.align());\n }\n}\nextend(SVGRenderer.prototype, {\n /**\n * A pointer to the renderer's associated Element class.\n *\n * @name Highcharts.SVGRenderer#Element\n * @type {Highcharts.SVGElement}\n */\n Element: SVGElement,\n SVG_NS,\n /**\n * A collection of characters mapped to HTML entities. When `useHTML` on an\n * element is true, these entities will be rendered correctly by HTML. In\n * the SVG pseudo-HTML, they need to be unescaped back to simple characters,\n * so for example `&lt;` will render as `<`.\n *\n * @example\n * // Add support for unescaping quotes\n * Highcharts.SVGRenderer.prototype.escapes['\"'] = '&quot;';\n *\n * @name Highcharts.SVGRenderer#escapes\n * @type {Highcharts.Dictionary<string>}\n */\n escapes: {\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n \"'\": '&#39;', // eslint-disable-line quotes\n '\"': '&quot;'\n },\n /**\n * An extendable collection of functions for defining symbol paths. Each\n * symbol function takes five parameters: `x`, `y`, `width`, `height` and\n * `options`, and returns an `SVGPath` array.\n *\n * @sample highcharts/members/renderer-symbols\n * Renderer symbols overview\n * @sample highcharts/plotoptions/series-marker-symbol\n * Custom marker symbol\n *\n * @name Highcharts.SVGRenderer#symbols\n * @type {Highcharts.SymbolDictionary}\n */\n symbols: Symbols,\n /**\n * Dummy function for plugins, called every time the renderer is updated.\n * Prior to Highcharts 5, this was used for the canvg renderer.\n *\n * @deprecated 5.0.0\n * @function Highcharts.SVGRenderer#draw\n */\n draw: noop\n});\n/* *\n *\n * Compatibility\n *\n * */\nH.Renderer = SVGRenderer;\n/* *\n *\n * Export Default\n *\n * */\nexport default SVGRenderer;\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * A clipping rectangle that can be applied to one or more {@link SVGElement}\n * instances. It is instantiated with the {@link SVGRenderer#clipRect} function\n * and applied with the {@link SVGElement#clip} function.\n *\n * @example\n * let circle = renderer.circle(100, 100, 100)\n * .attr({ fill: 'red' })\n * .add();\n * let clipRect = renderer.clipRect(100, 100, 100, 100);\n *\n * // Leave only the lower right quarter visible\n * circle.clip(clipRect);\n *\n * @typedef {Highcharts.SVGElement} Highcharts.ClipRectElement\n */\n/**\n * The font metrics.\n *\n * @interface Highcharts.FontMetricsObject\n */ /**\n* The baseline relative to the top of the box.\n*\n* @name Highcharts.FontMetricsObject#b\n* @type {number}\n*/ /**\n* The font size.\n*\n* @name Highcharts.FontMetricsObject#f\n* @type {number}\n*/ /**\n* The line height.\n*\n* @name Highcharts.FontMetricsObject#h\n* @type {number}\n*/\n/**\n * An object containing `x` and `y` properties for the position of an element.\n *\n * @interface Highcharts.PositionObject\n */ /**\n* X position of the element.\n* @name Highcharts.PositionObject#x\n* @type {number}\n*/ /**\n* Y position of the element.\n* @name Highcharts.PositionObject#y\n* @type {number}\n*/\n/**\n * A rectangle.\n *\n * @interface Highcharts.RectangleObject\n */ /**\n* Height of the rectangle.\n* @name Highcharts.RectangleObject#height\n* @type {number}\n*/ /**\n* Width of the rectangle.\n* @name Highcharts.RectangleObject#width\n* @type {number}\n*/ /**\n* Horizontal position of the rectangle.\n* @name Highcharts.RectangleObject#x\n* @type {number}\n*/ /**\n* Vertical position of the rectangle.\n* @name Highcharts.RectangleObject#y\n* @type {number}\n*/\n/**\n * The shadow options.\n *\n * @interface Highcharts.ShadowOptionsObject\n */ /**\n* The shadow color.\n* @name Highcharts.ShadowOptionsObject#color\n* @type {Highcharts.ColorString|undefined}\n* @default var(--highcharts-neutral-color-100)\n*/ /**\n* The horizontal offset from the element.\n*\n* @name Highcharts.ShadowOptionsObject#offsetX\n* @type {number|undefined}\n* @default 1\n*/ /**\n* The vertical offset from the element.\n* @name Highcharts.ShadowOptionsObject#offsetY\n* @type {number|undefined}\n* @default 1\n*/ /**\n* The shadow opacity.\n*\n* @name Highcharts.ShadowOptionsObject#opacity\n* @type {number|undefined}\n* @default 0.15\n*/ /**\n* The shadow width or distance from the element.\n* @name Highcharts.ShadowOptionsObject#width\n* @type {number|undefined}\n* @default 3\n*/\n/**\n * @interface Highcharts.SizeObject\n */ /**\n* @name Highcharts.SizeObject#height\n* @type {number}\n*/ /**\n* @name Highcharts.SizeObject#width\n* @type {number}\n*/\n/**\n * Array of path commands, that will go into the `d` attribute of an SVG\n * element.\n *\n * @typedef {Array<(Array<Highcharts.SVGPathCommand>|Array<Highcharts.SVGPathCommand,number>|Array<Highcharts.SVGPathCommand,number,number>|Array<Highcharts.SVGPathCommand,number,number,number,number>|Array<Highcharts.SVGPathCommand,number,number,number,number,number,number>|Array<Highcharts.SVGPathCommand,number,number,number,number,number,number,number>)>} Highcharts.SVGPathArray\n */\n/**\n * Possible path commands in an SVG path array. Valid values are `A`, `C`, `H`,\n * `L`, `M`, `Q`, `S`, `T`, `V`, `Z`.\n *\n * @typedef {string} Highcharts.SVGPathCommand\n * @validvalue [\"a\",\"c\",\"h\",\"l\",\"m\",\"q\",\"s\",\"t\",\"v\",\"z\",\"A\",\"C\",\"H\",\"L\",\"M\",\"Q\",\"S\",\"T\",\"V\",\"Z\"]\n */\n/**\n * An extendable collection of functions for defining symbol paths. Symbols are\n * used internally for point markers, button and label borders and backgrounds,\n * or custom shapes. Extendable by adding to {@link SVGRenderer#symbols}.\n *\n * @interface Highcharts.SymbolDictionary\n */ /**\n* @name Highcharts.SymbolDictionary#[key:string]\n* @type {Function|undefined}\n*/ /**\n* @name Highcharts.SymbolDictionary#arc\n* @type {Function|undefined}\n*/ /**\n* @name Highcharts.SymbolDictionary#callout\n* @type {Function|undefined}\n*/ /**\n* @name Highcharts.SymbolDictionary#circle\n* @type {Function|undefined}\n*/ /**\n* @name Highcharts.SymbolDictionary#diamond\n* @type {Function|undefined}\n*/ /**\n* @name Highcharts.SymbolDictionary#square\n* @type {Function|undefined}\n*/ /**\n* @name Highcharts.SymbolDictionary#triangle\n* @type {Function|undefined}\n*/\n/**\n * Can be one of `arc`, `callout`, `circle`, `diamond`, `square`, `triangle`,\n * and `triangle-down`. Symbols are used internally for point markers, button\n * and label borders and backgrounds, or custom shapes. Extendable by adding to\n * {@link SVGRenderer#symbols}.\n *\n * @typedef {\"arc\"|\"callout\"|\"circle\"|\"diamond\"|\"square\"|\"triangle\"|\"triangle-down\"} Highcharts.SymbolKeyValue\n */\n/**\n * Additional options, depending on the actual symbol drawn.\n *\n * @interface Highcharts.SymbolOptionsObject\n */ /**\n* The anchor X position for the `callout` symbol. This is where the chevron\n* points to.\n*\n* @name Highcharts.SymbolOptionsObject#anchorX\n* @type {number|undefined}\n*/ /**\n* The anchor Y position for the `callout` symbol. This is where the chevron\n* points to.\n*\n* @name Highcharts.SymbolOptionsObject#anchorY\n* @type {number|undefined}\n*/ /**\n* The end angle of an `arc` symbol.\n*\n* @name Highcharts.SymbolOptionsObject#end\n* @type {number|undefined}\n*/ /**\n* Whether to draw `arc` symbol open or closed.\n*\n* @name Highcharts.SymbolOptionsObject#open\n* @type {boolean|undefined}\n*/ /**\n* The radius of an `arc` symbol, or the border radius for the `callout` symbol.\n*\n* @name Highcharts.SymbolOptionsObject#r\n* @type {number|undefined}\n*/ /**\n* The start angle of an `arc` symbol.\n*\n* @name Highcharts.SymbolOptionsObject#start\n* @type {number|undefined}\n*/\n(''); // Keeps doclets above in transpiled file\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport AST from './AST.js';\nimport H from '../../Globals.js';\nconst { composed, isFirefox } = H;\nimport SVGElement from '../SVG/SVGElement.js';\nimport { css, defined, extend, getAlignFactor, isNumber, pInt, pushUnique } from '../../../Shared/Utilities.js';\n/* *\n *\n * Class\n *\n * */\nclass HTMLElement extends SVGElement {\n /**\n * Compose\n * @internal\n */\n static compose(SVGRendererClass) {\n if (pushUnique(composed, 'HTMLElement')) {\n /**\n * Create a HTML text node. This is used by the SVG renderer `text`\n * and `label` functions through the `useHTML` parameter.\n *\n * @internal\n */\n SVGRendererClass.prototype.html = function (str, x, y) {\n return new HTMLElement(this, 'div')\n // Set the default attributes\n .attr({\n text: str,\n x: Math.round(x),\n y: Math.round(y)\n });\n };\n }\n }\n /* *\n *\n * Functions\n *\n * */\n constructor(renderer, nodeName) {\n super(renderer, nodeName);\n this.foreignObject = renderer.createElement('foreignObject')\n .attr({\n zIndex: 2\n });\n this.element.style.whiteSpace = 'nowrap';\n }\n /**\n * Get the correction in X and Y positioning as the element is rotated.\n * @internal\n */\n getSpanCorrection(width, baseline, alignCorrection) {\n this.xCorr = -width * alignCorrection;\n this.yCorr = -baseline;\n }\n /**\n * Apply CSS to HTML elements. This is used in text within SVG rendering.\n * @internal\n */\n css(styles) {\n const { element } = this, \n // When setting or unsetting the width style, we need to update\n // transform (#8809)\n isSettingWidth = styles && 'width' in styles, textWidth = isSettingWidth && styles.width;\n let doTransform;\n if (isSettingWidth) {\n delete styles.width;\n this.textWidth = pInt(textWidth) || void 0;\n doTransform = true;\n }\n // Some properties require other properties to be set\n if (styles?.textOverflow === 'ellipsis') {\n styles.overflow = 'hidden';\n styles.whiteSpace = 'nowrap';\n }\n // Apply line clamp\n if (styles?.lineClamp) {\n styles.display = '-webkit-box';\n styles.WebkitLineClamp = styles.lineClamp;\n styles.WebkitBoxOrient = 'vertical';\n styles.overflow = 'hidden';\n }\n else if (styles?.lineClamp === 0) {\n // Disable the clamp by breaking the -webkit-box context (#22961)\n styles.display = 'inline-block';\n }\n // SVG natively supports setting font size as numbers. With HTML, the\n // font size should behave in the same way (#21624).\n if (isNumber(Number(styles?.fontSize))) {\n styles.fontSize += 'px';\n }\n extend(this.styles, styles);\n css(element, styles);\n // Now that all styles are applied, to the transform\n if (doTransform) {\n this.updateTransform();\n }\n return this;\n }\n /**\n * The useHTML method for calculating the bounding box based on offsets.\n * Called internally from the `SVGElement.getBBox` function and subsequently\n * rotated.\n *\n * @internal\n */\n htmlGetBBox() {\n const { element } = this;\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n }\n /**\n * Batch update styles and attributes related to transform\n *\n * @internal\n */\n updateTransform() {\n // Aligning non added elements is expensive\n if (!this.added) {\n this.alignOnAdd = true;\n return;\n }\n const { element, foreignObject, oldTextWidth, renderer, rotation, scaleX, styles: { display = 'inline-block', whiteSpace }, textAlign = 'left', textWidth, x = 0, y = 0 } = this;\n // Get the pixel length of the text\n const getTextPxLength = () => {\n if (this.textPxLength) {\n return this.textPxLength;\n }\n // Reset multiline/ellipsis in order to read width (#4928, #5417)\n css(element, {\n width: '',\n whiteSpace: whiteSpace || 'nowrap'\n });\n return element.offsetWidth;\n };\n const currentTextTransform = [\n rotation,\n textAlign,\n element.innerHTML,\n textWidth,\n this.textAlign\n ].join(',');\n let baseline;\n css(element, {\n // Inline block must be set before we can read the offset width\n display: 'inline-block',\n verticalAlign: 'top'\n });\n // Update textWidth. Use the memoized textPxLength if possible, to avoid\n // the getTextPxLength function using elem.offsetWidth. Calling\n // offsetWidth affects rendering time as it forces layout (#7656).\n if (textWidth !== oldTextWidth) { // #983, #1254\n const textPxLength = getTextPxLength(), textWidthNum = textWidth || 0, willOverWrap = !renderer.styledMode &&\n element.style.textOverflow === '' &&\n element.style.webkitLineClamp;\n if ((textWidthNum > oldTextWidth ||\n textPxLength > textWidthNum ||\n willOverWrap) && (\n // Only set the width if the text is able to word-wrap, or\n // text-overflow is ellipsis (#9537)\n /[\\-\\s\\u00AD]/.test(element.textContent || element.innerText) ||\n element.style.textOverflow === 'ellipsis')) {\n const usePxWidth = rotation ||\n scaleX ||\n textPxLength > textWidthNum;\n css(element, {\n // #16261\n width: usePxWidth && isNumber(textWidth) ?\n textWidth + 'px' :\n // Set width to prevent over-wrapping (#22609)\n (willOverWrap ?\n Math.min(\n // +1 for rounding errors\n textPxLength + 1, textWidthNum) + 'px' :\n 'auto'),\n display,\n whiteSpace: whiteSpace || 'normal' // #3331\n });\n this.oldTextWidth = textWidth;\n }\n }\n // In many cases (Firefox always, others on title layout) we need the\n // foreign object to have a larger width and height than its content, in\n // order to read its content's size\n foreignObject.attr({\n width: renderer.width,\n height: renderer.height\n });\n // Do the calculations and DOM access only if properties changed\n if (currentTextTransform !== this.cTT) {\n baseline = renderer.fontMetrics(element).b;\n this.getSpanCorrection(\n // Avoid elem.offsetWidth if we can, it affects rendering time\n // heavily (#7656)\n ((!defined(rotation) &&\n !this.textWidth &&\n this.textPxLength) || // #7920\n element.offsetWidth), baseline, getAlignFactor(textAlign));\n }\n // Move the foreign object\n super.updateTransform();\n if (isNumber(x) && isNumber(y)) {\n foreignObject.attr({\n x: x + (this.xCorr || 0),\n y: y + (this.yCorr || 0),\n // Add 4px to avoid ellipsis, since the body adds 3 px right\n // margin. We need one more because of rounding.\n width: element.offsetWidth + 4,\n // Add 1px to account for subpixel bounding boxes\n height: element.offsetHeight + 1,\n 'transform-origin': element\n .getAttribute('transform-origin') || '0 0'\n });\n // Reset, otherwise lineClamp will not work\n css(element, { display, textAlign });\n }\n else if (isFirefox) {\n foreignObject.attr({\n width: 0,\n height: 0\n });\n }\n // Record current text transform\n this.cTT = currentTextTransform;\n }\n /**\n * Add the element to a group wrapper. For HTML elements, a parallel div\n * will be created for each ancestor SVG `g` element.\n *\n * @internal\n */\n add(parentGroup) {\n const { foreignObject, renderer } = this;\n // Foreign object\n foreignObject.add(parentGroup);\n super.add(\n // Create a body inside the foreignObject\n renderer.createElement('body')\n .attr({ xmlns: 'http://www.w3.org/1999/xhtml' })\n .css({\n background: 'transparent',\n // 3px is to avoid clipping on the right\n margin: '0 3px 0 0'\n })\n .add(foreignObject));\n if (this.alignOnAdd) {\n this.updateTransform();\n }\n return this;\n }\n /**\n * Text setter\n * @internal\n */\n textSetter(value) {\n if (value !== this.textStr) {\n delete this.oldTextWidth;\n AST.setElementHTML(this.element, value ?? '');\n this.textStr = value;\n this.doTransform = true;\n }\n }\n /**\n * Align setter\n *\n * @internal\n */\n alignSetter(value) {\n this.alignValue = this.textAlign = value;\n this.doTransform = true;\n }\n /**\n * Various setters which rely on update transform\n * @internal\n */\n xSetter(value, key) {\n this[key] = value;\n this.doTransform = true;\n }\n}\n// Some shared setters\nconst proto = HTMLElement.prototype;\nproto.ySetter = proto.xSetter;\n/* *\n *\n * Default Export\n *\n * */\nexport default HTMLElement;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\n/* *\n *\n * Namespace\n *\n * */\nvar AxisDefaults;\n(function (AxisDefaults) {\n /* *\n *\n * Constants\n *\n * */\n /**\n * The X axis or category axis. Normally this is the horizontal axis,\n * though if the chart is inverted this is the vertical axis. In case of\n * multiple axes, the xAxis node is an array of configuration objects.\n *\n * See the [Axis class](/class-reference/Highcharts.Axis) for programmatic\n * access to the axis.\n *\n * @productdesc {highmaps}\n * In Highmaps, the axis is hidden, but it is used behind the scenes to\n * control features like zooming and panning. Zooming is in effect the same\n * as setting the extremes of one of the exes.\n *\n * @type {*|Array<*>}\n * @optionparent xAxis\n */\n AxisDefaults.xAxis = {\n /**\n * When using multiple axis, the ticks of two or more opposite axes\n * will automatically be aligned by adding ticks to the axis or axes\n * with the least ticks, as if `tickAmount` were specified.\n *\n * This can be prevented by setting `alignTicks` to false. If the grid\n * lines look messy, it's a good idea to hide them for the secondary\n * axis by setting `gridLineWidth` to 0.\n *\n * If `startOnTick` or `endOnTick` in an Axis options are set to false,\n * then the `alignTicks ` will be disabled for the Axis.\n *\n * Disabled for logarithmic axes.\n *\n * @product highcharts highstock gantt\n */\n alignTicks: true,\n /**\n * Whether to allow decimals in this axis' ticks. When counting\n * integers, like persons or hits on a web page, decimals should\n * be avoided in the labels. By default, decimals are allowed on small\n * scale axes.\n *\n * @see [minTickInterval](#xAxis.minTickInterval)\n *\n * @sample {highcharts|highstock} highcharts/yaxis/allowdecimals-true/\n * True by default\n * @sample {highcharts|highstock} highcharts/yaxis/allowdecimals-false/\n * False\n *\n * @type {boolean|undefined}\n * @default undefined\n * @since 2.0\n */\n allowDecimals: void 0,\n /**\n * When using an alternate grid color, a band is painted across the\n * plot area between every other grid line.\n *\n * @sample {highcharts} highcharts/yaxis/alternategridcolor/\n * Alternate grid color on the Y axis\n * @sample {highstock} stock/xaxis/alternategridcolor/\n * Alternate grid color on the Y axis\n *\n * @type {Highcharts.ColorType}\n * @apioption xAxis.alternateGridColor\n */\n /**\n * An array defining breaks in the axis, the sections defined will be\n * left out and all the points shifted closer to each other.\n *\n * @productdesc {highcharts}\n * Requires that the broken-axis.js module is loaded.\n *\n * @sample {highcharts} highcharts/axisbreak/break-simple/\n * Simple break\n * @sample {highcharts|highstock} highcharts/axisbreak/break-visualized/\n * Advanced with callback\n * @sample {highstock} stock/demo/intraday-breaks/\n * Break on nights and weekends\n *\n * @type {Array<*>}\n * @since 4.1.0\n * @product highcharts highstock gantt\n * @apioption xAxis.breaks\n */\n /**\n * A number indicating how much space should be left between the start\n * and the end of the break. The break size is given in axis units,\n * so for instance on a `datetime` axis, a break size of 3600000 would\n * indicate the equivalent of an hour.\n *\n * @type {number}\n * @default 0\n * @since 4.1.0\n * @product highcharts highstock gantt\n * @apioption xAxis.breaks.breakSize\n */\n /**\n * The axis value where the break starts. On datetime axes, this may be\n * a date string.\n *\n * @type {number|string}\n * @since 4.1.0\n * @product highcharts highstock gantt\n * @apioption xAxis.breaks.from\n */\n /**\n * Defines an interval after which the break appears again. By default\n * the breaks do not repeat.\n *\n * @type {number}\n * @default 0\n * @since 4.1.0\n * @product highcharts highstock gantt\n * @apioption xAxis.breaks.repeat\n */\n /**\n * The axis value where the break ends. On datetime axes, this may be\n * a date string.\n *\n * @type {number|string}\n * @since 4.1.0\n * @product highcharts highstock gantt\n * @apioption xAxis.breaks.to\n */\n /**\n * If categories are present for the xAxis, names are used instead of\n * numbers for that axis.\n *\n * Since Highcharts 3.0, categories can also\n * be extracted by giving each point a [name](#series.data) and setting\n * axis [type](#xAxis.type) to `category`. However, if you have multiple\n * series, best practice remains defining the `categories` array.\n *\n * Example: `categories: ['Apples', 'Bananas', 'Oranges']`\n *\n * @sample {highcharts} highcharts/demo/line-labels/\n * With\n * @sample {highcharts} highcharts/xaxis/categories/\n * Without\n *\n * @type {Array<string>}\n * @product highcharts gantt\n * @apioption xAxis.categories\n */\n /**\n * The highest allowed value for automatically computed axis extremes.\n *\n * @see [floor](#xAxis.floor)\n *\n * @sample {highcharts|highstock} highcharts/yaxis/floor-ceiling/\n * Floor and ceiling\n *\n * @type {number}\n * @since 4.0\n * @product highcharts highstock gantt\n * @apioption xAxis.ceiling\n */\n /**\n * A class name that opens for styling the axis by CSS, especially in\n * Highcharts styled mode. The class name is applied to group elements\n * for the grid, axis elements and labels.\n *\n * @sample {highcharts|highstock|highmaps} highcharts/css/axis/\n * Multiple axes with separate styling\n *\n * @type {string}\n * @since 5.0.0\n * @apioption xAxis.className\n */\n /**\n * Configure a crosshair that follows either the mouse pointer or the\n * hovered point.\n *\n * Support boolean or object definition. If `true`, a crosshair with\n * default settings will be displayed.\n *\n * In styled mode, the crosshairs are styled in the\n * `.highcharts-crosshair`, `.highcharts-crosshair-thin` or\n * `.highcharts-xaxis-category` classes.\n *\n * @productdesc {highstock}\n * In Highcharts stock, by default, the crosshair is enabled on the\n * X axis and disabled on the Y axis.\n *\n * @sample {highcharts} highcharts/xaxis/crosshair-both/\n * Crosshair on both axes\n * @sample {highstock} stock/xaxis/crosshairs-xy/\n * Crosshair on both axes, with y axis label\n * @sample {highmaps} highcharts/xaxis/crosshair-both/\n * Crosshair on both axes\n *\n * @declare Highcharts.AxisCrosshairOptions\n * @type {boolean|*}\n * @default false\n * @since 4.1\n * @apioption xAxis.crosshair\n */\n /**\n * A class name for the crosshair, especially as a hook for styling.\n *\n * @type {string}\n * @since 5.0.0\n * @apioption xAxis.crosshair.className\n */\n /**\n * The color of the crosshair. Defaults to `#cccccc` for numeric and\n * datetime axes, and `rgba(204,214,235,0.25)` for category axes, where\n * the crosshair by default highlights the whole category.\n *\n * @sample {highcharts|highstock|highmaps} highcharts/xaxis/crosshair-customized/\n * Customized crosshairs\n *\n * @type {Highcharts.ColorType}\n * @default #cccccc\n * @since 4.1\n * @apioption xAxis.crosshair.color\n */\n /**\n * The dash style for the crosshair. See\n * [plotOptions.series.dashStyle](#plotOptions.series.dashStyle)\n * for possible values.\n *\n * @sample {highcharts|highmaps} highcharts/xaxis/crosshair-dotted/\n * Dotted crosshair\n * @sample {highstock} stock/xaxis/crosshair-dashed/\n * Dashed X axis crosshair\n *\n * @type {Highcharts.DashStyleValue}\n * @default Solid\n * @since 4.1\n * @apioption xAxis.crosshair.dashStyle\n */\n /**\n * A label on the axis next to the crosshair.\n *\n * In styled mode, the label is styled with the\n * `.highcharts-crosshair-label` class.\n *\n * @sample {highstock} stock/xaxis/crosshair-label/\n * Crosshair labels\n * @sample {highstock} highcharts/css/crosshair-label/\n * Style mode\n *\n * @declare Highcharts.AxisCrosshairLabelOptions\n * @since 2.1\n * @product highstock\n * @apioption xAxis.crosshair.label\n */\n /**\n * Alignment of the label compared to the axis. Defaults to `\"left\"` for\n * right-side axes, `\"right\"` for left-side axes and `\"center\"` for\n * horizontal axes.\n *\n * @type {Highcharts.AlignValue}\n * @since 2.1\n * @product highstock\n * @apioption xAxis.crosshair.label.align\n */\n /**\n * The background color for the label. Defaults to the related series\n * color, or `#666666` if that is not available.\n *\n * @type {Highcharts.ColorType}\n * @since 2.1\n * @product highstock\n * @apioption xAxis.crosshair.label.backgroundColor\n */\n /**\n * The border color for the crosshair label\n *\n * @type {Highcharts.ColorType}\n * @since 2.1\n * @product highstock\n * @apioption xAxis.crosshair.label.borderColor\n */\n /**\n * The border corner radius of the crosshair label.\n *\n * @type {number}\n * @default 3\n * @since 2.1.10\n * @product highstock\n * @apioption xAxis.crosshair.label.borderRadius\n */\n /**\n * The border width for the crosshair label.\n *\n * @type {number}\n * @default 0\n * @since 2.1\n * @product highstock\n * @apioption xAxis.crosshair.label.borderWidth\n */\n /**\n * Flag to enable crosshair's label.\n *\n * @sample {highstock} stock/xaxis/crosshairs-xy/\n * Enabled label for yAxis' crosshair\n *\n * @type {boolean}\n * @default false\n * @since 2.1\n * @product highstock\n * @apioption xAxis.crosshair.label.enabled\n */\n /**\n * A format string for the crosshair label. Defaults to `{value}` for\n * numeric axes and `{value:%b %d, %Y}` for datetime axes.\n *\n * @type {string}\n * @since 2.1\n * @product highstock\n * @apioption xAxis.crosshair.label.format\n */\n /**\n * Formatter function for the label text.\n * Since v12.6.0, the callback also receives `ctx` as the second\n * argument, so that arrow functions can access the same context as\n * regular functions using `this`.\n *\n * @type {Highcharts.XAxisCrosshairLabelFormatterCallbackFunction}\n * @since 2.1\n * @product highstock\n * @apioption xAxis.crosshair.label.formatter\n */\n /**\n * Padding inside the crosshair label.\n *\n * @type {number}\n * @default 8\n * @since 2.1\n * @product highstock\n * @apioption xAxis.crosshair.label.padding\n */\n /**\n * The shape to use for the label box.\n *\n * @type {string}\n * @default callout\n * @since 2.1\n * @product highstock\n * @apioption xAxis.crosshair.label.shape\n */\n /**\n * Text styles for the crosshair label.\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"white\", \"fontWeight\": \"normal\", \"fontSize\": \"11px\", \"textAlign\": \"center\"}\n * @since 2.1\n * @product highstock\n * @apioption xAxis.crosshair.label.style\n */\n /**\n * The number of milliseconds to wait until the crosshair is shown when\n * the mouse is over a point. Works on initial hover.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/showdelay/\n * Show crosshair after 2 seconds\n *\n * @type {number}\n * @default 0\n * @since 12.6.0\n * @apioption xAxis.crosshair.showDelay\n */\n /**\n * Whether the crosshair should snap to the point or follow the pointer\n * independent of points.\n *\n * @sample {highcharts|highstock} highcharts/xaxis/crosshair-snap-false/\n * True by default\n * @sample {highmaps} maps/demo/latlon-advanced/\n * Snap is false\n *\n * @type {boolean}\n * @default true\n * @since 4.1\n * @apioption xAxis.crosshair.snap\n */\n /**\n * The pixel width of the crosshair. Defaults to 1 for numeric or\n * datetime axes, and for one category width for category axes.\n *\n * @sample {highcharts} highcharts/xaxis/crosshair-customized/\n * Customized crosshairs\n * @sample {highstock} highcharts/xaxis/crosshair-customized/\n * Customized crosshairs\n * @sample {highmaps} highcharts/xaxis/crosshair-customized/\n * Customized crosshairs\n *\n * @type {number}\n * @default 1\n * @since 4.1\n * @apioption xAxis.crosshair.width\n */\n /**\n * The Z index of the crosshair. Higher Z indices allow drawing the\n * crosshair on top of the series or behind the grid lines.\n *\n * @type {number}\n * @default 2\n * @since 4.1\n * @apioption xAxis.crosshair.zIndex\n */\n /**\n * The value on a perpendicular axis where this axis should cross. This\n * is typically used on mathematical plots where the axes cross at 0.\n * When `crossing` is set, space will not be reserved at the sides of\n * the chart for axis labels and title, so those may be clipped. In this\n * case it is better to place the axes without the `crossing` option.\n *\n * @type {number}\n * @sample highcharts/xaxis/crossing\n * Function plot with axes crossing at 0\n * @since 11.0.1\n * @apioption xAxis.crossing\n */\n /**\n * Whether to pan axis. If `chart.panning` is enabled, the option\n * allows to disable panning on an individual axis.\n */\n panningEnabled: true,\n /**\n * The Z index for the axis group.\n *\n * @see [axis.gridZIndex](#xAxis.gridZIndex)\n * @see [axis.labels.zIndex](#xAxis.labels.zIndex)\n */\n zIndex: 2,\n /**\n * Whether to zoom axis. If `chart.zoomType` is set, the option allows\n * to disable zooming on an individual axis.\n *\n * @sample {highcharts} highcharts/xaxis/zoomenabled/\n * Zoom enabled is false\n */\n zoomEnabled: true,\n /**\n * For a datetime axis, the scale will automatically adjust to the\n * appropriate unit. This member gives the default representations used\n * for each unit. For easier data interpretation, `hour`, `day`, `month`\n * and `year` units can be used and formatted as boundary tick values.\n * Check boundaries map below to see where to format boundary ticks on\n * given main time units.\n *\n * ```js\n * baseUnit: boundaryUnit\n * ----------------------\n * millisecond: 'hour',\n * second: 'hour',\n * minute: 'hour',\n * hour: 'day',\n * day: 'month',\n * week: 'month',\n * month: 'year',\n * year: 'year'\n * ```\n *\n * For an overview of the date time label formats configuration, see\n * [dateFormat](/class-reference/Highcharts.Time#dateFormat).\n *\n * Defaults to:\n * ```js\n * {\n * millisecond: { main: '%[HMSL]' },\n * second: { main: '%[HMS]' },\n * minute: { main: '%[HM]' },\n * hour: { main: '%[HM]', boundary: undefined },\n * day: { main: '%[eb]', boundary: '%[eb]' },\n * week: { main: '%[eb]' },\n * month: { main: '%[bY]', boundary: undefined },\n * year: { main: '%Y', boundary: undefined }\n * }\n * ```\n *\n * @productdesc {gantt}\n * For grid axes (like in Gantt charts),\n * it is possible to declare as a list to provide different\n * formats depending on available space.\n *\n * Defaults to:\n * ```js\n * {\n * hour: { list: ['%H:%M', '%H'] },\n * day: { list: ['%A, %e. %B', '%a, %e. %b', '%E'] },\n * week: { list: ['Week %W', 'W%W'] },\n * month: { list: ['%B', '%b', '%o'] }\n * }\n * ```\n *\n * @sample {highcharts} highcharts/xaxis/datetimelabelformats-object/\n * Object day format on X axis\n * @sample {highcharts} highcharts/xaxis/datetimelabelformats/\n * String day format on X axis\n * @sample {highcharts} highcharts/xaxis/labels-boundary/\n * Month boundary on daily ticks\n * @sample {highcharts} highcharts/xaxis/labels-boundary-format/\n * Using axis labels format to format boundary labels\n * @sample {highstock} stock/xaxis/datetimelabelformats/\n * More information in x axis labels\n * @sample {highstock} stock/xaxis/labels-boundary/\n * Year boundary on monthly ticks\n * @sample {gantt} gantt/grid-axis/date-time-label-formats\n * Gantt chart with custom axis date format.\n *\n * @declare Highcharts.AxisDateTimeLabelFormatsOptions\n * @product highcharts highstock gantt\n */\n dateTimeLabelFormats: {\n /**\n * @declare Highcharts.AxisDateTimeLabelFormatsOptionsObject\n */\n millisecond: {\n /**\n * List of possible format strings used for this unit.\n *\n * @type {Array<string|Highcharts.DateTimeFormatOptions>}\n * @apioption xAxis.dateTimeLabelFormats.millisecond.list\n */\n /**\n * @apioption xAxis.dateTimeLabelFormats.millisecond.main\n */\n main: '%[HMSL]',\n /**\n * When `false`, this time unit is treated as a point in time\n * rather than a range. In Gantt charts, when grid axis is\n * enabled, point-in-time ticks get left-aligned in the grid\n * cell by default.\n *\n * @product gantt\n * @apioption xAxis.dateTimeLabelFormats.millisecond.range\n */\n range: false\n },\n /**\n * @declare Highcharts.AxisDateTimeLabelFormatsOptionsObject\n */\n second: {\n /**\n * List of possible format strings used for this unit.\n *\n * @type {Array<string|Highcharts.DateTimeFormatOptions>}\n * @apioption xAxis.dateTimeLabelFormats.second.list\n */\n /**\n * @apioption xAxis.dateTimeLabelFormats.second.main\n */\n main: '%[HMS]',\n /**\n * When `false`, this time unit is treated as a point in time\n * rather than a range. In Gantt charts, when grid axis is\n * enabled, point-in-time ticks get left-aligned in the grid\n * cell by default.\n *\n * @product gantt\n * @apioption xAxis.dateTimeLabelFormats.second.range\n */\n range: false\n },\n /**\n * @declare Highcharts.AxisDateTimeLabelFormatsOptionsObject\n */\n minute: {\n /**\n * List of possible format strings used for this unit.\n *\n * @type {Array<string|Highcharts.DateTimeFormatOptions>}\n * @apioption xAxis.dateTimeLabelFormats.minute.list\n */\n /**\n * @apioption xAxis.dateTimeLabelFormats.minute.main\n */\n main: '%[HM]',\n /**\n * When `false`, this time unit is treated as a point in time\n * rather than a range. In Gantt charts, when grid axis is\n * enabled, point-in-time ticks get left-aligned in the grid\n * cell by default.\n *\n * @product gantt\n * @apioption xAxis.dateTimeLabelFormats.minute.range\n */\n range: false\n },\n /**\n * @declare Highcharts.AxisDateTimeLabelFormatsOptionsObject\n */\n hour: {\n /**\n * List of possible format strings used for this unit.\n *\n * @type {Array<string|Highcharts.DateTimeFormatOptions>}\n * @apioption xAxis.dateTimeLabelFormats.hour.list\n */\n /**\n * @apioption xAxis.dateTimeLabelFormats.hour.main\n */\n main: '%[HM]',\n /**\n * Label format that should be used when a tick is a boundary\n * tick, e.g. start of day, start of year, etc.\n *\n * @apioption xAxis.dateTimeLabelFormats.hour.boundary\n */\n boundary: void 0,\n /**\n * When `false`, this time unit is treated as a point in time\n * rather than a range. In Gantt charts, when grid axis is\n * enabled, point-in-time ticks get left-aligned in the grid\n * cell by default.\n *\n * @product gantt\n * @apioption xAxis.dateTimeLabelFormats.hour.range\n */\n range: false\n },\n /**\n * @declare Highcharts.AxisDateTimeLabelFormatsOptionsObject\n */\n day: {\n /**\n * List of possible format strings used for this unit.\n *\n * @type {Array<string|Highcharts.DateTimeFormatOptions>}\n * @apioption xAxis.dateTimeLabelFormats.day.list\n */\n /**\n * @apioption xAxis.dateTimeLabelFormats.day.main\n */\n main: '%[eb]',\n /**\n * Label format that should be used when a tick is a boundary\n * tick, e.g. start of day, start of year, etc.\n *\n * @apioption xAxis.dateTimeLabelFormats.day.boundary\n */\n boundary: '%[eb]'\n },\n /**\n * @declare Highcharts.AxisDateTimeLabelFormatsOptionsObject\n */\n week: {\n /**\n * List of possible format strings used for this unit.\n *\n * @type {Array<string|Highcharts.DateTimeFormatOptions>}\n * @apioption xAxis.dateTimeLabelFormats.week.list\n */\n /**\n * @apioption xAxis.dateTimeLabelFormats.week.main\n */\n main: '%[eb]'\n },\n /**\n * @declare Highcharts.AxisDateTimeLabelFormatsOptionsObject\n */\n month: {\n /**\n * List of possible format strings used for this unit.\n *\n * @type {Array<string|Highcharts.DateTimeFormatOptions>}\n * @apioption xAxis.dateTimeLabelFormats.month.list\n */\n /**\n * @apioption xAxis.dateTimeLabelFormats.month.main\n */\n main: '%[bY]',\n /**\n * Label format that should be used when a tick is a boundary\n * tick, e.g. start of day, start of year, etc.\n *\n * @apioption xAxis.dateTimeLabelFormats.month.boundary\n */\n boundary: void 0\n },\n /**\n * @declare Highcharts.AxisDateTimeLabelFormatsOptionsObject\n */\n year: {\n /**\n * List of possible format strings used for this unit.\n *\n * @type {Array<string|Highcharts.DateTimeFormatOptions>}\n * @apioption xAxis.dateTimeLabelFormats.year.list\n */\n /**\n * @apioption xAxis.dateTimeLabelFormats.year.main\n */\n main: '%[Y]',\n /**\n * Label format that should be used when a tick is a boundary\n * tick, e.g. start of day, start of year, etc.\n *\n * @apioption xAxis.dateTimeLabelFormats.year.boundary\n */\n boundary: void 0\n }\n },\n /**\n * Whether to force the axis to end on a tick. Use this option with\n * the `maxPadding` option to control the axis end.\n *\n * @productdesc {highstock}\n * In Highcharts Stock, `endOnTick` is always `false` when the navigator\n * is enabled, to prevent jumpy scrolling. With disabled navigator\n * enabling `endOnTick` may lead to extending the xAxis to show the last\n * tick, therefore range selector buttons may not have an active state\n * if the axis gets extended.\n *\n * @sample {highcharts} highcharts/yaxis/endontick/\n * True by default\n * @sample {highcharts} highcharts/yaxis/endontick-false/\n * False\n * @sample {highstock} stock/demo/basic-line/\n * True by default\n * @sample {highstock} stock/xaxis/endontick/\n * False\n *\n * @since 1.2.0\n */\n endOnTick: false,\n /**\n * Event handlers for the axis.\n *\n * @type {*}\n * @apioption xAxis.events\n */\n /**\n * An event fired after the breaks have rendered.\n *\n * @see [breaks](#xAxis.breaks)\n *\n * @sample {highcharts} highcharts/axisbreak/break-event/\n * AfterBreak Event\n *\n * @type {Highcharts.AxisEventCallbackFunction}\n * @since 4.1.0\n * @product highcharts gantt\n * @apioption xAxis.events.afterBreaks\n */\n /**\n * As opposed to the `setExtremes` event, this event fires after the\n * final min and max values are computed and corrected for `minRange`.\n *\n * Fires when the minimum and maximum is set for the axis, either by\n * calling the `.setExtremes()` method or by selecting an area in the\n * chart. One parameter, `event`, is passed to the function, containing\n * common event information.\n *\n * The new user set minimum and maximum values can be found by\n * `event.min` and `event.max`. These reflect the axis minimum and\n * maximum in axis values. The actual data extremes are found in\n * `event.dataMin` and `event.dataMax`.\n *\n * @type {Highcharts.AxisSetExtremesEventCallbackFunction}\n * @since 2.3\n * @context Highcharts.Axis\n * @apioption xAxis.events.afterSetExtremes\n */\n /**\n * An event fired when a break from this axis occurs on a point.\n *\n * @see [breaks](#xAxis.breaks)\n *\n * @sample {highcharts} highcharts/axisbreak/break-visualized/\n * Visualization of a Break\n *\n * @type {Highcharts.AxisPointBreakEventCallbackFunction}\n * @since 4.1.0\n * @product highcharts gantt\n * @context Highcharts.Axis\n * @apioption xAxis.events.pointBreak\n */\n /**\n * An event fired when a point falls inside a break from this axis.\n *\n * @type {Highcharts.AxisPointBreakEventCallbackFunction}\n * @product highcharts highstock gantt\n * @context Highcharts.Axis\n * @apioption xAxis.events.pointInBreak\n */\n /**\n * Fires when the minimum and maximum is set for the axis, either by\n * calling the `.setExtremes()` method or by selecting an area in the\n * chart. One parameter, `event`, is passed to the function,\n * containing common event information.\n *\n * The new user set minimum and maximum values can be found by\n * `event.min` and `event.max`. These reflect the axis minimum and\n * maximum in data values. When an axis is zoomed all the way out from\n * the \"Reset zoom\" button, `event.min` and `event.max` are null, and\n * the new extremes are set based on `this.dataMin` and `this.dataMax`.\n *\n * @sample {highstock} stock/xaxis/events-setextremes/\n * Log new extremes on x axis\n *\n * @type {Highcharts.AxisSetExtremesEventCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Axis\n * @apioption xAxis.events.setExtremes\n */\n /**\n * The lowest allowed value for automatically computed axis extremes.\n *\n * @see [ceiling](#yAxis.ceiling)\n *\n * @sample {highcharts} highcharts/yaxis/floor-ceiling/\n * Floor and ceiling\n * @sample {highstock} stock/demo/lazy-loading/\n * Prevent negative stock price on Y axis\n *\n * @type {number}\n * @since 4.0\n * @product highcharts highstock gantt\n * @apioption xAxis.floor\n */\n /**\n * The dash or dot style of the grid lines. For possible values, see\n * [this demonstration](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-dashstyle-all/).\n *\n * @sample {highcharts} highcharts/yaxis/gridlinedashstyle/\n * Long dashes\n * @sample {highstock} stock/xaxis/gridlinedashstyle/\n * Long dashes\n *\n * @type {Highcharts.DashStyleValue}\n * @since 1.2\n */\n gridLineDashStyle: 'Solid',\n /**\n * The Z index of the grid lines.\n *\n * @sample {highcharts|highstock} highcharts/xaxis/gridzindex/\n * A Z index of 4 renders the grid above the graph\n *\n * @product highcharts highstock gantt\n *\n * @see [axis.zIndex](#xAxis.zIndex)\n * @see [axis.labels.zIndex](#xAxis.labels.zIndex)\n */\n gridZIndex: 1,\n /**\n * An id for the axis. This can be used after render time to get\n * a pointer to the axis object through `chart.get()`.\n *\n * @sample {highcharts} highcharts/xaxis/id/\n * Get the object\n * @sample {highstock} stock/xaxis/id/\n * Get the object\n *\n * @type {string}\n * @since 1.2.0\n * @apioption xAxis.id\n */\n /**\n * The axis labels show the number or category for each tick.\n *\n * Since v8.0.0: Labels are animated in categorized x-axis with\n * updating data if `tickInterval` and `step` is set to 1.\n *\n * @productdesc {highmaps}\n * X and Y axis labels are by default disabled in Highmaps, but the\n * functionality is inherited from Highcharts and used on `colorAxis`,\n * and can be enabled on X and Y axes too.\n */\n labels: {\n /**\n * What part of the string the given position is anchored to.\n * If `left`, the left side of the string is at the axis position.\n * Can be one of `\"left\"`, `\"center\"` or `\"right\"`. Defaults to\n * an intelligent guess based on which side of the chart the axis\n * is on and the rotation of the label.\n *\n * @see [reserveSpace](#xAxis.labels.reserveSpace)\n *\n * @sample {highcharts} highcharts/xaxis/labels-align-left/\n * Left\n * @sample {highcharts} highcharts/xaxis/labels-align-right/\n * Right\n * @sample {highcharts} highcharts/xaxis/labels-reservespace-true/\n * Left-aligned labels on a vertical category axis\n *\n * @type {Highcharts.AlignValue}\n * @apioption xAxis.labels.align\n */\n /**\n * Whether to allow the axis labels to overlap. When false,\n * overlapping labels are hidden.\n *\n * @sample {highcharts} highcharts/xaxis/labels-allowoverlap-true/\n * X axis labels overlap enabled\n *\n * @type {boolean}\n * @default false\n * @apioption xAxis.labels.allowOverlap\n */\n /**\n * For horizontal axes, the allowed degrees of label rotation\n * to prevent overlapping labels. If there is enough space,\n * labels are not rotated. As the chart gets narrower, it\n * will start rotating the labels -45 degrees, then remove\n * every second label and try again with rotations 0 and -45 etc.\n * Set it to `undefined` to disable rotation, which will\n * cause the labels to word-wrap if possible. Defaults to `[-45]``\n * on bottom and top axes, `undefined` on left and right axes.\n *\n * @sample {highcharts|highstock} highcharts/xaxis/labels-autorotation-default/\n * Default auto rotation of 0 or -45\n * @sample {highcharts|highstock} highcharts/xaxis/labels-autorotation-0-90/\n * Custom graded auto rotation\n *\n * @type {Array<number>}\n * @default undefined\n * @since 4.1.0\n * @product highcharts highstock gantt\n * @apioption xAxis.labels.autoRotation\n */\n /**\n * When each category width is more than this many pixels, we don't\n * apply auto rotation. Instead, we lay out the axis label with word\n * wrap. A lower limit makes sense when the label contains multiple\n * short words that don't extend the available horizontal space for\n * each label.\n *\n * @sample {highcharts} highcharts/xaxis/labels-autorotationlimit/\n * Lower limit\n *\n * @since 4.1.5\n * @product highcharts gantt\n */\n autoRotationLimit: 80,\n /**\n * The label's pixel distance from the perimeter of the plot area.\n * On cartesian charts, this is overridden if the `labels.y` setting\n * is set.\n *\n * @sample {highcharts} highcharts/yaxis/labels-distance/\n * Polar chart, labels centered under the arc\n *\n * @type {number}\n * @product highcharts gantt\n */\n distance: 15,\n /**\n * Enable or disable the axis labels.\n *\n * @sample {highcharts} highcharts/xaxis/labels-enabled/\n * X axis labels disabled\n * @sample {highstock} stock/xaxis/labels-enabled/\n * X axis labels disabled\n *\n */\n enabled: true,\n /**\n * A format string for the axis label. The context is available as\n * format string variables. For example, you can use `{text}` to\n * insert the default formatted text. The recommended way of adding\n * units for the label is using `text`, for example `{text} km`.\n *\n * To add custom numeric or datetime formatting, use `{value}` with\n * formatting, for example `{value:.1f}` or `{value:%Y-%m-%d}`.\n *\n * See\n * [format string](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)\n * for more examples of formatting.\n *\n * The default value is not specified due to the dynamic\n * nature of the default implementation.\n *\n * @sample {highcharts|highstock} highcharts/yaxis/labels-format/\n * Add units to Y axis label\n * @sample {highcharts} highcharts/xaxis/labels-format-linked/\n * Linked category names\n * @sample {highcharts} highcharts/xaxis/labels-format-custom/\n * Custom number format\n * @sample {highstock} stock/xaxis/labels-format/\n * Added units on Y axis\n *\n * @type {string}\n * @since 3.0\n * @apioption xAxis.labels.format\n */\n /**\n * Callback JavaScript function to format the label. The value\n * is given by `this.value`. Additional properties for `this` are\n * `axis`, `chart`, `isFirst`, `isLast` and `text` which holds the\n * value of the default formatter. Since v12.6.0, the callback also\n * receives `ctx` as the first argument, so that arrow functions can\n * access the same context as regular functions using `this`.\n *\n * Defaults to a built in function returning a formatted string\n * depending on whether the axis is `category`, `datetime`,\n * `numeric` or other.\n *\n * @sample {highcharts} highcharts/xaxis/labels-formatter-linked/\n * Linked category names\n * @sample {highcharts} highcharts/xaxis/labels-formatter-extended/\n * Modified numeric labels\n * @sample {highstock} stock/xaxis/labels-formatter/\n * Added units on Y axis\n *\n * @type {Highcharts.AxisLabelsFormatterCallbackFunction}\n * @apioption xAxis.labels.formatter\n */\n /**\n * The number of pixels to indent the labels per level in a treegrid\n * axis.\n *\n * @sample gantt/treegrid-axis/demo\n * Indentation 10px by default.\n * @sample gantt/treegrid-axis/indentation-0px\n * Indentation set to 0px.\n *\n * @product gantt\n */\n indentation: 10,\n /**\n * Horizontal axis only. When `staggerLines` is not set,\n * `maxStaggerLines` defines how many lines the axis is allowed to\n * add to automatically avoid overlapping X labels. Set to `1` to\n * disable overlap detection.\n *\n * @deprecated 6.0.0\n * @type {number}\n * @default 5\n * @since 1.3.3\n * @apioption xAxis.labels.maxStaggerLines\n */\n /**\n * How to handle overflowing labels on horizontal axis. If set to\n * `\"allow\"`, it will not be aligned at all. By default it\n * `\"justify\"` labels inside the chart area. If there is room to\n * move it, it will be aligned to the edge, else it will be removed.\n *\n * @since 2.2.5\n * @validvalue [\"allow\", \"justify\"]\n */\n overflow: 'justify',\n /**\n * The pixel padding for axis labels, to ensure white space between\n * them. Defaults to 4 for horizontal axes, 1 for vertical.\n *\n * @type {number}\n * @default undefined\n * @product highcharts gantt\n * @apioption xAxis.labels.padding\n */\n /**\n * Whether to reserve space for the labels. By default, space is\n * reserved for the labels in these cases:\n *\n * * On all horizontal axes.\n * * On vertical axes if `label.align` is `right` on a left-side\n * axis or `left` on a right-side axis.\n * * On vertical axes if `label.align` is `center`.\n *\n * This can be turned off when for example the labels are rendered\n * inside the plot area instead of outside.\n *\n * @see [labels.align](#xAxis.labels.align)\n *\n * @sample {highcharts} highcharts/xaxis/labels-reservespace/\n * No reserved space, labels inside plot\n * @sample {highcharts} highcharts/xaxis/labels-reservespace-true/\n * Left-aligned labels on a vertical category axis\n *\n * @type {boolean}\n * @since 4.1.10\n * @product highcharts highstock gantt\n * @apioption xAxis.labels.reserveSpace\n */\n reserveSpace: void 0,\n /**\n * Rotation of the labels in degrees. When `undefined`, the\n * `autoRotation` option takes precedence.\n *\n * @sample {highcharts} highcharts/xaxis/labels-rotation/\n * X axis labels rotated 90°\n *\n * @type {number}\n * @default 0\n * @apioption xAxis.labels.rotation\n */\n rotation: void 0,\n /**\n * Horizontal axes only. The number of lines to spread the labels\n * over to make room or tighter labels. 0 disables staggering.\n *\n * @sample {highcharts} highcharts/xaxis/labels-staggerlines/\n * Show labels over two lines\n * @sample {highstock} stock/xaxis/labels-staggerlines/\n * Show labels over two lines\n *\n * @since 2.1\n */\n staggerLines: 0,\n /**\n * To show only every _n_'th label on the axis, set the step to _n_.\n * Setting the step to 2 shows every other label.\n *\n * By default, when 0, the step is calculated automatically to avoid\n * overlap. To prevent this, set it to 1\\. This usually only\n * happens on a category axis, and is often a sign that you have\n * chosen the wrong axis type.\n *\n * Read more at\n * [Axis docs](https://www.highcharts.com/docs/chart-concepts/axes)\n * => What axis should I use?\n *\n * @sample {highcharts} highcharts/xaxis/labels-step/\n * Showing only every other axis label on a categorized\n * x-axis\n * @sample {highcharts} highcharts/xaxis/labels-step-auto/\n * Auto steps on a category axis\n *\n * @since 2.1\n */\n step: 0,\n /**\n * Whether to [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the labels.\n */\n useHTML: false,\n /**\n * The x position offset of all labels relative to the tick\n * positions on the axis. Overrides the `labels.distance` option.\n *\n * @type {number}\n * @apioption xAxis.labels.x\n */\n /**\n * The y position offset of all labels relative to the tick\n * positions on the axis. Overrides the `labels.distance` option.\n *\n * @sample {highcharts} highcharts/xaxis/labels-x/\n * X axis labels placed on grid lines\n *\n * @type {number}\n * @apioption xAxis.labels.y\n */\n /**\n * The Z index for the axis labels.\n *\n * @see [axis.zIndex](#xAxis.zIndex)\n * @see [axis.gridZIndex](#xAxis.gridZIndex)\n */\n zIndex: 7,\n /**\n * CSS styles for the label. Use `lineClamp` to control wrapping of\n * category labels. Use `textOverflow: 'none'` to prevent ellipsis\n * (dots).\n *\n * In styled mode, the labels are styled with the\n * `.highcharts-axis-labels` class.\n *\n * @sample {highcharts} highcharts/xaxis/labels-style/\n * Red X axis labels\n *\n * @type {Highcharts.CSSObject}\n */\n style: {\n /**\n * @type {Highcharts.ColorType}\n */\n color: 'var(--highcharts-neutral-color-80)',\n cursor: 'default',\n fontSize: '0.8em',\n textOverflow: 'ellipsis'\n }\n },\n /**\n * The left position as the horizontal axis. If it's a number, it is\n * interpreted as pixel position relative to the chart.\n *\n * Since Highcharts v5.0.13: If it's a percentage string, it is\n * interpreted as percentages of the plot width, offset from plot area\n * left.\n *\n * @sample {highcharts} highcharts/xaxis/axis-position-properties\n * Different axis position properties\n *\n * @type {number|string}\n * @product highcharts highstock\n * @apioption xAxis.left\n */\n /**\n * The top position as the vertical axis. If it's a number, it is\n * interpreted as pixel position relative to the chart.\n *\n * Since Highcharts 2: If it's a percentage string, it is interpreted\n * as percentages of the plot height, offset from plot area top.\n *\n * @sample {highcharts} highcharts/xaxis/axis-position-properties\n * Different axis position properties\n *\n * @type {number|string}\n * @product highcharts highstock\n * @apioption xAxis.top\n */\n /**\n * Index of another axis that this axis is linked to. When an axis is\n * linked to a master axis, it will take the same extremes as\n * the master, but as assigned by min or max or by setExtremes.\n * It can be used to show additional info, or to ease reading the\n * chart by duplicating the scales.\n *\n * @sample {highcharts} highcharts/xaxis/linkedto/\n * Different string formats of the same date\n * @sample {highcharts} highcharts/yaxis/linkedto/\n * Y values on both sides\n *\n * @type {number}\n * @since 2.0.2\n * @product highcharts highstock gantt\n * @apioption xAxis.linkedTo\n */\n /**\n * The maximum value of the axis. If `undefined`, the max value is\n * automatically calculated.\n *\n * If a datetime string is passed, it is parsed into epoch time\n * according to the time zone given in [time.timezone](#time.timezone).\n *\n * If the [endOnTick](#yAxis.endOnTick) option is true, the `max` value\n * might be rounded up.\n *\n * If a [tickAmount](#yAxis.tickAmount) is set, the axis may be extended\n * beyond the set max in order to reach the given number of ticks. The\n * same may happen in a chart with multiple axes, determined by [chart.\n * alignTicks](#chart), where a `tickAmount` is applied internally.\n *\n * @sample {highcharts} highcharts/yaxis/max-200/\n * Y axis max of 200\n * @sample {highcharts} highcharts/yaxis/max-logarithmic/\n * Y axis max on logarithmic axis\n * @sample {highstock} stock/xaxis/min-max/\n * Fixed min and max on X axis\n *\n * @type {number|string|null}\n * @apioption xAxis.max\n */\n /**\n * Padding of the max value relative to the length of the axis. A\n * padding of 0.05 will make a 100px axis 5px longer. This is useful\n * when you don't want the highest data value to appear on the edge\n * of the plot area. When the axis' `max` option is set or a max extreme\n * is set using `axis.setExtremes()`, the maxPadding will be ignored.\n *\n * @productdesc {highstock}\n * For an [ordinal](#xAxis.ordinal) axis, `minPadding` and `maxPadding`\n * are ignored. Use [overscroll](#xAxis.overscroll) instead.\n *\n * @sample {highcharts} highcharts/yaxis/maxpadding/\n * Max padding of 0.25 on y axis\n * @sample {highstock} stock/xaxis/minpadding-maxpadding/\n * Greater min- and maxPadding\n * @sample {highmaps} maps/chart/plotbackgroundcolor-gradient/\n * Add some padding\n *\n * @default {highcharts} 0.01\n * @default {highstock|highmaps} 0\n * @since 1.2.0\n */\n maxPadding: 0.01,\n /**\n * Deprecated. Use `minRange` instead.\n *\n * @deprecated 6.0.0\n * @type {number}\n * @product highcharts highstock\n * @apioption xAxis.maxZoom\n */\n /**\n * The minimum value of the axis. If `undefined`, the min value is\n * automatically calculated.\n *\n * If a datetime string is passed, it is parsed into epoch time\n * according to the time zone given in [time.timezone](#time.timezone).\n *\n * If the [startOnTick](#yAxis.startOnTick) option is true (default),\n * the `min` value might be rounded down.\n *\n * The automatically calculated minimum value is also affected by\n * [floor](#yAxis.floor), [softMin](#yAxis.softMin),\n * [minPadding](#yAxis.minPadding), [minRange](#yAxis.minRange)\n * as well as [series.threshold](#plotOptions.series.threshold)\n * and [series.softThreshold](#plotOptions.series.softThreshold).\n *\n * @sample {highcharts} highcharts/yaxis/min-startontick-false/\n * -50 with startOnTick to false\n * @sample {highcharts} highcharts/yaxis/min-startontick-true/\n * -50 with startOnTick true by default\n * @sample {highstock} stock/xaxis/min-max/\n * Set min and max on X axis\n *\n * @type {number|string|null}\n * @apioption xAxis.min\n */\n /**\n * The dash or dot style of the minor grid lines. For possible values,\n * see [this demonstration](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-dashstyle-all/).\n *\n * @sample {highcharts} highcharts/yaxis/minorgridlinedashstyle/\n * Long dashes on minor grid lines\n * @sample {highstock} stock/xaxis/minorgridlinedashstyle/\n * Long dashes on minor grid lines\n *\n * @type {Highcharts.DashStyleValue}\n * @since 1.2\n */\n minorGridLineDashStyle: 'Solid',\n /**\n * Specific tick interval in axis units for the minor ticks. On a linear\n * axis, if `\"auto\"`, the minor tick interval is calculated as a fifth\n * of the tickInterval. If `undefined`, minor ticks are not shown.\n *\n * On logarithmic axes, the unit is the power of the value. For example,\n * setting the minorTickInterval to 1 puts one tick on each of 0.1, 1,\n * 10, 100 etc. Setting the minorTickInterval to 0.1 produces 9 ticks\n * between 1 and 10, 10 and 100 etc.\n *\n * If user settings dictate minor ticks to become too dense, they don't\n * make sense, and will be ignored to prevent performance problems.\n *\n * @sample {highcharts} highcharts/yaxis/minortickinterval-null/\n * Undefined by default\n * @sample {highcharts} highcharts/yaxis/minortickinterval-5/ 5 units\n * @sample {highcharts} highcharts/yaxis/minortickinterval-log-auto/\n * \"auto\"\n * @sample {highcharts} highcharts/yaxis/minortickinterval-log/ 0.1\n * @sample {highstock} stock/demo/basic-line/ Null by default\n * @sample {highstock} stock/xaxis/minortickinterval-auto/ \"auto\"\n *\n * @type {number|'auto'}\n * @apioption xAxis.minorTickInterval\n */\n /**\n * The pixel length of the minor tick marks.\n *\n * @sample {highcharts} highcharts/yaxis/minorticklength/\n * Minor ticks on Y axis\n * @sample {highstock} stock/xaxis/minorticks/\n * 10px on Y axis\n */\n minorTickLength: 2,\n /**\n * The position of the minor tick marks relative to the axis line.\n * Can be one of `inside` and `outside`.\n *\n * @sample {highcharts} highcharts/yaxis/minortickposition-outside/\n * Outside by default\n * @sample {highcharts} highcharts/yaxis/minortickposition-inside/\n * Inside\n * @sample {highstock} stock/xaxis/minorticks/\n * Inside\n *\n * @validvalue [\"inside\", \"outside\"]\n */\n minorTickPosition: 'outside',\n /**\n * Enable or disable minor ticks. The interval between the minor ticks\n * can be controlled either by the\n * [minorTicksPerMajor](#xAxis.minorTicksPerMajor) setting, or as an\n * absolute [minorTickInterval](#xAxis.minorTickInterval) value.\n *\n * On a logarithmic axis, minor ticks are laid out based on a best\n * guess, attempting to enter an approximate number of minor ticks\n * between each major tick based on\n * [minorTicksPerMajor](#xAxis.minorTicksPerMajor).\n *\n * Prior to v6.0.0, ticks were enabled in auto layout by setting\n * `minorTickInterval` to `\"auto\"`.\n *\n * @productdesc {highcharts} On axes using\n * [categories](#xAxis.categories), minor ticks are not supported.\n *\n * @sample {highcharts} highcharts/yaxis/minorticks-true/ Enabled on\n * linear Y axis\n *\n * @type {boolean}\n * @default false\n * @since 6.0.0\n * @apioption xAxis.minorTicks\n */\n /**\n * The number of minor ticks per major tick. Works for `linear`,\n * `logarithmic` and `datetime` axes.\n *\n * For radial axes in gauges, the default value is 10.\n *\n * @sample {highcharts} highcharts/yaxis/minortickspermajor/\n * 2 minor ticks per major tick on Y axis\n *\n * @since 11.0.0\n *\n * @type {number}\n */\n minorTicksPerMajor: 5,\n /**\n * The pixel width of the minor tick mark.\n *\n * @sample {highcharts} highcharts/yaxis/minortickwidth/\n * 3px width\n * @sample {highstock} stock/xaxis/minorticks/\n * 1px width\n *\n * @type {number}\n * @default 0\n * @apioption xAxis.minorTickWidth\n */\n /**\n * Padding of the min value relative to the length of the axis. A\n * padding of 0.05 will make a 100px axis 5px longer. This is useful\n * when you don't want the lowest data value to appear on the edge\n * of the plot area. When the axis' `min` option is set or a min extreme\n * is set using `axis.setExtremes()`, the minPadding will be ignored.\n *\n * @productdesc {highstock}\n * For an [ordinal](#xAxis.ordinal) axis, `minPadding` and `maxPadding`\n * are ignored. Use [overscroll](#xAxis.overscroll) instead.\n *\n * @sample {highcharts} highcharts/yaxis/minpadding/\n * Min padding of 0.2\n * @sample {highstock} stock/xaxis/minpadding-maxpadding/\n * Greater min- and maxPadding\n * @sample {highmaps} maps/chart/plotbackgroundcolor-gradient/\n * Add some padding\n *\n * @default {highcharts} 0.01\n * @default {highstock|highmaps} 0\n * @since 1.2.0\n * @product highcharts highstock gantt\n */\n minPadding: 0.01,\n /**\n * The minimum range to display on this axis. The entire axis will not\n * be allowed to span over a smaller interval than this. For example,\n * for a datetime axis the main unit is milliseconds. If minRange is\n * set to 3600000, you can't zoom in more than to one hour.\n *\n * The default minRange for the x axis is five times the smallest\n * interval between any of the data points.\n *\n * On a logarithmic axis, the unit for the minimum range is the power.\n * So a minRange of 1 means that the axis can be zoomed to 10-100,\n * 100-1000, 1000-10000 etc.\n *\n * **Note**: The `minPadding`, `maxPadding`, `startOnTick` and\n * `endOnTick` settings also affect how the extremes of the axis\n * are computed.\n *\n * @sample {highcharts} highcharts/xaxis/minrange/\n * Minimum range of 5\n * @sample {highstock} stock/xaxis/minrange/\n * Max zoom of 6 months overrides user selections\n *\n * @type {number}\n * @apioption xAxis.minRange\n */\n /**\n * The minimum tick interval allowed in axis values. For example on\n * zooming in on an axis with daily data, this can be used to prevent\n * the axis from showing hours. Defaults to the closest distance between\n * two points on the axis.\n *\n * @type {number}\n * @since 2.3.0\n * @apioption xAxis.minTickInterval\n */\n /**\n * The distance in pixels from the plot area to the axis line.\n * A positive offset moves the axis with its line, labels and ticks\n * away from the plot area. This is typically used when two or more\n * axes are displayed on the same side of the plot. With multiple\n * axes the offset is dynamically adjusted to avoid collision, this\n * can be overridden by setting offset explicitly.\n *\n * For radial axes in gauges, the offset can be a percentage string, and\n * defaults to render the line and ticks on the inside of the pane and\n * plot bands (since v13). Labels are not affected by the offset in\n * radial axes.\n *\n * @sample {highcharts} highcharts/yaxis/offset/\n * Y axis offset of 70\n * @sample {highcharts} highcharts/yaxis/offset-centered/\n * Axes positioned in the center of the plot\n * @sample {highcharts} highcharts/yaxis/radial-offset\n * Radial axis offset in gauge\n * @sample {highstock} stock/xaxis/offset/\n * Y axis offset by 70 px\n *\n * @type {number}\n */\n offset: void 0,\n /**\n * Whether to display the axis on the opposite side of the normal. The\n * normal is on the left side for vertical axes and bottom for\n * horizontal, so the opposite sides will be right and top respectively.\n * This is typically used with dual or multiple axes.\n *\n * @sample {highcharts} highcharts/yaxis/opposite/\n * Secondary Y axis opposite\n * @sample {highstock} stock/xaxis/opposite/\n * Y axis on left side\n *\n * @default {highcharts|highstock|highmaps} false\n * @default {gantt} true\n * @type {boolean}\n * @apioption xAxis.opposite\n */\n /**\n * In an ordinal axis, the points are equally spaced in the chart\n * regardless of the actual time or x distance between them. This means\n * that missing data periods (e.g. nights or weekends for a stock chart)\n * will not take up space in the chart.\n * Having `ordinal: false` will show any gaps created by the `gapSize`\n * setting proportionate to their duration.\n *\n * In stock charts the X axis is ordinal by default, unless\n * the boost module is used and at least one of the series' data length\n * exceeds the [boostThreshold](#series.line.boostThreshold).\n *\n * For an ordinal axis, `minPadding` and `maxPadding` are ignored. Use\n * [overscroll](#xAxis.overscroll) instead.\n *\n * @sample {highstock} stock/xaxis/ordinal-true/\n * True by default\n * @sample {highstock} stock/xaxis/ordinal-false/\n * False\n *\n * @see [overscroll](#xAxis.overscroll)\n *\n * @type {boolean}\n * @default true\n * @since 1.1\n * @product highstock\n * @apioption xAxis.ordinal\n */\n /**\n * Additional range on the right side of the xAxis. Works similar to\n * `xAxis.maxPadding`, but the value is set in terms of axis values,\n * percentage or pixels.\n *\n * If it's a number, it is interpreted as axis values, which in a\n * datetime axis equals milliseconds.\n *\n * If it's a percentage string, is interpreted as percentages of axis\n * length. An overscroll of 50% will make a 100px axis 50px longer.\n *\n * If it's a pixel string, it is interpreted as a fixed pixel value, but\n * limited to 90% of the axis length.\n *\n * @sample {highstock} stock/xaxis/overscroll/ One minute overscroll\n * with live data\n * @sample {highstock} stock/xaxis/overscroll-percent/ Overscroll set in\n * percentage\n * @sample {highstock} stock/xaxis/overscroll-pixel/ Overscroll set in\n * pixels\n *\n * @type {number | string}\n * @default 0\n * @since 6.0.0\n * @product highstock\n * @apioption xAxis.overscroll\n */\n /**\n * Refers to the index in the [panes](#panes) array. Used for circular\n * gauges and polar charts. When the option is not set then first pane\n * will be used.\n *\n * @sample highcharts/demo/gauge-vu-meter\n * Two gauges with different center\n *\n * @type {number}\n * @product highcharts\n * @apioption xAxis.pane\n */\n /**\n * The zoomed range to display when only defining one or none of `min`\n * or `max`. For example, to show the latest month, a range of one month\n * can be set.\n *\n * @sample {highstock} stock/xaxis/range/\n * Setting a zoomed range when the rangeSelector is disabled\n *\n * @type {number}\n * @product highstock\n * @apioption xAxis.range\n */\n /**\n * Whether to reverse the axis so that the highest number is closest\n * to the origin. If the chart is inverted, the x axis is reversed by\n * default.\n *\n * @sample {highcharts} highcharts/yaxis/reversed/\n * Reversed Y axis\n * @sample {highstock} stock/xaxis/reversed/\n * Reversed Y axis\n *\n * @type {boolean}\n * @default undefined\n * @apioption xAxis.reversed\n */\n reversed: void 0,\n /**\n * This option determines how stacks should be ordered within a group.\n * For example reversed xAxis also reverses stacks, so first series\n * comes last in a group. To keep order like for non-reversed xAxis\n * enable this option.\n *\n * @sample {highcharts} highcharts/xaxis/reversedstacks/\n * Reversed stacks comparison\n * @sample {highstock} highcharts/xaxis/reversedstacks/\n * Reversed stacks comparison\n *\n * @since 6.1.1\n * @product highcharts highstock\n */\n reversedStacks: false,\n /**\n * An optional scrollbar to display on the X axis in response to\n * limiting the minimum and maximum of the axis values.\n *\n * In styled mode, all the presentational options for the scrollbar are\n * replaced by the classes `.highcharts-scrollbar-thumb`,\n * `.highcharts-scrollbar-arrow`, `.highcharts-scrollbar-button`,\n * `.highcharts-scrollbar-rifles` and `.highcharts-scrollbar-track`.\n *\n * @sample {highstock} stock/yaxis/heatmap-scrollbars/\n * Heatmap with both scrollbars\n *\n * @extends scrollbar\n * @since 4.2.6\n * @product highstock\n * @apioption xAxis.scrollbar\n */\n /**\n * Whether to show the axis line and title when the axis has no data.\n *\n * @sample {highcharts} highcharts/yaxis/showempty/\n * When clicking the legend to hide series, one axis preserves\n * line and title, the other doesn't\n * @sample {highstock} highcharts/yaxis/showempty/\n * When clicking the legend to hide series, one axis preserves\n * line and title, the other doesn't\n *\n * @since 1.1\n */\n showEmpty: true,\n /**\n * Whether to show the first tick label.\n *\n * @sample {highcharts} highcharts/xaxis/showfirstlabel-false/\n * Set to false on X axis\n * @sample {highstock} stock/xaxis/showfirstlabel/\n * Labels below plot lines on Y axis\n */\n showFirstLabel: true,\n /**\n * Whether to show the last tick label. Defaults to `true` on cartesian\n * charts, and `false` on polar charts.\n *\n * @sample {highcharts} highcharts/xaxis/showlastlabel-true/\n * Set to true on X axis\n * @sample {highstock} stock/xaxis/showfirstlabel/\n * Labels below plot lines on Y axis\n *\n * @type {boolean}\n * @default undefined\n * @product highcharts highstock gantt\n */\n showLastLabel: true,\n /**\n * A soft maximum for the axis. If the series data maximum is less than\n * this, the axis will stay at this maximum, but if the series data\n * maximum is higher, the axis will flex to show all data.\n *\n * @sample highcharts/yaxis/softmin-softmax/\n * Soft min and max\n *\n * @type {number}\n * @since 5.0.1\n * @product highcharts highstock gantt\n * @apioption xAxis.softMax\n */\n /**\n * A soft minimum for the axis. If the series data minimum is greater\n * than this, the axis will stay at this minimum, but if the series\n * data minimum is lower, the axis will flex to show all data.\n *\n * @sample highcharts/yaxis/softmin-softmax/\n * Soft min and max\n *\n * @type {number}\n * @since 5.0.1\n * @product highcharts highstock gantt\n * @apioption xAxis.softMin\n */\n /**\n * For datetime axes, this decides where to put the tick between weeks.\n * 0 = Sunday, 1 = Monday.\n *\n * @sample {highcharts} highcharts/xaxis/startofweek-monday/\n * Monday by default\n * @sample {highcharts} highcharts/xaxis/startofweek-sunday/\n * Sunday\n * @sample {highstock} stock/xaxis/startofweek-1\n * Monday by default\n * @sample {highstock} stock/xaxis/startofweek-0\n * Sunday\n *\n * @product highcharts highstock gantt\n */\n startOfWeek: 1,\n /**\n * Whether to force the axis to start on a tick. Use this option with\n * the `minPadding` option to control the axis start.\n *\n * @productdesc {highstock}\n * In Highcharts Stock, `startOnTick` is always `false` when\n * the navigator is enabled, to prevent jumpy scrolling.\n *\n * @sample {highcharts} highcharts/xaxis/startontick-false/\n * False by default\n * @sample {highcharts} highcharts/xaxis/startontick-true/\n * True\n *\n * @since 1.2.0\n */\n startOnTick: false,\n /**\n * The amount of ticks to draw on the axis. This opens up for aligning\n * the ticks of multiple charts or panes within a chart. This option\n * overrides the `tickPixelInterval` option.\n *\n * This option only has an effect on linear axes. Datetime, logarithmic\n * or category axes are not affected.\n *\n * @sample {highcharts} highcharts/yaxis/tickamount/\n * 8 ticks on Y axis\n * @sample {highstock} highcharts/yaxis/tickamount/\n * 8 ticks on Y axis\n *\n * @type {number}\n * @since 4.1.0\n * @product highcharts highstock gantt\n * @apioption xAxis.tickAmount\n */\n /**\n * The interval of the tick marks in axis units. When `undefined`, the\n * tick interval is computed to approximately follow the\n * [tickPixelInterval](#xAxis.tickPixelInterval) on linear and datetime\n * axes. On categorized axes, a `undefined` tickInterval will default to\n * 1, one category. Note that datetime axes are based on milliseconds,\n * so for example an interval of one day is expressed as\n * `24 * 3600 * 1000`.\n *\n * On logarithmic axes, the tickInterval is based on powers, so a\n * tickInterval of 1 means one tick on each of 0.1, 1, 10, 100 etc. A\n * tickInterval of 2 means a tick of 0.1, 10, 1000 etc. A tickInterval\n * of 0.2 puts a tick on 0.1, 0.2, 0.4, 0.6, 0.8, 1, 2, 4, 6, 8, 10, 20,\n * 40 etc.\n *\n *\n * If the tickInterval is too dense for labels to be drawn, Highcharts\n * may remove ticks.\n *\n * If the chart has multiple axes, the [alignTicks](#chart.alignTicks)\n * option may interfere with the `tickInterval` setting.\n *\n * @see [tickPixelInterval](#xAxis.tickPixelInterval)\n * @see [tickPositions](#xAxis.tickPositions)\n * @see [tickPositioner](#xAxis.tickPositioner)\n *\n * @sample {highcharts} highcharts/xaxis/tickinterval-5/\n * Tick interval of 5 on a linear axis\n * @sample {highstock} stock/xaxis/tickinterval/\n * Tick interval of 0.01 on Y axis\n *\n * @type {number}\n * @apioption xAxis.tickInterval\n */\n /**\n * The pixel length of the main tick marks.\n *\n * @sample {highcharts} highcharts/xaxis/ticklength/\n * 20 px tick length on the X axis\n * @sample {highstock} stock/xaxis/ticks/\n * Formatted ticks on X axis\n */\n tickLength: 10,\n /**\n * For categorized axes only. If `on` the tick mark is placed in the\n * center of the category, if `between` the tick mark is placed between\n * categories. The default is `between` if the `tickInterval` is 1, else\n * `on`. In order to render tick marks on a category axis it is necessary\n * to provide a [tickWidth](#xAxis.tickWidth).\n *\n * @sample {highcharts} highcharts/xaxis/tickmarkplacement-between/\n * \"between\" by default\n * @sample {highcharts} highcharts/xaxis/tickmarkplacement-on/\n * \"on\"\n *\n * @product highcharts gantt\n * @validvalue [\"on\", \"between\"]\n */\n tickmarkPlacement: 'between',\n /**\n * If tickInterval is `null` this option sets the approximate pixel\n * interval of the tick marks. Not applicable to categorized axis.\n *\n * The tick interval is also influenced by the [minTickInterval](\n * #xAxis.minTickInterval) option, that, by default prevents ticks from\n * being denser than the data points.\n *\n * @see [tickInterval](#xAxis.tickInterval)\n * @see [tickPositioner](#xAxis.tickPositioner)\n * @see [tickPositions](#xAxis.tickPositions)\n *\n * @sample {highcharts} highcharts/xaxis/tickpixelinterval-50/\n * 50 px on X axis\n * @sample {highstock} stock/xaxis/tickpixelinterval/\n * 200 px on X axis\n */\n tickPixelInterval: 100,\n /**\n * The position of the major tick marks relative to the axis line.\n * Can be one of `inside` and `outside`.\n *\n * @sample {highcharts} highcharts/xaxis/tickposition-outside/\n * \"outside\" by default\n * @sample {highcharts} highcharts/xaxis/tickposition-inside/\n * \"inside\"\n * @sample {highstock} stock/xaxis/ticks/\n * Formatted ticks on X axis\n *\n * @validvalue [\"inside\", \"outside\"]\n */\n tickPosition: 'outside',\n /**\n * A callback function returning array defining where the ticks are\n * laid out on the axis. This overrides the default behavior of\n * [tickPixelInterval](#xAxis.tickPixelInterval) and [tickInterval](\n * #xAxis.tickInterval). The automatic tick positions are accessible\n * through `this.tickPositions` and can be modified by the callback.\n * Since v12.6.0, the callback also receives `ctx` as the third\n * argument, so that arrow functions can access the same context as\n * regular functions using `this`.\n *\n * @see [tickPositions](#xAxis.tickPositions)\n *\n * @sample {highcharts} highcharts/xaxis/tickpositions-tickpositioner/\n * Demo of tickPositions and tickPositioner\n * @sample {highstock} highcharts/xaxis/tickpositions-tickpositioner/\n * Demo of tickPositions and tickPositioner\n *\n * @type {Highcharts.AxisTickPositionerCallbackFunction}\n * @apioption xAxis.tickPositioner\n */\n /**\n * An array defining where the ticks are laid out on the axis. This\n * overrides the default behavior of [tickPixelInterval](\n * #xAxis.tickPixelInterval) and [tickInterval](#xAxis.tickInterval).\n *\n * Note: When working with date-time axes, be aware of time zone\n * handling. See the [documentation on time options](https://www.highcharts.com/docs/chart-concepts/axes#datetime)\n * for best practices.\n *\n * @see [tickPositioner](#xAxis.tickPositioner)\n *\n * @sample {highcharts} highcharts/xaxis/tickpositions-tickpositioner/\n * Demo of tickPositions and tickPositioner\n * @sample {highstock} highcharts/xaxis/tickpositions-tickpositioner/\n * Demo of tickPositions and tickPositioner\n *\n * @type {Array<number>}\n * @apioption xAxis.tickPositions\n */\n /**\n * The pixel width of the major tick marks. Defaults to 0 on category\n * axes, otherwise 1.\n *\n * In styled mode, the stroke width is given in the `.highcharts-tick`\n * class, but in order for the element to be generated on category axes,\n * the option must be explicitly set to 1.\n *\n * @sample {highcharts} highcharts/xaxis/tickwidth/\n * 10 px width\n * @sample {highcharts} highcharts/css/axis-grid/\n * Styled mode\n * @sample {highstock} stock/xaxis/ticks/\n * Formatted ticks on X axis\n * @sample {highstock} highcharts/css/axis-grid/\n * Styled mode\n *\n * @type {undefined|number}\n * @default {highstock} 1\n * @default {highmaps} 0\n * @apioption xAxis.tickWidth\n */\n /**\n * The axis title, showing next to the axis line.\n *\n * @productdesc {highmaps}\n * In Highmaps, the axis is hidden by default, but adding an axis title\n * is still possible. X axis and Y axis titles will appear at the bottom\n * and left by default.\n */\n title: {\n /**\n * Alignment of the title relative to the axis values. Possible\n * values are \"low\", \"middle\" or \"high\".\n *\n * @sample {highcharts} highcharts/xaxis/title-align-low/\n * \"low\"\n * @sample {highcharts} highcharts/xaxis/title-align-center/\n * \"middle\" by default\n * @sample {highcharts} highcharts/xaxis/title-align-high/\n * \"high\"\n * @sample {highcharts} highcharts/yaxis/title-offset/\n * Place the Y axis title on top of the axis\n * @sample {highstock} stock/xaxis/title-align/\n * Aligned to \"high\" value\n *\n * @type {Highcharts.AxisTitleAlignValue}\n */\n align: 'middle',\n /**\n * Deprecated. Set the `text` to `undefined` to disable the title.\n *\n * @deprecated 3.0.0\n * @type {boolean}\n * @product highcharts\n * @apioption xAxis.title.enabled\n */\n /**\n * The pixel distance between the axis labels or line and the title.\n * Defaults to 0 for horizontal axes, 10 for vertical\n *\n * @sample {highcharts} highcharts/xaxis/title-margin/\n * Y axis title margin of 60\n *\n * @type {number}\n * @apioption xAxis.title.margin\n */\n /**\n * The distance from the plot area to the axis line. A positive\n * offset moves the axis with its line, labels and ticks away from\n * the plot area. With multiple axes the offset is dynamically\n * adjusted to avoid collision, this can be overridden by setting\n * offset explicitly.\n *\n * For radial axes in gauges, the offset can be a percentage string,\n * and defaults to render the line and ticks on the inside of the\n * pane and plot bands (since v13). Labels are not affected by the\n * offset in radial axes.\n *\n * @sample highcharts/yaxis/offset/\n * Axis offfset\n * @sample {highcharts} highcharts/yaxis/offset-centered/\n * Axes positioned in the center of the plot\n * @sample {highstock} stock/xaxis/offset/\n * Y axis offset in stock chart\n *\n * @type {number|string}\n * @since 2.2.0\n * @apioption xAxis.title.offset\n */\n /**\n * Whether to reserve space for the title when laying out the axis.\n *\n * @type {boolean}\n * @default true\n * @since 5.0.11\n * @product highcharts highstock gantt\n * @apioption xAxis.title.reserveSpace\n */\n /**\n * The rotation of the text in degrees. 0 is horizontal, 270 is\n * vertical reading from bottom to top. Defaults to 0 for horizontal\n * axes, 270 for left-side axes and 90 for right-side axes.\n *\n * @sample {highcharts} highcharts/yaxis/title-offset/\n * Horizontal\n *\n * @type {number}\n * @default undefined\n * @apioption xAxis.title.rotation\n */\n /**\n * The actual text of the axis title. It can contain basic HTML tags\n * like `b`, `i` and `span` with style.\n *\n * @sample {highcharts} highcharts/xaxis/title-text/\n * Custom HTML\n * @sample {highstock} stock/xaxis/title-text/\n * Titles for both axes\n *\n * @type {string|null}\n * @apioption xAxis.title.text\n */\n /**\n * Alignment of the text, can be `\"left\"`, `\"right\"` or `\"center\"`.\n * Default alignment depends on the\n * [title.align](xAxis.title.align):\n *\n * Horizontal axes:\n * - for `align` = `\"low\"`, `textAlign` is set to `left`\n * - for `align` = `\"middle\"`, `textAlign` is set to `center`\n * - for `align` = `\"high\"`, `textAlign` is set to `right`\n *\n * Vertical axes:\n * - for `align` = `\"low\"` and `opposite` = `true`, `textAlign` is\n * set to `right`\n * - for `align` = `\"low\"` and `opposite` = `false`, `textAlign` is\n * set to `left`\n * - for `align` = `\"middle\"`, `textAlign` is set to `center`\n * - for `align` = `\"high\"` and `opposite` = `true` `textAlign` is\n * set to `left`\n * - for `align` = `\"high\"` and `opposite` = `false` `textAlign` is\n * set to `right`\n *\n * @type {Highcharts.AlignValue}\n * @apioption xAxis.title.textAlign\n */\n /**\n * Whether to [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the axis title.\n *\n * @product highcharts highstock gantt\n */\n useHTML: false,\n /**\n * Horizontal pixel offset of the title position.\n *\n * @since 4.1.6\n * @product highcharts highstock gantt\n */\n x: 0,\n /**\n * Vertical pixel offset of the title position.\n *\n * @product highcharts highstock gantt\n */\n y: 0,\n /**\n * CSS styles for the title. If the title text is longer than the\n * axis length, it will wrap to multiple lines by default. This can\n * be customized by setting the `lineClamp` property, by setting a\n * specific `width` or by setting `whiteSpace: 'nowrap'`.\n *\n * In styled mode, the stroke width is given in the\n * `.highcharts-axis-title` class.\n *\n * @sample {highcharts} highcharts/xaxis/title-style/\n * Red\n * @sample {highcharts} highcharts/css/axis/\n * Styled mode\n *\n * @type {Highcharts.CSSObject}\n */\n style: {\n /**\n * @type {Highcharts.ColorType}\n */\n color: 'var(--highcharts-neutral-color-60)',\n /**\n * @type {number|string}\n */\n fontSize: '0.8em'\n }\n },\n /**\n * The type of axis. Can be one of `linear`, `logarithmic`, `datetime`\n * or `category`. In a datetime axis, the numbers are given in\n * milliseconds, and tick marks are placed on appropriate values like\n * full hours or days. In a category axis, the\n * [point names](#series.line.data.name) of the chart's series are used\n * for categories, if not a [categories](#xAxis.categories) array is\n * defined.\n *\n * @sample {highcharts} highcharts/xaxis/type-linear/\n * Linear\n * @sample {highcharts} highcharts/yaxis/type-log/\n * Logarithmic\n * @sample {highcharts} highcharts/yaxis/type-log-minorgrid/\n * Logarithmic with minor grid lines\n * @sample {highcharts} highcharts/xaxis/type-log-both/\n * Logarithmic on two axes\n * @sample {highcharts} highcharts/yaxis/type-log-negative/\n * Logarithmic with extension to emulate negative values\n *\n * @type {Highcharts.AxisTypeValue}\n * @default linear\n * @product highcharts gantt\n * @apioption xAxis.type\n */\n /**\n * If there are multiple axes on the same side of the chart, the pixel\n * margin between the axes. Defaults to 0 on vertical axes, 15 on\n * horizontal axes.\n *\n * @type {number}\n * @since 7.0.3\n * @apioption xAxis.margin\n */\n /**\n * Applies only when the axis `type` is `category`. When `uniqueNames`\n * is true, points are placed on the X axis according to their names.\n * If the same point name is repeated in the same or another series,\n * the point is placed on the same X position as other points of the\n * same name. When `uniqueNames` is false, the points are laid out in\n * increasing X positions regardless of their names, and the X axis\n * category will take the name of the last point in each position.\n *\n * @sample {highcharts} highcharts/xaxis/uniquenames-true/\n * True by default\n * @sample {highcharts} highcharts/xaxis/uniquenames-false/\n * False\n *\n * @since 4.2.7\n * @product highcharts gantt\n * @type {boolean}\n * @default true\n * @apioption xAxis.uniqueNames\n */\n /**\n * Datetime axis only. An array determining what time intervals the\n * ticks are allowed to fall on. Each array item is an array where the\n * first value is the time unit and the second value another array of\n * allowed multiples.\n *\n * Defaults to:\n * ```js\n * units: [[\n * 'millisecond', // unit name\n * [1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples\n * ], [\n * 'second',\n * [1, 2, 5, 10, 15, 30]\n * ], [\n * 'minute',\n * [1, 2, 5, 10, 15, 30]\n * ], [\n * 'hour',\n * [1, 2, 3, 4, 6, 8, 12]\n * ], [\n * 'day',\n * [1, 2]\n * ], [\n * 'week',\n * [1, 2]\n * ], [\n * 'month',\n * [1, 2, 3, 4, 6]\n * ], [\n * 'year',\n * null\n * ]]\n * ```\n *\n * @sample {highcharts} highcharts/xaxis/units/\n * Axis units demonstrated\n *\n * @type {Array<Array<string,(Array<number>|null)>>}\n * @product highcharts highstock gantt\n * @apioption xAxis.units\n */\n /**\n * Whether axis, including axis title, line, ticks and labels, should\n * be visible.\n *\n * @since 4.1.9\n * @product highcharts highstock gantt\n */\n visible: true,\n /**\n * Color of the minor, secondary grid lines.\n *\n * In styled mode, the stroke width is given in the\n * `.highcharts-minor-grid-line` class.\n *\n * @sample {highcharts} highcharts/yaxis/minorgridlinecolor/\n * Bright grey lines from Y axis\n * @sample {highcharts|highstock} highcharts/css/axis-grid/\n * Styled mode\n * @sample {highstock} stock/xaxis/minorgridlinecolor/\n * Bright grey lines from Y axis\n *\n * @type {Highcharts.ColorType}\n */\n minorGridLineColor: 'var(--highcharts-neutral-color-5)',\n /**\n * Width of the minor, secondary grid lines.\n *\n * In styled mode, the stroke width is given in the\n * `.highcharts-grid-line` class.\n *\n * @sample {highcharts} highcharts/yaxis/minorgridlinewidth/\n * 2px lines from Y axis\n * @sample {highcharts|highstock} highcharts/css/axis-grid/\n * Styled mode\n * @sample {highstock} stock/xaxis/minorgridlinewidth/\n * 2px lines from Y axis\n */\n minorGridLineWidth: 1,\n /**\n * Color for the minor tick marks.\n *\n * @sample {highcharts} highcharts/yaxis/minortickcolor/\n * Black tick marks on Y axis\n * @sample {highstock} stock/xaxis/minorticks/\n * Black tick marks on Y axis\n *\n * @type {Highcharts.ColorType}\n */\n minorTickColor: 'var(--highcharts-neutral-color-40)',\n /**\n * The color of the line marking the axis itself.\n *\n * In styled mode, the line stroke is given in the\n * `.highcharts-axis-line` or `.highcharts-xaxis-line` class.\n *\n * @sample {highcharts} highcharts/yaxis/linecolor/\n * A red line on Y axis\n * @sample {highcharts|highstock} highcharts/css/axis/\n * Axes in styled mode\n * @sample {highstock} stock/xaxis/linecolor/\n * A red line on X axis\n *\n * @type {Highcharts.ColorType}\n */\n lineColor: 'var(--highcharts-neutral-color-80)',\n /**\n * The width of the line marking the axis itself.\n *\n * In styled mode, the stroke width is given in the\n * `.highcharts-axis-line` or `.highcharts-xaxis-line` class.\n *\n * @sample {highcharts} highcharts/yaxis/linecolor/\n * A 1px line on Y axis\n * @sample {highcharts|highstock} highcharts/css/axis/\n * Axes in styled mode\n * @sample {highstock} stock/xaxis/linewidth/\n * A 2px line on X axis\n *\n * @default {highcharts|highstock} 1\n * @default {highmaps} 0\n */\n lineWidth: 1,\n /**\n * Color of the grid lines extending the ticks across the plot area.\n *\n * In styled mode, the stroke is given in the `.highcharts-grid-line`\n * class.\n *\n * @productdesc {highmaps}\n * In Highmaps, the grid lines are hidden by default.\n *\n * @sample {highcharts} highcharts/yaxis/gridlinecolor/\n * Green lines\n * @sample {highcharts|highstock} highcharts/css/axis-grid/\n * Styled mode\n * @sample {highstock} stock/xaxis/gridlinecolor/\n * Green lines\n *\n * @type {Highcharts.ColorType}\n */\n gridLineColor: 'var(--highcharts-neutral-color-10)',\n /**\n * The width of the grid lines extending the ticks across the plot area.\n * Defaults to 1 on the Y axis and 0 on the X axis, except for 3d\n * charts and gauges.\n *\n * In gauges, the grid lines are limited to the pane's `size` and\n * `innerSize`.\n *\n * In styled mode, the stroke width is given in the\n * `.highcharts-grid-line` class.\n *\n * @sample {highcharts} highcharts/yaxis/gridlinewidth/\n * 2px lines\n * @sample {highcharts|highstock} highcharts/css/axis-grid/\n * Styled mode\n * @sample {highcharts} highcharts/yaxis/radial-gridline\n * Grid lines on gauge\n * @sample {highstock} stock/xaxis/gridlinewidth/\n * 2px lines\n *\n * @type {number}\n * @apioption xAxis.gridLineWidth\n */\n gridLineWidth: void 0,\n /**\n * The height as the vertical axis. If it's a number, it is\n * interpreted as pixels.\n *\n * Since Highcharts 2: If it's a percentage string, it is interpreted\n * as percentages of the total plot height.\n *\n * @sample {highcharts} highcharts/xaxis/axis-position-properties\n * Different axis position properties\n *\n * @type {number|string}\n * @product highcharts highstock\n * @apioption xAxis.height\n */\n /**\n * The width as the horizontal axis. If it's a number, it is interpreted\n * as pixels.\n *\n * Since Highcharts v5.0.13: If it's a percentage string, it is\n * interpreted as percentages of the total plot width.\n *\n * @sample {highcharts} highcharts/xaxis/axis-position-properties\n * Different axis position properties\n *\n * @type {number|string}\n * @product highcharts highstock\n * @apioption xAxis.width\n */\n /**\n * Color for the main tick marks.\n *\n * In styled mode, the stroke is given in the `.highcharts-tick`\n * class.\n *\n * @sample {highcharts} highcharts/xaxis/tickcolor/\n * Red ticks on X axis\n * @sample {highcharts|highstock} highcharts/css/axis-grid/\n * Styled mode\n * @sample {highstock} stock/xaxis/ticks/\n * Formatted ticks on X axis\n *\n * @type {Highcharts.ColorType}\n */\n tickColor: 'var(--highcharts-neutral-color-80)'\n // `tickWidth: 1`\n };\n /**\n * The Z axis or depth axis for 3D plots.\n *\n * See the [Axis class](/class-reference/Highcharts.Axis) for programmatic\n * access to the axis.\n *\n * @sample {highcharts} highcharts/3d/scatter-zaxis-categories/\n * Z-Axis with Categories\n * @sample {highcharts} highcharts/3d/scatter-zaxis-grid/\n * Z-Axis with styling\n *\n * @type {*|Array<*>}\n * @extends xAxis\n * @since 5.0.0\n * @product highcharts\n * @excluding breaks, crosshair, height, left, lineColor, lineWidth,\n * nameToX, showEmpty, top, width\n * @apioption zAxis\n */\n /**\n * The Y axis or value axis. Normally this is the vertical axis,\n * though if the chart is inverted this is the horizontal axis.\n * In case of multiple axes, the yAxis node is an array of\n * configuration objects.\n *\n * See [the Axis object](/class-reference/Highcharts.Axis) for programmatic\n * access to the axis.\n *\n * @type {*|Array<*>}\n * @extends xAxis\n * @excluding currentDateIndicator,ordinal,overscroll\n * @optionparent yAxis\n */\n AxisDefaults.yAxis = {\n /**\n * The type of axis. Can be one of `linear`, `logarithmic`, `datetime`,\n * `category` or `treegrid`. Defaults to `treegrid` for Gantt charts,\n * `linear` for other chart types.\n *\n * In a datetime axis, the numbers are given in milliseconds, and tick\n * marks are placed on appropriate values, like full hours or days. In a\n * category or treegrid axis, the [point names](#series.line.data.name)\n * of the chart's series are used for categories, if a\n * [categories](#xAxis.categories) array is not defined.\n *\n * @sample {highcharts} highcharts/yaxis/type-log-minorgrid/\n * Logarithmic with minor grid lines\n * @sample {highcharts} highcharts/yaxis/type-log-negative/\n * Logarithmic with extension to emulate negative values\n * @sample {gantt} gantt/treegrid-axis/demo\n * Treegrid axis\n *\n * @type {Highcharts.AxisTypeValue}\n * @default {highcharts} linear\n * @default {gantt} treegrid\n * @product highcharts gantt\n * @apioption yAxis.type\n */\n /**\n * The height of the Y axis. If it's a number, it is interpreted as\n * pixels.\n *\n * Since Highcharts 2: If it's a percentage string, it is interpreted as\n * percentages of the total plot height.\n *\n * @see [yAxis.top](#yAxis.top)\n *\n * @sample {highstock} stock/demo/candlestick-and-volume/\n * Percentage height panes\n *\n * @type {number|string}\n * @product highcharts highstock\n * @apioption yAxis.height\n */\n /**\n * Solid gauge only. Unless [stops](#yAxis.stops) are set, the color\n * to represent the maximum value of the Y axis.\n *\n * @sample {highcharts} highcharts/yaxis/mincolor-maxcolor/\n * Min and max colors\n *\n * @type {Highcharts.ColorType}\n * @default #003399\n * @since 4.0\n * @product highcharts\n * @apioption yAxis.maxColor\n */\n /**\n * Solid gauge only. Unless [stops](#yAxis.stops) are set, the color\n * to represent the minimum value of the Y axis.\n *\n * @sample {highcharts} highcharts/yaxis/mincolor-maxcolor/\n * Min and max color\n *\n * @type {Highcharts.ColorType}\n * @default #e6ebf5\n * @since 4.0\n * @product highcharts\n * @apioption yAxis.minColor\n */\n /**\n * Whether to reverse the axis so that the highest number is closest\n * to the origin.\n *\n * @sample {highcharts} highcharts/yaxis/reversed/\n * Reversed Y axis\n * @sample {highstock} stock/xaxis/reversed/\n * Reversed Y axis\n *\n * @type {boolean}\n * @default {highcharts} false\n * @default {highstock} false\n * @default {highmaps} true\n * @default {gantt} true\n * @apioption yAxis.reversed\n */\n /**\n * If `true`, the first series in a stack will be drawn on top in a\n * positive, non-reversed Y axis. If `false`, the first series is in\n * the base of the stack.\n *\n * @sample {highcharts} highcharts/yaxis/reversedstacks-false/\n * Non-reversed stacks\n * @sample {highstock} highcharts/yaxis/reversedstacks-false/\n * Non-reversed stacks\n *\n * @type {boolean}\n * @default true\n * @since 3.0.10\n * @product highcharts highstock\n * @apioption yAxis.reversedStacks\n */\n reversedStacks: true,\n /**\n * Solid gauge series only. Color stops for the solid gauge. Use this\n * in cases where a linear gradient between a `minColor` and `maxColor`\n * is not sufficient. The stops is an array of tuples, where the first\n * item is a float between 0 and 1 assigning the relative position in\n * the gradient, and the second item is the color.\n *\n * For solid gauges, the Y axis also inherits the concept of\n * [data classes](https://api.highcharts.com/highmaps#colorAxis.dataClasses)\n * from the Highmaps color axis.\n *\n * @sample {highcharts} highcharts/demo/gauge-solid/\n * Gauge with stops\n *\n * @see [minColor](#yAxis.minColor)\n * @see [maxColor](#yAxis.maxColor)\n *\n * @type {Array<Array<number,Highcharts.ColorType>>}\n * @since 4.0\n * @product highcharts\n * @apioption yAxis.stops\n */\n /**\n * The pixel width of the major tick marks.\n *\n * @sample {highcharts} highcharts/xaxis/tickwidth/ 10 px width\n * @sample {highstock} stock/xaxis/ticks/ Formatted ticks on X axis\n *\n * @type {number}\n * @default 0\n * @product highcharts highstock gantt\n * @apioption yAxis.tickWidth\n */\n /**\n * Whether to force the axis to end on a tick. Use this option with\n * the `maxPadding` option to control the axis end.\n *\n * This option is always disabled, when panning type is\n * either `y` or `xy`.\n *\n * @see [type](#chart.panning.type)\n *\n *\n * @sample {highcharts} highcharts/yaxis/endontick/\n * True by default\n * @sample {highcharts} highcharts/yaxis/endontick-false/\n * False\n * @sample {highstock} stock/demo/basic-line/\n * True by default\n * @sample {highstock} stock/xaxis/endontick/\n * False for Y axis\n *\n * @since 1.2.0\n */\n endOnTick: true,\n /**\n * Padding of the max value relative to the length of the axis. A\n * padding of 0.05 will make a 100px axis 5px longer. This is useful\n * when you don't want the highest data value to appear on the edge\n * of the plot area. When the axis' `max` option is set or a max extreme\n * is set using `axis.setExtremes()`, the maxPadding will be ignored.\n *\n * Also the `softThreshold` option takes precedence over `maxPadding`,\n * so if the data is tangent to the threshold, `maxPadding` may not\n * apply unless `softThreshold` is set to false.\n *\n * @sample {highcharts} highcharts/yaxis/maxpadding-02/\n * Max padding of 0.2\n * @sample {highstock} stock/xaxis/minpadding-maxpadding/\n * Greater min- and maxPadding\n *\n * @since 1.2.0\n * @product highcharts highstock gantt\n */\n maxPadding: 0.05,\n /**\n * Padding of the min value relative to the length of the axis. A\n * padding of 0.05 will make a 100px axis 5px longer. This is useful\n * when you don't want the lowest data value to appear on the edge\n * of the plot area. When the axis' `min` option is set or a max extreme\n * is set using `axis.setExtremes()`, the maxPadding will be ignored.\n *\n * Also the `softThreshold` option takes precedence over `minPadding`,\n * so if the data is tangent to the threshold, `minPadding` may not\n * apply unless `softThreshold` is set to false.\n *\n * @sample {highcharts} highcharts/yaxis/minpadding/\n * Min padding of 0.2\n * @sample {highstock} stock/xaxis/minpadding-maxpadding/\n * Greater min- and maxPadding\n *\n * @since 1.2.0\n * @product highcharts highstock gantt\n */\n minPadding: 0.05,\n /**\n * @productdesc {highstock}\n * In Highcharts Stock 1.x, the Y axis was placed\n * on the left side by default.\n *\n * @sample {highcharts} highcharts/yaxis/opposite/\n * Secondary Y axis opposite\n * @sample {highstock} stock/xaxis/opposite/\n * Y axis on left side\n *\n * @type {boolean}\n * @default {highstock} true\n * @default {highcharts} false\n * @product highstock highcharts gantt\n * @apioption yAxis.opposite\n */\n /**\n * @see [tickInterval](#xAxis.tickInterval)\n * @see [tickPositioner](#xAxis.tickPositioner)\n * @see [tickPositions](#xAxis.tickPositions)\n */\n tickPixelInterval: 72,\n /**\n * Whether to show the last tick label.\n *\n * @productdesc {highcharts|gantt}\n * Defaults to `true` on cartesian charts, and `false` on polar charts.\n *\n * @productdesc {highstock}\n * Defaults to `true` for categorized yAxis and `false` for other types\n * of yAxis.\n *\n * @default undefined\n */\n showLastLabel: true,\n /**\n * @extends xAxis.labels\n */\n labels: {\n /**\n * The label's pixel distance from the perimeter of the plot area.\n * On cartesian charts, this is overridden if the `labels.y` setting\n * is set.\n *\n * On polar charts, if it's a percentage string, it is interpreted\n * the same as [series.radius](#plotOptions.gauge.radius), so the\n * label can be aligned under the gauge's shape.\n *\n * @sample {highcharts} highcharts/yaxis/labels-distance/\n * Polar chart, labels centered under the arc\n *\n * @type {number|string}\n * @product highcharts\n * @apioption yAxis.labels.distance\n */\n /**\n * The y position offset of all labels relative to the tick\n * positions on the axis. For polar and radial axis consider the use\n * of the [distance](#yAxis.labels.distance) option.\n *\n * @sample {highcharts} highcharts/xaxis/labels-x/\n * Y axis labels placed on grid lines\n *\n * @type {number}\n * @default {highcharts} 3\n * @default {highstock} -2\n * @default {highmaps} 3\n * @apioption yAxis.labels.y\n */\n /**\n * What part of the string the given position is anchored to. Can\n * be one of `\"left\"`, `\"center\"` or `\"right\"`. The exact position\n * also depends on the `labels.x` setting.\n *\n * Angular gauges and solid gauges defaults to `\"center\"`.\n * Solid gauges with two labels have additional option `\"auto\"`\n * for automatic horizontal and vertical alignment.\n *\n * @sample {highcharts} highcharts/yaxis/labels-align-left/\n * Left\n * @sample {highcharts} highcharts/series-solidgauge/labels-auto-aligned/\n * Solid gauge labels auto aligned\n *\n * @type {Highcharts.AlignValue}\n * @default {highstock} right\n * @apioption yAxis.labels.align\n */\n /**\n * The x position offset of all labels relative to the tick\n * positions on the axis. Defaults to -15 for left axis, 15 for\n * right axis.\n *\n * @sample {highcharts} highcharts/xaxis/labels-x/\n * Y axis labels placed on grid lines\n *\n * @type {number}\n */\n x: void 0\n },\n /**\n * @sample {highcharts} highcharts/yaxis/max-200/\n * Y axis max of 200\n * @sample {highcharts} highcharts/yaxis/max-logarithmic/\n * Y axis max on logarithmic axis\n * @sample {highstock} stock/yaxis/min-max/\n * Fixed min and max on Y axis\n *\n * @apioption yAxis.max\n */\n /**\n * @sample {highcharts} highcharts/yaxis/min-startontick-false/\n * -50 with startOnTick to false\n * @sample {highcharts} highcharts/yaxis/min-startontick-true/\n * -50 with startOnTick true by default\n * @sample {highstock} stock/yaxis/min-max/\n * Fixed min and max on Y axis\n *\n * @apioption yAxis.min\n */\n /**\n * An optional scrollbar to display on the Y axis in response to\n * limiting the minimum an maximum of the axis values.\n *\n * In styled mode, all the presentational options for the scrollbar\n * are replaced by the classes `.highcharts-scrollbar-thumb`,\n * `.highcharts-scrollbar-arrow`, `.highcharts-scrollbar-button`,\n * `.highcharts-scrollbar-rifles` and `.highcharts-scrollbar-track`.\n *\n * @sample {highstock} stock/yaxis/scrollbar/\n * Scrollbar on the Y axis\n *\n * @extends scrollbar\n * @since 4.2.6\n * @product highstock\n * @excluding height\n * @apioption yAxis.scrollbar\n */\n /**\n * Enable the scrollbar on the Y axis.\n *\n * @sample {highstock} stock/yaxis/scrollbar/\n * Enabled on Y axis\n *\n * @type {boolean}\n * @default false\n * @since 4.2.6\n * @product highstock\n * @apioption yAxis.scrollbar.enabled\n */\n /**\n * Pixel margin between the scrollbar and the axis elements.\n *\n * @type {number}\n * @default 10\n * @since 4.2.6\n * @product highstock\n * @apioption yAxis.scrollbar.margin\n */\n /* eslint-disable @highcharts/highcharts/doclet-apioption-last */\n /**\n * Defines the position of the scrollbar. By default, it is positioned\n * on the opposite of the main axis (right side of the chart).\n * However, in the case of RTL languages could be set to `false`\n * which positions the scrollbar on the left.\n *\n * Works only for vertical axes.\n * This means yAxis in a non-inverted chart and xAxis in the inverted.\n *\n * @sample stock/yaxis/scrollbar-opposite/\n * A scrollbar not on the opposite side\n *\n * @type {boolean}\n * @default true\n * @since 9.3.0\n *\n * @apioption yAxis.scrollbar.opposite\n * @apioption xAxis.scrollbar.opposite\n *\n */\n /* eslint-enable @highcharts/highcharts/doclet-apioption-last */\n /**\n * Whether to show the scrollbar when it is fully zoomed out at max\n * range. Setting it to `false` on the Y axis makes the scrollbar stay\n * hidden until the user zooms in, like common in browsers.\n *\n * @type {boolean}\n * @default true\n * @since 4.2.6\n * @product highstock\n * @apioption yAxis.scrollbar.showFull\n */\n /**\n * The width of a vertical scrollbar or height of a horizontal\n * scrollbar. Defaults to 20 on touch devices.\n *\n * @type {number}\n * @default 14\n * @since 4.2.6\n * @product highstock\n * @apioption yAxis.scrollbar.size\n */\n /**\n * Z index of the scrollbar elements.\n *\n * @type {number}\n * @default 3\n * @since 4.2.6\n * @product highstock\n * @apioption yAxis.scrollbar.zIndex\n */\n /**\n * A soft maximum for the axis. If the series data maximum is less\n * than this, the axis will stay at this maximum, but if the series\n * data maximum is higher, the axis will flex to show all data.\n *\n * **Note**: The [series.softThreshold](\n * #plotOptions.series.softThreshold) option takes precedence over this\n * option.\n *\n * @sample highcharts/yaxis/softmin-softmax/\n * Soft min and max\n *\n * @type {number}\n * @since 5.0.1\n * @product highcharts highstock gantt\n * @apioption yAxis.softMax\n */\n /**\n * A soft minimum for the axis. If the series data minimum is greater\n * than this, the axis will stay at this minimum, but if the series\n * data minimum is lower, the axis will flex to show all data.\n *\n * **Note**: The [series.softThreshold](\n * #plotOptions.series.softThreshold) option takes precedence over this\n * option.\n *\n * @sample highcharts/yaxis/softmin-softmax/\n * Soft min and max\n *\n * @type {number}\n * @since 5.0.1\n * @product highcharts highstock gantt\n * @apioption yAxis.softMin\n */\n /**\n * Whether to force the axis to start on a tick. Use this option with\n * the `maxPadding` option to control the axis start.\n *\n * This option is always disabled, when panning type is\n * either `y` or `xy`.\n *\n * @see [type](#chart.panning.type)\n *\n * @sample {highcharts} highcharts/xaxis/startontick-false/\n * False by default\n * @sample {highcharts} highcharts/xaxis/startontick-true/\n * True\n * @sample {highstock} stock/xaxis/endontick/\n * False for Y axis\n *\n * @since 1.2.0\n * @product highcharts highstock gantt\n */\n startOnTick: true,\n title: {\n /**\n * The pixel distance between the axis labels and the title.\n * Positive values are outside the axis line, negative are inside.\n *\n * @sample {highcharts} highcharts/xaxis/title-margin/\n * Y axis title margin of 60\n *\n * @type {number}\n * @default 40\n * @apioption yAxis.title.margin\n */\n /**\n * The actual text of the axis title. Horizontal texts can contain\n * HTML, but rotated texts are painted using vector techniques and\n * must be clean text. The Y axis title is disabled by setting the\n * `text` option to `undefined`. The default value is overridden by\n * the `lang.yAxisTitle` language option.\n *\n * @sample {highcharts} highcharts/xaxis/title-text/\n * Custom HTML\n *\n * @type {string|undefined}\n * @default {highcharts} Values\n * @default {highstock} undefined\n * @product highcharts highstock gantt\n * @apioption yAxis.title.text\n */\n },\n /**\n * The top position of the Y axis. If it's a number, it is interpreted\n * as pixel position relative to the chart.\n *\n * Since Highcharts 2: If it's a percentage string, it is interpreted as\n * percentages of the plot height, offset from plot area top.\n *\n * @see [yAxis.height](#yAxis.height)\n *\n * @sample {highstock} stock/demo/candlestick-and-volume/\n * Percentage height panes\n *\n * @type {number|string}\n * @product highcharts highstock\n * @apioption yAxis.top\n */\n /**\n * The stack labels show the total value for each bar in a stacked\n * column or bar chart. The label will be placed on top of positive\n * columns and below negative columns. In case of an inverted column\n * chart or a bar chart the label is placed to the right of positive\n * bars and to the left of negative bars.\n *\n * @product highcharts\n */\n stackLabels: {\n /**\n * Defines the horizontal alignment of the stack total label. Can be\n * one of `\"left\"`, `\"center\"` or `\"right\"`. The default value is\n * calculated at runtime and depends on orientation and whether the\n * stack is positive or negative.\n *\n * @sample {highcharts} highcharts/yaxis/stacklabels-align-left/\n * Aligned to the left\n * @sample {highcharts} highcharts/yaxis/stacklabels-align-center/\n * Aligned in center\n * @sample {highcharts} highcharts/yaxis/stacklabels-align-right/\n * Aligned to the right\n *\n * @type {Highcharts.AlignValue}\n * @since 2.1.5\n * @product highcharts\n * @apioption yAxis.stackLabels.align\n */\n /**\n * A format string for the data label. Available variables are the\n * same as for `formatter`.\n *\n * @type {string}\n * @default {total}\n * @since 3.0.2\n * @product highcharts highstock\n * @apioption yAxis.stackLabels.format\n */\n /**\n * Rotation of the labels in degrees.\n *\n * @sample {highcharts} highcharts/yaxis/stacklabels-rotation/\n * Labels rotated 45°\n *\n * @type {number}\n * @default 0\n * @since 2.1.5\n * @product highcharts\n * @apioption yAxis.stackLabels.rotation\n */\n /**\n * The text alignment for the label. While `align` determines where\n * the texts anchor point is placed with regards to the stack,\n * `textAlign` determines how the text is aligned against its anchor\n * point. Possible values are `\"left\"`, `\"center\"` and `\"right\"`.\n * The default value is calculated at runtime and depends on\n * orientation and whether the stack is positive or negative.\n *\n * @sample {highcharts} highcharts/yaxis/stacklabels-textalign-left/\n * Label in center position but text-aligned left\n *\n * @type {Highcharts.AlignValue}\n * @since 2.1.5\n * @product highcharts\n * @apioption yAxis.stackLabels.textAlign\n */\n /**\n * Whether to [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the labels.\n *\n * @type {boolean}\n * @default false\n * @since 3.0\n * @product highcharts highstock\n * @apioption yAxis.stackLabels.useHTML\n */\n /**\n * Defines the vertical alignment of the stack total label. Can be\n * one of `\"top\"`, `\"middle\"` or `\"bottom\"`. The default value is\n * calculated at runtime and depends on orientation and whether the\n * stack is positive or negative.\n *\n * @sample {highcharts} highcharts/yaxis/stacklabels-verticalalign-top/\n * Vertically aligned top\n * @sample {highcharts} highcharts/yaxis/stacklabels-verticalalign-middle/\n * Vertically aligned middle\n * @sample {highcharts} highcharts/yaxis/stacklabels-verticalalign-bottom/\n * Vertically aligned bottom\n *\n * @type {Highcharts.VerticalAlignValue}\n * @since 2.1.5\n * @product highcharts\n * @apioption yAxis.stackLabels.verticalAlign\n */\n /**\n * The x position offset of the label relative to the left of the\n * stacked bar. The default value is calculated at runtime and\n * depends on orientation and whether the stack is positive or\n * negative.\n *\n * @sample {highcharts} highcharts/yaxis/stacklabels-x/\n * Stack total labels with x offset\n *\n * @type {number}\n * @since 2.1.5\n * @product highcharts\n * @apioption yAxis.stackLabels.x\n */\n /**\n * The y position offset of the label relative to the tick position\n * on the axis. The default value is calculated at runtime and\n * depends on orientation and whether the stack is positive or\n * negative.\n *\n * @sample {highcharts} highcharts/yaxis/stacklabels-y/\n * Stack total labels with y offset\n *\n * @type {number}\n * @since 2.1.5\n * @product highcharts\n * @apioption yAxis.stackLabels.y\n */\n /**\n * Enable or disable the initial animation when a series is\n * displayed for the `stackLabels`. The animation can also be set as\n * a configuration object. Please note that this option only\n * applies to the initial animation.\n * For other animations, see [chart.animation](#chart.animation)\n * and the animation parameter under the API methods.\n * The following properties are supported:\n *\n * - `defer`: The animation delay time in milliseconds.\n *\n * @sample {highcharts} highcharts/plotoptions/animation-defer/\n * Animation defer settings\n * @type {boolean|Partial<Highcharts.AnimationOptionsObject>}\n * @since 8.2.0\n * @apioption yAxis.stackLabels.animation\n */\n animation: {},\n /**\n * The animation delay time in milliseconds.\n * Set to `0` renders stackLabel immediately.\n * As `undefined` inherits defer time from the [series.animation.defer](#plotOptions.series.animation.defer).\n *\n * @type {number}\n * @since 8.2.0\n * @apioption yAxis.stackLabels.animation.defer\n */\n /**\n * Allow the stack labels to overlap.\n *\n * @sample {highcharts} highcharts/yaxis/stacklabels-allowoverlap-false/\n * Default false\n *\n * @since 5.0.13\n * @product highcharts\n */\n allowOverlap: false,\n /**\n * The background color or gradient for the stack label.\n *\n * @sample {highcharts} highcharts/yaxis/stacklabels-box/\n * Stack labels box options\n * @type {Highcharts.ColorType}\n * @since 8.1.0\n * @apioption yAxis.stackLabels.backgroundColor\n */\n /**\n * The border color for the stack label. Defaults to `undefined`.\n *\n * @sample {highcharts} highcharts/yaxis/stacklabels-box/\n * Stack labels box options\n * @type {Highcharts.ColorType}\n * @since 8.1.0\n * @apioption yAxis.stackLabels.borderColor\n */\n /**\n * The border radius in pixels for the stack label.\n *\n * @sample {highcharts} highcharts/yaxis/stacklabels-box/\n * Stack labels box options\n * @type {number}\n * @default 0\n * @since 8.1.0\n * @apioption yAxis.stackLabels.borderRadius\n */\n /**\n * The border width in pixels for the stack label.\n *\n * @sample {highcharts} highcharts/yaxis/stacklabels-box/\n * Stack labels box options\n * @type {number}\n * @default 0\n * @since 8.1.0\n * @apioption yAxis.stackLabels.borderWidth\n */\n /**\n * Enable or disable the stack total labels.\n *\n * @sample {highcharts} highcharts/yaxis/stacklabels-enabled/\n * Enabled stack total labels\n * @sample {highcharts} highcharts/yaxis/stacklabels-enabled-waterfall/\n * Enabled stack labels in waterfall chart\n *\n * @since 2.1.5\n * @product highcharts\n */\n enabled: false,\n /**\n * Whether to hide stack labels that are outside the plot area.\n * By default, the stack label is moved\n * inside the plot area according to the\n * [overflow](/highcharts/#yAxis/stackLabels/overflow)\n * option.\n *\n * @type {boolean}\n * @since 7.1.3\n */\n crop: true,\n /**\n * How to handle stack total labels that flow outside the plot area.\n * The default is set to `\"justify\"`,\n * which aligns them inside the plot area.\n * For columns and bars, this means it will be moved inside the bar.\n * To display stack labels outside the plot area,\n * set `crop` to `false` and `overflow` to `\"allow\"`.\n *\n * @sample highcharts/yaxis/stacklabels-overflow/\n * Stack labels flows outside the plot area.\n *\n * @type {Highcharts.DataLabelsOverflowValue}\n * @since 7.1.3\n */\n overflow: 'justify',\n /**\n * Callback JavaScript function to format the label. The value is\n * given by `this.total`. Since v12.6.0, the callback also receives\n * `ctx` as the first argument, so that arrow functions can access\n * the same context as regular functions using `this`.\n *\n * @sample {highcharts} highcharts/yaxis/stacklabels-formatter/\n * Added units to stack total value\n *\n * @type {Highcharts.FormatterCallbackFunction<Highcharts.StackItemObject>}\n * @since 2.1.5\n * @product highcharts\n */\n formatter: function () {\n return this.axis.chart.numberFormatter(this.total || 0, -1);\n },\n /**\n * CSS styles for the label.\n *\n * In styled mode, the styles are set in the\n * `.highcharts-stack-label` class.\n *\n * @sample {highcharts} highcharts/yaxis/stacklabels-style/\n * Red stack total labels\n *\n * @type {Highcharts.CSSObject}\n * @since 2.1.5\n * @product highcharts\n */\n style: {\n /** @type {Highcharts.ColorType} */\n color: 'var(--highcharts-neutral-color-100)',\n /**\n * @type {number|string}\n */\n fontSize: '0.7em',\n fontWeight: 'bold',\n textOutline: '1px contrast'\n }\n },\n gridLineWidth: 1,\n lineWidth: 0\n };\n})(AxisDefaults || (AxisDefaults = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default AxisDefaults;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport F from '../Templating.js';\nimport H from '../Globals.js';\nconst { deg2rad } = H;\nimport { correctFloat, clamp, defined, extend, isNumber, merge, pick, destroyObjectProperties, getAlignFactor, fireEvent } from '../../Shared/Utilities.js';\n/* *\n *\n * Class\n *\n * */\n/* eslint-disable no-invalid-this, valid-jsdoc */\n/**\n * The Tick class.\n *\n * @class\n * @name Highcharts.Tick\n *\n * @param {Highcharts.Axis} axis\n * The axis of the tick.\n *\n * @param {number} pos\n * The position of the tick on the axis in terms of axis values.\n *\n * @param {string} [type]\n * The type of tick, either 'minor' or an empty string\n *\n * @param {boolean} [noLabel=false]\n * Whether to disable the label or not. Defaults to false.\n *\n * @param {Object} [parameters]\n * Optional parameters for the tick.\n */\nclass Tick {\n /* *\n *\n * Constructors\n *\n * */\n constructor(axis, pos, type, noLabel, parameters) {\n /** @internal */\n this.isNew = true;\n /** @internal */\n this.isNewLabel = true;\n /**\n * The related axis of the tick.\n * @name Highcharts.Tick#axis\n * @type {Highcharts.Axis}\n */\n this.axis = axis;\n /**\n * The logical position of the tick on the axis in terms of axis values.\n * @name Highcharts.Tick#pos\n * @type {number}\n */\n this.pos = pos;\n /**\n * The tick type, which can be `\"minor\"`, or an empty string.\n * @name Highcharts.Tick#type\n * @type {string}\n */\n this.type = type || '';\n this.parameters = parameters || {};\n /**\n * The mark offset of the tick on the axis. Usually `undefined`, numeric\n * for grid axes.\n * @name Highcharts.Tick#tickmarkOffset\n * @type {number|undefined}\n */\n this.tickmarkOffset = this.parameters.tickmarkOffset;\n this.options = this.parameters.options;\n fireEvent(this, 'init');\n if (!type && !noLabel) {\n this.addLabel();\n }\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Write the tick label.\n *\n * @internal\n * @function Highcharts.Tick#addLabel\n */\n addLabel() {\n const tick = this, axis = tick.axis, options = axis.options, chart = axis.chart, categories = axis.categories, log = axis.logarithmic, names = axis.names, pos = tick.pos, labelOptions = pick(tick.options?.labels, options.labels), tickPositions = axis.tickPositions, isFirst = pos === tickPositions[0], isLast = pos === tickPositions[tickPositions.length - 1], tickPositionInfo = tickPositions.info, boundary = tickPositionInfo?.boundaryTicks[pos], DTLFormats = options.dateTimeLabelFormats;\n let label = tick.label, dateTimeLabelFormat, dateTimeLabelFormats, i;\n // The context value\n let value = this.parameters.category || (categories ?\n pick(categories[pos], names[pos], pos) :\n pos);\n if (log && isNumber(value)) {\n value = correctFloat(log.lin2log(value));\n }\n // Set the datetime label format. If a boundary is set for this\n // position, use that. If not, use the main format from base ticks.\n if (axis.dateTime && DTLFormats) {\n if (tickPositionInfo) {\n const boundariesMap = {\n millisecond: 'hour',\n second: 'hour',\n minute: 'hour',\n hour: 'day',\n day: 'month',\n week: 'month',\n month: 'year',\n year: 'year'\n };\n const unitName = tickPositionInfo.unitName, boundaryKey = boundariesMap[unitName], format = !options.grid?.enabled &&\n boundary &&\n boundaryKey &&\n DTLFormats[boundaryKey]?.boundary ||\n DTLFormats[unitName];\n dateTimeLabelFormats = chart.time.resolveDTLFormat(format);\n dateTimeLabelFormat = dateTimeLabelFormats.main;\n }\n else if (isNumber(value)) { // #1441\n dateTimeLabelFormat = axis.dateTime.getXDateFormat(value, DTLFormats || {});\n }\n }\n // Set properties for access in render method\n /**\n * True if the tick is the first one on the axis.\n * @name Highcharts.Tick#isFirst\n * @readonly\n * @type {boolean|undefined}\n */\n tick.isFirst = isFirst;\n /**\n * True if the tick is the last one on the axis.\n * @name Highcharts.Tick#isLast\n * @readonly\n * @type {boolean|undefined}\n */\n tick.isLast = isLast;\n /**\n * Boundary time unit for the label (e.g `day`, `month`, `year`), used\n * for date/time formatting.\n * @name Highcharts.Tick#boundary\n * @type {string|undefined}\n */\n tick.boundary = boundary;\n // Get the string\n const ctx = {\n axis,\n chart,\n dateTimeLabelFormat: dateTimeLabelFormat,\n boundary,\n isFirst,\n isLast,\n pos,\n tick: tick,\n tickPositionInfo,\n value\n };\n // Fire an event that allows modifying the context for use in\n // `labels.format` and `labels.formatter`.\n fireEvent(this, 'labelFormat', ctx);\n // Label formatting. When `labels.format` is given, we first run the\n // defaultFormatter and append the result to the context as `text`.\n // Handy for adding prefix or suffix while keeping default number\n // formatting.\n const labelFormatter = (ctx) => {\n if (labelOptions.formatter) {\n return labelOptions.formatter.call(ctx, ctx);\n }\n if (labelOptions.format) {\n ctx.text = axis.defaultLabelFormatter.call(ctx);\n return F.format(labelOptions.format, ctx, chart);\n }\n return axis.defaultLabelFormatter.call(ctx);\n };\n const text = labelFormatter.call(ctx, ctx);\n // Set up conditional formatting based on the format list if existing.\n const list = dateTimeLabelFormats?.list;\n if (list) {\n tick.shortenLabel = function () {\n for (i = 0; i < list.length; i++) {\n extend(ctx, { dateTimeLabelFormat: list[i] });\n label.attr({\n text: labelFormatter.call(ctx, ctx)\n });\n if (label.getBBox().width <\n axis.getSlotWidth(tick) - 2 *\n (labelOptions.padding || 0)) {\n return;\n }\n }\n label.attr({\n text: ''\n });\n };\n }\n else {\n // #15692\n tick.shortenLabel = void 0;\n }\n // First call\n if (!label) {\n /**\n * The rendered text label of the tick.\n * @name Highcharts.Tick#label\n * @type {Highcharts.SVGElement|undefined}\n */\n tick.label = label = tick.createLabel(text, labelOptions);\n // Base value to detect change for new calls to getBBox\n tick.rotation = 0;\n // Update\n }\n else if (label.textStr !== text) {\n // When resetting text, also reset the width if dynamically set\n // (#8809)\n if (label.textWidth &&\n !labelOptions.style.width &&\n !label.styles.width) {\n label.css({ width: void 0 });\n }\n label.attr({ text });\n label.textPxLength = label.getBBox().width;\n }\n }\n /**\n * Render and return the label of the tick.\n *\n * @internal\n * @function Highcharts.Tick#createLabel\n */\n createLabel(str, labelOptions, xy) {\n const axis = this.axis, { renderer, styledMode } = axis.chart, whiteSpace = labelOptions.style.whiteSpace, label = defined(str) && labelOptions.enabled ?\n renderer\n .text(str, xy?.x, xy?.y, labelOptions.useHTML)\n .add(axis.labelGroup) :\n void 0;\n // Un-rotated length\n if (label) {\n if (!styledMode) {\n label.css(merge(labelOptions.style));\n }\n label.textPxLength = label.getBBox().width;\n // Apply the white-space setting after we read the full text width\n if (!styledMode && whiteSpace) {\n label.css({ whiteSpace });\n }\n }\n return label;\n }\n /**\n * Destructor for the tick prototype\n *\n * @internal\n * @function Highcharts.Tick#destroy\n */\n destroy() {\n destroyObjectProperties(this, this.axis);\n }\n /**\n * Gets the x and y positions for ticks in terms of pixels.\n *\n * @internal\n * @function Highcharts.Tick#getPosition\n *\n * @param {boolean} horiz\n * Whether the tick is on an horizontal axis or not.\n *\n * @param {number} tickPos\n * Position of the tick.\n *\n * @param {number} tickmarkOffset\n * Tickmark offset for all ticks.\n *\n * @param {boolean} [old]\n * Whether the axis has changed or not.\n *\n * @return {Highcharts.PositionObject}\n * The tick position.\n *\n * @emits Highcharts.Tick#event:afterGetPosition\n */\n getPosition(horiz, tickPos, tickmarkOffset, old) {\n const axis = this.axis, chart = axis.chart, cHeight = (old && chart.oldChartHeight) || chart.chartHeight, pos = {\n x: horiz ?\n correctFloat(axis.translate(tickPos + tickmarkOffset, void 0, void 0, old) +\n axis.transB) :\n (axis.left +\n axis.offset +\n (axis.opposite ?\n (((old && chart.oldChartWidth) ||\n chart.chartWidth) -\n axis.right -\n axis.left) :\n 0)),\n y: horiz ?\n (cHeight -\n axis.bottom +\n axis.offset -\n (axis.opposite ? axis.height : 0)) :\n correctFloat(cHeight -\n axis.translate(tickPos + tickmarkOffset, void 0, void 0, old) -\n axis.transB)\n };\n // Chrome workaround for #10516\n pos.y = clamp(pos.y, -1e9, 1e9);\n fireEvent(this, 'afterGetPosition', { pos: pos });\n return pos;\n }\n /**\n * Get the x, y position of the tick label\n * @internal\n */\n getLabelPosition(x, y, label, horiz, labelOptions, tickmarkOffset, index, step) {\n const axis = this.axis, transA = axis.transA, reversed = ( // #7911\n axis.isLinked && axis.linkedParent ?\n axis.linkedParent.reversed :\n axis.reversed), staggerLines = axis.staggerLines, rotCorr = axis.tickRotCorr || { x: 0, y: 0 }, \n // Adjust for label alignment if we use reserveSpace: true (#5286)\n labelOffsetCorrection = (!horiz && !axis.reserveSpaceDefault ?\n -axis.labelOffset * (axis.labelAlign === 'center' ? 0.5 : 1) :\n 0), distance = labelOptions.distance, pos = {};\n let yOffset, line;\n if (axis.side === 0) {\n yOffset = label.rotation ? -distance : -label.getBBox().height;\n }\n else if (axis.side === 2) {\n yOffset = rotCorr.y + distance;\n }\n else {\n // #3140, #3140\n yOffset = Math.cos(label.rotation * deg2rad) *\n (rotCorr.y - label.getBBox(false, 0).height / 2);\n }\n if (defined(labelOptions.y)) {\n yOffset = axis.side === 0 && axis.horiz ?\n labelOptions.y + yOffset :\n labelOptions.y;\n }\n x = x +\n pick(labelOptions.x, [0, 1, 0, -1][axis.side] * distance) +\n labelOffsetCorrection +\n rotCorr.x -\n (tickmarkOffset && horiz ?\n tickmarkOffset * transA * (reversed ? -1 : 1) :\n 0);\n y = y + yOffset - (tickmarkOffset && !horiz ?\n tickmarkOffset * transA * (reversed ? 1 : -1) : 0);\n // Correct for staggered labels\n if (staggerLines) {\n line = (index / (step || 1) % staggerLines);\n if (axis.opposite) {\n line = staggerLines - line - 1;\n }\n y += line * (axis.labelOffset / staggerLines);\n }\n pos.x = x;\n pos.y = Math.round(y);\n fireEvent(this, 'afterGetLabelPosition', { pos: pos, tickmarkOffset: tickmarkOffset, index: index });\n return pos;\n }\n /**\n * Get the offset height or width of the label\n *\n * @internal\n * @function Highcharts.Tick#getLabelSize\n */\n getLabelSize() {\n return this.label ?\n this.label.getBBox()[this.axis.horiz ? 'height' : 'width'] :\n 0;\n }\n /**\n * Extendible method to return the path of the marker\n * @internal\n */\n getMarkPath(x, y, tickLength, tickWidth, horiz = false, renderer) {\n return renderer.crispLine([[\n 'M',\n x,\n y\n ], [\n 'L',\n x + (horiz ? 0 : -tickLength),\n y + (horiz ? tickLength : 0)\n ]], tickWidth);\n }\n /**\n * Handle the label overflow by adjusting the labels to the left and right\n * edge, or hide them if they collide into the neighbor label.\n *\n * @internal\n * @function Highcharts.Tick#handleOverflow\n */\n handleOverflow(xy) {\n const tick = this, axis = this.axis, labelOptions = axis.options.labels, pxPos = xy.x, chartWidth = axis.chart.chartWidth, spacing = axis.chart.spacing, leftBound = pick(axis.labelLeft, Math.min(axis.pos, spacing[3])), rightBound = pick(axis.labelRight, Math.max(!axis.isRadial ? axis.pos + axis.len : 0, chartWidth - spacing[1])), label = this.label, rotation = this.rotation, factor = getAlignFactor(axis.labelAlign || label.attr('align')), labelWidth = label.getBBox().width, slotWidth = axis.getSlotWidth(tick), xCorrection = factor, css = {};\n let modifiedSlotWidth = slotWidth, goRight = 1, leftPos, rightPos, textWidth;\n // Check if the label overshoots the chart spacing box. If it does, move\n // it. If it now overshoots the slotWidth, add ellipsis.\n if (!rotation && labelOptions.overflow === 'justify') {\n leftPos = pxPos - factor * labelWidth;\n rightPos = pxPos + (1 - factor) * labelWidth;\n if (leftPos < leftBound) {\n modifiedSlotWidth =\n xy.x + modifiedSlotWidth * (1 - factor) - leftBound;\n }\n else if (rightPos > rightBound) {\n modifiedSlotWidth =\n rightBound - xy.x + modifiedSlotWidth * factor;\n goRight = -1;\n }\n modifiedSlotWidth = Math.min(slotWidth, modifiedSlotWidth); // #4177\n if (modifiedSlotWidth < slotWidth && axis.labelAlign === 'center') {\n xy.x += (goRight *\n (slotWidth -\n modifiedSlotWidth -\n xCorrection * (slotWidth - Math.min(labelWidth, modifiedSlotWidth))));\n }\n // If the label width exceeds the available space, set a text width\n // to be picked up below. Also, if a width has been set before, we\n // need to set a new one because the reported labelWidth will be\n // limited by the box (#3938).\n if (labelWidth > modifiedSlotWidth ||\n (axis.autoRotation && label?.styles?.width)) {\n textWidth = modifiedSlotWidth;\n }\n // Add ellipsis to prevent rotated labels to be clipped against the edge\n // of the chart\n }\n else if (rotation < 0 &&\n pxPos - factor * labelWidth < leftBound) {\n textWidth = Math.round(pxPos / Math.cos(rotation * deg2rad) - leftBound);\n }\n else if (rotation > 0 &&\n pxPos + factor * labelWidth > rightBound) {\n textWidth = Math.round((chartWidth - pxPos) /\n Math.cos(rotation * deg2rad));\n }\n if (textWidth && label) {\n if (tick.shortenLabel) {\n tick.shortenLabel();\n }\n else {\n label.css(extend(css, {\n width: Math.floor(textWidth) + 'px',\n lineClamp: axis.isRadial ? 0 : 1\n }));\n }\n }\n }\n /**\n * Put everything in place\n *\n * @internal\n * @param {number} index\n *\n * @param {boolean} [old]\n * Use old coordinates to prepare an animation into new position\n *\n * @param {number} [opacity]\n */\n render(index, old, opacity) {\n const tick = this, axis = tick.axis, horiz = axis.horiz, pos = tick.pos, tickmarkOffset = pick(tick.tickmarkOffset, axis.tickmarkOffset), xy = tick.getPosition(horiz, pos, tickmarkOffset, old), x = xy.x, y = xy.y, axisStart = axis.pos, axisEnd = axisStart + axis.len, pxPos = horiz ? x : y;\n const labelOpacity = pick(opacity, tick.label?.newOpacity, // #15528\n 1);\n // Anything that is not between `axis.pos` and `axis.pos + axis.length`\n // should not be visible (#20166). The `correctFloat` is for reversed\n // axes in Safari.\n if (!axis.chart.polar &&\n (correctFloat(pxPos) < axisStart || pxPos > axisEnd)) {\n opacity = 0;\n }\n opacity ?? (opacity = 1);\n this.isActive = true;\n // Create the grid line\n this.renderGridLine(old, opacity);\n // Create the tick mark\n this.renderMark(xy, opacity);\n // The label is created on init - now move it into place\n this.renderLabel(xy, old, labelOpacity, index);\n tick.isNew = false;\n fireEvent(this, 'afterRender');\n }\n /**\n * Renders the gridLine.\n *\n * @internal\n * @function Highcharts.Tick#renderGridLine\n * @param {boolean} old Whether or not the tick is old\n * @param {number} opacity The opacity of the grid line\n */\n renderGridLine(old, opacity) {\n const tick = this, axis = tick.axis, options = axis.options, attribs = {}, pos = tick.pos, type = tick.type, tickmarkOffset = pick(tick.tickmarkOffset, axis.tickmarkOffset), renderer = axis.chart.renderer;\n let gridLine = tick.gridLine, gridLinePath, gridLineWidth = options.gridLineWidth, gridLineColor = options.gridLineColor, dashStyle = options.gridLineDashStyle;\n if (tick.type === 'minor') {\n gridLineWidth = options.minorGridLineWidth;\n gridLineColor = options.minorGridLineColor;\n dashStyle = options.minorGridLineDashStyle;\n }\n if (!gridLine) {\n if (!axis.chart.styledMode) {\n attribs.stroke = gridLineColor;\n attribs['stroke-width'] = gridLineWidth || 0;\n attribs.dashstyle = dashStyle;\n }\n if (!type) {\n attribs.zIndex = 1;\n }\n if (old) {\n opacity = 0;\n }\n /**\n * The rendered grid line of the tick.\n * @name Highcharts.Tick#gridLine\n * @type {Highcharts.SVGElement|undefined}\n */\n tick.gridLine = gridLine = renderer.path()\n .attr(attribs)\n .addClass('highcharts-' + (type ? type + '-' : '') + 'grid-line')\n .add(axis.gridGroup);\n }\n if (gridLine) {\n gridLinePath = axis.getPlotLinePath({\n value: pos + tickmarkOffset,\n lineWidth: gridLine.strokeWidth(),\n force: 'pass',\n old: old,\n acrossPanes: false // #18025\n });\n // If the parameter 'old' is set, the current call will be followed\n // by another call, therefore do not do any animations this time\n if (gridLinePath) {\n gridLine[old || tick.isNew ? 'attr' : 'animate']({\n d: gridLinePath,\n opacity: opacity\n });\n }\n }\n }\n /**\n * Renders the tick mark.\n *\n * @internal\n * @function Highcharts.Tick#renderMark\n * @param {Highcharts.PositionObject} xy The position vector of the mark\n * @param {number} opacity The opacity of the mark\n */\n renderMark(xy, opacity) {\n const tick = this, axis = tick.axis, options = axis.options, renderer = axis.chart.renderer, type = tick.type, tickSize = axis.tickSize(type ? type + 'Tick' : 'tick'), x = xy.x, y = xy.y, tickWidth = pick(options[type !== 'minor' ? 'tickWidth' : 'minorTickWidth'], !type && axis.isXAxis ? 1 : 0), // X axis defaults to 1\n tickColor = options[type !== 'minor' ? 'tickColor' : 'minorTickColor'];\n let mark = tick.mark;\n const isNewMark = !mark;\n if (tickSize) {\n // Negate the length\n if (axis.opposite) {\n tickSize[0] = -tickSize[0];\n }\n // First time, create it\n if (!mark) {\n /**\n * The rendered mark of the tick.\n * @name Highcharts.Tick#mark\n * @type {Highcharts.SVGElement|undefined}\n */\n tick.mark = mark = renderer.path()\n .addClass('highcharts-' + (type ? type + '-' : '') + 'tick')\n .add(axis.axisGroup);\n if (!axis.chart.styledMode) {\n mark.attr({\n stroke: tickColor,\n 'stroke-width': tickWidth\n });\n }\n }\n mark[isNewMark ? 'attr' : 'animate']({\n d: tick.getMarkPath(x, y, tickSize[0], mark.strokeWidth(), axis.horiz, renderer),\n opacity: opacity\n });\n }\n }\n /**\n * Renders the tick label.\n * Note: The label should already be created in init(), so it should only\n * have to be moved into place.\n *\n * @internal\n * @function Highcharts.Tick#renderLabel\n * @param {Highcharts.PositionObject} xy The position vector of the label\n * @param {boolean} old Whether or not the tick is old\n * @param {number} opacity The opacity of the label\n * @param {number} index The index of the tick\n */\n renderLabel(xy, old, opacity, index) {\n const tick = this, axis = tick.axis, horiz = axis.horiz, options = axis.options, label = tick.label, labelOptions = options.labels, step = labelOptions.step, tickmarkOffset = pick(tick.tickmarkOffset, axis.tickmarkOffset), x = xy.x, y = xy.y;\n let show = true;\n if (label && isNumber(x)) {\n label.xy = xy = tick.getLabelPosition(x, y, label, horiz, labelOptions, tickmarkOffset, index, step);\n // Apply show first and show last. If the tick is both first and\n // last, it is a single centered tick, in which case we show the\n // label anyway (#2100).\n if ((tick.isFirst &&\n !tick.isLast &&\n !options.showFirstLabel) ||\n (tick.isLast &&\n !tick.isFirst &&\n !options.showLastLabel)) {\n show = false;\n // Handle label overflow and show or hide accordingly\n }\n else if (horiz && !old && opacity !== 0) {\n tick.handleOverflow(xy);\n }\n // Apply step\n if (step && index % step) {\n // Show those indices dividable by step\n show = false;\n }\n // Set the new position, and show or hide\n if (show && isNumber(xy.y)) {\n xy.opacity = opacity;\n label[tick.isNewLabel ? 'attr' : 'animate'](xy).show(true);\n tick.isNewLabel = false;\n }\n else {\n label.hide(); // #1338, #15863\n tick.isNewLabel = true;\n }\n }\n }\n}\n/* *\n *\n * Default Export\n *\n * */\nexport default Tick;\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * Optional parameters for the tick.\n * @internal\n * @interface Highcharts.TickParametersObject\n */ /**\n* Set category for the tick.\n* @name Highcharts.TickParametersObject#category\n* @type {string|undefined}\n*/ /**\n* @name Highcharts.TickParametersObject#options\n* @type {Highcharts.Dictionary<any>|undefined}\n*/ /**\n* Set tickmarkOffset for the tick.\n* @name Highcharts.TickParametersObject#tickmarkOffset\n* @type {number|undefined}\n*/\n/**\n * Additional time tick information.\n *\n * @interface Highcharts.TimeTicksInfoObject\n * @extends Highcharts.TimeNormalizedObject\n */ /**\n* @name Highcharts.TimeTicksInfoObject#boundaryTicks\n* @type {Array<string>}\n*/ /**\n* @name Highcharts.TimeTicksInfoObject#totalRange\n* @type {number}\n*/\n(''); // Keeps doclets above in JS file\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport A from '../Animation/AnimationUtilities.js';\nconst { animObject } = A;\nimport AxisDefaults from './AxisDefaults.js';\nconst { xAxis, yAxis } = AxisDefaults;\nimport Color from '../Color/Color.js';\nconst { parse: color } = Color;\nimport D from '../Defaults.js';\nconst { defaultOptions } = D;\nimport F from '../Foundation.js';\nconst { registerEventOptions } = F;\nimport H from '../Globals.js';\nconst { deg2rad } = H;\nimport Tick from './Tick.js';\nimport { arrayMax, arrayMin, clamp, correctFloat, defined, destroyObjectProperties, erase, extend, fireEvent, getClosestDistance, isArray, isNumber, isString, merge, normalizeTickInterval, objectEach, pick, relativeLength, removeEvent, splat, syncTimeout } from '../../Shared/Utilities.js';\nimport { error, insertItem } from '../Utilities.js';\nconst getNormalizedTickInterval = (axis, tickInterval) => normalizeTickInterval(tickInterval, void 0, void 0, pick(axis.options.allowDecimals, \n// If the tick interval is greater than 0.5, avoid decimals, as\n// linear axes are often used to render discrete values (#3363). If\n// a tick amount is set, allow decimals by default, as it increases\n// the chances for a good fit.\ntickInterval < 0.5 || axis.tickAmount !== void 0), !!axis.tickAmount);\nextend(defaultOptions, { xAxis, yAxis: merge(xAxis, yAxis) });\n/* *\n *\n * Class\n *\n * */\n/**\n * Create a new axis object. Called internally when instantiating a new chart or\n * adding axes by {@link Highcharts.Chart#addAxis}.\n *\n * A chart can have from 0 axes (pie chart) to multiples. In a normal, single\n * series cartesian chart, there is one X axis and one Y axis.\n *\n * The X axis or axes are referenced by {@link Highcharts.Chart.xAxis}, which is\n * an array of Axis objects. If there is only one axis, it can be referenced\n * through `chart.xAxis[0]`, and multiple axes have increasing indices. The same\n * pattern goes for Y axes.\n *\n * If you need to get the axes from a series object, use the `series.xAxis` and\n * `series.yAxis` properties. These are not arrays, as one series can only be\n * associated to one X and one Y axis.\n *\n * A third way to reference the axis programmatically is by `id`. Add an `id` in\n * the axis configuration options, and get the axis by\n * {@link Highcharts.Chart#get}.\n *\n * Configuration options for the axes are given in options.xAxis and\n * options.yAxis.\n *\n * @class\n * @name Highcharts.Axis\n *\n * @param {Highcharts.Chart} chart\n * The Chart instance to apply the axis on.\n *\n * @param {Highcharts.AxisOptions} userOptions\n * Axis options\n */\nclass Axis {\n /* *\n *\n * Constructors\n *\n * */\n constructor(chart, userOptions, coll) {\n /**\n * Whether this axis is allowed to be clipped to the plot area.\n * @internal\n */\n this.clippable = true;\n this.init(chart, userOptions, coll);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Overridable function to initialize the axis.\n *\n * @see {@link Axis}\n *\n * @function Highcharts.Axis#init\n *\n * @param {Highcharts.Chart} chart\n * The Chart instance to apply the axis on.\n *\n * @param {AxisOptions} userOptions\n * Axis options.\n *\n * @emits Highcharts.Axis#event:afterInit\n * @emits Highcharts.Axis#event:init\n */\n init(chart, userOptions, coll = this.coll) {\n const isXAxis = coll === 'xAxis', axis = this, horiz = axis.isZAxis || (chart.inverted ? !isXAxis : isXAxis);\n /**\n * The Chart that the axis belongs to.\n *\n * @name Highcharts.Axis#chart\n * @type {Highcharts.Chart}\n */\n axis.chart = chart;\n /**\n * Whether the axis is horizontal.\n *\n * @name Highcharts.Axis#horiz\n * @type {boolean|undefined}\n */\n axis.horiz = horiz;\n /**\n * Whether the axis is the x-axis.\n *\n * @name Highcharts.Axis#isXAxis\n * @type {boolean|undefined}\n */\n axis.isXAxis = isXAxis;\n /**\n * The collection where the axis belongs, for example `xAxis`, `yAxis`\n * or `colorAxis`. Corresponds to properties on Chart, for example\n * {@link Chart.xAxis}.\n *\n * @name Highcharts.Axis#coll\n * @type {string}\n */\n axis.coll = coll;\n fireEvent(this, 'init', { userOptions: userOptions });\n // Needed in setOptions\n axis.opposite = pick(userOptions.opposite, axis.opposite);\n /**\n * The side on which the axis is rendered. 0 is top, 1 is right, 2\n * is bottom and 3 is left.\n *\n * @name Highcharts.Axis#side\n * @type {number}\n */\n axis.side = pick(userOptions.side, axis.side, (horiz ?\n (axis.opposite ? 0 : 2) : // Top : bottom\n (axis.opposite ? 1 : 3)) // Right : left\n );\n /**\n * Current options for the axis after merge of defaults and user's\n * options.\n *\n * @name Highcharts.Axis#options\n * @type {Highcharts.AxisOptions}\n */\n axis.setOptions(userOptions);\n const options = axis.options, labelsOptions = options.labels;\n // Set the type and fire an event\n axis.type ?? (axis.type = options.type || 'linear');\n axis.uniqueNames ?? (axis.uniqueNames = options.uniqueNames ?? true);\n fireEvent(axis, 'afterSetType');\n /**\n * User's options for this axis without defaults.\n *\n * @name Highcharts.Axis#userOptions\n * @type {Highcharts.AxisOptions}\n */\n axis.userOptions = userOptions;\n axis.minPixelPadding = 0;\n /**\n * Whether the axis is reversed. Based on the `axis.reversed`,\n * option, but inverted charts have reversed xAxis by default.\n *\n * @name Highcharts.Axis#reversed\n * @type {boolean}\n */\n axis.reversed = pick(options.reversed, axis.reversed);\n axis.visible = options.visible;\n axis.zoomEnabled = options.zoomEnabled;\n // Initial categories\n axis.hasNames = this.type === 'category' || options.categories === true;\n /**\n * If categories are present for the axis, names are used instead of\n * numbers for that axis.\n *\n * Since Highcharts 3.0, categories can also be extracted by giving each\n * point a name and setting axis type to `category`. However, if you\n * have multiple series, best practice remains defining the `categories`\n * array.\n *\n * @see [xAxis.categories](/highcharts/xAxis.categories)\n *\n * @name Highcharts.Axis#categories\n * @type {Array<string>}\n * @readonly\n */\n axis.categories = (isArray(options.categories) && options.categories) ||\n (axis.hasNames ? [] : void 0);\n // Axis names and its map for quick access. Backwards mapping is much\n // faster than array searching (#7725). Preserve on update (#3830)\n axis.names || (axis.names = []);\n axis.namesMap || (axis.namesMap = {});\n // Placeholder for plotLines and plotBands groups\n axis.plotLinesAndBandsGroups = {};\n // Shorthand types\n axis.positiveValuesOnly = !!axis.logarithmic;\n // Flag, if axis is linked to another axis\n axis.isLinked = defined(options.linkedTo);\n /**\n * List of major ticks mapped by position on axis.\n *\n * @see {@link Highcharts.Tick}\n *\n * @name Highcharts.Axis#ticks\n * @type {Highcharts.Dictionary<Highcharts.Tick>}\n */\n axis.ticks = {};\n axis.labelEdge = [];\n /**\n * List of minor ticks mapped by position on the axis.\n *\n * @see {@link Highcharts.Tick}\n *\n * @name Highcharts.Axis#minorTicks\n * @type {Highcharts.Dictionary<Highcharts.Tick>}\n */\n axis.minorTicks = {};\n // List of plotLines/Bands\n axis.plotLinesAndBands = [];\n // Alternate bands\n axis.alternateBands = {};\n /**\n * The length of the axis in terms of pixels.\n *\n * @name Highcharts.Axis#len\n * @type {number}\n */\n axis.len ?? (axis.len = 0);\n axis.minRange = axis.userMinRange = options.minRange || options.maxZoom;\n axis.range = options.range;\n /**\n * The maximum value of the axis. In a logarithmic axis, this is the\n * logarithm of the real value, and the real value can be obtained from\n * {@link Axis#getExtremes}.\n *\n * @name Highcharts.Axis#max\n * @type {number|undefined}\n */\n axis.max = void 0;\n /**\n * The minimum value of the axis. In a logarithmic axis, this is the\n * logarithm of the real value, and the real value can be obtained from\n * {@link Axis#getExtremes}.\n *\n * @name Highcharts.Axis#min\n * @type {number|undefined}\n */\n axis.min = void 0;\n /**\n * The processed crosshair options.\n *\n * @name Highcharts.Axis#crosshair\n * @type {boolean|Highcharts.AxisCrosshairOptions}\n */\n const crosshair = pick(options.crosshair, splat(chart.options.tooltip.crosshairs)[isXAxis ? 0 : 1]);\n axis.crosshair = crosshair === true ? {} : crosshair;\n // Register. Don't add it again on Axis.update().\n if (chart.axes.indexOf(axis) === -1) { //\n if (isXAxis) { // #2713\n chart.axes.splice(chart.xAxis.length, 0, axis);\n }\n else {\n chart.axes.push(axis);\n }\n insertItem(this, chart[this.coll]);\n }\n chart.orderItems(axis.coll);\n /**\n * All series associated to the axis.\n *\n * @name Highcharts.Axis#series\n * @type {Array<Highcharts.Series>}\n */\n axis.series = axis.series || []; // Populated by Series\n // Reversed axis\n if (chart.inverted &&\n !axis.isZAxis &&\n isXAxis &&\n !defined(axis.reversed)) {\n axis.reversed = true;\n }\n axis.labelRotation = isNumber(labelsOptions.rotation) ?\n labelsOptions.rotation :\n void 0;\n // Register event listeners\n registerEventOptions(axis, options);\n fireEvent(this, 'afterInit');\n }\n /**\n * Merge and set options.\n *\n * @internal\n * @function Highcharts.Axis#setOptions\n *\n * @param {Highcharts.AxisOptions} userOptions\n * Axis options.\n *\n * @emits Highcharts.Axis#event:afterSetOptions\n */\n setOptions(userOptions) {\n const sideSpecific = this.horiz ?\n // Top and bottom axis defaults\n {\n labels: {\n autoRotation: [-45],\n padding: 3\n },\n margin: 15\n } :\n // Left and right axis, title rotated 90 or 270 degrees\n // respectively\n {\n labels: {\n padding: 1\n },\n title: {\n rotation: 90 * this.side\n }\n };\n this.options = merge(sideSpecific, \n // Merge in the default title for y-axis, which changes with\n // language settings\n this.coll === 'yAxis' ? {\n title: {\n text: this.chart.options.lang.yAxisTitle\n }\n } : {}, defaultOptions[this.coll], userOptions);\n fireEvent(this, 'afterSetOptions', { userOptions });\n }\n /**\n * The default label formatter. The context is a special config object for\n * the label. In apps, use the\n * [labels.formatter](https://api.highcharts.com/highcharts/xAxis.labels.formatter)\n * instead, except when a modification is needed.\n *\n * @function Highcharts.Axis#defaultLabelFormatter\n *\n * @param {Highcharts.AxisLabelsFormatterContextObject} this\n * Formatter context of axis label.\n *\n * @return {string}\n * The formatted label content.\n */\n defaultLabelFormatter() {\n const axis = this.axis, chart = this.chart, { numberFormatter } = chart, value = isNumber(this.value) ? this.value : NaN, time = axis.chart.time, categories = axis.categories, dateTimeLabelFormat = this.dateTimeLabelFormat, lang = defaultOptions.lang, numericSymbols = lang.numericSymbols, numSymMagnitude = lang.numericSymbolMagnitude || 1000, \n // Make sure the same symbol is added for all labels on a linear\n // axis\n numericSymbolDetector = axis.logarithmic ?\n Math.abs(value) :\n axis.tickInterval;\n let i = numericSymbols?.length, multi, ret;\n if (categories) {\n ret = `${this.value}`;\n }\n else if (dateTimeLabelFormat) { // Datetime axis\n ret = time.dateFormat(dateTimeLabelFormat, value, true);\n }\n else if (i &&\n numericSymbols &&\n numericSymbolDetector >= 1000) {\n // Decide whether we should add a numeric symbol like k (thousands)\n // or M (millions). If we are to enable this in tooltip or other\n // places as well, we can move this logic to the numberFormatter and\n // enable it by a parameter.\n while (i-- && typeof ret === 'undefined') {\n multi = Math.pow(numSymMagnitude, i + 1);\n if (\n // Only accept a numeric symbol when the distance is more\n // than a full unit. So for example if the symbol is k, we\n // don't accept numbers like 0.5k.\n numericSymbolDetector >= multi &&\n // Accept one decimal before the symbol. Accepts 0.5k but\n // not 0.25k. How does this work with the previous?\n (value * 10) % multi === 0 &&\n numericSymbols[i] !== null &&\n value !== 0) { // #5480\n ret = numberFormatter(value / multi, -1, void 0, void 0, chart) + numericSymbols[i];\n }\n }\n }\n ret ?? (ret = numberFormatter(value, -1, void 0, \n // Add thousands separators when 10 000 or more\n Math.abs(value) < 10000 ? '' : void 0, chart));\n return ret;\n }\n /**\n * Get the minimum and maximum for the series of each axis. The function\n * analyzes the axis series and updates `this.dataMin` and `this.dataMax`.\n *\n * @internal\n * @function Highcharts.Axis#getSeriesExtremes\n *\n * @emits Highcharts.Axis#event:afterGetSeriesExtremes\n * @emits Highcharts.Axis#event:getSeriesExtremes\n */\n getSeriesExtremes() {\n const axis = this;\n let xExtremes;\n fireEvent(this, 'getSeriesExtremes', null, function () {\n axis.hasVisibleSeries = false;\n // Reset properties in case we're redrawing (#3353)\n axis.dataMin = axis.dataMax = axis.threshold = void 0;\n axis.softThreshold = !axis.isXAxis;\n // Loop through this axis' series\n axis.series.forEach((series) => {\n if (series.reserveSpace()) {\n const seriesOptions = series.options;\n let xData, threshold = seriesOptions.threshold, seriesDataMin, seriesDataMax;\n axis.hasVisibleSeries = true;\n // Validate threshold in logarithmic axes\n if (axis.positiveValuesOnly && (threshold || 0) <= 0) {\n threshold = void 0;\n }\n // Get dataMin and dataMax for X axes\n if (axis.isXAxis) {\n xData = series.getColumn('x');\n if (xData.length) {\n xData = axis.logarithmic ?\n xData.filter((x) => x > 0) :\n xData;\n xExtremes = series.getXExtremes(xData);\n // If xData contains values which is not numbers,\n // then filter them out. To prevent performance hit,\n // we only do this after we have already found\n // seriesDataMin because in most cases all data is\n // valid. #5234.\n seriesDataMin = xExtremes.min;\n seriesDataMax = xExtremes.max;\n if (!isNumber(seriesDataMin) &&\n // #5010:\n !(seriesDataMin instanceof Date)) {\n xData = xData.filter(isNumber);\n xExtremes = series.getXExtremes(xData);\n // Do it again with valid data\n seriesDataMin = xExtremes.min;\n seriesDataMax = xExtremes.max;\n }\n if (xData.length) {\n axis.dataMin = Math.min(pick(axis.dataMin, seriesDataMin), seriesDataMin);\n axis.dataMax = Math.max(pick(axis.dataMax, seriesDataMax), seriesDataMax);\n }\n }\n // Get dataMin and dataMax for Y axes, as well as handle\n // stacking and processed data\n }\n else {\n // Get this particular series extremes\n const dataExtremes = series.applyExtremes();\n // Get the dataMin and dataMax so far. If percentage is\n // used, the min and max are always 0 and 100. If\n // seriesDataMin and seriesDataMax is null, then series\n // doesn't have active y data, we continue with nulls\n if (isNumber(dataExtremes.dataMin)) {\n seriesDataMin = dataExtremes.dataMin;\n axis.dataMin = Math.min(pick(axis.dataMin, seriesDataMin), seriesDataMin);\n }\n if (isNumber(dataExtremes.dataMax)) {\n seriesDataMax = dataExtremes.dataMax;\n axis.dataMax = Math.max(pick(axis.dataMax, seriesDataMax), seriesDataMax);\n }\n // Adjust to threshold\n if (defined(threshold)) {\n axis.threshold = threshold;\n }\n // If any series has a hard threshold, it takes\n // precedence\n if (!seriesOptions.softThreshold ||\n axis.positiveValuesOnly) {\n axis.softThreshold = false;\n }\n }\n }\n });\n });\n fireEvent(this, 'afterGetSeriesExtremes');\n }\n /**\n * Translate from axis value to pixel position on the chart, or back. Use\n * the `toPixels` and `toValue` functions in applications.\n *\n * @internal\n * @function Highcharts.Axis#translate\n */\n translate(val, backwards, cvsCoord, old, handleLog, pointPlacement) {\n const axis = (this.linkedParent || this), // #1417\n localMin = (old && axis.old ? axis.old.min : axis.min);\n if (!isNumber(localMin)) {\n return NaN;\n }\n const minPixelPadding = axis.minPixelPadding, doPostTranslate = (axis.isOrdinal ||\n axis.brokenAxis?.hasBreaks ||\n (axis.logarithmic && handleLog)) && !!axis.lin2val;\n let sign = 1, cvsOffset = 0, localA = old && axis.old ? axis.old.transA : axis.transA, returnValue = 0;\n if (!localA) {\n localA = axis.transA;\n }\n // In vertical axes, the canvas coordinates start from 0 at the top like\n // in SVG.\n if (cvsCoord) {\n sign *= -1; // Canvas coordinates inverts the value\n cvsOffset = axis.len;\n }\n // Handle reversed axis\n if (axis.reversed) {\n sign *= -1;\n cvsOffset -= sign * (axis.sector || axis.len);\n }\n // From pixels to value\n if (backwards) { // Reverse translation\n val = val * sign + cvsOffset;\n val -= minPixelPadding;\n // From chart pixel to value:\n returnValue = val / localA + localMin;\n if (doPostTranslate) { // Log, ordinal and broken axis\n returnValue = axis.lin2val(returnValue);\n }\n // From value to pixels\n }\n else {\n if (doPostTranslate) { // Log, ordinal and broken axis\n val = axis.val2lin(val);\n }\n const value = sign * (val - localMin) * localA;\n returnValue = value +\n cvsOffset +\n (sign * minPixelPadding) +\n (isNumber(pointPlacement) ? localA * pointPlacement : 0);\n if (!axis.isRadial) {\n returnValue = correctFloat(returnValue);\n }\n }\n return returnValue;\n }\n /**\n * Translate a value in terms of axis units into pixels within the chart.\n *\n * @function Highcharts.Axis#toPixels\n *\n * @param {number|string} value\n * A value in terms of axis units. For datetime axes, a timestamp or\n * date/time string is accepted.\n *\n * @param {boolean} [paneCoordinates=false]\n * Whether to return the pixel coordinate relative to the chart or just the\n * axis/pane itself.\n *\n * @return {number}\n * Pixel position of the value on the chart or axis.\n */\n toPixels(value, paneCoordinates) {\n return this.translate(this.chart?.time.parse(value) ?? NaN, false, !this.horiz, void 0, true) + (paneCoordinates ? 0 : this.pos);\n }\n /**\n * Translate a pixel position along the axis to a value in terms of axis\n * units.\n *\n * @function Highcharts.Axis#toValue\n *\n * @param {number} pixel\n * The pixel value coordinate.\n *\n * @param {boolean} [paneCoordinates=false]\n * Whether the input pixel is relative to the chart or just the axis/pane\n * itself.\n *\n * @return {number}\n * The axis value.\n */\n toValue(pixel, paneCoordinates) {\n return this.translate(pixel - (paneCoordinates ? 0 : this.pos), true, !this.horiz, void 0, true);\n }\n /**\n * Create the path for a plot line that goes from the given value on\n * this axis, across the plot to the opposite side. Also used internally for\n * grid lines and crosshairs.\n *\n * @function Highcharts.Axis#getPlotLinePath\n *\n * @param {Highcharts.AxisPlotLinePathOptionsObject} options\n * Options for the path.\n *\n * @return {Highcharts.SVGPathArray|null}\n * The SVG path definition for the plot line.\n */\n getPlotLinePath(options) {\n const axis = this, chart = axis.chart, axisLeft = axis.left, axisTop = axis.top, old = options.old, value = options.value, lineWidth = options.lineWidth, cHeight = (old && chart.oldChartHeight) || chart.chartHeight, cWidth = (old && chart.oldChartWidth) || chart.chartWidth, transB = axis.transB;\n let translatedValue = options.translatedValue, force = options.force, x1, y1, x2, y2, skip;\n // eslint-disable-next-line valid-jsdoc\n /**\n * Check if x is between a and b. If not, either move to a/b\n * or skip, depending on the force parameter.\n * @internal\n */\n function between(x, a, b) {\n if (force !== 'pass' && (x < a || x > b)) {\n if (force) {\n x = clamp(x, a, b);\n }\n else {\n skip = true;\n }\n }\n return x;\n }\n const evt = {\n value,\n lineWidth,\n old,\n force,\n acrossPanes: options.acrossPanes,\n translatedValue\n };\n fireEvent(this, 'getPlotLinePath', evt, function (e) {\n translatedValue = pick(translatedValue, axis.translate(value, void 0, void 0, old));\n // Keep the translated value within sane bounds, and avoid Infinity\n // to fail the isNumber test (#7709).\n translatedValue = clamp(translatedValue, -1e9, 1e9);\n x1 = x2 = translatedValue + transB;\n y1 = y2 = cHeight - translatedValue - transB;\n if (!isNumber(translatedValue)) { // No min or max\n skip = true;\n force = false; // #7175, don't force it when path is invalid\n }\n else if (axis.horiz) {\n y1 = axisTop;\n y2 = cHeight - axis.bottom + (axis.options.isInternal ?\n 0 :\n (chart.scrollablePixelsY || 0)); // #20354, scrollablePixelsY shouldn't be used for navigator\n x1 = x2 = between(x1, axisLeft, axisLeft + axis.width);\n }\n else {\n x1 = axisLeft;\n x2 = cWidth - axis.right + (chart.scrollablePixelsX || 0);\n y1 = y2 = between(y1, axisTop, axisTop + axis.height);\n }\n e.path = skip && !force ?\n void 0 :\n chart.renderer.crispLine([['M', x1, y1], ['L', x2, y2]], lineWidth || 1);\n });\n return evt.path;\n }\n /**\n * Internal function to get the tick positions of a linear axis to round\n * values like whole tens or every five.\n *\n * @function Highcharts.Axis#getLinearTickPositions\n *\n * @param {number} tickInterval\n * The normalized tick interval.\n *\n * @param {number} min\n * Axis minimum.\n *\n * @param {number} max\n * Axis maximum.\n *\n * @return {Array<number>}\n * An array of axis values where ticks should be placed.\n */\n getLinearTickPositions(tickInterval, min, max) {\n const roundedMin = correctFloat(Math.floor(min / tickInterval) * tickInterval), roundedMax = correctFloat(Math.ceil(max / tickInterval) * tickInterval), tickPositions = [];\n let pos, lastPos, precision;\n // When the precision is higher than what we filter out in\n // correctFloat, skip it (#6183).\n if (correctFloat(roundedMin + tickInterval) === roundedMin) {\n precision = 20;\n }\n // For single points, add a tick regardless of the relative position\n // (#2662, #6274)\n if (this.single) {\n return [min];\n }\n // Populate the intermediate values\n pos = roundedMin;\n while (pos <= roundedMax) {\n // Place the tick on the rounded value\n tickPositions.push(pos);\n // Always add the raw tickInterval, not the corrected one.\n pos = correctFloat(pos + tickInterval, precision);\n // If the interval is not big enough in the current min - max range\n // to actually increase the loop variable, we need to break out to\n // prevent endless loop. Issue #619\n if (pos === lastPos) {\n break;\n }\n // Record the last value\n lastPos = pos;\n }\n return tickPositions;\n }\n /**\n * Resolve the new minorTicks/minorTickInterval options into the legacy\n * loosely typed minorTickInterval option.\n *\n * @function Highcharts.Axis#getMinorTickInterval\n *\n * @return {number|\"auto\"|null}\n * Legacy option\n */\n getMinorTickInterval() {\n const { minorTicks, minorTickInterval } = this.options;\n if (minorTicks === true) {\n return pick(minorTickInterval, 'auto');\n }\n if (minorTicks === false) {\n return;\n }\n return minorTickInterval;\n }\n /**\n * Internal function to return the minor tick positions. For logarithmic\n * axes, the same logic as for major ticks is reused.\n *\n * @function Highcharts.Axis#getMinorTickPositions\n *\n * @return {Array<number>}\n * An array of axis values where ticks should be placed.\n */\n getMinorTickPositions() {\n const axis = this, options = axis.options, tickPositions = axis.tickPositions, minorTickInterval = axis.minorTickInterval, pointRangePadding = axis.pointRangePadding || 0, min = (axis.min || 0) - pointRangePadding, // #1498\n max = (axis.max || 0) + pointRangePadding, // #1498\n range = axis.brokenAxis?.hasBreaks ?\n axis.brokenAxis.unitLength : max - min;\n let minorTickPositions = [], pos;\n // If minor ticks get too dense, they are hard to read, and may cause\n // long running script. So we don't draw them.\n if (range && range / minorTickInterval < axis.len / 3) { // #3875\n const logarithmic = axis.logarithmic;\n if (logarithmic) {\n // For each interval in the major ticks, compute the minor ticks\n // separately.\n this.paddedTicks.forEach(function (_pos, i, paddedTicks) {\n if (i) {\n minorTickPositions.push.apply(minorTickPositions, logarithmic.getLogTickPositions(minorTickInterval, paddedTicks[i - 1], paddedTicks[i], true));\n }\n });\n }\n else if (axis.dateTime &&\n this.getMinorTickInterval() === 'auto') { // #1314\n minorTickPositions = minorTickPositions.concat(axis.getTimeTicks(axis.dateTime.normalizeTimeTickInterval(minorTickInterval), min, max, options.startOfWeek));\n }\n else {\n for (pos = min + (tickPositions[0] - min) % minorTickInterval; pos <= max; pos += minorTickInterval) {\n // Very, very, tight grid lines (#5771)\n if (pos === minorTickPositions[0]) {\n break;\n }\n minorTickPositions.push(pos);\n }\n }\n }\n if (minorTickPositions.length !== 0) {\n axis.trimTicks(minorTickPositions); // #3652 #3743 #1498 #6330\n }\n return minorTickPositions;\n }\n /**\n * Adjust the min and max for the minimum range. Keep in mind that the\n * series data is not yet processed, so we don't have information on data\n * cropping and grouping, or updated `axis.pointRange` or\n * `series.pointRange`. The data can't be processed until we have finally\n * established min and max.\n *\n * @internal\n * @function Highcharts.Axis#adjustForMinRange\n */\n adjustForMinRange() {\n const axis = this, options = axis.options, logarithmic = axis.logarithmic, time = axis.chart.time;\n let { max, min, minRange } = axis, zoomOffset, spaceAvailable, closestDataRange, minArgs, maxArgs;\n // Set the automatic minimum range based on the closest point distance\n if (axis.isXAxis &&\n typeof minRange === 'undefined' &&\n !logarithmic) {\n if (defined(options.min) ||\n defined(options.max) ||\n defined(options.floor) ||\n defined(options.ceiling)) {\n // Setting it to null, as opposed to undefined, signals we don't\n // run this block again as per the condition above.\n minRange = null;\n }\n else {\n // Find the closest distance between raw data points, as opposed\n // to closestPointRange that applies to processed points\n // (cropped and grouped)\n closestDataRange = getClosestDistance(axis.series.map((s) => {\n const xData = s.getColumn('x');\n // If xIncrement, we only need to measure the two first\n // points to get the distance. Saves processing time.\n return s.xIncrement ? xData.slice(0, 2) : xData;\n })) || 0;\n minRange = Math.min(closestDataRange * 5, axis.dataMax - axis.dataMin);\n }\n }\n // If minRange is exceeded, adjust\n if (isNumber(max) &&\n isNumber(min) &&\n isNumber(minRange) &&\n max - min < minRange) {\n spaceAvailable =\n axis.dataMax - axis.dataMin >=\n minRange;\n zoomOffset = (minRange - max + min) / 2;\n // If min and max options have been set, don't go beyond it\n minArgs = [\n min - zoomOffset,\n time.parse(options.min) ?? (min - zoomOffset)\n ];\n // If space is available, stay within the data range\n if (spaceAvailable) {\n minArgs[2] = logarithmic ?\n logarithmic.log2lin(axis.dataMin) :\n axis.dataMin;\n }\n min = arrayMax(minArgs);\n maxArgs = [\n min + minRange,\n time.parse(options.max) ?? (min + minRange)\n ];\n // If space is available, stay within the data range\n if (spaceAvailable) {\n maxArgs[2] = logarithmic ?\n logarithmic.log2lin(axis.dataMax) :\n axis.dataMax;\n }\n max = arrayMin(maxArgs);\n // Now if the max is adjusted, adjust the min back\n if (max - min < minRange) {\n minArgs[0] = max - minRange;\n minArgs[1] = time.parse(options.min) ?? (max - minRange);\n min = arrayMax(minArgs);\n }\n }\n // Record modified extremes\n axis.minRange = minRange;\n axis.min = min;\n axis.max = max;\n }\n /**\n * Find the closestPointRange across all series, including the single data\n * series.\n *\n * @internal\n * @function Highcharts.Axis#getClosest\n */\n getClosest() {\n let closestSingleDistance, closestDistance;\n if (this.categories) {\n closestDistance = 1;\n }\n else {\n const singleXs = [];\n this.series.forEach(function (series) {\n const seriesClosest = series.closestPointRange, xData = series.getColumn('x');\n if (xData.length === 1) {\n singleXs.push(xData[0]);\n }\n else if (series.sorted &&\n defined(seriesClosest) &&\n series.reserveSpace()) {\n closestDistance = defined(closestDistance) ?\n Math.min(closestDistance, seriesClosest) :\n seriesClosest;\n }\n });\n if (singleXs.length) {\n singleXs.sort((a, b) => a - b);\n closestSingleDistance = getClosestDistance([singleXs]);\n }\n }\n if (closestSingleDistance && closestDistance) {\n return Math.min(closestSingleDistance, closestDistance);\n }\n return closestSingleDistance || closestDistance;\n }\n /**\n * When a point name is given and no x, search for the name in the existing\n * categories, or if categories aren't provided, search names or create a\n * new category (#2522).\n *\n * @internal\n * @function Highcharts.Axis#nameToX\n *\n * @param {Highcharts.Point} point\n * The point to inspect.\n *\n * @return {number}\n * The X value that the point is given.\n */\n nameToX(point, nameX) {\n const explicitCategories = isArray(this.options.categories), { name, series } = point, names = explicitCategories ? this.categories : this.names, namesMap = this.namesMap;\n let x;\n series.requireSorting = false;\n if (!defined(nameX)) {\n nameX = this.uniqueNames && names ?\n (explicitCategories ?\n names.indexOf(name) :\n (namesMap[name] ?? -1)) :\n series.autoIncrement();\n }\n if (nameX === -1) { // Not found in current categories\n if (!explicitCategories && names) {\n x = names.length;\n }\n }\n else if (isNumber(nameX)) {\n x = nameX;\n }\n // Write the last point's name to the names array\n if (typeof x !== 'undefined') {\n this.names[x] = point.name;\n namesMap[point.name] = x;\n }\n else if (isNumber(point.x)) {\n x = point.x; // #17438\n }\n else {\n x = series.autoIncrement();\n }\n return x;\n }\n /**\n * When changes have been done to series data, update the axis.names.\n *\n * @internal\n * @function Highcharts.Axis#updateNames\n */\n updateNames() {\n const axis = this, { names, namesMap } = this, i = names.length;\n if (i > 0) {\n Object.keys(namesMap).forEach(function (key) {\n delete namesMap[key];\n });\n names.length = 0;\n this.minRange = this.userMinRange; // Reset\n (this.series || []).forEach((series) => {\n // Reset incrementer (#5928)\n series.xIncrement = null;\n delete series.xColumn;\n // When adding a series, points are not yet generated\n if (!series.points || series.isDirtyData) {\n // When we're updating the series with data that is longer\n // than it was, and cropThreshold is passed, we need to make\n // sure that the axis.max is increased _before_ running the\n // premature processData. Otherwise this early iteration of\n // processData will crop the points to axis.max, and the\n // names array will be too short (#5857).\n axis.max = Math.max(axis.max || 0, series.dataTable.rowCount - 1);\n series.processData();\n series.generatePoints();\n }\n else {\n const xData = series.getColumn('x');\n series.points?.forEach((point) => {\n point.x = xData[point.index];\n });\n }\n });\n }\n }\n /**\n * Update translation information.\n *\n * @internal\n * @function Highcharts.Axis#setAxisTranslation\n *\n * @emits Highcharts.Axis#event:afterSetAxisTranslation\n */\n setAxisTranslation() {\n const axis = this, range = axis.max - axis.min, linkedParent = axis.linkedParent, hasCategories = !!axis.categories, isXAxis = axis.isXAxis;\n let pointRange = axis.axisPointRange || 0, closestPointRange, minPointOffset = 0, pointRangePadding = 0, ordinalCorrection, transA = axis.transA;\n // Adjust translation for padding. Y axis with categories need to go\n // through the same (#1784).\n if (isXAxis || hasCategories || pointRange) {\n // Get the closest points\n closestPointRange = axis.getClosest();\n if (linkedParent) {\n minPointOffset = linkedParent.minPointOffset;\n pointRangePadding = linkedParent.pointRangePadding;\n }\n else {\n axis.series.forEach(function (series) {\n const seriesPointRange = hasCategories ?\n 1 :\n (isXAxis ?\n pick(series.options.pointRange, closestPointRange, 0) :\n (axis.axisPointRange || 0)), // #2806\n pointPlacement = series.options.pointPlacement;\n pointRange = Math.max(pointRange, seriesPointRange);\n if (!axis.single || hasCategories) {\n // TODO: series should internally set x- and y-\n // pointPlacement to simplify this logic.\n const isPointPlacementAxis = series.is('xrange') ?\n !isXAxis :\n isXAxis;\n // The `minPointOffset` is the value padding to the left\n // of the axis in order to make room for points with a\n // pointRange, typically columns, or line/scatter points\n // on a category axis. When the `pointPlacement` option\n // is 'between' or 'on', this padding does not apply.\n minPointOffset = Math.max(minPointOffset, isPointPlacementAxis && isString(pointPlacement) ?\n 0 :\n seriesPointRange / 2);\n // Determine the total padding needed to the length of\n // the axis to make room for the pointRange. If the\n // series' pointPlacement is 'on', no padding is added.\n pointRangePadding = Math.max(pointRangePadding, isPointPlacementAxis && pointPlacement === 'on' ?\n 0 :\n seriesPointRange);\n }\n });\n }\n // Record minPointOffset and pointRangePadding\n ordinalCorrection = (axis.ordinal?.slope && closestPointRange) ?\n axis.ordinal.slope / closestPointRange :\n 1; // #988, #1853\n axis.minPointOffset = minPointOffset =\n minPointOffset * ordinalCorrection;\n axis.pointRangePadding =\n pointRangePadding = pointRangePadding * ordinalCorrection;\n // The `pointRange` is the width reserved for each point, like in a\n // column chart\n axis.pointRange = Math.min(pointRange, axis.single && hasCategories ? 1 : range);\n // The `closestPointRange` is the closest distance between points.\n // In columns it is mostly equal to pointRange, but in lines\n // pointRange is 0 while closestPointRange is some other value\n if (isXAxis) {\n axis.closestPointRange = closestPointRange;\n }\n }\n // Secondary values\n axis.translationSlope = axis.transA = transA =\n axis.staticScale ||\n axis.len / ((range + pointRangePadding) || 1);\n // Translation addend\n axis.transB = axis.horiz ? axis.left : axis.bottom;\n axis.minPixelPadding = transA * minPointOffset;\n fireEvent(this, 'afterSetAxisTranslation');\n }\n /**\n * @internal\n * @function Highcharts.Axis#minFromRange\n */\n minFromRange() {\n const { max, min } = this;\n return isNumber(max) && isNumber(min) && max - min || void 0;\n }\n /**\n * Set the tick positions to round values and optionally extend the extremes\n * to the nearest tick.\n *\n * @internal\n * @function Highcharts.Axis#setTickInterval\n *\n * @param {boolean} secondPass\n * TO-DO: parameter description\n *\n * @emits Highcharts.Axis#event:foundExtremes\n */\n setTickInterval(secondPass) {\n const axis = this, { categories, chart, dataMax, dataMin, dateTime, isXAxis, logarithmic, options, softThreshold } = axis, time = chart.time, threshold = isNumber(axis.threshold) ? axis.threshold : void 0, minRange = axis.minRange || 0, { ceiling, floor, linkedTo, softMax, softMin } = options, linkedParent = isNumber(linkedTo) && chart[axis.coll]?.[linkedTo], tickPixelIntervalOption = options.tickPixelInterval;\n let maxPadding = options.maxPadding, minPadding = options.minPadding, range = 0, linkedParentExtremes, \n // Only non-negative tickInterval is valid, #12961\n tickIntervalOption = isNumber(options.tickInterval) && options.tickInterval >= 0 ?\n options.tickInterval : void 0, thresholdMin, thresholdMax, hardMin, hardMax;\n if (!dateTime && !categories && !linkedParent) {\n this.getTickAmount();\n }\n // Min or max set either by zooming/setExtremes or initial options\n hardMin = pick(axis.userMin, time.parse(options.min));\n hardMax = pick(axis.userMax, time.parse(options.max));\n // Linked axis gets the extremes from the parent axis\n if (linkedParent) {\n axis.linkedParent = linkedParent;\n linkedParentExtremes = linkedParent.getExtremes();\n axis.min = pick(linkedParentExtremes.min, linkedParentExtremes.dataMin);\n axis.max = pick(linkedParentExtremes.max, linkedParentExtremes.dataMax);\n if (this.type !== linkedParent.type) {\n // Can't link axes of different type\n error(11, true, chart);\n }\n // Initial min and max from the extreme data values\n }\n else {\n // Adjust to hard threshold\n if (softThreshold &&\n defined(threshold) &&\n isNumber(dataMax) &&\n isNumber(dataMin)) {\n if (dataMin >= threshold) {\n thresholdMin = threshold;\n minPadding = 0;\n }\n else if (dataMax <= threshold) {\n thresholdMax = threshold;\n maxPadding = 0;\n }\n }\n axis.min = pick(hardMin, thresholdMin, dataMin);\n axis.max = pick(hardMax, thresholdMax, dataMax);\n }\n if (isNumber(axis.max) && isNumber(axis.min)) {\n if (logarithmic) {\n if (axis.positiveValuesOnly &&\n !secondPass &&\n Math.min(axis.min, pick(dataMin, axis.min)) <= 0) { // #978\n // Can't plot negative values on log axis\n error(10, true, chart);\n }\n // The correctFloat cures #934, float errors on full tens. But\n // it was too aggressive for #4360 because of conversion back to\n // lin, therefore use precision 15.\n axis.min = correctFloat(logarithmic.log2lin(axis.min), 16);\n axis.max = correctFloat(logarithmic.log2lin(axis.max), 16);\n }\n // Handle zoomed range\n if (axis.range && isNumber(dataMin)) {\n // #618, #6773:\n axis.userMin = axis.min = hardMin = Math.max(dataMin, axis.minFromRange() || 0);\n axis.userMax = hardMax = axis.max;\n axis.range = void 0; // Don't use it when running setExtremes\n }\n }\n // Hook for Highcharts Stock Scroller and bubble axis padding\n fireEvent(axis, 'foundExtremes');\n // Adjust min and max for the minimum range\n axis.adjustForMinRange();\n if (isNumber(axis.min) && isNumber(axis.max)) {\n // Handle options for floor, ceiling, softMin and softMax (#6359)\n if (!isNumber(axis.userMin) &&\n isNumber(softMin) &&\n softMin < axis.min) {\n axis.min = hardMin = softMin; // #6894\n }\n if (!isNumber(axis.userMax) &&\n isNumber(softMax) &&\n softMax > axis.max) {\n axis.max = hardMax = softMax; // #6894\n }\n // Pad the values to get clear of the chart's edges. To avoid\n // tickInterval taking the padding into account, we do this after\n // computing tick interval (#1337).\n if (!categories &&\n !axis.axisPointRange &&\n !axis.stacking?.usePercentage &&\n !linkedParent) {\n range = axis.max - axis.min;\n if (range) {\n if (!defined(hardMin) && minPadding) {\n axis.min -= range * minPadding;\n }\n if (!defined(hardMax) && maxPadding) {\n axis.max += range * maxPadding;\n }\n }\n }\n if (!isNumber(axis.userMin) && isNumber(floor)) {\n axis.min = Math.max(axis.min, floor);\n }\n if (!isNumber(axis.userMax) && isNumber(ceiling)) {\n axis.max = Math.min(axis.max, ceiling);\n }\n // When the threshold is soft, adjust the extreme value only if the\n // data extreme and the padded extreme land on either side of the\n // threshold. For example, a series of [0, 1, 2, 3] would make the\n // yAxis add a tick for -1 because of the default `minPadding` and\n // `startOnTick` options. This is prevented by the `softThreshold`\n // option.\n if (softThreshold &&\n isNumber(dataMin) &&\n isNumber(dataMax)) {\n const numThreshold = threshold || 0;\n if (!defined(hardMin) &&\n axis.min < numThreshold &&\n dataMin >= numThreshold) {\n axis.min = options.minRange ?\n Math.min(numThreshold, axis.max - minRange) :\n numThreshold;\n }\n else if (!defined(hardMax) &&\n axis.max > numThreshold &&\n dataMax <= numThreshold) {\n axis.max = options.minRange ?\n Math.max(numThreshold, axis.min + minRange) :\n numThreshold;\n }\n }\n // If min is bigger than highest, or if max less than lowest value,\n // the chart should not render points. (#14417)\n if (!chart.polar && axis.min > axis.max) {\n if (defined(options.min)) {\n axis.max = axis.min;\n }\n else if (defined(options.max)) {\n axis.min = axis.max;\n }\n }\n range = axis.max - axis.min;\n }\n // Get tickInterval\n if (axis.min === axis.max ||\n !isNumber(axis.min) ||\n !isNumber(axis.max)) {\n axis.tickInterval = 1;\n }\n else if (linkedParent &&\n !tickIntervalOption &&\n tickPixelIntervalOption === linkedParent.options.tickPixelInterval) {\n axis.tickInterval = tickIntervalOption = linkedParent.tickInterval;\n }\n else {\n axis.tickInterval = pick(tickIntervalOption, this.tickAmount ?\n range / Math.max(this.tickAmount - 1, 1) :\n void 0, \n // For categorized axis, 1 is default, for linear axis use\n // tickPix\n categories ?\n 1 :\n // Don't let it be more than the data range\n range * tickPixelIntervalOption /\n Math.max(axis.len, tickPixelIntervalOption));\n }\n // Now we're finished detecting min and max, crop and group series data.\n // This is in turn needed in order to find tick positions in ordinal\n // axes.\n if (isXAxis && !secondPass) {\n const hasExtremesChanged = axis.min !== axis.old?.min ||\n axis.max !== axis.old?.max;\n // First process all series assigned to that axis.\n axis.series.forEach(function (series) {\n // Allows filtering out points outside the plot area.\n series.forceCrop = series.forceCropping?.();\n series.processData(hasExtremesChanged);\n });\n // Then apply grouping if needed. The hasExtremesChanged helps to\n // decide if the data grouping should be skipped in the further\n // calculations #16319.\n fireEvent(this, 'postProcessData', { hasExtremesChanged });\n }\n // Set the translation factor used in translate function\n axis.setAxisTranslation();\n // Hook for ordinal axes and radial axes\n fireEvent(this, 'initialAxisTranslation');\n // In column-like charts, don't cramp in more ticks than there are\n // points (#1943, #4184)\n if (axis.pointRange && !tickIntervalOption) {\n axis.tickInterval = Math.max(axis.pointRange, axis.tickInterval);\n }\n // Before normalizing the tick interval, handle minimum tick interval.\n // This applies only if tickInterval is not defined.\n const minTickInterval = pick(options.minTickInterval, \n // In datetime axes, don't go below the data interval, except when\n // there are scatter-like series involved (#13369).\n dateTime &&\n !axis.series.some((s) => !s.sorted) ?\n axis.closestPointRange : 0);\n if (!tickIntervalOption &&\n minTickInterval &&\n axis.tickInterval < minTickInterval) {\n axis.tickInterval = minTickInterval;\n }\n // For linear axes, normalize the interval\n if (!dateTime && !logarithmic && !tickIntervalOption) {\n axis.tickInterval = getNormalizedTickInterval(axis, axis.tickInterval);\n }\n // Prevent ticks from getting so close that we can't draw the labels\n if (!this.tickAmount) {\n axis.tickInterval = axis.unsquish();\n }\n this.setTickPositions();\n }\n /**\n * Now we have computed the normalized tickInterval, get the tick positions.\n *\n * @internal\n * @function Highcharts.Axis#setTickPositions\n *\n * @emits Highcharts.Axis#event:afterSetTickPositions\n */\n setTickPositions() {\n const axis = this, options = this.options, tickPositionsOption = options.tickPositions, tickPositioner = options.tickPositioner, minorTickIntervalOption = this.getMinorTickInterval(), allowEndOnTick = !this.isPanning, startOnTick = allowEndOnTick && options.startOnTick, endOnTick = allowEndOnTick && options.endOnTick;\n let tickPositions = [], tickPositionerResult;\n // Set the tickmarkOffset\n this.tickmarkOffset = (this.categories &&\n options.tickmarkPlacement === 'between' &&\n this.tickInterval === 1) ? 0.5 : 0; // #3202\n // When there is only one point, or all points have the same value on\n // this axis, then min and max are equal and tickPositions.length is 0\n // or 1. In this case, add some padding in order to center the point,\n // but leave it with one tick. #1337.\n this.single =\n this.min === this.max &&\n defined(this.min) &&\n !this.tickAmount &&\n (\n // Data is on integer (#6563)\n this.min % 1 === 0 ||\n // Between integers and decimals are not allowed (#6274)\n options.allowDecimals !== false);\n /**\n * Contains the current positions that are laid out on the axis. The\n * positions are numbers in terms of axis values. In a category axis\n * they are integers, in a datetime axis they are also integers, but\n * designating milliseconds.\n *\n * This property is read only - for modifying the tick positions, use\n * the `tickPositioner` callback or [axis.tickPositions(\n * https://api.highcharts.com/highcharts/xAxis.tickPositions) option\n * instead.\n *\n * @name Highcharts.Axis#tickPositions\n * @type {Highcharts.AxisTickPositionsArray|undefined}\n */\n if (tickPositionsOption) {\n // Find the tick positions. Work on a copy (#1565)\n tickPositions = tickPositionsOption.slice();\n }\n else if (isNumber(this.min) && isNumber(this.max)) {\n // Too many ticks (#6405). Create a friendly warning and provide two\n // ticks so at least we can show the data series.\n if (!axis.ordinal?.positions &&\n ((this.max - this.min) /\n this.tickInterval >\n Math.max(2 * this.len, 200))) {\n tickPositions = [this.min, this.max];\n error(19, false, this.chart);\n }\n else if (axis.dateTime) {\n tickPositions = axis.getTimeTicks(axis.dateTime.normalizeTimeTickInterval(this.tickInterval, options.units), this.min, this.max, options.startOfWeek, axis.ordinal?.positions, this.closestPointRange, true);\n }\n else if (axis.logarithmic) {\n tickPositions = axis.logarithmic.getLogTickPositions(this.tickInterval, this.min, this.max);\n }\n else {\n const startingTickInterval = this.tickInterval;\n let adjustedTickInterval = startingTickInterval;\n while (adjustedTickInterval <= startingTickInterval * 2) {\n tickPositions = this.getLinearTickPositions(this.tickInterval, this.min, this.max);\n // If there are more tick positions than the set tickAmount,\n // increase the tickInterval and continue until it fits.\n // (#17100)\n if (this.tickAmount &&\n tickPositions.length > this.tickAmount) {\n this.tickInterval = getNormalizedTickInterval(this, adjustedTickInterval *= 1.1);\n }\n else {\n break;\n }\n }\n }\n // Too dense ticks, keep only the first and last (#4477)\n if (tickPositions.length > this.len) {\n tickPositions = [\n tickPositions[0],\n tickPositions[tickPositions.length - 1]\n ];\n // Reduce doubled value (#7339)\n if (tickPositions[0] === tickPositions[1]) {\n tickPositions.length = 1;\n }\n }\n // Run the tick positioner callback, that allows modifying auto tick\n // positions.\n if (tickPositioner) {\n // Make it available to the positioner\n this.tickPositions = tickPositions;\n tickPositionerResult = tickPositioner.apply(axis, [this.min, this.max, axis]);\n if (tickPositionerResult) {\n tickPositions = tickPositionerResult;\n }\n }\n }\n // Ensure the old ticks are removed and new ones added (#17393)\n if (!this.isDirty &&\n tickPositions.length !==\n this.tickPositions?.length) {\n this.isDirty = true;\n }\n this.tickPositions = tickPositions;\n // Get minorTickInterval\n this.minorTickInterval =\n minorTickIntervalOption === 'auto' && this.tickInterval ?\n this.tickInterval / options.minorTicksPerMajor :\n minorTickIntervalOption;\n // Reset min/max or remove extremes based on start/end on tick\n this.paddedTicks = tickPositions.slice(0); // Used for logarithmic minor\n this.trimTicks(tickPositions, startOnTick, endOnTick);\n if (!this.isLinked && isNumber(this.min) && isNumber(this.max)) {\n // Subtract half a unit (#2619, #2846, #2515, #3390), but not in\n // case of multiple ticks (#6897)\n if (this.single &&\n tickPositions.length < 2 &&\n !this.categories &&\n !this.series.some((s) => (s.is('heatmap') && s.options.pointPlacement === 'between'))) {\n this.min -= 0.5;\n this.max += 0.5;\n }\n if (!tickPositionsOption && !tickPositionerResult) {\n this.adjustTickAmount();\n }\n }\n fireEvent(this, 'afterSetTickPositions');\n }\n /**\n * Handle startOnTick and endOnTick by either adapting to padding min/max or\n * rounded min/max. Also handle single data points.\n *\n * @internal\n * @function Highcharts.Axis#trimTicks\n *\n * @param {Array<number>} tickPositions\n * TO-DO: parameter description\n *\n * @param {boolean} [startOnTick]\n * TO-DO: parameter description\n *\n * @param {boolean} [endOnTick]\n * TO-DO: parameter description\n */\n trimTicks(tickPositions, startOnTick, endOnTick) {\n const roundedMin = tickPositions[0], roundedMax = tickPositions[tickPositions.length - 1], minPointOffset = (!this.isOrdinal && this.minPointOffset) || 0; // (#12716)\n fireEvent(this, 'trimTicks');\n if (!this.isLinked ||\n // Linked non-grid axes should trim ticks, #21743.\n // Grid axis has custom handling of ticks.\n !this.grid) {\n if (startOnTick && isNumber(roundedMin)) { // #6502\n this.min = roundedMin;\n }\n else if (tickPositions.length) {\n while (this.min - minPointOffset > tickPositions[0]) {\n tickPositions.shift();\n }\n }\n if (endOnTick && isNumber(roundedMax)) { // #6502\n this.max = roundedMax;\n }\n else {\n while (this.max + minPointOffset <\n tickPositions[tickPositions.length - 1]) {\n tickPositions.pop();\n }\n }\n // If no tick are left, set one tick in the middle (#3195)\n if (tickPositions.length === 0 &&\n defined(roundedMin) &&\n !this.options.tickPositions) {\n tickPositions.push((roundedMax + roundedMin) / 2);\n }\n }\n }\n /**\n * Check if there are multiple axes in the same pane.\n *\n * @internal\n * @function Highcharts.Axis#alignToOthers\n *\n * @return {boolean|undefined}\n * True if there are other axes.\n */\n alignToOthers() {\n const axis = this, chart = axis.chart, alignedAxes = [this], options = axis.options, chartOptions = chart.options.chart, alignThresholds = (this.coll === 'yAxis' &&\n chartOptions.alignThresholds), thresholdAlignments = [];\n let hasOther;\n axis.thresholdAlignment = void 0;\n if ((\n // Only if alignTicks or alignThresholds is true\n (chartOptions.alignTicks !== false && options.alignTicks) ||\n alignThresholds) &&\n // Disabled when startOnTick or endOnTick are false (#7604)\n options.startOnTick !== false &&\n options.endOnTick !== false &&\n // Don't try to align ticks on a log axis, they are not evenly\n // spaced (#6021)\n !axis.logarithmic) {\n // Get a key identifying which pane the axis belongs to\n const getKey = (axis) => {\n const { horiz, options } = axis;\n return [\n horiz ? options.left : options.top,\n options.width,\n options.height,\n options.pane\n ].join(',');\n };\n const thisKey = getKey(this);\n chart[this.coll].forEach(function (otherAxis) {\n const { series } = otherAxis;\n if (\n // #4442\n series.length &&\n series.some((s) => s.visible) &&\n otherAxis !== axis &&\n getKey(otherAxis) === thisKey) {\n hasOther = true; // #4201\n alignedAxes.push(otherAxis);\n }\n });\n }\n if (hasOther && alignThresholds) {\n // Handle alignThresholds. The `thresholdAlignments` array keeps\n // records of where each axis in the group wants its threshold, from\n // 0 which is on `axis.min`, to 1 which is on `axis.max`.\n alignedAxes.forEach((otherAxis) => {\n const threshAlign = otherAxis.getThresholdAlignment(axis);\n if (isNumber(threshAlign)) {\n thresholdAlignments.push(threshAlign);\n }\n });\n // For each of the axes in the group, record the average\n // `thresholdAlignment`.\n const thresholdAlignment = thresholdAlignments.length > 1 ?\n thresholdAlignments.reduce((sum, n) => (sum += n), 0) / thresholdAlignments.length :\n void 0;\n alignedAxes.forEach((axis) => {\n axis.thresholdAlignment = thresholdAlignment;\n });\n }\n return hasOther;\n }\n /**\n * Where the axis wants its threshold, from 0 which is on `axis.min`, to 1 which\n * is on `axis.max`.\n *\n * @internal\n * @function Highcharts.Axis#getThresholdAlignment\n */\n getThresholdAlignment(callerAxis) {\n if (!isNumber(this.dataMin) ||\n (this !== callerAxis &&\n this.series.some((s) => \n // The xAxis.isDirty check is for setExtremes (#23677)\n s.isDirty || s.isDirtyData || s.xAxis?.isDirty))) {\n this.getSeriesExtremes();\n }\n if (isNumber(this.threshold)) {\n let thresholdAlignment = clamp(((this.threshold - (this.dataMin || 0)) /\n ((this.dataMax || 0) - (this.dataMin || 0))), 0, 1);\n if (this.options.reversed) {\n thresholdAlignment = 1 - thresholdAlignment;\n }\n return thresholdAlignment;\n }\n }\n /**\n * Find the max ticks of either the x and y axis collection, and record it\n * in `this.tickAmount`.\n *\n * @internal\n * @function Highcharts.Axis#getTickAmount\n */\n getTickAmount() {\n const axis = this, options = this.options, tickPixelInterval = options.tickPixelInterval;\n let tickAmount = options.tickAmount;\n if (!defined(options.tickInterval) &&\n !tickAmount &&\n this.len < tickPixelInterval &&\n !this.isRadial &&\n !axis.logarithmic &&\n options.startOnTick &&\n options.endOnTick) {\n tickAmount = 2;\n }\n if (!tickAmount && this.alignToOthers()) {\n // Add 1 because 4 tick intervals require 5 ticks (including first\n // and last)\n tickAmount = Math.ceil(this.len / tickPixelInterval) + 1;\n }\n // For tick amounts of 2 and 3, compute five ticks and remove the\n // intermediate ones. This prevents the axis from adding ticks that are\n // too far away from the data extremes.\n if (tickAmount < 4) {\n this.finalTickAmt = tickAmount;\n tickAmount = 5;\n }\n this.tickAmount = tickAmount;\n }\n /**\n * When using multiple axes, adjust the number of ticks to match the highest\n * number of ticks in that group.\n *\n * @internal\n * @function Highcharts.Axis#adjustTickAmount\n */\n adjustTickAmount() {\n const axis = this, { finalTickAmt, max, min, options, tickPositions, tickAmount, thresholdAlignment } = axis, currentTickAmount = tickPositions?.length, threshold = pick(axis.threshold, axis.softThreshold ? 0 : null);\n let len, i, tickInterval = axis.tickInterval, thresholdTickIndex;\n const \n // Extend the tickPositions by appending a position\n append = () => tickPositions.push(correctFloat(tickPositions[tickPositions.length - 1] +\n tickInterval)), \n // Extend the tickPositions by prepending a position\n prepend = () => tickPositions.unshift(correctFloat(tickPositions[0] - tickInterval));\n // If `thresholdAlignment` is a number, it means the `alignThresholds`\n // option is true. The `thresholdAlignment` is a scalar value between 0\n // and 1 for where the threshold should be relative to `axis.min` and\n // `axis.max`. Now that we know the tick amount, convert this to the\n // tick index. Unless `thresholdAlignment` is exactly 0 or 1, avoid the\n // first or last tick because that would lead to series being clipped.\n if (isNumber(thresholdAlignment)) {\n thresholdTickIndex = thresholdAlignment === 0 ? 0 :\n thresholdAlignment === 1 ? tickAmount - 1 :\n // Get the closest integer between 1 and\n // `tickAmount - 2` (#23787)\n Math.round(clamp(thresholdAlignment * (tickAmount - 1), 1, tickAmount - 2));\n if (options.reversed) {\n thresholdTickIndex = tickAmount - 1 - thresholdTickIndex;\n }\n }\n if (axis.hasData() && isNumber(min) && isNumber(max)) { // #14769\n // Adjust extremes and translation to the modified tick positions\n const adjustExtremes = () => {\n axis.transA *= (currentTickAmount - 1) / (tickAmount - 1);\n // Do not crop when ticks are not extremes (#9841)\n axis.min = options.startOnTick ?\n tickPositions[0] :\n Math.min(min, tickPositions[0]);\n axis.max = options.endOnTick ?\n tickPositions[tickPositions.length - 1] :\n Math.max(max, tickPositions[tickPositions.length - 1]);\n };\n // When the axis is subject to the alignThresholds option. Use\n // axis.threshold because the local threshold includes the\n // `softThreshold`.\n if (isNumber(thresholdTickIndex) && isNumber(axis.threshold)) {\n // Throw away the previously computed tickPositions and start\n // from scratch with only the threshold itself, then add ticks\n // below the threshold first, then fill up above the threshold.\n // If we are not able to fill up to axis.max, double the\n // tickInterval and run again.\n while (tickPositions[thresholdTickIndex] !== threshold ||\n tickPositions.length !== tickAmount ||\n tickPositions[0] > min ||\n tickPositions[tickPositions.length - 1] < max) {\n tickPositions.length = 0;\n tickPositions.push(axis.threshold);\n while (tickPositions.length < tickAmount) {\n if (\n // Start by prepending positions until the threshold\n // is at the required index...\n tickPositions[thresholdTickIndex] === void 0 ||\n tickPositions[thresholdTickIndex] > axis.threshold) {\n prepend();\n }\n else {\n // ... then append positions until we have the\n // required length\n append();\n }\n }\n // Safety vent\n if (tickInterval > axis.tickInterval * 8) {\n break;\n }\n tickInterval *= 2;\n }\n adjustExtremes();\n }\n else if (currentTickAmount < tickAmount) {\n while (tickPositions.length < tickAmount) {\n // Extend evenly for both sides unless we're on the\n // threshold (#3965)\n if (tickPositions.length % 2 || min === threshold) {\n append();\n }\n else {\n prepend();\n }\n }\n adjustExtremes();\n }\n // The finalTickAmt property is set in getTickAmount\n if (defined(finalTickAmt)) {\n i = len = tickPositions.length;\n while (i--) {\n if (\n // Remove every other tick\n (finalTickAmt === 3 && i % 2 === 1) ||\n // Remove all but first and last\n (finalTickAmt <= 2 && i > 0 && i < len - 1)) {\n tickPositions.splice(i, 1);\n }\n }\n axis.finalTickAmt = void 0;\n }\n }\n }\n /**\n * Set the scale based on data min and max, user set min and max or options.\n *\n * @internal\n * @function Highcharts.Axis#setScale\n *\n * @emits Highcharts.Axis#event:afterSetScale\n */\n setScale() {\n const axis = this, { coll, stacking } = axis;\n let isDirtyData = false, isXAxisDirty = false;\n axis.series.forEach((series) => {\n isDirtyData = isDirtyData || series.isDirtyData || series.isDirty;\n // When x axis is dirty, we need new data extremes for y as\n // well:\n isXAxisDirty = (isXAxisDirty ||\n series.xAxis?.isDirty ||\n false);\n });\n // Set the new axisLength\n axis.setAxisSize();\n const isDirtyAxisLength = axis.len !== axis.old?.len;\n // Do we really need to go through all this?\n if (isDirtyAxisLength ||\n isDirtyData ||\n isXAxisDirty ||\n axis.isLinked ||\n axis.forceRedraw ||\n axis.userMin !== axis.old?.userMin ||\n axis.userMax !== axis.old?.userMax ||\n axis.alignToOthers()) {\n if (stacking && coll === 'yAxis') {\n stacking.buildStacks();\n }\n axis.forceRedraw = false;\n // #18066 delete minRange property to ensure that it will be\n // calculated again after dirty data in series\n if (!axis.userMinRange) {\n axis.minRange = void 0;\n }\n // Get data extremes if needed\n axis.getSeriesExtremes();\n // Get fixed positions based on tickInterval\n axis.setTickInterval();\n if (stacking && coll === 'xAxis') {\n stacking.buildStacks();\n }\n // Mark as dirty if it is not already set to dirty and extremes have\n // changed. #595.\n if (!axis.isDirty) {\n axis.isDirty =\n isDirtyAxisLength ||\n axis.min !== axis.old?.min ||\n axis.max !== axis.old?.max;\n }\n }\n else if (stacking) {\n stacking.cleanStacks();\n }\n // Recalculate all extremes object when the data has changed. It is\n // required when vertical panning is enabled.\n if (isDirtyData) {\n delete axis.allExtremes;\n }\n fireEvent(this, 'afterSetScale');\n }\n /**\n * Set the minimum and maximum of the axes after render time. If the\n * `startOnTick` and `endOnTick` options are true, the minimum and maximum\n * values are rounded off to the nearest tick. To prevent this, these\n * options can be set to false before calling setExtremes. Also, setExtremes\n * will not allow a range lower than the `minRange` option, which by default\n * is the range of five points.\n *\n * @sample highcharts/members/axis-setextremes/\n * Set extremes from a button\n * @sample highcharts/members/axis-setextremes-datetime/\n * Set extremes on a datetime axis\n * @sample highcharts/members/axis-setextremes-off-ticks/\n * Set extremes off ticks\n * @sample stock/members/axis-setextremes/\n * Set extremes in Highcharts Stock\n *\n * @function Highcharts.Axis#setExtremes\n *\n * @param {number|string} [min]\n * The new minimum value. For datetime axes, date strings are accepted.\n *\n * @param {number|string} [max]\n * The new maximum value. For datetime axes, date strings are accepted.\n *\n * @param {boolean} [redraw=true]\n * Whether to redraw the chart or wait for an explicit call to\n * {@link Highcharts.Chart#redraw}\n *\n * @param {boolean|Partial<Highcharts.AnimationOptionsObject>} [animation=true]\n * Enable or modify animations.\n *\n * @param {*} [eventArguments]\n * Arguments to be accessed in event handler.\n *\n * @emits Highcharts.Axis#event:setExtremes\n */\n setExtremes(min, max, redraw = true, animation, eventArguments) {\n const chart = this.chart;\n this.series.forEach((s) => {\n delete s.kdTree;\n });\n min = chart.time.parse(min);\n max = chart.time.parse(max);\n // Extend the arguments with min and max\n eventArguments = extend(eventArguments, { min, max });\n // Fire the event\n fireEvent(this, 'setExtremes', eventArguments, (e) => {\n this.userMin = e.min;\n this.userMax = e.max;\n this.eventArgs = e;\n if (redraw) {\n chart.redraw(animation);\n }\n });\n }\n /**\n * Update the axis metrics.\n *\n * @internal\n * @function Highcharts.Axis#setAxisSize\n */\n setAxisSize() {\n const chart = this.chart, options = this.options, \n // [top, right, bottom, left]\n offsets = options.offsets || [0, 0, 0, 0], horiz = this.horiz, \n // Check for percentage based input values. Rounding fixes problems\n // with column overflow and plot line filtering (#4898, #4899)\n width = this.width = Math.round(relativeLength(pick(options.width, chart.plotWidth - offsets[3] + offsets[1]), chart.plotWidth)), height = this.height = Math.round(relativeLength(pick(options.height, chart.plotHeight - offsets[0] + offsets[2]), chart.plotHeight)), top = this.top = Math.round(relativeLength(pick(options.top, chart.plotTop + offsets[0]), chart.plotHeight, chart.plotTop)), left = this.left = Math.round(relativeLength(pick(options.left, chart.plotLeft + offsets[3]), chart.plotWidth, chart.plotLeft));\n // Expose basic values to use in Series object and navigator\n this.bottom = chart.chartHeight - height - top;\n this.right = chart.chartWidth - width - left;\n // Direction agnostic properties\n this.len = Math.max(horiz ? width : height, 0); // Math.max fixes #905\n /**\n * The position of the axis in terms of pixels, compared to the chart\n * edge. In a horizontal axis it is the same as `chart.plotLeft` unless\n * the axis is explicitly positioned, and in a default vertical axis it\n * is the same as `chart.plotTop`.\n *\n * @name Highcharts.Axis#pos\n * @type {number}\n */\n this.pos = horiz ? left : top; // Distance from SVG origin\n }\n /**\n * Get the current extremes for the axis.\n *\n * @sample highcharts/members/axis-getextremes/\n * Report extremes by click on a button\n *\n * @function Highcharts.Axis#getExtremes\n *\n * @return {Highcharts.ExtremesObject}\n * An object containing extremes information.\n */\n getExtremes() {\n const axis = this, log = axis.logarithmic;\n return {\n min: log ?\n correctFloat(log.lin2log(axis.min)) :\n axis.min,\n max: log ?\n correctFloat(log.lin2log(axis.max)) :\n axis.max,\n dataMin: axis.dataMin,\n dataMax: axis.dataMax,\n userMin: axis.userMin,\n userMax: axis.userMax\n };\n }\n /**\n * Get the zero plane either based on zero or on the min or max value.\n * Used in bar and area plots.\n *\n * @function Highcharts.Axis#getThreshold\n *\n * @param {number} threshold\n * The threshold in axis values.\n *\n * @return {number}\n * The translated threshold position in terms of pixels, and corrected to\n * stay within the axis bounds.\n */\n getThreshold(threshold) {\n const axis = this, log = axis.logarithmic, realMin = log ? log.lin2log(axis.min) : axis.min, realMax = log ? log.lin2log(axis.max) : axis.max;\n if (threshold === null || threshold === -Infinity) {\n threshold = realMin;\n }\n else if (threshold === Infinity) {\n threshold = realMax;\n }\n else if (realMin > threshold) {\n threshold = realMin;\n }\n else if (realMax < threshold) {\n threshold = realMax;\n }\n return axis.translate(threshold, 0, 1, 0, 1);\n }\n /**\n * Compute auto alignment for the axis label based on which side the axis is\n * on and the given rotation for the label.\n *\n * @internal\n * @function Highcharts.Axis#autoLabelAlign\n *\n * @param {number} rotation\n * The rotation in degrees as set by either the `rotation` or `autoRotation`\n * options.\n *\n * @return {Highcharts.AlignValue}\n * Can be `\"center\"`, `\"left\"` or `\"right\"`.\n */\n autoLabelAlign(rotation) {\n const angle = ((rotation - this.side * 90) % 360 + 360) % 360, evt = { align: 'center' };\n fireEvent(this, 'autoLabelAlign', evt, function (e) {\n if (angle > 15 && angle < 165) {\n e.align = 'right';\n }\n else if (angle > 195 && angle < 345) {\n e.align = 'left';\n }\n });\n return evt.align;\n }\n /**\n * Get the tick length and width for the axis based on axis options.\n *\n * @internal\n * @function Highcharts.Axis#tickSize\n *\n * @param {string} [prefix]\n * 'tick' or 'minorTick'\n *\n * @return {Array<number,number>|undefined}\n * An array of tickLength and tickWidth\n */\n tickSize(prefix) {\n const options = this.options, tickWidth = pick(options[prefix === 'tick' ? 'tickWidth' : 'minorTickWidth'], \n // Default to 1 on linear and datetime X axes\n prefix === 'tick' && this.isXAxis && !this.categories ? 1 : 0);\n let tickLength = options[prefix === 'tick' ? 'tickLength' : 'minorTickLength'], tickSize;\n if (tickWidth && tickLength) {\n // Negate the length\n if (options[prefix + 'Position'] === 'inside') {\n tickLength = -tickLength;\n }\n tickSize = [tickLength, tickWidth];\n }\n const e = { tickSize, prefix };\n fireEvent(this, 'afterTickSize', e);\n return e.tickSize;\n }\n /**\n * Return the size of the labels.\n *\n * @internal\n * @function Highcharts.Axis#labelMetrics\n */\n labelMetrics() {\n const renderer = this.chart.renderer, ticks = this.ticks, tick = ticks[Object.keys(ticks)[0]] || {};\n return this.chart.renderer.fontMetrics(tick.label ||\n renderer.box);\n }\n /**\n * Prevent the ticks from getting so close we can't draw the labels. On a\n * horizontal axis, this is handled by rotating the labels, removing ticks\n * and adding ellipsis. On a vertical axis remove ticks and add ellipsis.\n *\n * @internal\n * @function Highcharts.Axis#unsquish\n */\n unsquish() {\n const labelOptions = this.options.labels, padding = labelOptions.padding || 0, horiz = this.horiz, tickInterval = this.tickInterval, slotSize = this.len / (((this.categories ? 1 : 0) +\n this.max -\n this.min) /\n tickInterval), rotationOption = labelOptions.rotation, \n // We don't know the actual rendered line height at this point, but\n // it defaults to 0.8em\n lineHeight = correctFloat(this.labelMetrics().h * 0.8), range = Math.max(this.max - this.min, 0), \n // Return the multiple of tickInterval that is needed to avoid\n // collision\n getStep = function (spaceNeeded) {\n let step = (spaceNeeded + 2 * padding) / (slotSize || 1);\n step = step > 1 ? Math.ceil(step) : 1;\n // Guard for very small or negative angles (#9835)\n if (step * tickInterval > range &&\n spaceNeeded !== Infinity &&\n slotSize !== Infinity &&\n range) {\n step = Math.ceil(range / tickInterval);\n }\n return correctFloat(step * tickInterval);\n };\n let newTickInterval = tickInterval, rotation, bestScore = Number.MAX_VALUE, autoRotation;\n if (horiz) {\n if (!labelOptions.staggerLines) {\n if (isNumber(rotationOption)) {\n autoRotation = [rotationOption];\n }\n else if (slotSize < labelOptions.autoRotationLimit) {\n autoRotation = labelOptions.autoRotation;\n }\n }\n if (autoRotation) {\n let step, score;\n // Loop over the given autoRotation options, and determine which\n // gives the best score. The best score is that with the lowest\n // number of steps and a rotation closest to horizontal.\n for (const rot of autoRotation) {\n if (rot === rotationOption ||\n (rot && rot >= -90 && rot <= 90)) { // #3891\n step = getStep(Math.abs(lineHeight / Math.sin(deg2rad * rot)));\n score = step + Math.abs(rot / 360);\n if (score < bestScore) {\n bestScore = score;\n rotation = rot;\n newTickInterval = step;\n }\n }\n }\n }\n }\n else { // #4411\n newTickInterval = getStep(lineHeight * 0.75);\n }\n this.autoRotation = autoRotation;\n this.labelRotation = pick(rotation, isNumber(rotationOption) ? rotationOption : 0);\n return labelOptions.step ? tickInterval : newTickInterval;\n }\n /**\n * Get the general slot width for labels/categories on this axis. This may\n * change between the pre-render (from Axis.getOffset) and the final tick\n * rendering and placement.\n *\n * @internal\n * @function Highcharts.Axis#getSlotWidth\n *\n * @param {Highcharts.Tick} [tick] Optionally, calculate the slot width\n * basing on tick label. It is used in highcharts-3d module, where the slots\n * has different widths depending on perspective angles.\n *\n * @return {number}\n * The pixel width allocated to each axis label.\n */\n getSlotWidth(tick) {\n // #5086, #1580, #1931\n const chart = this.chart, horiz = this.horiz, labelOptions = this.options.labels, slotCount = Math.max(this.tickPositions.length - (this.categories ? 0 : 1), 1), marginLeft = chart.margin[3];\n // Used by grid axis\n if (tick && isNumber(tick.slotWidth)) { // #13221, can be 0\n return tick.slotWidth;\n }\n if (horiz && labelOptions.step < 2 && !this.isRadial) {\n if (labelOptions.rotation) { // #4415\n return 0;\n }\n return ((this.staggerLines || 1) * this.len) / slotCount;\n }\n if (!horiz) {\n // #7028\n const cssWidth = labelOptions.style.width;\n if (cssWidth !== void 0) {\n return parseInt(String(cssWidth), 10);\n }\n // Skip marginLeft for opposite axis to avoid label cutoff, #22821\n if (!this.opposite && marginLeft) {\n return marginLeft - chart.spacing[3];\n }\n }\n // Last resort, a fraction of the available size\n return chart.chartWidth * 0.33;\n }\n /**\n * Render the axis labels and determine whether ellipsis or rotation need to\n * be applied.\n *\n * @internal\n * @function Highcharts.Axis#renderUnsquish\n */\n renderUnsquish() {\n const chart = this.chart, renderer = chart.renderer, tickPositions = this.tickPositions, ticks = this.ticks, labelOptions = this.options.labels, labelStyleOptions = labelOptions.style, horiz = this.horiz, slotWidth = this.getSlotWidth(), innerWidth = Math.max(1, Math.round(slotWidth - (horiz ?\n 2 * (labelOptions.padding || 0) :\n labelOptions.distance || 0 // #21172\n ))), attr = {}, labelMetrics = this.labelMetrics(), lineClampOption = labelStyleOptions.lineClamp;\n let commonWidth, lineClamp = lineClampOption ?? (Math.floor(this.len / (tickPositions.length * labelMetrics.h)) || 1), maxLabelLength = 0;\n // Set rotation option unless it is \"auto\", like in gauges\n if (!isString(labelOptions.rotation)) {\n // #4443\n attr.rotation = labelOptions.rotation || 0;\n }\n // Get the longest label length\n tickPositions.forEach(function (tickPosition) {\n maxLabelLength = Math.max(maxLabelLength, ticks[tickPosition].label?.textPxLength || 0);\n });\n this.maxLabelLength = maxLabelLength;\n // Handle auto rotation on horizontal axis\n if (this.autoRotation) {\n // Apply rotation only if the label is too wide for the slot, and\n // the label is wider than its height.\n if (maxLabelLength > innerWidth &&\n maxLabelLength > labelMetrics.h) {\n attr.rotation = this.labelRotation;\n }\n else {\n this.labelRotation = 0;\n }\n // Handle word-wrap or ellipsis on vertical axis\n }\n else if (slotWidth) {\n // For word-wrap or ellipsis\n commonWidth = innerWidth;\n }\n // Add ellipsis if the label length is significantly longer than ideal\n if (attr.rotation) {\n commonWidth = (maxLabelLength > chart.chartHeight * 0.5 ?\n chart.chartHeight * 0.33 :\n maxLabelLength);\n if (!lineClampOption) {\n lineClamp = 1;\n }\n }\n // Set the explicit or automatic label alignment\n this.labelAlign = labelOptions.align ||\n this.autoLabelAlign(this.labelRotation || 0);\n if (this.labelAlign) {\n attr.align = this.labelAlign;\n }\n // Apply general and specific CSS\n tickPositions.forEach(function (pos) {\n const tick = ticks[pos], label = tick?.label, widthOption = labelStyleOptions.width, css = {};\n if (label) {\n // This needs to go before the CSS in old IE (#4502)\n label.attr(attr);\n if (tick.shortenLabel) {\n tick.shortenLabel();\n }\n else if (commonWidth &&\n !widthOption &&\n // Setting width in this case messes with the bounding box\n // (#7975)\n labelStyleOptions.whiteSpace !== 'nowrap' &&\n (\n // Speed optimizing, #7656\n commonWidth < (label.textPxLength || 0) ||\n // Resetting CSS, #4928\n label.element.tagName === 'DIV')) {\n label.css(extend(css, {\n width: `${commonWidth}px`,\n lineClamp\n }));\n // Reset previously shortened label (#8210, #22961)\n }\n else {\n const wasSquished = label.styles.width ||\n label.textWidth || label.styles.lineClamp;\n if (wasSquished && !css.width && !widthOption) {\n label.css({\n width: 'auto',\n lineClamp: 0\n });\n }\n }\n tick.rotation = attr.rotation;\n }\n }, this);\n // Note: Why is this not part of getLabelPosition?\n this.tickRotCorr = renderer.rotCorr(labelMetrics.b, this.labelRotation || 0, this.side !== 0);\n }\n /**\n * Return true if the axis has associated data.\n *\n * @function Highcharts.Axis#hasData\n *\n * @return {boolean}\n * True if the axis has associated visible series and those series have\n * either valid data points or explicit `min` and `max` settings.\n */\n hasData() {\n return this.series.some(function (s) {\n return s.hasData();\n }) ||\n (this.options.showEmpty &&\n defined(this.min) &&\n defined(this.max));\n }\n /**\n * Adds the title defined in axis.options.title.\n *\n * @function Highcharts.Axis#addTitle\n *\n * @param {boolean} [display]\n * Whether or not to display the title.\n */\n addTitle(display) {\n const axis = this, renderer = axis.chart.renderer, horiz = axis.horiz, opposite = axis.opposite, options = axis.options, axisTitleOptions = options.title, styledMode = axis.chart.styledMode;\n let textAlign;\n if (!axis.axisTitle) {\n textAlign = axisTitleOptions.textAlign;\n if (!textAlign) {\n textAlign = (horiz ? {\n low: 'left',\n middle: 'center',\n high: 'right'\n } : {\n low: opposite ? 'right' : 'left',\n middle: 'center',\n high: opposite ? 'left' : 'right'\n })[axisTitleOptions.align];\n }\n axis.axisTitle = renderer\n .text(axisTitleOptions.text || '', 0, 0, axisTitleOptions.useHTML)\n .attr({\n zIndex: 7,\n rotation: axisTitleOptions.rotation || 0,\n align: textAlign\n })\n .addClass('highcharts-axis-title');\n // #7814, don't mutate style option\n if (!styledMode) {\n axis.axisTitle.css(merge(axisTitleOptions.style));\n }\n axis.axisTitle.add(axis.axisGroup);\n axis.axisTitle.isNew = true;\n }\n // Max width defaults to the length of the axis\n if (!styledMode &&\n !axisTitleOptions.style.width &&\n !axis.isRadial) {\n axis.axisTitle.css({\n width: axis.len + 'px'\n });\n }\n // Hide or show the title depending on whether showEmpty is set\n axis.axisTitle[display ? 'show' : 'hide'](display);\n }\n /**\n * Generates a tick for initial positioning.\n *\n * @internal\n * @function Highcharts.Axis#generateTick\n */\n generateTick(pos) {\n const axis = this, ticks = axis.ticks;\n if (!ticks[pos]) {\n ticks[pos] = new Tick(axis, pos);\n }\n else {\n ticks[pos].addLabel(); // Update labels depending on tick interval\n }\n }\n /**\n * Create the axisGroup and gridGroup elements on first iteration.\n *\n * @internal\n * @function Highcharts.Axis#getOffset\n *\n * @emits Highcharts.Axis#event:afterGetOffset\n */\n createGroups() {\n const { axisParent, // Used in color axis\n chart, coll, options } = this, renderer = chart.renderer;\n const createGroup = (name, suffix, zIndex) => renderer.g(name)\n .attr({ zIndex })\n .addClass(`highcharts-${coll.toLowerCase()}${suffix} ` +\n (this.isRadial ? `highcharts-radial-axis${suffix} ` : '') +\n (options.className || ''))\n .add(axisParent);\n if (!this.axisGroup) {\n this.gridGroup = createGroup('grid', '-grid', options.gridZIndex).clip(this.clippable ? chart.plotClipInner : void 0);\n this.axisGroup = createGroup('axis', '', options.zIndex);\n this.labelGroup = createGroup('axis-labels', '-labels', options.labels.zIndex);\n }\n }\n /**\n * Shuffle existing category ticks, like in bar race chart\n *\n * @internal\n */\n shuffleTicks() {\n const ticks = this.ticks, oldNames = this.old?.names;\n if (this.type === 'category' && oldNames) {\n oldNames.forEach((name, oldPos) => {\n const pos = this.namesMap[name];\n if (defined(pos) && oldPos !== pos) {\n // Move tick instance\n if (ticks[oldPos]) {\n ticks[oldPos].pos = pos;\n this.isDirty = true; // Mark for redraw\n }\n // Check if the existing tick in the new position has a\n // new place to go\n if (ticks[pos] &&\n this.names.indexOf(oldNames[pos]) === -1) {\n // Mark for destruction below\n ticks[pos].pos = NaN;\n }\n }\n });\n // Remap ticks to new positions\n const values = Object.values(ticks);\n Object.keys(ticks).forEach((key) => {\n delete ticks[key];\n });\n values.forEach((tick) => {\n if (!isNaN(tick.pos)) {\n ticks[tick.pos] = tick;\n }\n else {\n tick.destroy();\n }\n });\n }\n }\n /**\n * Render the tick labels to a preliminary position to get their sizes\n *\n * @internal\n * @function Highcharts.Axis#getOffset\n *\n * @emits Highcharts.Axis#event:afterGetOffset\n */\n getOffset() {\n const axis = this, { chart, horiz, options, side, ticks, tickPositions, coll } = axis, hasData = axis.hasData(), axisTitleOptions = options.title, labelOptions = options.labels, hasCrossing = isNumber(options.crossing), axisOffset = chart.axisOffset, clipOffset = chart.clipOffset, directionFactor = [-1, 1, 1, -1][side];\n let tickRotCorr = axis.tickRotCorr || { x: 0, y: 0 }, absTickRotCorrX = 0, showAxis, titleOffset = 0, titleOffsetOption, titleMargin = 0, labelOffset = 0, // Reset\n labelOffsetPadded, lineHeightCorrection, reserveSpaceDefault;\n // For reuse in Axis.render\n axis.showAxis = showAxis = hasData || options.showEmpty;\n // Set/reset staggerLines\n axis.staggerLines = (axis.horiz && labelOptions.staggerLines) || void 0;\n axis.createGroups();\n if (hasData || axis.isLinked) {\n // Shuffle existing category ticks\n axis.shuffleTicks();\n // Generate new ticks\n tickPositions.forEach(axis.generateTick.bind(axis));\n axis.renderUnsquish();\n tickRotCorr = axis.tickRotCorr;\n absTickRotCorrX = Math.abs(tickRotCorr.x);\n // Left side must be align: right and right side must\n // have align: left for labels\n reserveSpaceDefault = axis.reserveSpaceDefault = (side === 0 ||\n side === 2 ||\n ({ 1: 'left', 3: 'right' })[side] === axis.labelAlign);\n if (labelOptions.reserveSpace ??\n (hasCrossing ? false : null) ??\n (axis.labelAlign === 'center' ? true : null) ??\n reserveSpaceDefault) {\n tickPositions.forEach(function (pos) {\n // Get the highest offset\n labelOffset = Math.max(ticks[pos].getLabelSize(), labelOffset);\n });\n }\n if (axis.staggerLines) {\n labelOffset *= axis.staggerLines;\n }\n if (!horiz &&\n isNumber(axis.labelRotation) &&\n reserveSpaceDefault) {\n labelOffset -= absTickRotCorrX;\n }\n axis.labelOffset = labelOffset * (axis.opposite ? -1 : 1);\n }\n else { // Doesn't have data\n objectEach(ticks, function (tick, n) {\n tick.destroy();\n delete ticks[n];\n });\n }\n if (axisTitleOptions?.text &&\n axisTitleOptions.enabled !== false) {\n axis.addTitle(showAxis);\n if (showAxis &&\n !hasCrossing &&\n axisTitleOptions.reserveSpace !== false) {\n axis.titleOffset = titleOffset =\n axis.axisTitle.getBBox()[horiz ? 'height' : 'width'];\n titleOffsetOption = axisTitleOptions.offset;\n titleMargin = defined(titleOffsetOption) ?\n 0 :\n pick(axisTitleOptions.margin, horiz ? 5 : 10);\n }\n }\n // Render the axis line\n axis.renderLine();\n // Handle automatic or user set offset\n axis.offset = directionFactor * (isNumber(options.offset) ?\n options.offset :\n axisOffset[side] ?\n axisOffset[side] + (options.margin || 0) :\n 0);\n if (side === 0) {\n lineHeightCorrection = -axis.labelMetrics().h;\n }\n else if (side === 2) {\n lineHeightCorrection = tickRotCorr.y;\n }\n else {\n lineHeightCorrection = 0;\n }\n // Find the padded label offset\n labelOffsetPadded = Math.abs(labelOffset) + titleMargin;\n if (labelOffset) {\n labelOffsetPadded -= lineHeightCorrection;\n labelOffsetPadded += directionFactor * (horiz ?\n (labelOptions.y ??\n (tickRotCorr.y +\n directionFactor * labelOptions.distance)) :\n (labelOptions.x ?? (reserveSpaceDefault ?\n directionFactor * (labelOptions.distance - absTickRotCorrX) :\n tickRotCorr.x +\n directionFactor * labelOptions.distance)));\n if (!horiz &&\n !reserveSpaceDefault &&\n axis.labelAlign === 'center' &&\n isNumber(axis.labelRotation)) {\n labelOffsetPadded += absTickRotCorrX;\n }\n }\n axis.axisTitleMargin = titleOffsetOption ?? labelOffsetPadded;\n axis.maxLabelDimensions = axis.getMaxLabelDimensions?.(ticks, tickPositions);\n // Due to GridAxis.tickSize, tickSize should be calculated after ticks\n // has rendered.\n if (coll !== 'colorAxis' && clipOffset) {\n const tickSize = this.tickSize('tick');\n axisOffset[side] = Math.max(axisOffset[side], (axis.axisTitleMargin || 0) + titleOffset +\n directionFactor * axis.offset, labelOffsetPadded, // #3027\n tickPositions?.length && tickSize ?\n tickSize[0] + directionFactor * axis.offset :\n 0 // #4866\n );\n // Decide the clipping needed to keep the graph inside\n // the plot area and axis lines\n const clip = !axis.axisLine || options.offset ?\n 0 :\n // #4308, #4371\n axis.axisLine.strokeWidth() / 2;\n clipOffset[side] = Math.max(clipOffset[side], clip);\n }\n fireEvent(this, 'afterGetOffset');\n }\n /**\n * Internal function to get the path for the axis line. Extended for polar\n * charts.\n *\n * @function Highcharts.Axis#getLinePath\n *\n * @param {number} lineWidth\n * The line width in pixels.\n *\n * @return {Highcharts.SVGPathArray}\n * The SVG path definition in array form.\n */\n getLinePath(lineWidth) {\n const chart = this.chart, opposite = this.opposite, offset = this.offset, horiz = this.horiz, lineLeft = this.left + (opposite ? this.width : 0) + offset, lineTop = chart.chartHeight - this.bottom -\n (opposite ? this.height : 0) + offset;\n if (opposite) {\n lineWidth *= -1; // Crispify the other way - #1480, #1687\n }\n return chart.renderer\n .crispLine([\n [\n 'M',\n horiz ?\n this.left :\n lineLeft,\n horiz ?\n lineTop :\n this.top\n ],\n [\n 'L',\n horiz ?\n chart.chartWidth - this.right :\n lineLeft,\n horiz ?\n lineTop :\n chart.chartHeight - this.bottom\n ]\n ], lineWidth);\n }\n /**\n * Render the axis line. Called internally when rendering and redrawing the\n * axis.\n *\n * @function Highcharts.Axis#renderLine\n */\n renderLine() {\n const { chart, offset = 0, options } = this;\n this.axisLine || (this.axisLine = chart.renderer.path()\n .addClass('highcharts-axis-line')\n .attr(chart.styledMode ? {} : {\n stroke: options.lineColor,\n 'stroke-width': options.lineWidth,\n zIndex: 7\n })\n .clip(this.clippable && offset <= 0 ?\n chart.plotClipOuter :\n void 0)\n .add(this.axisGroup));\n }\n /**\n * Position the axis title.\n *\n * @internal\n * @function Highcharts.Axis#getTitlePosition\n *\n * @return {Highcharts.PositionObject}\n * X and Y positions for the title.\n */\n getTitlePosition(axisTitle) {\n // Compute anchor points for each of the title align options\n const horiz = this.horiz, axisLeft = this.left, axisTop = this.top, axisLength = this.len, axisTitleOptions = this.options.title, margin = horiz ? axisLeft : axisTop, opposite = this.opposite, offset = this.offset, xOption = axisTitleOptions.x, yOption = axisTitleOptions.y, fontMetrics = this.chart.renderer.fontMetrics(axisTitle), \n // The part of a multiline text that is below the baseline of the\n // first line. Subtract 1 to preserve pixel-perfectness from the\n // old behavior (v5.0.12), where only one line was allowed.\n textHeightOvershoot = axisTitle ? Math.max(axisTitle.getBBox(false, 0).height - fontMetrics.h - 1, 0) : 0, \n // The position in the length direction of the axis\n alongAxis = ({\n low: margin + (horiz ? 0 : axisLength),\n middle: margin + axisLength / 2,\n high: margin + (horiz ? axisLength : 0)\n })[axisTitleOptions.align], \n // The position in the perpendicular direction of the axis\n offAxis = (horiz ? axisTop + this.height : axisLeft) +\n (horiz ? 1 : -1) * // Horizontal axis reverses the margin\n (opposite ? -1 : 1) * // So does opposite axes\n (this.axisTitleMargin || 0) +\n [\n -textHeightOvershoot, // Top\n textHeightOvershoot, // Right\n fontMetrics.f, // Bottom\n -textHeightOvershoot // Left\n ][this.side], titlePosition = {\n x: horiz ?\n alongAxis + xOption :\n offAxis + (opposite ? this.width : 0) + offset + xOption,\n y: horiz ?\n offAxis + yOption - (opposite ? this.height : 0) + offset :\n alongAxis + yOption\n };\n fireEvent(this, 'afterGetTitlePosition', { titlePosition: titlePosition });\n return titlePosition;\n }\n /**\n * Render a minor tick into the given position. If a minor tick already\n * exists in this position, move it.\n *\n * @function Highcharts.Axis#renderMinorTick\n *\n * @param {number} pos\n * The position in axis values.\n *\n * @param {boolean} slideIn\n * Whether the tick should animate in from last computed position\n */\n renderMinorTick(pos, slideIn) {\n const axis = this;\n const minorTicks = axis.minorTicks;\n if (!minorTicks[pos]) {\n minorTicks[pos] = new Tick(axis, pos, 'minor');\n }\n // Render new ticks in old position\n if (slideIn && minorTicks[pos].isNew) {\n minorTicks[pos].render(null, true);\n }\n minorTicks[pos].render(null, false, 1);\n }\n /**\n * Render a major tick into the given position. If a tick already exists\n * in this position, move it.\n *\n * @function Highcharts.Axis#renderTick\n *\n * @param {number} pos\n * The position in axis values.\n *\n * @param {number} i\n * The tick index.\n *\n * @param {boolean} slideIn\n * Whether the tick should animate in from last computed position\n */\n renderTick(pos, i, slideIn) {\n const axis = this, isLinked = axis.isLinked, ticks = axis.ticks;\n // Linked axes need an extra check to find out if\n if (!isLinked ||\n (pos >= axis.min && pos <= axis.max) ||\n axis.grid?.isColumn) {\n if (!ticks[pos]) {\n ticks[pos] = new Tick(axis, pos);\n }\n // NOTE this seems like overkill. Could be handled in tick.render by\n // setting old position in attr, then set new position in animate.\n // render new ticks in old position\n if (slideIn && ticks[pos].isNew) {\n // Start with negative opacity so that it is visible from\n // halfway into the animation\n ticks[pos].render(i, true, -1);\n }\n ticks[pos].render(i);\n }\n }\n /**\n * Render the axis.\n *\n * @internal\n * @function Highcharts.Axis#render\n *\n * @emits Highcharts.Axis#event:afterRender\n */\n render() {\n const axis = this, chart = axis.chart, log = axis.logarithmic, renderer = chart.renderer, options = axis.options, isLinked = axis.isLinked, tickPositions = axis.tickPositions, axisTitle = axis.axisTitle, ticks = axis.ticks, minorTicks = axis.minorTicks, alternateBands = axis.alternateBands, stackLabelOptions = options.stackLabels, alternateGridColor = options.alternateGridColor, crossing = options.crossing, tickmarkOffset = axis.tickmarkOffset, axisLine = axis.axisLine, showAxis = axis.showAxis, animation = animObject(renderer.globalAnimation);\n let from, to;\n // Reset\n axis.labelEdge.length = 0;\n axis.overlap = false;\n // Mark all elements inActive before we go over and mark the active ones\n [ticks, minorTicks, alternateBands].forEach(function (coll) {\n objectEach(coll, function (tick) {\n tick.isActive = false;\n });\n });\n // Crossing\n if (isNumber(crossing)) {\n const otherAxis = this.isXAxis ? chart.yAxis[0] : chart.xAxis[0], directionFactor = [1, -1, -1, 1][this.side];\n if (otherAxis) {\n let px = otherAxis.toPixels(crossing, true);\n if (axis.horiz) {\n px = otherAxis.len - px;\n }\n axis.offset = directionFactor * px;\n }\n }\n // If the series has data draw the ticks. Else only the line and title\n if (axis.hasData() || isLinked) {\n const slideInTicks = axis.chart.hasRendered &&\n axis.old && isNumber(axis.old.min);\n // Minor ticks\n if (axis.minorTickInterval && !axis.categories) {\n axis.getMinorTickPositions().forEach(function (pos) {\n axis.renderMinorTick(pos, slideInTicks);\n });\n }\n // Major ticks. Pull out the first item and render it last so that\n // we can get the position of the neighbor label. #808.\n if (tickPositions.length) { // #1300\n tickPositions.forEach(function (pos, i) {\n axis.renderTick(pos, i, slideInTicks);\n });\n // In a categorized axis, the tick marks are displayed\n // between labels. So we need to add a tick mark and\n // grid line at the left edge of the X axis.\n if (tickmarkOffset && (axis.min === 0 || axis.single)) {\n if (!ticks[-1]) {\n ticks[-1] = new Tick(axis, -1, null, true);\n }\n ticks[-1].render(-1);\n }\n }\n // Alternate grid color\n if (alternateGridColor) {\n tickPositions.forEach(function (pos, i) {\n to = typeof tickPositions[i + 1] !== 'undefined' ?\n tickPositions[i + 1] + tickmarkOffset :\n axis.max - tickmarkOffset;\n if (i % 2 === 0 &&\n pos < axis.max &&\n to <= axis.max + (chart.polar ?\n -tickmarkOffset :\n tickmarkOffset)) { // #2248, #4660\n if (!alternateBands[pos]) {\n // Should be imported from PlotLineOrBand.js, but\n // the dependency cycle with axis is a problem\n alternateBands[pos] = new H.PlotLineOrBand(axis, {});\n }\n from = pos + tickmarkOffset; // #949\n alternateBands[pos].options = {\n from: log ? log.lin2log(from) : from,\n to: log ? log.lin2log(to) : to,\n color: alternateGridColor,\n className: 'highcharts-alternate-grid'\n };\n alternateBands[pos].render();\n alternateBands[pos].isActive = true;\n }\n });\n }\n // Custom plot lines and bands\n if (!axis._addedPlotLB) { // Only first time\n axis._addedPlotLB = true;\n (options.plotLines || [])\n .concat(options.plotBands || [])\n .forEach(function (plotLineOptions) {\n axis\n .addPlotBandOrLine(plotLineOptions);\n });\n }\n } // End if hasData\n // Remove inactive ticks\n [ticks, minorTicks, alternateBands].forEach(function (coll) {\n const forDestruction = [], delay = animation.duration, destroyInactiveItems = function () {\n let i = forDestruction.length;\n while (i--) {\n // When resizing rapidly, the same items\n // may be destroyed in different timeouts,\n // or the may be reactivated\n if (coll[forDestruction[i]] &&\n !coll[forDestruction[i]].isActive) {\n coll[forDestruction[i]].destroy();\n delete coll[forDestruction[i]];\n }\n }\n };\n objectEach(coll, function (tick, pos) {\n if (!tick.isActive) {\n // Render to zero opacity\n tick.render(pos, false, 0);\n tick.isActive = false;\n forDestruction.push(pos);\n }\n });\n // When the objects are finished fading out, destroy them\n syncTimeout(destroyInactiveItems, coll === alternateBands ||\n !chart.hasRendered ||\n !delay ?\n 0 :\n delay);\n });\n // Set the axis line path\n if (axisLine) {\n axisLine[axisLine.isPlaced ? 'animate' : 'attr']({\n d: this.getLinePath(axisLine.strokeWidth())\n });\n axisLine.isPlaced = true;\n // Show or hide the line depending on options.showEmpty\n axisLine[showAxis ? 'show' : 'hide'](showAxis);\n }\n if (axisTitle && showAxis) {\n axisTitle[axisTitle.isNew ? 'attr' : 'animate'](axis.getTitlePosition(axisTitle));\n axisTitle.isNew = false;\n }\n // Stacked totals\n if (stackLabelOptions?.enabled && axis.stacking) {\n axis.stacking.renderStackTotals();\n }\n // First time, save the existing state\n if (!this.old) {\n this.saveOld();\n }\n axis.isDirty = false;\n fireEvent(this, 'afterRender');\n }\n /**\n * Redraw the axis to reflect changes in the data or axis extremes. Called\n * internally from Highcharts.Chart#redraw.\n *\n * @internal\n * @function Highcharts.Axis#redraw\n */\n redraw() {\n if (this.visible) {\n // Render the axis\n this.render();\n // Move plot lines and bands\n this.plotLinesAndBands.forEach(function (plotLine) {\n plotLine.render();\n });\n }\n // Mark associated series as dirty and ready for redraw\n this.series.forEach(function (series) {\n series.isDirty = true;\n });\n }\n /**\n * Record old scaling for updating/animation.\n *\n * @private\n */\n saveOld() {\n this.old = isNumber(this.min) ? {\n len: this.len,\n max: this.max,\n min: this.min,\n names: this.names.slice(),\n transA: this.transA,\n userMax: this.userMax,\n userMin: this.userMin\n } : void 0;\n }\n /**\n * Returns an array of axis properties, that should be untouched during\n * reinitialization.\n *\n * @internal\n * @function Highcharts.Axis#getKeepProps\n */\n getKeepProps() {\n return (this.keepProps || Axis.keepProps);\n }\n /**\n * Destroys an Axis instance. See {@link Axis#remove} for the API endpoint\n * to fully remove the axis.\n *\n * @internal\n * @function Highcharts.Axis#destroy\n *\n * @param {boolean} [keepEvents]\n * Whether to preserve events, used internally in Axis.update.\n */\n destroy(keepEvents) {\n const axis = this, plotLinesAndBands = axis.plotLinesAndBands, eventOptions = this.eventOptions;\n fireEvent(this, 'destroy', { keepEvents: keepEvents });\n // Remove the events\n if (!keepEvents) {\n removeEvent(axis);\n }\n // Destroy collections\n [axis.ticks, axis.minorTicks, axis.alternateBands].forEach(function (coll) {\n destroyObjectProperties(coll);\n });\n if (plotLinesAndBands) {\n let i = plotLinesAndBands.length;\n while (i--) { // #1975\n plotLinesAndBands[i].destroy();\n }\n }\n // Destroy elements\n [\n 'axisLine', 'axisTitle', 'axisGroup',\n 'gridGroup', 'labelGroup', 'cross', 'scrollbar'\n ].forEach(function (prop) {\n if (axis[prop]) {\n axis[prop] = axis[prop].destroy();\n }\n });\n // Destroy each generated group for plotLines and plotBands\n for (const plotGroup in axis.plotLinesAndBandsGroups) { // eslint-disable-line guard-for-in\n axis.plotLinesAndBandsGroups[plotGroup] =\n axis.plotLinesAndBandsGroups[plotGroup].destroy();\n }\n // Delete all properties and fall back to the prototype.\n objectEach(axis, function (_val, key) {\n if (axis.getKeepProps().indexOf(key) === -1) {\n delete axis[key];\n }\n });\n this.eventOptions = eventOptions;\n }\n /**\n * Internal function to draw a crosshair.\n *\n * @function Highcharts.Axis#drawCrosshair\n *\n * @param {Highcharts.PointerEventObject} [e]\n * The event arguments from the modified pointer event, extended with\n * `chartX` and `chartY`\n *\n * @param {Highcharts.Point} [point]\n * The Point object if the crosshair snaps to points.\n *\n * @emits Highcharts.Axis#event:afterDrawCrosshair\n * @emits Highcharts.Axis#event:drawCrosshair\n */\n drawCrosshair(e, point) {\n const options = this.crosshair, snap = options?.snap ?? true, chart = this.chart, graphic = this.cross;\n let path, pos, categorized, crossOptions;\n fireEvent(this, 'drawCrosshair', { e: e, point: point });\n // Use last available event when updating non-snapped crosshairs without\n // mouse interaction (#5287)\n if (!e) {\n e = this.cross?.e;\n }\n if (\n // Disabled in options\n !options ||\n // Snap\n ((defined(point) || !snap) === false)) {\n this.hideCrosshair();\n }\n else {\n clearTimeout(this.crossShowTimer);\n // Get the path\n if (!snap) {\n pos = e &&\n (this.horiz ?\n e.chartX - this.pos :\n this.len - e.chartY + this.pos);\n }\n else if (defined(point)) {\n // #3834\n pos = pick(this.coll !== 'colorAxis' ?\n point.crosshairPos : // 3D axis extension\n null, this.isXAxis ?\n point.plotX :\n this.len - point.plotY);\n }\n if (defined(pos)) {\n crossOptions = {\n // Value, only used on radial\n value: point && (this.isXAxis ?\n point.x :\n pick(point.stackY, point.y)),\n translatedValue: pos\n };\n if (chart.polar) {\n // Additional information required for crosshairs in\n // polar chart\n extend(crossOptions, {\n isCrosshair: true,\n chartX: e?.chartX,\n chartY: e?.chartY,\n point: point\n });\n }\n path = this.getPlotLinePath(crossOptions) ||\n null; // #3189\n }\n if (!defined(path)) {\n this.hideCrosshair();\n return;\n }\n categorized = this.categories && !this.isRadial;\n this.crossShowTimer = syncTimeout(() => {\n // Get the *current* crosshair, in case it was created by\n // another call while this one was delayed.\n let cross = this.cross;\n // Draw the cross\n if (!cross) {\n this.cross = cross = chart.renderer\n .path()\n .addClass('highcharts-crosshair highcharts-crosshair-' +\n (categorized ? 'category ' : 'thin ') +\n (options.className || ''))\n .attr({\n zIndex: pick(options.zIndex, 2)\n })\n .clip(options.clip === false ?\n void 0 :\n chart.plotClipInner)\n .add();\n // Presentational attributes\n if (!chart.styledMode) {\n cross.attr({\n stroke: options.color ||\n (categorized ?\n color(\n // eslint-disable-next-line max-len\n 'var(--highcharts-highlight-color-20)').setOpacity(0.25).get() :\n 'var(--highcharts-neutral-color-20)'),\n 'stroke-width': pick(options.width, 1)\n }).css({\n 'pointer-events': 'none'\n });\n if (options.dashStyle) {\n cross.attr({\n dashstyle: options.dashStyle\n });\n }\n }\n }\n cross\n .show()\n .animate({ d: path }, animObject(options?.animation));\n if (categorized && !options.width) {\n cross.attr({\n 'stroke-width': this.transA\n });\n }\n if (this.cross) {\n this.cross.e = e;\n }\n }, \n // Only use delay if the crosshair is currently hidden\n (!graphic || graphic.attr('visibility') === 'hidden') ?\n options.showDelay || 0 :\n 0);\n }\n fireEvent(this, 'afterDrawCrosshair', { e: e, point: point });\n }\n /**\n * Hide the crosshair if visible.\n *\n * @function Highcharts.Axis#hideCrosshair\n */\n hideCrosshair() {\n clearTimeout(this.crossShowTimer);\n if (this.cross) {\n this.cross.hide();\n }\n fireEvent(this, 'afterHideCrosshair');\n }\n /**\n * Update an axis object with a new set of options. The options are merged\n * with the existing options, so only new or altered options need to be\n * specified.\n *\n * @sample highcharts/members/axis-update/\n * Axis update demo\n *\n * @function Highcharts.Axis#update\n *\n * @param {Highcharts.AxisOptions} options\n * The new options that will be merged in with existing options on the axis.\n *\n * @param {boolean} [redraw=true]\n * Whether to redraw the chart after the axis is altered. If doing more\n * operations on the chart, it is a good idea to set redraw to false and\n * call {@link Chart#redraw} after.\n */\n update(options, redraw) {\n const chart = this.chart;\n options = merge(this.userOptions, options);\n this.destroy(true);\n this.init(chart, options);\n chart.isDirtyBox = true;\n if (pick(redraw, true)) {\n chart.redraw();\n }\n }\n /**\n * Remove the axis from the chart.\n *\n * @sample highcharts/members/chart-addaxis/\n * Add and remove axes\n *\n * @function Highcharts.Axis#remove\n *\n * @param {boolean} [redraw=true]\n * Whether to redraw the chart following the remove.\n */\n remove(redraw) {\n const chart = this.chart, coll = this.coll, axisSeries = this.series;\n let i = axisSeries.length;\n // Remove associated series (#2687)\n while (i--) {\n if (axisSeries[i]) {\n axisSeries[i].remove(false);\n }\n }\n // Remove the axis\n erase(chart.axes, this);\n erase(chart[coll] || [], this);\n chart.orderItems(coll);\n this.destroy();\n chart.isDirtyBox = true;\n if (pick(redraw, true)) {\n chart.redraw();\n }\n }\n /**\n * Update the axis title by options after render time.\n *\n * @sample highcharts/members/axis-settitle/\n * Set a new Y axis title\n *\n * @function Highcharts.Axis#setTitle\n *\n * @param {Highcharts.AxisTitleOptions} titleOptions\n * The additional title options.\n *\n * @param {boolean} [redraw=true]\n * Whether to redraw the chart after setting the title.\n */\n setTitle(titleOptions, redraw) {\n this.update({ title: titleOptions }, redraw);\n }\n /**\n * Set new axis categories and optionally redraw.\n *\n * @sample highcharts/members/axis-setcategories/\n * Set categories by click on a button\n *\n * @function Highcharts.Axis#setCategories\n *\n * @param {Array<string>} categories\n * The new categories.\n *\n * @param {boolean} [redraw=true]\n * Whether to redraw the chart.\n */\n setCategories(categories, redraw) {\n this.update({ categories: categories }, redraw);\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Properties to survive after destroy, needed for Axis.update (#4317,\n * #5773, #5881).\n * @internal\n */\nAxis.keepProps = [\n 'coll',\n 'extKey',\n 'hcEvents',\n 'len',\n 'names',\n 'series',\n 'userMax',\n 'userMin'\n];\n/* *\n *\n * Default Export\n *\n * */\nexport default Axis;\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * Options for the path on the Axis to be calculated.\n * @interface Highcharts.AxisPlotLinePathOptionsObject\n */ /**\n* Axis value.\n* @name Highcharts.AxisPlotLinePathOptionsObject#value\n* @type {number|undefined}\n*/ /**\n* Line width used for calculation crisp line coordinates. Defaults to 1.\n* @name Highcharts.AxisPlotLinePathOptionsObject#lineWidth\n* @type {number|undefined}\n*/ /**\n* If `false`, the function will return null when it falls outside the axis\n* bounds. If `true`, the function will return a path aligned to the plot area\n* sides if it falls outside. If `pass`, it will return a path outside.\n* @name Highcharts.AxisPlotLinePathOptionsObject#force\n* @type {string|boolean|undefined}\n*/ /**\n* Used in Highcharts Stock. When `true`, plot paths\n* (crosshair, plotLines, gridLines)\n* will be rendered on all axes when defined on the first axis.\n* @name Highcharts.AxisPlotLinePathOptionsObject#acrossPanes\n* @type {boolean|undefined}\n*/ /**\n* Use old coordinates (for resizing and rescaling).\n* If not set, defaults to `false`.\n* @name Highcharts.AxisPlotLinePathOptionsObject#old\n* @type {boolean|undefined}\n*/ /**\n* If given, return the plot line path of a pixel position on the axis.\n* @name Highcharts.AxisPlotLinePathOptionsObject#translatedValue\n* @type {number|undefined}\n*/ /**\n* Used in Polar axes. Reverse the positions for concatenation of polygonal\n* plot bands\n* @name Highcharts.AxisPlotLinePathOptionsObject#reverse\n* @type {boolean|undefined}\n*/\n/**\n * Options for crosshairs on axes.\n *\n * @product highstock\n *\n * @typedef {Highcharts.XAxisCrosshairOptions|Highcharts.YAxisCrosshairOptions} Highcharts.AxisCrosshairOptions\n */\n/**\n * @typedef {\"navigator\"|\"pan\"|\"rangeSelectorButton\"|\"rangeSelectorInput\"|\"scrollbar\"|\"traverseUpButton\"|\"zoom\"} Highcharts.AxisExtremesTriggerValue\n */\n/**\n * @callback Highcharts.AxisEventCallbackFunction\n *\n * @param {Highcharts.Axis} this\n */\n/**\n * @callback Highcharts.AxisLabelsFormatterCallbackFunction\n *\n * @param {Highcharts.AxisLabelsFormatterContextObject} this\n *\n * @param {Highcharts.AxisLabelsFormatterContextObject} ctx\n * Since v12.6.0, the formatter context passed as an extra argument for arrow\n * functions.\n *\n * @return {string}\n */\n/**\n * @interface Highcharts.AxisLabelsFormatterContextObject\n */ /**\n* The axis item of the label\n* @name Highcharts.AxisLabelsFormatterContextObject#axis\n* @type {Highcharts.Axis}\n*/ /**\n* The chart instance.\n* @name Highcharts.AxisLabelsFormatterContextObject#chart\n* @type {Highcharts.Chart}\n*/ /**\n* Default formatting of date/time labels.\n* @name Highcharts.AxisLabelsFormatterContextObject#dateTimeLabelFormat\n* @type {string|undefined}\n*/ /**\n* Whether the label belongs to the first tick on the axis.\n* @name Highcharts.AxisLabelsFormatterContextObject#isFirst\n* @type {boolean}\n*/ /**\n* Whether the label belongs to the last tick on the axis.\n* @name Highcharts.AxisLabelsFormatterContextObject#isLast\n* @type {boolean}\n*/ /**\n* The position on the axis in terms of axis values. For category axes, a\n* zero-based index. For datetime axes, the JavaScript time in milliseconds\n* since 1970.\n* @name Highcharts.AxisLabelsFormatterContextObject#pos\n* @type {number}\n*/ /**\n* The preformatted text as the result of the default formatting. For example\n* dates will be formatted as strings, and numbers with language-specific comma\n* separators, thousands separators and numeric symbols like `k` or `M`.\n* @name Highcharts.AxisLabelsFormatterContextObject#text\n* @type {string|undefined}\n*/ /**\n* The Tick instance.\n* @name Highcharts.AxisLabelsFormatterContextObject#tick\n* @type {Highcharts.Tick}\n*/ /**\n* This can be either a numeric value or a category string.\n* @name Highcharts.AxisLabelsFormatterContextObject#value\n* @type {number|string}\n*/\n/**\n * Options for axes.\n *\n * @typedef {Highcharts.XAxisOptions|Highcharts.YAxisOptions|Highcharts.ZAxisOptions} Highcharts.AxisOptions\n */\n/**\n * @callback Highcharts.AxisPointBreakEventCallbackFunction\n *\n * @param {Highcharts.Axis} this\n *\n * @param {Highcharts.AxisPointBreakEventObject} evt\n */\n/**\n * @interface Highcharts.AxisPointBreakEventObject\n */ /**\n* @name Highcharts.AxisPointBreakEventObject#brk\n* @type {Highcharts.Dictionary<number>}\n*/ /**\n* @name Highcharts.AxisPointBreakEventObject#point\n* @type {Highcharts.Point}\n*/ /**\n* @name Highcharts.AxisPointBreakEventObject#preventDefault\n* @type {Function}\n*/ /**\n* @name Highcharts.AxisPointBreakEventObject#target\n* @type {Highcharts.SVGElement}\n*/ /**\n* @name Highcharts.AxisPointBreakEventObject#type\n* @type {\"pointBreak\"|\"pointInBreak\"}\n*/\n/**\n * @callback Highcharts.AxisSetExtremesEventCallbackFunction\n *\n * @param {Highcharts.Axis} this\n *\n * @param {Highcharts.AxisSetExtremesEventObject} evt\n */\n/**\n * @interface Highcharts.AxisSetExtremesEventObject\n * @extends Highcharts.ExtremesObject\n */ /**\n* @name Highcharts.AxisSetExtremesEventObject#preventDefault\n* @type {Function}\n*/ /**\n* @name Highcharts.AxisSetExtremesEventObject#target\n* @type {Highcharts.SVGElement}\n*/ /**\n* @name Highcharts.AxisSetExtremesEventObject#trigger\n* @type {Highcharts.AxisExtremesTriggerValue|string}\n*/ /**\n* @name Highcharts.AxisSetExtremesEventObject#type\n* @type {\"setExtremes\"}\n*/\n/**\n * @callback Highcharts.AxisTickPositionerCallbackFunction\n *\n * @param {Highcharts.Axis} this\n *\n * @param {number} min\n * Current minimum value.\n *\n * @param {number} max\n * Current maximum value.\n *\n * @param {Highcharts.Axis} [ctx]\n * Since v12.6.0, the axis context passed as an extra argument for arrow\n * functions.\n *\n * @return {Highcharts.AxisTickPositionsArray|undefined}\n */\n/**\n * @interface Highcharts.AxisTickPositionsArray\n * @augments Array<number>\n */\n/**\n * @typedef {\"high\"|\"low\"|\"middle\"} Highcharts.AxisTitleAlignValue\n */\n/**\n * @typedef {Highcharts.XAxisTitleOptions|Highcharts.YAxisTitleOptions|Highcharts.ZAxisTitleOptions} Highcharts.AxisTitleOptions\n */\n/**\n * @typedef {\"linear\"|\"logarithmic\"|\"datetime\"|\"category\"|\"treegrid\"} Highcharts.AxisTypeValue\n */\n/**\n * The returned object literal from the {@link Highcharts.Axis#getExtremes}\n * function.\n *\n * @interface Highcharts.ExtremesObject\n */ /**\n* The maximum value of the axis' associated series.\n* @name Highcharts.ExtremesObject#dataMax\n* @type {number}\n*/ /**\n* The minimum value of the axis' associated series.\n* @name Highcharts.ExtremesObject#dataMin\n* @type {number}\n*/ /**\n* The maximum axis value, either automatic or set manually. If the `max` option\n* is not set, `maxPadding` is 0 and `endOnTick` is false, this value will be\n* the same as `dataMax`.\n* @name Highcharts.ExtremesObject#max\n* @type {number}\n*/ /**\n* The minimum axis value, either automatic or set manually. If the `min` option\n* is not set, `minPadding` is 0 and `startOnTick` is false, this value will be\n* the same as `dataMin`.\n* @name Highcharts.ExtremesObject#min\n* @type {number}\n*/ /**\n* The user defined maximum, either from the `max` option or from a zoom or\n* `setExtremes` action.\n* @name Highcharts.ExtremesObject#userMax\n* @type {number|undefined}\n*/ /**\n* The user defined minimum, either from the `min` option or from a zoom or\n* `setExtremes` action.\n* @name Highcharts.ExtremesObject#userMin\n* @type {number|undefined}\n*/\n/**\n * Formatter function for the text of a crosshair label.\n *\n * @callback Highcharts.XAxisCrosshairLabelFormatterCallbackFunction\n *\n * @param {Highcharts.Axis} this\n * Axis context\n *\n * @param {number} value\n * Y value of the data point\n *\n * @param {Highcharts.Axis} [ctx]\n * Since v12.6.0, the axis context passed as an extra argument for arrow\n * functions.\n *\n * @return {string}\n */\n''; // Keeps doclets above in JS file\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport { addEvent, getMagnitude, normalizeTickInterval } from '../../Shared/Utilities.js';\nimport { timeUnits } from '../Utilities.js';\n/* *\n *\n * Composition\n *\n * */\nvar DateTimeAxis;\n(function (DateTimeAxis) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * Extends axis class with date and time support.\n * @internal\n */\n function compose(AxisClass) {\n if (!AxisClass.keepProps.includes('dateTime')) {\n AxisClass.keepProps.push('dateTime');\n const axisProto = AxisClass.prototype;\n axisProto.getTimeTicks = getTimeTicks;\n addEvent(AxisClass, 'afterSetType', onAfterSetType);\n }\n return AxisClass;\n }\n DateTimeAxis.compose = compose;\n /**\n * Set the tick positions to a time unit that makes sense, for example\n * on the first of each month or on every Monday. Return an array with\n * the time positions. Used in datetime axes as well as for grouping\n * data on a datetime axis.\n *\n * @internal\n * @function Highcharts.Axis#getTimeTicks\n */\n function getTimeTicks() {\n return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);\n }\n /** @internal */\n function onAfterSetType() {\n if (this.type !== 'datetime') {\n this.dateTime = void 0;\n return;\n }\n if (!this.dateTime) {\n this.dateTime = new Additions(this);\n }\n }\n /* *\n *\n * Classes\n *\n * */\n /** @internal */\n class Additions {\n /* *\n *\n * Constructors\n *\n * */\n constructor(axis) {\n this.axis = axis;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Get a normalized tick interval for dates. Returns a configuration\n * object with unit range (interval), count and name. Used to prepare\n * data for `getTimeTicks`. Previously this logic was part of\n * getTimeTicks, but as `getTimeTicks` now runs of segments in stock\n * charts, the normalizing logic was extracted in order to prevent it\n * for running over again for each segment having the same interval.\n * #662, #697.\n * @internal\n */\n normalizeTimeTickInterval(tickInterval, unitsOption) {\n const units = (unitsOption || [[\n // Unit name\n 'millisecond',\n // Allowed multiples\n [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]\n ], [\n 'second',\n [1, 2, 5, 10, 15, 30]\n ], [\n 'minute',\n [1, 2, 5, 10, 15, 30]\n ], [\n 'hour',\n [1, 2, 3, 4, 6, 8, 12]\n ], [\n 'day',\n [1, 2]\n ], [\n 'week',\n [1, 2]\n ], [\n 'month',\n [1, 2, 3, 4, 6]\n ], [\n 'year',\n null\n ]]);\n let unit = units[units.length - 1], // Default unit is years\n interval = timeUnits[unit[0]], multiples = unit[1], i, match;\n // Loop through the units to find the one that best fits the\n // tickInterval\n for (i = 0; i < units.length; i++) {\n unit = units[i];\n interval = timeUnits[unit[0]];\n multiples = unit[1];\n if (units[i + 1]) {\n // `lessThan` is in the middle between the highest multiple\n // and the next unit.\n const lessThan = (interval *\n multiples[multiples.length - 1] +\n timeUnits[units[i + 1][0]]) / 2;\n // Break and keep the current unit\n if (tickInterval <= lessThan) {\n match = lessThan / tickInterval;\n break;\n }\n }\n }\n // Prevent 2.5 years intervals, though 25, 250 etc. are allowed\n if (interval === timeUnits.year && tickInterval < 5 * interval) {\n multiples = [1, 2, 5];\n }\n // Get the count\n const count = normalizeTickInterval(tickInterval / interval, multiples, unit[0] === 'year' ? // #1913, #2360\n Math.max(getMagnitude(tickInterval / interval), 1) :\n 1);\n return {\n unitRange: interval,\n count: count,\n unitName: unit[0],\n match\n };\n }\n /**\n * Get the best date format for a specific X value based on the closest\n * point range on the axis.\n *\n * @internal\n */\n getXDateFormat(x, dateTimeLabelFormats) {\n const { axis } = this, time = axis.chart.time;\n return axis.closestPointRange ?\n time.getDateFormat(axis.closestPointRange, x, axis.options.startOfWeek, dateTimeLabelFormats) ||\n // #2546, 2581\n time.resolveDTLFormat(dateTimeLabelFormats.year).main :\n time.resolveDTLFormat(dateTimeLabelFormats.day).main;\n }\n }\n DateTimeAxis.Additions = Additions;\n})(DateTimeAxis || (DateTimeAxis = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default DateTimeAxis;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport { addEvent, normalizeTickInterval, pick } from '../../Shared/Utilities.js';\n/* *\n *\n * Class\n *\n * */\n/** @internal */\nvar LogarithmicAxis;\n(function (LogarithmicAxis) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * Provides logarithmic support for axes.\n * @internal\n */\n function compose(AxisClass) {\n if (!AxisClass.keepProps.includes('logarithmic')) {\n AxisClass.keepProps.push('logarithmic');\n addEvent(AxisClass, 'afterSetType', onAfterSetType);\n addEvent(AxisClass, 'afterInit', onAfterInit);\n }\n return AxisClass;\n }\n LogarithmicAxis.compose = compose;\n /** @internal */\n function onAfterSetType() {\n if (this.type !== 'logarithmic') {\n this.logarithmic = void 0;\n }\n else {\n this.logarithmic ?? (this.logarithmic = new Additions(this));\n }\n }\n /** @internal */\n function onAfterInit() {\n const axis = this;\n const log = axis.logarithmic;\n // Extend logarithmic axis\n if (log) {\n axis.lin2val = function (num) {\n return log.lin2log(num);\n };\n axis.val2lin = function (num) {\n return log.log2lin(num);\n };\n }\n }\n /* *\n *\n * Class\n *\n * */\n /**\n * Provides logarithmic support for axes.\n * @internal\n * @class\n */\n class Additions {\n /* *\n *\n * Constructors\n *\n * */\n constructor(axis) {\n this.axis = axis;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Set the tick positions of a logarithmic axis.\n */\n getLogTickPositions(interval, min, max, minor) {\n const log = this;\n const axis = log.axis;\n const axisLength = axis.len;\n const options = axis.options;\n // Since we use this method for both major and minor ticks,\n // use a local variable and return the result\n let positions = [];\n // Reset\n if (!minor) {\n log.minorAutoInterval = void 0;\n }\n // First case: All ticks fall on whole logarithms: 1, 10, 100 etc.\n if (interval >= 0.5) {\n interval = Math.round(interval);\n positions = axis.getLinearTickPositions(interval, min, max);\n // Second case: We need intermediary ticks. For example\n // 1, 2, 4, 6, 8, 10, 20, 40 etc.\n }\n else if (interval >= 0.08) {\n const roundedMin = Math.floor(min);\n let intermediate, i, j, len, pos, lastPos, break2;\n if (interval > 0.3) {\n intermediate = [1, 2, 4];\n // 0.2 equals five minor ticks per 1, 10, 100 etc\n }\n else if (interval > 0.15) {\n intermediate = [1, 2, 4, 6, 8];\n }\n else { // 0.1 equals ten minor ticks per 1, 10, 100 etc\n intermediate = [1, 2, 3, 4, 5, 6, 7, 8, 9];\n }\n for (i = roundedMin; i < max + 1 && !break2; i++) {\n len = intermediate.length;\n for (j = 0; j < len && !break2; j++) {\n pos = log.log2lin(log.lin2log(i) * intermediate[j]);\n // #1670, lastPos is #3113\n if (pos > min &&\n (!minor || lastPos <= max) &&\n typeof lastPos !== 'undefined') {\n positions.push(lastPos);\n }\n if (lastPos > max) {\n break2 = true;\n }\n lastPos = pos;\n }\n }\n // Third case: We are so deep in between whole logarithmic values,\n // that we might as well handle the tick positions like a linear\n // axis. For example 1.01, 1.02, 1.03, 1.04.\n }\n else {\n const realMin = log.lin2log(min), realMax = log.lin2log(max), tickIntervalOption = minor ?\n axis.getMinorTickInterval() :\n options.tickInterval, filteredTickIntervalOption = tickIntervalOption === 'auto' ?\n null :\n tickIntervalOption, tickPixelIntervalOption = options.tickPixelInterval / (minor ? 5 : 1), totalPixelLength = minor ?\n axisLength / axis.tickPositions.length :\n axisLength;\n interval = pick(filteredTickIntervalOption, log.minorAutoInterval, (realMax - realMin) *\n tickPixelIntervalOption / (totalPixelLength || 1));\n interval = normalizeTickInterval(interval);\n positions = axis.getLinearTickPositions(interval, realMin, realMax).map(log.log2lin);\n if (!minor) {\n log.minorAutoInterval = interval / 5;\n }\n }\n // Set the axis-level tickInterval variable\n if (!minor) {\n axis.tickInterval = interval;\n }\n return positions;\n }\n /**\n * Converts a linear value to a logarithmic value.\n *\n * @internal\n *\n * @param {number} num\n * The linear value.\n *\n * @return {number}\n * The logarithmic value.\n */\n lin2log(num) {\n return Math.pow(10, num);\n }\n /**\n * Converts a logarithmic value to a linear value.\n *\n * @internal\n *\n * @param {number} num\n * The logarithmic value.\n *\n * @return {number}\n * The linear value.\n */\n log2lin(num) {\n return Math.log(num) / Math.LN10;\n }\n }\n LogarithmicAxis.Additions = Additions;\n})(LogarithmicAxis || (LogarithmicAxis = {}));\n/* *\n *\n * Default Export\n *\n * */\n/** @internal */\nexport default LogarithmicAxis;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport { erase, extend, isNumber } from '../../../Shared/Utilities.js';\n/* *\n *\n * Composition\n *\n * */\nvar PlotLineOrBandAxis;\n(function (PlotLineOrBandAxis) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Variables\n *\n * */\n let PlotLineOrBandClass;\n /* *\n *\n * Functions\n *\n * */\n /**\n * Add a plot band after render time.\n *\n * @sample highcharts/members/axis-addplotband/\n * Toggle the plot band from a button\n *\n * @function Highcharts.Axis#addPlotBand\n *\n * @param {Highcharts.AxisPlotBandsOptions} options\n * A configuration object for the plot band, as defined in\n * [xAxis.plotBands](https://api.highcharts.com/highcharts/xAxis.plotBands).\n *\n * @return {Highcharts.PlotLineOrBand|undefined}\n * The added plot band, or `undefined` if the options are not valid.\n */\n function addPlotBand(options) {\n return this.addPlotBandOrLine(options, 'plotBands');\n }\n /**\n * Add a plot band or plot line after render time. Called from\n * addPlotBand and addPlotLine internally.\n *\n * @internal\n * @function Highcharts.Axis#addPlotBandOrLine\n * @param {Highcharts.AxisPlotBandsOptions|Highcharts.AxisPlotLinesOptions} options\n * The plotBand or plotLine configuration object.\n */\n function addPlotBandOrLine(options, coll) {\n const userOptions = this.userOptions;\n let obj = new PlotLineOrBandClass(this, options);\n if (this.visible) {\n obj = obj.render();\n }\n if (obj) { // #2189\n if (!this._addedPlotLB) {\n this._addedPlotLB = true;\n (userOptions.plotLines || [])\n .concat(userOptions.plotBands || [])\n .forEach((plotLineOptions) => {\n this.addPlotBandOrLine(plotLineOptions);\n });\n }\n // Add it to the user options for exporting and Axis.update\n if (coll) {\n // Workaround Microsoft/TypeScript issue #32693\n const updatedOptions = (userOptions[coll] || []);\n updatedOptions.push(options);\n userOptions[coll] = updatedOptions;\n }\n this.plotLinesAndBands.push(obj);\n }\n return obj;\n }\n /**\n * Add a plot line after render time.\n *\n * @sample highcharts/members/axis-addplotline/\n * Toggle the plot line from a button\n *\n * @function Highcharts.Axis#addPlotLine\n *\n * @param {Highcharts.AxisPlotLinesOptions} options\n * A configuration object for the plot line, as defined in\n * [xAxis.plotLines](https://api.highcharts.com/highcharts/xAxis.plotLines).\n *\n * @return {Highcharts.PlotLineOrBand|undefined}\n * The added plot line, or `undefined` if the options are not valid.\n */\n function addPlotLine(options) {\n return this.addPlotBandOrLine(options, 'plotLines');\n }\n /** @internal */\n function compose(PlotLineOrBandType, AxisClass) {\n const axisProto = AxisClass.prototype;\n if (!axisProto.addPlotBand) {\n PlotLineOrBandClass = PlotLineOrBandType;\n extend(axisProto, {\n addPlotBand,\n addPlotLine,\n addPlotBandOrLine,\n getPlotBandPath,\n removePlotBand,\n removePlotLine,\n removePlotBandOrLine\n });\n }\n return AxisClass;\n }\n PlotLineOrBandAxis.compose = compose;\n /**\n * Internal function to create the SVG path definition for a plot band.\n *\n * @function Highcharts.Axis#getPlotBandPath\n *\n * @param {number} from\n * The axis value to start from.\n *\n * @param {number} to\n * The axis value to end on.\n *\n * @param {Highcharts.AxisPlotBandsOptions|Highcharts.AxisPlotLinesOptions} options\n * The plotBand or plotLine configuration object.\n *\n * @return {Highcharts.SVGPathArray}\n * The SVG path definition in array form.\n */\n function getPlotBandPath(from, to, options) {\n options = options || this.options;\n const toPath = this.getPlotLinePath({\n value: to,\n force: true,\n acrossPanes: options.acrossPanes\n }), result = [], horiz = this.horiz, outside = !isNumber(this.min) ||\n !isNumber(this.max) ||\n (from < this.min && to < this.min) ||\n (from > this.max && to > this.max), path = this.getPlotLinePath({\n value: from,\n force: true,\n acrossPanes: options.acrossPanes\n });\n let i, \n // #4964 check if chart is inverted or plot band is on yAxis\n plus = 1, isFlat;\n if (path && toPath) {\n // Flat paths don't need labels (#3836)\n if (outside) {\n isFlat = path.toString() === toPath.toString();\n plus = 0;\n }\n // Go over each subpath - for panes in Highcharts Stock\n for (i = 0; i < path.length; i += 2) {\n const pathStart = path[i], pathEnd = path[i + 1], toPathStart = toPath[i], toPathEnd = toPath[i + 1];\n // Type checking all affected path segments. Consider\n // something smarter.\n if ((pathStart[0] === 'M' || pathStart[0] === 'L') &&\n (pathEnd[0] === 'M' || pathEnd[0] === 'L') &&\n (toPathStart[0] === 'M' || toPathStart[0] === 'L') &&\n (toPathEnd[0] === 'M' || toPathEnd[0] === 'L')) {\n // Add 1 pixel when coordinates are the same\n if (horiz && toPathStart[1] === pathStart[1]) {\n toPathStart[1] += plus;\n toPathEnd[1] += plus;\n }\n else if (!horiz && toPathStart[2] === pathStart[2]) {\n toPathStart[2] += plus;\n toPathEnd[2] += plus;\n }\n result.push(['M', pathStart[1], pathStart[2]], ['L', pathEnd[1], pathEnd[2]], ['L', toPathEnd[1], toPathEnd[2]], ['L', toPathStart[1], toPathStart[2]], ['Z']);\n }\n result.isFlat = isFlat;\n }\n }\n return result;\n }\n /**\n * Remove a plot band by its id.\n *\n * @sample highcharts/members/axis-removeplotband/\n * Remove plot band by id\n * @sample highcharts/members/axis-addplotband/\n * Toggle the plot band from a button\n *\n * @function Highcharts.Axis#removePlotBand\n *\n * @param {string} id\n * The plot band's `id` as given in the original configuration\n * object or in the `addPlotBand` option.\n */\n function removePlotBand(id) {\n this.removePlotBandOrLine(id);\n }\n /**\n * Remove a plot band or plot line from the chart by id. Called\n * internally from `removePlotBand` and `removePlotLine`.\n * @internal\n * @function Highcharts.Axis#removePlotBandOrLine\n */\n function removePlotBandOrLine(id) {\n const plotLinesAndBands = this.plotLinesAndBands, options = this.options, userOptions = this.userOptions;\n if (plotLinesAndBands) { // #15639\n let i = plotLinesAndBands.length;\n while (i--) {\n if (plotLinesAndBands[i].id === id) {\n plotLinesAndBands[i].destroy();\n }\n }\n ([\n options.plotLines || [],\n userOptions.plotLines || [],\n options.plotBands || [],\n userOptions.plotBands || []\n ]).forEach(function (arr) {\n i = arr.length;\n while (i--) {\n if (arr[i]?.id === id) {\n erase(arr, arr[i]);\n }\n }\n });\n }\n }\n /**\n * Remove a plot line by its id.\n *\n * @sample highcharts/xaxis/plotlines-id/\n * Remove plot line by id\n * @sample highcharts/members/axis-addplotline/\n * Toggle the plot line from a button\n *\n * @function Highcharts.Axis#removePlotLine\n *\n * @param {string} id\n * The plot line's `id` as given in the original configuration\n * object or in the `addPlotLine` option.\n */\n function removePlotLine(id) {\n this.removePlotBandOrLine(id);\n }\n})(PlotLineOrBandAxis || (PlotLineOrBandAxis = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default PlotLineOrBandAxis;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport PlotLineOrBandAxis from './PlotLineOrBandAxis.js';\nimport { addEvent, arrayMax, arrayMin, defined, destroyObjectProperties, erase, fireEvent, merge, objectEach, pick } from '../../../Shared/Utilities.js';\n/* *\n *\n * Class\n *\n * */\n/**\n * The object wrapper for plot lines and plot bands\n *\n * @class\n * @name Highcharts.PlotLineOrBand\n *\n * @param {Highcharts.Axis} axis\n * Related axis.\n *\n * @param {Highcharts.AxisPlotLinesOptions|Highcharts.AxisPlotBandsOptions} [options]\n * Options to use.\n */\nclass PlotLineOrBand {\n /* *\n *\n * Static Functions\n *\n * */\n /**\n * Composes `PlotLineOrBand` with `Axis` and `Chart`.\n *\n * @param {Highcharts.Chart} ChartClass\n * Chart class to compose.\n *\n * @param {Highcharts.Axis} AxisClass\n * Axis class to compose.\n *\n * @internal\n */\n static compose(ChartClass, AxisClass) {\n addEvent(ChartClass, 'afterInit', function () {\n this.labelCollectors.push(() => {\n const labels = [];\n for (const axis of this.axes) {\n for (const { label, options } of axis.plotLinesAndBands) {\n if (label && !options?.label?.allowOverlap) {\n labels.push(label);\n }\n }\n }\n return labels;\n });\n });\n return PlotLineOrBandAxis.compose(PlotLineOrBand, AxisClass);\n }\n /* *\n *\n * Constructor\n *\n * */\n constructor(axis, options) {\n /**\n * Related axis.\n *\n * @name Highcharts.PlotLineOrBand#axis\n * @type {Highcharts.Axis}\n */\n this.axis = axis;\n /**\n * Options of the plot line or band.\n *\n * @name Highcharts.PlotLineOrBand#options\n * @type {AxisPlotBandsOptions|AxisPlotLinesOptions}\n */\n this.options = options;\n this.id = options.id;\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable no-invalid-this, valid-jsdoc */\n /**\n * Render the plot line or plot band. If it is already existing,\n * move it.\n * @internal\n * @function Highcharts.PlotLineOrBand#render\n */\n render() {\n fireEvent(this, 'render');\n const { axis, options } = this, { chart, horiz, logarithmic } = axis, { color, events, zIndex = 0 } = options, { renderer, time } = axis.chart, groupAttribs = {}, \n // These properties only exist on either band or line\n to = time.parse(options.to), from = time.parse(options.from), value = time.parse(options.value), borderWidth = options.borderWidth;\n let optionsLabel = options.label, { label, svgElem } = this, path = [], group;\n const isBand = defined(from) && defined(to), isLine = defined(value), isNew = !svgElem, attribs = {\n 'class': 'highcharts-plot-' + (isBand ? 'band ' : 'line ') +\n (options.className || '')\n };\n let groupName = isBand ? 'bands' : 'lines';\n // Set the presentational attributes\n if (!chart.styledMode) {\n if (isLine) {\n attribs.stroke = color || 'var(--highcharts-neutral-color-40)';\n attribs['stroke-width'] = pick(options.width, 1);\n if (options.dashStyle) {\n attribs.dashstyle = options.dashStyle;\n }\n }\n else if (isBand) { // Plot band\n attribs.fill = color || 'var(--highcharts-highlight-color-10)';\n if (borderWidth) {\n attribs.stroke = options.borderColor;\n attribs['stroke-width'] = borderWidth;\n }\n }\n }\n // Grouping and zIndex\n groupAttribs.zIndex = zIndex;\n groupName += '-' + zIndex;\n group = axis.plotLinesAndBandsGroups[groupName];\n if (!group) {\n axis.plotLinesAndBandsGroups[groupName] = group =\n renderer.g('plot-' + groupName)\n .clip(chart.plotClipOuter)\n .attr(groupAttribs).add();\n }\n // Create the path\n if (!svgElem) {\n /**\n * SVG element of the plot line or band.\n *\n * @name Highcharts.PlotLineOrBand#svgElem\n * @type {Highcharts.SVGElement}\n */\n this.svgElem = svgElem = renderer\n .path()\n .attr(attribs)\n .add(group);\n }\n // Set the path or return\n if (defined(value)) { // Plot line\n path = axis.getPlotLinePath({\n value: logarithmic?.log2lin(value) ?? value,\n lineWidth: svgElem.strokeWidth(),\n acrossPanes: options.acrossPanes\n });\n }\n else if (defined(from) && defined(to)) { // Plot band\n path = axis.getPlotBandPath(logarithmic?.log2lin(from) ?? from, logarithmic?.log2lin(to) ?? to, options);\n }\n else {\n return;\n }\n // Common for lines and bands. Add events only if they were not added\n // before.\n if (!this.eventsAdded && events) {\n objectEach(events, (_event, eventType) => {\n svgElem?.on(eventType, (e) => {\n events[eventType].apply(this, [e, this]);\n });\n });\n this.eventsAdded = true;\n }\n if ((isNew || !svgElem.d) && path?.length) {\n svgElem.attr({ d: path });\n }\n else if (svgElem) {\n if (path) {\n svgElem.show();\n svgElem.animate({ d: path });\n }\n else if (svgElem.d) {\n svgElem.hide();\n if (label) {\n this.label = label = label.destroy();\n }\n }\n }\n // The plot band/line label\n if (optionsLabel &&\n (defined(optionsLabel.text) || defined(optionsLabel.formatter)) &&\n path?.length &&\n axis.width > 0 &&\n axis.height > 0 &&\n !path.isFlat) {\n // Apply defaults\n optionsLabel = merge({\n align: horiz && isBand ? 'center' : void 0,\n x: horiz ? !isBand && 4 : 10,\n verticalAlign: !horiz && isBand ? 'middle' : void 0,\n y: horiz ? isBand ? 16 : 10 : isBand ? 6 : -4,\n rotation: horiz && !isBand ? 90 : 0,\n ...(isBand ? { inside: true } : {})\n }, optionsLabel);\n this.renderLabel(optionsLabel, path, isBand, zIndex);\n // Move out of sight\n }\n else if (label) {\n label.hide();\n }\n // Chainable\n return this;\n }\n /**\n * Render and align label for plot line or band.\n * @internal\n * @function Highcharts.PlotLineOrBand#renderLabel\n */\n renderLabel(optionsLabel, path, isBand, zIndex) {\n const plotLine = this, axis = plotLine.axis, renderer = axis.chart.renderer, inside = optionsLabel.inside;\n let label = plotLine.label;\n // Add the SVG element\n if (!label) {\n /**\n * SVG element of the label.\n *\n * @name Highcharts.PlotLineOrBand#label\n * @type {Highcharts.SVGElement}\n */\n plotLine.label = label = renderer\n .text(this.getLabelText(optionsLabel), 0, 0, optionsLabel.useHTML)\n .attr({\n align: optionsLabel.textAlign || optionsLabel.align,\n rotation: optionsLabel.rotation,\n 'class': 'highcharts-plot-' + (isBand ? 'band' : 'line') +\n '-label ' + (optionsLabel.className || ''),\n zIndex\n });\n if (!axis.chart.styledMode) {\n label.css(merge({\n // To allow theming, and in lack of a general place to set\n // default options for plot lines and bands, default to the\n // title color. If we expose the palette, we should use that\n // instead.\n color: axis.chart.options.title?.style?.color,\n fontSize: '0.8em',\n textOverflow: (isBand && !inside) ? '' : 'ellipsis'\n }, optionsLabel.style));\n }\n label.add();\n }\n // Get the bounding box and align the label\n // #3000 changed to better handle choice between plotband or plotline\n const xBounds = path.xBounds ||\n [path[0][1], path[1][1], (isBand ? path[2][1] : path[0][1])], yBounds = path.yBounds ||\n [path[0][2], path[1][2], (isBand ? path[2][2] : path[0][2])], x = arrayMin(xBounds), y = arrayMin(yBounds), bBoxWidth = arrayMax(xBounds) - x;\n label.align(optionsLabel, false, {\n x,\n y,\n width: bBoxWidth,\n height: arrayMax(yBounds) - y\n });\n label.alignAttr.y -= renderer.fontMetrics(label).b;\n if (!label.alignValue ||\n label.alignValue === 'left' ||\n defined(inside)) {\n label.css({\n width: (optionsLabel.style?.width || ((!isBand ||\n !inside) ? (label.rotation === 90 ?\n axis.height - (label.alignAttr.y -\n axis.top) : (optionsLabel.clip ?\n (axis.width + axis.left) :\n axis.chart.chartWidth) - label.alignAttr.x) :\n bBoxWidth)) + 'px'\n });\n }\n label.show(true);\n }\n /**\n * Get label's text content.\n * @internal\n * @function Highcharts.PlotLineOrBand#getLabelText\n */\n getLabelText(optionsLabel) {\n return defined(optionsLabel.formatter) ?\n optionsLabel.formatter.call(this, this) :\n optionsLabel.text;\n }\n /**\n * Remove the plot line or band.\n *\n * @function Highcharts.PlotLineOrBand#destroy\n */\n destroy() {\n // Remove it from the lookup\n erase(this.axis.plotLinesAndBands, this);\n delete this.axis;\n destroyObjectProperties(this);\n }\n}\n/* *\n *\n * Default Export\n *\n * */\nexport default PlotLineOrBand;\n/* *\n *\n * API Options\n *\n * */\n/**\n * Options for plot bands on axes.\n *\n * @typedef {Highcharts.XAxisPlotBandsOptions|Highcharts.YAxisPlotBandsOptions|Highcharts.ZAxisPlotBandsOptions} Highcharts.AxisPlotBandsOptions\n */\n/**\n * Options for plot band labels on axes.\n *\n * @typedef {Highcharts.XAxisPlotBandsLabelOptions|Highcharts.YAxisPlotBandsLabelOptions|Highcharts.ZAxisPlotBandsLabelOptions} Highcharts.AxisPlotBandsLabelOptions\n */\n/**\n * Options for plot lines on axes.\n *\n * @typedef {Highcharts.XAxisPlotLinesOptions|Highcharts.YAxisPlotLinesOptions|Highcharts.ZAxisPlotLinesOptions} Highcharts.AxisPlotLinesOptions\n */\n/**\n * Options for plot line labels on axes.\n *\n * @typedef {Highcharts.XAxisPlotLinesLabelOptions|Highcharts.YAxisPlotLinesLabelOptions|Highcharts.ZAxisPlotLinesLabelOptions} Highcharts.AxisPlotLinesLabelOptions\n */\n('');\n/* *\n *\n * API Options\n *\n * */\n/**\n * An array of colored bands stretching across the plot area marking an\n * interval on the axis.\n *\n * In styled mode, the plot bands are styled by the `.highcharts-plot-band`\n * class in addition to the `className` option.\n *\n * @productdesc {highcharts}\n * In a gauge, a plot band on the Y axis (value axis) will stretch along the\n * perimeter of the gauge.\n *\n * @type {Array<*>}\n * @product highcharts highstock gantt\n * @apioption xAxis.plotBands\n */\n/**\n * Flag to decide if plotBand should be rendered across all panes.\n *\n * @since 7.1.2\n * @product highstock\n * @type {boolean}\n * @default true\n * @apioption xAxis.plotBands.acrossPanes\n */\n/**\n * Border color for the plot band. Also requires `borderWidth` to be set.\n *\n * @type {Highcharts.ColorString}\n * @apioption xAxis.plotBands.borderColor\n */\n/**\n * Border radius for the plot band. Applies only to gauges. Can be a pixel\n * value or a percentage, for example `50%`.\n *\n * @type {number|string|Highcharts.BorderRadiusOptionsObject}\n * @since 11.4.2\n * @sample {highcharts} highcharts/xaxis/plotbands-gauge-borderradius\n * Angular gauge with rounded plot bands\n * @apioption xAxis.plotBands.borderRadius\n */\n/**\n * Border width for the plot band. Also requires `borderColor` to be set.\n *\n * @type {number}\n * @default 0\n * @apioption xAxis.plotBands.borderWidth\n */\n/**\n * A custom class name, in addition to the default `highcharts-plot-band`,\n * to apply to each individual band.\n *\n * @type {string}\n * @since 5.0.0\n * @apioption xAxis.plotBands.className\n */\n/**\n * The color of the plot band.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-color/\n * Color band\n * @sample {highstock} stock/xaxis/plotbands/\n * Plot band on Y axis\n *\n * @type {Highcharts.ColorType}\n * @default var(--highcharts-highlight-color-10)\n * @apioption xAxis.plotBands.color\n */\n/**\n * An object defining mouse events for the plot band. Supported properties\n * are `click`, `mouseover`, `mouseout`, `mousemove`.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-events/\n * Mouse events demonstrated\n *\n * @since 1.2\n * @apioption xAxis.plotBands.events\n */\n/**\n * Click event on a plot band.\n *\n * @type {Highcharts.EventCallbackFunction<Highcharts.PlotLineOrBand>}\n * @apioption xAxis.plotBands.events.click\n */\n/**\n * Mouse move event on a plot band.\n *\n * @type {Highcharts.EventCallbackFunction<Highcharts.PlotLineOrBand>}\n * @apioption xAxis.plotBands.events.mousemove\n */\n/**\n * Mouse out event on the corner of a plot band.\n *\n * @type {Highcharts.EventCallbackFunction<Highcharts.PlotLineOrBand>}\n * @apioption xAxis.plotBands.events.mouseout\n */\n/**\n * Mouse over event on a plot band.\n *\n * @type {Highcharts.EventCallbackFunction<Highcharts.PlotLineOrBand>}\n * @apioption xAxis.plotBands.events.mouseover\n */\n/**\n * The start position of the plot band in axis units.\n *\n * On datetime axes, the value can be given as a timestamp or a date string.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-color/\n * Datetime axis\n * @sample {highcharts} highcharts/xaxis/plotbands-from/\n * Categorized axis\n * @sample {highstock} stock/xaxis/plotbands/\n * Plot band on Y axis\n *\n * @type {number|string}\n * @apioption xAxis.plotBands.from\n */\n/**\n * An id used for identifying the plot band in Axis.removePlotBand.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-id/\n * Remove plot band by id\n * @sample {highstock} highcharts/xaxis/plotbands-id/\n * Remove plot band by id\n *\n * @type {string}\n * @apioption xAxis.plotBands.id\n */\n/**\n * The end position of the plot band in axis units.\n *\n * On datetime axes, the value can be given as a timestamp or a date string.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-color/\n * Datetime axis\n * @sample {highcharts} highcharts/xaxis/plotbands-from/\n * Categorized axis\n * @sample {highstock} stock/xaxis/plotbands/\n * Plot band on Y axis\n *\n * @type {number|string}\n * @apioption xAxis.plotBands.to\n */\n/**\n * The z index of the plot band within the chart, relative to other\n * elements. Using the same z index as another element may give\n * unpredictable results, as the last rendered element will be on top.\n * Values from 0 to 20 make sense.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-color/\n * Behind plot lines by default\n * @sample {highcharts} highcharts/xaxis/plotbands-zindex/\n * Above plot lines\n * @sample {highcharts} highcharts/xaxis/plotbands-zindex-above-series/\n * Above plot lines and series\n *\n * @type {number}\n * @since 1.2\n * @apioption xAxis.plotBands.zIndex\n */\n/**\n * Text labels for the plot bands\n *\n * @product highcharts highstock gantt\n * @apioption xAxis.plotBands.label\n */\n/**\n * Horizontal alignment of the label. Can be one of \"left\", \"center\" or\n * \"right\".\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-label-align/\n * Aligned to the right\n * @sample {highstock} stock/xaxis/plotbands-label/\n * Plot band with labels\n *\n * @type {Highcharts.AlignValue}\n * @default center\n * @since 2.1\n * @apioption xAxis.plotBands.label.align\n */\n/**\n * Whether or not the label can be hidden if it overlaps with another label.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-label-allowoverlap/\n * A Plotband label overlapping another\n *\n * @type {boolean}\n * @default undefined\n * @since 11.4.8\n * @apioption xAxis.plotBands.label.allowOverlap\n */\n/**\n * Wether or not the text of the label can exceed the width of the label.\n *\n * @type {boolean}\n * @product highcharts highstock gantt\n * @sample {highcharts} highcharts/xaxis/plotbands-label-textwidth/\n * Displaying text with text-wrapping/ellipsis, or the full text.\n *\n * @default true\n * @since 11.4.6\n * @apioption xAxis.plotBands.label.inside\n */\n/**\n * Rotation of the text label in degrees .\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-label-rotation/\n * Vertical text\n *\n * @type {number}\n * @default 0\n * @since 2.1\n * @apioption xAxis.plotBands.label.rotation\n */\n/**\n * CSS styles for the text label.\n *\n * In styled mode, the labels are styled by the\n * `.highcharts-plot-band-label` class.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-label-style/\n * Blue and bold label\n *\n * @type {Highcharts.CSSObject}\n * @since 2.1\n * @apioption xAxis.plotBands.label.style\n */\n/**\n * The string text itself. A subset of HTML is supported.\n *\n * @type {string}\n * @since 2.1\n * @apioption xAxis.plotBands.label.text\n */\n/**\n * The text alignment for the label. While `align` determines where the\n * texts anchor point is placed within the plot band, `textAlign` determines\n * how the text is aligned against its anchor point. Possible values are\n * \"left\", \"center\" and \"right\". Defaults to the same as the `align` option.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-label-rotation/\n * Vertical text in center position but text-aligned left\n *\n * @type {Highcharts.AlignValue}\n * @since 2.1\n * @apioption xAxis.plotBands.label.textAlign\n */\n/**\n * Whether to [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the labels.\n *\n * @type {boolean}\n * @default false\n * @since 3.0.3\n * @apioption xAxis.plotBands.label.useHTML\n */\n/**\n * Vertical alignment of the label relative to the plot band. Can be one of\n * \"top\", \"middle\" or \"bottom\".\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-label-verticalalign/\n * Vertically centered label\n * @sample {highstock} stock/xaxis/plotbands-label/\n * Plot band with labels\n *\n * @type {Highcharts.VerticalAlignValue}\n * @default top\n * @since 2.1\n * @apioption xAxis.plotBands.label.verticalAlign\n */\n/**\n * Horizontal position relative the alignment. Default varies by\n * orientation.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-label-align/\n * Aligned 10px from the right edge\n * @sample {highstock} stock/xaxis/plotbands-label/\n * Plot band with labels\n *\n * @type {number}\n * @since 2.1\n * @apioption xAxis.plotBands.label.x\n */\n/**\n * Vertical position of the text baseline relative to the alignment. Default\n * varies by orientation.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-label-y/\n * Label on x axis\n * @sample {highstock} stock/xaxis/plotbands-label/\n * Plot band with labels\n *\n * @type {number}\n * @since 2.1\n * @apioption xAxis.plotBands.label.y\n */\n/**\n * An array of lines stretching across the plot area, marking a specific\n * value on one of the axes.\n *\n * In styled mode, the plot lines are styled by the\n * `.highcharts-plot-line` class in addition to the `className` option.\n *\n * @type {Array<*>}\n * @product highcharts highstock gantt\n * @sample {highcharts} highcharts/xaxis/plotlines-color/\n * Basic plot line\n * @sample {highcharts} highcharts/series-solidgauge/labels-auto-aligned/\n * Solid gauge plot line\n * @apioption xAxis.plotLines\n */\n/**\n * Flag to decide if plotLine should be rendered across all panes.\n *\n * @sample {highstock} stock/xaxis/plotlines-acrosspanes/\n * Plot lines on different panes\n *\n * @since 7.1.2\n * @product highstock\n * @type {boolean}\n * @default true\n * @apioption xAxis.plotLines.acrossPanes\n */\n/**\n * A custom class name, in addition to the default `highcharts-plot-line`,\n * to apply to each individual line.\n *\n * @type {string}\n * @since 5.0.0\n * @apioption xAxis.plotLines.className\n */\n/**\n * The color of the line.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-color/\n * A red line from X axis\n * @sample {highstock} stock/xaxis/plotlines/\n * Plot line on Y axis\n *\n * @type {Highcharts.ColorString}\n * @default var(--highcharts-neutral-color-40)\n * @apioption xAxis.plotLines.color\n */\n/**\n * The dashing or dot style for the plot line. For possible values see\n * [this overview](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-dashstyle-all/).\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-dashstyle/\n * Dash and dot pattern\n * @sample {highstock} stock/xaxis/plotlines/\n * Plot line on Y axis\n *\n * @type {Highcharts.DashStyleValue}\n * @default Solid\n * @since 1.2\n * @apioption xAxis.plotLines.dashStyle\n */\n/**\n * An object defining mouse events for the plot line. Supported\n * properties are `click`, `mouseover`, `mouseout`, `mousemove`.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-events/\n * Mouse events demonstrated\n *\n * @since 1.2\n * @apioption xAxis.plotLines.events\n */\n/**\n * Click event on a plot band.\n *\n * @type {Highcharts.EventCallbackFunction<Highcharts.PlotLineOrBand>}\n * @apioption xAxis.plotLines.events.click\n */\n/**\n * Mouse move event on a plot band.\n *\n * @type {Highcharts.EventCallbackFunction<Highcharts.PlotLineOrBand>}\n * @apioption xAxis.plotLines.events.mousemove\n */\n/**\n * Mouse out event on the corner of a plot band.\n *\n * @type {Highcharts.EventCallbackFunction<Highcharts.PlotLineOrBand>}\n * @apioption xAxis.plotLines.events.mouseout\n */\n/**\n * Mouse over event on a plot band.\n *\n * @type {Highcharts.EventCallbackFunction<Highcharts.PlotLineOrBand>}\n * @apioption xAxis.plotLines.events.mouseover\n */\n/**\n * An id used for identifying the plot line in Axis.removePlotLine.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-id/\n * Remove plot line by id\n *\n * @type {string}\n * @apioption xAxis.plotLines.id\n */\n/**\n * The position of the line in axis units.\n *\n * On datetime axes, the value can be given as a timestamp or a date string.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-color/\n * Between two categories on X axis\n * @sample {highstock} stock/xaxis/plotlines/\n * Plot line on Y axis\n *\n * @type {number|string}\n * @apioption xAxis.plotLines.value\n */\n/**\n * The width or thickness of the plot line.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-color/\n * 2px wide line from X axis\n * @sample {highstock} stock/xaxis/plotlines/\n * Plot line on Y axis\n *\n * @type {number}\n * @default 2\n * @apioption xAxis.plotLines.width\n */\n/**\n * The z index of the plot line within the chart.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-zindex-behind/\n * Behind plot lines by default\n * @sample {highcharts} highcharts/xaxis/plotlines-zindex-above/\n * Above plot lines\n * @sample {highcharts} highcharts/xaxis/plotlines-zindex-above-all/\n * Above plot lines and series\n *\n * @type {number}\n * @since 1.2\n * @apioption xAxis.plotLines.zIndex\n */\n/**\n * Text labels for the plot lines\n *\n * @apioption xAxis.plotLines.label\n */\n/**\n * Horizontal alignment of the label. Can be one of \"left\", \"center\" or\n * \"right\".\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-label-align-right/\n * Aligned to the right\n * @sample {highstock} stock/xaxis/plotlines/\n * Plot line on Y axis\n *\n * @type {Highcharts.AlignValue}\n * @default left\n * @since 2.1\n * @apioption xAxis.plotLines.label.align\n */\n/**\n * Whether or not the label can be hidden if it overlaps with another label.\n *\n * @type {boolean}\n * @default undefined\n * @since 11.4.8\n * @apioption xAxis.plotBands.label.allowOverlap\n */\n/**\n * Whether to hide labels that are outside the plot area.\n *\n * @type {boolean}\n * @default false\n * @since 10.3.3\n * @apioption xAxis.plotLines.labels.clip\n */\n/**\n * Callback JavaScript function to format the label. Useful properties like\n * the value of plot line or the range of plot band (`from` & `to`\n * properties) can be found in `this.options` object. Since v12.6.0, the\n * callback also receives `ctx` as the first argument, so that arrow functions\n * can access the same context as regular functions using `this`.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-plotbands-label-formatter\n * Label formatters for plot line and plot band.\n * @type {Highcharts.FormatterCallbackFunction<Highcharts.PlotLineOrBand>}\n * @apioption xAxis.plotLines.label.formatter\n */\n/**\n * Rotation of the text label in degrees. Defaults to 0 for horizontal plot\n * lines and 90 for vertical lines.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-label-verticalalign-middle/\n * Slanted text\n *\n * @type {number}\n * @since 2.1\n * @apioption xAxis.plotLines.label.rotation\n */\n/**\n * CSS styles for the text label.\n *\n * In styled mode, the labels are styled by the\n * `.highcharts-plot-line-label` class.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-label-style/\n * Blue and bold label\n *\n * @type {Highcharts.CSSObject}\n * @since 2.1\n * @apioption xAxis.plotLines.label.style\n */\n/**\n * The text itself. A subset of HTML is supported.\n *\n * @type {string}\n * @since 2.1\n * @apioption xAxis.plotLines.label.text\n */\n/**\n * The text alignment for the label. While `align` determines where the\n * texts anchor point is placed within the plot band, `textAlign` determines\n * how the text is aligned against its anchor point. Possible values are\n * \"left\", \"center\" and \"right\". Defaults to the same as the `align` option.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-label-textalign/\n * Text label in bottom position\n *\n * @type {Highcharts.AlignValue}\n * @since 2.1\n * @apioption xAxis.plotLines.label.textAlign\n */\n/**\n * Whether to [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the labels.\n *\n * @type {boolean}\n * @default false\n * @since 3.0.3\n * @apioption xAxis.plotLines.label.useHTML\n */\n/**\n * Vertical alignment of the label relative to the plot line. Can be\n * one of \"top\", \"middle\" or \"bottom\".\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-label-verticalalign-middle/\n * Vertically centered label\n *\n * @type {Highcharts.VerticalAlignValue}\n * @default {highcharts} top\n * @default {highstock} top\n * @since 2.1\n * @apioption xAxis.plotLines.label.verticalAlign\n */\n/**\n * Horizontal position relative the alignment. Default varies by\n * orientation.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-label-align-right/\n * Aligned 10px from the right edge\n * @sample {highstock} stock/xaxis/plotlines/\n * Plot line on Y axis\n *\n * @type {number}\n * @since 2.1\n * @apioption xAxis.plotLines.label.x\n */\n/**\n * Vertical position of the text baseline relative to the alignment. Default\n * varies by orientation.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-label-y/\n * Label below the plot line\n * @sample {highstock} stock/xaxis/plotlines/\n * Plot line on Y axis\n *\n * @type {number}\n * @since 2.1\n * @apioption xAxis.plotLines.label.y\n */\n/**\n * @type {Array<*>}\n * @extends xAxis.plotBands\n * @apioption yAxis.plotBands\n */\n/**\n * In a gauge chart, this option determines the inner radius of the\n * plot band that stretches along the perimeter. It can be given as\n * a percentage string, like `\"100%\"`, or as a pixel number, like `100`.\n * By default, the inner radius is controlled by the [thickness](\n * #yAxis.plotBands.thickness) option.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-gauge\n * Gauge plot band\n *\n * @type {number|string}\n * @since 2.3\n * @product highcharts\n * @apioption yAxis.plotBands.innerRadius\n */\n/**\n * In a gauge chart, this option determines the outer radius of the\n * plot band that stretches along the perimeter. It can be given as\n * a percentage string, like `\"100%\"`, or as a pixel number, like `100`.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-gauge\n * Gauge plot band\n *\n * @type {number|string}\n * @default 100%\n * @since 2.3\n * @product highcharts\n * @apioption yAxis.plotBands.outerRadius\n */\n/**\n * In a gauge chart, this option sets the width of the plot band stretching\n * along the perimeter. It can be given as a percentage string, like `'10%'`, or\n * as a pixel number, like `10`. If `undefined`, the plot band fills out the\n * range between `pane.size` and `pane.innerSize`.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-gauge Gauge plot band\n *\n * @type {number|string}\n * @since 2.3\n * @product highcharts\n * @apioption yAxis.plotBands.thickness\n */\n/**\n * @type {Array<*>}\n * @extends xAxis.plotLines\n * @apioption yAxis.plotLines\n */\n(''); // Keeps doclets above in JS file\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport A from './Animation/AnimationUtilities.js';\nconst { animObject } = A;\nimport F from './Templating.js';\nconst { format } = F;\nimport H from './Globals.js';\nconst { composed, dateFormats, doc, isSafari } = H;\nimport R from './Renderer/RendererUtilities.js';\nconst { distribute } = R;\nimport SVGRenderer from './Renderer/SVG/SVGRenderer.js';\nimport { addEvent, clamp, css, discardElement, extend, fireEvent, getAlignFactor, internalClearTimeout, isArray, isNumber, isObject, isString, merge, pick, pushUnique, splat, syncTimeout } from '../Shared/Utilities.js';\n/**\n * Clear all timeouts for showing and hiding the tooltip.\n *\n * @internal\n */\nconst clearTimeouts = (tooltip) => {\n clearTimeout(tooltip.hideTimer);\n clearTimeout(tooltip.showTimer);\n};\n/* *\n *\n * Class\n *\n * */\n/* eslint-disable no-invalid-this, valid-jsdoc */\n/**\n * Tooltip of a chart.\n *\n * @class\n * @name Highcharts.Tooltip\n *\n * @param {Highcharts.Chart} chart\n * The chart instance.\n *\n * @param {Highcharts.TooltipOptions} options\n * Tooltip options.\n *\n * @param {Highcharts.Pointer} pointer\n * The pointer instance.\n */\nclass Tooltip {\n /* *\n *\n * Constructors\n *\n * */\n constructor(chart, options, pointer) {\n /* *\n *\n * Properties\n *\n * */\n this.allowShared = true;\n /**\n * List of crosshairs.\n *\n * @internal\n * @readonly\n * @name Highcharts.Tooltip#crosshairs\n * @type {Array<null>}\n */\n this.crosshairs = [];\n this.distance = 0;\n /**\n * Tooltips are initially hidden.\n *\n * @internal\n * @readonly\n * @name Highcharts.Tooltip#isHidden\n * @type {boolean}\n */\n this.isHidden = true;\n this.isSticky = false;\n /**\n * Used tooltip options.\n *\n * @readonly\n * @name Highcharts.Tooltip#options\n * @type {Highcharts.TooltipOptions}\n */\n this.options = {};\n /**\n * Whether to allow the tooltip to render outside the chart's SVG\n * element box. By default (false), the tooltip is rendered within the\n * chart's SVG element, which results in the tooltip being aligned\n * inside the chart area.\n *\n * @readonly\n * @name Highcharts.Tooltip#outside\n * @type {boolean}\n *\n * @todo\n * Split tooltip does not support outside in the first iteration. Should\n * not be too complicated to implement.\n */\n this.outside = false;\n this.chart = chart;\n this.init(chart, options);\n this.pointer = pointer;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Build the body (lines) of the tooltip by iterating over the items and\n * returning one entry for each item, abstracting this functionality allows\n * to easily overwrite and extend it.\n *\n * @internal\n * @function Highcharts.Tooltip#bodyFormatter\n */\n bodyFormatter(points) {\n return points.map((point) => {\n const tooltipOptions = point.series.tooltipOptions, formatPrefix = point.formatPrefix || 'point';\n return (tooltipOptions[formatPrefix + 'Formatter'] ||\n point.tooltipFormatter).call(point, tooltipOptions[formatPrefix + 'Format'] || '', point);\n });\n }\n /**\n * Destroy the single tooltips in a split tooltip.\n * If the tooltip is active then it is not destroyed, unless forced to.\n *\n * @internal\n * @function Highcharts.Tooltip#cleanSplit\n *\n * @param {boolean} [force]\n * Force destroy all tooltips.\n */\n cleanSplit(force) {\n this.chart.series.forEach(function (series) {\n const tt = series?.tt;\n if (tt) {\n if (!tt.isActive || force) {\n series.tt = tt.destroy();\n }\n else {\n tt.isActive = false;\n }\n }\n });\n }\n /**\n * In case no user defined formatter is given, this will be used. Note that\n * the context here is an object holding point, series, x, y etc.\n *\n * @function Highcharts.Tooltip#defaultFormatter\n *\n * @param {Highcharts.Tooltip} tooltip The tooltip instance.\n *\n * @return {string|Array<string>}\n * Returns a string (single tooltip and shared)\n * or an array of strings (split tooltip)\n */\n defaultFormatter(tooltip) {\n const hoverPoints = this.points || splat(this);\n let s;\n // Build the header\n s = [tooltip.headerFooterFormatter(hoverPoints[0])];\n // Build the values\n s = s.concat(tooltip.bodyFormatter(hoverPoints));\n // Footer\n s.push(tooltip.headerFooterFormatter(hoverPoints[0], true));\n return s;\n }\n /**\n * Removes and destroys the tooltip and its elements.\n *\n * @function Highcharts.Tooltip#destroy\n */\n destroy() {\n // Destroy and clear local variables\n if (this.label) {\n this.label = this.label.destroy();\n }\n if (this.split) {\n this.cleanSplit(true);\n if (this.tt) {\n this.tt = this.tt.destroy();\n }\n }\n if (this.renderer) {\n this.renderer = this.renderer.destroy();\n discardElement(this.container);\n }\n internalClearTimeout(this.hideTimer);\n clearTimeouts(this);\n }\n /**\n * Extendable method to get the anchor position of the tooltip\n * from a point or set of points\n *\n * @internal\n * @function Highcharts.Tooltip#getAnchor\n */\n getAnchor(points, mouseEvent) {\n const { chart, pointer } = this, inverted = chart.inverted, plotTop = chart.plotTop, plotLeft = chart.plotLeft;\n let ret;\n points = splat(points);\n // If reversedStacks are false the tooltip position should be taken from\n // the last point (#17948)\n if (points[0].series?.yAxis &&\n !points[0].series.yAxis.options.reversedStacks) {\n points = points.slice().reverse();\n }\n // When tooltip follows mouse, relate the position to the mouse\n if (this.followPointer && mouseEvent) {\n if (typeof mouseEvent.chartX === 'undefined') {\n mouseEvent = pointer.normalize(mouseEvent);\n }\n ret = [\n mouseEvent.chartX - plotLeft,\n mouseEvent.chartY - plotTop\n ];\n // Some series types use a specifically calculated tooltip position for\n // each point\n }\n else if (points[0].tooltipPos) {\n ret = points[0].tooltipPos;\n // Calculate the average position and adjust for axis positions\n }\n else {\n let chartX = 0, chartY = 0;\n points.forEach(function (point) {\n const pos = point.pos(true);\n if (pos) {\n chartX += pos[0];\n chartY += pos[1];\n }\n });\n chartX /= points.length;\n chartY /= points.length;\n // When shared, place the tooltip next to the mouse (#424)\n if (this.shared && points.length > 1 && mouseEvent) {\n if (inverted) {\n chartX = mouseEvent.chartX;\n }\n else {\n chartY = mouseEvent.chartY;\n }\n }\n // Use the average position for multiple points\n ret = [chartX - plotLeft, chartY - plotTop];\n }\n const params = { point: points[0], ret };\n fireEvent(this, 'getAnchor', params);\n return params.ret.map(Math.round);\n }\n /**\n * Get the CSS class names for the tooltip's label. Styles the label\n * by `colorIndex` or user-defined CSS.\n *\n * @function Highcharts.Tooltip#getClassName\n *\n * @return {string}\n * The class names.\n */\n getClassName(point, isSplit, isHeader) {\n const options = this.options, series = point.series, seriesOptions = series.options;\n return [\n options.className,\n 'highcharts-label',\n isHeader && 'highcharts-tooltip-header',\n isSplit ? 'highcharts-tooltip-box' : 'highcharts-tooltip',\n !isHeader && 'highcharts-color-' + pick(point.colorIndex, series.colorIndex),\n seriesOptions?.className\n ].filter(isString).join(' ');\n }\n /**\n * Creates the Tooltip label element if it does not exist, then returns it.\n *\n * @function Highcharts.Tooltip#getLabel\n *\n * @return {Highcharts.SVGElement}\n * Tooltip label\n */\n getLabel({ anchorX, anchorY } = { anchorX: 0, anchorY: 0 }) {\n const tooltip = this, styledMode = this.chart.styledMode, options = this.options, doSplit = this.split && this.allowShared;\n let container = this.container, renderer = this.chart.renderer;\n // If changing from a split tooltip to a non-split tooltip, we must\n // destroy it in order to get the SVG right. #13868.\n if (this.label) {\n const wasSplit = !this.label.hasClass('highcharts-label');\n if ((!doSplit && wasSplit) || (doSplit && !wasSplit)) {\n this.destroy();\n }\n }\n if (!this.label) {\n if (this.outside) {\n const chart = this.chart, chartStyle = chart.options.chart.style;\n /**\n * Reference to the tooltip's container, when\n * [Highcharts.Tooltip#outside] is set to true, otherwise\n * it's undefined.\n *\n * @name Highcharts.Tooltip#container\n * @type {Highcharts.HTMLDOMElement|undefined}\n */\n this.container = container = H.doc.createElement('div');\n container.className = ('highcharts-container ' +\n 'highcharts-tooltip-container ' +\n (chart.renderTo.className.match(/(highcharts[a-zA-Z0-9-]+)\\s?/gm) || [].join(' ')));\n // For picking up the specific palette\n container.dataset['highchartsChart'] = chart.index.toString();\n // We need to set pointerEvents = 'none' as otherwise it makes\n // the area under the tooltip non-hoverable even after the\n // tooltip disappears, #19035.\n css(container, {\n position: 'absolute',\n top: '1px',\n pointerEvents: 'none',\n zIndex: Math.max(options.style.zIndex || 0, (chartStyle?.zIndex || 0) + 3)\n });\n /**\n * Reference to the tooltip's renderer, when\n * [Highcharts.Tooltip#outside] is set to true, otherwise\n * it's undefined.\n *\n * @name Highcharts.Tooltip#renderer\n * @type {Highcharts.SVGRenderer|undefined}\n */\n this.renderer = renderer = new SVGRenderer(container, 0, 0, chartStyle, void 0, void 0, renderer.styledMode);\n }\n // Create the label\n if (doSplit) {\n this.label = renderer.g('tooltip');\n }\n else {\n this.label = renderer\n .label('', anchorX, anchorY, options.shape || 'callout', void 0, void 0, options.useHTML, void 0, 'tooltip')\n .attr({\n padding: options.padding,\n r: options.borderRadius\n });\n if (!styledMode) {\n this.label\n .attr({\n fill: options.backgroundColor,\n 'stroke-width': options.borderWidth ??\n +!options.fixed\n })\n // #2301, #2657\n .css(options.style)\n .css({\n pointerEvents: (options.style.pointerEvents ||\n (this.shouldStickOnContact() ? 'auto' : 'none'))\n });\n }\n }\n // Split tooltip use updateTooltipContainer to position the tooltip\n // container.\n if (tooltip.outside) {\n const label = this.label;\n [label.xSetter, label.ySetter].forEach((setter, i) => {\n label[i ? 'ySetter' : 'xSetter'] = (value) => {\n setter.call(label, tooltip.distance);\n label[i ? 'y' : 'x'] = value;\n if (container) {\n container.style[i ? 'top' : 'left'] = `${value}px`;\n }\n };\n });\n }\n this.label\n .attr({ zIndex: 8 })\n .shadow(options.shadow ?? !options.fixed)\n .add();\n }\n if (container && !container.parentElement) {\n H.doc.body.appendChild(container);\n }\n return this.label;\n }\n /**\n * Get the total area available area to place the tooltip\n *\n * @internal\n */\n getPlayingField() {\n const { body, documentElement } = doc, { chart, distance, outside } = this;\n return {\n width: outside ?\n // Subtract distance to prevent scrollbars\n Math.max(body.scrollWidth, documentElement.scrollWidth, body.offsetWidth, documentElement.offsetWidth, documentElement.clientWidth) - (2 * distance) - 2 :\n chart.chartWidth,\n height: outside ?\n Math.max(body.scrollHeight, documentElement.scrollHeight, body.offsetHeight, documentElement.offsetHeight, documentElement.clientHeight) :\n chart.chartHeight\n };\n }\n /**\n * Place the tooltip in a chart without spilling over and not covering the\n * point itself.\n *\n * @function Highcharts.Tooltip#getPosition\n *\n * @param {number} boxWidth\n * Width of the tooltip box.\n *\n * @param {number} boxHeight\n * Height of the tooltip box.\n *\n * @param {Highcharts.Point} point\n * Tooltip related point.\n *\n * @return {Highcharts.PositionObject}\n * Recommended position of the tooltip.\n */\n getPosition(boxWidth, boxHeight, point) {\n const { distance, chart, outside, pointer } = this, { inverted, plotLeft, plotTop, polar } = chart, { plotX = 0, plotY = 0 } = point, ret = {}, \n // Don't use h if chart isn't inverted (#7242) ???\n h = (inverted && point.h) || 0, // #4117 ?\n { height: outerHeight, width: outerWidth } = this.getPlayingField(), chartPosition = pointer.getChartPosition(), scaleX = (val) => (val * chartPosition.scaleX), scaleY = (val) => (val * chartPosition.scaleY), \n // Build parameter arrays for firstDimension()/secondDimension()\n buildDimensionArray = (dim) => {\n const isX = dim === 'x';\n return [\n dim, // Dimension - x or y\n isX ? outerWidth : outerHeight,\n isX ? boxWidth : boxHeight\n ].concat(outside ? [\n // If we are using tooltip.outside, we need to scale the\n // position to match scaling of the container in case there\n // is a transform/zoom on the container. #11329\n isX ? scaleX(boxWidth) : scaleY(boxHeight),\n isX ? chartPosition.left - distance +\n scaleX(plotX + plotLeft) :\n chartPosition.top - distance +\n scaleY(plotY + plotTop),\n 0,\n isX ? outerWidth : outerHeight\n ] : [\n // Not outside, no scaling is needed\n isX ? boxWidth : boxHeight,\n isX ? plotX + plotLeft : plotY + plotTop,\n isX ? plotLeft : plotTop,\n isX ? plotLeft + chart.plotWidth :\n plotTop + chart.plotHeight\n ]);\n };\n let first = buildDimensionArray('y'), second = buildDimensionArray('x'), swapped;\n // Handle negative points or reversed axis (#13780)\n let flipped = !!point.negative;\n if (!polar &&\n chart.hoverSeries?.yAxis?.reversed) {\n flipped = !flipped;\n }\n // The far side is right or bottom\n const preferFarSide = !this.followPointer &&\n pick(point.ttBelow, polar ? false : !inverted === flipped), // #4984\n /*\n * Handle the preferred dimension. When the preferred dimension is\n * tooltip on top or bottom of the point, it will look for space\n * there.\n *\n * @internal\n */\n firstDimension = function (dim, outerSize, innerSize, scaledInnerSize, // #11329\n point, min, max) {\n const scaledDist = outside ?\n (dim === 'y' ? scaleY(distance) : scaleX(distance)) :\n distance, scaleDiff = (innerSize - scaledInnerSize) / 2, roomLeft = scaledInnerSize < point - distance, roomRight = point + distance + scaledInnerSize < outerSize, alignedLeft = point - scaledDist - innerSize + scaleDiff, alignedRight = point + scaledDist - scaleDiff;\n if (preferFarSide && roomRight) {\n ret[dim] = alignedRight;\n }\n else if (!preferFarSide && roomLeft) {\n ret[dim] = alignedLeft;\n }\n else if (roomLeft) {\n ret[dim] = Math.min(max - scaledInnerSize, alignedLeft - h < 0 ? alignedLeft : alignedLeft - h);\n }\n else if (roomRight) {\n ret[dim] = Math.max(min, alignedRight + h + innerSize > outerSize ?\n alignedRight :\n alignedRight + h);\n }\n else {\n ret[dim] = 0;\n return false;\n }\n }, \n /*\n * Handle the secondary dimension. If the preferred dimension is\n * tooltip on top or bottom of the point, the second dimension is to\n * align the tooltip above the point, trying to align center but\n * allowing left or right align within the chart box.\n *\n * @internal\n */\n secondDimension = function (dim, outerSize, innerSize, scaledInnerSize, // #11329\n point) {\n // Too close to the edge, return false and swap dimensions\n if (point < distance || point > outerSize - distance) {\n return false;\n }\n // Align left/top\n if (point < innerSize / 2) {\n ret[dim] = 1;\n // Align right/bottom\n }\n else if (point > outerSize - scaledInnerSize / 2) {\n ret[dim] = outerSize - scaledInnerSize - 2;\n // Align center\n }\n else {\n ret[dim] = point - innerSize / 2;\n }\n }, \n /*\n * Swap the dimensions\n */\n swap = function (count) {\n [first, second] = [second, first];\n swapped = count;\n }, run = () => {\n if (firstDimension.apply(0, first) !== false) {\n if (secondDimension.apply(0, second) === false &&\n !swapped) {\n swap(true);\n run();\n }\n }\n else if (!swapped) {\n swap(true);\n run();\n }\n else {\n ret.x = ret.y = 0;\n }\n };\n // Under these conditions, prefer the tooltip on the side of the point\n if ((inverted && !polar) || this.len > 1) {\n swap();\n }\n run();\n if (outside) {\n ret.x -= chartPosition.left;\n ret.y -= chartPosition.top;\n }\n return ret;\n }\n /**\n * Place the tooltip when `position.fixed` is true. This is called both for\n * single tooltips, and for partial tooltips when `split`.\n *\n * @internal\n */\n getFixedPosition(boxWidth, boxHeight, point) {\n const series = point.series, { chart, options, split } = this, position = options.position, relativeToOption = position.relativeTo, noPane = options.shared || series?.yAxis?.isRadial &&\n (relativeToOption === 'pane' || !relativeToOption), relativeTo = noPane ? 'plotBox' : relativeToOption, bounds = relativeTo === 'chart' ?\n chart.renderer :\n chart[relativeTo] ||\n chart.getClipBox(series, true);\n return {\n x: bounds.x + (bounds.width - boxWidth) *\n getAlignFactor(position.align) +\n position.x,\n y: bounds.y + (bounds.height - boxHeight) *\n getAlignFactor(position.verticalAlign) +\n (!split && position.y || 0)\n };\n }\n /**\n * Hides the tooltip with a fade out animation.\n *\n * @function Highcharts.Tooltip#hide\n *\n * @param {number} [delay]\n * The fade out in milliseconds. If no value is provided the value\n * of the tooltip.hideDelay option is used. A value of 0 disables\n * the fade out animation.\n */\n hide(delay) {\n const tooltip = this;\n // Disallow duplicate timers (#1728, #1766)\n clearTimeouts(this);\n delay = pick(delay, this.options.hideDelay);\n if (!this.isHidden) {\n this.hideTimer = syncTimeout(function () {\n const label = tooltip.getLabel();\n // If there is a delay, fade out with the default duration. If\n // the hideDelay is 0, we assume no animation is wanted, so we\n // pass 0 duration. #12994.\n tooltip.getLabel().animate({\n opacity: 0\n }, {\n duration: delay ? 150 : delay,\n complete: () => {\n // #3088, assuming we're only using this for tooltips\n label.hide();\n // Clear the container for outside tooltip (#18490)\n if (tooltip.container) {\n tooltip.container.remove();\n }\n }\n });\n tooltip.isHidden = true;\n }, delay);\n }\n }\n /**\n * Initialize tooltip.\n *\n * @internal\n * @function Highcharts.Tooltip#init\n *\n * @param {Highcharts.Chart} chart\n * The chart instance.\n *\n * @param {Highcharts.TooltipOptions} options\n * Tooltip options.\n */\n init(chart, options) {\n /**\n * Chart of the tooltip.\n *\n * @readonly\n * @name Highcharts.Tooltip#chart\n * @type {Highcharts.Chart}\n */\n this.chart = chart;\n /**\n * Used tooltip options.\n *\n * @readonly\n * @name Highcharts.Tooltip#options\n * @type {Highcharts.TooltipOptions}\n */\n this.options = options;\n /**\n * List of crosshairs.\n *\n * @internal\n * @readonly\n * @name Highcharts.Tooltip#crosshairs\n * @type {Array<null>}\n */\n this.crosshairs = [];\n /**\n * Tooltips are initially hidden.\n *\n * @internal\n * @readonly\n * @name Highcharts.Tooltip#isHidden\n * @type {boolean}\n */\n this.isHidden = true;\n /**\n * True, if the tooltip is split into one label per series, with the\n * header close to the axis.\n *\n * @readonly\n * @name Highcharts.Tooltip#split\n * @type {boolean|undefined}\n */\n this.split = options.split && !chart.inverted && !chart.polar;\n /**\n * When the tooltip is shared, the entire plot area will capture mouse\n * movement or touch events.\n *\n * @readonly\n * @name Highcharts.Tooltip#shared\n * @type {boolean|undefined}\n */\n this.shared = options.shared || this.split;\n /**\n * Whether to allow the tooltip to render outside the chart's SVG\n * element box. By default (false), the tooltip is rendered within the\n * chart's SVG element, which results in the tooltip being aligned\n * inside the chart area.\n *\n * @readonly\n * @name Highcharts.Tooltip#outside\n * @type {boolean}\n *\n * @todo\n * Split tooltip does not support outside in the first iteration. Should\n * not be too complicated to implement.\n */\n this.outside = pick(options.outside, Boolean(chart.scrollablePixelsX || chart.scrollablePixelsY));\n }\n shouldStickOnContact(pointerEvent) {\n return !!(!this.followPointer &&\n this.options.stickOnContact &&\n (!pointerEvent || this.pointer.inClass(pointerEvent.target, 'highcharts-tooltip')));\n }\n /**\n * Moves the tooltip with a soft animation to a new position.\n *\n * @internal\n * @function Highcharts.Tooltip#move\n *\n * @param {number} x\n *\n * @param {number} y\n *\n * @param {number} anchorX\n *\n * @param {number} anchorY\n */\n move(x, y, anchorX, anchorY) {\n const { followPointer, options } = this, animation = animObject(!followPointer &&\n !this.isHidden &&\n !options.fixed &&\n options.animation), skipAnchor = followPointer || (this.len || 0) > 1, attr = { x, y };\n if (!skipAnchor) {\n attr.anchorX = anchorX;\n attr.anchorY = anchorY;\n }\n else {\n // Clear anchor with NaN to prevent animation (#22295)\n attr.anchorX = attr.anchorY = NaN;\n }\n animation.step = () => this.drawTracker();\n this.getLabel().animate(attr, animation);\n }\n /**\n * Refresh the tooltip's text and position.\n *\n * @function Highcharts.Tooltip#refresh\n *\n * @param {Highcharts.Point|Array<Highcharts.Point>} pointOrPoints\n * Either a point or an array of points.\n *\n * @param {Highcharts.PointerEventObject} [mouseEvent]\n * Mouse event, that is responsible for the refresh and should be\n * used for the tooltip update.\n */\n refresh(pointOrPoints, mouseEvent) {\n const tooltip = this, { chart, options, pointer, shared } = this, points = splat(pointOrPoints), point = points[0], formatString = options.format, formatter = options.formatter || tooltip.defaultFormatter, styledMode = chart.styledMode;\n let wasShared = tooltip.allowShared;\n if (!options.enabled || !point.series) { // #16820\n return;\n }\n clearTimeouts(this);\n // A switch saying if this specific tooltip configuration allows shared\n // or split modes\n tooltip.allowShared = !(!isArray(pointOrPoints) &&\n pointOrPoints.series &&\n pointOrPoints.series.noSharedTooltip);\n wasShared = wasShared && !tooltip.allowShared;\n // Get the reference point coordinates (pie charts use tooltipPos)\n tooltip.followPointer = (!tooltip.split && point.series.tooltipOptions.followPointer);\n const anchor = tooltip.getAnchor(pointOrPoints, mouseEvent), x = anchor[0], y = anchor[1];\n // Shared tooltip, array is sent over\n if (shared && tooltip.allowShared) {\n pointer.applyInactiveState(points);\n // Now set hover state for the chosen ones:\n points.forEach((item) => item.setState('hover'));\n point.points = points;\n }\n this.len = points.length; // #6128\n const text = isString(formatString) ?\n format(formatString, point, chart) :\n formatter.call(point, tooltip, point);\n // Reset the preliminary circular references\n point.points = void 0;\n // Register the current series\n const currentSeries = point.series;\n this.distance = pick(currentSeries.tooltipOptions.distance, 16);\n // Update the inner HTML\n if (text === false) {\n this.hide();\n }\n else {\n this.showTimer = syncTimeout(() => {\n // Update text\n if (tooltip.split && tooltip.allowShared) { // #13868\n tooltip.renderSplit(text, points);\n }\n else {\n let checkX = x;\n let checkY = y;\n if (mouseEvent && pointer.isDirectTouch) {\n checkX = mouseEvent.chartX - chart.plotLeft;\n checkY = mouseEvent.chartY - chart.plotTop;\n }\n // #11493, #13095\n if (chart.polar ||\n currentSeries.options.clip === false ||\n points.some((p) => // #16004\n pointer.isDirectTouch || // ##17929\n p.series.shouldShowTooltip(checkX, checkY))) {\n const label = tooltip.getLabel(wasShared && tooltip.tt || {});\n // Prevent the tooltip from flowing over the chart box\n // (#6659)\n if (!options.style.width || styledMode) {\n label.css({\n // Subtract padding on both sides so the box\n // stays within the available space (#24104)\n width: (this.outside ?\n this.getPlayingField() :\n chart.spacingBox).width - 2 * options.padding + 'px'\n });\n }\n label.attr({\n // Add class before the label BBox calculation\n // (#21035)\n 'class': tooltip.getClassName(point),\n text: isArray(text) ?\n text.join('') :\n text\n });\n // When the length of the label has increased,\n // immediately update the x position to prevent\n // tooltip from flowing outside the viewport\n // during animation (#21371)\n if (this.outside) {\n label.attr({\n x: clamp(label.x || 0, 0, this.getPlayingField().width -\n (label.width || 0) -\n 1)\n });\n }\n if (!styledMode) {\n label.attr({\n stroke: (options.borderColor ||\n point.color ||\n currentSeries.color ||\n 'var(--highcharts-neutral-color-60)')\n });\n }\n tooltip.updatePosition({\n plotX: x,\n plotY: y,\n negative: point.negative,\n ttBelow: point.ttBelow,\n series: currentSeries,\n h: anchor[2] || 0\n });\n }\n else {\n tooltip.hide();\n return;\n }\n }\n // Show it\n if (tooltip.isHidden && tooltip.label) {\n tooltip.label.attr({\n opacity: 1\n }).show();\n }\n tooltip.isHidden = false;\n }, tooltip.isHidden ? options.showDelay || 0 : 0);\n }\n fireEvent(this, 'refresh');\n }\n /**\n * Render the split tooltip. Loops over each point's text and adds\n * a label next to the point, then uses the distribute function to\n * find best non-overlapping positions.\n *\n * @internal\n * @function Highcharts.Tooltip#renderSplit\n *\n * @param {string|Array<(boolean|string)>} labels\n *\n * @param {Array<Highcharts.Point>} points\n */\n renderSplit(labels, points) {\n const tooltip = this;\n const { chart, chart: { chartWidth, chartHeight, plotHeight, plotLeft, plotTop, scrollablePixelsY = 0, scrollablePixelsX, styledMode }, distance, options, options: { fixed, position, positioner }, pointer } = tooltip;\n const { scrollLeft = 0, scrollTop = 0 } = chart.scrollablePlotArea?.scrollingContainer || {};\n // The area which the tooltip should be limited to. Limit to scrollable\n // plot area if enabled, otherwise limit to the chart container. If\n // outside is true it should be the whole viewport\n const bounds = (tooltip.outside &&\n typeof scrollablePixelsX !== 'number') ?\n doc.documentElement.getBoundingClientRect() : {\n left: scrollLeft,\n right: scrollLeft + chartWidth,\n top: scrollTop,\n bottom: scrollTop + chartHeight\n };\n const tooltipLabel = tooltip.getLabel();\n const ren = this.renderer || chart.renderer;\n const headerTop = Boolean(chart.xAxis[0]?.opposite);\n const { left: chartLeft, top: chartTop } = pointer.getChartPosition();\n const hasFixedPosition = positioner || fixed;\n let distributionBoxTop = plotTop + scrollTop;\n let headerHeight = 0;\n let adjustedPlotHeight = plotHeight - scrollablePixelsY;\n /**\n * Calculates the anchor position for the partial tooltip\n *\n * @internal\n * @param {Highcharts.Point} point The point related to the tooltip\n * @return {Object} Returns an object with anchorX and anchorY\n */\n function getAnchor(point) {\n const { isHeader, plotX = 0, plotY = 0, series } = point;\n let anchorX;\n let anchorY;\n if (isHeader) {\n // Set anchorX to plotX\n anchorX = Math.max(plotLeft + plotX, plotLeft);\n // Set anchorY to center of visible plot area.\n anchorY = plotTop + plotHeight / 2;\n }\n else {\n const { xAxis, yAxis } = series;\n // Set anchorX to plotX. Limit to within xAxis.\n anchorX = xAxis.pos + clamp(plotX, -distance, xAxis.len + distance);\n // Set anchorY, limit to the scrollable plot area\n if (series.shouldShowTooltip(0, yAxis.pos - plotTop + plotY, {\n ignoreX: true\n })) {\n anchorY = yAxis.pos + plotY;\n }\n }\n // Limit values to plot area\n anchorX = clamp(anchorX, bounds.left - distance, bounds.right + distance);\n return { anchorX, anchorY };\n }\n /**\n * Calculate the position of the partial tooltip\n * @internal\n */\n const defaultPositioner = function (boxWidth, boxHeight, point, ctx, anchor = [0, 0], alignedLeft = true) {\n let x, y;\n if (point.isHeader) {\n y = headerTop ? 0 : adjustedPlotHeight;\n x = clamp(anchor[0] - (boxWidth / 2), bounds.left, bounds.right - boxWidth - (tooltip.outside ? chartLeft : 0));\n }\n else if (fixed && point) {\n const pos = tooltip.getFixedPosition(boxWidth, boxHeight, point);\n x = pos.x;\n y = pos.y - distributionBoxTop;\n }\n else {\n y = anchor[1] - distributionBoxTop;\n x = alignedLeft ?\n anchor[0] - boxWidth - distance :\n anchor[0] + distance;\n x = clamp(x, alignedLeft ? x : bounds.left, bounds.right);\n }\n // NOTE: y is relative to distributionBoxTop\n return { x, y };\n };\n /**\n * Updates the attributes and styling of the partial tooltip. Creates a\n * new partial tooltip if it does not exists.\n *\n * @internal\n * @param {Highcharts.SVGElement|undefined} partialTooltip\n * The partial tooltip to update\n * @param {Highcharts.Point} point\n * The point related to the partial tooltip\n * @param {boolean|string} str The text for the partial tooltip\n * @return {Highcharts.SVGElement} Returns the updated partial tooltip\n */\n function updatePartialTooltip(partialTooltip, point, str) {\n let tt = partialTooltip;\n const { isHeader, series } = point, ttOptions = series.tooltipOptions || options, specificOptions = isHeader ?\n merge(ttOptions, ttOptions.header) :\n ttOptions;\n if (!tt) {\n const attribs = {\n padding: ttOptions.padding,\n r: ttOptions.borderRadius\n };\n if (!styledMode) {\n attribs.fill = specificOptions.backgroundColor;\n attribs['stroke-width'] = specificOptions.borderWidth ??\n +!ttOptions.fixed;\n }\n tt = ren\n .label('', 0, 0, specificOptions.shape || (fixed && !isHeader ? 'rect' : 'callout'), void 0, void 0, ttOptions.useHTML)\n .addClass(tooltip.getClassName(point, true, isHeader))\n .attr(attribs)\n .add(tooltipLabel);\n }\n tt.isActive = true;\n // Apply styles before text to ensure correct font metrics on\n // first render. (#24293)\n if (!styledMode) {\n tt.css(specificOptions.style);\n }\n tt.attr({\n text: str\n });\n if (!styledMode) {\n tt.attr({\n stroke: (specificOptions.borderColor ||\n point.color ||\n series.color ||\n 'var(--highcharts-neutral-color-80)')\n });\n }\n return tt;\n }\n // Graceful degradation for legacy formatters\n if (isString(labels)) {\n labels = [false, labels];\n }\n // Create the individual labels for header and points, ignore footer\n let boxes = labels.slice(0, points.length + 1).reduce(function (boxes, str, i) {\n if (str !== false && str !== '') {\n const point = (points[i - 1] ||\n {\n // Item 0 is the header. Instead of this, we could also\n // use the crosshair label\n isHeader: true,\n plotX: points[0].plotX,\n plotY: plotHeight,\n series: {}\n });\n const isHeader = point.isHeader;\n // Store the tooltip label reference on the series\n const owner = isHeader ? tooltip : point.series;\n const tt = owner.tt = updatePartialTooltip(owner.tt, point, str.toString());\n // Get X position now, so we can move all to the other side in\n // case of overflow\n const bBox = tt.getBBox();\n const boxWidth = bBox.width + tt.strokeWidth();\n if (isHeader) {\n headerHeight = bBox.height + options.header.distance;\n adjustedPlotHeight += headerHeight;\n if (headerTop) {\n distributionBoxTop -= headerHeight;\n }\n }\n const { anchorX, anchorY } = getAnchor(point);\n if (typeof anchorY === 'number') {\n const size = bBox.height + 1, boxPosition = (positioner || defaultPositioner).call(tooltip, boxWidth, size, point, tooltip, [anchorX, anchorY]);\n boxes.push({\n // 0-align to the top, 1-align to the bottom\n align: hasFixedPosition ? 0 : void 0,\n anchorX,\n anchorY,\n boxWidth,\n point,\n rank: pick(boxPosition.rank, isHeader ? 1 : 0),\n size,\n target: boxPosition.y,\n tt,\n x: boxPosition.x\n });\n }\n else {\n // Hide tooltips which anchorY is outside the visible plot\n // area\n tt.isActive = false;\n }\n }\n return boxes;\n }, []);\n // Realign the tooltips towards the right if there is not enough space\n // to the left and there is space to the right\n if (!hasFixedPosition && boxes.some((box) => {\n // Always realign if the beginning of a label is outside bounds\n const { outside } = tooltip;\n const boxStart = (outside ? chartLeft : 0) + box.anchorX;\n if (boxStart < bounds.left &&\n boxStart + box.boxWidth < bounds.right) {\n return true;\n }\n // Otherwise, check if there is more space available to the right\n return boxStart < (chartLeft - bounds.left) + box.boxWidth &&\n bounds.right - boxStart > boxStart;\n })) {\n boxes = boxes.map((box) => {\n const { x, y } = defaultPositioner.call(this, box.boxWidth, box.size, box.point, void 0, [box.anchorX, box.anchorY], false);\n return extend(box, {\n target: y,\n x\n });\n });\n }\n // Clean previous run (for missing points)\n tooltip.cleanSplit();\n // Distribute and put in place\n distribute(boxes, adjustedPlotHeight);\n const boxExtremes = {\n left: chartLeft,\n right: chartLeft\n };\n // Get the extremes from series tooltips\n boxes.forEach(function (box) {\n const { x, boxWidth, isHeader } = box;\n if (!isHeader) {\n if (tooltip.outside && chartLeft + x < boxExtremes.left) {\n boxExtremes.left = chartLeft + x;\n }\n if (tooltip.outside &&\n boxExtremes.left + boxWidth > boxExtremes.right) {\n boxExtremes.right = chartLeft + x;\n }\n }\n });\n boxes.forEach(function (box) {\n const { x, anchorX, anchorY, pos, point: { isHeader } } = box;\n const attributes = {\n visibility: typeof pos === 'undefined' ? 'hidden' : 'inherit',\n x,\n /* NOTE: y should equal pos to be consistent with !split\n * tooltip, but is currently relative to plotTop. Is left as is\n * to avoid breaking change. Remove distributionBoxTop to make\n * it consistent.\n */\n y: (pos || 0) + distributionBoxTop + (fixed && position.y || 0),\n anchorX,\n anchorY\n };\n // Handle left-aligned tooltips overflowing the chart area\n if (tooltip.outside && x < anchorX) {\n const offset = chartLeft - boxExtremes.left;\n // Skip this if there is no overflow\n if (offset > 0) {\n attributes.x = isHeader ?\n (boxExtremes.right - boxExtremes.left) / 2 :\n x + offset;\n attributes.anchorX = anchorX + offset;\n }\n }\n // Put the label in place\n box.tt.attr(attributes);\n });\n /* If we have a separate tooltip container, then update the necessary\n * container properties.\n * Test that tooltip has its own container and renderer before executing\n * the operation.\n */\n const { container, outside, renderer } = tooltip;\n if (outside && container && renderer) {\n // Set container size to fit the bounds\n const { width, height, x, y } = tooltipLabel.getBBox();\n renderer.setSize(width + x, height + y, false);\n // Position the tooltip container to the chart container\n container.style.left = boxExtremes.left + 'px';\n container.style.top = chartTop + 'px';\n }\n // Workaround for #18927, artefacts left by the shadows of split\n // tooltips in Safari v16 (2023). Check again with later versions if we\n // can remove this.\n if (isSafari) {\n tooltipLabel.attr({\n // Force a redraw of the whole group by chaining the opacity\n // slightly\n opacity: tooltipLabel.opacity === 1 ? 0.999 : 1\n });\n }\n }\n /**\n * If the `stickOnContact` option is active, this will add a tracker shape.\n *\n * @internal\n * @function Highcharts.Tooltip#drawTracker\n */\n drawTracker() {\n const tooltip = this;\n if (!this.shouldStickOnContact()) {\n if (tooltip.tracker) {\n tooltip.tracker = tooltip.tracker.destroy();\n }\n return;\n }\n const chart = tooltip.chart;\n const label = tooltip.label;\n const points = tooltip.shared ? chart.hoverPoints : chart.hoverPoint;\n if (!label || !points) {\n return;\n }\n const box = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n // Combine anchor and tooltip\n const anchorPos = this.getAnchor(points);\n const labelBBox = label.getBBox();\n anchorPos[0] += chart.plotLeft - (label.translateX || 0);\n anchorPos[1] += chart.plotTop - (label.translateY || 0);\n // When the mouse pointer is between the anchor point and the label,\n // the label should stick.\n box.x = Math.min(0, anchorPos[0]);\n box.y = Math.min(0, anchorPos[1]);\n box.width = (anchorPos[0] < 0 ?\n Math.max(Math.abs(anchorPos[0]), labelBBox.width - anchorPos[0]) :\n Math.max(Math.abs(anchorPos[0]), labelBBox.width));\n box.height = (anchorPos[1] < 0 ?\n Math.max(Math.abs(anchorPos[1]), labelBBox.height - Math.abs(anchorPos[1])) :\n Math.max(Math.abs(anchorPos[1]), labelBBox.height));\n if (tooltip.tracker) {\n tooltip.tracker.attr(box);\n }\n else {\n tooltip.tracker = label.renderer\n .rect(box)\n .addClass('highcharts-tracker')\n .add(label);\n // For a rapid move going outside of the elements keeping the\n // tooltip visible, cancel the hide (#23512).\n addEvent(tooltip.tracker.element, 'mouseenter', () => clearTimeouts(tooltip));\n if (!chart.styledMode) {\n tooltip.tracker.attr({\n fill: 'rgba(0,0,0,0)'\n });\n }\n }\n }\n /** @internal */\n styledModeFormat(formatString) {\n return formatString\n .replace('style=\"font-size: 0.8em\"', 'class=\"highcharts-header\"')\n .replace(/style=\"color:{(point|series)\\.color}\"/g, 'class=\"highcharts-color-{$1.colorIndex} ' +\n '{series.options.className} ' +\n '{point.options.className}\"');\n }\n /**\n * Format the footer/header of the tooltip\n * #3397: abstraction to enable formatting of footer and header\n *\n * @internal\n * @function Highcharts.Tooltip#headerFooterFormatter\n */\n headerFooterFormatter(point, isFooter) {\n const series = point.series, tooltipOptions = series.tooltipOptions, xAxis = series.xAxis, dateTime = xAxis?.dateTime, e = {\n isFooter,\n point\n };\n let xDateFormat = tooltipOptions.xDateFormat || '', formatString = tooltipOptions[isFooter ? 'footerFormat' : 'headerFormat'];\n fireEvent(this, 'headerFormatter', e, function (e) {\n // Guess the best date format based on the closest point distance\n // (#568, #3418)\n if (dateTime && !xDateFormat && isNumber(point.key)) {\n xDateFormat = dateTime.getXDateFormat(point.key, tooltipOptions.dateTimeLabelFormats);\n }\n // Insert the footer date format if any\n if (dateTime && xDateFormat) {\n if (isObject(xDateFormat)) {\n const format = xDateFormat;\n dateFormats[0] = (timestamp) => series.chart.time.dateFormat(format, timestamp);\n xDateFormat = '%0';\n }\n (point.tooltipDateKeys || ['key']).forEach((key) => {\n formatString = formatString.replace(new RegExp('point\\\\.' + key + '([ \\\\)}])'), `(point.${key}:${xDateFormat})$1`);\n });\n }\n // Replace default header style with class name\n if (series.chart.styledMode) {\n formatString = this.styledModeFormat(formatString);\n }\n e.text = format(formatString, point, this.chart);\n });\n return e.text || '';\n }\n /**\n * Updates the tooltip with the provided tooltip options.\n *\n * @function Highcharts.Tooltip#update\n *\n * @param {Highcharts.TooltipOptions} options\n * The tooltip options to update.\n */\n update(options) {\n this.destroy();\n this.init(this.chart, merge(true, this.options, options));\n }\n /**\n * Find the new position and perform the move\n *\n * @internal\n * @function Highcharts.Tooltip#updatePosition\n *\n * @param {Highcharts.Point} point The point object.\n */\n updatePosition(point) {\n const { chart, container, distance, options, pointer, renderer } = this, label = this.getLabel(), { height = 0, width = 0 } = label, { fixed, positioner } = options, \n // Needed for outside: true (#11688)\n { left, top, scaleX, scaleY } = pointer.getChartPosition(), pos = (positioner ||\n (fixed && this.getFixedPosition) ||\n this.getPosition).call(this, width, height, point, this), doc = H.doc;\n let anchorX = (point.plotX || 0) + chart.plotLeft, anchorY = (point.plotY || 0) + chart.plotTop, pad;\n // Set the renderer size dynamically to prevent document size to change.\n // Renderer only exists when tooltip is outside.\n if (renderer && container) {\n pos.x += left;\n pos.y += top;\n // Scroll offset is only needed for custom/fixed positions.\n // Default getPosition already returns coordinates in the tooltip's\n // expected coordinate space.\n if (positioner || fixed) {\n const { scrollLeft = 0, scrollTop = 0 } = chart\n .scrollablePlotArea?.scrollingContainer || {};\n pos.x += scrollLeft;\n pos.y += scrollTop;\n }\n // Pad it by the border width and distance. Add 2 to make room for\n // the default shadow (#19314).\n pad = (options.borderWidth ?? +!fixed) + 2 * distance + 2;\n renderer.setSize(\n // Clamp width to keep tooltip in viewport (#21698)\n // and subtract one since tooltip container has 'left: 1px;'\n clamp(width + pad, 0, doc.documentElement.clientWidth) - 1, height + pad, false);\n // Anchor and tooltip container need scaling if chart container has\n // scale transform/css zoom. #11329.\n if (scaleX !== 1 || scaleY !== 1) {\n css(container, {\n transform: `scale(${scaleX}, ${scaleY})`\n });\n anchorX *= scaleX;\n anchorY *= scaleY;\n }\n anchorX += left - pos.x;\n anchorY += top - pos.y;\n }\n // Do the move\n this.move(Math.round(pos.x), Math.round(pos.y || 0), // Can be undefined (#3977)\n anchorX, anchorY);\n }\n}\n/* *\n *\n * Class namespace\n *\n * */\n(function (Tooltip) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /** @internal */\n function compose(PointerClass) {\n if (pushUnique(composed, 'Core.Tooltip')) {\n addEvent(PointerClass, 'afterInit', function () {\n const chart = this.chart;\n if (chart.options.tooltip) {\n /**\n * Tooltip object for points of series.\n *\n * @name Highcharts.Chart#tooltip\n * @type {Highcharts.Tooltip}\n */\n chart.tooltip = new Tooltip(chart, chart.options.tooltip, this);\n }\n });\n }\n }\n Tooltip.compose = compose;\n})(Tooltip || (Tooltip = {}));\n/* *\n *\n * Default export\n *\n * */\nexport default Tooltip;\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * Callback function to format the text of the tooltip from scratch.\n *\n * In case of single or shared tooltips, a string should be returned. In case\n * of split tooltips, it should return an array where the first item is the\n * header, and subsequent items are mapped to the points. Return `false` to\n * disable tooltip for a specific point on series.\n *\n * @callback Highcharts.TooltipFormatterCallbackFunction\n *\n * @param {Highcharts.Point} this\n * The formatter's context is the hovered `Point` instance. In case of shared or\n * split tooltips, all points are available in `this.points`.\n *\n * @param {Highcharts.Tooltip} tooltip\n * The tooltip instance\n *\n * @param {Highcharts.Point} [ctx]\n * Since v12.6.0, the point context passed as an extra argument for arrow\n * functions.\n *\n * @return {false|string|Array<(string|null|undefined)>|null|undefined}\n * Formatted text or false\n */\n/**\n * A callback function to place the tooltip in a specific position.\n *\n * @callback Highcharts.TooltipPositionerCallbackFunction\n *\n * @param {Highcharts.Tooltip} this\n * Tooltip context of the callback.\n *\n * @param {number} labelWidth\n * Width of the tooltip.\n *\n * @param {number} labelHeight\n * Height of the tooltip.\n *\n * @param {Highcharts.TooltipPositionerPointObject} point\n * Point information for positioning a tooltip.\n *\n * @param {Highcharts.Tooltip} [ctx]\n * Since v12.6.0, the tooltip context passed as an extra argument for arrow\n * functions.\n *\n * @return {Highcharts.PositionObject}\n * New position for the tooltip.\n */\n/**\n * Point information for positioning a tooltip.\n *\n * @interface Highcharts.TooltipPositionerPointObject\n * @extends Highcharts.Point\n */ /**\n* If `tooltip.split` option is enabled and positioner is called for each of the\n* boxes separately, this property indicates the call on the xAxis header, which\n* is not a point itself.\n* @name Highcharts.TooltipPositionerPointObject#isHeader\n* @type {boolean}\n*/ /**\n* The reference point relative to the plot area. Add chart.plotLeft to get the\n* full coordinates.\n* @name Highcharts.TooltipPositionerPointObject#plotX\n* @type {number}\n*/ /**\n* The reference point relative to the plot area. Add chart.plotTop to get the\n* full coordinates.\n* @name Highcharts.TooltipPositionerPointObject#plotY\n* @type {number}\n*/\n/**\n * @typedef {\"callout\"|\"circle\"|\"rect\"} Highcharts.TooltipShapeValue\n */\n''; // Keeps doclets above in JS file\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport H from './Globals.js';\nconst { charts, composed, isTouchDevice } = H;\nimport { addEvent, attr, css, defined, extend, find, fireEvent, isNumber, isObject, objectEach, offset, pick, pushUnique, splat } from '../Shared/Utilities.js';\n/**\n *\n * Functions\n *\n */\n/**\n * Check whether the configured action key allows the interaction.\n *\n * @internal\n * @param {Event} e\n * A mouse event.\n * @param {string | undefined} key\n * Zoom or pan key.\n * @return {boolean}\n * True if the key is undefined\n * or if the action key is pressed. False otherwise.\n */\nconst checkActionKey = (e, key) => !defined(key) || e[`${key}Key`];\n/* *\n *\n * Class\n *\n * */\n/**\n * The mouse and touch tracker object. Each {@link Chart} item has one\n * associated Pointer item that can be accessed from the {@link Chart.pointer}\n * property.\n *\n * @class\n * @name Highcharts.Pointer\n *\n * @param {Highcharts.Chart} chart\n * The chart instance.\n *\n * @param {Highcharts.Options} options\n * The root options object. The pointer uses options from the chart and tooltip\n * structures.\n */\nclass Pointer {\n /* *\n *\n * Functions\n *\n * */\n /**\n * Set inactive state to all series that are not currently hovered,\n * or, if `inactiveOtherPoints` is set to true, set inactive state to\n * all points within that series.\n *\n * @internal\n * @function Highcharts.Pointer#applyInactiveState\n *\n * @param {Array<Highcharts.Point>} points\n * Currently hovered points\n */\n applyInactiveState(points = []) {\n const activeSeries = [];\n // Get all active series from the hovered points\n points.forEach((item) => {\n const series = item.series;\n // Include itself\n activeSeries.push(series);\n // Include parent series\n if (series.linkedParent) {\n activeSeries.push(series.linkedParent);\n }\n // Include all child series\n if (series.linkedSeries) {\n activeSeries.push.apply(activeSeries, series.linkedSeries);\n }\n // Include navigator series\n if (series.navigatorSeries) {\n activeSeries.push(series.navigatorSeries);\n }\n // Include boosed series when they share markerGroup\n if (series.boosted && series.markerGroup) {\n activeSeries.push.apply(activeSeries, this.chart.series.filter((otherSeries) => otherSeries.markerGroup === series.markerGroup));\n }\n });\n for (const series of this.chart.series) {\n const seriesOptions = series.options;\n if (seriesOptions.states?.inactive?.enabled === false) {\n continue;\n }\n if (activeSeries.indexOf(series) === -1) {\n // Inactive series\n series.setState('inactive', true);\n }\n else if (seriesOptions.inactiveOtherPoints) {\n // Active series, but other points should be inactivated\n series.setAllPointsToState('inactive');\n }\n }\n }\n /**\n * Destroys the Pointer object and disconnects DOM events.\n *\n * @function Highcharts.Pointer#destroy\n */\n destroy() {\n const pointer = this;\n this.eventsToUnbind.forEach((unbind) => unbind());\n this.eventsToUnbind = [];\n if (!H.chartCount) {\n Pointer.unbindDocumentMouseUp.forEach((el) => el.unbind());\n Pointer.unbindDocumentMouseUp.length = 0;\n if (Pointer.unbindDocumentTouchEnd) {\n Pointer.unbindDocumentTouchEnd = (Pointer.unbindDocumentTouchEnd());\n }\n }\n objectEach(pointer, function (_val, prop) {\n pointer[prop] = void 0;\n });\n }\n /**\n * Calculate attrs for selection marker.\n * @internal\n * @function Highcharts.Pointer#getSelectionMarkerAttrs\n * @emits getSelectionMarkerAttrs\n */\n getSelectionMarkerAttrs(chartX, chartY) {\n const e = {\n args: { chartX, chartY },\n attrs: {},\n shapeType: 'rect'\n };\n fireEvent(this, 'getSelectionMarkerAttrs', e, (e) => {\n const { chart, zoomHor, zoomVert } = this, { mouseDownX = 0, mouseDownY = 0 } = chart, attrs = e.attrs;\n let size;\n attrs.x = chart.plotLeft;\n attrs.y = chart.plotTop;\n attrs.width = zoomHor ? 1 : chart.plotWidth;\n attrs.height = zoomVert ? 1 : chart.plotHeight;\n // Adjust the width of the selection marker. Firefox needs at\n // least one pixel width or height in order to return a bounding\n // box.\n if (zoomHor) {\n size = chartX - mouseDownX;\n attrs.width = Math.max(1, Math.abs(size));\n attrs.x = (size > 0 ? 0 : size) + mouseDownX;\n }\n // Adjust the height of the selection marker\n if (zoomVert) {\n size = chartY - mouseDownY;\n attrs.height = Math.max(1, Math.abs(size));\n attrs.y = (size > 0 ? 0 : size) + mouseDownY;\n }\n });\n return e;\n }\n /**\n * Perform a drag operation in response to a mousemove event while the mouse\n * is down.\n * @internal\n * @function Highcharts.Pointer#drag\n */\n drag(e) {\n const { chart } = this, { mouseDownX = 0, mouseDownY = 0 } = chart, chartOptions = chart.options, { panning, panKey, selectionMarkerFill } = chartOptions.chart, plotLeft = chart.plotLeft, plotTop = chart.plotTop, plotWidth = chart.plotWidth, plotHeight = chart.plotHeight, panningEnabled = isObject(panning) ?\n panning.enabled :\n panning, panKeyPressed = panKey && e[`${panKey}Key`];\n let chartX = e.chartX, chartY = e.chartY, clickedInside, selectionMarker = this.selectionMarker;\n // If the device supports both touch and mouse (like IE11), and we are\n // touch-dragging inside the plot area, don't handle the mouse event.\n // #4339.\n if (selectionMarker && selectionMarker.touch) {\n return;\n }\n // If the mouse is outside the plot area, adjust to coordinates\n // inside to prevent the selection marker from going outside\n if (chartX < plotLeft) {\n chartX = plotLeft;\n }\n else if (chartX > plotLeft + plotWidth) {\n chartX = plotLeft + plotWidth;\n }\n if (chartY < plotTop) {\n chartY = plotTop;\n }\n else if (chartY > plotTop + plotHeight) {\n chartY = plotTop + plotHeight;\n }\n // Determine if the mouse has moved more than 10px\n this.hasDragged = Math.sqrt(Math.pow(mouseDownX - chartX, 2) +\n Math.pow(mouseDownY - chartY, 2));\n if (this.hasDragged > 10) {\n clickedInside = chart.isInsidePlot(mouseDownX - plotLeft, mouseDownY - plotTop, {\n visiblePlotOnly: true\n });\n const { shapeType, attrs } = this.getSelectionMarkerAttrs(chartX, chartY);\n // Make a selection\n if (this.hasZoom &&\n clickedInside &&\n !panKeyPressed) {\n if (!selectionMarker) {\n this.selectionMarker = selectionMarker =\n chart.renderer[shapeType]();\n selectionMarker\n .attr({\n 'class': 'highcharts-selection-marker',\n zIndex: 7\n })\n .add();\n if (!chart.styledMode) {\n selectionMarker.attr({\n fill: selectionMarkerFill\n });\n }\n }\n }\n if (selectionMarker) {\n selectionMarker.attr(attrs);\n }\n // Panning\n if (clickedInside && !selectionMarker && panningEnabled &&\n (checkActionKey(e, panKey))) {\n chart.pan(e, panning);\n }\n }\n }\n /**\n * Start a drag operation.\n * @internal\n * @function Highcharts.Pointer#dragStart\n */\n dragStart(e) {\n const chart = this.chart;\n // Record the start position\n chart.mouseIsDown = e.type;\n chart.cancelClick = false;\n chart.mouseDownX = e.chartX;\n chart.mouseDownY = e.chartY;\n }\n /**\n * Get selection box to calculate extremes\n * @internal\n * @function Highcharts.Pointer#getSelectionBox\n * @emits getSelectionBox\n */\n getSelectionBox(marker) {\n const e = {\n args: { marker },\n result: marker.getBBox()\n };\n fireEvent(this, 'getSelectionBox', e);\n return e.result;\n }\n /**\n * On mouse up or touch end across the entire document, drop the selection.\n * @internal\n * @function Highcharts.Pointer#drop\n */\n drop(e) {\n const { chart, selectionMarker } = this;\n // During a mouse, touch or mousewheel pan, the `startOnTick` and\n // `endOnTick` options are ignored. Otherwise the zooming or panning\n // would be jumpy, or even not performed because the end ticks would\n // block it. After the touch has ended, we undo this and render again.\n let redraw;\n for (const axis of chart.axes) {\n if (axis.isPanning) {\n axis.isPanning = false;\n if (axis.options.startOnTick ||\n axis.options.endOnTick ||\n axis.series.some((s) => s.boosted)) {\n axis.forceRedraw = true;\n axis.setExtremes(axis.userMin, axis.userMax, false);\n redraw = true;\n }\n }\n }\n if (redraw) {\n chart.redraw();\n }\n if (selectionMarker && e) {\n // A selection has been made\n if (this.hasDragged) {\n const from = this.getSelectionBox(selectionMarker);\n chart.transform({\n axes: chart.axes.filter((a) => a.zoomEnabled &&\n ((a.coll === 'xAxis' && this.zoomX) ||\n (a.coll === 'yAxis' && this.zoomY))),\n selection: {\n originalEvent: e, // #4890\n xAxis: [],\n yAxis: [],\n ...from\n },\n from\n });\n }\n if (isNumber(chart.index)) {\n this.selectionMarker = selectionMarker.destroy();\n }\n }\n // Reset all. Check isNumber because it may be destroyed on mouse up\n // (#877)\n if (chart && isNumber(chart.index)) {\n css(chart.container, { cursor: chart._cursor });\n chart.cancelClick = this.hasDragged > 10; // #370\n chart.mouseIsDown = false;\n this.hasDragged = 0;\n this.pinchDown = [];\n this.hasPinchMoved = false;\n }\n }\n /**\n * Finds the closest point to a set of coordinates, using the k-d-tree\n * algorithm.\n *\n * @function Highcharts.Pointer#findNearestKDPoint\n *\n * @param {Array<Highcharts.Series>} series\n * All the series to search in.\n *\n * @param {boolean|undefined} shared\n * Whether it is a shared tooltip or not.\n *\n * @param {Highcharts.PointerEventObject} e\n * The pointer event object, containing chart coordinates of the pointer.\n *\n * @return {Highcharts.Point|undefined}\n * The point closest to given coordinates.\n */\n findNearestKDPoint(series, shared, e) {\n let closest;\n /** @internal */\n function sort(p1, p2) {\n const isCloserX = p1.distX - p2.distX, isCloser = p1.dist - p2.dist, isAbove = (p2.series.group?.zIndex -\n p1.series.group?.zIndex);\n let result;\n // We have two points which are not in the same place on xAxis\n // and shared tooltip:\n if (isCloserX !== 0 && shared) { // #5721\n result = isCloserX;\n // Points are not exactly in the same place on x/yAxis:\n }\n else if (isCloser !== 0) {\n result = isCloser;\n // The same xAxis and yAxis position, sort by z-index:\n }\n else if (isAbove !== 0) {\n result = isAbove;\n // The same zIndex, sort by array index:\n }\n else {\n result =\n p1.series.index > p2.series.index ?\n -1 :\n 1;\n }\n return result;\n }\n series.forEach(function (s) {\n const noSharedTooltip = s.noSharedTooltip && shared, compareX = (!noSharedTooltip &&\n s.options.findNearestPointBy.indexOf('y') < 0), point = s.searchPoint(e, compareX);\n if ( // Check that we actually found a point on the series.\n isObject(point, true) && point.series &&\n // Use the new point if it is closer.\n (!isObject(closest, true) ||\n (sort(closest, point) > 0))) {\n closest = point;\n }\n });\n return closest;\n }\n /** @internal */\n getChartCoordinatesFromPoint(point, inverted) {\n const { xAxis, yAxis } = point.series, shapeArgs = point.shapeArgs;\n if (xAxis && yAxis) {\n let x = point.clientX ?? point.plotX ?? 0, y = point.plotY || 0;\n if (point.isNode &&\n shapeArgs &&\n isNumber(shapeArgs.x) &&\n isNumber(shapeArgs.y)) {\n x = shapeArgs.x;\n y = shapeArgs.y;\n }\n return inverted ? {\n chartX: yAxis.len + yAxis.pos - y,\n chartY: xAxis.len + xAxis.pos - x\n } : {\n chartX: x + xAxis.pos,\n chartY: y + yAxis.pos\n };\n }\n if (shapeArgs?.x && shapeArgs.y) {\n // E.g. pies do not have axes\n return {\n chartX: shapeArgs.x,\n chartY: shapeArgs.y\n };\n }\n }\n /**\n * Return the cached chartPosition if it is available on the Pointer,\n * otherwise find it. Running offset is quite expensive, so it should be\n * avoided when we know the chart hasn't moved.\n *\n * @function Highcharts.Pointer#getChartPosition\n *\n * @return {Highcharts.ChartPositionObject}\n * The offset of the chart container within the page\n */\n getChartPosition() {\n if (this.chartPosition) {\n return this.chartPosition;\n }\n const { container } = this.chart;\n const pos = offset(container);\n this.chartPosition = {\n left: pos.left,\n top: pos.top,\n scaleX: 1,\n scaleY: 1\n };\n const { offsetHeight, offsetWidth } = container;\n // #13342 - tooltip was not visible in Chrome, when chart\n // updates height.\n if (offsetWidth > 2 && // #13342\n offsetHeight > 2 // #13342\n ) {\n this.chartPosition.scaleX = pos.width / offsetWidth;\n this.chartPosition.scaleY = pos.height / offsetHeight;\n }\n return this.chartPosition;\n }\n /**\n * Get the click position in terms of axis values.\n *\n * @function Highcharts.Pointer#getCoordinates\n *\n * @param {Highcharts.PointerEventObject} e\n * Pointer event, extended with `chartX` and `chartY` properties.\n *\n * @return {Highcharts.PointerAxisCoordinatesObject}\n * Axis coordinates.\n */\n getCoordinates(e) {\n const coordinates = {\n xAxis: [],\n yAxis: []\n };\n for (const axis of this.chart.axes) {\n coordinates[axis.isXAxis ? 'xAxis' : 'yAxis'].push({\n axis,\n value: axis.toValue(e[axis.horiz ? 'chartX' : 'chartY'])\n });\n }\n return coordinates;\n }\n /**\n * Calculates what is the current hovered point/points and series.\n *\n * @internal\n * @function Highcharts.Pointer#getHoverData\n *\n * @param {Highcharts.Point|undefined} existingHoverPoint\n * The point currently being hovered.\n *\n * @param {Highcharts.Series|undefined} existingHoverSeries\n * The series currently being hovered.\n *\n * @param {Array<Highcharts.Series>} series\n * All the series in the chart.\n *\n * @param {boolean} isDirectTouch\n * Is the pointer directly hovering the point.\n *\n * @param {boolean|undefined} shared\n * Whether it is a shared tooltip or not.\n *\n * @param {Highcharts.PointerEventObject} [e]\n * The triggering event, containing chart coordinates of the pointer.\n *\n * @return {Object}\n * Object containing resulting hover data: hoverPoint, hoverSeries, and\n * hoverPoints.\n */\n getHoverData(existingHoverPoint, existingHoverSeries, series, isDirectTouch, shared, e) {\n const hoverPoints = [], useExisting = !!(isDirectTouch && existingHoverPoint), filter = function (s) {\n return (s.visible &&\n !(!shared && s.directTouch) && // #3821\n pick(s.options.enableMouseTracking, true));\n };\n let hoverSeries = existingHoverSeries, \n // Which series to look in for the hover point\n searchSeries, \n // Parameters needed for beforeGetHoverData event.\n eventArgs = {\n chartX: e ? e.chartX : void 0,\n chartY: e ? e.chartY : void 0,\n shared: shared\n };\n // Find chart.hoverPane and update filter method in polar.\n fireEvent(this, 'beforeGetHoverData', eventArgs);\n const notSticky = hoverSeries && !hoverSeries.stickyTracking;\n searchSeries = notSticky ?\n // Only search on hovered series if it has stickyTracking false\n [hoverSeries] :\n // Filter what series to look in.\n series.filter((s) => s.stickyTracking &&\n (eventArgs.filter || filter)(s));\n // Use existing hovered point or find the one closest to coordinates.\n const hoverPoint = useExisting || !e ?\n existingHoverPoint :\n this.findNearestKDPoint(searchSeries, shared, e);\n // Assign hover series\n hoverSeries = hoverPoint?.series;\n // If we have a hoverPoint, assign hoverPoints.\n if (hoverPoint) {\n // When tooltip is shared, it displays more than one point\n if (shared && !hoverSeries.noSharedTooltip) {\n searchSeries = series.filter(function (s) {\n return eventArgs.filter ?\n eventArgs.filter(s) : filter(s) && !s.noSharedTooltip;\n });\n // Get all points with the same x value as the hoverPoint\n searchSeries.forEach(function (s) {\n const nullInteraction = s.options?.nullInteraction;\n let point = find(s.points, function (p) {\n return (p.x === hoverPoint.x && (!p.isNull ||\n !!nullInteraction));\n });\n if (isObject(point)) {\n /*\n * Boost returns a minimal point. Convert it to a usable\n * point for tooltip and states.\n */\n if (s.boosted && s.boost) {\n point = s.boost.getPoint(point);\n }\n hoverPoints.push(point);\n }\n });\n }\n else {\n hoverPoints.push(hoverPoint);\n }\n }\n // Check whether the hoverPoint is inside pane we are hovering over.\n eventArgs = { hoverPoint: hoverPoint };\n fireEvent(this, 'afterGetHoverData', eventArgs);\n return {\n hoverPoint: eventArgs.hoverPoint,\n hoverSeries: hoverSeries,\n hoverPoints: hoverPoints\n };\n }\n /** @internal */\n getPointFromEvent(e) {\n let target = e.target, point;\n while (target && !point) {\n point = target.point;\n target = target.parentNode;\n }\n return point;\n }\n /** @internal */\n onTrackerMouseOut(e) {\n const chart = this.chart;\n const relatedTarget = e.relatedTarget;\n const series = chart.hoverSeries;\n this.isDirectTouch = false;\n if (series &&\n relatedTarget &&\n !series.stickyTracking &&\n !this.inClass(relatedTarget, 'highcharts-tooltip') &&\n (!this.inClass(relatedTarget, 'highcharts-series-' + series.index) || // #2499, #4465, #5553\n !this.inClass(relatedTarget, 'highcharts-tracker'))) {\n series.onMouseOut();\n }\n }\n /**\n * Utility to detect whether an element has, or has a parent with, a\n * specific class name. Used on detection of tracker objects and on deciding\n * whether hovering the tooltip should cause the active series to mouse out.\n *\n * @function Highcharts.Pointer#inClass\n *\n * @param {Highcharts.SVGDOMElement|Highcharts.HTMLDOMElement} element\n * The element to investigate.\n *\n * @param {string} className\n * The class name to look for.\n *\n * @return {boolean|undefined}\n * True if either the element or one of its parents has the given class\n * name.\n */\n inClass(element, className) {\n let elem = element, elemClassName;\n while (elem) {\n elemClassName = attr(elem, 'class');\n if (elemClassName) {\n if (elemClassName.indexOf(className) !== -1) {\n return true;\n }\n if (elemClassName.indexOf('highcharts-container') !== -1) {\n return false;\n }\n }\n elem = elem.parentElement;\n }\n }\n /**\n * Initialize the Pointer.\n *\n * @internal\n * @function Highcharts.Pointer#init\n *\n * @param {Highcharts.Chart} chart\n * The Chart instance.\n *\n * @param {Highcharts.Options} options\n * The root options object. The pointer uses options from the chart and\n * tooltip structures.\n */\n constructor(chart, options) {\n /**\n * The distance by which the mouse has been dragged since the last\n * `mousedown` event.\n * @internal\n */\n this.hasDragged = 0;\n /**\n * A list of events to unbind when the pointer is destroyed.\n * @internal\n */\n this.pointerCaptureEventsToUnbind = [];\n /**\n * A list of events to unbind when the pointer is destroyed.\n * @internal\n */\n this.eventsToUnbind = [];\n // Store references\n this.options = options;\n this.chart = chart;\n // Do we need to handle click on a touch device?\n this.runChartClick = Boolean(options.chart.events?.click);\n this.pinchDown = [];\n this.setDOMEvents();\n fireEvent(this, 'afterInit');\n }\n /**\n * Takes a browser event object and extends it with custom Highcharts\n * properties `chartX` and `chartY` in order to work on the internal\n * coordinate system.\n *\n * On map charts, the properties `lon` and `lat` are added to the event\n * object given that the chart has projection information.\n *\n * @function Highcharts.Pointer#normalize\n *\n * @param {global.MouseEvent|global.PointerEvent|global.TouchEvent} e\n * Event object in standard browsers.\n *\n * @param {Highcharts.OffsetObject} [chartPosition]\n * Additional chart offset.\n *\n * @return {Highcharts.PointerEventObject}\n * A browser event with extended properties `chartX` and `chartY`.\n */\n normalize(e, chartPosition) {\n const touches = e.touches;\n // Position for iOS (#2757)\n const ePos = (touches ?\n touches.length ?\n touches.item(0) :\n (pick(// #13534\n touches.changedTouches, e.changedTouches))[0] :\n e);\n // Get mouse position\n if (!chartPosition) {\n chartPosition = this.getChartPosition();\n }\n let chartX = ePos.pageX - chartPosition.left, chartY = ePos.pageY - chartPosition.top;\n // #11329 - when there is scaling on a parent element, we need to take\n // this into account\n chartX /= chartPosition.scaleX;\n chartY /= chartPosition.scaleY;\n return extend(e, {\n chartX: Math.round(chartX),\n chartY: Math.round(chartY)\n });\n }\n /** @internal */\n onContainerClick(e) {\n const chart = this.chart;\n const hoverPoint = chart.hoverPoint;\n const pEvt = this.normalize(e);\n const plotLeft = chart.plotLeft;\n const plotTop = chart.plotTop;\n if (!chart.cancelClick) {\n // On tracker click, fire the series and point events. #783, #1583\n if (hoverPoint &&\n this.inClass(pEvt.target, 'highcharts-tracker')) {\n // The series click event\n fireEvent(hoverPoint.series, 'click', extend(pEvt, {\n point: hoverPoint\n }));\n // The point click event\n if (chart.hoverPoint) { // It may be destroyed (#1844)\n hoverPoint.firePointEvent('click', pEvt);\n }\n // When clicking outside a tracker, fire a chart event\n }\n else {\n extend(pEvt, this.getCoordinates(pEvt));\n // Fire a click event in the chart\n if (chart.isInsidePlot(pEvt.chartX - plotLeft, pEvt.chartY - plotTop, {\n visiblePlotOnly: true\n })) {\n fireEvent(chart, 'click', pEvt);\n }\n }\n }\n }\n /** @internal */\n onContainerMouseDown(e) {\n const isPrimaryButton = ((e.buttons || e.button) & 1) === 1;\n e = this.normalize(e);\n // #11635, Firefox does not reliably fire move event after click scroll\n if (H.isFirefox &&\n e.button !== 0) {\n this.onContainerMouseMove(e);\n }\n // #11635, limiting to primary button\n if (typeof e.button === 'undefined' ||\n isPrimaryButton) {\n this.zoomOption(e);\n // #295, #13737 solve conflict between container drag and chart zoom\n if (isPrimaryButton) {\n e.preventDefault?.();\n }\n this.dragStart(e);\n }\n }\n /**\n * When mouse leaves the container, hide the tooltip.\n * @internal\n * @function Highcharts.Pointer#onContainerMouseLeave\n */\n onContainerMouseLeave(e) {\n const { pointer } = charts[pick(Pointer.hoverChartIndex, -1)] || {};\n e = this.normalize(e);\n this.onContainerMouseMove(e);\n // #4886, MS Touch end fires mouseleave but with no related target\n if (pointer &&\n !this.inClass(e.relatedTarget, 'highcharts-tooltip')) {\n pointer.reset();\n // Also reset the chart position, used in #149 fix\n pointer.chartPosition = void 0;\n }\n }\n /**\n * When mouse enters the container, delete pointer's chartPosition.\n * @internal\n * @function Highcharts.Pointer#onContainerMouseEnter\n */\n onContainerMouseEnter() {\n delete this.chartPosition;\n }\n /**\n * The mousemove, touchmove and touchstart event handler\n * @internal\n * @function Highcharts.Pointer#onContainerMouseMove\n */\n onContainerMouseMove(e) {\n const chart = this.chart, tooltip = chart.tooltip, pEvt = this.normalize(e);\n this.setHoverChartIndex(e);\n if (chart.mouseIsDown === 'mousedown' || this.touchSelect(pEvt)) {\n this.drag(pEvt);\n }\n // Show the tooltip and run mouse over events (#977)\n if (!chart.exporting?.openMenu &&\n (this.inClass(pEvt.target, 'highcharts-tracker') ||\n chart.isInsidePlot(pEvt.chartX - chart.plotLeft, pEvt.chartY - chart.plotTop, {\n visiblePlotOnly: true\n })) &&\n // If the tooltip has stickOnContact enabled, do nothing. This\n // applies regardless of any combinations of the `split` and\n // `useHTML` options.\n !tooltip?.shouldStickOnContact(pEvt)) {\n if (this.inClass(pEvt.target, 'highcharts-no-tooltip')) {\n this.reset(false, 0);\n }\n else {\n this.runPointActions(pEvt);\n }\n }\n }\n /** @internal */\n onDocumentTouchEnd(e) {\n this.onDocumentMouseUp(e);\n }\n /** @internal */\n onContainerTouchMove(e) {\n if (this.touchSelect(e)) {\n this.onContainerMouseMove(e);\n }\n else {\n this.touch(e);\n }\n }\n /** @internal */\n onContainerTouchStart(e) {\n if (this.touchSelect(e)) {\n this.onContainerMouseDown(e);\n }\n else {\n this.zoomOption(e);\n this.touch(e, true);\n }\n }\n /**\n * Special handler for mouse move that will hide the tooltip when the mouse\n * leaves the plotarea. Issue #149 workaround. The mouseleave event does not\n * always fire.\n * @internal\n * @function Highcharts.Pointer#onDocumentMouseMove\n */\n onDocumentMouseMove(e) {\n const chart = this.chart;\n const tooltip = chart.tooltip;\n const chartPosition = this.chartPosition;\n const pEvt = this.normalize(e, chartPosition);\n // If we're outside, hide the tooltip\n if (chartPosition &&\n !chart.isInsidePlot(pEvt.chartX - chart.plotLeft, pEvt.chartY - chart.plotTop, {\n visiblePlotOnly: true\n }) &&\n !tooltip?.shouldStickOnContact(pEvt) && (pEvt.target === chart.container.ownerDocument ||\n !this.inClass(pEvt.target, 'highcharts-tracker'))) {\n this.reset();\n }\n }\n /** @internal */\n onDocumentMouseUp(e) {\n // #17852, IOS devices sometimes reverts back to previous point when\n // dragging between points\n if (e?.touches && this.hasPinchMoved) {\n e?.preventDefault?.();\n }\n charts[pick(Pointer.hoverChartIndex, -1)]\n ?.pointer\n ?.drop(e);\n }\n /**\n * Handle touch events with two touches\n * @internal\n * @function Highcharts.Pointer#pinch\n */\n pinch(e) {\n const pointer = this, { chart, hasZoom, lastTouches } = pointer, touches = [].map.call(e.touches || [], \n // Normalize each touch\n (touch) => pointer.normalize(touch)), touchesLength = touches.length, fireClickEvent = touchesLength === 1 && ((pointer.inClass(e.target, 'highcharts-tracker') &&\n chart.runTrackerClick) ||\n pointer.runChartClick), followTouchMove = touchesLength === 1 &&\n (chart.tooltip?.options.followTouchMove ?? true);\n // Don't initiate panning until the user has pinched. This prevents us\n // from blocking page scrolling as users scroll down a long page\n // (#4210).\n if (touchesLength > 1) {\n pointer.initiated = true;\n }\n else if (followTouchMove) {\n // #16119: Prevent blocking scroll when single-finger panning is\n // not enabled\n pointer.initiated = false;\n }\n // On touch devices, only proceed to trigger click if a handler is\n // defined\n if (hasZoom &&\n pointer.initiated &&\n !fireClickEvent &&\n e.cancelable !== false) {\n e.preventDefault();\n }\n // Register the touch start position\n if (e.type === 'touchstart') {\n pointer.pinchDown = touches;\n pointer.res = true; // Reset on next move\n chart.mouseDownX = e.chartX;\n // Optionally move the tooltip on touchmove\n }\n else if (followTouchMove) {\n this.runPointActions(pointer.normalize(e));\n // Event type is touchmove, handle panning and pinching. The length can\n // be 0 when releasing, if touchend fires first\n }\n else if (lastTouches) {\n fireEvent(chart, 'touchpan', {\n originalEvent: e,\n touches\n }, () => {\n const boxFromTouches = (touches) => {\n const finger0 = touches[0], finger1 = touches[1] || finger0;\n return {\n x: finger0.chartX,\n y: finger0.chartY,\n width: finger1.chartX - finger0.chartX,\n height: finger1.chartY - finger0.chartY\n };\n };\n chart.transform({\n axes: chart.axes\n .filter((axis) => axis.zoomEnabled &&\n ((this.zoomHor && axis.horiz) ||\n (this.zoomVert && !axis.horiz))),\n to: boxFromTouches(touches),\n from: boxFromTouches(lastTouches),\n trigger: e.type\n });\n });\n if (pointer.res) {\n pointer.res = false;\n this.reset(false, 0);\n }\n }\n pointer.lastTouches = touches;\n }\n /**\n * Run translation operations\n * @internal\n * @function Highcharts.Pointer#pinchTranslate\n * /\n public pinchTranslate(\n pinchDown: Array<any>,\n touches: Array<PointerEvent>,\n transform: any,\n selectionMarker: any,\n clip: any,\n lastValidTouch: any\n ): void {\n if (this.zoomHor) {\n this.pinchTranslateDirection(\n true,\n pinchDown,\n touches,\n transform,\n selectionMarker,\n clip,\n lastValidTouch\n );\n }\n if (this.zoomVert) {\n this.pinchTranslateDirection(\n false,\n pinchDown,\n touches,\n transform,\n selectionMarker,\n clip,\n lastValidTouch\n );\n }\n }\n */\n /**\n * Run translation operations for each direction (horizontal and vertical)\n * independently.\n * @internal\n * @function Highcharts.Pointer#pinchTranslateDirection\n * /\n public pinchTranslateDirection(\n horiz: boolean,\n pinchDown: Array<any>,\n touches: Array<PointerEvent>,\n transform: any,\n selectionMarker: any,\n clip: any,\n lastValidTouch: any,\n forcedScale?: number\n ): void {\n const chart = this.chart,\n xy: ('x'|'y') = horiz ? 'x' : 'y',\n XY: ('X'|'Y') = horiz ? 'X' : 'Y',\n sChartXY: ('chartX'|'chartY') = ('chart' + XY) as any,\n wh = horiz ? 'width' : 'height',\n plotLeftTop = (chart as any)['plot' + (horiz ? 'Left' : 'Top')],\n inverted = chart.inverted,\n bounds = chart.bounds[horiz ? 'h' : 'v'],\n singleTouch = pinchDown.length === 1,\n touch0Start = pinchDown[0][sChartXY],\n touch1Start = !singleTouch && pinchDown[1][sChartXY],\n setScale = function (): void {\n // Don't zoom if fingers are too close on this axis\n if (\n typeof touch1Now === 'number' &&\n Math.abs(touch0Start - touch1Start) > 20\n ) {\n scale = forcedScale ||\n Math.abs(touch0Now - touch1Now) /\n Math.abs(touch0Start - touch1Start);\n }\n\n clipXY = ((plotLeftTop - touch0Now) / scale) + touch0Start;\n selectionWH = (chart as any)[\n 'plot' + (horiz ? 'Width' : 'Height')\n ] / scale;\n };\n\n let selectionWH: any,\n selectionXY,\n clipXY: any,\n scale = forcedScale || 1,\n touch0Now = touches[0][sChartXY],\n touch1Now = !singleTouch && touches[1][sChartXY],\n outOfBounds;\n\n // Set the scale, first pass\n setScale();\n\n // The clip position (x or y) is altered if out of bounds, the selection\n // position is not\n selectionXY = clipXY;\n\n // Out of bounds\n if (selectionXY < bounds.min) {\n selectionXY = bounds.min;\n outOfBounds = true;\n } else if (selectionXY + selectionWH > bounds.max) {\n selectionXY = bounds.max - selectionWH;\n outOfBounds = true;\n }\n\n // Is the chart dragged off its bounds, determined by dataMin and\n // dataMax?\n if (outOfBounds) {\n\n // Modify the touchNow position in order to create an elastic drag\n // movement. This indicates to the user that the chart is responsive\n // but can't be dragged further.\n touch0Now -= 0.8 * (touch0Now - lastValidTouch[xy][0]);\n if (typeof touch1Now === 'number') {\n touch1Now -= 0.8 * (touch1Now - lastValidTouch[xy][1]);\n }\n\n // Set the scale, second pass to adapt to the modified touchNow\n // positions\n setScale();\n\n } else {\n lastValidTouch[xy] = [touch0Now, touch1Now];\n }\n\n // Set geometry for clipping, selection and transformation\n if (!inverted) {\n clip[xy] = clipXY - plotLeftTop;\n clip[wh] = selectionWH;\n }\n const scaleKey = inverted ?\n (horiz ? 'scaleY' : 'scaleX') : 'scale' + XY;\n const transformScale = inverted ? 1 / scale : scale;\n\n selectionMarker[wh] = selectionWH;\n selectionMarker[xy] = selectionXY;\n // Invert scale if needed (#19217)\n transform[scaleKey] = scale * (inverted && !horiz ? -1 : 1);\n transform['translate' + XY] = (transformScale * plotLeftTop) +\n (touch0Now - (transformScale * touch0Start));\n }\n */\n /**\n * Reset the tracking by hiding the tooltip, the hover series state and the\n * hover point.\n *\n * @function Highcharts.Pointer#reset\n *\n * @param {boolean} [allowMove]\n * Instead of destroying the tooltip altogether, allow moving it if\n * possible.\n *\n * @param {number} [delay]\n * The tooltip hide delay in ms.\n */\n reset(allowMove, delay) {\n const pointer = this, chart = pointer.chart, hoverSeries = chart.hoverSeries, hoverPoint = chart.hoverPoint, hoverPoints = chart.hoverPoints, tooltip = chart.tooltip, tooltipPoints = tooltip?.shared ?\n hoverPoints :\n hoverPoint;\n // Check if the points have moved outside the plot area (#1003, #4736,\n // #5101)\n if (allowMove && tooltipPoints) {\n splat(tooltipPoints).forEach(function (point) {\n if (point.series.isCartesian &&\n typeof point.plotX === 'undefined') {\n allowMove = false;\n }\n });\n }\n // Just move the tooltip, #349\n if (allowMove) {\n if (tooltip && tooltipPoints && splat(tooltipPoints).length) {\n tooltip.refresh(tooltipPoints);\n if (tooltip.shared && hoverPoints) { // #8284\n hoverPoints.forEach(function (point) {\n point.setState(point.state, true);\n if (point.series.isCartesian) {\n if (point.series.xAxis.crosshair) {\n point.series.xAxis\n .drawCrosshair(null, point);\n }\n if (point.series.yAxis.crosshair) {\n point.series.yAxis\n .drawCrosshair(null, point);\n }\n }\n });\n }\n else if (hoverPoint) { // #2500\n hoverPoint.setState(hoverPoint.state, true);\n chart.axes.forEach(function (axis) {\n if (axis.crosshair &&\n hoverPoint.series[axis.coll] === axis) {\n axis.drawCrosshair(null, hoverPoint);\n }\n });\n }\n }\n // Full reset\n }\n else {\n if (hoverPoint) {\n hoverPoint.onMouseOut();\n }\n if (hoverPoints) {\n hoverPoints.forEach(function (point) {\n point.setState();\n });\n }\n if (hoverSeries) {\n hoverSeries.onMouseOut();\n }\n if (tooltip) {\n tooltip.hide(delay);\n }\n if (pointer.unDocMouseMove) {\n pointer.unDocMouseMove = pointer.unDocMouseMove();\n }\n // Remove crosshairs\n chart.axes.forEach(function (axis) {\n axis.hideCrosshair();\n });\n chart.hoverPoints = chart.hoverPoint = void 0;\n }\n }\n /**\n * With line type charts with a single tracker, get the point closest to the\n * mouse. Run Point.onMouseOver and display tooltip for the point or points.\n *\n * @internal\n * @function Highcharts.Pointer#runPointActions\n *\n * @emits Highcharts.Point#event:mouseOut\n * @emits Highcharts.Point#event:mouseOver\n */\n runPointActions(e, p, force) {\n const pointer = this, chart = pointer.chart, series = chart.series, tooltip = (chart.tooltip?.options.enabled ?\n chart.tooltip :\n void 0), shared = (tooltip ?\n tooltip.shared :\n false);\n let hoverPoint = p || chart.hoverPoint, hoverSeries = hoverPoint?.series || chart.hoverSeries;\n const // `onMouseOver` or already hovering a series with directTouch\n isDirectTouch = (!e || e.type !== 'touchmove') && (!!p || ((hoverSeries?.directTouch) &&\n pointer.isDirectTouch)), hoverData = this.getHoverData(hoverPoint, hoverSeries, series, isDirectTouch, shared, e);\n // Update variables from hoverData.\n hoverPoint = hoverData.hoverPoint;\n hoverSeries = hoverData.hoverSeries;\n const points = hoverData.hoverPoints, followPointer = hoverSeries?.tooltipOptions.followPointer &&\n !hoverSeries.tooltipOptions.split, useSharedTooltip = (shared &&\n hoverSeries &&\n !hoverSeries.noSharedTooltip);\n // Refresh tooltip for kdpoint if new hover point or tooltip was hidden\n // #3926, #4200\n if (hoverPoint &&\n (force ||\n hoverPoint !== chart.hoverPoint ||\n tooltip?.isHidden)) {\n (chart.hoverPoints || []).forEach(function (p) {\n if (points.indexOf(p) === -1) {\n p.setState();\n }\n });\n // Set normal state to previous series\n if (chart.hoverSeries !== hoverSeries) {\n hoverSeries.onMouseOver();\n }\n pointer.applyInactiveState(points);\n // Do mouseover on all points (#3919, #3985, #4410, #5622)\n (points || []).forEach(function (p) {\n p.setState('hover');\n });\n // If tracking is on series in stead of on each point,\n // fire mouseOver on hover point. // #4448\n if (chart.hoverPoint) {\n chart.hoverPoint.firePointEvent('mouseOut');\n }\n // Hover point may have been destroyed in the event handlers (#7127)\n if (!hoverPoint.series) {\n return;\n }\n /**\n * Contains all hovered points.\n *\n * @name Highcharts.Chart#hoverPoints\n * @type {Array<Highcharts.Point>|null}\n */\n chart.hoverPoints = points;\n /**\n * Contains the original hovered point.\n *\n * @name Highcharts.Chart#hoverPoint\n * @type {Highcharts.Point|null}\n */\n chart.hoverPoint = hoverPoint;\n /**\n * Hover state should not be lost when axis is updated (#12569)\n * Axis.update runs pointer.reset which uses chart.hoverPoint.state\n * to apply state which does not exist in hoverPoint yet.\n * The mouseOver event should be triggered when hoverPoint\n * is correct.\n */\n hoverPoint.firePointEvent('mouseOver', void 0, () => {\n // Draw tooltip if necessary\n if (tooltip && hoverPoint) {\n tooltip.refresh(useSharedTooltip ? points : hoverPoint, e);\n }\n });\n // Update positions (regardless of kdpoint or hoverPoint)\n }\n else if (followPointer && tooltip && !tooltip.isHidden) {\n const anchor = tooltip.getAnchor([{}], e);\n if (chart.isInsidePlot(anchor[0], anchor[1], {\n visiblePlotOnly: true\n })) {\n tooltip.updatePosition({ plotX: anchor[0], plotY: anchor[1] });\n }\n }\n // Start the event listener to pick up the tooltip and crosshairs\n if (!pointer.unDocMouseMove) {\n pointer.unDocMouseMove = addEvent(chart.container.ownerDocument, 'mousemove', (e) => charts[Pointer.hoverChartIndex ?? -1]\n ?.pointer\n ?.onDocumentMouseMove(e));\n pointer.eventsToUnbind.push(pointer.unDocMouseMove);\n }\n // Issues related to crosshair #4927, #5269 #5066, #5658\n chart.axes.forEach(function drawAxisCrosshair(axis) {\n const snap = axis.crosshair?.snap ?? true;\n let point;\n if (snap) {\n point = chart.hoverPoint; // #13002\n if (!point || point.series[axis.coll] !== axis) {\n point = find(points, (p) => p.series?.[axis.coll] === axis);\n }\n }\n // Axis has snapping crosshairs, and one of the hover points belongs\n // to axis. Always call drawCrosshair when it is not snap.\n if (point || !snap) {\n axis.drawCrosshair(e, point);\n // Axis has snapping crosshairs, but no hover point belongs to axis\n }\n else {\n axis.hideCrosshair();\n }\n });\n }\n /**\n * Set the JS DOM events on the container and document. This method should\n * contain a one-to-one assignment between methods and their handlers. Any\n * advanced logic should be moved to the handler reflecting the event's\n * name.\n * @internal\n * @function Highcharts.Pointer#setDOMEvents\n */\n setDOMEvents() {\n const container = this.chart.container, ownerDoc = container.ownerDocument, \n // Get the parent element, including handling Shadow DOM (#23450)\n getParent = (el) => el.parentElement || el.getRootNode()?.host?.parentElement;\n container.onmousedown = this.onContainerMouseDown.bind(this);\n container.onmousemove = this.onContainerMouseMove.bind(this);\n container.onclick = this.onContainerClick.bind(this);\n this.eventsToUnbind.push(addEvent(container, 'mouseenter', this.onContainerMouseEnter.bind(this)), addEvent(container, 'mouseleave', this.onContainerMouseLeave.bind(this)));\n if (!Pointer.unbindDocumentMouseUp.some((el) => el.doc === ownerDoc)) {\n Pointer.unbindDocumentMouseUp.push({\n doc: ownerDoc,\n unbind: addEvent(ownerDoc, 'mouseup', this.onDocumentMouseUp.bind(this))\n });\n }\n // In case we are dealing with overflow, reset the chart position when\n // scrolling parent elements\n let parent = getParent(this.chart.renderTo);\n while (parent && parent.tagName !== 'BODY') {\n this.eventsToUnbind.push(addEvent(parent, 'scroll', () => {\n delete this.chartPosition;\n }));\n parent = getParent(parent);\n }\n this.eventsToUnbind.push(addEvent(container, 'touchstart', this.onContainerTouchStart.bind(this), { passive: false }), addEvent(container, 'touchmove', this.onContainerTouchMove.bind(this), { passive: false }));\n if (!Pointer.unbindDocumentTouchEnd) {\n Pointer.unbindDocumentTouchEnd = addEvent(ownerDoc, 'touchend', this.onDocumentTouchEnd.bind(this), { passive: false });\n }\n this.setPointerCapture();\n addEvent(this.chart, 'redraw', this.setPointerCapture.bind(this));\n }\n /**\n * Sets, or removes on update, pointer events using pointer capture for\n * tooltip.followTouchMove if any series has findNearestPointBy that\n * includes the y dimension.\n * @internal\n * @function Highcharts.Pointer#setPointerCapture\n */\n setPointerCapture() {\n // Only for touch\n if (!isTouchDevice) {\n return;\n }\n const pointer = this, events = pointer.pointerCaptureEventsToUnbind, chart = pointer.chart, container = chart.container, followTouchMove = chart.options.tooltip?.followTouchMove ?? true, shouldHave = followTouchMove && chart.series.some((series) => series.options.findNearestPointBy\n .indexOf('y') > -1);\n if (!pointer.hasPointerCapture && shouldHave) {\n // Add\n // Bind\n events.push(addEvent(container, 'pointerdown', (e) => {\n if (e.target?.hasPointerCapture(e.pointerId)) {\n e.target?.releasePointerCapture(e.pointerId);\n }\n }), addEvent(container, 'pointermove', (e) => {\n chart.pointer?.getPointFromEvent(e)?.onMouseOver(e);\n }));\n pointer.hasPointerCapture = true;\n }\n else if (pointer.hasPointerCapture && !shouldHave) {\n // Remove\n // Unbind\n events.forEach((e) => e());\n events.length = 0;\n pointer.hasPointerCapture = false;\n }\n }\n /**\n * Sets the index of the hovered chart and leaves the previous hovered\n * chart, to reset states like tooltip.\n * @internal\n * @function Highcharts.Pointer#setHoverChartIndex\n */\n setHoverChartIndex(e) {\n const chart = this.chart;\n const hoverChart = H.charts[pick(Pointer.hoverChartIndex, -1)];\n if (hoverChart &&\n hoverChart !== chart) {\n const relatedTargetObj = { relatedTarget: chart.container };\n if (e && !e?.relatedTarget) {\n // #17192, Non-enumerable properties of \"e\" are dropped with\n // spreading (...e). Using Object.assign ensures integrity.\n Object.assign({}, e, relatedTargetObj);\n }\n hoverChart.pointer?.onContainerMouseLeave(e || relatedTargetObj);\n }\n if (!hoverChart?.mouseIsDown) {\n Pointer.hoverChartIndex = chart.index;\n }\n }\n /**\n * General touch handler shared by touchstart and touchmove.\n * @internal\n * @function Highcharts.Pointer#touch\n */\n touch(e, start) {\n const { chart, pinchDown = [] } = this;\n let hasMoved, isInside;\n this.setHoverChartIndex();\n e = this.normalize(e);\n if (e.touches.length === 1) {\n isInside = chart.isInsidePlot(e.chartX - chart.plotLeft, e.chartY - chart.plotTop, {\n visiblePlotOnly: true\n });\n if (isInside && !chart.exporting?.openMenu) {\n // Run mouse events and display tooltip etc\n if (start) {\n this.runPointActions(e);\n }\n // Android fires touchmove events after the touchstart even if\n // the finger hasn't moved, or moved only a pixel or two. In iOS\n // however, the touchmove doesn't fire unless the finger moves\n // more than ~4px. So we emulate this behavior in Android by\n // checking how much it moved, and cancelling on small\n // distances. #3450. Tested and still relevant as of 2024.\n if (e.type === 'touchmove') {\n this.hasPinchMoved = hasMoved = pinchDown[0] ? // #5266\n (Math.pow(pinchDown[0].chartX - e.chartX, 2) +\n Math.pow(pinchDown[0].chartY - e.chartY, 2)) >= 16 :\n false;\n }\n if (pick(hasMoved, true)) {\n this.pinch(e);\n }\n }\n else if (start) {\n // Hide the tooltip on touching outside the plot area (#1203)\n this.reset();\n }\n // If inside, capture touch-drag and display tooltip. If not inside,\n // allow dragging the finger to scroll the page\n if ((chart.tooltip?.options.followTouchMove ?? true) &&\n isInside) {\n e.preventDefault();\n }\n }\n else if (e.touches.length === 2) {\n this.pinch(e);\n }\n }\n /**\n * Returns true if the chart is set up for zooming by single touch and the\n * event is capable\n * @internal\n * @function Highcharts.Pointer#touchSelect\n */\n touchSelect(e) {\n return Boolean(this.chart.zooming.singleTouch &&\n e.touches &&\n e.touches.length === 1);\n }\n /**\n * Resolve the zoomType option, this is reset on all touch start and mouse\n * down events.\n * @internal\n * @function Highcharts.Pointer#zoomOption\n */\n zoomOption(e) {\n const chart = this.chart, inverted = chart.inverted;\n let zoomType = chart.zooming.type || '', zoomX, zoomY;\n // Look for the pinchType option\n if (/touch/.test(e.type)) {\n zoomType = pick(chart.zooming.pinchType, zoomType);\n }\n this.zoomX = zoomX = /x/.test(zoomType);\n this.zoomY = zoomY = /y/.test(zoomType);\n this.zoomHor = (zoomX && !inverted) || (zoomY && inverted);\n this.zoomVert = (zoomY && !inverted) || (zoomX && inverted);\n this.hasZoom = (zoomX || zoomY) &&\n (checkActionKey(e, chart.zooming.key));\n }\n}\n/** @internal */\nPointer.unbindDocumentMouseUp = [];\n/* *\n *\n * Class Namespace\n *\n * */\n(function (Pointer) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /** @internal */\n function compose(ChartClass) {\n if (pushUnique(composed, 'Core.Pointer')) {\n addEvent(ChartClass, 'beforeRender', function () {\n /**\n * The Pointer that keeps track of mouse and touch\n * interaction.\n *\n * @memberof Highcharts.Chart\n * @name pointer\n * @type {Highcharts.Pointer}\n * @instance\n */\n this.pointer = new Pointer(this, this.options);\n });\n }\n }\n Pointer.compose = compose;\n})(Pointer || (Pointer = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default Pointer;\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * Chart position and scale.\n *\n * @interface Highcharts.ChartPositionObject\n */ /**\n* @name Highcharts.ChartPositionObject#left\n* @type {number}\n*/ /**\n* @name Highcharts.ChartPositionObject#scaleX\n* @type {number}\n*/ /**\n* @name Highcharts.ChartPositionObject#scaleY\n* @type {number}\n*/ /**\n* @name Highcharts.ChartPositionObject#top\n* @type {number}\n*/\n/**\n * One position in relation to an axis.\n *\n * @interface Highcharts.PointerAxisCoordinateObject\n */ /**\n* Related axis.\n*\n* @name Highcharts.PointerAxisCoordinateObject#axis\n* @type {Highcharts.Axis}\n*/ /**\n* Axis value.\n*\n* @name Highcharts.PointerAxisCoordinateObject#value\n* @type {number}\n*/\n/**\n * Positions in terms of axis values.\n *\n * @interface Highcharts.PointerAxisCoordinatesObject\n */ /**\n* Positions on the x-axis.\n* @name Highcharts.PointerAxisCoordinatesObject#xAxis\n* @type {Array<Highcharts.PointerAxisCoordinateObject>}\n*/ /**\n* Positions on the y-axis.\n* @name Highcharts.PointerAxisCoordinatesObject#yAxis\n* @type {Array<Highcharts.PointerAxisCoordinateObject>}\n*/\n/**\n * Pointer coordinates.\n *\n * @interface Highcharts.PointerCoordinatesObject\n */ /**\n* @name Highcharts.PointerCoordinatesObject#chartX\n* @type {number}\n*/ /**\n* @name Highcharts.PointerCoordinatesObject#chartY\n* @type {number}\n*/\n/**\n * A native browser mouse or touch event, extended with position information\n * relative to the {@link Chart.container}.\n *\n * @interface Highcharts.PointerEventObject\n * @extends global.PointerEvent\n */ /**\n* The X coordinate of the pointer interaction relative to the chart.\n*\n* @name Highcharts.PointerEventObject#chartX\n* @type {number}\n*/ /**\n* The Y coordinate of the pointer interaction relative to the chart.\n*\n* @name Highcharts.PointerEventObject#chartY\n* @type {number}\n*/\n/**\n * Axis-specific data of a selection.\n *\n * @interface Highcharts.SelectDataObject\n */ /**\n* The selected Axis.\n* @name Highcharts.SelectDataObject#axis\n* @type {Highcharts.Axis}\n*/ /**\n* The maximum axis value, either automatic or set manually.\n* @name Highcharts.SelectDataObject#max\n* @type {number}\n*/ /**\n* The minimum axis value, either automatic or set manually.\n* @name Highcharts.SelectDataObject#min\n* @type {number}\n*/\n/**\n * Object for select events.\n * The primary axes are `xAxis[0]` and `yAxis[0]`. Remember the unit of a\n * datetime axis is milliseconds since 1970-01-01 00:00:00.\n *\n * @interface Highcharts.SelectEventObject\n */ /**\n* The related browser event.\n* @name Highcharts.SelectEventObject#originalEvent\n* @type {global.Event}\n*/ /**\n* Prevents the default action for the event, if called.\n* @name Highcharts.SelectEventObject#preventDefault\n* @type {Function}\n*/ /**\n* Indicates a reset event to restore default state.\n* @name Highcharts.SelectEventObject#resetSelection\n* @type {boolean|undefined}\n*/ /**\n* Arrays containing the axes of each dimension and each axis' min and max\n* values.\n* @name Highcharts.SelectEventObject#xAxis\n* @type {Array<Highcharts.SelectDataObject>}\n*/ /**\n* Arrays containing the axes of each dimension and each axis' min and max\n* values.\n* @name Highcharts.SelectEventObject#yAxis\n* @type {Array<Highcharts.SelectDataObject>}\n*/\n''; // Keeps doclets above in JS file\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport A from '../Animation/AnimationUtilities.js';\nconst { animObject, setAnimation } = A;\nimport F from '../Foundation.js';\nconst { registerEventOptions } = F;\nimport H from '../Globals.js';\nconst { composed, marginNames } = H;\nimport Series from '../Series/Series.js';\nimport Point from '../Series/Point.js';\nimport R from '../Renderer/RendererUtilities.js';\nconst { distribute } = R;\nimport T from '../Templating.js';\nconst { format } = T;\nimport { addEvent, createElement, css, defined, discardElement, find, fireEvent, isNumber, merge, pick, pushUnique, relativeLength, stableSort, syncTimeout } from '../../Shared/Utilities.js';\n/* *\n *\n * Class\n *\n * */\n/**\n * The overview of the chart's series. The legend object is instantiated\n * internally in the chart constructor, and is available from the `chart.legend`\n * property. Each chart has only one legend.\n *\n * @class\n * @name Highcharts.Legend\n *\n * @param {Highcharts.Chart} chart\n * The chart instance.\n *\n * @param {Highcharts.LegendOptions} options\n * Legend options.\n */\nclass Legend {\n /* *\n *\n * Functions\n *\n * */\n /**\n * Initialize the legend.\n *\n * @internal\n * @function Highcharts.Legend#init\n *\n * @param {Highcharts.Chart} chart\n * The chart instance.\n *\n * @param {Highcharts.LegendOptions} options\n * Legend options.\n */\n constructor(chart, options) {\n /* *\n *\n * Properties\n *\n * */\n this.allItems = [];\n /** @internal */\n this.initialItemY = 0;\n /** @internal */\n this.itemHeight = 0;\n /** @internal */\n this.itemMarginBottom = 0;\n /** @internal */\n this.itemMarginTop = 0;\n /** @internal */\n this.itemX = 0;\n /** @internal */\n this.itemY = 0;\n /** @internal */\n this.lastItemY = 0;\n /** @internal */\n this.lastLineHeight = 0;\n /** @internal */\n this.legendHeight = 0;\n /** @internal */\n this.legendWidth = 0;\n /** @internal */\n this.maxItemWidth = 0;\n /** @internal */\n this.maxLegendWidth = 0;\n /** @internal */\n this.offsetWidth = 0;\n /** @internal */\n this.padding = 0;\n /** @internal */\n this.pages = [];\n /** @internal */\n this.symbolHeight = 0;\n /** @internal */\n this.symbolWidth = 0;\n /** @internal */\n this.titleHeight = 0;\n /** @internal */\n this.totalItemWidth = 0;\n /** @internal */\n this.widthOption = 0;\n /**\n * Chart of this legend.\n *\n * @readonly\n * @name Highcharts.Legend#chart\n * @type {Highcharts.Chart}\n */\n this.chart = chart;\n this.setOptions(options);\n if (options.enabled) {\n // Render it\n this.render();\n registerEventOptions(this, options);\n // Move checkboxes\n addEvent(this.chart, 'endResize', function () {\n this.legend.positionCheckboxes();\n });\n }\n // On Legend.init and Legend.update, make sure that proximate layout\n // events are either added or removed (#18362).\n addEvent(this.chart, 'render', () => {\n if (this.options.enabled && this.proximate) {\n this.proximatePositions();\n this.positionItems();\n }\n });\n }\n /**\n * @internal\n * @function Highcharts.Legend#setOptions\n * @param {Highcharts.LegendOptions} options\n */\n setOptions(options) {\n const padding = pick(options.padding, 8);\n /**\n * Legend options.\n *\n * @readonly\n * @name Highcharts.Legend#options\n * @type {Highcharts.LegendOptions}\n */\n this.options = options;\n if (!this.chart.styledMode) {\n this.itemStyle = options.itemStyle;\n this.itemHiddenStyle = merge(this.itemStyle, options.itemHiddenStyle);\n }\n this.itemMarginTop = options.itemMarginTop;\n this.itemMarginBottom = options.itemMarginBottom;\n this.padding = padding;\n this.initialItemY = padding - 5; // 5 is pixels above the text\n this.symbolWidth = pick(options.symbolWidth, 16);\n this.pages = [];\n this.proximate = options.layout === 'proximate' && !this.chart.inverted;\n // #12705: baseline has to be reset on every update\n this.baseline = void 0;\n }\n /**\n * Update the legend with new options. Equivalent to running `chart.update`\n * with a legend configuration option.\n *\n * @sample highcharts/legend/legend-update/\n * Legend update\n *\n * @function Highcharts.Legend#update\n *\n * @param {Highcharts.LegendOptions} options\n * Legend options.\n *\n * @param {boolean} [redraw=true]\n * Whether to redraw the chart after the axis is altered. If doing more\n * operations on the chart, it is a good idea to set redraw to false and\n * call {@link Chart#redraw} after. Whether to redraw the chart.\n *\n * @emits Highcharts.Legends#event:afterUpdate\n */\n update(options, redraw) {\n const chart = this.chart;\n this.setOptions(merge(true, this.options, options));\n if ('events' in this.options) {\n // Legend event handlers\n registerEventOptions(this, this.options);\n }\n this.destroy();\n chart.isDirtyLegend = chart.isDirtyBox = true;\n if (pick(redraw, true)) {\n chart.redraw();\n }\n fireEvent(this, 'afterUpdate', { redraw });\n }\n /**\n * Set the colors for the legend item.\n *\n * @internal\n * @function Highcharts.Legend#colorizeItem\n *\n * @param {Highcharts.BubbleLegendItem|Highcharts.Point|Highcharts.Series} item\n * A Series or Point instance.\n *\n * @param {boolean} [visible=false]\n * Dimmed or colored.\n *\n * @todo\n * Make events official: Fires the event `afterColorizeItem`.\n */\n colorizeItem(item, visible) {\n const originalColor = item.color, { area, group, label, line, symbol } = item.legendItem || {};\n if (item instanceof Series || item instanceof Point) {\n item.color = item.options?.legendSymbolColor || originalColor;\n }\n group?.[visible ? 'removeClass' : 'addClass']('highcharts-legend-item-hidden');\n if (!this.chart.styledMode) {\n const { itemHiddenStyle = {} } = this, hiddenColor = itemHiddenStyle.color, { fillColor, lineColor } = item.options, colorizeHidden = (attr) => {\n if (!visible) {\n if (attr.fill) {\n attr.fill = hiddenColor;\n }\n if (attr.stroke) {\n attr.stroke = hiddenColor;\n }\n }\n return attr;\n };\n label?.css(merge(visible ? this.itemStyle : itemHiddenStyle));\n line?.attr(colorizeHidden({ stroke: lineColor || item.color }));\n // Apply legend symbol attributes\n symbol?.attr(colorizeHidden(item.series ?\n // When `legendType` is `point`, like pie series\n item.series.pointAttribs?.(item) :\n // When `legendType` is `series`, like line or column series\n item.pointAttribs?.() || { fill: item.color }));\n area?.attr(colorizeHidden({\n fill: fillColor || item.color,\n 'fill-opacity': fillColor ?\n 1 :\n (item.options.fillOpacity ?? 0.75)\n }));\n }\n item.color = originalColor;\n fireEvent(this, 'afterColorizeItem', { item, visible });\n }\n /**\n * @internal\n * @function Highcharts.Legend#positionItems\n */\n positionItems() {\n // Now that the legend width and height are established, put the items\n // in the final position\n this.allItems.forEach(this.positionItem, this);\n if (!this.chart.isResizing) {\n this.positionCheckboxes();\n }\n }\n /**\n * Position the legend item.\n *\n * @internal\n * @function Highcharts.Legend#positionItem\n * @param {Highcharts.BubbleLegendItem|Highcharts.Point|Highcharts.Series} item\n * The item to position\n */\n positionItem(item) {\n const legend = this, { group, x = 0, y = 0 } = item.legendItem || {}, options = legend.options, symbolPadding = options.symbolPadding, ltr = !options.rtl, checkbox = item.checkbox;\n if (group?.element) {\n const attribs = {\n translateX: ltr ?\n x :\n legend.legendWidth - x - 2 * symbolPadding - 4,\n translateY: y\n };\n const complete = () => {\n fireEvent(this, 'afterPositionItem', { item });\n };\n group[defined(group.translateY) ? 'animate' : 'attr'](attribs, void 0, complete);\n }\n if (checkbox) {\n checkbox.x = x;\n checkbox.y = y;\n }\n }\n /**\n * Destroy a single legend item, used internally on removing series items.\n *\n * @internal\n * @function Highcharts.Legend#destroyItem\n * @param {Highcharts.BubbleLegendItem|Highcharts.Point|Highcharts.Series} item\n * The item to remove\n */\n destroyItem(item) {\n const legendItem = item.legendItem || {};\n // Destroy SVG elements\n for (const key of ['group', 'label', 'line', 'symbol']) {\n if (legendItem[key]) {\n legendItem[key] = legendItem[key].destroy();\n }\n }\n item.checkbox = discardElement(item.checkbox);\n item.legendItem = void 0;\n }\n /**\n * Destroy the legend. Used internally. To reflow objects, `chart.redraw`\n * must be called after destruction.\n *\n * @internal\n * @function Highcharts.Legend#destroy\n */\n destroy() {\n const legend = this;\n // Destroy items\n for (const item of this.getAllItems()) {\n this.destroyItem(item);\n }\n // Destroy legend elements\n for (const key of [\n 'clipRect',\n 'up',\n 'down',\n 'pager',\n 'nav',\n 'box',\n 'title',\n 'group'\n ]) {\n if (legend[key]) {\n legend[key] = legend[key].destroy();\n }\n }\n this.display = null; // Reset in .render on update.\n }\n /**\n * Position the checkboxes after the width is determined.\n *\n * @internal\n * @function Highcharts.Legend#positionCheckboxes\n */\n positionCheckboxes() {\n const alignAttr = this.group?.alignAttr, clipHeight = this.clipHeight || this.legendHeight, titleHeight = this.titleHeight;\n let translateY;\n if (alignAttr) {\n translateY = alignAttr.translateY;\n this.allItems.forEach(function (item) {\n const checkbox = item.checkbox;\n let top;\n if (checkbox) {\n top = translateY + titleHeight + checkbox.y +\n (this.scrollOffset || 0) + 3;\n css(checkbox, {\n left: (alignAttr.translateX + item.checkboxOffset +\n checkbox.x - 20) + 'px',\n top: top + 'px',\n display: this.proximate || (top > translateY - 6 &&\n top < translateY + clipHeight - 6) ?\n '' :\n 'none'\n });\n }\n }, this);\n }\n }\n /**\n * Render the legend title on top of the legend.\n *\n * @internal\n * @function Highcharts.Legend#renderTitle\n */\n renderTitle() {\n const options = this.options, padding = this.padding, titleOptions = options.title;\n let bBox, titleHeight = 0;\n if (titleOptions.text) {\n if (!this.title) {\n /**\n * SVG element of the legend title.\n *\n * @readonly\n * @name Highcharts.Legend#title\n * @type {Highcharts.SVGElement}\n */\n this.title = this.chart.renderer.label(titleOptions.text, padding - 3, padding - 4, void 0, void 0, void 0, options.useHTML, void 0, 'legend-title')\n .attr({ zIndex: 1 });\n if (!this.chart.styledMode) {\n this.title.css(titleOptions.style);\n }\n this.title.add(this.group);\n }\n // Set the max title width (#7253)\n if (!titleOptions.width) {\n this.title.css({\n width: this.maxLegendWidth + 'px'\n });\n }\n bBox = this.title.getBBox();\n titleHeight = bBox.height;\n this.offsetWidth = bBox.width; // #1717\n this.contentGroup.attr({ translateY: titleHeight });\n }\n this.titleHeight = titleHeight;\n }\n /**\n * Set the legend item text.\n *\n * @function Highcharts.Legend#setText\n *\n * @param {Highcharts.Point|Highcharts.Series} item\n * The item for which to update the text in the legend.\n */\n setText(item) {\n const options = this.options;\n item.legendItem.label.attr({\n text: options.labelFormat ?\n format(options.labelFormat, item, this.chart) :\n options.labelFormatter.call(item, item)\n });\n }\n /**\n * Render a single specific legend item. Called internally from the `render`\n * function.\n *\n * @internal\n * @function Highcharts.Legend#renderItem\n * @param {Highcharts.BubbleLegendItem|Highcharts.Point|Highcharts.Series} item\n * The item to render.\n */\n renderItem(item) {\n const legend = this, legendItem = item.legendItem = item.legendItem || {}, chart = legend.chart, renderer = chart.renderer, options = legend.options, horizontal = options.layout === 'horizontal', symbolWidth = legend.symbolWidth, symbolPadding = options.symbolPadding || 0, itemStyle = legend.itemStyle, itemHiddenStyle = legend.itemHiddenStyle, itemDistance = horizontal ? pick(options.itemDistance, 20) : 0, ltr = !options.rtl, isSeries = !item.series, series = !isSeries && item.series.drawLegendSymbol ?\n item.series :\n item, seriesOptions = series.options, showCheckbox = (!!legend.createCheckboxForItem &&\n seriesOptions &&\n seriesOptions.showCheckbox), useHTML = options.useHTML, itemClassName = item.options.className;\n let label = legendItem.label, \n // Full width minus text width\n itemExtraWidth = symbolWidth + symbolPadding +\n itemDistance + (showCheckbox ? 20 : 0);\n if (!label) { // Generate it once, later move it\n // Generate the group box, a group to hold the symbol and text. Text\n // is to be appended in Legend class.\n legendItem.group = renderer\n .g('legend-item')\n .addClass('highcharts-' + series.type + '-series ' +\n 'highcharts-color-' + item.colorIndex +\n (itemClassName ? ' ' + itemClassName : '') +\n (isSeries ?\n ' highcharts-series-' + item.index :\n ''))\n .attr({ zIndex: 1 })\n .add(legend.scrollGroup);\n // Generate the list item text and add it to the group\n legendItem.label = label = renderer.text('', ltr ?\n symbolWidth + symbolPadding :\n -symbolPadding, legend.baseline || 0, useHTML);\n if (!chart.styledMode) {\n // Merge to prevent modifying original (#1021)\n label.css(merge(item.visible ?\n itemStyle :\n itemHiddenStyle));\n }\n label\n .attr({\n align: ltr ? 'left' : 'right',\n zIndex: 2\n })\n .add(legendItem.group);\n // Get the baseline for the first item - the font size is equal for\n // all\n if (!legend.baseline) {\n legend.fontMetrics = renderer.fontMetrics(label);\n legend.baseline =\n legend.fontMetrics.f + 3 + legend.itemMarginTop;\n label.attr('y', legend.baseline);\n legend.symbolHeight =\n pick(options.symbolHeight, legend.fontMetrics.f);\n if (options.squareSymbol) {\n legend.symbolWidth = pick(options.symbolWidth, Math.max(legend.symbolHeight, 16));\n itemExtraWidth = legend.symbolWidth + symbolPadding +\n itemDistance + (showCheckbox ? 20 : 0);\n if (ltr) {\n label.attr('x', legend.symbolWidth + symbolPadding);\n }\n }\n }\n // Draw the legend symbol inside the group box\n series.drawLegendSymbol(legend, item);\n if (legend.setItemEvents) {\n legend.setItemEvents(item, label, useHTML);\n }\n }\n // Add the HTML checkbox on top\n if (showCheckbox && !item.checkbox && legend.createCheckboxForItem) {\n legend.createCheckboxForItem(item);\n }\n // Colorize the items\n legend.colorizeItem(item, item.visible);\n // Take care of max width and text overflow (#6659)\n if (chart.styledMode || !itemStyle.width) {\n label.css({\n width: (Math.min(options.itemWidth ||\n legend.widthOption ||\n chart.spacingBox.width, options.maxWidth ? relativeLength(options.maxWidth, chart.chartWidth) : Infinity) - itemExtraWidth) + 'px'\n });\n }\n // Always update the text\n legend.setText(item);\n // Calculate the positions for the next line\n const bBox = label.getBBox();\n const fontMetricsH = legend.fontMetrics?.h || 0;\n item.itemWidth = item.checkboxOffset =\n options.itemWidth ||\n legendItem.labelWidth ||\n bBox.width + itemExtraWidth;\n legend.maxItemWidth = Math.max(legend.maxItemWidth, item.itemWidth);\n legend.totalItemWidth += item.itemWidth;\n legend.itemHeight = item.itemHeight = Math.round(legendItem.labelHeight ||\n // Use bBox for multiline (#16398)\n (bBox.height > fontMetricsH * 1.5 ? bBox.height : fontMetricsH));\n }\n /**\n * Get the position of the item in the layout. We now know the\n * maxItemWidth from the previous loop.\n *\n * @internal\n * @function Highcharts.Legend#layoutItem\n * @param {Highcharts.BubbleLegendItem|Highcharts.Point|Highcharts.Series} item\n */\n layoutItem(item) {\n const options = this.options, padding = this.padding, horizontal = options.layout === 'horizontal', itemHeight = item.itemHeight, itemMarginBottom = this.itemMarginBottom, itemMarginTop = this.itemMarginTop, itemDistance = horizontal ? pick(options.itemDistance, 20) : 0, maxLegendWidth = this.maxLegendWidth, itemWidth = (options.alignColumns &&\n this.totalItemWidth > maxLegendWidth) ?\n this.maxItemWidth :\n item.itemWidth, legendItem = item.legendItem || {};\n // If the item exceeds the width, start a new line\n if (horizontal &&\n this.itemX - padding + itemWidth > maxLegendWidth) {\n this.itemX = padding;\n if (this.lastLineHeight) { // Not for the first line (#10167)\n this.itemY += (itemMarginTop +\n this.lastLineHeight +\n itemMarginBottom);\n }\n this.lastLineHeight = 0; // Reset for next line (#915, #3976)\n }\n // Set the edge positions\n this.lastItemY = itemMarginTop + this.itemY + itemMarginBottom;\n this.lastLineHeight = Math.max(// #915\n itemHeight, this.lastLineHeight);\n // Cache the position of the newly generated or reordered items\n legendItem.x = this.itemX;\n legendItem.y = this.itemY;\n // Advance\n if (horizontal) {\n this.itemX += itemWidth;\n }\n else {\n this.itemY +=\n itemMarginTop + itemHeight + itemMarginBottom;\n this.lastLineHeight = itemHeight;\n }\n // The width of the widest item\n this.offsetWidth = this.widthOption || Math.max((horizontal ? this.itemX - padding - (item.checkbox ?\n // Decrease by itemDistance only when no checkbox #4853\n 0 :\n itemDistance) : itemWidth) + padding, this.offsetWidth);\n }\n /**\n * Get all items, which is one item per series for most series and one\n * item per point for pie series and its derivatives. Fires the event\n * `afterGetAllItems`.\n *\n * @internal\n * @function Highcharts.Legend#getAllItems\n * @return {Array<(Highcharts.BubbleLegendItem|Highcharts.Point|Highcharts.Series)>}\n * The current items in the legend.\n * @emits Highcharts.Legend#event:afterGetAllItems\n */\n getAllItems() {\n let allItems = [];\n this.chart.series.forEach(function (series) {\n const seriesOptions = series?.options;\n // Handle showInLegend. If the series is linked to another series,\n // defaults to false.\n if (series && pick(seriesOptions.showInLegend, !defined(seriesOptions.linkedTo) ? void 0 : false, true)) {\n // Use points or series for the legend item depending on\n // legendType\n allItems = allItems.concat(series.legendItem?.labels ||\n (seriesOptions.legendType === 'point' ?\n series.data :\n series));\n }\n });\n fireEvent(this, 'afterGetAllItems', { allItems });\n return allItems;\n }\n /**\n * Get a short, three letter string reflecting the alignment and layout.\n *\n * @internal\n * @function Highcharts.Legend#getAlignment\n * @return {string}\n * The alignment, empty string if floating\n */\n getAlignment() {\n const options = this.options;\n // Use the first letter of each alignment option in order to detect\n // the side. (#4189 - use charAt(x) notation instead of [x] for IE7)\n if (this.proximate) {\n return options.align.charAt(0) + 'tv';\n }\n return options.floating ? '' : (options.align.charAt(0) +\n options.verticalAlign.charAt(0) +\n options.layout.charAt(0));\n }\n /**\n * Adjust the chart margins by reserving space for the legend on only one\n * side of the chart. If the position is set to a corner, top or bottom is\n * reserved for horizontal legends and left or right for vertical ones.\n *\n * @internal\n * @function Highcharts.Legend#adjustMargins\n * @param {Array<number>} margin\n * @param {Array<number>} spacing\n */\n adjustMargins(margin, spacing) {\n const chart = this.chart, options = this.options, alignment = this.getAlignment();\n if (alignment) {\n ([\n /(lth|ct|rth)/,\n /(rtv|rm|rbv)/,\n /(rbh|cb|lbh)/,\n /(lbv|lm|ltv)/\n ]).forEach((alignments, side) => {\n if (alignments.test(alignment) && !defined(margin[side])) {\n // Now we have detected on which side of the chart we should\n // reserve space for the legend\n chart[marginNames[side]] = Math.max(chart[marginNames[side]], (chart.legend[(side + 1) % 2 ? 'legendHeight' : 'legendWidth'] +\n [1, -1, -1, 1][side] * (options[(side % 2) ? 'x' : 'y']) +\n (options.margin ?? 12) +\n spacing[side] +\n (chart.titleOffset[side] || 0)));\n }\n });\n }\n }\n /**\n * @internal\n * @function Highcharts.Legend#proximatePositions\n */\n proximatePositions() {\n const chart = this.chart, boxes = [], alignLeft = this.options.align === 'left';\n this.allItems.forEach(function (item) {\n let lastPoint, height, useFirstPoint = alignLeft, target, top;\n if (item.yAxis) {\n if (item.xAxis.options.reversed) {\n useFirstPoint = !useFirstPoint;\n }\n if (item.points) {\n lastPoint = find(useFirstPoint ?\n item.points :\n item.points.slice(0).reverse(), function (item) {\n return isNumber(item.plotY);\n });\n }\n height = this.itemMarginTop +\n item.legendItem.label.getBBox().height +\n this.itemMarginBottom;\n top = item.yAxis.top - chart.plotTop;\n if (item.visible) {\n target = lastPoint ?\n lastPoint.plotY :\n item.yAxis.height;\n target += top - 0.3 * height;\n }\n else {\n target = top + item.yAxis.height;\n }\n boxes.push({\n target: target,\n size: height,\n item\n });\n }\n }, this);\n let legendItem;\n for (const box of distribute(boxes, chart.plotHeight)) {\n legendItem = box.item.legendItem || {};\n if (isNumber(box.pos)) {\n legendItem.y = chart.plotTop - chart.spacing[0] + box.pos;\n }\n }\n }\n /**\n * Render the legend. This method can be called both before and after\n * `chart.render`. If called after, it will only rearrange items instead\n * of creating new ones. Called internally on initial render and after\n * redraws.\n *\n * @internal\n * @function Highcharts.Legend#render\n */\n render() {\n const legend = this, chart = legend.chart, chartSpacingBoxWidth = chart.spacingBox.width, renderer = chart.renderer, options = legend.options, padding = legend.padding, \n // Add each series or point\n allItems = legend.getAllItems();\n let display, legendWidth, legendHeight, legendGroup = legend.group, allowedWidth, box = legend.box;\n legend.itemX = padding;\n legend.itemY = legend.initialItemY;\n legend.offsetWidth = 0;\n legend.lastItemY = 0;\n legend.widthOption = relativeLength(options.width, chartSpacingBoxWidth - padding);\n // Compute how wide the legend is allowed to be\n allowedWidth = chartSpacingBoxWidth - 2 * padding - options.x;\n if (['rm', 'lm'].indexOf(legend.getAlignment().substring(0, 2)) > -1) {\n allowedWidth /= 2;\n }\n legend.maxLegendWidth = legend.widthOption || allowedWidth;\n if (!legendGroup) {\n /**\n * SVG group of the legend.\n *\n * @readonly\n * @name Highcharts.Legend#group\n * @type {Highcharts.SVGElement}\n */\n legend.group = legendGroup = renderer\n .g('legend')\n .addClass(options.className || '')\n .attr({ zIndex: 7 })\n .add();\n legend.contentGroup = renderer\n .g()\n .attr({ zIndex: 1 }) // Above background\n .add(legendGroup);\n legend.scrollGroup = renderer\n .g()\n .add(legend.contentGroup);\n }\n legend.renderTitle();\n // Sort by legendIndex\n stableSort(allItems, (a, b) => (a.options?.legendIndex || 0) -\n (b.options?.legendIndex || 0));\n // Reversed legend\n if (options.reversed) {\n allItems.reverse();\n }\n /**\n * All items for the legend, which is an array of series for most series\n * and an array of points for pie series and its derivatives.\n *\n * @readonly\n * @name Highcharts.Legend#allItems\n * @type {Array<(Highcharts.Point|Highcharts.Series)>}\n */\n legend.allItems = allItems;\n legend.display = display = !!allItems.length;\n // Render the items. First we run a loop to set the text and properties\n // and read all the bounding boxes. The next loop computes the item\n // positions based on the bounding boxes.\n legend.lastLineHeight = 0;\n legend.maxItemWidth = 0;\n legend.totalItemWidth = 0;\n legend.itemHeight = 0;\n allItems.forEach(legend.renderItem, legend);\n allItems.forEach(legend.layoutItem, legend);\n // Get the box\n legendWidth = (options.maxWidth ?\n Math.min((legend.widthOption || legend.offsetWidth), allowedWidth, relativeLength(options.maxWidth, chart.chartWidth) || Infinity) :\n (legend.widthOption || legend.offsetWidth)) + padding;\n legendHeight = legend.lastItemY + legend.lastLineHeight +\n legend.titleHeight;\n legendHeight = legend.handleOverflow(legendHeight);\n legendHeight += padding;\n // Draw the border and/or background\n if (!box) {\n /**\n * SVG element of the legend box.\n *\n * @readonly\n * @name Highcharts.Legend#box\n * @type {Highcharts.SVGElement}\n */\n legend.box = box = renderer.rect()\n .addClass('highcharts-legend-box')\n .attr({\n r: options.borderRadius\n })\n .add(legendGroup);\n }\n // Presentational\n if (!chart.styledMode) {\n box\n .attr({\n stroke: options.borderColor,\n 'stroke-width': options.borderWidth || 0,\n fill: options.backgroundColor || 'none'\n })\n .shadow(options.shadow);\n }\n if (legendWidth > 0 && legendHeight > 0) {\n box[box.placed ? 'animate' : 'attr'](box.crisp.call({}, {\n x: 0,\n y: 0,\n width: legendWidth,\n height: legendHeight\n }, box.strokeWidth()));\n }\n // Hide the border if no items\n legendGroup[display ? 'show' : 'hide']();\n // Open for responsiveness\n if (chart.styledMode && legendGroup.getStyle('display') === 'none') {\n legendWidth = legendHeight = 0;\n }\n legend.legendWidth = legendWidth;\n legend.legendHeight = legendHeight;\n if (display) {\n legend.align();\n }\n if (!this.proximate) {\n this.positionItems();\n }\n fireEvent(this, 'afterRender');\n }\n /**\n * Align the legend to chart's box.\n *\n * @internal\n * @function Highcharts.align\n * @param {Highcharts.BBoxObject} alignTo\n */\n align(alignTo = this.chart.spacingBox) {\n const chart = this.chart, options = this.options;\n // If aligning to the top and the layout is horizontal, adjust for\n // the title (#7428)\n let y = alignTo.y;\n if (/(lth|ct|rth)/.test(this.getAlignment()) &&\n chart.titleOffset[0] > 0) {\n y += chart.titleOffset[0];\n }\n else if (/(lbh|cb|rbh)/.test(this.getAlignment()) &&\n chart.titleOffset[2] > 0) {\n y -= chart.titleOffset[2];\n }\n if (y !== alignTo.y) {\n alignTo = merge(alignTo, { y });\n }\n if (!chart.hasRendered) {\n // Avoid animation when adjusting alignment for responsiveness and\n // colorAxis label layout\n this.group.placed = false;\n }\n this.group.align(merge(options, {\n width: this.legendWidth,\n height: this.legendHeight,\n verticalAlign: this.proximate ? 'top' : options.verticalAlign\n }), true, alignTo);\n }\n /**\n * Set up the overflow handling by adding navigation with up and down arrows\n * below the legend.\n *\n * @internal\n * @function Highcharts.Legend#handleOverflow\n */\n handleOverflow(legendHeight) {\n const legend = this, chart = this.chart, renderer = chart.renderer, options = this.options, optionsY = options.y, alignTop = options.verticalAlign === 'top', padding = this.padding, maxHeight = options.maxHeight, navOptions = options.navigation, animation = pick(navOptions.animation, true), arrowSize = navOptions.arrowSize || 12, pages = this.pages, allItems = this.allItems, clipToHeight = function (height) {\n if (typeof height === 'number') {\n clipRect.attr({\n height: height\n });\n }\n else if (clipRect) { // Reset (#5912)\n legend.clipRect = clipRect.destroy();\n legend.contentGroup.clip();\n }\n // Use HTML\n if (legend.contentGroup.div) {\n legend.contentGroup.div.style.clip = height ?\n 'rect(' + padding + 'px,9999px,' +\n (padding + height) + 'px,0)' :\n 'auto';\n }\n }, addTracker = function (key) {\n legend[key] = renderer\n .circle(0, 0, arrowSize * 1.3)\n .translate(arrowSize / 2, arrowSize / 2)\n .add(nav);\n if (!chart.styledMode) {\n legend[key].attr('fill', 'rgba(0,0,0,0.0001)');\n }\n return legend[key];\n };\n let clipHeight, lastY, legendItem, lastLegendItem, spaceHeight = (chart.spacingBox.height +\n (alignTop ? -optionsY : optionsY) - padding), nav = this.nav, clipRect = this.clipRect;\n // Adjust the height\n if (options.layout === 'horizontal' &&\n options.verticalAlign !== 'middle' &&\n !options.floating) {\n spaceHeight /= 2;\n }\n if (maxHeight) {\n spaceHeight = Math.min(spaceHeight, maxHeight);\n }\n // Reset the legend height and adjust the clipping rectangle\n pages.length = 0;\n if (legendHeight &&\n spaceHeight > 0 &&\n legendHeight > spaceHeight &&\n navOptions.enabled !== false) {\n this.clipHeight = clipHeight =\n Math.max(spaceHeight - 20 - this.titleHeight - padding, 0);\n this.currentPage = pick(this.currentPage, 1);\n this.fullHeight = legendHeight;\n // Fill pages with Y positions so that the top of each a legend item\n // defines the scroll top for each page (#2098)\n allItems.forEach((item, i) => {\n legendItem = item.legendItem || {};\n const y = legendItem.y || 0, h = Math.round(legendItem.label.getBBox().height);\n let len = pages.length;\n if (!len || (y - pages[len - 1] > clipHeight &&\n (lastY || y) !== pages[len - 1])) {\n pages.push(lastY || y);\n len++;\n }\n // Keep track of which page each item is on\n legendItem.pageIx = len - 1;\n if (lastY && lastLegendItem) {\n lastLegendItem.pageIx = len - 1;\n }\n // Add the last page if needed (#2617, #13683)\n if (\n // Check the last item\n i === allItems.length - 1 &&\n // If adding next page is needed (#18768)\n y + h - pages[len - 1] > clipHeight &&\n y > pages[len - 1]) {\n pages.push(y);\n legendItem.pageIx = len;\n }\n if (y !== lastY) {\n lastY = y;\n }\n lastLegendItem = legendItem;\n });\n // Only apply clipping if needed. Clipping causes blurred legend in\n // PDF export (#1787)\n if (!clipRect) {\n clipRect = legend.clipRect =\n renderer.clipRect(0, padding - 2, 9999, 0);\n legend.contentGroup.clip(clipRect);\n }\n clipToHeight(clipHeight);\n // Add navigation elements\n if (!nav) {\n this.nav = nav = renderer.g()\n .attr({ zIndex: 1 })\n .add(this.group);\n this.up = renderer\n .symbol('triangle', 0, 0, arrowSize, arrowSize)\n .add(nav);\n addTracker('upTracker')\n .on('click', function () {\n legend.scroll(-1, animation);\n });\n this.pager = renderer.text('', 15, 10)\n .addClass('highcharts-legend-navigation');\n if (!chart.styledMode && navOptions.style) {\n this.pager.css(navOptions.style);\n }\n this.pager.add(nav);\n this.down = renderer\n .symbol('triangle-down', 0, 0, arrowSize, arrowSize)\n .add(nav);\n addTracker('downTracker')\n .on('click', function () {\n legend.scroll(1, animation);\n });\n }\n // Set initial position\n legend.scroll(0);\n legendHeight = spaceHeight;\n // Reset\n }\n else if (nav) {\n clipToHeight();\n this.nav = nav.destroy(); // #6322\n this.scrollGroup.attr({\n translateY: 1\n });\n this.clipHeight = 0; // #1379\n }\n return legendHeight;\n }\n /**\n * Scroll the legend by a number of pages.\n *\n * @internal\n * @function Highcharts.Legend#scroll\n *\n * @param {number} scrollBy\n * The number of pages to scroll.\n *\n * @param {boolean|Partial<Highcharts.AnimationOptionsObject>} [animation]\n * Whether and how to apply animation.\n */\n scroll(scrollBy, animation) {\n const chart = this.chart, pages = this.pages, pageCount = pages.length, clipHeight = this.clipHeight, navOptions = this.options.navigation, pager = this.pager, padding = this.padding;\n let currentPage = this.currentPage + scrollBy;\n // When resizing while looking at the last page\n if (currentPage > pageCount) {\n currentPage = pageCount;\n }\n if (currentPage > 0) {\n if (typeof animation !== 'undefined') {\n setAnimation(animation, chart);\n }\n this.nav.attr({\n translateX: padding,\n translateY: clipHeight + this.padding + 7 + this.titleHeight,\n visibility: 'inherit'\n });\n [this.up, this.upTracker].forEach(function (elem) {\n elem.attr({\n 'class': currentPage === 1 ?\n 'highcharts-legend-nav-inactive' :\n 'highcharts-legend-nav-active'\n });\n });\n pager.attr({\n text: currentPage + '/' + pageCount\n });\n [this.down, this.downTracker].forEach(function (elem) {\n elem.attr({\n // Adjust to text width\n x: 18 + this.pager.getBBox().width,\n 'class': currentPage === pageCount ?\n 'highcharts-legend-nav-inactive' :\n 'highcharts-legend-nav-active'\n });\n }, this);\n if (!chart.styledMode) {\n this.up\n .attr({\n fill: currentPage === 1 ?\n navOptions.inactiveColor :\n navOptions.activeColor\n });\n this.upTracker\n .css({\n cursor: currentPage === 1 ? 'default' : 'pointer'\n });\n this.down\n .attr({\n fill: currentPage === pageCount ?\n navOptions.inactiveColor :\n navOptions.activeColor\n });\n this.downTracker\n .css({\n cursor: currentPage === pageCount ?\n 'default' :\n 'pointer'\n });\n }\n this.scrollOffset = -pages[currentPage - 1] + this.initialItemY;\n this.scrollGroup.animate({\n translateY: this.scrollOffset\n });\n this.currentPage = currentPage;\n this.positionCheckboxes();\n // Fire event after scroll animation is complete\n const animOptions = animObject(pick(animation, chart.renderer.globalAnimation, true));\n syncTimeout(() => {\n fireEvent(this, 'afterScroll', { currentPage });\n }, animOptions.duration);\n }\n }\n /**\n * @internal\n * @function Highcharts.Legend#setItemEvents\n * @param {Highcharts.BubbleLegendItem|Point|Highcharts.Series} item\n * @param {Highcharts.SVGElement} legendLabel\n * @param {boolean} [useHTML=false]\n * @emits Highcharts.Legend#event:itemClick\n */\n setItemEvents(item, legendLabel, useHTML) {\n const legend = this, legendItem = item.legendItem || {}, boxWrapper = legend.chart.renderer.boxWrapper, isPoint = item instanceof Point, isSeries = item instanceof Series, activeClass = 'highcharts-legend-' +\n (isPoint ? 'point' : 'series') + '-active', styledMode = legend.chart.styledMode, \n // When `useHTML`, the symbol is rendered in other group, so\n // we need to apply events listeners to both places\n legendElements = useHTML ?\n [legendLabel, legendItem.symbol] :\n [legendItem.group];\n const setOtherItemsState = (state) => {\n legend.allItems.forEach((otherItem) => {\n if (item !== otherItem) {\n [otherItem]\n .concat(otherItem.linkedSeries || [])\n .forEach((otherItem) => {\n otherItem.setState(state, !isPoint);\n });\n }\n });\n };\n // Set the events on the item group, or in case of useHTML, the item\n // itself (#1249)\n for (const element of legendElements) {\n if (element) {\n element\n .on('mouseover', function () {\n if (item.visible) {\n setOtherItemsState('inactive');\n }\n item.setState('hover');\n // A CSS class to dim or hide other than the hovered\n // series.\n // Works only if hovered series is visible (#10071).\n if (item.visible) {\n boxWrapper.addClass(activeClass);\n }\n if (!styledMode) {\n legendLabel.css(legend.options.itemHoverStyle);\n }\n })\n .on('mouseout', function () {\n if (!legend.chart.styledMode) {\n legendLabel.css(merge(item.visible ?\n legend.itemStyle :\n legend.itemHiddenStyle));\n }\n setOtherItemsState('');\n // A CSS class to dim or hide other than the hovered\n // series.\n boxWrapper.removeClass(activeClass);\n item.setState();\n })\n .on('click', function (event) {\n const defaultItemClick = function () {\n if (item.setVisible) {\n item.setVisible();\n }\n // Reset inactive state\n setOtherItemsState(item.visible ? 'inactive' : '');\n };\n // A CSS class to dim or hide other than the hovered\n // series. Event handling in iOS causes the activeClass\n // to be added prior to click in some cases (#7418).\n boxWrapper.removeClass(activeClass);\n fireEvent(legend, 'itemClick', {\n // Pass over the click/touch event. #4.\n browserEvent: event,\n legendItem: item,\n // Provide context in case user arrow function\n context: legend\n }, defaultItemClick);\n // Deprecated logic\n // Click the name or symbol\n if (isPoint) {\n item.firePointEvent('legendItemClick', {\n browserEvent: event\n });\n }\n else if (isSeries) {\n fireEvent(item, 'legendItemClick', {\n browserEvent: event\n });\n }\n });\n }\n }\n }\n /**\n * @internal\n * @function Highcharts.Legend#createCheckboxForItem\n * @param {Highcharts.BubbleLegendItem|Point|Highcharts.Series} item\n * @emits Highcharts.Series#event:checkboxClick\n */\n createCheckboxForItem(item) {\n const legend = this;\n item.checkbox = createElement('input', {\n type: 'checkbox',\n className: 'highcharts-legend-checkbox',\n checked: item.selected,\n defaultChecked: item.selected // Required by IE7\n }, legend.options.itemCheckboxStyle, legend.chart.container);\n addEvent(item.checkbox, 'click', function (event) {\n const target = event.target;\n fireEvent(item.series || item, 'checkboxClick', {\n checked: target.checked,\n item: item\n }, function () {\n item.select();\n });\n });\n }\n}\n/* *\n *\n * Class Namespace\n *\n * */\n(function (Legend) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /** @internal */\n function compose(ChartClass) {\n if (pushUnique(composed, 'Core.Legend')) {\n addEvent(ChartClass, 'beforeMargins', function () {\n /**\n * The legend contains an interactive overview over chart items,\n * usually individual series or points depending on the series\n * type. The color axis and bubble legend are also rendered in\n * the chart legend.\n *\n * @name Highcharts.Chart#legend\n * @type {Highcharts.Legend}\n */\n this.legend = new Legend(this, this.options.legend);\n });\n }\n }\n Legend.compose = compose;\n})(Legend || (Legend = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default Legend;\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * @interface Highcharts.LegendItemObject\n */ /**\n* @name Highcharts.LegendItemObject#item\n* @type {Highcharts.SVGElement|undefined}\n*/ /**\n* @name Highcharts.LegendItemObject#line\n* @type {Highcharts.SVGElement|undefined}\n*/ /**\n* @name Highcharts.LegendItemObject#symbol\n* @type {Highcharts.SVGElement|undefined}\n*/ /**\n* @name Highcharts.LegendItemObject#label\n* @type {Highcharts.SVGElement|undefined}\n*/\n/**\n * Gets fired when the legend item is clicked. The default\n * action is to toggle the visibility of the series or point. This can be\n * prevented by returning `false` or calling `event.preventDefault()`.\n *\n * @callback Highcharts.LegendItemClickCallbackFunction\n *\n * @param {Highcharts.Legend} this\n * The legend on which the event occurred.\n *\n * @param {Highcharts.LegendItemClickEventObject} event\n * The event that occurred.\n *\n * @param {Highcharts.Legend} [ctx]\n * Since v12.6.0, the legend context passed as an extra argument for arrow\n * functions.\n */\n/**\n * Information about the legend click event.\n *\n * @interface Highcharts.LegendItemClickEventObject\n */ /**\n* Related browser event.\n* @name Highcharts.LegendItemClickEventObject#browserEvent\n* @type {Highcharts.PointerEvent}\n*/ /**\n* Prevent the default action of toggle the visibility of the series or point.\n* @name Highcharts.LegendItemClickEventObject#preventDefault\n* @type {Function}\n* */ /**\n* Related legend item, it can be series, point, color axis or data class from\n* color axis.\n* @name Highcharts.LegendItemClickEventObject#legendItem\n* @type {Highcharts.Series|Highcharts.Point|Highcharts.LegendItemObject}\n* */ /**\n* Related legend.\n* @name Highcharts.LegendItemClickEventObject#target\n* @type {Highcharts.Legend}\n*/ /**\n* Event type.\n* @name Highcharts.LegendItemClickEventObject#type\n* @type {\"itemClick\"}\n*/\n/**\n * Gets fired when the legend item belonging to a point is clicked. The default\n * action is to toggle the visibility of the point. This can be prevented by\n * returning `false` or calling `event.preventDefault()`.\n *\n * **Note:** This option is deprecated in favor of\n * Highcharts.LegendItemClickCallbackFunction.\n *\n * @deprecated 11.4.4\n * @callback Highcharts.PointLegendItemClickCallbackFunction\n *\n * @param {Highcharts.Point} this\n * The point on which the event occurred.\n *\n * @param {Highcharts.PointLegendItemClickEventObject} event\n * The event that occurred.\n *\n * @param {Highcharts.Point} [ctx]\n * Since v12.6.0, the point context passed as an extra argument for arrow\n * functions.\n */\n/**\n * Information about the legend click event.\n *\n * **Note:** This option is deprecated in favor of\n * Highcharts.LegendItemClickEventObject.\n *\n * @deprecated 11.4.4\n * @interface Highcharts.PointLegendItemClickEventObject\n */ /**\n* Related browser event.\n* @name Highcharts.PointLegendItemClickEventObject#browserEvent\n* @type {Highcharts.PointerEvent}\n*/ /**\n* Whether the default action has been prevented (`true`) or not.\n* @name Highcharts.PointLegendItemClickEventObject#defaultPrevented\n* @type {boolean|undefined}\n*/ /**\n* Prevent the default action of toggle the visibility of the point.\n* @name Highcharts.PointLegendItemClickEventObject#preventDefault\n* @type {Function}\n*/ /**\n* Related point.\n* @name Highcharts.PointLegendItemClickEventObject#target\n* @type {Highcharts.Point}\n*/ /**\n* Event type.\n* @name Highcharts.PointLegendItemClickEventObject#type\n* @type {\"legendItemClick\"}\n*/\n/**\n * Legend data for the series.\n * @name Highcharts.Series#legendItem\n * @type {Highcharts.LegendItemObject|undefined}\n * @since 10.3.0\n */\n/**\n * Gets fired when the legend item belonging to a series is clicked. The default\n * action is to toggle the visibility of the series. This can be prevented by\n * returning `false` or calling `event.preventDefault()`.\n *\n * **Note:** This option is deprecated in favor of\n * Highcharts.LegendItemClickCallbackFunction.\n *\n * @deprecated 11.4.4\n * @callback Highcharts.SeriesLegendItemClickCallbackFunction\n *\n * @param {Highcharts.Series} this\n * The series where the event occurred.\n *\n * @param {Highcharts.SeriesLegendItemClickEventObject} event\n * The event that occurred.\n *\n * @param {Highcharts.Series} [ctx]\n * Since v12.6.0, the series context passed as an extra argument for arrow\n * functions.\n */\n/**\n * Information about the legend click event.\n *\n * **Note:** This option is deprecated in favor of\n * Highcharts.LegendItemClickEventObject.\n *\n * @deprecated 11.4.4\n * @interface Highcharts.SeriesLegendItemClickEventObject\n */ /**\n* Related browser event.\n* @name Highcharts.SeriesLegendItemClickEventObject#browserEvent\n* @type {Highcharts.PointerEvent}\n*/ /**\n* Whether the default action has been prevented (`true`) or not.\n* @name Highcharts.SeriesLegendItemClickEventObject#defaultPrevented\n* @type {boolean|undefined}\n*/ /**\n* Prevent the default action of toggle the visibility of the series.\n* @name Highcharts.SeriesLegendItemClickEventObject#preventDefault\n* @type {Function}\n*/ /**\n* Related series.\n* @name Highcharts.SeriesLegendItemClickEventObject#target\n* @type {Highcharts.Series}\n*/ /**\n* Event type.\n* @name Highcharts.SeriesLegendItemClickEventObject#type\n* @type {\"legendItemClick\"}\n*/\n(''); // Keeps doclets above in JS file\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport A from '../Animation/AnimationUtilities.js';\nconst { animate, animObject, setAnimation } = A;\nimport Axis from '../Axis/Axis.js';\nimport D from '../Defaults.js';\nconst { defaultOptions } = D;\nimport DataTableCore from '../../Data/DataTableCore.js';\nimport Templating from '../Templating.js';\nconst { numberFormat } = Templating;\nimport Foundation from '../Foundation.js';\nconst { registerEventOptions } = Foundation;\nimport H from '../Globals.js';\nconst { charts, doc, marginNames, win } = H;\nimport Series from '../Series/Series.js';\nimport SeriesRegistry from '../Series/SeriesRegistry.js';\nconst { seriesTypes } = SeriesRegistry;\nimport SVGRenderer from '../Renderer/SVG/SVGRenderer.js';\nimport Time from '../Time.js';\nimport AST from '../Renderer/HTML/AST.js';\nimport Tick from '../Axis/Tick.js';\nimport { addEvent, attr, createElement, css, defined, diffObjects, discardElement, erase, extend, find, fireEvent, getAlignFactor, getStyle, internalClearTimeout, isArray, isNumber, isObject, isString, merge, objectEach, pick, pInt, relativeLength, removeEvent, splat, syncTimeout } from '../../Shared/Utilities.js';\nimport { error, uniqueKey } from '../Utilities.js';\n/* *\n *\n * Class\n *\n * */\n/* eslint-disable no-invalid-this, valid-jsdoc */\n/**\n * The Chart class. The recommended constructor is {@link Highcharts#chart}.\n *\n * @example\n * let chart = Highcharts.chart('container', {\n * title: {\n * text: 'My chart'\n * },\n * series: [{\n * data: [1, 3, 2, 4]\n * }]\n * })\n *\n * @class\n * @name Highcharts.Chart\n *\n * @param {string|Highcharts.HTMLDOMElement} [renderTo]\n * The DOM element to render to, or its id.\n *\n * @param {Highcharts.Options} options\n * The chart options structure.\n *\n * @param {Highcharts.ChartCallbackFunction|true} [callback]\n * Function to run when the chart has loaded and all external images\n * are loaded. Defining a\n * [chart.events.load](https://api.highcharts.com/highcharts/chart.events.load)\n * handler is equivalent. Set to `true` to return a promise that resolves\n * when the chart is ready.\n */\nclass Chart {\n /* eslint-disable jsdoc/check-param-names */\n /**\n * Factory function for basic charts.\n *\n * @example\n * // Render a chart into div#container\n * const chart = Highcharts.chart('container', {\n * title: {\n * text: 'My chart'\n * },\n * series: [{\n * data: [1, 3, 2, 4]\n * }]\n * });\n *\n * @function Highcharts.chart\n *\n * @param {string|Highcharts.HTMLDOMElement} [renderTo]\n * The DOM element to render to, or its id.\n *\n * @param {Highcharts.Options} options\n * The chart options structure.\n *\n * @param {Highcharts.ChartCallbackFunction|true} [callback]\n * Function to run when the chart has loaded and all external images are\n * loaded. Defining a\n * [chart.events.load](https://api.highcharts.com/highcharts/chart.events.load)\n * handler is equivalent. Set to `true` to return a promise that resolves\n * when the chart is ready.\n *\n * @return {Highcharts.Chart}\n * Returns the Chart object.\n */\n static chart(a, b, c) {\n const chart = new Chart(a, b, c);\n return chart.promise || chart;\n }\n // Implementation\n constructor(a, \n /* eslint-disable @typescript-eslint/no-unused-vars */\n b, c\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ) {\n /** @internal */\n this.sharedClips = {};\n // Return early if there's no browser API (server environment).\n if (!doc) {\n error(36, false, this);\n return;\n }\n const args = [\n // ES5 builds fail unless we cast it to an Array\n ...arguments\n ];\n // Remove the optional first argument, renderTo, and set it on this.\n if (isString(a) || a.nodeName) {\n this.renderTo = args.shift();\n }\n this.init(args[0], args[1]);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Function setting zoom options after chart init and after chart update.\n * Offers support for deprecated options.\n *\n * @internal\n * @function Highcharts.Chart#setZoomOptions\n */\n setZoomOptions() {\n const chart = this, options = chart.options.chart, zooming = options.zooming;\n chart.zooming = {\n ...zooming,\n type: pick(options.zoomType, zooming.type),\n key: pick(options.zoomKey, zooming.key),\n pinchType: pick(options.pinchType, zooming.pinchType),\n singleTouch: pick(options.zoomBySingleTouch, zooming.singleTouch, false),\n resetButton: merge(zooming.resetButton, options.resetZoomButton)\n };\n }\n /**\n * Overridable function that initializes the chart. The constructor's\n * arguments are passed on directly.\n *\n * @function Highcharts.Chart#init\n *\n * @param {Highcharts.Options} userOptions\n * Custom options.\n *\n * @param {Function|true} [callback]\n * Function to run when the chart has loaded and all external\n * images are loaded. Set to `true` to return a promise that\n * resolves when the chart is ready.\n *\n * @emits Highcharts.Chart#event:init\n * @emits Highcharts.Chart#event:afterInit\n */\n init(userOptions, callback) {\n // Fire the event with a default function\n fireEvent(this, 'init', { args: arguments }, function () {\n const options = merge(defaultOptions, userOptions), optionsChart = options.chart, renderTo = this.renderTo || optionsChart.renderTo;\n /**\n * The original options given to the constructor or a chart factory\n * like {@link Highcharts.chart} and {@link Highcharts.stockChart}.\n * The original options are shallow copied to avoid mutation. The\n * copy, `chart.userOptions`, may later be mutated to reflect\n * updated options throughout the lifetime of the chart.\n *\n * For collections, like `series`, `xAxis` and `yAxis`, the chart\n * user options should always be reflected by the item user option,\n * so for example the following should always be true:\n *\n * `chart.xAxis[0].userOptions === chart.userOptions.xAxis[0]`\n *\n * @name Highcharts.Chart#userOptions\n * @type {Highcharts.Options}\n */\n this.userOptions = extend({}, userOptions);\n if (!(this.renderTo = (isString(renderTo) ?\n doc.getElementById(renderTo) :\n renderTo))) {\n // Display an error if the renderTo is wrong\n error(13, true, this);\n }\n this.margin = [];\n this.spacing = [];\n // An array of functions that returns labels that should be\n // considered for anti-collision\n this.labelCollectors = [];\n // Create a promise to be resolved later\n if (callback === true) {\n this.promise = new Promise((resolve) => {\n this.callback = resolve;\n });\n }\n else {\n this.callback = callback;\n }\n this.isResizing = 0;\n /**\n * The options structure for the chart after merging\n * {@link #defaultOptions} and {@link #userOptions}. It contains\n * members for the sub elements like series, legend, tooltip etc.\n *\n * @name Highcharts.Chart#options\n * @type {Highcharts.Options}\n */\n this.options = options;\n /**\n * All the axes in the chart.\n *\n * @see Highcharts.Chart.xAxis\n * @see Highcharts.Chart.yAxis\n *\n * @name Highcharts.Chart#axes\n * @type {Array<Highcharts.Axis>}\n */\n this.axes = [];\n /**\n * All the current series in the chart.\n *\n * @name Highcharts.Chart#series\n * @type {Array<Highcharts.Series>}\n */\n this.series = [];\n this.locale = options.lang.locale ??\n this.renderTo.closest('[lang]')?.lang;\n /**\n * The `Time` object associated with the chart. Since v6.0.5,\n * time settings can be applied individually for each chart. If\n * no individual settings apply, the `Time` object is shared by\n * all instances.\n *\n * @name Highcharts.Chart#time\n * @type {Highcharts.Time}\n */\n this.time = new Time(extend(options.time || {}, {\n locale: this.locale\n }), options.lang);\n options.time = this.time.options;\n /**\n * Callback function to override the default function that formats\n * all the numbers in the chart. Returns a string with the formatted\n * number.\n *\n * @name Highcharts.Chart#numberFormatter\n * @type {Highcharts.NumberFormatterCallbackFunction}\n */\n this.numberFormatter = (optionsChart.numberFormatter || numberFormat).bind(this);\n /**\n * Whether the chart is in styled mode, meaning all presentational\n * attributes are avoided.\n *\n * @name Highcharts.Chart#styledMode\n * @type {boolean}\n */\n this.styledMode = optionsChart.styledMode;\n this.hasCartesianSeries = optionsChart.showAxes;\n const chart = this;\n /**\n * Index position of the chart in the {@link Highcharts#charts}\n * property.\n *\n * @name Highcharts.Chart#index\n * @type {number}\n * @readonly\n */\n chart.index = charts.length; // Add the chart to the global lookup\n // The chart.dataTable option\n chart.dataTable = chart.getDataTable(options);\n charts.push(chart);\n H.chartCount++;\n // Chart event handlers\n registerEventOptions(this, optionsChart);\n /**\n * A collection of the X axes in the chart.\n *\n * @name Highcharts.Chart#xAxis\n * @type {Array<Highcharts.Axis>}\n */\n chart.xAxis = [];\n /**\n * A collection of the Y axes in the chart.\n *\n * @name Highcharts.Chart#yAxis\n * @type {Array<Highcharts.Axis>}\n *\n * @todo\n * Make events official: Fire the event `afterInit`.\n */\n chart.yAxis = [];\n chart.pointCount = chart.colorCounter = chart.symbolCounter = 0;\n this.setZoomOptions();\n // Fire after init but before first render, before axes and series\n // have been initialized.\n fireEvent(chart, 'afterInit');\n chart.firstRender();\n });\n }\n getDataTable(options) {\n return (options.dataTable ? splat(options.dataTable) : []).map((dataTableOptions) => (dataTableOptions.isDataTable ?\n dataTableOptions :\n new DataTableCore(dataTableOptions)));\n }\n /**\n * Internal function to initialize an individual series.\n *\n * @internal\n * @function Highcharts.Chart#initSeries\n */\n initSeries(options) {\n const chart = this, optionsChart = chart.options.chart, type = (options.type ||\n optionsChart.type), SeriesClass = seriesTypes[type];\n // No such series type\n if (!SeriesClass) {\n error(17, true, chart, { missingModuleFor: type });\n }\n const series = new SeriesClass();\n if (typeof series.init === 'function') {\n series.init(chart, options);\n }\n return series;\n }\n /**\n * Order all series or axes above a given index. When series or axes are\n * added and ordered by configuration, only the last series is handled\n * (#248, #1123, #2456, #6112). This function is called on series and axis\n * initialization and destroy.\n *\n * @internal\n * @function Highcharts.Chart#orderItems\n *\n * @param {string} coll\n * The collection name.\n *\n * @param {number} [fromIndex=0]\n * If this is given, only the series above this index are handled.\n */\n orderItems(coll, fromIndex = 0) {\n const collection = this[coll], \n // Item options should be reflected in chart.options.series,\n // chart.options.yAxis etc\n optionsArray = this.options[coll] = splat(this.options[coll])\n .slice(), userOptionsArray = this.userOptions[coll] = this.userOptions[coll] ?\n splat(this.userOptions[coll]).slice() :\n [];\n if (this.hasRendered) {\n // Remove all above index\n optionsArray.splice(fromIndex);\n userOptionsArray.splice(fromIndex);\n }\n if (collection) {\n for (let i = fromIndex, iEnd = collection.length; i < iEnd; ++i) {\n const item = collection[i];\n if (item) {\n item.index = i;\n if (item instanceof Series) {\n item.name = item.getName();\n }\n if (!item.options.isInternal) {\n optionsArray[i] = item.options;\n userOptionsArray[i] = item.userOptions;\n }\n }\n }\n }\n }\n /**\n * Get the clipping for a series. Could be called for a series to initialize\n * animating the clip or to set the final clip (only width and x).\n *\n * @internal\n * @function Highcharts.Chart#getClipBox\n */\n getClipBox(series, chartCoords) {\n const inverted = this.inverted, { xAxis, yAxis } = series || {};\n // If no axes on the series, or series undefined, use global clipBox\n let { x, y, width, height } = merge(this.clipBox);\n if (series) {\n // Otherwise, use clipBox.width which is corrected for\n // plotBorderWidth and clipOffset\n if (xAxis && xAxis.len !== this.plotSizeX && !xAxis.isRadial) {\n width = xAxis.len;\n }\n if (yAxis && yAxis.len !== this.plotSizeY && !yAxis.isRadial) {\n height = yAxis.len;\n }\n // If the chart is inverted and the series is not invertible, the\n // chart clip box should be inverted, but not the series clip box\n // (#20264)\n if (inverted && !series.invertible) {\n [width, height] = [height, width];\n }\n }\n if (chartCoords) {\n x += (inverted ? yAxis : xAxis)?.pos ?? this.plotLeft;\n y += (inverted ? xAxis : yAxis)?.pos ?? this.plotTop;\n }\n return { x, y, width, height };\n }\n /**\n * Check whether a given point is within the plot area.\n *\n * @function Highcharts.Chart#isInsidePlot\n *\n * @param {number} plotX\n * Pixel x relative to the plot area.\n *\n * @param {number} plotY\n * Pixel y relative to the plot area.\n *\n * @param {Highcharts.ChartIsInsideOptionsObject} [options]\n * Options object.\n *\n * @return {boolean}\n * Returns true if the given point is inside the plot area.\n */\n isInsidePlot(plotX, plotY, options = {}) {\n const { inverted, plotBox, plotLeft, plotTop, scrollablePlotBox } = this, { scrollLeft = 0, scrollTop = 0 } = (options.visiblePlotOnly &&\n this.scrollablePlotArea?.scrollingContainer) || {}, series = options.series, box = (options.visiblePlotOnly && scrollablePlotBox) || plotBox, x = options.inverted ? plotY : plotX, y = options.inverted ? plotX : plotY, e = {\n x,\n y,\n isInsidePlot: true,\n options\n };\n if (!options.ignoreX) {\n const xAxis = (series &&\n (inverted && !this.polar ? series.yAxis : series.xAxis)) || {\n pos: plotLeft,\n len: Infinity\n };\n const chartX = options.paneCoordinates ?\n xAxis.pos + x : plotLeft + x;\n if (!(chartX >= Math.max(scrollLeft + plotLeft, xAxis.pos) &&\n chartX <= Math.min(scrollLeft + plotLeft + box.width, xAxis.pos + xAxis.len))) {\n e.isInsidePlot = false;\n }\n }\n if (!options.ignoreY && e.isInsidePlot) {\n const yAxis = (!inverted && options.axis &&\n !options.axis.isXAxis && options.axis) || (series && (inverted ? series.xAxis : series.yAxis)) || {\n pos: plotTop,\n len: Infinity\n };\n const chartY = options.paneCoordinates ?\n yAxis.pos + y : plotTop + y;\n if (!(chartY >= Math.max(scrollTop + plotTop, yAxis.pos) &&\n chartY <= Math.min(scrollTop + plotTop + box.height, yAxis.pos + yAxis.len))) {\n e.isInsidePlot = false;\n }\n }\n fireEvent(this, 'afterIsInsidePlot', e);\n return e.isInsidePlot;\n }\n /**\n * Redraw the chart after changes have been done to the data, axis extremes\n * chart size or chart elements. All methods for updating axes, series or\n * points have a parameter for redrawing the chart. This is `true` by\n * default. But in many cases you want to do more than one operation on the\n * chart before redrawing, for example add a number of points. In those\n * cases it is a waste of resources to redraw the chart for each new point\n * added. So you add the points and call `chart.redraw()` after.\n *\n * @function Highcharts.Chart#redraw\n *\n * @param {boolean|Partial<Highcharts.AnimationOptionsObject>} [animation]\n * If or how to apply animation to the redraw. When `undefined`, it applies\n * the animation that is set in the `chart.animation` option.\n *\n * @emits Highcharts.Chart#event:afterSetExtremes\n * @emits Highcharts.Chart#event:beforeRedraw\n * @emits Highcharts.Chart#event:predraw\n * @emits Highcharts.Chart#event:redraw\n * @emits Highcharts.Chart#event:render\n * @emits Highcharts.Chart#event:updatedData\n */\n redraw(animation) {\n fireEvent(this, 'beforeRedraw');\n const chart = this, axes = chart.hasCartesianSeries ? chart.axes : chart.colorAxis || [], series = chart.series, pointer = chart.pointer, legend = chart.legend, legendUserOptions = chart.userOptions.legend, renderer = chart.renderer, isHiddenChart = renderer.isHidden(), afterRedraw = [];\n let hasDirtyStacks, hasStackedSeries, i, isDirtyBox = chart.isDirtyBox, redrawLegend = chart.isDirtyLegend, serie;\n renderer.rootFontSize = renderer.boxWrapper.getStyle('font-size');\n // Handle responsive rules, not only on resize (#6130)\n if (chart.setResponsive) {\n chart.setResponsive(false);\n }\n // Set the global animation. When chart.hasRendered is not true, the\n // redraw call comes from a responsive rule and animation should not\n // occur.\n setAnimation(chart.hasRendered ? animation : false, chart);\n if (isHiddenChart) {\n chart.temporaryDisplay();\n }\n // Adjust title layout (reflow multiline text)\n chart.layOutTitles(false);\n // Link stacked series\n i = series.length;\n while (i--) {\n serie = series[i];\n if (serie.options.stacking || serie.options.centerInCategory) {\n hasStackedSeries = true;\n if (serie.isDirty) {\n hasDirtyStacks = true;\n break;\n }\n }\n }\n if (hasDirtyStacks) { // Mark others as dirty\n i = series.length;\n while (i--) {\n serie = series[i];\n if (serie.options.stacking) {\n serie.isDirty = true;\n }\n }\n }\n // Handle updated data in the series\n series.forEach(function (serie) {\n if (serie.isDirty) {\n if (serie.options.legendType === 'point') {\n if (typeof serie.updateTotals === 'function') {\n serie.updateTotals();\n }\n redrawLegend = true;\n }\n else if (legendUserOptions &&\n (!!legendUserOptions.labelFormatter ||\n legendUserOptions.labelFormat)) {\n redrawLegend = true; // #2165\n }\n }\n if (serie.isDirtyData) {\n fireEvent(serie, 'updatedData');\n }\n });\n // Handle added or removed series\n if (redrawLegend && legend && legend.options.enabled) {\n // Draw legend graphics\n legend.render();\n chart.isDirtyLegend = false;\n }\n // Reset stacks\n if (hasStackedSeries) {\n chart.getStacks();\n }\n // Set axes scales\n axes.forEach(function (axis) {\n axis.updateNames();\n axis.setScale();\n });\n chart.getMargins(); // #3098\n // If one axis is dirty, all axes must be redrawn (#792, #2169)\n axes.forEach(function (axis) {\n if (axis.isDirty) {\n isDirtyBox = true;\n }\n });\n // Redraw axes\n axes.forEach(function (axis) {\n // Fire 'afterSetExtremes' only if extremes are set\n const key = axis.min + ',' + axis.max;\n if (axis.extKey !== key) { // #821, #4452\n axis.extKey = key;\n // Prevent a recursive call to chart.redraw() (#1119)\n afterRedraw.push(function () {\n fireEvent(axis, 'afterSetExtremes', extend(axis.eventArgs, axis.getExtremes())); // #747, #751\n delete axis.eventArgs;\n });\n }\n if (isDirtyBox || hasStackedSeries) {\n axis.redraw();\n }\n });\n // The plot areas size has changed\n if (isDirtyBox) {\n chart.drawChartBox();\n }\n // Fire an event before redrawing series, used by the boost module to\n // clear previous series renderings.\n fireEvent(chart, 'predraw');\n // Redraw affected series\n series.forEach(function (serie) {\n if ((isDirtyBox || serie.isDirty) && serie.visible) {\n serie.redraw();\n }\n // Set it here, otherwise we will have unlimited 'updatedData' calls\n // for a hidden series after setData(). Fixes #6012\n serie.isDirtyData = false;\n });\n // Move tooltip or reset\n if (pointer) {\n pointer.reset(true);\n }\n // Redraw if canvas\n renderer.draw();\n // Save the existing state\n axes.forEach((axis) => {\n axis.saveOld();\n });\n // Fire the events\n fireEvent(chart, 'redraw');\n fireEvent(chart, 'render');\n if (isHiddenChart) {\n chart.temporaryDisplay(true);\n }\n // Fire callbacks that are put on hold until after the redraw\n afterRedraw.forEach(function (callback) {\n callback.call();\n });\n }\n /**\n * Get an axis, series or point object by `id` as given in the configuration\n * options. Returns `undefined` if no item is found.\n *\n * @sample highcharts/plotoptions/series-id/\n * Get series by id\n *\n * @function Highcharts.Chart#get\n *\n * @param {string} id\n * The id as given in the configuration options.\n *\n * @return {Highcharts.Axis|Highcharts.Series|Highcharts.Point|undefined}\n * The retrieved item.\n */\n get(id) {\n const series = this.series;\n /** @internal */\n function itemById(item) {\n return (item.id === id ||\n (item.options && item.options.id === id));\n }\n let ret = \n // Search axes\n find(this.axes, itemById) ||\n // Search series\n find(this.series, itemById);\n // Search points\n for (let i = 0; !ret && i < series.length; i++) {\n ret = find(series[i].points || [], itemById);\n }\n return ret;\n }\n /**\n * Create the Axis instances based on the config options.\n *\n * @internal\n * @function Highcharts.Chart#createAxes\n * @emits Highcharts.Chart#event:afterCreateAxes\n * @emits Highcharts.Chart#event:createAxes\n */\n createAxes() {\n const options = this.userOptions;\n fireEvent(this, 'createAxes');\n for (const coll of ['xAxis', 'yAxis']) {\n const arr = options[coll] = splat(options[coll] || {});\n for (const axisOptions of arr) {\n // eslint-disable-next-line no-new\n new Axis(this, axisOptions, coll);\n }\n }\n fireEvent(this, 'afterCreateAxes');\n }\n /**\n * Returns an array of all currently selected points in the chart. Points\n * can be selected by clicking or programmatically by the\n * {@link Highcharts.Point#select}\n * function.\n *\n * @sample highcharts/plotoptions/series-allowpointselect-line/\n * Get selected points\n * @sample highcharts/members/point-select-lasso/\n * Lasso selection\n * @sample highcharts/chart/events-selection-points/\n * Rectangle selection\n *\n * @function Highcharts.Chart#getSelectedPoints\n *\n * @return {Array<Highcharts.Point>}\n * The currently selected points.\n */\n getSelectedPoints() {\n return this.series.reduce((acc, series) => {\n // For one-to-one points inspect series.data in order to retrieve\n // points outside the visible range (#6445). For grouped data,\n // inspect the generated series.points.\n series.getPointsCollection()\n .forEach((point) => {\n if (pick(point.selectedStaging, point.selected)) {\n acc.push(point);\n }\n });\n return acc;\n }, []);\n }\n /**\n * Returns an array of all currently selected series in the chart. Series\n * can be selected either programmatically by the\n * {@link Highcharts.Series#select}\n * function or by checking the checkbox next to the legend item if\n * [series.showCheckBox](https://api.highcharts.com/highcharts/plotOptions.series.showCheckbox)\n * is true.\n *\n * @sample highcharts/members/chart-getselectedseries/\n * Get selected series\n *\n * @function Highcharts.Chart#getSelectedSeries\n *\n * @return {Array<Highcharts.Series>}\n * The currently selected series.\n */\n getSelectedSeries() {\n return this.series.filter((s) => s.selected);\n }\n /**\n * Set a new title or subtitle for the chart.\n *\n * @sample highcharts/members/chart-settitle/\n * Set title text and styles\n *\n * @function Highcharts.Chart#setTitle\n *\n * @param {Highcharts.TitleOptions} [titleOptions]\n * New title options. The title text itself is set by the\n * `titleOptions.text` property.\n *\n * @param {Highcharts.SubtitleOptions} [subtitleOptions]\n * New subtitle options. The subtitle text itself is set by the\n * `subtitleOptions.text` property.\n *\n * @param {boolean} [redraw]\n * Whether to redraw the chart or wait for a later call to\n * `chart.redraw()`.\n */\n setTitle(titleOptions, subtitleOptions, redraw) {\n this.applyDescription('title', titleOptions);\n this.applyDescription('subtitle', subtitleOptions);\n // The initial call also adds the caption. On update, chart.update will\n // relay to Chart.setCaption.\n this.applyDescription('caption', void 0);\n this.layOutTitles(redraw);\n }\n /**\n * Apply a title, subtitle or caption for the chart\n *\n * @internal\n * @function Highcharts.Chart#applyDescription\n *\n * @param {string} key\n * Either title, subtitle or caption\n *\n * @param {Highcharts.TitleOptions|Highcharts.SubtitleOptions|Highcharts.CaptionOptions|undefined} explicitOptions\n * The options to set, will be merged with default options.\n */\n applyDescription(key, explicitOptions) {\n const chart = this;\n // Merge default options with explicit options\n const options = this.options[key] = merge(this.options[key], explicitOptions);\n let elem = this[key];\n if (elem && explicitOptions) {\n this[key] = elem = elem.destroy(); // Remove old\n }\n if (options && !elem) {\n elem = this.renderer.text(options.text, 0, 0, options.useHTML)\n .attr({\n align: options.align,\n 'class': 'highcharts-' + key,\n zIndex: options.zIndex || 4\n })\n .css({\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap'\n })\n .add();\n // Update methods, relay to `applyDescription`\n elem.update = function (updateOptions, redraw) {\n chart.applyDescription(key, updateOptions);\n chart.layOutTitles(redraw);\n };\n // Presentational\n if (!this.styledMode) {\n elem.css(extend(key === 'title' ? {\n // #2944\n fontSize: this.options.isStock ? '1em' : '1.2em'\n } : {}, options.style));\n }\n // Get unwrapped text length and reset\n elem.textPxLength = elem.getBBox().width;\n elem.css({ whiteSpace: options.style?.whiteSpace });\n /**\n * The chart title. The title has an `update` method that allows\n * modifying the options directly or indirectly via\n * `chart.update`.\n *\n * @sample highcharts/members/title-update/\n * Updating titles\n *\n * @name Highcharts.Chart#title\n * @type {Highcharts.TitleObject}\n */\n /**\n * The chart subtitle. The subtitle has an `update` method that\n * allows modifying the options directly or indirectly via\n * `chart.update`.\n *\n * @name Highcharts.Chart#subtitle\n * @type {Highcharts.SubtitleObject}\n */\n this[key] = elem;\n }\n }\n /**\n * Internal function to lay out the chart title, subtitle and caption, and\n * cache the full offset height for use in `getMargins`. The result is\n * stored in `this.titleOffset`.\n *\n * @internal\n * @function Highcharts.Chart#layOutTitles\n *\n * @param {boolean} [redraw=true]\n *\n * @emits Highcharts.Chart#event:afterLayOutTitles\n */\n layOutTitles(redraw = true) {\n const titleOffset = [0, 0, 0], { options, renderer, spacingBox } = this;\n // Lay out the title, subtitle and caption respectively\n ['title', 'subtitle', 'caption'].forEach((key) => {\n const desc = this[key], descOptions = this.options[key], alignTo = merge(spacingBox), textPxLength = desc?.textPxLength || 0;\n if (desc && descOptions) {\n // Provide a hook for the exporting button to shift the title\n fireEvent(this, 'layOutTitle', { alignTo, key, textPxLength });\n const fontMetrics = renderer.fontMetrics(desc), baseline = fontMetrics.b, lineHeight = fontMetrics.h, verticalAlign = descOptions.verticalAlign || 'top', topAligned = verticalAlign === 'top', \n // Use minScale only for top-aligned titles. It is not\n // likely that we will need scaling for other positions, but\n // if it is requested, we need to adjust the vertical\n // position to the scale.\n minScale = topAligned && descOptions.minScale || 1, offset = key === 'title' ?\n topAligned ? -3 : 0 :\n // Floating subtitle (#6574)\n topAligned ? titleOffset[0] + 2 : 0, uncappedScale = Math.min(alignTo.width / textPxLength, 1), scale = Math.max(minScale, uncappedScale), alignAttr = merge({\n y: verticalAlign === 'bottom' ?\n baseline :\n offset + baseline\n }, descOptions), width = (descOptions.width || ((uncappedScale > minScale ?\n // One line\n this.chartWidth :\n // Allow word wrap\n alignTo.width) / scale)) + 'px';\n // Handle auto alignment\n alignAttr.align ?? (alignAttr.align = key === 'title' ?\n // Title defaults to center for short titles,\n // left for word-wrapped titles\n (uncappedScale < minScale ? 'left' : 'center') :\n // Subtitle defaults to the title.align\n this.title?.alignValue);\n // No animation when switching alignment\n if (desc.alignValue !== alignAttr.align) {\n desc.placed = false;\n }\n // Set the width and read the height\n const height = Math.round(desc\n .css({ width })\n // Skip the cache for HTML (#3481, #11666)\n .getBBox(descOptions.useHTML).height);\n alignAttr.height = height;\n // Perform scaling and alignment\n desc\n .align(alignAttr, false, alignTo)\n .attr({\n align: alignAttr.align,\n scaleX: scale,\n scaleY: scale,\n 'transform-origin': `${alignTo.x +\n textPxLength *\n scale *\n getAlignFactor(alignAttr.align)} ${lineHeight}`\n });\n // Adjust the rendered title offset\n if (!descOptions.floating) {\n const offset = height * (\n // When scaling down the title, preserve the offset as\n // long as it's only one line, but scale down the offset\n // if the title wraps to multiple lines.\n height < lineHeight * 1.2 ? 1 : scale);\n if (verticalAlign === 'top') {\n titleOffset[0] = Math.ceil(titleOffset[0] + offset);\n }\n else if (verticalAlign === 'bottom') {\n titleOffset[2] = Math.ceil(titleOffset[2] + offset);\n }\n }\n }\n }, this);\n // Handle title.margin and caption.margin\n if (titleOffset[0] &&\n (options.title?.verticalAlign || 'top') === 'top') {\n titleOffset[0] += options.title?.margin || 0;\n }\n if (titleOffset[2] &&\n options.caption?.verticalAlign === 'bottom') {\n titleOffset[2] += options.caption?.margin || 0;\n }\n const requiresDirtyBox = (!this.titleOffset ||\n this.titleOffset.join(',') !== titleOffset.join(','));\n // Used in getMargins\n this.titleOffset = titleOffset;\n fireEvent(this, 'afterLayOutTitles');\n if (!this.isDirtyBox && requiresDirtyBox) {\n this.isDirtyBox = this.isDirtyLegend = requiresDirtyBox;\n // Redraw if necessary (#2719, #2744)\n if (this.hasRendered && redraw && this.isDirtyBox) {\n this.redraw();\n }\n }\n }\n /**\n * Internal function to get the available size of the container element\n *\n * @internal\n * @function Highcharts.Chart#getContainerBox\n */\n getContainerBox() {\n // Temporarily hide support divs from a11y and others, #21888\n const nonContainers = [].map.call(this.renderTo.children, (child) => {\n if (child !== this.container) {\n const display = child.style.display;\n child.style.display = 'none';\n return [child, display];\n }\n }), box = {\n width: getStyle(this.renderTo, 'width', true) || 0,\n height: (getStyle(this.renderTo, 'height', true) || 0)\n };\n // Restore the non-containers\n nonContainers.filter(Boolean).forEach(([div, display]) => {\n div.style.display = display;\n });\n return box;\n }\n /**\n * Internal function to get the chart width and height according to options\n * and container size. Sets {@link Chart.chartWidth} and\n * {@link Chart.chartHeight}.\n *\n * @internal\n * @function Highcharts.Chart#getChartSize\n */\n getChartSize() {\n const chart = this, optionsChart = chart.options.chart, widthOption = optionsChart.width, heightOption = optionsChart.height, containerBox = chart.getContainerBox(), enableDefaultHeight = containerBox.height <= 1 ||\n ( // #21510, prevent infinite reflow\n !chart.renderTo.parentElement?.style.height &&\n chart.renderTo.style.height === '100%');\n /**\n * The current pixel width of the chart.\n *\n * @name Highcharts.Chart#chartWidth\n * @type {number}\n */\n chart.chartWidth = Math.max(// #1393\n 0, widthOption || containerBox.width || 600 // #1460\n );\n /**\n * The current pixel height of the chart.\n *\n * @name Highcharts.Chart#chartHeight\n * @type {number}\n */\n chart.chartHeight = Math.max(0, relativeLength(heightOption, chart.chartWidth) ||\n (enableDefaultHeight ? 400 : containerBox.height));\n chart.containerBox = containerBox;\n }\n /**\n * If the renderTo element has no offsetWidth, most likely one or more of\n * its parents are hidden. Loop up the DOM tree to temporarily display the\n * parents, then save the original display properties, and when the true\n * size is retrieved, reset them. Used on first render and on redraws.\n *\n * @internal\n * @function Highcharts.Chart#temporaryDisplay\n *\n * @param {boolean} [revert]\n * Revert to the saved original styles.\n */\n temporaryDisplay(revert) {\n let node = this.renderTo, tempStyle;\n if (!revert) {\n while (node?.style) {\n // When rendering to a detached node, it needs to be temporarily\n // attached in order to read styling and bounding boxes (#5783,\n // #7024).\n if (!doc.body.contains(node) && !node.parentNode) {\n node.hcOrigDetached = true;\n doc.body.appendChild(node);\n }\n if (getStyle(node, 'display', false) === 'none' ||\n node.hcOrigDetached) {\n node.hcOrigStyle = {\n display: node.style.display,\n height: node.style.height,\n overflow: node.style.overflow\n };\n tempStyle = {\n display: 'block',\n overflow: 'hidden'\n };\n if (node !== this.renderTo) {\n tempStyle.height = 0;\n }\n css(node, tempStyle);\n // If it still doesn't have an offset width after setting\n // display to block, it probably has an !important priority\n // #2631, 6803\n if (!node.offsetWidth) {\n node.style.setProperty('display', 'block', 'important');\n }\n }\n node = node.parentNode;\n if (node === doc.body) {\n break;\n }\n }\n }\n else {\n while (node?.style) {\n if (node.hcOrigStyle) {\n css(node, node.hcOrigStyle);\n delete node.hcOrigStyle;\n }\n if (node.hcOrigDetached) {\n doc.body.removeChild(node);\n node.hcOrigDetached = false;\n }\n node = node.parentNode;\n }\n }\n }\n /**\n * Set the {@link Chart.container|chart container's} class name, in\n * addition to `highcharts-container`.\n *\n * @function Highcharts.Chart#setClassName\n *\n * @param {string} [className]\n * The additional class name.\n */\n setClassName(className) {\n this.container.className = 'highcharts-container ' + (className || '');\n }\n /**\n * Get the containing element, determine the size and create the inner\n * container div to hold the chart.\n *\n * @internal\n * @function Highcharts.Chart#afterGetContainer\n * @emits Highcharts.Chart#event:afterGetContainer\n */\n getContainer() {\n const chart = this, options = chart.options, optionsChart = options.chart, indexAttrName = 'data-highcharts-chart', containerId = uniqueKey(), renderTo = chart.renderTo;\n let containerStyle;\n // If the container already holds a chart, destroy it. The check for\n // hasRendered is there because web pages that are saved to disk from\n // the browser, will preserve the data-highcharts-chart attribute and\n // the SVG contents, but not an interactive chart. So in this case,\n // charts[oldChartIndex] will point to the wrong chart if any (#2609).\n const oldChartIndex = pInt(attr(renderTo, indexAttrName));\n if (isNumber(oldChartIndex) &&\n charts[oldChartIndex] &&\n charts[oldChartIndex].hasRendered) {\n charts[oldChartIndex].destroy();\n }\n // Make a reference to the chart from the div\n attr(renderTo, indexAttrName, chart.index);\n // Remove previous chart\n renderTo.innerHTML = AST.emptyHTML;\n // If the container doesn't have an offsetWidth, it has or is a child of\n // a node that has display:none. We need to temporarily move it out to a\n // visible state to determine the size, else the legend and tooltips\n // won't render properly. The skipClone option is used in sparklines as\n // a micro optimization, saving about 1-2 ms each chart.\n if (!optionsChart.skipClone && !renderTo.offsetWidth) {\n chart.temporaryDisplay();\n }\n // Get the width and height\n chart.getChartSize();\n const chartHeight = chart.chartHeight;\n let chartWidth = chart.chartWidth;\n // Allow table cells and flex-boxes to shrink without the chart\n // blocking them out (#6427) but skip in styled mode so inline styles\n // don't override user CSS on renderTo\n if (!chart.styledMode) {\n css(renderTo, { overflow: 'hidden' });\n }\n // Create the inner container\n if (!chart.styledMode) {\n containerStyle = extend({\n position: 'relative',\n // Needed for context menu (avoidscrollbars) and content\n // overflow in IE\n overflow: 'hidden',\n width: chartWidth + 'px',\n height: chartHeight + 'px',\n textAlign: 'left',\n lineHeight: 'normal', // #427\n zIndex: 0, // #1072\n '-webkit-tap-highlight-color': 'rgba(0,0,0,0)',\n userSelect: 'none', // #13503\n 'touch-action': 'manipulation',\n outline: 'none',\n padding: '0px'\n }, optionsChart.style || {});\n }\n /**\n * The containing HTML element of the chart. The container is\n * dynamically inserted into the element given as the `renderTo`\n * parameter in the {@link Highcharts#chart} constructor.\n *\n * @name Highcharts.Chart#container\n * @type {Highcharts.HTMLDOMElement}\n */\n const container = createElement('div', {\n id: containerId\n }, containerStyle, renderTo);\n chart.container = container;\n // Adjust width if setting height affected it (#20334)\n chart.getChartSize();\n if (chartWidth !== chart.chartWidth) {\n chartWidth = chart.chartWidth;\n if (!chart.styledMode) {\n css(container, {\n width: pick(optionsChart.style?.width, chartWidth + 'px')\n });\n }\n }\n // Cache the cursor (#1650)\n chart._cursor = container.style.cursor;\n /**\n * The renderer instance of the chart. Each chart instance has only one\n * associated renderer.\n *\n * @name Highcharts.Chart#renderer\n * @type {Highcharts.SVGRenderer}\n */\n chart.renderer = new SVGRenderer(container, chartWidth, chartHeight, void 0, optionsChart.forExport, options.exporting?.allowHTML, chart.styledMode, options.palette, chart.index);\n // Measure after the SVG is appended. In styled mode the inner\n // container's CSS `height: 100%` otherwise yields 0 and causes a false\n // first ResizeObserver reflow\n chart.containerBox = chart.getContainerBox();\n // Set the initial animation from the options\n setAnimation(void 0, chart);\n chart.setClassName(optionsChart.className);\n if (!chart.styledMode) {\n chart.renderer.setStyle(optionsChart.style);\n this.palette = chart.renderer.palette;\n }\n else {\n // Initialize definitions\n for (const key in options.defs) { // eslint-disable-line guard-for-in\n this.renderer.definition(options.defs[key]);\n }\n }\n fireEvent(this, 'afterGetContainer');\n }\n /**\n * Calculate margins by rendering axis labels in a preliminary position.\n * Title, subtitle and legend have already been rendered at this stage, but\n * will be moved into their final positions.\n *\n * @internal\n * @function Highcharts.Chart#getMargins\n * @emits Highcharts.Chart#event:getMargins\n */\n getMargins(skipAxes) {\n const { spacing, margin, titleOffset } = this;\n this.resetMargins();\n // Adjust for title and subtitle\n if (titleOffset[0] && !defined(margin[0])) {\n this.plotTop = Math.max(this.plotTop, titleOffset[0] + spacing[0]);\n }\n if (titleOffset[2] && !defined(margin[2])) {\n this.marginBottom = Math.max(this.marginBottom, titleOffset[2] + spacing[2]);\n }\n // Adjust for legend\n if (this.legend?.display) {\n this.legend.adjustMargins(margin, spacing);\n }\n fireEvent(this, 'getMargins');\n if (!skipAxes) {\n this.getAxisMargins();\n }\n }\n /**\n * @internal\n * @function Highcharts.Chart#getAxisMargins\n */\n getAxisMargins() {\n const chart = this, \n // [top, right, bottom, left]\n axisOffset = chart.axisOffset = [0, 0, 0, 0], colorAxis = chart.colorAxis, margin = chart.margin, getOffset = (axes) => {\n axes.forEach((axis) => {\n if (axis.visible) {\n axis.getOffset();\n }\n });\n };\n // Pre-render axes to get labels offset width\n if (chart.hasCartesianSeries) {\n getOffset(chart.axes);\n }\n else if (colorAxis?.length) {\n getOffset(colorAxis);\n }\n // Add the axis offsets\n marginNames.forEach((marginName, side) => {\n if (!defined(margin[side])) {\n chart[marginName] += axisOffset[side];\n }\n });\n chart.setChartSize();\n }\n /**\n * Return the current options of the chart, but only those that differ from\n * default options. Items that can be either an object or an array of\n * objects, like `series`, `xAxis` and `yAxis`, are always returned as\n * array.\n *\n * @sample highcharts/members/chart-getoptions\n *\n * @function Highcharts.Chart#getOptions\n *\n * @since 11.1.0\n */\n getOptions() {\n return diffObjects(this.userOptions, defaultOptions);\n }\n /**\n * Reflows the chart to its container. By default, the Resize Observer is\n * attached to the chart's div which allows to reflows the chart\n * automatically to its container, as per the\n * [chart.reflow](https://api.highcharts.com/highcharts/chart.reflow)\n * option.\n *\n * @sample highcharts/chart/events-container/\n * Pop up and reflow\n *\n * @function Highcharts.Chart#reflow\n *\n * @param {global.Event} [e]\n * Event arguments. Used primarily when the function is called\n * internally as a response to window resize.\n */\n reflow(e) {\n const chart = this, oldBox = chart.containerBox, containerBox = chart.getContainerBox();\n delete chart.pointer?.chartPosition;\n // Width and height checks for display:none. Target is doc in Opera\n // and win in Firefox, Chrome and IE9.\n if (!chart.exporting?.isPrinting &&\n !chart.isResizing &&\n oldBox &&\n // When fired by resize observer inside hidden container\n containerBox.width) {\n if (containerBox.width !== oldBox.width ||\n containerBox.height !== oldBox.height) {\n internalClearTimeout(chart.reflowTimeout);\n // When called from window.resize, e is set, else it's called\n // directly (#2224)\n chart.reflowTimeout = syncTimeout(function () {\n // Set size, it may have been destroyed in the meantime\n // (#1257)\n if (chart.container) {\n chart.setSize(void 0, void 0, false);\n // #23712: sync containerBox with reflowed height to\n // break infinite loop\n const box = chart.containerBox;\n if (box) {\n box.height = chart.chartHeight;\n }\n }\n }, e ? 100 : 0);\n }\n chart.containerBox = containerBox;\n }\n }\n /**\n * Toggle the event handlers necessary for auto resizing, depending on the\n * `chart.reflow` option.\n *\n * @internal\n * @function Highcharts.Chart#setReflow\n */\n setReflow() {\n const chart = this;\n const runReflow = (e) => {\n if (chart.options?.chart.reflow && chart.hasLoaded) {\n chart.reflow(e);\n }\n };\n if (typeof ResizeObserver === 'function') {\n (new ResizeObserver(runReflow)).observe(chart.renderTo);\n // Fallback for more legacy browser versions.\n }\n else {\n const unbind = addEvent(win, 'resize', runReflow);\n addEvent(this, 'destroy', unbind);\n }\n }\n /**\n * Resize the chart to a given width and height. In order to set the width\n * only, the height argument may be skipped. To set the height only, pass\n * `undefined` for the width.\n *\n * @sample highcharts/members/chart-setsize-button/\n * Test resizing from buttons\n * @sample highcharts/members/chart-setsize-jquery-resizable/\n * Add a jQuery UI resizable\n * @sample stock/members/chart-setsize/\n * Highcharts Stock with UI resizable\n *\n * @function Highcharts.Chart#setSize\n *\n * @param {number|null} [width]\n * The new pixel width of the chart. Since v4.2.6, the argument can\n * be `undefined` in order to preserve the current value (when\n * setting height only), or `null` to adapt to the width of the\n * containing element.\n *\n * @param {number|null} [height]\n * The new pixel height of the chart. Since v4.2.6, the argument can\n * be `undefined` in order to preserve the current value, or `null`\n * in order to adapt to the height of the containing element.\n *\n * @param {boolean|Partial<Highcharts.AnimationOptionsObject>} [animation]\n * Whether and how to apply animation. When `undefined`, it applies\n * the animation that is set in the `chart.animation` option.\n *\n *\n * @emits Highcharts.Chart#event:endResize\n * @emits Highcharts.Chart#event:resize\n */\n setSize(width, height, animation) {\n const chart = this, renderer = chart.renderer;\n // Handle the isResizing counter\n chart.isResizing += 1;\n // Set the animation for the current process\n setAnimation(animation, chart);\n const globalAnimation = renderer.globalAnimation;\n chart.oldChartHeight = chart.chartHeight;\n chart.oldChartWidth = chart.chartWidth;\n if (typeof width !== 'undefined') {\n chart.options.chart.width = width;\n }\n if (typeof height !== 'undefined') {\n chart.options.chart.height = height;\n }\n chart.getChartSize();\n const { chartWidth, chartHeight, scrollablePixelsX = 0, scrollablePixelsY = 0 } = chart;\n // Avoid expensive redrawing if the computed size didn't change\n if (chart.isDirtyBox ||\n chartWidth !== chart.oldChartWidth ||\n chartHeight !== chart.oldChartHeight) {\n // Resize the container with the global animation applied if enabled\n // (#2503)\n if (!chart.styledMode) {\n (globalAnimation ? animate : css)(chart.container, {\n width: `${chartWidth + scrollablePixelsX}px`,\n height: `${chartHeight + scrollablePixelsY}px`\n }, globalAnimation);\n }\n chart.setChartSize(true);\n renderer.setSize(chartWidth, chartHeight, globalAnimation);\n // Handle axes\n chart.axes.forEach(function (axis) {\n axis.isDirty = true;\n axis.setScale();\n });\n chart.isDirtyLegend = true; // Force legend redraw\n chart.isDirtyBox = true; // Force redraw of plot and chart border\n chart.layOutTitles(); // #2857\n chart.getMargins();\n chart.redraw(globalAnimation);\n chart.oldChartHeight = void 0;\n fireEvent(chart, 'resize');\n // Fire endResize and set isResizing back. If animation is disabled,\n // fire without delay, but in a new thread to avoid triggering the\n // resize observer (#19027).\n setTimeout(() => {\n if (chart) {\n fireEvent(chart, 'endResize');\n }\n }, animObject(globalAnimation).duration);\n }\n // Handle resizing counter even if we've re-rendered or not (#20548).\n chart.isResizing -= 1;\n }\n /**\n * Set the public chart properties. This is done before and after the\n * pre-render to determine margin sizes.\n *\n * @internal\n * @function Highcharts.Chart#setChartSize\n * @emits Highcharts.Chart#event:afterSetChartSize\n */\n setChartSize(skipAxes) {\n const chart = this, { chartHeight, chartWidth, clipOffset, inverted, spacing, renderer } = chart, clipRoundFunc = Math[inverted ? 'floor' : 'round'];\n let plotLeft, plotTop, plotWidth, plotHeight;\n /**\n * The current left position of the plot area in pixels.\n *\n * @name Highcharts.Chart#plotLeft\n * @type {number}\n */\n chart.plotLeft = plotLeft = Math.round(chart.plotLeft);\n /**\n * The current top position of the plot area in pixels.\n *\n * @name Highcharts.Chart#plotTop\n * @type {number}\n */\n chart.plotTop = plotTop = Math.round(chart.plotTop);\n /**\n * The current width of the plot area in pixels.\n *\n * @name Highcharts.Chart#plotWidth\n * @type {number}\n */\n chart.plotWidth = plotWidth = Math.max(0, Math.round(chartWidth - plotLeft - (chart.marginRight ?? 0)));\n /**\n * The current height of the plot area in pixels.\n *\n * @name Highcharts.Chart#plotHeight\n * @type {number}\n */\n chart.plotHeight = plotHeight = Math.max(0, Math.round(chartHeight - plotTop - (chart.marginBottom ?? 0)));\n chart.plotSizeX = inverted ? plotHeight : plotWidth;\n chart.plotSizeY = inverted ? plotWidth : plotHeight;\n // Set boxes used for alignment\n chart.spacingBox = renderer.spacingBox = {\n x: spacing[3],\n y: spacing[0],\n width: chartWidth - spacing[3] - spacing[1],\n height: chartHeight - spacing[0] - spacing[2]\n };\n chart.plotBox = renderer.plotBox = {\n x: plotLeft,\n y: plotTop,\n width: plotWidth,\n height: plotHeight\n };\n // Compute the clipping box\n if (clipOffset) {\n chart.clipBox = {\n x: clipRoundFunc(clipOffset[inverted ? 2 : 3]),\n y: clipRoundFunc(clipOffset[inverted ? 1 : 0]),\n width: clipRoundFunc(chart.plotSizeX - clipOffset[inverted ? 0 : 1] -\n clipOffset[inverted ? 2 : 3]),\n height: clipRoundFunc(chart.plotSizeY - clipOffset[inverted ? 1 : 0] -\n clipOffset[inverted ? 3 : 2])\n };\n }\n if (!skipAxes) {\n for (const axis of chart.axes) {\n axis.setAxisSize();\n axis.setAxisTranslation();\n }\n renderer.alignElements();\n }\n fireEvent(chart, 'afterSetChartSize', { skipAxes: skipAxes });\n }\n /**\n * Initial margins before auto size margins are applied.\n *\n * @internal\n * @function Highcharts.Chart#resetMargins\n */\n resetMargins() {\n fireEvent(this, 'resetMargins');\n const chart = this, chartOptions = chart.options.chart, plotBorderWidth = chartOptions.plotBorderWidth || 0, halfWidth = Math.round(plotBorderWidth) / 2;\n // Create margin and spacing array\n ['margin', 'spacing'].forEach((target) => {\n const value = chartOptions[target], values = isObject(value) ? value : [value, value, value, value];\n [\n 'Top',\n 'Right',\n 'Bottom',\n 'Left'\n ].forEach((sideName, side) => {\n chart[target][side] = (chartOptions[`${target}${sideName}`] ??\n values[side]);\n });\n });\n // Set margin names like chart.plotTop, chart.plotLeft,\n // chart.marginRight, chart.marginBottom.\n marginNames.forEach((marginName, side) => {\n chart[marginName] = chart.margin[side] ?? chart.spacing[side];\n });\n chart.axisOffset = [0, 0, 0, 0]; // Top, right, bottom, left\n chart.clipOffset = [\n halfWidth,\n halfWidth,\n halfWidth,\n halfWidth\n ];\n chart.plotBorderWidth = plotBorderWidth;\n }\n /**\n * Internal function to draw or redraw the borders and backgrounds for chart\n * and plot area.\n *\n * @internal\n * @function Highcharts.Chart#drawChartBox\n * @emits Highcharts.Chart#event:afterDrawChartBox\n */\n drawChartBox() {\n const chart = this, optionsChart = chart.options.chart, { backgroundColor, plotBackgroundColor, plotBackgroundImage, plotBorderRadius = 0, shadow } = optionsChart, { chartWidth, chartHeight, clipBox, clipOffset, clipRect, plotBGImage, plotBox, plotLeft, plotTop, plotWidth, plotHeight, renderer, styledMode } = chart;\n let chartBackground = chart.chartBackground, plotBackground = chart.plotBackground, plotBorder = chart.plotBorder, chartBorderWidth, mgn, bgAttr, verb = 'animate';\n // Chart area\n if (!chartBackground) {\n chart.chartBackground = chartBackground = renderer.rect()\n .addClass('highcharts-background')\n .add();\n verb = 'attr';\n }\n if (!styledMode) {\n // Presentational\n chartBorderWidth = optionsChart.borderWidth || 0;\n mgn = chartBorderWidth + (shadow ? 8 : 0);\n bgAttr = {\n fill: backgroundColor || 'none'\n };\n if (chartBorderWidth || chartBackground['stroke-width']) { // #980\n bgAttr.stroke = optionsChart.borderColor;\n bgAttr['stroke-width'] = chartBorderWidth;\n }\n chartBackground\n .attr(bgAttr)\n .shadow(shadow);\n }\n else {\n chartBorderWidth = mgn = chartBackground.strokeWidth();\n }\n chartBackground[verb]({\n x: mgn / 2,\n y: mgn / 2,\n width: chartWidth - mgn - chartBorderWidth % 2,\n height: chartHeight - mgn - chartBorderWidth % 2,\n r: optionsChart.borderRadius\n });\n // Plot background\n verb = 'animate';\n if (!plotBackground) {\n verb = 'attr';\n chart.plotBackground = plotBackground = renderer.rect()\n .addClass('highcharts-plot-background')\n .add();\n }\n plotBackground[verb]({\n ...plotBox,\n r: plotBorderRadius\n });\n if (!styledMode) {\n // Presentational attributes for the background\n plotBackground\n .attr({\n fill: plotBackgroundColor || 'none'\n })\n .shadow(optionsChart.plotShadow);\n // Create the background image\n if (plotBackgroundImage) {\n if (!plotBGImage) {\n chart.plotBGImage = renderer.image(plotBackgroundImage, plotLeft, plotTop, plotWidth, plotHeight).add();\n }\n else {\n if (plotBackgroundImage !== plotBGImage.attr('href')) {\n plotBGImage.attr('href', plotBackgroundImage);\n }\n plotBGImage.animate(plotBox);\n }\n }\n }\n // Plot clip\n if (!clipRect) {\n chart.clipRect = renderer.clipRect(clipBox);\n }\n else {\n clipRect.animate({\n width: clipBox.width,\n height: clipBox.height\n });\n }\n // Plot area border\n verb = 'animate';\n if (!plotBorder) {\n verb = 'attr';\n chart.plotBorder = plotBorder = renderer.rect()\n .addClass('highcharts-plot-border')\n .attr({\n zIndex: 1.5 // Above the grid, below the axes, #24521.\n })\n .add();\n }\n // Presentational\n plotBorder.attr(styledMode ? void 0 : {\n stroke: optionsChart.plotBorderColor,\n 'stroke-width': optionsChart.plotBorderWidth || 0,\n fill: 'none'\n })[verb]({ r: plotBorderRadius });\n const strokeWidth = plotBorder.strokeWidth(), plotBorderBox = merge(plotBorder.crisp(plotBox, -strokeWidth));\n // If any of the clipOffset sides are larger than half the stroke width,\n // the plotBorderBox needs to be extended so that the plot border\n // includes the full stroke of axis lines. Not for styled mode because\n // the stroke-width is (accidentally) not considered in the `clipOffset`\n // calculation.\n if (clipOffset && !styledMode) {\n const extendUp = clipOffset[0] - strokeWidth / 2, extendLeft = clipOffset[3] - strokeWidth / 2;\n plotBorderBox.x -= extendLeft;\n plotBorderBox.y -= extendUp;\n plotBorderBox.width += extendLeft + clipOffset[1] - strokeWidth / 2;\n plotBorderBox.height += extendUp + clipOffset[2] - strokeWidth / 2;\n }\n plotBorder[verb](plotBorderBox);\n // Plot border clipping along for the `plotBorderRadius` feature. A half\n // stroke width must be added for the outside clip, and subtracter for\n // the inside clip.\n ['plotClipOuter', 'plotClipInner'].forEach((prop, i) => {\n const clip = chart[prop], sw = i ? -strokeWidth : strokeWidth;\n clip?.[plotBorderRadius ? verb : 'attr']({\n x: plotBorderBox.x - sw / 2,\n y: plotBorderBox.y - sw / 2,\n width: plotBorderBox.width + sw,\n height: plotBorderBox.height + sw,\n r: plotBorderRadius ? plotBorderRadius + sw / 2 : 0\n });\n // Apply clipping only when we actually have a plot border radius\n clip?.parentGroup?.attr({\n display: plotBorderRadius ? '' : 'none'\n });\n });\n // Reset\n chart.isDirtyBox = false;\n fireEvent(this, 'afterDrawChartBox');\n }\n /**\n * Detect whether a certain chart property is needed based on inspecting its\n * options and series. This mainly applies to the chart.inverted property,\n * and in extensions to the chart.angular and chart.polar properties.\n *\n * @internal\n * @function Highcharts.Chart#propFromSeries\n */\n propFromSeries() {\n const chart = this, optionsChart = chart.options.chart, seriesOptions = chart.options.series;\n let i, klass, value;\n /**\n * The flag is set to `true` if a series of the chart is inverted.\n *\n * @name Highcharts.Chart#inverted\n * @type {boolean|undefined}\n */\n ['inverted', 'angular', 'polar'].forEach(function (key) {\n // The default series type's class\n klass = seriesTypes[optionsChart.type];\n // Get the value from available chart-wide properties\n value =\n // It is set in the options:\n optionsChart[key] ||\n // The default series class:\n (klass && klass.prototype[key]);\n // Requires it\n // 4. Check if any the chart's series require it\n i = seriesOptions?.length;\n while (!value && i--) {\n klass = seriesTypes[seriesOptions[i].type];\n if (klass && klass.prototype[key]) {\n value = true;\n }\n }\n // Set the chart property\n chart[key] = value;\n });\n }\n /**\n * Internal function to link two or more series together, based on the\n * `linkedTo` option. This is done from `Chart.render`, and after\n * `Chart.addSeries` and `Series.remove`.\n *\n * @internal\n * @function Highcharts.Chart#linkSeries\n * @emits Highcharts.Chart#event:afterLinkSeries\n */\n linkSeries(isUpdating) {\n const chart = this, chartSeries = chart.series;\n // Reset links\n chartSeries.forEach(function (series) {\n series.linkedSeries.length = 0;\n });\n // Apply new links\n chartSeries.forEach(function (series) {\n const { linkedTo } = series.options, linkedParent = isString(linkedTo) && (linkedTo === ':previous' ?\n chartSeries[series.index - 1] :\n chart.get(linkedTo));\n if (linkedParent &&\n // #3341 avoid mutual linking\n linkedParent.linkedParent !== series) {\n linkedParent.linkedSeries.push(series);\n series.linkedParent = linkedParent;\n series.visible = (series.options.visible ??\n linkedParent.options.visible ??\n series.visible); // #3879\n }\n });\n fireEvent(this, 'afterLinkSeries', { isUpdating });\n }\n /**\n * Render series for the chart.\n *\n * @internal\n * @function Highcharts.Chart#renderSeries\n */\n renderSeries() {\n this.series.forEach(function (serie) {\n serie.translate();\n serie.render();\n });\n }\n /**\n * Render all graphics for the chart. Runs internally on initialization.\n *\n * @internal\n * @function Highcharts.Chart#render\n */\n render() {\n const chart = this, axes = chart.axes, colorAxis = chart.colorAxis, renderer = chart.renderer, { axisLayoutRuns = 2, plotBorderRadius } = chart.options.chart, renderAxes = (axes) => {\n axes.forEach((axis) => {\n if (axis.visible) {\n axis.render();\n }\n });\n };\n let expectedSpace = 0, // Correction for X axis labels\n // If the plot area size has changed significantly, calculate tick\n // positions again\n redoHorizontal = true, redoVertical, run = 0;\n // Create the clip rectangle for plot border radius\n if (plotBorderRadius) {\n chart.plotClipOuter || (chart.plotClipOuter = renderer.clipRect());\n chart.plotClipInner || (chart.plotClipInner = renderer.clipRect());\n }\n // Title\n chart.setTitle();\n // Fire an event before the margins are computed. This is where the\n // legend is assigned.\n fireEvent(chart, 'beforeMargins');\n // Get stacks\n chart.getStacks?.();\n // Get chart margins\n chart.getMargins(true);\n chart.setChartSize();\n for (const axis of axes) {\n const { options } = axis, { labels, offset } = options;\n if (chart.hasCartesianSeries && // #20948\n axis.horiz &&\n axis.visible &&\n labels.enabled &&\n axis.series.length &&\n axis.coll !== 'colorAxis' &&\n !axis.isRadial // Gauges and polar chart (#24526)\n ) {\n expectedSpace = options.tickLength;\n axis.createGroups();\n // Calculate expected space based on dummy tick\n const mockTick = new Tick(axis, 0, '', true), label = mockTick.createLabel('x', labels);\n mockTick.destroy();\n if (label &&\n pick(labels.reserveSpace, !isNumber(options.crossing))) {\n expectedSpace = label.getBBox().height +\n labels.distance +\n Math.max(isNumber(offset) ? offset : 0, 0);\n }\n if (expectedSpace) {\n label?.destroy();\n break;\n }\n }\n }\n // Use Math.max to prevent negative plotHeight\n chart.plotHeight = Math.max(chart.plotHeight - expectedSpace, 0);\n while ((redoHorizontal || redoVertical || axisLayoutRuns > 1) &&\n run < axisLayoutRuns // #19794\n ) {\n const tempWidth = chart.plotWidth, tempHeight = chart.plotHeight, threshold = [1.05, 1.1];\n for (const axis of axes) {\n const horizNum = +(axis.horiz || 0);\n if (run === 0) {\n // Get margins by pre-rendering axes\n axis.setScale();\n // On datetime axes, consider the tick interval match. A\n // match close to 1 means that the current normalized tick\n // interval is an insecure match to the requested tick\n // interval, on the brink of landing on a higher unit. In\n // this case, we should redo the axis to get a more\n // appropriate tick interval (#17393).\n const tickIntervalMatch = axis.tickPositions?.info?.match;\n if (tickIntervalMatch) {\n threshold[horizNum] = Math.min(tickIntervalMatch, threshold[horizNum]);\n }\n }\n else if ((horizNum && redoHorizontal) ||\n (!horizNum && redoVertical)) {\n // Update to reflect the new margins\n axis.setTickInterval(true);\n }\n }\n if (run === 0) {\n chart.getAxisMargins();\n }\n else {\n // Check again for new, rotated or moved labels\n chart.getMargins();\n }\n redoHorizontal = (tempWidth / chart.plotWidth) >\n (run ? 1 : threshold[1]);\n redoVertical = (tempHeight / chart.plotHeight) >\n (run ? 1 : threshold[0]);\n run++;\n }\n // Draw the borders and backgrounds\n chart.drawChartBox();\n // Axes\n if (chart.hasCartesianSeries) {\n renderAxes(axes);\n }\n else if (colorAxis?.length) {\n renderAxes(colorAxis);\n }\n // The series\n chart.seriesGroup || (chart.seriesGroup = renderer.g('series-group')\n .attr({ zIndex: 3 })\n .shadow(chart.options.chart.seriesGroupShadow)\n .add());\n chart.renderSeries();\n // Credits\n chart.addCredits();\n // Handle responsiveness\n if (chart.setResponsive) {\n chart.setResponsive();\n }\n // Set flag\n chart.hasRendered = true;\n }\n /**\n * Set a new credits label for the chart.\n *\n * @sample highcharts/credits/credits-update/\n * Add and update credits\n *\n * @function Highcharts.Chart#addCredits\n *\n * @param {Highcharts.CreditsOptions} [credits]\n * A configuration object for the new credits.\n */\n addCredits(credits) {\n const chart = this, creds = merge(true, this.options.credits, credits);\n if (creds.enabled && !this.credits) {\n /**\n * The chart's credits label. The label has an `update` method that\n * allows setting new options as per the\n * [credits options set](https://api.highcharts.com/highcharts/credits).\n *\n * @name Highcharts.Chart#credits\n * @type {Highcharts.SVGElement}\n */\n this.credits = this.renderer.text(creds.text + (this.mapCredits || ''), 0, 0, creds.useHTML)\n .addClass('highcharts-credits')\n .on('click', function (e) {\n // Fire the event with browser redirect as default function\n fireEvent(chart, 'creditsClick', e, () => {\n if (creds.href) {\n win.location.href = creds.href;\n }\n });\n })\n .attr({\n align: creds.position.align,\n zIndex: 8\n });\n // If creds.events?.click exists, add it as an event listener\n if (creds.events?.click) {\n addEvent(chart, 'creditsClick', creds.events.click);\n }\n if (!chart.styledMode) {\n this.credits.css(creds.style);\n }\n this.credits\n .add()\n .align(creds.position);\n // Dynamically update\n this.credits.update = function (options) {\n chart.credits = chart.credits.destroy();\n chart.addCredits(options);\n };\n }\n }\n /**\n * Remove the chart and purge memory. This method is called internally\n * before adding a second chart into the same container, as well as on\n * window unload to prevent leaks.\n *\n * @sample highcharts/members/chart-destroy/\n * Destroy the chart from a button\n * @sample stock/members/chart-destroy/\n * Destroy with Highcharts Stock\n *\n * @function Highcharts.Chart#destroy\n *\n * @emits Highcharts.Chart#event:destroy\n */\n destroy() {\n const chart = this, axes = chart.axes, series = chart.series, container = chart.container, parentNode = container?.parentNode;\n let i;\n // Fire the chart.destroy event\n fireEvent(chart, 'destroy');\n // Delete the chart from charts lookup array\n if (chart.renderer.forExport) {\n erase(charts, chart); // #6569\n }\n else {\n charts[chart.index] = void 0;\n }\n H.chartCount--;\n chart.renderTo.removeAttribute('data-highcharts-chart');\n // Remove events\n removeEvent(chart);\n // ==== Destroy collections:\n // Destroy axes\n i = axes.length;\n while (i--) {\n axes[i] = axes[i].destroy();\n }\n // Destroy scroller & scroller series before destroying base series\n this.scroller?.destroy?.();\n // Destroy each series\n i = series.length;\n while (i--) {\n series[i] = series[i].destroy();\n }\n // ==== Destroy chart properties:\n [\n 'title', 'subtitle', 'chartBackground', 'plotBackground',\n 'plotBGImage', 'plotBorder', 'seriesGroup', 'clipRect', 'credits',\n 'pointer', 'rangeSelector', 'legend', 'resetZoomButton', 'tooltip',\n 'renderer'\n ].forEach((name) => {\n chart[name] = chart[name]?.destroy?.();\n });\n // Remove container and all SVG, check container as it can break in IE\n // when destroyed before finished loading\n if (container) {\n container.innerHTML = AST.emptyHTML;\n removeEvent(container);\n if (parentNode) {\n discardElement(container);\n }\n }\n // Clean it all up\n objectEach(chart, function (val, key) {\n delete chart[key];\n });\n }\n /**\n * Prepare for first rendering after all data are loaded.\n *\n * @internal\n * @function Highcharts.Chart#firstRender\n * @emits Highcharts.Chart#event:beforeRender\n */\n firstRender() {\n const chart = this, options = chart.options;\n // Create the container\n chart.getContainer();\n chart.resetMargins();\n chart.setChartSize();\n // Set the common chart properties (mainly invert) from the given series\n chart.propFromSeries();\n // Get axes\n chart.createAxes();\n // Initialize the series\n const series = isArray(options.series) ? options.series : [];\n options.series = []; // Avoid mutation\n series.forEach(\n // #9680\n function (serieOptions) {\n chart.initSeries(serieOptions);\n });\n chart.linkSeries();\n // Run an event after axes and series are initialized, but before\n // render. At this stage, the series data is indexed and cached in the\n // xData and yData arrays, so we can access those before rendering. Used\n // in Highcharts Stock.\n fireEvent(chart, 'beforeRender');\n chart.render();\n chart.pointer?.getChartPosition(); // #14973\n // Fire the load event if there are no external images\n if (!chart.renderer.asyncCounter && !chart.hasLoaded) {\n chart.onload();\n }\n // If the chart was rendered outside the top container, put it back in\n // (#3679)\n chart.temporaryDisplay(true);\n }\n /**\n * Internal function that runs on chart load, async if any images are loaded\n * in the chart. Runs the callbacks and triggers the `load` and `render`\n * events.\n *\n * @internal\n * @function Highcharts.Chart#onload\n * @emits Highcharts.Chart#event:load\n * @emits Highcharts.Chart#event:render\n */\n onload() {\n // Run callbacks, first the ones registered by modules, then user's one\n this.callbacks.concat([this.callback]).forEach(function (fn) {\n // Chart destroyed in its own callback (#3600)\n if (fn && typeof this.index !== 'undefined') {\n fn.apply(this, [this]);\n }\n }, this);\n fireEvent(this, 'load');\n fireEvent(this, 'render');\n // Set up auto resize, check for not destroyed (#6068)\n if (defined(this.index)) {\n this.setReflow();\n }\n this.warnIfA11yModuleNotLoaded();\n this.warnIfCSSNotLoaded();\n // Don't run again\n this.hasLoaded = true;\n }\n /**\n * Emit console warning if the a11y module is not loaded.\n * @internal\n */\n warnIfA11yModuleNotLoaded() {\n const { options, title } = this;\n if (options && !this.accessibility) {\n // Make chart behave as an image with the title as alt text\n this.renderer.boxWrapper.attr({\n role: 'img',\n 'aria-label': (title?.element.textContent || ''\n // #17753, < is not allowed in SVG attributes\n ).replace(/</g, '&lt;')\n });\n if (!(options.accessibility && options.accessibility.enabled === false)) {\n error('Highcharts warning: Consider including the ' +\n '\"accessibility.js\" module to make your chart more ' +\n 'usable for people with disabilities. Set the ' +\n '\"accessibility.enabled\" option to false to remove this ' +\n 'warning. See https://www.highcharts.com/docs/accessibility/accessibility-module.', false, this);\n }\n }\n }\n /**\n * Emit console warning if the highcharts.css file is not loaded.\n * @internal\n */\n warnIfCSSNotLoaded() {\n if (this.styledMode) {\n const containerStyle = win.getComputedStyle(this.container);\n if (containerStyle.zIndex !== '0') {\n error(35, false, this);\n }\n }\n }\n /**\n * Add a series to the chart after render time. Note that this method should\n * never be used when adding data synchronously at chart render time, as it\n * adds expense to the calculations and rendering. When adding data at the\n * same time as the chart is initialized, add the series as a configuration\n * option instead. With multiple axes, the `offset` is dynamically adjusted.\n *\n * @sample highcharts/members/chart-addseries/\n * Add a series from a button\n * @sample stock/members/chart-addseries/\n * Add a series in Highcharts Stock\n *\n * @function Highcharts.Chart#addSeries\n *\n * @param {Highcharts.SeriesOptionsType} options\n * The config options for the series.\n *\n * @param {boolean} [redraw=true]\n * Whether to redraw the chart after adding.\n *\n * @param {boolean|Partial<Highcharts.AnimationOptionsObject>} [animation]\n * Whether to apply animation, and optionally animation\n * configuration. When `undefined`, it applies the animation that is\n * set in the `chart.animation` option.\n *\n * @return {Highcharts.Series}\n * The newly created series object.\n *\n * @emits Highcharts.Chart#event:addSeries\n * @emits Highcharts.Chart#event:afterAddSeries\n */\n addSeries(options, redraw, animation) {\n const chart = this;\n let series;\n if (options) { // <- not necessary\n redraw = pick(redraw, true); // Defaults to true\n fireEvent(chart, 'addSeries', { options: options }, function () {\n series = chart.initSeries(options);\n chart.isDirtyLegend = true;\n chart.linkSeries();\n fireEvent(chart, 'afterAddSeries', { series: series });\n if (redraw) {\n chart.redraw(animation);\n }\n });\n }\n return series;\n }\n /**\n * Add an axis to the chart after render time. Note that this method should\n * never be used when adding data synchronously at chart render time, as it\n * adds expense to the calculations and rendering. When adding data at the\n * same time as the chart is initialized, add the axis as a configuration\n * option instead.\n *\n * @sample highcharts/members/chart-addaxis/\n * Add and remove axes\n *\n * @function Highcharts.Chart#addAxis\n *\n * @param {Highcharts.AxisOptions} options\n * The axis options.\n *\n * @param {boolean} [isX=false]\n * Whether it is an X axis or a value axis.\n *\n * @param {boolean} [redraw=true]\n * Whether to redraw the chart after adding.\n *\n * @param {boolean|Partial<Highcharts.AnimationOptionsObject>} [animation]\n * Whether and how to apply animation in the redraw. When\n * `undefined`, it applies the animation that is set in the\n * `chart.animation` option.\n *\n * @return {Highcharts.Axis}\n * The newly generated Axis object.\n */\n addAxis(options, isX, redraw, animation) {\n return this.createAxis(isX ? 'xAxis' : 'yAxis', { axis: options, redraw: redraw, animation: animation });\n }\n /**\n * Add a color axis to the chart after render time. Note that this method\n * should never be used when adding data synchronously at chart render time,\n * as it adds expense to the calculations and rendering. When adding data at\n * the same time as the chart is initialized, add the axis as a\n * configuration option instead.\n *\n * @sample highcharts/members/chart-addaxis/\n * Add and remove axes\n *\n * @function Highcharts.Chart#addColorAxis\n *\n * @param {Highcharts.ColorAxisOptions} options\n * The axis options.\n *\n * @param {boolean} [redraw=true]\n * Whether to redraw the chart after adding.\n *\n * @param {boolean|Partial<Highcharts.AnimationOptionsObject>} [animation]\n * Whether and how to apply animation in the redraw. When\n * `undefined`, it applies the animation that is set in the\n * `chart.animation` option.\n *\n * @return {Highcharts.Axis}\n * The newly generated Axis object.\n */\n addColorAxis(options, redraw, animation) {\n return this.createAxis('colorAxis', { axis: options, redraw: redraw, animation: animation });\n }\n /**\n * Factory for creating different axis types.\n *\n * @internal\n * @function Highcharts.Chart#createAxis\n *\n * @param {string} coll\n * An axis type.\n *\n * @param {...Array<*>} options\n * All arguments for the constructor.\n *\n * @return {Highcharts.Axis}\n * The newly generated Axis object.\n */\n createAxis(coll, options) {\n const axis = new Axis(this, options.axis, coll);\n if (pick(options.redraw, true)) {\n this.redraw(options.animation);\n }\n return axis;\n }\n /**\n * Dim the chart and show a loading text or symbol. Options for the loading\n * screen are defined in {@link\n * https://api.highcharts.com/highcharts/loading|the loading options}.\n *\n * @sample highcharts/members/chart-hideloading/\n * Show and hide loading from a button\n * @sample highcharts/members/chart-showloading/\n * Apply different text labels\n * @sample stock/members/chart-show-hide-loading/\n * Toggle loading in Highcharts Stock\n *\n * @function Highcharts.Chart#showLoading\n *\n * @param {string} [str]\n * An optional text to show in the loading label instead of the\n * default one. The default text is set in\n * [lang.loading](https://api.highcharts.com/highcharts/lang.loading).\n */\n showLoading(str) {\n const chart = this, options = chart.options, loadingOptions = options.loading, loadingStyle = loadingOptions?.style ?? {}, setLoadingSize = function () {\n if (loadingDiv) {\n css(loadingDiv, {\n left: loadingStyle.left ?? chart.plotLeft + 'px',\n top: loadingStyle.top ?? chart.plotTop + 'px',\n width: loadingStyle.width ?? chart.plotWidth + 'px',\n height: loadingStyle.height ?? chart.plotHeight + 'px'\n });\n }\n };\n let loadingDiv = chart.loadingDiv, loadingSpan = chart.loadingSpan;\n // Create the layer at the first call\n if (!loadingDiv) {\n chart.loadingDiv = loadingDiv = createElement('div', {\n className: 'highcharts-loading highcharts-loading-hidden'\n }, null, chart.container);\n }\n if (!loadingSpan) {\n chart.loadingSpan = loadingSpan = createElement('span', { className: 'highcharts-loading-inner' }, null, loadingDiv);\n addEvent(chart, 'redraw', setLoadingSize); // #1080\n }\n loadingDiv.className = 'highcharts-loading';\n // Update text\n AST.setElementHTML(loadingSpan, pick(str, options.lang.loading, ''));\n if (!chart.styledMode) {\n // Update visuals\n css(loadingDiv, extend(loadingStyle, { zIndex: 10 }));\n css(loadingSpan, loadingOptions?.labelStyle ?? {});\n // Show it\n if (!chart.loadingShown) {\n css(loadingDiv, {\n opacity: 0,\n display: ''\n });\n animate(loadingDiv, {\n opacity: loadingStyle.opacity ?? 0.5\n }, {\n duration: loadingOptions?.showDuration ?? 0\n });\n }\n }\n chart.loadingShown = true;\n setLoadingSize();\n }\n /**\n * Hide the loading layer.\n *\n * @see Highcharts.Chart#showLoading\n *\n * @sample highcharts/members/chart-hideloading/\n * Show and hide loading from a button\n * @sample stock/members/chart-show-hide-loading/\n * Toggle loading in Highcharts Stock\n *\n * @function Highcharts.Chart#hideLoading\n */\n hideLoading() {\n const options = this.options, loadingDiv = this.loadingDiv;\n if (loadingDiv) {\n loadingDiv.className =\n 'highcharts-loading highcharts-loading-hidden';\n if (!this.styledMode) {\n animate(loadingDiv, {\n opacity: 0\n }, {\n duration: options.loading?.hideDuration ?? 100,\n complete: function () {\n css(loadingDiv, { display: 'none' });\n }\n });\n }\n }\n this.loadingShown = false;\n }\n /**\n * A generic function to update any element of the chart. Elements can be\n * enabled and disabled, moved, re-styled, re-formatted etc.\n *\n * A special case is configuration objects that take arrays, for example\n * [xAxis](https://api.highcharts.com/highcharts/xAxis),\n * [yAxis](https://api.highcharts.com/highcharts/yAxis) or\n * [series](https://api.highcharts.com/highcharts/series). For these\n * collections, an `id` option is used to map the new option set to an\n * existing object. If an existing object of the same id is not found, the\n * corresponding item is updated. So for example, running `chart.update`\n * with a series item without an id, will cause the existing chart's series\n * with the same index in the series array to be updated. When the\n * `oneToOne` parameter is true, `chart.update` will also take care of\n * adding and removing items from the collection. Read more under the\n * parameter description below.\n *\n * Note that when changing series data, `chart.update` may mutate the passed\n * data options.\n *\n * See also the\n * [responsive option set](https://api.highcharts.com/highcharts/responsive).\n * Switching between `responsive.rules` basically runs `chart.update` under\n * the hood.\n *\n * @sample highcharts/members/chart-update/\n * Update chart geometry\n *\n * @function Highcharts.Chart#update\n *\n * @param {Highcharts.Options} options\n * A configuration object for the new chart options.\n *\n * @param {boolean} [redraw=true]\n * Whether to redraw the chart.\n *\n * @param {boolean} [oneToOne=false]\n * When `true`, the `series`, `xAxis`, `yAxis` and `annotations`\n * collections will be updated one to one, and items will be either\n * added or removed to match the new updated options. For example,\n * if the chart has two series and we call `chart.update` with a\n * configuration containing three series, one will be added. If we\n * call `chart.update` with one series, one will be removed. Setting\n * an empty `series` array will remove all series, but leaving out\n * the`series` property will leave all series untouched. If the\n * series have id's, the new series options will be matched by id,\n * and the remaining ones removed.\n *\n * @param {boolean|Partial<Highcharts.AnimationOptionsObject>} [animation]\n * Whether to apply animation, and optionally animation\n * configuration. When `undefined`, it applies the animation that is\n * set in the `chart.animation` option.\n *\n * @emits Highcharts.Chart#event:update\n * @emits Highcharts.Chart#event:afterUpdate\n */\n update(options, redraw, oneToOne, animation) {\n const chart = this, adders = {\n credits: 'addCredits',\n title: 'setTitle',\n subtitle: 'setSubtitle',\n caption: 'setCaption'\n }, isResponsiveOptions = options.isResponsiveOptions, itemsForRemoval = [];\n let updateAllAxes, updateAllSeries, runSetSize;\n fireEvent(chart, 'update', { options: options });\n // If there are responsive rules in action, undo the responsive rules\n // before we apply the updated options and replay the responsive rules\n // on top from the chart.redraw function (#9617).\n if (!isResponsiveOptions) {\n chart.setResponsive(false, true);\n }\n options = diffObjects(options, chart.options);\n chart.userOptions = merge(chart.userOptions, options);\n // If the top-level chart option is present, some special updates are\n // required\n const optionsChart = options.chart;\n if (optionsChart) {\n merge(true, chart.options.chart, optionsChart);\n // Add support for deprecated zooming options like zoomType, #17861\n this.setZoomOptions();\n // Setter function\n if ('className' in optionsChart) {\n chart.setClassName(optionsChart.className);\n }\n if ('inverted' in optionsChart ||\n 'polar' in optionsChart ||\n 'type' in optionsChart) {\n // Parse options.chart.inverted and options.chart.polar together\n // with the available series.\n chart.propFromSeries();\n updateAllAxes = true;\n }\n if ('alignTicks' in optionsChart) { // #6452\n updateAllAxes = true;\n }\n if ('events' in optionsChart) {\n // Chart event handlers\n registerEventOptions(this, optionsChart);\n }\n objectEach(optionsChart, function (val, key) {\n if (chart.propsRequireUpdateSeries.indexOf('chart.' + key) !==\n -1) {\n updateAllSeries = true;\n }\n // Only dirty box\n if (chart.propsRequireDirtyBox.indexOf(key) !== -1) {\n chart.isDirtyBox = true;\n }\n // Chart setSize\n if (chart.propsRequireReflow.indexOf(key) !== -1) {\n chart.isDirtyBox = true;\n if (!isResponsiveOptions) {\n runSetSize = true;\n }\n }\n });\n if (!chart.styledMode && optionsChart.style) {\n chart.renderer.setStyle(chart.options.chart.style || {});\n }\n }\n // Moved up, because tooltip needs updated plotOptions (#6218)\n if (!chart.styledMode && options.colors) {\n this.options.colors = options.colors;\n }\n // Some option structures correspond one-to-one to chart objects that\n // have update methods, for example\n // options.credits => chart.credits\n // options.legend => chart.legend\n // options.title => chart.title\n // options.tooltip => chart.tooltip\n // options.subtitle => chart.subtitle\n // options.mapNavigation => chart.mapNavigation\n // options.navigator => chart.navigator\n // options.scrollbar => chart.scrollbar\n objectEach(options, function (val, key) {\n if (chart[key] &&\n typeof chart[key].update === 'function') {\n chart[key].update(val, false);\n // If a one-to-one object does not exist, look for an adder function\n }\n else if (typeof chart[adders[key]] === 'function') {\n chart[adders[key]](val);\n // Else, just merge the options. For nodes like loading, noData,\n // plotOptions\n }\n else if (key !== 'colors' &&\n chart.collectionsWithUpdate.indexOf(key) === -1) {\n merge(true, chart.options[key], options[key]);\n }\n if (key !== 'chart' &&\n chart.propsRequireUpdateSeries.indexOf(key) !== -1) {\n updateAllSeries = true;\n }\n });\n // Setters for collections. For axes and series, each item is referred\n // by an id. If the id is not found, it defaults to the corresponding\n // item in the collection, so setting one series without an id, will\n // update the first series in the chart. Setting two series without\n // an id will update the first and the second respectively (#6019)\n // chart.update and responsive.\n this.collectionsWithUpdate.forEach((coll) => {\n if (options[coll]) {\n splat(options[coll]).forEach((newOptions, i) => {\n if (!newOptions) {\n return;\n }\n const hasId = defined(newOptions.id);\n let item;\n // Match by id\n if (hasId) {\n item = chart.get(newOptions.id);\n }\n // No match by id found, match by index instead\n if (!item && chart[coll]) {\n item = chart[coll][pick(newOptions.index, i)];\n // Check if we grabbed an item with an existing but\n // different id (#13541). Check that the item in this\n // position is not internal (navigator).\n if (item && ((hasId && defined(item.options.id)) ||\n item.options.isInternal)) {\n item = void 0;\n }\n }\n if (item && item.coll === coll) {\n item.update(newOptions, false);\n if (oneToOne) {\n item.touched = true;\n }\n }\n // If oneToOne and no matching item is found, add one\n if (!item && oneToOne && chart.collectionsWithInit[coll]) {\n chart.collectionsWithInit[coll][0].apply(chart, \n // [newOptions, ...extraArguments, redraw=false]\n [\n newOptions\n ].concat(\n // Not all initializers require extra args\n chart.collectionsWithInit[coll][1] || []).concat([\n false\n ])).touched = true;\n }\n });\n // Add items for removal\n if (oneToOne) {\n chart[coll].forEach((item) => {\n if (!item.touched && !item.options.isInternal) {\n itemsForRemoval.push(item);\n }\n else {\n delete item.touched;\n }\n });\n }\n }\n });\n itemsForRemoval.forEach((item) => {\n if (item.chart && item.remove) { // #9097, avoid removing twice\n item.remove(false);\n }\n });\n if (updateAllAxes) {\n chart.axes.forEach(function (axis) {\n axis.update({}, false);\n });\n }\n // Certain options require the whole series structure to be thrown away\n // and rebuilt\n if (updateAllSeries) {\n chart.series.forEach((series) => {\n // Avoid removed navigator series\n if (series.chart) {\n series.update({}, false);\n }\n });\n }\n // Update size. Redraw is forced.\n const newWidth = optionsChart?.width;\n const newHeight = optionsChart && (isString(optionsChart.height) ?\n relativeLength(optionsChart.height, newWidth || chart.chartWidth) :\n optionsChart.height);\n if (\n // In this case, run chart.setSize with newWidth and newHeight which\n // are undefined, only for reflowing chart elements because margin\n // or spacing has been set (#8190)\n runSetSize ||\n // In this case, the size is actually set\n (isNumber(newWidth) && newWidth !== chart.chartWidth) ||\n (isNumber(newHeight) && newHeight !== chart.chartHeight)) {\n chart.setSize(newWidth, newHeight, animation);\n }\n else if (pick(redraw, true)) {\n chart.redraw(animation);\n }\n fireEvent(chart, 'afterUpdate', {\n options: options,\n redraw: redraw,\n animation: animation\n });\n }\n /**\n * Shortcut to set the subtitle options. This can also be done from {@link\n * Chart#update} or {@link Chart#setTitle}.\n *\n * @function Highcharts.Chart#setSubtitle\n *\n * @param {Highcharts.SubtitleOptions} options\n * New subtitle options. The subtitle text itself is set by the\n * `options.text` property.\n */\n setSubtitle(options, redraw) {\n this.applyDescription('subtitle', options);\n this.layOutTitles(redraw);\n }\n /**\n * Set the caption options. This can also be done from {@link\n * Chart#update}.\n *\n * @function Highcharts.Chart#setCaption\n *\n * @param {Highcharts.CaptionOptions} options\n * New caption options. The caption text itself is set by the\n * `options.text` property.\n */\n setCaption(options, redraw) {\n this.applyDescription('caption', options);\n this.layOutTitles(redraw);\n }\n /**\n * Display the zoom button, so users can reset zoom to the default view\n * settings.\n *\n * @function Highcharts.Chart#showResetZoom\n *\n * @emits Highcharts.Chart#event:afterShowResetZoom\n * @emits Highcharts.Chart#event:beforeShowResetZoom\n */\n showResetZoom() {\n const chart = this, lang = chart.options.lang, btnOptions = chart.zooming.resetButton, theme = btnOptions.theme, alignTo = (btnOptions.relativeTo === 'chart' ||\n btnOptions.relativeTo === 'spacingBox' ?\n null :\n 'plotBox');\n /** @internal */\n function zoomOut() {\n chart.zoomOut();\n }\n fireEvent(this, 'beforeShowResetZoom', null, function () {\n chart.resetZoomButton = chart.renderer\n .button(lang.resetZoom, null, null, zoomOut, theme)\n .attr({\n align: btnOptions.position.align,\n title: lang.resetZoomTitle\n })\n .addClass('highcharts-reset-zoom')\n .add()\n .align(btnOptions.position, false, alignTo);\n });\n fireEvent(this, 'afterShowResetZoom');\n }\n /**\n * Zoom the chart out after a user has zoomed in. See also\n * [Axis.setExtremes](/class-reference/Highcharts.Axis#setExtremes).\n *\n * @function Highcharts.Chart#zoomOut\n *\n * @emits Highcharts.Chart#event:selection\n */\n zoomOut() {\n fireEvent(this, 'selection', { resetSelection: true }, () => this.transform({ reset: true, trigger: 'zoom' }));\n }\n /**\n * Pan the chart by dragging the mouse across the pane. This function is\n * called on mouse move, and the distance to pan is computed from chartX\n * compared to the first chartX position in the dragging operation.\n *\n * @internal\n * @function Highcharts.Chart#pan\n * @param {Highcharts.PointerEventObject} event\n * @param {string} panning\n */\n pan(event, panning) {\n const chart = this, panningOptions = (typeof panning === 'object' ?\n panning :\n {\n enabled: panning,\n type: 'x'\n }), type = panningOptions.type, axes = type && chart[{\n x: 'xAxis',\n xy: 'axes',\n y: 'yAxis'\n }[type]]\n .filter((axis) => axis.options.panningEnabled && !axis.options.isInternal), chartOptions = chart.options.chart;\n if (chartOptions?.panning) {\n chartOptions.panning = panningOptions;\n }\n fireEvent(this, 'pan', { originalEvent: event }, () => {\n chart.transform({\n axes,\n event,\n to: {\n x: event.chartX - (chart.mouseDownX || 0),\n y: event.chartY - (chart.mouseDownY || 0)\n },\n trigger: 'pan'\n });\n css(chart.container, { cursor: 'move' });\n });\n }\n /**\n * Pan and scale the chart. Used internally by mouse-pan, touch-pan,\n * touch-zoom, and mousewheel zoom.\n *\n * The main positioning logic is created around two imaginary boxes. What is\n * currently within the `from` rectangle, should be transformed to fill up\n * the `to` rectangle.\n * - In a mouse zoom, the `from` rectangle is the selection, while the `to`\n * rectangle is the full plot area.\n * - In a touch zoom, the `from` rectangle is made up of the last two-finger\n * touch, while the `to`` rectangle is the current touch.\n * - In a mousewheel zoom, the `to` rectangle is a 10x10 px square,\n * while the `to` rectangle reflects the scale around that.\n *\n * @internal\n * @function Highcharts.Chart#transform\n */\n transform(params) {\n const { axes = this.axes, event, from = {}, reset, selection, to = {}, trigger, allowResetButton = true } = params, { inverted, time } = this;\n // Remove active points for shared tooltip\n this.hoverPoints?.forEach((point) => point.setState());\n fireEvent(this, 'transform', params);\n let hasZoomed = params.hasZoomed || false, displayButton, isAnyAxisPanning;\n for (const axis of axes) {\n const { horiz, len, minPointOffset = 0, options, reversed } = axis, wh = horiz ? 'width' : 'height', xy = horiz ? 'x' : 'y', toLength = pick(to[wh], axis.len), fromLength = pick(from[wh], axis.len), \n // If fingers pinched very close on this axis, treat as pan\n scale = Math.abs(toLength) < 10 ?\n 1 :\n toLength / fromLength, fromCenter = (from[xy] || 0) + fromLength / 2 - axis.pos, toCenter = (to[xy] ?? axis.pos) +\n toLength / 2 - axis.pos, move = fromCenter - toCenter / scale, pointRangeDirection = (reversed && !inverted) ||\n (!reversed && inverted) ?\n -1 :\n 1, minPx = move;\n // Zooming in multiple panes, zoom only in the pane that receives\n // the input\n if (!reset && (fromCenter < 0 || fromCenter > axis.len)) {\n continue;\n }\n // Adjust offset to ensure selection zoom triggers correctly\n // (#22945)\n // Set offset to 0 for ordinal axis only when zooming out, (#24545).\n const offset = (axis.chart.polar || (axis.isOrdinal && scale <= 1)) ?\n 0 :\n (minPointOffset * pointRangeDirection || 0), eventMin = axis.toValue(minPx, true), eventMax = axis.toValue(minPx + len / scale, true);\n let newMin = eventMin + offset, newMax = eventMax - offset, allExtremes = axis.allExtremes;\n if (selection) {\n selection[axis.coll].push({\n axis,\n min: Math.min(eventMin, eventMax),\n max: Math.max(eventMin, eventMax)\n });\n }\n if (newMin > newMax) {\n [newMin, newMax] = [newMax, newMin];\n }\n // General calculations of the full data extremes. It is calculated\n // on the first call to transform, then reused for subsequent\n // touch/pan calls. (#11315).\n if (scale === 1 &&\n !reset &&\n axis.coll === 'yAxis' &&\n !allExtremes) {\n for (const series of axis.series) {\n const seriesExtremes = series.getExtremes(series.getProcessedData(true).modified\n .getColumn(series.pointValKey || 'y') || [], true);\n allExtremes ?? (allExtremes = {\n dataMin: Number.MAX_VALUE,\n dataMax: -Number.MAX_VALUE\n });\n if (isNumber(seriesExtremes.dataMin) &&\n isNumber(seriesExtremes.dataMax)) {\n allExtremes.dataMin = Math.min(seriesExtremes.dataMin, allExtremes.dataMin);\n allExtremes.dataMax = Math.max(seriesExtremes.dataMax, allExtremes.dataMax);\n }\n }\n axis.allExtremes = allExtremes;\n }\n const { dataMin, dataMax, min, max } = extend(axis.getExtremes(), allExtremes || {}), optionsMin = time.parse(options.min), optionsMax = time.parse(options.max), \n // For boosted chart where data extremes are skipped\n safeDataMin = dataMin ?? optionsMin, safeDataMax = dataMax ?? optionsMax, range = newMax - newMin, padRange = axis.categories ? 0 : Math.min(range, safeDataMax - safeDataMin), paddedMin = safeDataMin - padRange * (defined(optionsMin) ? 0 : options.minPadding), paddedMax = safeDataMax + padRange * (defined(optionsMax) ? 0 : options.maxPadding), \n // We're allowed to zoom outside the data extremes if we're\n // dealing with a bubble chart, if we're panning, or if we're\n // pinching or mousewheeling in.\n allowZoomOutside = axis.allowZoomOutside ||\n scale === 1 ||\n (trigger !== 'zoom' && scale > 1), \n // Calculate the floor and the ceiling\n floor = Math.min(optionsMin ?? paddedMin, paddedMin, allowZoomOutside ? min : paddedMin), ceiling = Math.max(optionsMax ?? paddedMax, paddedMax, allowZoomOutside ? max : paddedMax);\n // It is not necessary to calculate extremes on ordinal axis,\n // because they are already calculated, so we don't want to override\n // them.\n if (!axis.isOrdinal || scale !== 1 || reset) {\n // If the new range spills over, either to the min or max,\n // adjust it.\n if (newMin < floor) {\n newMin = floor;\n if (scale >= 1) {\n newMax = newMin + range;\n }\n }\n if (newMax > ceiling) {\n newMax = ceiling;\n if (scale >= 1) {\n newMin = newMax - range;\n }\n }\n // Set new extremes if they are actually new\n if (reset || (axis.series.length &&\n (newMin !== min || newMax !== max) &&\n newMin >= floor &&\n newMax <= ceiling)) {\n if (selection) {\n selection[axis.coll].push({\n axis,\n min: newMin,\n max: newMax\n });\n }\n else {\n // Temporarily flag the axis as `isPanning` in order to\n // disallow certain axis padding options that would make\n // panning/zooming hard. Reset and redraw after the\n // operation has finished.\n axis.isPanning = trigger !== 'zoom';\n if (axis.isPanning && trigger !== 'mousewheel') {\n isAnyAxisPanning = true; // #21319\n }\n axis.setExtremes(reset ? void 0 : newMin, reset ? void 0 : newMax, false, false, { move, trigger, scale });\n if (!reset &&\n (newMin > floor || newMax < ceiling)) {\n displayButton = allowResetButton;\n }\n }\n hasZoomed = true;\n }\n // Show the resetZoom button for non-cartesian series.\n if (!this.hasCartesianSeries &&\n !reset) {\n displayButton = allowResetButton;\n }\n if (event) {\n this[horiz ? 'mouseDownX' : 'mouseDownY'] =\n event[horiz ? 'chartX' : 'chartY'];\n }\n }\n }\n if (hasZoomed) {\n if (selection) {\n fireEvent(this, 'selection', selection, \n // Run transform again, this time without the selection data\n // so that the transform is applied.\n () => {\n delete params.selection;\n params.trigger = 'zoom';\n this.transform(params);\n });\n }\n else {\n // Show or hide the Reset zoom button, but not while panning\n if (displayButton &&\n !isAnyAxisPanning &&\n !this.resetZoomButton) {\n this.showResetZoom();\n }\n else if (!displayButton && this.resetZoomButton) {\n this.resetZoomButton = this.resetZoomButton.destroy();\n }\n this.redraw(trigger === 'zoom' &&\n (this.options.chart.animation ?? this.pointCount < 100));\n }\n }\n return hasZoomed;\n }\n}\nextend(Chart.prototype, {\n // Hook for adding callbacks in modules\n callbacks: [],\n /**\n * These collections (arrays) implement `Chart.addSomething` method used in\n * chart.update() to create new object in the collection. Equivalent for\n * deleting is resolved by simple `Something.remove()`.\n *\n * Note: We need to define these references after initializers are bound to\n * chart's prototype.\n *\n * @internal\n */\n collectionsWithInit: {\n // CollectionName: [ initializingMethod, [extraArguments] ]\n xAxis: [Chart.prototype.addAxis, [true]],\n yAxis: [Chart.prototype.addAxis, [false]],\n series: [Chart.prototype.addSeries]\n },\n /**\n * These collections (arrays) implement update() methods with support for\n * one-to-one option.\n * @internal\n */\n collectionsWithUpdate: [\n 'xAxis',\n 'yAxis',\n 'series'\n ],\n /**\n * These properties cause isDirtyBox to be set to true when updating. Can be\n * extended from plugins.\n * @internal\n */\n propsRequireDirtyBox: [\n 'backgroundColor',\n 'borderColor',\n 'borderWidth',\n 'borderRadius',\n 'plotBackgroundColor',\n 'plotBackgroundImage',\n 'plotBorderColor',\n 'plotBorderRadius',\n 'plotBorderWidth',\n 'plotShadow',\n 'shadow'\n ],\n /**\n * These properties require a full reflow of chart elements, best\n * implemented through running `Chart.setSize` internally (#8190).\n * @internal\n */\n propsRequireReflow: [\n 'margin',\n 'marginTop',\n 'marginRight',\n 'marginBottom',\n 'marginLeft',\n 'spacing',\n 'spacingTop',\n 'spacingRight',\n 'spacingBottom',\n 'spacingLeft'\n ],\n /**\n * These properties cause all series to be updated when updating. Can be\n * extended from plugins.\n * @internal\n */\n propsRequireUpdateSeries: [\n 'chart.inverted',\n 'chart.polar',\n 'chart.ignoreHiddenSeries',\n 'chart.type',\n 'colors',\n 'plotOptions',\n 'time',\n 'tooltip'\n ]\n});\n/* *\n *\n * Default Export\n *\n * */\nexport default Chart;\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * Callback for chart constructors.\n *\n * @callback Highcharts.ChartCallbackFunction\n *\n * @param {Highcharts.Chart} chart\n * Created chart.\n */\n/**\n * Format a number and return a string based on input settings.\n *\n * @callback Highcharts.NumberFormatterCallbackFunction\n *\n * @param {number} number\n * The input number to format.\n *\n * @param {number} decimals\n * The amount of decimals. A value of -1 preserves the amount in the\n * input number.\n *\n * @param {string} [decimalPoint]\n * The decimal point, defaults to the one given in the lang options, or\n * a dot.\n *\n * @param {string} [thousandsSep]\n * The thousands separator, defaults to the one given in the lang\n * options, or a space character.\n *\n * @param {Highcharts.Chart} [ctx]\n * Since v12.6.0, the chart context passed as an extra argument for\n * arrow functions.\n *\n * @return {string} The formatted number.\n */\n/**\n * The chart title. The title has an `update` method that allows modifying the\n * options directly or indirectly via `chart.update`.\n *\n * @interface Highcharts.TitleObject\n * @extends Highcharts.SVGElement\n */ /**\n* Modify options for the title.\n*\n* @function Highcharts.TitleObject#update\n*\n* @param {Highcharts.TitleOptions} titleOptions\n* Options to modify.\n*\n* @param {boolean} [redraw=true]\n* Whether to redraw the chart after the title is altered. If doing more\n* operations on the chart, it is a good idea to set redraw to false and\n* call {@link Chart#redraw} after.\n*/\n/**\n * The chart subtitle. The subtitle has an `update` method that\n * allows modifying the options directly or indirectly via\n * `chart.update`.\n *\n * @interface Highcharts.SubtitleObject\n * @extends Highcharts.SVGElement\n */ /**\n* Modify options for the subtitle.\n*\n* @function Highcharts.SubtitleObject#update\n*\n* @param {Highcharts.SubtitleOptions} subtitleOptions\n* Options to modify.\n*\n* @param {boolean} [redraw=true]\n* Whether to redraw the chart after the subtitle is altered. If doing\n* more operations on the chart, it is a good idea to set redraw to false\n* and call {@link Chart#redraw} after.\n*/\n/**\n * The chart caption. The caption has an `update` method that\n * allows modifying the options directly or indirectly via\n * `chart.update`.\n *\n * @interface Highcharts.CaptionObject\n * @extends Highcharts.SVGElement\n */ /**\n* Modify options for the caption.\n*\n* @function Highcharts.CaptionObject#update\n*\n* @param {Highcharts.CaptionOptions} captionOptions\n* Options to modify.\n*\n* @param {boolean} [redraw=true]\n* Whether to redraw the chart after the caption is altered. If doing\n* more operations on the chart, it is a good idea to set redraw to false\n* and call {@link Chart#redraw} after.\n*/\n/**\n * @interface Highcharts.ChartIsInsideOptionsObject\n */ /**\n* @name Highcharts.ChartIsInsideOptionsObject#axis\n* @type {Highcharts.Axis|undefined}\n*/ /**\n* @name Highcharts.ChartIsInsideOptionsObject#ignoreX\n* @type {boolean|undefined}\n*/ /**\n* @name Highcharts.ChartIsInsideOptionsObject#ignoreY\n* @type {boolean|undefined}\n*/ /**\n* @name Highcharts.ChartIsInsideOptionsObject#inverted\n* @type {boolean|undefined}\n*/ /**\n* @name Highcharts.ChartIsInsideOptionsObject#paneCoordinates\n* @type {boolean|undefined}\n*/ /**\n* @name Highcharts.ChartIsInsideOptionsObject#series\n* @type {Highcharts.Series|undefined}\n*/ /**\n* @name Highcharts.ChartIsInsideOptionsObject#visiblePlotOnly\n* @type {boolean|undefined}\n*/\n''; // Keeps doclets above in JS file\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * Highcharts feature to make the Y axis stay fixed when scrolling the chart\n * horizontally on mobile devices. Supports left and right side axes.\n */\n'use strict';\nimport A from '../Core/Animation/AnimationUtilities.js';\nconst { stop } = A;\nimport H from '../Core/Globals.js';\nconst { composed } = H;\nimport SVGRenderer from '../Core/Renderer/SVG/SVGRenderer.js';\nimport { addEvent, createElement, css, defined, erase, merge, pushUnique } from '../Shared/Utilities.js';\n/* *\n *\n * Functions\n *\n * */\n/** @internal */\nfunction onChartRender() {\n if ((this.scrollablePixelsX || this.scrollablePixelsY) &&\n !this.scrollablePlotArea) {\n this.scrollablePlotArea = new ScrollablePlotArea(this);\n }\n this.scrollablePlotArea?.applyFixed();\n}\n/** @internal */\nfunction markDirty() {\n if (this.chart.scrollablePlotArea) {\n this.chart.scrollablePlotArea.isDirty = true;\n }\n}\n/** @internal */\nexport class ScrollablePlotArea {\n static compose(AxisClass, ChartClass, SeriesClass) {\n if (pushUnique(composed, 'ScrollablePlotArea')) {\n addEvent(AxisClass, 'afterInit', markDirty);\n addEvent(ChartClass, 'afterSetChartSize', (e) => this.afterSetSize(e.target, e));\n addEvent(ChartClass, 'render', onChartRender);\n addEvent(SeriesClass, 'show', markDirty);\n }\n }\n /** @internal */\n static afterSetSize(chart, e) {\n const { minWidth, minHeight } = chart.options.chart.scrollablePlotArea || {}, { clipBox, plotBox, inverted, renderer } = chart;\n let scrollablePixelsX, scrollablePixelsY, recalculateHoriz;\n // Skip for exporting\n if (renderer.forExport) {\n return;\n }\n // The amount of pixels to scroll, the difference between chart width\n // and scrollable width\n if (minWidth) {\n chart.scrollablePixelsX = scrollablePixelsX = Math.max(0, minWidth - chart.chartWidth);\n if (scrollablePixelsX) {\n chart.scrollablePlotBox = merge(chart.plotBox);\n plotBox.width = chart.plotWidth += scrollablePixelsX;\n clipBox[inverted ? 'height' : 'width'] += scrollablePixelsX;\n recalculateHoriz = true;\n }\n // Currently we can only do either X or Y\n }\n else if (minHeight) {\n chart.scrollablePixelsY = scrollablePixelsY = Math.max(0, minHeight - chart.chartHeight);\n if (defined(scrollablePixelsY)) {\n chart.scrollablePlotBox = merge(chart.plotBox);\n plotBox.height = chart.plotHeight += scrollablePixelsY;\n clipBox[inverted ? 'width' : 'height'] += scrollablePixelsY;\n recalculateHoriz = false;\n }\n }\n if (defined(recalculateHoriz)) {\n if (!e.skipAxes) {\n for (const axis of chart.axes) {\n // Apply the corrected plot size to the axes of the other\n // orientation than the scrolling direction\n if (axis.horiz === recalculateHoriz ||\n // Or parallel axes\n (chart.hasParallelCoordinates && axis.coll === 'yAxis')) {\n axis.setAxisSize();\n axis.setAxisTranslation();\n }\n }\n }\n }\n else {\n // Clear (potential) old box when a new one was not set\n delete chart.scrollablePlotBox;\n }\n }\n /* *\n *\n * Constructors\n *\n * */\n constructor(chart) {\n const chartOptions = chart.options.chart, scrollableOptions = chartOptions.scrollablePlotArea || {}, moveFixedElements = this.moveFixedElements.bind(this), styles = {\n WebkitOverflowScrolling: 'touch',\n overflowX: 'hidden',\n overflowY: 'hidden'\n };\n if (chart.scrollablePixelsX) {\n styles.overflowX = 'auto';\n }\n if (chart.scrollablePixelsY) {\n styles.overflowY = 'auto';\n }\n this.chart = chart;\n // Insert a container with relative position that scrolling and fixed\n // container renders to (#10555)\n const parentDiv = this.parentDiv = createElement('div', {\n className: 'highcharts-scrolling-parent'\n }, {\n position: 'relative'\n }, chart.renderTo), \n // Add the necessary divs to provide scrolling\n scrollingContainer = this.scrollingContainer = createElement('div', {\n 'className': 'highcharts-scrolling'\n }, styles, parentDiv), innerContainer = this.innerContainer = createElement('div', {\n 'className': 'highcharts-inner-container'\n }, void 0, scrollingContainer), fixedDiv = this.fixedDiv = createElement('div', {\n className: 'highcharts-fixed'\n }, {\n position: 'absolute',\n overflow: 'hidden',\n pointerEvents: 'none',\n zIndex: (chartOptions.style?.zIndex || 0) + 2,\n top: 0\n }, void 0, true), fixedRenderer = this.fixedRenderer = new SVGRenderer(fixedDiv, chart.chartWidth, chart.chartHeight, chartOptions.style);\n // Mask\n this.mask = fixedRenderer\n .path()\n .attr({\n fill: chartOptions.backgroundColor || '#fff',\n 'fill-opacity': scrollableOptions.opacity ?? 0.85,\n zIndex: -1\n })\n .addClass('highcharts-scrollable-mask')\n .add();\n scrollingContainer.parentNode.insertBefore(fixedDiv, scrollingContainer);\n css(chart.renderTo, { overflow: 'visible' });\n addEvent(chart, 'afterShowResetZoom', moveFixedElements);\n addEvent(chart, 'afterApplyDrilldown', moveFixedElements);\n addEvent(chart, 'afterLayOutTitles', moveFixedElements);\n // On scroll, reset the chart position because it applies to the\n // scrolled container\n let lastHoverPoint;\n addEvent(scrollingContainer, 'scroll', () => {\n const { pointer, hoverPoint } = chart;\n if (pointer) {\n delete pointer.chartPosition;\n if (hoverPoint) {\n lastHoverPoint = hoverPoint;\n }\n pointer.runPointActions(void 0, lastHoverPoint, true);\n }\n });\n // Now move the container inside\n innerContainer.appendChild(chart.container);\n }\n /* *\n *\n * Functions\n *\n * */\n applyFixed() {\n const { chart, fixedRenderer, isDirty, scrollingContainer } = this, { axisOffset, chartWidth, chartHeight, container, plotHeight, plotLeft, plotTop, plotWidth, scrollablePixelsX = 0, scrollablePixelsY = 0 } = chart, chartOptions = chart.options.chart, scrollableOptions = chartOptions.scrollablePlotArea || {}, { scrollPositionX = 0, scrollPositionY = 0 } = scrollableOptions, scrollableWidth = chartWidth + scrollablePixelsX, scrollableHeight = chartHeight + scrollablePixelsY;\n // Set the size of the fixed renderer to the visible width\n fixedRenderer.setSize(chartWidth, chartHeight);\n if (isDirty ?? true) {\n this.isDirty = false;\n this.moveFixedElements();\n }\n // Increase the size of the scrollable renderer and background\n stop(chart.container);\n css(container, {\n width: `${scrollableWidth}px`,\n height: `${scrollableHeight}px`\n });\n chart.renderer.boxWrapper.attr({\n width: scrollableWidth,\n height: scrollableHeight,\n viewBox: [0, 0, scrollableWidth, scrollableHeight].join(' ')\n });\n chart.chartBackground?.attr({\n width: scrollableWidth,\n height: scrollableHeight\n });\n css(scrollingContainer, {\n width: `${chartWidth}px`,\n height: `${chartHeight}px`\n });\n // Set scroll position the first time (this.isDirty was undefined at\n // the top of this function)\n if (!defined(isDirty)) {\n scrollingContainer.scrollLeft = scrollablePixelsX * scrollPositionX;\n scrollingContainer.scrollTop = scrollablePixelsY * scrollPositionY;\n }\n // Mask behind the left and right side\n const maskTop = plotTop - axisOffset[0] - 1, maskLeft = plotLeft - axisOffset[3] - 1, maskBottom = plotTop + plotHeight + axisOffset[2] + 1, maskRight = plotLeft + plotWidth + axisOffset[1] + 1, maskPlotRight = plotLeft + plotWidth - scrollablePixelsX, maskPlotBottom = plotTop + plotHeight - scrollablePixelsY;\n let d = [['M', 0, 0]];\n if (scrollablePixelsX) {\n d = [\n // Left side\n ['M', 0, maskTop],\n ['L', plotLeft - 1, maskTop],\n ['L', plotLeft - 1, maskBottom],\n ['L', 0, maskBottom],\n ['Z'],\n // Right side\n ['M', maskPlotRight, maskTop],\n ['L', chartWidth, maskTop],\n ['L', chartWidth, maskBottom],\n ['L', maskPlotRight, maskBottom],\n ['Z']\n ];\n }\n else if (scrollablePixelsY) {\n d = [\n // Top side\n ['M', maskLeft, 0],\n ['L', maskLeft, plotTop - 1],\n ['L', maskRight, plotTop - 1],\n ['L', maskRight, 0],\n ['Z'],\n // Bottom side\n ['M', maskLeft, maskPlotBottom],\n ['L', maskLeft, chartHeight],\n ['L', maskRight, chartHeight],\n ['L', maskRight, maskPlotBottom],\n ['Z']\n ];\n }\n if (chart.redrawTrigger !== 'adjustHeight') {\n this.mask.attr({ d });\n }\n }\n /**\n * These elements are moved over to the fixed renderer and stay fixed when\n * the user scrolls the chart.\n *\n * @internal\n */\n moveFixedElements() {\n const { container, inverted, scrollablePixelsX, scrollablePixelsY } = this.chart, fixedRenderer = this.fixedRenderer, fixedSelectors = ScrollablePlotArea.fixedSelectors.slice();\n let axisClass;\n if (scrollablePixelsX && !inverted) {\n axisClass = '.highcharts-yaxis';\n }\n else if (scrollablePixelsX && inverted) {\n axisClass = '.highcharts-xaxis';\n }\n else if (scrollablePixelsY && !inverted) {\n axisClass = '.highcharts-xaxis';\n }\n else if (scrollablePixelsY && inverted) {\n axisClass = '.highcharts-yaxis';\n }\n if (axisClass && !(this.chart.hasParallelCoordinates &&\n axisClass === '.highcharts-yaxis')) {\n // Add if not added yet\n for (const className of [\n `${axisClass}:not(.highcharts-radial-axis)`,\n `${axisClass}-labels:not(.highcharts-radial-axis-labels)`\n ]) {\n pushUnique(fixedSelectors, className);\n }\n }\n else {\n // Clear all axis related selectors\n for (const classBase of [\n '.highcharts-xaxis',\n '.highcharts-yaxis'\n ]) {\n for (const className of [\n `${classBase}:not(.highcharts-radial-axis)`,\n `${classBase}-labels:not(.highcharts-radial-axis-labels)`\n ]) {\n erase(fixedSelectors, className);\n }\n }\n }\n for (const className of fixedSelectors) {\n [].forEach.call(container.querySelectorAll(className), (elem) => {\n (elem.namespaceURI === fixedRenderer.SVG_NS ?\n fixedRenderer.box :\n fixedRenderer.box.parentNode).appendChild(elem);\n elem.style.pointerEvents = 'auto';\n });\n }\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\nScrollablePlotArea.fixedSelectors = [\n '.highcharts-breadcrumbs-group',\n '.highcharts-contextbutton',\n '.highcharts-caption',\n '.highcharts-credits',\n '.highcharts-drillup-button',\n '.highcharts-legend',\n '.highcharts-legend-checkbox',\n '.highcharts-navigator-series',\n '.highcharts-navigator-xaxis',\n '.highcharts-navigator-yaxis',\n '.highcharts-navigator',\n '.highcharts-range-selector-group',\n '.highcharts-reset-zoom',\n '.highcharts-scrollbar',\n '.highcharts-subtitle',\n '.highcharts-title'\n];\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * Options for a scrollable plot area. This feature provides a minimum size for\n * the plot area of the chart. If the size gets smaller than this, typically\n * on mobile devices, a native browser scrollbar is presented. This scrollbar\n * provides smooth scrolling for the contents of the plot area, whereas the\n * title, legend and unaffected axes are fixed.\n *\n * Since v7.1.2, a scrollable plot area can be defined for either horizontal or\n * vertical scrolling, depending on whether the `minWidth` or `minHeight`\n * option is set.\n *\n * @sample highcharts/chart/scrollable-plotarea\n * Scrollable plot area\n * @sample highcharts/chart/scrollable-plotarea-vertical\n * Vertically scrollable plot area\n * @sample {gantt} gantt/chart/scrollable-plotarea-vertical\n * Gantt chart with vertically scrollable plot area\n *\n * @since 6.1.0\n * @product highcharts gantt\n * @apioption chart.scrollablePlotArea\n */\n/**\n * The minimum height for the plot area. If it gets smaller than this, the plot\n * area will become scrollable.\n *\n * @type {number}\n * @since 7.1.2\n * @apioption chart.scrollablePlotArea.minHeight\n */\n/**\n * The minimum width for the plot area. If it gets smaller than this, the plot\n * area will become scrollable.\n *\n * @type {number}\n * @since 6.1.0\n * @apioption chart.scrollablePlotArea.minWidth\n */\n/**\n * The opacity of mask applied on one of the sides of the plot\n * area.\n *\n * @sample {highcharts} highcharts/chart/scrollable-plotarea-opacity\n * Disabled opacity for the mask\n *\n * @type {number}\n * @default 0.85\n * @since 7.1.1\n * @apioption chart.scrollablePlotArea.opacity\n */\n/**\n * The initial scrolling position of the scrollable plot area. Ranges from 0 to\n * 1, where 0 aligns the plot area to the left and 1 aligns it to the right.\n * Typically we would use 1 if the chart has right aligned Y axes.\n *\n * @type {number}\n * @since 6.1.0\n * @apioption chart.scrollablePlotArea.scrollPositionX\n */\n/**\n * The initial scrolling position of the scrollable plot area. Ranges from 0 to\n * 1, where 0 aligns the plot area to the top and 1 aligns it to the bottom.\n *\n * @type {number}\n * @since 7.1.2\n * @apioption chart.scrollablePlotArea.scrollPositionY\n */\n(''); // Keep doclets above in transpiled file\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport A from '../../Animation/AnimationUtilities.js';\nconst { getDeferredAnimation } = A;\nimport SeriesRegistry from '../../Series/SeriesRegistry.js';\nconst { series: { prototype: seriesProto } } = SeriesRegistry;\nimport StackItem from './StackItem.js';\nimport { addEvent, correctFloat, defined, destroyObjectProperties, fireEvent, isNumber, objectEach, pick } from '../../../Shared/Utilities.js';\n/* *\n *\n * Functions\n *\n * */\n/**\n * Generate stacks for each series and calculate stacks total values\n *\n * @internal\n * @function Highcharts.Chart#getStacks\n */\nfunction chartGetStacks() {\n const chart = this, inverted = chart.inverted;\n // Reset stacks for each axis\n chart.axes.forEach((axis) => {\n if (axis.stacking?.stacks && axis.hasVisibleSeries) {\n axis.stacking.oldStacks = axis.stacking.stacks;\n }\n });\n chart.series.forEach((series) => {\n const xAxisOptions = series.xAxis?.options || {};\n if (series.options.stacking && series.reserveSpace()) {\n series.stackKey = [\n series.type,\n pick(series.options.stack, ''),\n inverted ? xAxisOptions.top : xAxisOptions.left,\n inverted ? xAxisOptions.height : xAxisOptions.width\n ].join(',');\n }\n });\n}\n/** @internal */\nfunction onAxisDestroy() {\n const stacking = this.stacking;\n if (stacking) {\n const stacks = stacking.stacks;\n // Destroy each stack total\n objectEach(stacks, (stack, stackKey) => {\n destroyObjectProperties(stack);\n delete stacks[stackKey];\n });\n stacking.stackTotalGroup?.destroy();\n }\n}\n/** @internal */\nfunction onAxisInit() {\n if (!this.stacking) {\n this.stacking = new AxisAdditions(this);\n }\n}\n/**\n * Get stack indicator, according to it's x-value, to determine points with the\n * same x-value\n *\n * @internal\n * @function Highcharts.Series#getStackIndicator\n */\nfunction seriesGetStackIndicator(stackIndicator, x, index, key) {\n // Update stack indicator, when:\n // first point in a stack || x changed || stack type (negative vs positive)\n // changed:\n if (!defined(stackIndicator) ||\n stackIndicator.x !== x ||\n (key && stackIndicator.stackKey !== key)) {\n stackIndicator = {\n x: x,\n index: 0,\n key,\n stackKey: key\n };\n }\n else {\n stackIndicator.index++;\n }\n stackIndicator.key = [index, x, stackIndicator.index].join(',');\n return stackIndicator;\n}\n/**\n * Iterate over all stacks and compute the absolute values to percent\n *\n * @internal\n * @function Highcharts.Series#modifyStacks\n */\nfunction seriesModifyStacks() {\n const series = this, yAxis = series.yAxis, stackKey = series.stackKey || '', stacks = yAxis.stacking.stacks, processedXData = series.getColumn('x', true), stacking = series.options.stacking, stacker = series[stacking + 'Stacker'];\n let stackIndicator;\n if (stacker) { // Modifier function exists (Series.percentStacker etc.)\n [stackKey, '-' + stackKey].forEach((key) => {\n let i = processedXData.length, x, stackItem, pointExtremes;\n while (i--) {\n x = processedXData[i];\n stackIndicator = series.getStackIndicator(stackIndicator, x, series.index, key);\n stackItem = stacks[key]?.[x];\n pointExtremes = stackItem?.points[stackIndicator.key || ''];\n if (pointExtremes) {\n stacker.call(series, pointExtremes, stackItem, i);\n }\n }\n });\n }\n}\n/**\n * Modifier function for percent stacks. Blows up the stack to 100%.\n *\n * @internal\n * @function Highcharts.Series#percentStacker\n */\nfunction seriesPercentStacker(pointExtremes, stack, i) {\n const totalFactor = stack.total ? 100 / stack.total : 0;\n // Y bottom value\n pointExtremes[0] = correctFloat(pointExtremes[0] * totalFactor);\n // Y value\n pointExtremes[1] = correctFloat(pointExtremes[1] * totalFactor);\n this.stackedYData[i] = pointExtremes[1];\n}\n/**\n * Set grouped points in a stack-like object. When `centerInCategory` is true,\n * and `stacking` is not enabled, we need a pseudo (horizontal) stack in order\n * to handle grouping of points within the same category.\n *\n * @internal\n * @function Highcharts.Series#setGroupedPoints\n * @return {void}\n */\nfunction seriesSetGroupedPoints(axis) {\n // Only series types supporting centerInCategory need to do this. That also\n // applies to resetting (#20221).\n if (this.is('column') || this.is('columnrange')) {\n if (this.options.centerInCategory &&\n // With only one series, we don't need to consider centerInCategory\n this.chart.series.length > 1) {\n seriesProto.setStackedPoints.call(this, axis, 'group');\n // After updating, if we now have proper stacks, we must delete the\n // group pseudo stacks (#14980)\n }\n else {\n axis.stacking.resetStacks();\n }\n }\n}\n/**\n * Adds series' points value to corresponding stack\n *\n * @internal\n * @function Highcharts.Series#setStackedPoints\n */\nfunction seriesSetStackedPoints(axis, stackingParam) {\n const type = stackingParam || this.options.stacking;\n if (!type ||\n !this.reserveSpace() ||\n // Group stacks (centerInCategory) belong on the x-axis, other stacks on\n // the y-axis.\n ({ group: 'xAxis' }[type] || 'yAxis') !== axis.coll) {\n return;\n }\n const series = this, xData = series.getColumn('x', true), yData = series.getColumn(series.pointValKey || 'y', true), stackedYData = [], yDataLength = yData.length, seriesOptions = series.options, threshold = seriesOptions.threshold || 0, stackThreshold = seriesOptions.startFromThreshold ? threshold : 0, stackOption = seriesOptions.stack, stackKey = stackingParam ?\n `${series.type},${type}` : (series.stackKey || ''), negKey = '-' + stackKey, negStacks = series.negStacks, stacking = axis.stacking, stacks = stacking.stacks, oldStacks = stacking.oldStacks;\n let stackIndicator, isNegative, stack, other, key, pointKey, i;\n stacking.stacksTouched += 1;\n // Loop over the non-null y values and read them into a local array\n for (i = 0; i < yDataLength; i++) {\n const x = xData[i] || 0, y = yData[i], yNumber = isNumber(y) && y || 0;\n stackIndicator = series.getStackIndicator(stackIndicator, x, series.index);\n pointKey = stackIndicator.key || '';\n // Read stacked values into a stack based on the x value,\n // the sign of y and the stack key. Stacking is also handled for null\n // values (#739)\n isNegative = negStacks && yNumber < (stackThreshold ? 0 : threshold);\n key = isNegative ? negKey : stackKey;\n // Create empty object for this stack if it doesn't exist yet\n if (!stacks[key]) {\n stacks[key] = {};\n }\n // Initialize StackItem for this x\n if (!stacks[key][x]) {\n if (oldStacks[key]?.[x]) {\n stacks[key][x] = oldStacks[key][x];\n stacks[key][x].total = null;\n }\n else {\n stacks[key][x] = new StackItem(axis, axis.options.stackLabels, !!isNegative, x, stackOption);\n }\n }\n // If the StackItem doesn't exist, create it first\n stack = stacks[key][x];\n if (y !== null) {\n stack.points[pointKey] = stack.points[series.index] = [\n pick(stack.cumulative, stackThreshold)\n ];\n // Record the base of the stack\n if (!defined(stack.cumulative)) {\n stack.base = pointKey;\n }\n stack.touched = stacking.stacksTouched;\n // In area charts, if there are multiple points on the same X value,\n // let the area fill the full span of those points\n if (stackIndicator.index > 0 && series.singleStacks === false) {\n stack.points[pointKey][0] = stack.points[series.index + ',' + x + ',0'][0];\n }\n // When updating to null, reset the point stack (#7493)\n }\n else {\n delete stack.points[pointKey];\n delete stack.points[series.index];\n }\n // Add value to the stack total\n let total = stack.total || 0;\n if (type === 'percent') {\n // Percent stacked column, totals are the same for the positive and\n // negative stacks\n other = isNegative ? stackKey : negKey;\n if (negStacks && stacks[other]?.[x]) {\n other = stacks[other][x];\n total = other.total = Math.max(other.total || 0, total) +\n Math.abs(yNumber);\n // Percent stacked areas\n }\n else {\n total = correctFloat(total + Math.abs(yNumber));\n }\n }\n else if (type === 'group') {\n // In this stack, the total is the number of valid points\n if (isNumber(y)) {\n total++;\n }\n }\n else {\n total = correctFloat(total + yNumber);\n }\n if (type === 'group') {\n // This point's index within the stack, pushed to stack.points[1]\n stack.cumulative = (total || 1) - 1;\n }\n else {\n stack.cumulative = correctFloat(pick(stack.cumulative, stackThreshold) + yNumber);\n }\n stack.total = total;\n if (y !== null) {\n stack.points[pointKey].push(stack.cumulative);\n stackedYData[i] = stack.cumulative;\n stack.hasValidPoints = true;\n }\n }\n if (type === 'percent') {\n stacking.usePercentage = true;\n }\n if (type !== 'group') {\n this.stackedYData = stackedYData; // To be used in getExtremes\n }\n // Reset old stacks\n stacking.oldStacks = {};\n}\n/**\n * Adds stacking support to axes.\n * @internal\n * @class\n */\nclass AxisAdditions {\n /* *\n *\n * Constructors\n *\n * */\n /** @internal */\n constructor(axis) {\n /** @internal */\n this.oldStacks = {};\n /** @internal */\n this.stacks = {};\n /** @internal */\n this.stacksTouched = 0;\n this.axis = axis;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Build the stacks from top down\n * @internal\n */\n buildStacks() {\n const stacking = this, axis = stacking.axis, axisSeries = axis.series, isXAxis = axis.coll === 'xAxis', reversedStacks = axis.options.reversedStacks, len = axisSeries.length;\n let actualSeries, i;\n this.resetStacks();\n stacking.usePercentage = false;\n i = len;\n while (i--) {\n actualSeries = axisSeries[reversedStacks ? i : len - i - 1];\n if (isXAxis) {\n actualSeries.setGroupedPoints(axis);\n }\n actualSeries.setStackedPoints(axis);\n }\n // Loop up again to compute percent and stream stack\n if (!isXAxis) {\n for (i = 0; i < len; i++) {\n axisSeries[i].modifyStacks();\n }\n }\n fireEvent(axis, 'afterBuildStacks');\n }\n /** @internal */\n cleanStacks() {\n if (this.oldStacks) {\n this.stacks = this.oldStacks;\n // Reset stacks\n objectEach(this.stacks, (type) => {\n objectEach(type, (stack) => {\n stack.cumulative = stack.total;\n });\n });\n }\n }\n /**\n * Set all the stacks to initial states and destroy unused ones.\n * @internal\n */\n resetStacks() {\n objectEach(this.stacks, (type) => {\n objectEach(type, (stack, x) => {\n // Clean up memory after point deletion (#1044, #4320)\n if (isNumber(stack.touched) &&\n stack.touched < this.stacksTouched) {\n stack.destroy();\n delete type[x];\n // Reset stacks\n }\n else {\n stack.total = null;\n stack.cumulative = null;\n }\n });\n });\n }\n /** @internal */\n renderStackTotals() {\n const stacking = this, axis = stacking.axis, chart = axis.chart, renderer = chart.renderer, stacks = stacking.stacks, stackLabelsAnim = axis.options.stackLabels?.animation, animationConfig = getDeferredAnimation(chart, stackLabelsAnim || false), stackTotalGroup = stacking.stackTotalGroup = (stacking.stackTotalGroup ||\n renderer\n .g('stack-labels')\n .attr({\n zIndex: 6,\n opacity: 0\n })\n .add());\n // The plotLeft/Top will change when y axis gets wider so we need to\n // translate the stackTotalGroup at every render call. See bug #506\n // and #516\n stackTotalGroup.translate(chart.plotLeft, chart.plotTop);\n // Render each stack total\n objectEach(stacks, (type) => {\n objectEach(type, (stack) => {\n stack.render(stackTotalGroup);\n });\n });\n stackTotalGroup.animate({\n opacity: 1\n }, animationConfig);\n }\n}\n/* *\n *\n * Composition\n *\n * */\n/** @internal */\nvar StackingAxis;\n(function (StackingAxis) {\n /* *\n *\n * Functions\n *\n * */\n /**\n * Extends axis with stacking support.\n * @internal\n */\n function compose(AxisClass, ChartClass, SeriesClass) {\n const chartProto = ChartClass.prototype, seriesProto = SeriesClass.prototype;\n if (!chartProto.getStacks) {\n addEvent(AxisClass, 'init', onAxisInit);\n addEvent(AxisClass, 'destroy', onAxisDestroy);\n chartProto.getStacks = chartGetStacks;\n seriesProto.getStackIndicator = seriesGetStackIndicator;\n seriesProto.modifyStacks = seriesModifyStacks;\n seriesProto.percentStacker = seriesPercentStacker;\n seriesProto.setGroupedPoints = seriesSetGroupedPoints;\n seriesProto.setStackedPoints = seriesSetStackedPoints;\n }\n }\n StackingAxis.compose = compose;\n})(StackingAxis || (StackingAxis = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default StackingAxis;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport Series from '../../Core/Series/Series.js';\nimport SeriesRegistry from '../../Core/Series/SeriesRegistry.js';\nimport { defined, isObject, merge } from '../../Shared/Utilities.js';\n/* *\n *\n * Class\n *\n * */\n/**\n * The line series is the base type and is therefor the series base prototype.\n *\n * @internal\n */\nclass LineSeries extends Series {\n /* *\n *\n * Functions\n *\n * */\n /**\n * Draw the graph. Called internally when rendering line-like series\n * types. The first time it generates the `series.graph` item and\n * optionally other series-wide items like `series.area` for area\n * charts. On subsequent calls these items are updated with new\n * positions and attributes.\n *\n * @function Highcharts.Series#drawGraph\n * @internal\n */\n drawGraph() {\n const options = this.options, graphPath = (this.gappedPath || this.getGraphPath).call(this), styledMode = this.chart.styledMode;\n // Draw the graph\n [this, ...this.zones].forEach((owner, i) => {\n let attribs, graph = owner.graph;\n const verb = graph ? 'animate' : 'attr', dashStyle = owner.dashStyle ||\n options.dashStyle;\n if (graph) {\n graph.endX = this.preventGraphAnimation ?\n null :\n graphPath.xMap;\n graph.animate({ d: graphPath });\n }\n else if (graphPath.length) { // #1487\n /**\n * SVG element of line-based charts. Can be used for styling\n * purposes. If zones are configured, this element will be\n * hidden and replaced by multiple zone lines, accessible\n * via `series.zones[i].graph`.\n *\n * @name Highcharts.Series#graph\n * @type {Highcharts.SVGElement|undefined}\n * @internal\n */\n owner.graph = graph = this.chart.renderer\n .path(graphPath)\n .addClass('highcharts-graph' +\n (i ? ` highcharts-zone-graph-${i - 1} ` : ' ') +\n ((i && owner.className) || ''))\n .attr({ zIndex: 1 }) // #1069\n .add(this.group);\n }\n if (graph && !styledMode) {\n attribs = {\n 'stroke': ((!i && options.lineColor) || // Series only\n owner.color ||\n this.color ||\n // When colorByPoint = true\n 'var(--highcharts-neutral-color-20)'),\n 'stroke-width': options.lineWidth || 0,\n // Polygon series use filled graph\n 'fill': (this.fillGraph && this.color) || 'none'\n };\n // Apply dash style\n if (dashStyle) {\n attribs.dashstyle = dashStyle;\n // The reason for the `else if` is that linecaps don't mix well\n // with dashstyle. The gaps get partially filled by the\n // linecap.\n }\n else if (options.linecap !== 'square') {\n attribs['stroke-linecap'] =\n attribs['stroke-linejoin'] = 'round';\n }\n graph[verb](attribs);\n // Add shadow only to the main series (not zones)\n // If shadow is defined, use `filterUnits: 'userSpaceOnUse'`\n // to avoid known SVG filter bug (#19093)\n if (options.shadow) {\n const isInverted = this.chart.inverted;\n const filterUnits = { filterUnits: 'userSpaceOnUse' };\n const shadowOptions = isObject(options.shadow) ?\n merge(isInverted ? {} : filterUnits, options.shadow) : (isInverted ? true : filterUnits);\n graph.shadow(shadowOptions);\n }\n }\n // Helpers for animation\n if (graph) {\n graph.startX = graphPath.xMap;\n graph.isArea = graphPath.isArea; // For arearange animation\n }\n });\n }\n // eslint-disable-next-line valid-jsdoc\n /**\n * Get the graph path.\n *\n * @internal\n */\n getGraphPath(points, nullsAsZeroes, connectCliffs) {\n const series = this, options = series.options, graphPath = [], xMap = [];\n let gap, step = options.step;\n points = points || series.points;\n // Bottom of a stack is reversed\n const reversed = points.reversed;\n if (reversed) {\n points.reverse();\n }\n // Reverse the steps (#5004)\n step = {\n right: 1,\n center: 2\n }[step] || (step && 3);\n if (step && reversed) {\n step = 4 - step;\n }\n // Remove invalid points, especially in spline (#5015)\n points = this.getValidPoints(points, false, options.nullInteraction || !(options.connectNulls &&\n !nullsAsZeroes &&\n !connectCliffs));\n // Build the line\n points.forEach(function (point, i) {\n const plotX = point.plotX, plotY = point.plotY, lastPoint = points[i - 1], isNull = point.isNull || typeof plotY !== 'number';\n // The path to this point from the previous\n let pathToPoint;\n if ((point.leftCliff || lastPoint?.rightCliff) &&\n !connectCliffs) {\n gap = true; // ... and continue\n }\n // Line series, nullsAsZeroes is not handled\n if (isNull && !defined(nullsAsZeroes) && i > 0) {\n gap = !options.connectNulls;\n // Area series, nullsAsZeroes is set\n }\n else if (isNull && !nullsAsZeroes) {\n gap = true;\n }\n else {\n if (i === 0 || gap) {\n pathToPoint = [[\n 'M',\n point.plotX,\n point.plotY\n ]];\n // Generate the spline as defined in the SplineSeries object\n }\n else if (series.getPointSpline) {\n pathToPoint = [series.getPointSpline(points, point, i)];\n }\n else if (step) {\n if (step === 1) { // Right\n pathToPoint = [[\n 'L',\n lastPoint.plotX,\n plotY\n ]];\n }\n else if (step === 2) { // Center\n pathToPoint = [[\n 'L',\n (lastPoint.plotX + plotX) / 2,\n lastPoint.plotY\n ], [\n 'L',\n (lastPoint.plotX + plotX) / 2,\n plotY\n ]];\n }\n else {\n pathToPoint = [[\n 'L',\n plotX,\n lastPoint.plotY\n ]];\n }\n pathToPoint.push([\n 'L',\n plotX,\n plotY\n ]);\n }\n else {\n // Normal line to next point\n pathToPoint = [[\n 'L',\n plotX,\n plotY\n ]];\n }\n // Prepare for animation. When step is enabled, there are\n // two path nodes for each x value.\n xMap.push(point.x);\n if (step) {\n xMap.push(point.x);\n if (step === 2) { // Step = center (#8073)\n xMap.push(point.x);\n }\n }\n graphPath.push.apply(graphPath, pathToPoint);\n gap = false;\n }\n });\n graphPath.xMap = xMap;\n series.graphPath = graphPath;\n return graphPath;\n }\n}\n/* *\n *\n * Static Functions\n *\n * */\nLineSeries.defaultOptions = merge(Series.defaultOptions, {\n /**\n * What type of legend symbol to render for this series. Can be one\n * of `areaMarker`, `lineMarker` or `rectangle`.\n *\n * @sample {highcharts} highcharts/series/legend-symbol/\n * Change the legend symbol\n *\n * @type {string}\n * @default lineMarker\n * @since 11.0.1\n * @apioption plotOptions.line.legendSymbol\n */\n legendSymbol: 'lineMarker'\n});\nSeriesRegistry.registerSeriesType('line', LineSeries);\n/* *\n *\n * Default Export\n *\n * */\n/** @internal */\nexport default LineSeries;\n/* *\n *\n * API Options\n *\n * */\n/**\n * A line series displays information as a series of data points connected by\n * straight line segments.\n *\n * @sample {highcharts} highcharts/demo/line-chart/\n * Line chart\n * @sample {highstock} stock/demo/basic-line/\n * Line chart\n *\n * @extends plotOptions.series\n * @product highcharts highstock\n * @apioption plotOptions.line\n */\n/**\n * A `line` series. If the [type](#series.line.type) option is not\n * specified, it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.line\n * @excluding dataParser,dataURL\n * @product highcharts highstock\n * @apioption series.line\n */\n/**\n * An array of data points for the series. For the `line` series type,\n * points can be given in the following ways:\n *\n * 1. An array of numerical values. In this case, the numerical values will be\n * interpreted as `y` options. The `x` values will be automatically\n * calculated, either starting at 0 and incremented by 1, or from\n * `pointStart` and `pointInterval` given in the series options. If the axis\n * has categories, these will be used. Example:\n * ```js\n * data: [0, 5, 3, 5]\n * ```\n *\n * 2. An array of arrays with 2 values. In this case, the values correspond to\n * `x,y`. If the first value is a string, it is applied as the name of the\n * point, and the `x` value is inferred.\n * ```js\n * data: [\n * [0, 1],\n * [1, 2],\n * [2, 8]\n * ]\n * ```\n *\n * 3. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.line.turboThreshold),\n * this option is not available.\n * ```js\n * data: [{\n * x: 1,\n * y: 9,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * y: 6,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * **Note:** In TypeScript you have to extend `PointOptionsObject` with an\n * additional declaration to allow custom data types:\n * ```ts\n * declare module `highcharts` {\n * interface PointOptionsObject {\n * custom: Record<string, (boolean|number|string)>;\n * }\n * }\n * ```\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * Numerical values\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @basic\n * @declare Highcharts.PointOptionsObject\n * @type {Array<number|Array<(number|string),(number|null)>|null|*>}\n * @apioption series.line.data\n */\n/**\n * An additional, individual class name for the data point's graphic\n * representation. Changes to a point's color will also be reflected in a\n * chart's legend and tooltip.\n *\n * @sample {highcharts} highcharts/css/point-series-classname\n * Series and point class name\n *\n * @type {string}\n * @since 5.0.0\n * @product highcharts highstock gantt\n * @apioption series.line.data.className\n */\n/**\n * Individual color for the point. By default the color is pulled from\n * the global `colors` array.\n *\n * In styled mode, the `color` option doesn't take effect. Instead, use\n * `colorIndex`.\n *\n * @sample {highcharts} highcharts/point/color/\n * Mark the highest point\n *\n * @type {Highcharts.ColorType}\n * @product highcharts highstock gantt\n * @apioption series.line.data.color\n */\n/**\n * A specific color index to use for the point, so its graphic representations\n * are given the class name `highcharts-color-{n}`. In styled mode this will\n * change the color of the graphic. In non-styled mode, the color is set by the\n * `fill` attribute, so the change in class name won't have a visual effect by\n * default.\n *\n * Since v11, CSS variables on the form `--highcharts-color-{n}` make changing\n * the color scheme very convenient.\n *\n * @sample {highcharts} highcharts/css/colorindex/\n * Series and point color index\n *\n * @type {number}\n * @since 5.0.0\n * @product highcharts gantt\n * @apioption series.line.data.colorIndex\n */\n/**\n * A reserved subspace to store options and values for customized functionality.\n * Here you can add additional data for your own event callbacks and formatter\n * callbacks.\n *\n * @sample {highcharts} highcharts/point/custom/\n * Point and series with custom data\n *\n * @type {Highcharts.Dictionary<*>}\n * @apioption series.line.data.custom\n */\n/**\n * Individual data label for each point. The options are the same as\n * the ones for [plotOptions.series.dataLabels](\n * #plotOptions.series.dataLabels) with exception of `zIndex` which is applied\n * on the data label's parent group.\n *\n * @sample highcharts/point/datalabels/\n * Show a label for the last value\n *\n * @type {*|Array<*>}\n * @declare Highcharts.DataLabelsOptions\n * @extends plotOptions.line.dataLabels\n * @excluding zIndex\n * @product highcharts highstock gantt\n * @apioption series.line.data.dataLabels\n */\n/**\n * An id for the point. This can be used after render time to get a\n * pointer to the point object through `chart.get()`.\n *\n * @sample {highcharts} highcharts/point/id/\n * Remove an id'd point\n *\n * @type {string}\n * @since 1.2.0\n * @product highcharts highstock gantt\n * @apioption series.line.data.id\n */\n/**\n * The rank for all this point's data labels in case of collision. If two\n * data labels are about to overlap, only the one with the highest `labelrank`\n * will be drawn.\n *\n * The `labelrank` set on `series.dataLabels` takes precedence over this.\n *\n * @type {number}\n * @apioption series.line.data.labelrank\n */\n/**\n * The name of the point as shown in the legend, tooltip, dataLabels, etc.\n *\n * @see [xAxis.uniqueNames](#xAxis.uniqueNames)\n *\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Point names\n *\n * @type {string}\n * @apioption series.line.data.name\n */\n/**\n * Whether the data point is selected initially.\n *\n * @type {boolean}\n * @default false\n * @product highcharts highstock gantt\n * @apioption series.line.data.selected\n */\n/**\n * The x value of the point.\n *\n * For datetime axes, a number value is the timestamp in milliseconds since\n * 1970, while a date string is parsed according to the [current time zone]\n * (https://api.highcharts.com/highcharts/time.timezone) of the\n * chart. Date strings are supported since v12.\n *\n * @type {number|string}\n * @product highcharts highstock\n * @apioption series.line.data.x\n */\n/**\n * The y value of the point.\n *\n * @type {number|null}\n * @product highcharts highstock\n * @apioption series.line.data.y\n */\n/**\n * The individual point events.\n *\n * @extends plotOptions.series.point.events\n * @product highcharts highstock gantt\n * @apioption series.line.data.events\n */\n/**\n * Options for the point markers of line-like series.\n *\n * @declare Highcharts.PointMarkerOptionsObject\n * @extends plotOptions.series.marker\n * @product highcharts highstock\n * @apioption series.line.data.marker\n */\n''; // Include precedent doclets in transpiled\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\n/* *\n *\n * API Options\n *\n * */\n/**\n * The area series type.\n *\n * @sample {highcharts} highcharts/demo/area-chart/\n * Area chart\n * @sample {highstock} stock/demo/area/\n * Area chart\n *\n * @extends plotOptions.line\n * @excluding useOhlcData\n * @product highcharts highstock\n * @optionparent plotOptions.area\n */\nconst AreaSeriesDefaults = {\n /**\n * @see [fillColor](#plotOptions.area.fillColor)\n * @see [fillOpacity](#plotOptions.area.fillOpacity)\n *\n * @apioption plotOptions.area.color\n */\n /**\n * Fill color or gradient for the area. When `undefined`, the series'\n * `color` is used with the series' `fillOpacity`.\n *\n * In styled mode, the fill color can be set with the `.highcharts-area`\n * class name.\n *\n * @see [color](#plotOptions.area.color)\n * @see [fillOpacity](#plotOptions.area.fillOpacity)\n *\n * @sample {highcharts} highcharts/plotoptions/area-fillcolor-default/\n * Undefined by default\n * @sample {highcharts} highcharts/plotoptions/area-fillcolor-gradient/\n * Gradient\n *\n * @type {Highcharts.ColorType}\n * @product highcharts highstock\n * @apioption plotOptions.area.fillColor\n */\n /**\n * Fill opacity for the area. When you set an explicit `fillColor`,\n * the `fillOpacity` is not applied. Instead, you should define the\n * opacity in the `fillColor` with an rgba color definition. The\n * `fillOpacity` setting, also the default setting, overrides the alpha\n * component of the `color` setting.\n *\n * In styled mode, the fill opacity can be set with the\n * `.highcharts-area` class name.\n *\n * @see [color](#plotOptions.area.color)\n * @see [fillColor](#plotOptions.area.fillColor)\n *\n * @sample {highcharts} highcharts/plotoptions/area-fillopacity/\n * Automatic fill color and fill opacity of 0.1\n *\n * @type {number}\n * @default {highcharts} 0.75\n * @default {highstock} 0.75\n * @product highcharts highstock\n * @apioption plotOptions.area.fillOpacity\n */\n /**\n * A separate color for the graph line. By default the line takes the\n * `color` of the series, but the lineColor setting allows setting a\n * separate color for the line without altering the `fillColor`.\n *\n * In styled mode, the line stroke can be set with the\n * `.highcharts-graph` class name.\n *\n * @sample {highcharts} highcharts/plotoptions/area-linecolor/\n * Dark gray line\n *\n * @type {Highcharts.ColorType}\n * @product highcharts highstock\n * @apioption plotOptions.area.lineColor\n */\n /**\n * A separate color for the negative part of the area. Note that `zones`\n * takes precedence over the negative fill color.\n *\n * In styled mode, a negative color is set with the\n * `.highcharts-negative` class name.\n *\n * @see [negativeColor](#plotOptions.area.negativeColor)\n *\n * @sample {highcharts} highcharts/css/series-negative-color/\n * Negative color in styled mode\n *\n * @type {Highcharts.ColorType}\n * @since 3.0\n * @product highcharts\n * @apioption plotOptions.area.negativeFillColor\n */\n /**\n * Whether the whole area or just the line should respond to mouseover\n * tooltips and other mouse or touch events.\n *\n * @sample {highcharts|highstock} highcharts/plotoptions/area-trackbyarea/\n * Display the tooltip when the area is hovered\n *\n * @type {boolean}\n * @default false\n * @since 1.1.6\n * @product highcharts highstock\n * @apioption plotOptions.area.trackByArea\n */\n /**\n * The Y axis value to serve as the base for the area, for\n * distinguishing between values above and below a threshold. The area\n * between the graph and the threshold is filled.\n *\n * * If a number is given, the Y axis will scale to the threshold.\n * * If `null`, the scaling behaves like a line series with fill between\n * the graph and the Y axis minimum.\n * * If `Infinity` or `-Infinity`, the area between the graph and the\n * corresponding Y axis extreme is filled (since v6.1.0).\n *\n * @sample {highcharts} highcharts/plotoptions/area-threshold/\n * A threshold of 100\n * @sample {highcharts} highcharts/plotoptions/area-threshold-infinity/\n * A threshold of Infinity\n *\n * @type {number|null}\n * @since 2.0\n * @product highcharts highstock\n */\n threshold: 0,\n legendSymbol: 'areaMarker'\n};\n/**\n * A `area` series. If the [type](#series.area.type) option is not\n * specified, it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.area\n * @excluding dataParser, dataURL, useOhlcData\n * @product highcharts highstock\n * @apioption series.area\n */\n/**\n * @see [fillColor](#series.area.fillColor)\n * @see [fillOpacity](#series.area.fillOpacity)\n *\n * @apioption series.area.color\n */\n/**\n * An array of data points for the series. For the `area` series type,\n * points can be given in the following ways:\n *\n * 1. An array of numerical values. In this case, the numerical values will be\n * interpreted as `y` options. The `x` values will be automatically\n * calculated, either starting at 0 and incremented by 1, or from\n * `pointStart` * and `pointInterval` given in the series options. If the\n * axis has categories, these will be used. Example:\n * ```js\n * data: [0, 5, 3, 5]\n * ```\n *\n * 2. An array of arrays with 2 values. In this case, the values correspond to\n * `x,y`. If the first value is a string, it is applied as the name of the\n * point, and the `x` value is inferred.\n * ```js\n * data: [\n * [0, 9],\n * [1, 7],\n * [2, 6]\n * ]\n * ```\n *\n * 3. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.area.turboThreshold), this option is not\n * available.\n * ```js\n * data: [{\n * x: 1,\n * y: 9,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * y: 6,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * Numerical values\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @basic\n * @type {Array<number|Array<(number|string),(number|null)>|null|*>}\n * @extends series.line.data\n * @product highcharts highstock\n * @apioption series.area.data\n */\n/**\n * @see [color](#series.area.color)\n * @see [fillOpacity](#series.area.fillOpacity)\n *\n * @apioption series.area.fillColor\n */\n/**\n * @see [color](#series.area.color)\n * @see [fillColor](#series.area.fillColor)\n *\n * @default {highcharts} 0.75\n * @default {highstock} 0.75\n * @apioption series.area.fillOpacity\n */\n''; // Adds doclets above to transpiled\n/* *\n *\n * Default Export\n *\n * */\nexport default AreaSeriesDefaults;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport AreaSeriesDefaults from './AreaSeriesDefaults.js';\nimport SeriesRegistry from '../../Core/Series/SeriesRegistry.js';\nconst { seriesTypes: { line: LineSeries } } = SeriesRegistry;\nimport { defined, extend, merge, objectEach, pick } from '../../Shared/Utilities.js';\n/* *\n *\n * Class\n *\n * */\n/**\n * Area series type.\n *\n * @internal\n * @class\n * @name AreaSeries\n *\n * @augments LineSeries\n */\nclass AreaSeries extends LineSeries {\n /* *\n *\n * Functions\n *\n * */\n /**\n * Draw the graph and the underlying area. This method calls the Series\n * base function and adds the area. The areaPath is calculated in the\n * getSegmentPath method called from Series.prototype.drawGraph.\n * @internal\n */\n drawGraph() {\n // Define or reset areaPath\n this.areaPath = [];\n // Call the base method\n super.drawGraph.apply(this);\n // Define local variables\n const { areaPath, options } = this;\n [this, ...this.zones].forEach((owner, i) => {\n const attribs = {}, fillColor = owner.fillColor || options.fillColor;\n let area = owner.area;\n const verb = area ? 'animate' : 'attr';\n // Create or update the area\n if (area) { // Update\n area.endX = this.preventGraphAnimation ?\n null :\n areaPath.xMap;\n area.animate({ d: areaPath });\n }\n else { // Create\n attribs.zIndex = 0; // #1069\n /**\n * SVG element of area-based charts. Can be used for styling\n * purposes. If zones are configured, this element will be\n * hidden and replaced by multiple zone areas, accessible\n * via `series.zones[i].area`.\n *\n * @name Highcharts.Series#area\n * @type {Highcharts.SVGElement|undefined}\n */\n area = owner.area = this.chart.renderer\n .path(areaPath)\n .addClass('highcharts-area' +\n (i ? ` highcharts-zone-area-${i - 1} ` : ' ') +\n ((i && owner.className) || ''))\n .add(this.group);\n area.isArea = true;\n }\n if (!this.chart.styledMode) {\n // If there is fillColor defined for the area, set it.\n // Otherwise, we set it to the zone/series color and add\n // fill-opacity (#18939).\n attribs.fill = fillColor || owner.color || this.color;\n attribs['fill-opacity'] = fillColor ?\n 1 : (options.fillOpacity ?? 0.75);\n // Allow clicking through the area if sticky tracking is true\n // (#18744)\n area.css({\n pointerEvents: this.stickyTracking ? 'none' : 'auto'\n });\n }\n area[verb](attribs);\n area.startX = areaPath.xMap;\n area.shiftUnit = options.step ? 2 : 1;\n });\n }\n /**\n * @internal\n */\n getGraphPath(points) {\n const getGraphPath = LineSeries.prototype.getGraphPath, options = this.options, stacking = options.stacking, yAxis = this.yAxis, bottomPoints = [], graphPoints = [], seriesIndex = this.index, stacks = yAxis.stacking.stacks[this.stackKey], threshold = options.threshold, translatedThreshold = Math.round(// #10909\n yAxis.getThreshold(options.threshold)), connectNulls = pick(// #10574\n options.connectNulls, stacking === 'percent'), \n // To display null points in underlying stacked series, this\n // series graph must be broken, and the area also fall down to\n // fill the gap left by the null point. #2069\n addDummyPoints = function (i, otherI, side) {\n const point = points[i], otherPoint = points[otherI], stackedValues = stacking && (stacks[point.x].points[seriesIndex]), nullVal = point[side + 'Null'] || 0, cliffVal = point[side + 'Cliff'] || 0;\n let top, bottom, isNull = true;\n if (stackedValues && (cliffVal || nullVal)) {\n top = (nullVal ? stackedValues[0] : stackedValues[1]) + cliffVal;\n bottom = stackedValues[0] + cliffVal;\n isNull = !!nullVal;\n }\n else if (!stacking &&\n otherPoint &&\n (otherPoint.isNull ||\n !defined(otherPoint.plotY))) {\n top = bottom = threshold;\n }\n // Add to the top and bottom line of the area\n if (typeof top !== 'undefined') {\n graphPoints.push({\n plotX: plotX,\n plotY: top === null ?\n translatedThreshold :\n yAxis.getThreshold(top),\n isNull: isNull,\n isCliff: true\n });\n bottomPoints.push({\n plotX: plotX,\n plotY: bottom === null ?\n translatedThreshold :\n yAxis.getThreshold(bottom),\n doCurve: false // #1041, gaps in areaspline areas\n });\n }\n };\n let plotX, isNull, yBottom;\n // Find what points to use\n points = points || this.points;\n // Fill in missing points\n if (stacking) {\n points = this.getStackPoints(points);\n }\n for (let i = 0, iEnd = points.length; i < iEnd; ++i) {\n // Reset after series.update of stacking property (#12033)\n if (!stacking) {\n points[i].leftCliff = points[i].rightCliff =\n points[i].leftNull = points[i].rightNull = void 0;\n }\n // Treat points with undefined plotY as null (e.g. non-positive\n // values on logarithmic axis, #18422)\n isNull = points[i].isNull || !defined(points[i].plotY);\n plotX = pick(points[i].rectPlotX, points[i].plotX);\n yBottom = stacking ?\n pick(points[i].yBottom, translatedThreshold) :\n translatedThreshold;\n if (!isNull || connectNulls) {\n if (!connectNulls) {\n addDummyPoints(i, i - 1, 'left');\n }\n // Skip null point when stacking is false and connectNulls\n // true\n if (!(isNull && !stacking && connectNulls)) {\n graphPoints.push(points[i]);\n bottomPoints.push({\n x: i,\n plotX: plotX,\n plotY: yBottom\n });\n }\n if (!connectNulls) {\n addDummyPoints(i, i + 1, 'right');\n }\n }\n }\n const topPath = getGraphPath.call(this, graphPoints, true, true);\n bottomPoints.reversed = true;\n const bottomPath = getGraphPath.call(this, bottomPoints, true, true);\n const firstBottomPoint = bottomPath[0];\n if (firstBottomPoint && firstBottomPoint[0] === 'M') {\n bottomPath[0] = ['L', firstBottomPoint[1], firstBottomPoint[2]];\n }\n const areaPath = topPath.concat(bottomPath);\n if (areaPath.length) {\n areaPath.push(['Z']);\n }\n // TODO: don't set leftCliff and rightCliff when connectNulls?\n const graphPath = getGraphPath\n .call(this, graphPoints, false, connectNulls);\n if (this.chart.series.length > 1 &&\n stacking &&\n graphPoints.some((point) => point.isCliff)) {\n areaPath.hasStackedCliffs = graphPath.hasStackedCliffs = true;\n }\n areaPath.xMap = topPath.xMap;\n this.areaPath = areaPath;\n return graphPath;\n }\n /**\n * Return an array of stacked points, where null and missing points are\n * replaced by dummy points in order for gaps to be drawn correctly in\n * stacks.\n * @internal\n */\n getStackPoints(points) {\n const series = this, segment = [], keys = [], xAxis = this.xAxis, yAxis = this.yAxis, stack = yAxis.stacking.stacks[this.stackKey], pointMap = {}, yAxisSeries = yAxis.series, seriesLength = yAxisSeries.length, upOrDown = yAxis.options.reversedStacks ? 1 : -1, seriesIndex = yAxisSeries.indexOf(series), translatedThreshold = yAxis.getThreshold(series.options.threshold || 0);\n points = points || this.points;\n if (this.options.stacking) {\n for (let i = 0; i < points.length; i++) {\n // Reset after point update (#7326)\n points[i].leftNull = points[i].rightNull = void 0;\n // Create a map where we can quickly look up the points by\n // their X values.\n pointMap[points[i].x] = points[i];\n }\n // Sort the keys (#1651)\n objectEach(stack, function (stackX, x) {\n // Nulled after switching between\n // grouping and not (#1651, #2336)\n if (stackX.total !== null) {\n keys.push(x);\n }\n });\n keys.sort(function (a, b) {\n return a - b;\n });\n const visibleSeries = yAxisSeries.map((s) => s.visible);\n keys.forEach(function (x, idx) {\n let y = 0, stackPoint, stackedValues;\n if (pointMap[x] && !pointMap[x].isNull) {\n segment.push(pointMap[x]);\n // Find left and right cliff. -1 goes left, 1 goes\n // right.\n [-1, 1].forEach(function (direction) {\n const nullName = direction === 1 ?\n 'rightNull' :\n 'leftNull', cliffName = direction === 1 ?\n 'rightCliff' :\n 'leftCliff', otherStack = stack[keys[idx + direction]];\n let cliff = 0;\n // If there is a stack next to this one,\n // to the left or to the right...\n if (otherStack) {\n let i = seriesIndex;\n // Can go either up or down,\n // depending on reversedStacks\n while (i >= 0 && i < seriesLength) {\n const si = yAxisSeries[i].index;\n stackPoint = otherStack.points[si];\n if (!stackPoint) {\n // If the next point in this series is\n // missing, mark the point with\n // point.leftNull or point.rightNull = true.\n if (si === series.index) {\n pointMap[x][nullName] = true;\n // If there are missing points in the next\n // stack in any of the series below this\n // one, we need to subtract the missing\n // values and add a hiatus to the left or\n // right.\n }\n else if (visibleSeries[i]) {\n stackedValues = stack[x].points[si];\n if (stackedValues) {\n cliff -= (stackedValues[1] -\n stackedValues[0]);\n }\n }\n }\n // When reversedStacks is true, loop up,\n // else loop down\n i += upOrDown;\n }\n }\n pointMap[x][cliffName] = cliff;\n });\n // There is no point for this X value in this series, so we\n // insert a dummy point in order for the areas to be drawn\n // correctly.\n }\n else {\n // Loop down the stack to find the series below this\n // one that has a value (#1991)\n let i = seriesIndex;\n while (i >= 0 && i < seriesLength) {\n const si = yAxisSeries[i].index;\n stackPoint = stack[x].points[si];\n if (stackPoint) {\n y = stackPoint[1];\n break;\n }\n // When reversedStacks is true, loop up, else loop\n // down\n i += upOrDown;\n }\n y || (y = 0);\n const plotY = yAxis.positiveValuesOnly && y <= 0 ?\n translatedThreshold :\n yAxis.translate(// #6272\n y, false, true, false, true);\n segment.push({\n isNull: true,\n plotX: xAxis.translate(// #6272\n x, false, false, false, true),\n x: x,\n plotY,\n yBottom: plotY\n });\n }\n });\n }\n return segment;\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\nAreaSeries.defaultOptions = merge(LineSeries.defaultOptions, AreaSeriesDefaults);\nextend(AreaSeries.prototype, {\n singleStacks: false\n});\nSeriesRegistry.registerSeriesType('area', AreaSeries);\n/* *\n *\n * Default Export\n *\n * */\n/** @internal */\nexport default AreaSeries;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport SeriesRegistry from '../../Core/Series/SeriesRegistry.js';\nconst { line: LineSeries } = SeriesRegistry.seriesTypes;\nimport { merge, pick } from '../../Shared/Utilities.js';\n/* *\n *\n * Class\n *\n * */\n/**\n * Spline series type.\n *\n * @private\n */\nclass SplineSeries extends LineSeries {\n /* *\n *\n * Functions\n *\n * */\n /**\n * Get the spline segment from a given point's previous neighbor to the\n * given point.\n *\n * @private\n * @function Highcharts.seriesTypes.spline#getPointSpline\n */\n getPointSpline(points, point, i) {\n const \n // 1 means control points midway between points, 2 means 1/3\n // from the point, 3 is 1/4 etc\n smoothing = 1.5, denom = smoothing + 1, plotX = point.plotX || 0, plotY = point.plotY || 0, lastPoint = points[i - 1], nextPoint = points[i + 1];\n let leftContX, leftContY, rightContX, rightContY;\n /**\n * @private\n */\n function doCurve(otherPoint) {\n return otherPoint &&\n !otherPoint.isNull &&\n otherPoint.doCurve !== false &&\n // #6387, area splines next to null:\n !point.isCliff;\n }\n // Find control points\n if (doCurve(lastPoint) && doCurve(nextPoint)) {\n const lastX = lastPoint.plotX || 0, lastY = lastPoint.plotY || 0, nextX = nextPoint.plotX || 0, nextY = nextPoint.plotY || 0;\n let correction = 0;\n leftContX = (smoothing * plotX + lastX) / denom;\n leftContY = (smoothing * plotY + lastY) / denom;\n rightContX = (smoothing * plotX + nextX) / denom;\n rightContY = (smoothing * plotY + nextY) / denom;\n // Have the two control points make a straight line through main\n // point\n if (rightContX !== leftContX) { // #5016, division by zero\n correction = (((rightContY - leftContY) *\n (rightContX - plotX)) /\n (rightContX - leftContX) + plotY - rightContY);\n }\n leftContY += correction;\n rightContY += correction;\n // To prevent false extremes, check that control points are\n // between neighboring points' y values\n if (leftContY > lastY && leftContY > plotY) {\n leftContY = Math.max(lastY, plotY);\n // Mirror of left control point\n rightContY = 2 * plotY - leftContY;\n }\n else if (leftContY < lastY && leftContY < plotY) {\n leftContY = Math.min(lastY, plotY);\n rightContY = 2 * plotY - leftContY;\n }\n if (rightContY > nextY && rightContY > plotY) {\n rightContY = Math.max(nextY, plotY);\n leftContY = 2 * plotY - rightContY;\n }\n else if (rightContY < nextY && rightContY < plotY) {\n rightContY = Math.min(nextY, plotY);\n leftContY = 2 * plotY - rightContY;\n }\n // Record for drawing in next point\n point.rightContX = rightContX;\n point.rightContY = rightContY;\n // Visualize control points for debugging\n /*\n if (leftContX) {\n this.chart.renderer\n .circle(\n leftContX + this.chart.plotLeft,\n leftContY + this.chart.plotTop,\n 2\n )\n .attr({\n stroke: 'red',\n 'stroke-width': 2,\n fill: 'none',\n zIndex: 9\n })\n .add();\n this.chart.renderer\n .path([['M', leftContX + this.chart.plotLeft,\n leftContY + this.chart.plotTop\n ], ['L', plotX + this.chart.plotLeft,\n plotY + this.chart.plotTop\n ]])\n .attr({\n stroke: 'red',\n 'stroke-width': 2,\n zIndex: 9\n })\n .add();\n }\n if (rightContX) {\n this.chart.renderer\n .circle(\n rightContX + this.chart.plotLeft,\n rightContY + this.chart.plotTop,\n 2\n )\n .attr({\n stroke: 'green',\n 'stroke-width': 2,\n fill: 'none',\n zIndex: 9\n })\n .add();\n this.chart.renderer\n .path([[\n 'M', rightContX + this.chart.plotLeft,\n rightContY + this.chart.plotTop\n ], [\n 'L', plotX + this.chart.plotLeft,\n plotY + this.chart.plotTop\n ]])\n .attr({\n stroke: 'green',\n 'stroke-width': 2,\n zIndex: 9\n })\n .add();\n }\n // */\n point.controlPoints = {\n low: [leftContX, leftContY],\n high: [rightContX, rightContY]\n };\n }\n const ret = [\n 'C',\n pick(lastPoint.rightContX, lastPoint.plotX, 0),\n pick(lastPoint.rightContY, lastPoint.plotY, 0),\n pick(leftContX, plotX, 0),\n pick(leftContY, plotY, 0),\n plotX,\n plotY\n ];\n // Reset for updating series later\n lastPoint.rightContX = lastPoint.rightContY = void 0;\n return ret;\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * A spline series is a special type of line series, where the segments\n * between the data points are smoothed.\n *\n * @sample {highcharts} highcharts/demo/spline-irregular-time/\n * Spline chart\n * @sample {highstock} stock/demo/spline/\n * Spline chart\n *\n * @extends plotOptions.series\n * @excluding step, boostThreshold, boostBlending\n * @product highcharts highstock\n * @optionparent plotOptions.spline\n */\nSplineSeries.defaultOptions = merge(LineSeries.defaultOptions);\nSeriesRegistry.registerSeriesType('spline', SplineSeries);\n/* *\n *\n * Default Export\n *\n * */\nexport default SplineSeries;\n/* *\n *\n * API Options\n *\n * */\n/**\n * A `spline` series. If the [type](#series.spline.type) option is\n * not specified, it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.spline\n * @excluding dataParser, dataURL, step, boostThreshold, boostBlending\n * @product highcharts highstock\n * @apioption series.spline\n */\n/**\n * An array of data points for the series. For the `spline` series type,\n * points can be given in the following ways:\n *\n * 1. An array of numerical values. In this case, the numerical values will be\n * interpreted as `y` options. The `x` values will be automatically\n * calculated, either starting at 0 and incremented by 1, or from\n * `pointStart` and `pointInterval` given in the series options. If the axis\n * has categories, these will be used. Example:\n * ```js\n * data: [0, 5, 3, 5]\n * ```\n *\n * 2. An array of arrays with 2 values. In this case, the values correspond to\n * `x,y`. If the first value is a string, it is applied as the name of the\n * point, and the `x` value is inferred.\n * ```js\n * data: [\n * [0, 9],\n * [1, 2],\n * [2, 8]\n * ]\n * ```\n *\n * 3. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.spline.turboThreshold),\n * this option is not available.\n * ```js\n * data: [{\n * x: 1,\n * y: 9,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * y: 0,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * Numerical values\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @basic\n * @type {Array<number|Array<(number|string),(number|null)>|null|*>}\n * @extends series.line.data\n * @product highcharts highstock\n * @apioption series.spline.data\n */\n''; // Adds doclets above intro transpiled\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport SplineSeries from '../Spline/SplineSeries.js';\nimport SeriesRegistry from '../../Core/Series/SeriesRegistry.js';\nconst { area: AreaSeries, area: { prototype: areaProto } } = SeriesRegistry.seriesTypes;\nimport { extend, merge } from '../../Shared/Utilities.js';\n/* *\n *\n * Class\n *\n * */\n/**\n * AreaSpline series type.\n *\n * @internal\n * @class\n * @name Highcharts.seriesTypes.areaspline\n *\n * @augments Highcharts.Series\n */\nclass AreaSplineSeries extends SplineSeries {\n}\n/* *\n *\n * Static Properties\n *\n * */\nAreaSplineSeries.defaultOptions = merge(SplineSeries.defaultOptions, AreaSeries.defaultOptions);\nextend(AreaSplineSeries.prototype, {\n getGraphPath: areaProto.getGraphPath,\n getStackPoints: areaProto.getStackPoints,\n drawGraph: areaProto.drawGraph\n});\nSeriesRegistry.registerSeriesType('areaspline', AreaSplineSeries);\n/* *\n *\n * Default Export\n *\n * */\n/** @internal */\nexport default AreaSplineSeries;\n/* *\n *\n * API Options\n *\n * */\n/**\n * The area spline series is an area series where the graph between the\n * points is smoothed into a spline.\n *\n * @sample {highcharts} highcharts/demo/areaspline/\n * Area spline chart\n * @sample {highstock} stock/demo/areaspline/\n * Area spline chart\n *\n * @extends plotOptions.area\n * @excluding step, boostThreshold, boostBlending\n * @product highcharts highstock\n * @apioption plotOptions.areaspline\n */\n/**\n * @see [fillColor](#plotOptions.areaspline.fillColor)\n * @see [fillOpacity](#plotOptions.areaspline.fillOpacity)\n *\n * @apioption plotOptions.areaspline.color\n */\n/**\n * @see [color](#plotOptions.areaspline.color)\n * @see [fillOpacity](#plotOptions.areaspline.fillOpacity)\n *\n * @apioption plotOptions.areaspline.fillColor\n */\n/**\n * @see [color](#plotOptions.areaspline.color)\n * @see [fillColor](#plotOptions.areaspline.fillColor)\n *\n * @default 0.75\n * @apioption plotOptions.areaspline.fillOpacity\n */\n/**\n * A `areaspline` series. If the [type](#series.areaspline.type) option\n * is not specified, it is inherited from [chart.type](#chart.type).\n *\n *\n * @extends series,plotOptions.areaspline\n * @excluding dataParser, dataURL, step, boostThreshold, boostBlending\n * @product highcharts highstock\n * @apioption series.areaspline\n */\n/**\n * @see [fillColor](#series.areaspline.fillColor)\n * @see [fillOpacity](#series.areaspline.fillOpacity)\n *\n * @apioption series.areaspline.color\n */\n/**\n * An array of data points for the series. For the `areaspline` series\n * type, points can be given in the following ways:\n *\n * 1. An array of numerical values. In this case, the numerical values will be\n * interpreted as `y` options. The `x` values will be automatically\n * calculated, either starting at 0 and incremented by 1, or from\n * `pointStart` and `pointInterval` given in the series options. If the axis\n * has categories, these will be used. Example:\n * ```js\n * data: [0, 5, 3, 5]\n * ```\n *\n * 2. An array of arrays with 2 values. In this case, the values correspond to\n * `x,y`. If the first value is a string, it is applied as the name of the\n * point, and the `x` value is inferred.\n * ```js\n * data: [\n * [0, 10],\n * [1, 9],\n * [2, 3]\n * ]\n * ```\n *\n * 3. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.areaspline.turboThreshold), this option is not\n * available.\n * ```js\n * data: [{\n * x: 1,\n * y: 4,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * y: 4,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * Numerical values\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @basic\n * @type {Array<number|Array<(number|string),(number|null)>|null|*>}\n * @extends series.line.data\n * @product highcharts highstock\n * @apioption series.areaspline.data\n */\n/**\n * @see [color](#series.areaspline.color)\n * @see [fillOpacity](#series.areaspline.fillOpacity)\n *\n * @apioption series.areaspline.fillColor\n */\n/**\n * @see [color](#series.areaspline.color)\n * @see [fillColor](#series.areaspline.fillColor)\n *\n * @default 0.75\n * @apioption series.areaspline.fillOpacity\n */\n''; // Adds doclets above into transpiled\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport A from '../Animation/AnimationUtilities.js';\nconst { getDeferredAnimation } = A;\nimport F from '../Templating.js';\nconst { format } = F;\nimport { defined, extend, fireEvent, getAlignFactor, isArray, isNumber, isString, merge, objectEach, pick, pInt, splat } from '../../Shared/Utilities.js';\n/* *\n *\n * Composition\n *\n * */\nvar DataLabel;\n(function (DataLabel) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * Check if this series has data labels, either a series-level setting, or\n * individual. In case of individual point labels, this method is overridden\n * to always return true.\n * @internal\n */\n function hasDataLabels() {\n return mergedDataLabelOptions(this)\n .some((o) => o?.enabled);\n }\n /**\n * Align each individual data label.\n * @internal\n */\n function alignDataLabel(point, dataLabel, options, alignTo, isNew) {\n const series = this, { chart } = this, inverted = this.isCartesian && chart.inverted, { condemned, origin, plotX, plotY } = point, { crop = true, distance, overflow = 'justify', rotation = 0 } = options, alignFactor = getAlignFactor(options.align), verticalAlignFactor = getAlignFactor(options.verticalAlign), justify = rotation === 0 && !condemned && overflow === 'justify', pos = point.pos(), isInsidePlot = defined(plotX) &&\n defined(plotY) &&\n chart.isInsidePlot(plotX, Math.round(plotY), {\n inverted,\n paneCoordinates: true,\n series\n });\n // Math.round for rounding errors (#2683), alignTo to allow column\n // labels (#2700)\n let visible = this.visible &&\n point.visible &&\n defined(plotX) &&\n (series.forceDL ||\n condemned || // Allow it to fade out\n isInsidePlot ||\n (\n // If the data label is inside the align box, it is enough\n // that parts of the align box is inside the plot area\n // (#12370). When stacking, it is always inside regardless\n // of the option (#15148).\n pick(options.inside, !!this.options.stacking) &&\n alignTo &&\n chart.isInsidePlot(plotX, inverted ?\n alignTo.x + 1 :\n alignTo.y + alignTo.height - 1, {\n inverted,\n paneCoordinates: true,\n series\n })));\n if (pos) {\n const bBox = dataLabel.getBBox(), unrotatedbBox = dataLabel.getBBox(void 0, 0);\n // The alignment box is a singular point\n alignTo = extend({\n x: pos[0],\n y: Math.round(pos[1]),\n width: 0,\n height: 0\n }, alignTo || {});\n // Align to plot edges\n if (options.alignTo === 'plotEdges' && series.isCartesian) {\n alignTo[inverted ? 'x' : 'y'] = 0;\n alignTo[inverted ? 'width' : 'height'] = this.yAxis?.len || 0;\n }\n // Add the text size for alignment calculation\n extend(options, {\n width: bBox.width,\n height: bBox.height\n });\n // Apply the distance\n let distX = 0, distY = 0;\n if (isNumber(distance) && !options.inside) {\n distX = distance * (1 - 2 * alignFactor);\n distY = distance * (1 - 2 * verticalAlignFactor);\n }\n // Align the label to the adjusted box with for unrotated bBox due\n // to rotationOrigin, which is based on unrotated label\n dataLabel.align(merge(options, {\n x: (options.x || 0) + distX,\n y: (options.y || 0) + distY,\n width: unrotatedbBox.width,\n height: unrotatedbBox.height\n }), false, alignTo, false);\n // Record for later use in justifyDataLabel\n dataLabel.distX = distX;\n dataLabel.distY = distY;\n // Modify for rotation\n dataLabel.alignAttr.x += alignFactor *\n (unrotatedbBox.width - bBox.width);\n dataLabel.alignAttr.y += verticalAlignFactor *\n (unrotatedbBox.height - bBox.height);\n // The placement attributes before justifyDataLabel correction\n const x = dataLabel.alignAttr.x +\n (bBox.width - unrotatedbBox.width) / 2, y = dataLabel.alignAttr.y +\n (bBox.height - unrotatedbBox.height) / 2;\n // Handle the data label position for entrance animation. Simply\n // offset the computed position by the difference between current\n // position and the origin.\n if (origin) {\n const originPos = point.pos(false, origin.x, origin.y);\n if (originPos) {\n const offset = [\n originPos[0] - pos[0],\n originPos[1] - pos[1]\n ];\n if (series.is('column') || point.plotHigh) {\n offset[inverted ? 0 : 1] = 0;\n }\n dataLabel.attr({\n x: x + offset[0],\n y: y + offset[1],\n // Start at non-zero to avoid overlapping logic treating\n // it as hidden\n opacity: 0.01\n });\n dataLabel.placed = true;\n isNew = false;\n }\n }\n // Set the position before potential justification\n const placeAttribs = {\n 'text-align': dataLabel.alignAttr['text-align'] || 'center',\n x,\n y,\n rotationOriginX: (dataLabel.width || 0) / 2,\n rotationOriginY: (dataLabel.height || 0) / 2\n };\n if (condemned || !visible) {\n placeAttribs.opacity = 0;\n }\n dataLabel[dataLabel.placed ? 'animate' : 'attr'](placeAttribs);\n // Uncomment this block to visualize the bounding boxes used for\n // determining visibility\n // chart.renderer.rect(\n // (dataLabel.alignAttr.x || 0) + chart.plotLeft,\n // (dataLabel.alignAttr.y || 0) + chart.plotTop,\n // bBox.width,\n // bBox.height\n // ).attr({\n // stroke: 'rgba(0, 0, 0, 0.3)',\n // 'stroke-width': 1,\n // zIndex: 20\n // }).add();\n // chart.renderer.circle(\n // chart.plotLeft + pick(dataLabel.alignAttr.x, 0),\n // chart.plotTop + pick(dataLabel.alignAttr.y, 0),\n // 2\n // ).attr({\n // fill: 'red',\n // zIndex: 20\n // }).add();\n if (justify && visible && alignTo.height >= 0) { // #8830\n this.justifyDataLabel(dataLabel, options, dataLabel.alignAttr, bBox, alignTo, isNew);\n }\n else if (crop && !condemned) {\n const { x, y } = dataLabel.alignAttr, correction = 1;\n // Check if the dataLabel should be visible.\n visible =\n chart.isInsidePlot(x, y, {\n paneCoordinates: true,\n series\n }) &&\n chart.isInsidePlot(x + bBox.width - correction, y + bBox.height - correction, {\n paneCoordinates: true,\n series\n });\n }\n // When we're using a shape, make it possible with a connector or an\n // arrow pointing to this point\n if (options.shape && !rotation) {\n dataLabel[isNew ? 'attr' : 'animate']({\n anchorX: pos[0],\n anchorY: pos[1]\n });\n }\n }\n // Show or hide based on the final aligned position\n dataLabel[isNew ? 'attr' : 'animate']({\n visibility: visible ? 'inherit' : 'hidden'\n });\n dataLabel.placed = visible;\n }\n /**\n * Handle the dataLabels.filter option.\n * @internal\n */\n function applyFilter(point, options) {\n const filter = options.filter;\n if (filter) {\n const op = filter.operator, prop = point[filter.property], val = filter.value;\n if ((op === '>' && prop > val) ||\n (op === '<' && prop < val) ||\n (op === '>=' && prop >= val) ||\n (op === '<=' && prop <= val) ||\n (op === '==' && prop == val) || // eslint-disable-line eqeqeq\n (op === '===' && prop === val) ||\n (op === '!=' && prop != val) || // eslint-disable-line eqeqeq\n (op === '!==' && prop !== val)) {\n return true;\n }\n return false;\n }\n return true;\n }\n /**\n * Compose the data label composition onto a series class.\n *\n * @internal\n * @function compose\n *\n * @param {Highcharts.Series} SeriesClass\n * The series class to compose onto.\n *\n * @return {void}\n */\n function compose(SeriesClass) {\n const seriesProto = SeriesClass.prototype;\n if (!seriesProto.initDataLabels) {\n seriesProto.initDataLabels = initDataLabels;\n seriesProto.initDataLabelsGroup = initDataLabelsGroup;\n seriesProto.alignDataLabel = alignDataLabel;\n seriesProto.drawDataLabels = drawDataLabels;\n seriesProto.justifyDataLabel = justifyDataLabel;\n seriesProto.mergeArrays = mergeArrays;\n seriesProto.hasDataLabels = hasDataLabels;\n }\n }\n DataLabel.compose = compose;\n /**\n * Create the SVGElement group for dataLabels.\n *\n * @internal\n * @function initDataLabelsGroup\n *\n * @param {number} index\n * The index of the data labels group.\n * @param {Highcharts.DataLabelOptions} [dataLabelsOptions]\n * Data label options for the group.\n *\n * @return {Highcharts.SVGElement}\n * The SVGElement group.\n */\n function initDataLabelsGroup(index, dataLabelsOptions) {\n fireEvent(this, 'initDataLabelsGroup', {\n index,\n zIndex: dataLabelsOptions?.zIndex\n });\n // Existing group or first time\n this.dataLabelsGroup = this.dataLabelsGroups?.[index];\n const group = this.plotGroup('dataLabelsGroup', 'data-labels', this.hasRendered ? 'inherit' : 'hidden', // #5133, #10220\n dataLabelsOptions?.zIndex ?? 6, this.dataLabelsParentGroups?.[index]);\n this.dataLabelsGroups || (this.dataLabelsGroups = []);\n this.dataLabelsGroups[index] = group;\n // Keep reference to the 1st group\n this.dataLabelsGroup = this.dataLabelsGroups[0];\n return group;\n }\n /**\n * Init the data labels with the correct animation.\n *\n * @internal\n * @function initDataLabels\n *\n * @param {number} index\n * The index of the data labels group.\n * @param {Highcharts.AnimationOptions} animationConfig\n * The animation options.\n * @param {Highcharts.DataLabelOptions} [dataLabelsOptions]\n * Data label options for the group.\n *\n * @return {Highcharts.SVGElement}\n * The SVGElement group.\n */\n function initDataLabels(index, animationConfig, dataLabelsOptions) {\n const series = this, hasRendered = !!series.hasRendered;\n // Create a separate group for the data labels to avoid rotation\n const dataLabelsGroup = this.initDataLabelsGroup(index, dataLabelsOptions)\n .attr({ opacity: +hasRendered }); // #3300\n if (!hasRendered && dataLabelsGroup) {\n if (series.visible) { // #2597, #3023, #3024\n dataLabelsGroup.show();\n }\n if (series.options.animation) {\n dataLabelsGroup.animate({ opacity: 1 }, animationConfig);\n }\n else {\n dataLabelsGroup.attr({ opacity: 1 });\n }\n }\n return dataLabelsGroup;\n }\n /**\n * Draw the data labels.\n * @internal\n */\n function drawDataLabels(points) {\n points = points || this.points;\n const series = this, chart = series.chart, seriesOptions = series.options, renderer = chart.renderer, { backgroundColor, plotBackgroundColor } = chart.options.chart, contrastColor = renderer.getContrast((isString(plotBackgroundColor) && plotBackgroundColor) ||\n (isString(backgroundColor) && backgroundColor) ||\n 'var(--highcharts-background-color)'), groupByIndex = [], seriesDlOptions = mergedDataLabelOptions(series);\n // Resolve the animation\n const { animation, defer } = seriesDlOptions[0], animationConfig = defer ?\n getDeferredAnimation(chart, animation, series) :\n { defer: 0, duration: 0 };\n fireEvent(this, 'drawDataLabels');\n if (series.hasDataLabels?.()) {\n // Make the labels for each point\n points.concat(series.condemnedPoints).forEach((point) => {\n const dataLabels = point.dataLabels || [], pointColor = point.color || series.color, \n // Merge in series options for the point.\n // @note\n // dataLabelAttribs (like pointAttribs) would eradicate the\n // need for dlOptions, and simplify the section below.\n pointOptions = splat(mergeArrays(seriesDlOptions, \n // The dlOptions prop is used in treemap\n point.dlOptions || point.options?.dataLabels));\n // Handle each individual data label for this point\n pointOptions.forEach((labelOptions, i) => {\n // Options for one dataLabel\n const labelEnabled = (labelOptions.enabled &&\n (point.visible || point.dataLabelOnHidden) &&\n // #2282, #4641, #7112, #10049\n (!point.isNull || point.dataLabelOnNull) &&\n applyFilter(point, labelOptions)), { backgroundColor, borderColor, distance, style = {} } = labelOptions, padding = splat(labelOptions.padding || 0);\n let formatString, labelText, rotation, attr = {}, dataLabel = dataLabels[i], isNew = !dataLabel, labelBgColor;\n if (labelEnabled) {\n // Create individual options structure that can be\n // extended without affecting others\n formatString = pick(labelOptions[point.formatPrefix + 'Format'], labelOptions.format);\n labelText = defined(formatString) ?\n format(formatString, point, chart) :\n (labelOptions[point.formatPrefix + 'Formatter'] ||\n labelOptions.formatter).call(point, labelOptions, point);\n rotation = labelOptions.rotation;\n if (!chart.styledMode) {\n // Determine the color\n style.color = pick(labelOptions.color, style.color, isString(series.color) ? series.color : void 0, 'var(--highcharts-neutral-color-100)');\n // Get automated contrast color\n if (style.color === 'contrast') {\n if (backgroundColor !== 'none') {\n labelBgColor = backgroundColor;\n }\n point.contrastColor = renderer.getContrast((labelBgColor !== 'auto' &&\n labelBgColor !== 'contrast' &&\n isString(labelBgColor) &&\n labelBgColor) ||\n (isString(pointColor) ? pointColor : ''));\n style.color = ((labelBgColor &&\n labelBgColor !== 'contrast') || // #20007\n labelOptions.inside ||\n pInt(distance || 0) < 0 ||\n seriesOptions.stacking) ?\n point.contrastColor :\n contrastColor;\n }\n else {\n delete point.contrastColor;\n }\n if (seriesOptions.cursor) {\n style.cursor = seriesOptions.cursor;\n }\n }\n attr = {\n r: labelOptions.borderRadius ?? 3,\n rotation,\n padding: padding[0],\n paddingLeft: padding[3 % padding.length],\n paddingRight: padding[1 % padding.length],\n zIndex: 1\n };\n if (!chart.styledMode) {\n attr.fill = backgroundColor === 'auto' ?\n point.color :\n backgroundColor;\n attr.stroke = borderColor === 'auto' ?\n point.color :\n borderColor;\n attr['stroke-width'] = labelOptions.borderWidth;\n }\n // Remove unused attributes (#947)\n objectEach(attr, (val, name) => {\n if (typeof val === 'undefined') {\n delete attr[name];\n }\n });\n }\n // If the point is outside the plot area, or the label\n // changes properties that we cannot change, destroy it and\n // build a new one below. #678, #820.\n if (dataLabel && (!labelEnabled ||\n !defined(labelText) ||\n // Changed useHTML value\n !!(dataLabel.div ||\n dataLabel.text?.foreignObject) !== !!labelOptions.useHTML ||\n (\n // Change from no rotation to rotation and\n // vice versa. Don't use defined() because\n // rotation = 0 means also rotation = undefined\n (!dataLabel.rotation ||\n !labelOptions.rotation) &&\n dataLabel.rotation !== labelOptions.rotation))) {\n dataLabel = void 0;\n isNew = true;\n }\n // Individual labels are disabled if the are explicitly\n // disabled in the point options, or if they fall outside\n // the plot area.\n if (labelEnabled &&\n defined(labelText) &&\n labelText !== '') {\n if (!dataLabel) {\n // Create new label element\n dataLabel = renderer.label(labelText, 0, 0, labelOptions.shape, void 0, void 0, labelOptions.useHTML, void 0, 'data-label');\n dataLabel.addClass(' highcharts-data-label-color-' +\n point.colorIndex +\n ' ' + (labelOptions.className || '') +\n ( // #3398\n labelOptions.useHTML ?\n ' highcharts-tracker' :\n ''));\n }\n else {\n // Use old element and just update text\n attr.text = labelText;\n }\n // Store data label options for later access\n if (dataLabel) {\n dataLabel.options = labelOptions;\n dataLabel.attr(attr);\n if (!chart.styledMode) {\n // Styles must be applied before add in order to\n // read text bounding box\n dataLabel.css(style).shadow(labelOptions.shadow);\n }\n else if (style.width) {\n // In styled mode with a width property set,\n // the width should be applied to the\n // dataLabel. (#20499). These properties affect\n // layout and must be applied also in styled\n // mode.\n dataLabel.css({\n width: style.width,\n textOverflow: style.textOverflow,\n whiteSpace: style.whiteSpace\n });\n }\n fireEvent(dataLabel, 'beforeAddingDataLabel', { labelOptions, point });\n // On the first occurrence, create a dataLabelsGroup\n // for each data labels config (#24626)\n const dataLabelsGroup = groupByIndex[i] = (groupByIndex[i] || this.initDataLabels(i, animationConfig, labelOptions));\n if (!dataLabel.added) {\n dataLabel.add(dataLabelsGroup);\n }\n // Now the data label is created and placed at 0,0,\n // so we need to align it\n series.alignDataLabel(point, dataLabel, labelOptions, void 0, isNew);\n dataLabel.isActive = true;\n if (dataLabels[i] && dataLabels[i] !== dataLabel) {\n dataLabels[i].destroy();\n }\n dataLabels[i] = dataLabel;\n }\n }\n });\n // Destroy and remove the inactive ones\n let j = dataLabels.length;\n while (j--) {\n // The item can be undefined if a disabled data label is\n // succeeded by an enabled one (#19457)\n if (!dataLabels[j]?.isActive) {\n dataLabels[j]?.destroy();\n dataLabels.splice(j, 1);\n }\n else {\n dataLabels[j].isActive = false;\n }\n }\n // Write back\n point.dataLabel = dataLabels[0];\n point.dataLabels = dataLabels;\n });\n }\n fireEvent(this, 'afterDrawDataLabels');\n }\n /**\n * If data labels fall partly outside the plot area, align them back in, in\n * a way that doesn't hide the point.\n * @internal\n */\n function justifyDataLabel(dataLabel, options, alignAttr, bBox, alignTo, isNew) {\n const chart = this.chart, { align, verticalAlign } = options, { distX = 0, distY = 0 } = dataLabel, padding = dataLabel.box ? 0 : (dataLabel.padding || 0), horizontalAxis = chart.inverted ? this.yAxis : this.xAxis, horizontalAxisShift = horizontalAxis ?\n horizontalAxis.left - chart.plotLeft : 0, verticalAxis = chart.inverted ? this.xAxis : this.yAxis, verticalAxisShift = verticalAxis ?\n verticalAxis.top - chart.plotTop : 0;\n let { x = 0, y = 0 } = options, off, justifiedX, justifiedY;\n // Off left\n off = (alignAttr.x || 0) - distX + padding + horizontalAxisShift;\n if (off < 0) {\n if (align === 'right' && x >= 0) {\n options.align = 'left';\n options.inside = true;\n x -= distX;\n }\n else {\n x -= off;\n }\n justifiedX = true;\n }\n // Off right\n off = (alignAttr.x || 0) + bBox.width - distX - padding +\n horizontalAxisShift;\n if (off > chart.plotWidth) {\n if (align === 'left' && x <= 0) {\n options.align = 'right';\n options.inside = true;\n x -= distX;\n }\n else {\n x += chart.plotWidth - off;\n }\n justifiedX = true;\n }\n // Off top\n off = (alignAttr.y || 0) - distY + padding + verticalAxisShift;\n if (off < 0) {\n if (verticalAlign === 'bottom' && y >= 0) {\n options.verticalAlign = 'top';\n options.inside = true;\n y -= distY;\n }\n else {\n y -= off;\n }\n justifiedY = true;\n }\n // Off bottom\n off = (alignAttr.y || 0) + bBox.height - distY - padding +\n verticalAxisShift;\n if (off > chart.plotHeight) {\n if (verticalAlign === 'top' && y <= 0) {\n options.verticalAlign = 'bottom';\n options.inside = true;\n y -= distY;\n }\n else {\n y += chart.plotHeight - off;\n }\n justifiedY = true;\n }\n if (justifiedX || justifiedY) {\n options.x = justifiedX ? x : x + distX;\n options.y = justifiedY ? y : y + distY;\n dataLabel.placed = !isNew;\n dataLabel.align(options, void 0, alignTo);\n }\n return justifiedX || justifiedY;\n }\n /**\n * Merge two objects that can be arrays. If one of them is an array, the\n * other is merged into each element. If both are arrays, each element is\n * merged by index. If neither are arrays, we use normal merge.\n * @internal\n */\n function mergeArrays(one, two) {\n let res = [], i;\n if (isArray(one) && !isArray(two)) {\n res = one.map(function (el) {\n return merge(el, two);\n });\n }\n else if (isArray(two) && !isArray(one)) {\n res = two.map(function (el) {\n return merge(one, el);\n });\n }\n else if (!isArray(one) && !isArray(two)) {\n res = merge(one, two);\n }\n else if (isArray(one) && isArray(two)) {\n i = Math.max(one.length, two.length);\n while (i--) {\n res[i] = merge(one[i], two[i]);\n }\n }\n return res;\n }\n /**\n * Merge plotOptions and series options for dataLabels.\n * @internal\n */\n function mergedDataLabelOptions(series) {\n const plotOptions = series.chart.options.plotOptions;\n return splat(mergeArrays(mergeArrays(plotOptions?.series?.dataLabels, plotOptions?.[series.type]?.dataLabels), series.options.dataLabels));\n }\n})(DataLabel || (DataLabel = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default DataLabel;\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * Callback JavaScript function to format the data label as a string. Note that\n * if a `format` is defined, the format takes precedence and the formatter is\n * ignored.\n *\n * @callback Highcharts.DataLabelsFormatterCallbackFunction\n *\n * @param {Highcharts.Point} this\n * Data label context to format\n *\n * @param {Highcharts.DataLabelsOptions} options\n * [API options](/highcharts/plotOptions.series.dataLabels) of the data label\n *\n * @return {number|string|null|undefined}\n * Formatted data label text\n */\n/**\n * Values for handling data labels that flow outside the plot area.\n *\n * @typedef {\"allow\"|\"justify\"} Highcharts.DataLabelsOverflowValue\n */\n''; // Keeps doclets above in JS file\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport DataLabel from '../../Core/Series/DataLabel.js';\nimport H from '../../Core/Globals.js';\nconst { composed } = H;\nimport SeriesRegistry from '../../Core/Series/SeriesRegistry.js';\nconst { series: Series } = SeriesRegistry;\nimport { merge, pushUnique } from '../../Shared/Utilities.js';\n/* *\n *\n * Composition\n *\n * */\nvar ColumnDataLabel;\n(function (ColumnDataLabel) {\n /* *\n *\n * Functions\n *\n * */\n /**\n * Override the basic data label alignment by adjusting for the position of\n * the column.\n * @internal\n */\n function alignDataLabel(point, dataLabel, dlOptions, alignTo, isNew) {\n const { chart, options } = this, inverted = chart.inverted, xLen = this.xAxis?.len || chart.plotSizeX || 0, yLen = this.yAxis?.len || chart.plotSizeY || 0, \n // Data label box for alignment\n dlBox = point.dlBox || point.shapeArgs, below = point.below ?? // Range series\n (point.plotY || 0) > (this.translatedThreshold ?? yLen), \n // Draw it inside the box?\n inside = dlOptions.inside ?? !!options.stacking;\n // Align to the column itself, or the top of it\n if (dlBox) { // Area range uses this method but not alignTo\n alignTo = merge(dlBox);\n // Check for specific overflow and crop conditions (#13240, #22617)\n if (dlOptions.overflow !== 'allow' ||\n dlOptions.crop !== false ||\n options.clip !== false) {\n if (alignTo.y < 0) {\n alignTo.height += alignTo.y;\n alignTo.y = 0;\n }\n // If parts of the box overshoots outside the plot area, modify\n // the box to center the label inside\n const overshoot = alignTo.y + alignTo.height - yLen;\n if (overshoot > 0 && overshoot < alignTo.height - 1) {\n alignTo.height -= overshoot;\n }\n }\n if (inverted) {\n alignTo = {\n x: yLen - alignTo.y - alignTo.height,\n y: xLen - alignTo.x - alignTo.width,\n width: alignTo.height,\n height: alignTo.width\n };\n }\n // Compute the alignment box\n if (!inside) {\n if (inverted) {\n alignTo.x += below ? 0 : alignTo.width;\n alignTo.width = 0;\n }\n else {\n alignTo.y += below ? alignTo.height : 0;\n alignTo.height = 0;\n }\n }\n }\n // When alignment is undefined (typically columns and bars), display the\n // individual point below or above the point depending on the threshold\n dlOptions.align ?? (dlOptions.align = !inverted || inside ?\n 'center' : below ? 'right' : 'left');\n dlOptions.verticalAlign ?? (dlOptions.verticalAlign = inverted || inside ?\n 'middle' : below ? 'top' : 'bottom');\n // Call the parent method\n Series.prototype.alignDataLabel.call(this, point, dataLabel, dlOptions, alignTo, isNew);\n // If label was justified and we have contrast, set it:\n if (dlOptions.inside && point.contrastColor) {\n dataLabel.css({\n color: point.contrastColor\n });\n }\n }\n /** @internal */\n function compose(ColumnSeriesClass) {\n DataLabel.compose(Series);\n if (pushUnique(composed, 'ColumnDataLabel')) {\n ColumnSeriesClass.prototype.alignDataLabel = alignDataLabel;\n }\n }\n ColumnDataLabel.compose = compose;\n})(ColumnDataLabel || (ColumnDataLabel = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default ColumnDataLabel;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport ColumnSeries from '../Column/ColumnSeries.js';\nimport SeriesRegistry from '../../Core/Series/SeriesRegistry.js';\nimport { extend, merge } from '../../Shared/Utilities.js';\n/* *\n *\n * Class\n *\n * */\n/**\n * Bar series type.\n *\n * @internal\n * @class\n * @name Highcharts.seriesTypes.bar\n *\n * @augments Highcharts.Series\n */\nclass BarSeries extends ColumnSeries {\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * A bar series is a special type of column series where the columns are\n * horizontal.\n *\n * @sample highcharts/demo/bar-chart/\n * Bar chart\n *\n * @extends plotOptions.column\n * @product highcharts\n * @optionparent plotOptions.bar\n */\nBarSeries.defaultOptions = merge(ColumnSeries.defaultOptions, {\n// Nothing here yet\n});\nextend(BarSeries.prototype, {\n inverted: true\n});\nSeriesRegistry.registerSeriesType('bar', BarSeries);\n/* *\n *\n * Default Export\n *\n * */\n/** @internal */\nexport default BarSeries;\n/* *\n *\n * API Options\n *\n * */\n/**\n * A `bar` series. If the [type](#series.bar.type) option is not specified,\n * it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.bar\n * @excluding connectNulls, dashStyle, dataParser, dataURL, gapSize, gapUnit,\n * linecap, lineWidth, marker, connectEnds, step\n * @product highcharts\n * @apioption series.bar\n */\n/**\n * An array of data points for the series. For the `bar` series type,\n * points can be given in the following ways:\n *\n * 1. An array of numerical values. In this case, the numerical values will be\n * interpreted as `y` options. The `x` values will be automatically\n * calculated, either starting at 0 and incremented by 1, or from\n * `pointStart` and `pointInterval` given in the series options. If the axis\n * has categories, these will be used. Example:\n * ```js\n * data: [0, 5, 3, 5]\n * ```\n *\n * 2. An array of arrays with 2 values. In this case, the values correspond to\n * `x,y`. If the first value is a string, it is applied as the name of the\n * point, and the `x` value is inferred.\n * ```js\n * data: [\n * [0, 5],\n * [1, 10],\n * [2, 3]\n * ]\n * ```\n *\n * 3. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.bar.turboThreshold), this option is not\n * available.\n * ```js\n * data: [{\n * x: 1,\n * y: 1,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * y: 10,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * Numerical values\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @basic\n * @type {Array<number|Array<(number|string),(number|null)>|null|*>}\n * @extends series.column.data\n * @product highcharts\n * @apioption series.bar.data\n */\n/**\n * @excluding halo,lineWidth,lineWidthPlus,marker\n * @product highcharts highstock\n * @apioption series.bar.states.hover\n */\n/**\n * @excluding halo,lineWidth,lineWidthPlus,marker\n * @product highcharts highstock\n * @apioption series.bar.states.select\n */\n''; // Gets doclets above into transpiled\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\n/* *\n *\n * API Options\n *\n * */\n/**\n * A scatter plot uses cartesian coordinates to display values for two\n * variables for a set of data.\n *\n * @sample {highcharts} highcharts/demo/scatter/\n * Scatter plot\n *\n * @extends plotOptions.line\n * @excluding cropThreshold, legendSymbolColor, pointPlacement, shadow,\n * useOhlcData\n * @product highcharts highstock\n * @optionparent plotOptions.scatter\n */\nconst ScatterSeriesDefaults = {\n /**\n * The width of the line connecting the data points.\n *\n * @sample {highcharts} highcharts/plotoptions/scatter-linewidth-none/\n * 0 by default\n * @sample {highcharts} highcharts/plotoptions/scatter-linewidth-1/\n * 1px\n *\n * @product highcharts highstock\n */\n lineWidth: 0,\n findNearestPointBy: 'xy',\n /**\n * Apply a jitter effect for the rendered markers. When plotting\n * discrete values, a little random noise may help telling the points\n * apart. The jitter setting applies a random displacement of up to `n`\n * axis units in either direction. So for example on a horizontal X\n * axis, setting the `jitter.x` to 0.24 will render the point in a\n * random position between 0.24 units to the left and 0.24 units to the\n * right of the true axis position. On a category axis, setting it to\n * 0.5 will fill up the bin and make the data appear continuous.\n *\n * When rendered on top of a box plot or a column series, a jitter value\n * of 0.24 will correspond to the underlying series' default\n * [groupPadding](\n * https://api.highcharts.com/highcharts/plotOptions.column.groupPadding)\n * and [pointPadding](\n * https://api.highcharts.com/highcharts/plotOptions.column.pointPadding)\n * settings.\n *\n * **Note:** With boost mode enabled, the jitter effect is not supported.\n *\n * @sample {highcharts} highcharts/demo/scatter-jitter\n * Jitter on a scatter plot\n *\n * @sample {highcharts} highcharts/series-scatter/jitter-boxplot\n * Jittered scatter plot on top of a box plot\n *\n * @product highcharts highstock\n * @since 7.0.2\n */\n jitter: {\n /**\n * The maximal X offset for the random jitter effect.\n */\n x: 0,\n /**\n * The maximal Y offset for the random jitter effect.\n */\n y: 0\n },\n marker: {\n enabled: true // Overrides auto-enabling in line series (#3647)\n },\n /**\n * Sticky tracking of mouse events. When true, the `mouseOut` event\n * on a series isn't triggered until the mouse moves over another\n * series, or out of the plot area. When false, the `mouseOut` event on\n * a series is triggered when the mouse leaves the area around the\n * series' graph or markers. This also implies the tooltip. When\n * `stickyTracking` is false and `tooltip.shared` is false, the tooltip\n * will be hidden when moving the mouse between series.\n *\n * @type {boolean}\n * @default false\n * @product highcharts highstock highmaps\n * @apioption plotOptions.scatter.stickyTracking\n */\n /**\n * A configuration object for the tooltip rendering of each single\n * series. Properties are inherited from [tooltip](#tooltip).\n * Overridable properties are `headerFormat`, `pointFormat`,\n * `yDecimals`, `xDateFormat`, `yPrefix` and `ySuffix`. Unlike other\n * series, in a scatter plot the series.name by default shows in the\n * headerFormat and point.x and point.y in the pointFormat.\n *\n * @product highcharts highstock highmaps\n */\n tooltip: {\n /**\n * @product highcharts highstock\n */\n headerFormat: '<span style=\"color:{point.color}\">\\u25CF</span> ' +\n '<span style=\"font-size: 0.8em\"> {series.name}</span><br/>',\n pointFormat: 'x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>'\n }\n};\n/**\n * A `scatter` series. If the [type](#series.scatter.type) option is\n * not specified, it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.scatter\n * @excluding cropThreshold, dataParser, dataURL, useOhlcData\n * @product highcharts highstock\n * @apioption series.scatter\n */\n/**\n * An array of data points for the series. For the `scatter` series\n * type, points can be given in the following ways:\n *\n * 1. An array of numerical values. In this case, the numerical values will be\n * interpreted as `y` options. The `x` values will be automatically\n * calculated, either starting at 0 and incremented by 1, or from\n * `pointStart` and `pointInterval` given in the series options. If the axis\n * has categories, these will be used. Example:\n * ```js\n * data: [0, 5, 3, 5]\n * ```\n *\n * 2. An array of arrays with 2 values. In this case, the values correspond to\n * `x,y`. If the first value is a string, it is applied as the name of the\n * point, and the `x` value is inferred.\n * ```js\n * data: [\n * [0, 0],\n * [1, 8],\n * [2, 9]\n * ]\n * ```\n *\n * 3. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.scatter.turboThreshold), this option is not\n * available.\n * ```js\n * data: [{\n * x: 1,\n * y: 2,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * y: 4,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * Numerical values\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @basic\n * @type {Array<number|Array<(number|string),(number|null)>|null|*>}\n * @extends series.line.data\n * @product highcharts highstock\n * @apioption series.scatter.data\n */\n''; // Keeps doclets above in JS file\n/* *\n *\n * Default Export\n *\n * */\nexport default ScatterSeriesDefaults;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport ScatterSeriesDefaults from './ScatterSeriesDefaults.js';\nimport SeriesRegistry from '../../Core/Series/SeriesRegistry.js';\nconst { column: ColumnSeries, line: LineSeries } = SeriesRegistry.seriesTypes;\nimport { addEvent, extend, merge } from '../../Shared/Utilities.js';\n/* *\n *\n * Class\n *\n * */\n/**\n * Scatter series type.\n *\n * @private\n */\nclass ScatterSeries extends LineSeries {\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Optionally add the jitter effect.\n * @private\n */\n applyJitter() {\n const series = this, jitter = this.options.jitter, len = this.points.length;\n /**\n * Return a repeatable, pseudo-random number based on an integer\n * seed.\n * @private\n */\n function unrandom(seed) {\n const rand = Math.sin(seed) * 10000;\n return rand - Math.floor(rand);\n }\n if (jitter) {\n this.points.forEach(function (point, i) {\n ['x', 'y'].forEach(function (dim, j) {\n if (jitter[dim] && !point.isNull) {\n const plotProp = `plot${dim.toUpperCase()}`, axis = series[`${dim}Axis`], translatedJitter = jitter[dim] *\n axis.transA;\n if (axis && !axis.logarithmic) {\n // Identify the outer bounds of the jitter range\n const min = Math.max(0, (point[plotProp] || 0) - translatedJitter), max = Math.min(axis.len, (point[plotProp] || 0) + translatedJitter);\n // Find a random position within this range\n point[plotProp] = min +\n (max - min) * unrandom(i + j * len);\n // Update clientX for the tooltip k-d-tree\n if (dim === 'x') {\n point.clientX = point.plotX;\n }\n }\n }\n });\n });\n }\n }\n /**\n * @private\n */\n drawGraph() {\n if (this.options.lineWidth) {\n super.drawGraph();\n }\n else if (this.graph) {\n this.graph = this.graph.destroy();\n }\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\nScatterSeries.defaultOptions = merge(LineSeries.defaultOptions, ScatterSeriesDefaults);\nextend(ScatterSeries.prototype, {\n allowOutsidePlotInteraction: true,\n drawTracker: ColumnSeries.prototype.drawTracker,\n sorted: false,\n requireSorting: false,\n noSharedTooltip: true,\n trackerGroups: ['group', 'markerGroup', 'dataLabelsGroup']\n});\n/* *\n *\n * Events\n *\n * */\n/* eslint-disable no-invalid-this */\naddEvent(ScatterSeries, 'afterTranslate', function () {\n this.applyJitter();\n});\nSeriesRegistry.registerSeriesType('scatter', ScatterSeries);\n/* *\n *\n * Default Export\n *\n * */\nexport default ScatterSeries;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport A from '../../Core/Animation/AnimationUtilities.js';\nconst { setAnimation } = A;\nimport Point from '../../Core/Series/Point.js';\nimport { addEvent, extend, isNumber, pick, relativeLength } from '../../Shared/Utilities.js';\n/* *\n *\n * Class\n *\n * */\nclass PiePoint extends Point {\n /* *\n *\n * Functions\n *\n * */\n /**\n * Extendable method for getting the path of the connector between the\n * data label and the pie slice.\n * @internal\n */\n getConnectorPath(dataLabel) {\n const labelPosition = dataLabel.dataLabelPosition, options = (dataLabel.options || {}), connectorShape = options.connectorShape, shapeFunc = (this.connectorShapes[connectorShape] || connectorShape);\n return labelPosition && shapeFunc.call(this, {\n // Pass simplified label position object for user's convenience\n ...labelPosition.computed,\n alignment: labelPosition.alignment\n }, labelPosition.connectorPosition, options) || [];\n }\n /** @internal */\n getTranslate() {\n return this.sliced && this.slicedTranslation || {\n translateX: 0,\n translateY: 0\n };\n }\n /** @internal */\n haloPath(size) {\n const shapeArgs = this.shapeArgs;\n return this.sliced || !this.visible ?\n [] :\n this.series.chart.renderer.symbols.arc(shapeArgs.x, shapeArgs.y, shapeArgs.r + size, shapeArgs.r + size, {\n // Subtract 1px to ensure the background is not bleeding\n // through between the halo and the slice (#7495).\n innerR: shapeArgs.r - 1,\n start: shapeArgs.start,\n end: shapeArgs.end,\n borderRadius: shapeArgs.borderRadius\n });\n }\n /**\n * Initialize the pie slice.\n * @internal\n */\n constructor(series, options, x) {\n super(series, options, x);\n /** @internal */\n this.half = 0;\n this.name ?? (this.name = series.chart.options.lang.pieSliceName);\n // Add event listener for select\n const toggleSlice = (e) => {\n this.slice(e.type === 'select');\n };\n addEvent(this, 'select', toggleSlice);\n addEvent(this, 'unselect', toggleSlice);\n }\n /** @internal */\n isValid() {\n // Negative points are not valid (#1530, #3623, #5322)\n return isNumber(this.y) && this.y >= 0;\n }\n /**\n * Toggle the visibility of a pie slice or other data point. Note that this\n * method is available only for some series, like pie, treemap and sunburst.\n *\n * @function Highcharts.Point#setVisible\n *\n * @param {boolean} [vis]\n * True to show the pie slice or other data point, false to hide. If\n * undefined, the visibility is toggled.\n *\n * @param {boolean} [redraw=true] Whether to redraw the chart after the point is\n * altered. If doing more operations on the chart, it is a good idea to set\n * redraw to false and call {@link Chart#redraw|chart.redraw()} after.\n *\n */\n setVisible(vis, redraw = true) {\n if (vis !== this.visible) {\n // If called without an argument, toggle visibility\n this.update({\n visible: vis ?? !this.visible\n }, redraw, void 0, false);\n }\n }\n /**\n * Set or toggle whether the slice is cut out from the pie.\n *\n * @internal\n *\n * @param {boolean} sliced\n * When undefined, the slice state is toggled.\n *\n * @param {boolean} [redraw]\n * Whether to redraw the chart. True by default.\n *\n * @param {boolean|Partial<Highcharts.AnimationOptionsObject>} [animation]\n * Animation options.\n */\n slice(sliced, redraw, animation) {\n const series = this.series, chart = series.chart;\n setAnimation(animation, chart);\n // Redraw is true by default\n redraw = pick(redraw, true);\n this.sliced = this.options.sliced = sliced ?? !this.sliced;\n // Update options.data\n if (series.options.data) {\n series.options.data[series.data.indexOf(this)] = this.options;\n }\n this.graphic?.animate(this.getTranslate());\n }\n}\nextend(PiePoint.prototype, {\n connectorShapes: {\n // Only one available before v7.0.0\n fixedOffset: function (labelPosition, connectorPosition, options) {\n const breakAt = connectorPosition.breakAt, touchingSliceAt = connectorPosition.touchingSliceAt, lineSegment = options.softConnector ? [\n 'C', // Soft break\n // 1st control point (of the curve)\n labelPosition.x +\n // 5 gives the connector a little horizontal bend\n (labelPosition.alignment === 'left' ? -5 : 5),\n labelPosition.y, //\n 2 * breakAt.x - touchingSliceAt.x, // 2nd control point\n 2 * breakAt.y - touchingSliceAt.y, //\n breakAt.x, // End of the curve\n breakAt.y //\n ] : [\n 'L', // Pointy break\n breakAt.x,\n breakAt.y\n ];\n // Assemble the path\n return ([\n ['M', labelPosition.x, labelPosition.y],\n lineSegment,\n ['L', touchingSliceAt.x, touchingSliceAt.y]\n ]);\n },\n straight: function (labelPosition, connectorPosition) {\n const touchingSliceAt = connectorPosition.touchingSliceAt;\n // Direct line to the slice\n return [\n ['M', labelPosition.x, labelPosition.y],\n ['L', touchingSliceAt.x, touchingSliceAt.y]\n ];\n },\n crookedLine: function (labelPosition, connectorPosition, options) {\n const { angle = this.angle || 0, breakAt, touchingSliceAt } = connectorPosition, { series } = this, [cx, cy, diameter] = series.center, r = diameter / 2, { plotLeft, plotWidth } = series.chart, leftAligned = labelPosition.alignment === 'left', { x, y } = labelPosition;\n let crookX = breakAt.x;\n if (options.crookDistance) {\n const crookDistance = relativeLength(// % to fraction\n options.crookDistance, 1);\n crookX = leftAligned ?\n cx +\n r +\n (plotWidth + plotLeft - cx - r) * (1 - crookDistance) :\n plotLeft + (cx - r) * crookDistance;\n // When the crookDistance option is undefined, make the bend in the\n // intersection between the radial line in the middle of the slice,\n // and the extension of the label position.\n }\n else {\n crookX = cx + (cy - y) * Math.tan(angle - Math.PI / 2);\n }\n const path = [['M', x, y]];\n // The crookedLine formula doesn't make sense if the path overlaps\n // the label - use straight line instead in that case\n if (leftAligned ?\n (crookX <= x && crookX >= breakAt.x) :\n (crookX >= x && crookX <= breakAt.x)) {\n path.push(['L', crookX, y]);\n }\n path.push(['L', breakAt.x, breakAt.y], ['L', touchingSliceAt.x, touchingSliceAt.y]);\n return path;\n }\n }\n});\n/* *\n *\n * Default Export\n *\n * */\nexport default PiePoint;\n/* *\n *\n * API Options\n *\n * */\n/**\n * Pie series only. Whether to display a slice offset from the center.\n *\n * @name Highcharts.Point#sliced\n * @type {boolean|undefined}\n */\n''; // Keeps doclets above in JS file\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\n/* *\n *\n * API Options\n *\n * */\n/**\n * A pie chart is a circular graphic which is divided into slices to\n * illustrate numerical proportion.\n *\n * @sample highcharts/demo/pie-chart/\n * Pie chart\n *\n * @extends plotOptions.line\n * @excluding animationLimit, boostThreshold, connectEnds, connectNulls,\n * cropThreshold, dashStyle, dataSorting, dragDrop,\n * findNearestPointBy, getExtremesFromAll, label, lineWidth,\n * linkedTo, marker, negativeColor, pointInterval,\n * pointIntervalUnit, pointPlacement, pointStart,\n * softThreshold, stacking, step, threshold, turboThreshold,\n * zoneAxis, zones, dataSorting, boostBlending\n * @product highcharts highmaps\n * @optionparent plotOptions.pie\n */\nconst PieSeriesDefaults = {\n /**\n * The corner radius of the border surrounding each slice. A number\n * signifies pixels. A percentage string, like for example `50%`, signifies\n * a size relative to the radius and the inner radius.\n *\n * @sample highcharts/plotoptions/series-border-radius\n * Column and pie with rounded border\n *\n * @since 11.0.0\n *\n * @type {number|string|Highcharts.BorderRadiusOptionsObject}\n */\n borderRadius: 3,\n /**\n * @excluding legendItemClick\n * @apioption plotOptions.pie.events\n */\n /**\n * Fires when the checkbox next to the point name in the legend is\n * clicked. One parameter, event, is passed to the function. The state\n * of the checkbox is found by event.checked. The checked item is found\n * by event.item. Return false to prevent the default action which is to\n * toggle the select state of the series.\n *\n * @sample {highcharts} highcharts/plotoptions/series-events-checkboxclick/\n * Alert checkbox status\n *\n * @type {Function}\n * @since 1.2.0\n * @product highcharts highmaps\n * @context Highcharts.Point\n * @apioption plotOptions.pie.events.checkboxClick\n */\n /**\n * Fires when the legend item belonging to the pie point (slice) is\n * clicked. The `this` keyword refers to the point itself. One\n * parameter, `event`, is passed to the function, containing common\n * event information. The default action is to toggle the visibility of\n * the point. This can be prevented by calling `event.preventDefault()`.\n *\n * **Note:** This option is deprecated in favor of\n * [legend.events.itemClick](#legend.events.itemClick).\n *\n * @deprecated 11.4.4\n * @type {Highcharts.PointLegendItemClickCallbackFunction}\n * @since 1.2.0\n * @product highcharts highmaps\n * @apioption plotOptions.pie.point.events.legendItemClick\n */\n /**\n * The center of the pie chart relative to the plot area. Can be\n * percentages or pixel values. The default behavior (as of 3.0) is to\n * center the pie so that all slices and data labels are within the plot\n * area. As a consequence, the pie may actually jump around in a chart\n * with dynamic values, as the data labels move. In that case, the\n * center should be explicitly set, for example to `[\"50%\", \"50%\"]`.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-center/\n * Centered at 100, 100\n *\n * @type {Array<(number|string|null),(number|string|null)>}\n * @default [null, null]\n * @product highcharts highmaps\n */\n center: [null, null],\n /**\n * The color of the pie series. A pie series is represented as an empty\n * circle if the total sum of its values is 0. Use this property to\n * define the color of its border.\n *\n * In styled mode, the color can be defined by the\n * [colorIndex](#plotOptions.series.colorIndex) option. Also, the series\n * color can be set with the `.highcharts-series`,\n * `.highcharts-color-{n}`, `.highcharts-{type}-series` or\n * `.highcharts-series-{n}` class, or individual classes given by the\n * `className` option.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-emptyseries/\n * Empty pie series\n *\n * @type {Highcharts.ColorType}\n * @default var(--highcharts-neutral-color-20)\n * @apioption plotOptions.pie.color\n */\n /**\n * @product highcharts\n */\n clip: false,\n /**\n * @ignore-option\n *\n * @internal\n */\n colorByPoint: true, // Always true for pies\n /**\n * A series specific or series type specific color set to use instead\n * of the global [colors](#colors).\n *\n * @sample {highcharts} highcharts/demo/pie-monochrome/\n * Set default colors for all pies\n *\n * @type {Array<Highcharts.ColorType>}\n * @since 3.0\n * @product highcharts highmaps\n * @apioption plotOptions.pie.colors\n */\n /**\n * @declare Highcharts.SeriesPieDataLabelsOptionsObject\n * @extends plotOptions.series.dataLabels\n * @excluding align, allowOverlap, inside, staggerLines, step\n */\n dataLabels: {\n /**\n * Alignment method for data labels. Possible values are:\n *\n * - `plotEdges`: Each label touches the nearest vertical edge of\n * the plot area.\n *\n * - `connectors`: Connectors have the same x position and the\n * widest label of each half (left & right) touches the nearest\n * vertical edge of the plot area.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-alignto-connectors/\n * alignTo: connectors\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-alignto-plotedges/\n * alignTo: plotEdges\n *\n * @type {string}\n * @since 7.0.0\n * @product highcharts highmaps\n * @apioption plotOptions.pie.dataLabels.alignTo\n */\n /**\n * The color of the line connecting the data label to the pie slice.\n * The default color is the same as the point's color.\n *\n * In styled mode, the connector stroke is given in the\n * `.highcharts-data-label-connector` class.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-connectorcolor/\n * Blue connectors\n * @sample {highcharts} highcharts/css/pie-point/\n * Styled connectors\n *\n * @type {Highcharts.ColorType}\n * @since 2.1\n * @product highcharts highmaps\n * @apioption plotOptions.pie.dataLabels.connectorColor\n */\n /**\n * The distance from the data label to the connector. Note that\n * data labels also have a default `padding`, so in order for the\n * connector to touch the text, the `padding` must also be 0.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-connectorpadding/\n * No padding\n *\n * @since 2.1\n * @product highcharts highmaps\n */\n connectorPadding: 5,\n /**\n * Specifies the method that is used to generate the connector path.\n * Highcharts provides 3 built-in connector shapes: `'crookedLine'`\n * (default since v11), `'fixedOffset'` and `'straight'`.\n *\n * Users can provide their own method by passing a function instead of a\n * string. Three arguments are passed to the callback:\n *\n * - An object that holds the information about the coordinates of the\n * label (`x` & `y` properties) and how the label is located in\n * relation to the pie (`alignment` property). `alignment` can by one\n * of the following: `'left'` (pie on the left side of the data\n * label), `'right'` (pie on the right side of the data label) or\n * `'center'` (data label overlaps the pie).\n *\n * - An object that holds the information about the position of the\n * connector. Its `touchingSliceAt` property tells the position of\n * the place where the connector touches the slice.\n *\n * - Data label options\n *\n * The function has to return an SVG path definition in array form (see\n * the example).\n *\n * @sample {highcharts}\n * highcharts/plotoptions/pie-datalabels-connectorshape-string/\n * connectorShape is a String\n * @sample {highcharts}\n * highcharts/plotoptions/pie-datalabels-connectorshape-function/\n * connectorShape is a function\n *\n * @type {string|Function}\n * @since 7.0.0\n * @product highcharts highmaps\n */\n connectorShape: 'crookedLine',\n /**\n * The width of the line connecting the data label to the pie slice.\n *\n * In styled mode, the connector stroke width is given in the\n * `.highcharts-data-label-connector` class.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-connectorwidth-disabled/\n * Disable the connector\n * @sample {highcharts} highcharts/css/pie-point/\n * Styled connectors\n *\n * @type {number}\n * @default 1\n * @since 2.1\n * @product highcharts highmaps\n * @apioption plotOptions.pie.dataLabels.connectorWidth\n */\n /**\n * Works only if `connectorShape` is `'crookedLine'`. It defines how\n * far from the vertical plot edge the connector path should be\n * crooked. With the default, `undefined`, the crook is placed so that\n * the horizontal line from the label intersects with the radial line\n * extending through the center of the pie slice.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-crookdistance/\n * crookDistance set to 90%\n *\n * @since 7.0.0\n * @product highcharts highmaps\n */\n crookDistance: void 0,\n /**\n * The distance of the data label from the pie's edge. Negative\n * numbers put the data label on top of the pie slices. Can also be\n * defined as a percentage of pie's radius. Connectors are only\n * shown for data labels outside the pie.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-distance/\n * Data labels on top of the pie\n *\n * @type {number|string}\n * @since 2.1\n * @product highcharts highmaps\n */\n distance: 30,\n enabled: true,\n /**\n * A\n * [format string](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)\n * for the data label. Available variables are the same as for\n * `formatter`.\n *\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-format/\n * Add a unit\n *\n * @type {string}\n * @default undefined\n * @since 3.0\n * @apioption plotOptions.pie.dataLabels.format\n */\n // eslint-disable-next-line valid-jsdoc\n /**\n * Callback JavaScript function to format the data label. Note that\n * if a `format` is defined, the format takes precedence and the\n * formatter is ignored.\n *\n * @type {Highcharts.DataLabelsFormatterCallbackFunction}\n * @default function () { return this.point.isNull ? void 0 : this.point.name; }\n */\n formatter: function () {\n return this.isNull ? void 0 : this.name;\n },\n /**\n * Whether to render the connector as a soft arc or a line with a sharp\n * break. Works only if `connectorShape` equals to `fixedOffset`.\n *\n * @sample {highcharts}\n * highcharts/plotoptions/pie-datalabels-softconnector-true/\n * Soft\n * @sample {highcharts}\n * highcharts/plotoptions/pie-datalabels-softconnector-false/\n * Non soft\n *\n * @since 2.1.7\n * @product highcharts highmaps\n */\n softConnector: true,\n /**\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-overflow\n * Long labels truncated with an ellipsis\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-overflow-wrap\n * Long labels are wrapped\n *\n * @type {Highcharts.CSSObject}\n * @apioption plotOptions.pie.dataLabels.style\n */\n x: 0\n },\n /**\n * If the total sum of the pie's values is 0, the series is represented\n * as an empty circle . The `fillColor` option defines the color of that\n * circle. Use [pie.borderWidth](#plotOptions.pie.borderWidth) to set\n * the border thickness.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-emptyseries/\n * Empty pie series\n *\n * @type {Highcharts.ColorType}\n */\n fillColor: void 0,\n /**\n * The end angle of the pie in degrees where 0 is top and 90 is right.\n * Defaults to `startAngle` plus 360.\n *\n * @sample {highcharts} highcharts/demo/pie-semi-circle/\n * Semi-circle donut\n *\n * @type {number}\n * @since 1.3.6\n * @product highcharts highmaps\n * @apioption plotOptions.pie.endAngle\n */\n /**\n * Thickness describing the ring size for a donut type chart,\n * overriding [innerSize](#plotOptions.pie.innerSize).\n *\n * @type {number}\n * @default undefined\n * @product highcharts\n * @since 10.1.0\n * @apioption plotOptions.pie.thickness\n */\n /**\n * Equivalent to [chart.ignoreHiddenSeries](#chart.ignoreHiddenSeries),\n * this option tells whether the series shall be redrawn as if the\n * hidden point were `null`.\n *\n * The default value changed from `false` to `true` with Highcharts\n * 3.0.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-ignorehiddenpoint/\n * True, the hidden point is ignored\n *\n * @since 2.3.0\n * @product highcharts highmaps\n */\n ignoreHiddenPoint: true,\n /**\n * @default true\n * @extends plotOptions.series.inactiveOtherPoints\n */\n inactiveOtherPoints: true,\n /**\n * The size of the inner diameter for the pie. A size greater than 0\n * renders a donut chart. Can be a percentage or pixel value.\n * Percentages are relative to the pie size. Pixel values are given as\n * integers. Setting overridden by thickness.\n *\n *\n * Note: in Highcharts < 4.1.2, the percentage was relative to the plot\n * area, not the pie size.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-innersize-80px/\n * 80px inner size\n * @sample {highcharts} highcharts/plotoptions/pie-innersize-50percent/\n * 50% of the plot area\n * @sample {highcharts} highcharts/demo/3d-pie-donut/\n * 3D donut\n *\n * @type {number|string}\n * @default 0\n * @since 2.0\n * @product highcharts highmaps\n * @apioption plotOptions.pie.innerSize\n */\n /**\n * @ignore-option\n *\n * @internal\n */\n legendType: 'point',\n /**\n * @ignore-option\n *\n * @internal\n */\n marker: null, // Point options are specified in the base options\n /**\n * The minimum size for a pie in response to auto margins. The pie will\n * try to shrink to make room for data labels in side the plot area,\n * but only to this size.\n *\n * @type {number|string}\n * @default 80\n * @since 3.0\n * @product highcharts highmaps\n * @apioption plotOptions.pie.minSize\n */\n /**\n * The diameter of the pie relative to the plot area. Can be a\n * percentage or pixel value. Pixel values are given as integers. The\n * default behavior (as of 3.0) is to scale to the plot area and give\n * room for data labels within the plot area.\n * [slicedOffset](#plotOptions.pie.slicedOffset) is also included in the\n * default size calculation. As a consequence, the size of the pie may\n * vary when points are updated and data labels more around. In that\n * case it is best to set a fixed value, for example `\"75%\"`.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-size/\n * Smaller pie\n *\n * @type {number|string|null}\n * @product highcharts highmaps\n */\n size: null,\n /**\n * Whether to display this particular series or series type in the\n * legend. Since 2.1, pies are not shown in the legend by default.\n *\n * @sample {highcharts} highcharts/plotoptions/series-showinlegend/\n * One series in the legend, one hidden\n *\n * @product highcharts highmaps\n */\n showInLegend: false,\n /**\n * If a point is sliced, moved out from the center, how many pixels\n * should it be moved?.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-slicedoffset-20/\n * 20px offset\n *\n * @product highcharts highmaps\n */\n slicedOffset: 10,\n /**\n * The start angle of the pie slices in degrees where 0 is top and 90\n * right.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-startangle-90/\n * Start from right\n *\n * @type {number}\n * @default 0\n * @since 2.3.4\n * @product highcharts highmaps\n * @apioption plotOptions.pie.startAngle\n */\n /**\n * Sticky tracking of mouse events. When true, the `mouseOut` event\n * on a series isn't triggered until the mouse moves over another\n * series, or out of the plot area. When false, the `mouseOut` event on\n * a series is triggered when the mouse leaves the area around the\n * series' graph or markers. This also implies the tooltip. When\n * `stickyTracking` is false and `tooltip.shared` is false, the tooltip\n * will be hidden when moving the mouse between series.\n *\n * @product highcharts highmaps\n */\n stickyTracking: false,\n tooltip: {\n followPointer: true\n },\n /**\n * The color of the border surrounding each slice. When `null`, the\n * border takes the same color as the slice fill. This can be used\n * together with a `borderWidth` to fill drawing gaps created by\n * antialiasing artifacts in border-less pies.\n *\n * In styled mode, the border stroke is given in the `.highcharts-point`\n * class.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-bordercolor-black/\n * Black border\n *\n * @type {Highcharts.ColorType}\n * @product highcharts highmaps\n */\n borderColor: 'var(--highcharts-background-color)',\n /**\n * The width of the border surrounding each slice.\n *\n * When setting the border width to 0, there may be small gaps between\n * the slices due to SVG antialiasing artifacts. To work around this,\n * keep the border width at 0.5 or 1, but set the `borderColor` to\n * `null` instead.\n *\n * In styled mode, the border stroke width is given in the\n * `.highcharts-point` class.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-borderwidth/\n * 3px border\n *\n * @product highcharts highmaps\n */\n borderWidth: 1,\n /**\n * @ignore-option\n * @internal\n */\n lineWidth: void 0, // #12222\n states: {\n /**\n * @extends plotOptions.series.states.hover\n * @excluding marker, lineWidth, lineWidthPlus\n * @product highcharts highmaps\n */\n hover: {\n /**\n * How much to brighten the point on interaction.\n *\n * In styled mode, the hover brightness is by default replaced\n * by a fill-opacity given in the `.highcharts-point-hover`\n * class.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-states-hover-brightness/\n * Brightened by 0.5\n *\n * @product highcharts highmaps\n */\n brightness: 0.1\n }\n }\n};\n/**\n * A `pie` series. If the [type](#series.pie.type) option is not specified,\n * it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.pie\n * @excluding cropThreshold, dataParser, dataURL, linkedTo, stack, xAxis, yAxis,\n * dataSorting, step, boostThreshold, boostBlending\n * @product highcharts highmaps\n * @apioption series.pie\n */\n/**\n * An array of data points for the series. For the `pie` series type,\n * points can be given in the following ways:\n *\n * 1. An array of numerical values. In this case, the numerical values will be\n * interpreted as `y` options. Example:\n * ```js\n * data: [0, 5, 3, 5]\n * ```\n *\n * 2. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.pie.turboThreshold),\n * this option is not available.\n * ```js\n * data: [{\n * y: 1,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * y: 7,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * Numerical values\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @basic\n * @type {Array<number|Array<string,(number|null)>|null|*>}\n * @extends series.line.data\n * @excluding marker, x\n * @product highcharts highmaps\n * @apioption series.pie.data\n */\n/**\n * @type {Highcharts.SeriesPieDataLabelsOptionsObject}\n * @product highcharts highmaps\n * @apioption series.pie.data.dataLabels\n */\n/**\n * The sequential index of the data point in the legend.\n *\n * @type {number}\n * @product highcharts highmaps\n * @apioption series.pie.data.legendIndex\n */\n/**\n * Whether to display a slice offset from the center.\n *\n * @sample {highcharts} highcharts/point/sliced/\n * One sliced point\n *\n * @type {boolean}\n * @product highcharts highmaps\n * @apioption series.pie.data.sliced\n */\n/**\n * @extends plotOptions.pie.dataLabels\n * @excluding align, allowOverlap, inside, staggerLines, step\n * @product highcharts highmaps\n * @apioption series.pie.dataLabels\n */\n/**\n * @excluding legendItemClick\n * @product highcharts highmaps\n * @apioption series.pie.events\n */\n''; // Placeholder for transpiled doclets above\n/* *\n *\n * Default Export\n *\n * */\nexport default PieSeriesDefaults;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport CU from '../CenteredUtilities.js';\nconst { getStartAndEndRadians } = CU;\nimport ColumnSeries from '../Column/ColumnSeries.js';\nimport H from '../../Core/Globals.js';\nconst { noop } = H;\nimport PiePoint from './PiePoint.js';\nimport PieSeriesDefaults from './PieSeriesDefaults.js';\nimport Series from '../../Core/Series/Series.js';\nimport SeriesRegistry from '../../Core/Series/SeriesRegistry.js';\nimport Symbols from '../../Core/Renderer/SVG/Symbols.js';\nimport { clamp, extend, fireEvent, merge, pick } from '../../Shared/Utilities.js';\n/* *\n *\n * Class\n *\n * */\n/**\n * Pie series type.\n *\n * @internal\n * @class\n * @name Highcharts.seriesTypes.pie\n *\n * @augments Highcharts.Series\n */\nclass PieSeries extends Series {\n /* *\n *\n * Functions\n *\n * */\n /**\n * Animates the pies in.\n * @internal\n */\n animate(init) {\n const series = this, points = series.points, startAngleRad = series.startAngleRad;\n if (!init) {\n points.forEach(function (point) {\n const graphic = point.graphic, args = point.shapeArgs;\n if (graphic && args) {\n // Start values\n graphic.attr({\n // Animate from inner radius (#779)\n r: pick(point.startR, (series.center && series.center[3] / 2)),\n start: startAngleRad,\n end: startAngleRad\n });\n // Animate\n graphic.animate({\n r: args.r,\n start: args.start,\n end: args.end\n }, series.options.animation);\n }\n });\n }\n }\n /**\n * Called internally to draw auxiliary graph in pie-like series in\n * situation when the default graph is not sufficient enough to present\n * the data well. Auxiliary graph is saved in the same object as\n * regular graph.\n * @internal\n */\n drawEmpty() {\n const start = this.startAngleRad, end = this.endAngleRad, options = this.options;\n let centerX, centerY;\n // Draw auxiliary graph if there're no visible points.\n if (this.total === 0 && this.center) {\n centerX = this.center[0];\n centerY = this.center[1];\n if (!this.graph) {\n this.graph = this.chart.renderer\n .arc(centerX, centerY, this.center[1] / 2, 0, start, end)\n .addClass('highcharts-empty-series')\n .add(this.group);\n }\n this.graph.attr({\n d: Symbols.arc(centerX, centerY, this.center[2] / 2, 0, {\n start,\n end,\n innerR: this.center[3] / 2\n })\n });\n if (!this.chart.styledMode) {\n this.graph.attr({\n 'stroke-width': options.borderWidth,\n fill: options.fillColor || 'none',\n stroke: options.color ||\n 'var(--highcharts-neutral-color-20)'\n });\n }\n }\n else if (this.graph) { // Destroy the graph object.\n this.graph = this.graph.destroy();\n }\n }\n /**\n * Slices in pie chart are initialized in DOM, but it's shapes and\n * animations are normally run in `drawPoints()`.\n * @internal\n */\n drawPoints() {\n const renderer = this.chart.renderer;\n this.points.forEach(function (point) {\n // When updating a series between 2d and 3d or cartesian and\n // polar, the shape type changes.\n if (point.graphic && point.hasNewShapeType()) {\n point.graphic = point.graphic.destroy();\n }\n if (!point.graphic) {\n point.graphic = renderer[point.shapeType](point.shapeArgs)\n .add(point.series.group);\n point.delayedRendering = true;\n }\n });\n }\n /**\n * Extend the generatePoints method by adding total and percentage\n * properties to each point\n * @internal\n */\n generatePoints() {\n super.generatePoints();\n this.updateTotals();\n }\n /**\n * Utility for getting the x value from a given y, used for anti-collision\n * logic in data labels.\n * @internal\n */\n getXPos(y, left, point, dataLabel) {\n const center = this.center, \n // Variable pie has individual radius\n radius = this.radii ?\n this.radii[point.index] || 0 :\n center[2] / 2, labelPosition = dataLabel.dataLabelPosition, distance = labelPosition?.distance || 0;\n const angle = Math.asin(clamp((y - center[1]) / (radius + distance), -1, 1));\n const x = center[0] +\n (left ? -1 : 1) *\n (Math.cos(angle) * (radius + distance)) +\n (distance > 0 ?\n // 5 is the horizontal part pointing out of the label. It\n // used to be the `padding` setting, but that doesn't make\n // sense\n (left ? -5 : 5) :\n 0);\n return x;\n }\n /**\n * Define hasData function for non-cartesian series. Returns true if the\n * series has at least one visible point (#23235)\n * @internal\n */\n hasData() {\n return this.points.some((point) => point.visible);\n }\n /**\n * Draw the data points\n * @internal\n */\n redrawPoints() {\n const series = this, chart = series.chart;\n let groupTranslation, graphic, pointAttr, shapeArgs;\n this.drawEmpty();\n // Apply the drop-shadow to the group because otherwise each element\n // would cast a shadow on others\n if (series.group && !chart.styledMode) {\n series.group.shadow(series.options.shadow);\n }\n // Draw the slices\n series.points.forEach(function (point) {\n const animateTo = {};\n graphic = point.graphic;\n if (!point.isNull && graphic) {\n shapeArgs = point.shapeArgs;\n // If the point is sliced, use special translation, else use\n // plot area translation\n groupTranslation = point.getTranslate();\n if (!chart.styledMode) {\n pointAttr = series.pointAttribs(point, (point.selected && 'select'));\n }\n // Draw the slice\n if (!point.delayedRendering) {\n graphic\n .setRadialReference(series.center);\n if (!chart.styledMode) {\n merge(true, animateTo, pointAttr);\n }\n merge(true, animateTo, shapeArgs, groupTranslation);\n graphic.animate(animateTo);\n }\n else {\n graphic\n .setRadialReference(series.center)\n .attr(shapeArgs)\n .attr(groupTranslation);\n if (!chart.styledMode) {\n graphic\n .attr(pointAttr)\n .attr({ 'stroke-linejoin': 'round' });\n }\n point.delayedRendering = false;\n }\n graphic\n .attr({\n visibility: point.visible ? 'inherit' : 'hidden'\n });\n graphic.addClass(point.getClassName(), true);\n }\n else if (graphic) {\n point.graphic = graphic.destroy();\n }\n });\n }\n /**\n * Utility for sorting data labels.\n * @internal\n */\n sortByAngle(points, sign) {\n points.sort(function (a, b) {\n return ((typeof a.angle !== 'undefined') &&\n (b.angle - a.angle) * sign);\n });\n }\n /**\n * Do translation for pie slices\n * @internal\n */\n translate(positions) {\n fireEvent(this, 'translate');\n this.generatePoints();\n const series = this, options = series.options, slicedOffset = options.slicedOffset, radians = getStartAndEndRadians(options.startAngle, options.endAngle), startAngleRad = series.startAngleRad = radians.start, endAngleRad = series.endAngleRad = radians.end, circ = endAngleRad - startAngleRad, // 2 * Math.PI,\n points = series.points, ignoreHiddenPoint = options.ignoreHiddenPoint, len = points.length;\n let start, end, angle, \n // The x component of the radius vector for a given point\n radiusX, radiusY, i, point, cumulative = 0;\n // Get positions - either an integer or a percentage string must be\n // given. If positions are passed as a parameter, we're in a\n // recursive loop for adjusting space for data labels.\n if (!positions) {\n /**\n * The series center position, read only. This applies only to\n * circular chart types like pie and sunburst. It is an array of\n * `[centerX, centerY, diameter, innerDiameter]`.\n *\n * @name Highcharts.Series#center\n * @type {Array<number>}\n */\n series.center = positions = series.getCenter();\n }\n // Calculate the geometry for each point\n for (i = 0; i < len; i++) {\n point = points[i];\n // Set start and end angle\n start = startAngleRad + (cumulative * circ);\n if (point.isValid() &&\n (!ignoreHiddenPoint || point.visible)) {\n cumulative += point.percentage / 100;\n }\n end = startAngleRad + (cumulative * circ);\n // Set the shape\n const shapeArgs = {\n x: positions[0],\n y: positions[1],\n r: positions[2] / 2,\n innerR: positions[3] / 2,\n start,\n end\n };\n point.shapeType = 'arc';\n point.shapeArgs = shapeArgs;\n // The angle must stay within -90 and 270 (#2645)\n angle = (end + start) / 2;\n if (angle > 1.5 * Math.PI) {\n angle -= 2 * Math.PI;\n }\n else if (angle < -Math.PI / 2) {\n angle += 2 * Math.PI;\n }\n // Center for the sliced out slice\n point.slicedTranslation = {\n translateX: Math.round(Math.cos(angle) * slicedOffset),\n translateY: Math.round(Math.sin(angle) * slicedOffset)\n };\n // Set the anchor point for tooltips\n radiusX = Math.cos(angle) * positions[2] / 2;\n radiusY = Math.sin(angle) * positions[2] / 2;\n point.tooltipPos = [\n positions[0] + radiusX * 0.7,\n positions[1] + radiusY * 0.7\n ];\n point.half = angle < -Math.PI / 2 || angle > Math.PI / 2 ?\n 1 :\n 0;\n point.angle = angle;\n }\n fireEvent(series, 'afterTranslate');\n }\n /**\n * Recompute total chart sum and update percentages of points.\n * @internal\n */\n updateTotals() {\n const points = this.points, len = points.length, ignoreHiddenPoint = this.options.ignoreHiddenPoint;\n let i, point, total = 0;\n // Get the total sum\n for (i = 0; i < len; i++) {\n point = points[i];\n if (point.isValid() &&\n (!ignoreHiddenPoint || point.visible)) {\n total += point.y;\n }\n }\n this.total = total;\n // Set each point's properties\n for (i = 0; i < len; i++) {\n point = points[i];\n point.percentage =\n (total > 0 && (point.visible || !ignoreHiddenPoint)) ?\n point.y / total * 100 :\n 0;\n point.total = total;\n }\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\nPieSeries.defaultOptions = merge(Series.defaultOptions, PieSeriesDefaults);\nextend(PieSeries.prototype, {\n axisTypes: [],\n directTouch: true,\n drawGraph: void 0,\n drawTracker: ColumnSeries.prototype.drawTracker,\n getCenter: CU.getCenter,\n getSymbol: noop,\n invertible: false,\n isCartesian: false,\n noSharedTooltip: true,\n pointAttribs: ColumnSeries.prototype.pointAttribs,\n pointClass: PiePoint,\n requireSorting: false,\n searchPoint: noop,\n trackerGroups: ['group', 'dataLabelsGroup']\n});\nSeriesRegistry.registerSeriesType('pie', PieSeries);\n/* *\n *\n * Default Export\n *\n * */\n/** @internal */\nexport default PieSeries;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport DataLabel from '../../Core/Series/DataLabel.js';\nimport H from '../../Core/Globals.js';\nconst { composed, noop } = H;\nimport R from '../../Core/Renderer/RendererUtilities.js';\nconst { distribute } = R;\nimport SeriesRegistry from '../../Core/Series/SeriesRegistry.js';\nconst { series: Series } = SeriesRegistry;\nimport { arrayMax, clamp, defined, isNumber, pick, pushUnique, relativeLength } from '../../Shared/Utilities.js';\n/* *\n *\n * Composition\n *\n * */\n/** @internal */\nvar ColumnDataLabel;\n(function (ColumnDataLabel) {\n /* *\n *\n * Constants\n *\n * */\n const dataLabelPositioners = {\n // Based on the value computed in Highcharts' distribute algorithm.\n radialDistributionY: function (point, dataLabel) {\n return (dataLabel.dataLabelPosition?.top || 0) +\n point.distributeBox.pos;\n },\n // Get the x - use the natural x position for labels near the top and\n // bottom, to prevent the top and bottom slice connectors from touching\n // each other on either side. Based on the value computed in Highcharts'\n // distribute algorithm.\n radialDistributionX: function (series, point, y, naturalY, dataLabel) {\n const pos = dataLabel.dataLabelPosition;\n return series.getXPos(y < (pos?.top || 0) + 2 || y > (pos?.bottom || 0) - 2 ?\n naturalY :\n y, point.half, point, dataLabel);\n },\n // The dataLabels.distance determines the x position of the label\n justify: function (point, dataLabel, radius, seriesCenter) {\n return seriesCenter[0] + (point.half ? -1 : 1) *\n (radius + (dataLabel.dataLabelPosition?.distance || 0));\n },\n // Left edges of the left-half labels touch the left edge of the plot\n // area. Right edges of the right-half labels touch the right edge of\n // the plot area.\n alignToPlotEdges: function (dataLabel, half, plotWidth, plotLeft) {\n const dataLabelWidth = dataLabel.getBBox().width;\n return half ? dataLabelWidth + plotLeft :\n plotWidth - dataLabelWidth - plotLeft;\n },\n // Connectors of each side end in the same x position. Labels are\n // aligned to them. Left edge of the widest left-half label touches the\n // left edge of the plot area. Right edge of the widest right-half label\n // touches the right edge of the plot area.\n alignToConnectors: function (points, half, plotWidth, plotLeft) {\n let maxDataLabelWidth = 0, dataLabelWidth;\n // Find widest data label\n points.forEach(function (point) {\n dataLabelWidth = point.dataLabel.getBBox().width;\n if (dataLabelWidth > maxDataLabelWidth) {\n maxDataLabelWidth = dataLabelWidth;\n }\n });\n return half ? maxDataLabelWidth + plotLeft :\n plotWidth - maxDataLabelWidth - plotLeft;\n }\n };\n /* *\n *\n * Functions\n *\n * */\n /** @internal */\n function compose(PieSeriesClass) {\n DataLabel.compose(Series);\n if (pushUnique(composed, 'PieDataLabel')) {\n const pieProto = PieSeriesClass.prototype;\n pieProto.dataLabelPositioners = dataLabelPositioners;\n pieProto.alignDataLabel = noop;\n pieProto.drawDataLabels = drawDataLabels;\n pieProto.getDataLabelPosition = getDataLabelPosition;\n pieProto.placeDataLabels = placeDataLabels;\n pieProto.verifyDataLabelOverflow = verifyDataLabelOverflow;\n }\n }\n ColumnDataLabel.compose = compose;\n /** @internal */\n function getDataLabelPosition(point, distance) {\n const halfPI = Math.PI / 2, { start = 0, end = 0 } = point.shapeArgs || {};\n let angle = point.angle || 0;\n // If a large slice is crossing the lowest point, prefer rendering it 45\n // degrees out at either lower right or lower left. That's where there's\n // most likely to be space available and avoid text being truncated\n // (#22100). Technically this logic should also apply to the top point,\n // but that is more of an edge case since the default start angle is at\n // the top.\n if (distance > 0 &&\n // Crossing the bottom\n start < halfPI && end > halfPI &&\n // Angle within the bottom quadrant\n angle > halfPI / 2 && angle < halfPI * 1.5) {\n angle = angle <= halfPI ?\n Math.max(halfPI / 2, (start + halfPI) / 2) :\n Math.min(halfPI * 1.5, (halfPI + end) / 2);\n }\n const { center, options } = this, r = center[2] / 2, cosAngle = Math.cos(angle), sinAngle = Math.sin(angle), x = center[0] + cosAngle * r, y = center[1] + sinAngle * r, finalConnectorOffset = Math.min((options.slicedOffset || 0) + (options.borderWidth || 0), distance / 5); // #1678\n return {\n natural: {\n // Initial position of the data label - it's utilized for\n // finding the final position for the label\n x: x + cosAngle * distance,\n y: y + sinAngle * distance\n },\n computed: {\n // Used for generating connector path - initialized later in\n // drawDataLabels function x: undefined, y: undefined\n },\n // Left - pie on the left side of the data label\n // Right - pie on the right side of the data label\n // Center - data label overlaps the pie\n alignment: distance < 0 ? 'center' : point.half ? 'right' : 'left',\n connectorPosition: {\n angle,\n breakAt: {\n x: x + cosAngle * finalConnectorOffset,\n y: y + sinAngle * finalConnectorOffset\n },\n touchingSliceAt: {\n x,\n y\n }\n },\n distance\n };\n }\n /**\n * Override the base drawDataLabels method by pie specific functionality.\n * @internal\n */\n function drawDataLabels() {\n const series = this, points = series.points, chart = series.chart, plotWidth = chart.plotWidth, plotHeight = chart.plotHeight, plotLeft = chart.plotLeft, maxWidth = Math.round(chart.chartWidth / 3), seriesCenter = series.center, radius = seriesCenter[2] / 2, centerY = seriesCenter[1], halves = [\n [], // Right\n [] // Left\n ], overflow = [0, 0, 0, 0], // Top, right, bottom, left\n dataLabelPositioners = series.dataLabelPositioners;\n let connector, dataLabelWidth, labelHeight, maxLabelDistance = 0;\n // Get out if not enabled\n if (!series.visible || !series.hasDataLabels?.()) {\n return;\n }\n // Reset all labels that have been shortened\n points.forEach((point) => {\n (point.dataLabels || []).forEach((dataLabel) => {\n if (dataLabel.shortened) {\n dataLabel\n .attr({\n width: 'auto'\n }).css({\n width: 'auto',\n textOverflow: 'clip'\n });\n dataLabel.shortened = false;\n }\n });\n });\n // Run parent method\n Series.prototype.drawDataLabels.apply(series);\n points.forEach((point) => {\n (point.dataLabels || []).forEach((dataLabel, i) => {\n const r = seriesCenter[2] / 2, dataLabelOptions = dataLabel.options, distance = relativeLength(dataLabelOptions?.distance || 0, r);\n // Arrange points for collision detection\n if (i === 0) {\n halves[point.half].push(point);\n }\n // Avoid long labels squeezing the pie size too far down\n if (!defined(dataLabelOptions?.style?.width)) {\n if (dataLabel.getBBox().width > maxWidth) {\n dataLabel.css({\n // Use a fraction of the maxWidth to avoid wrapping\n // close to the end of the string.\n width: Math.round(maxWidth * 0.7) + 'px'\n });\n dataLabel.shortened = true;\n }\n }\n dataLabel.dataLabelPosition = this.getDataLabelPosition(point, distance);\n maxLabelDistance = Math.max(maxLabelDistance, distance);\n });\n });\n /* Loop over the points in each half, starting from the top and bottom\n * of the pie to detect overlapping labels.\n */\n halves.forEach((points, halfIdx) => {\n const length = points.length, positions = [];\n let top, bottom, size = 0, distributionLength;\n if (!length) {\n return;\n }\n // Sort by angle\n series.sortByAngle(points, halfIdx - 0.5);\n // Only do anti-collision when we have dataLabels outside the pie\n // and have connectors. (#856)\n if (maxLabelDistance > 0) {\n top = Math.max(0, centerY - radius - maxLabelDistance);\n bottom = Math.min(centerY + radius + maxLabelDistance, chart.plotHeight);\n points.forEach((point) => {\n // Check if specific points' label is outside the pie\n (point.dataLabels || []).forEach((dataLabel) => {\n const labelPosition = dataLabel.dataLabelPosition;\n if (labelPosition &&\n labelPosition.distance > 0) {\n // The point.top depends on point.labelDistance\n // value. Used for calculation of y value in getX\n // method\n labelPosition.top = Math.max(0, centerY - radius - labelPosition.distance);\n labelPosition.bottom = Math.min(centerY + radius + labelPosition.distance, chart.plotHeight);\n size = dataLabel.getBBox().height || 21;\n dataLabel.lineHeight = chart.renderer.fontMetrics(dataLabel.text || dataLabel).h + 2 * dataLabel.padding;\n point.distributeBox = {\n target: ((dataLabel.dataLabelPosition\n ?.natural.y || 0) -\n labelPosition.top +\n dataLabel.lineHeight / 2),\n size,\n rank: point.y\n };\n positions.push(point.distributeBox);\n }\n });\n });\n distributionLength = bottom + size - top;\n distribute(positions, distributionLength, distributionLength / 5);\n // Uncomment this to visualize the boxes\n /*\n points.forEach((point): void => {\n const box = point.distributeBox;\n point.dlBox?.destroy();\n if (box?.pos) {\n point.dlBox = chart.renderer.rect(\n chart.plotLeft + this.center[0] + (\n halfIdx ?\n -this.center[2] / 2 - 100 :\n this.center[2] / 2\n ),\n chart.plotTop + box.pos,\n 100,\n box.size\n )\n .attr({\n stroke: 'silver',\n 'stroke-width': 1\n })\n .add();\n }\n });\n // */\n }\n // Now the used slots are sorted, fill them up sequentially\n points.forEach((point) => {\n (point.dataLabels || []).forEach((dataLabel) => {\n const dataLabelOptions = (dataLabel.options || {}), distributeBox = point.distributeBox, labelPosition = dataLabel.dataLabelPosition, naturalY = labelPosition?.natural.y || 0, connectorPadding = dataLabelOptions\n .connectorPadding || 0, lineHeight = dataLabel.lineHeight || 21, bBox = dataLabel.getBBox(), topOffset = (lineHeight - bBox.height) / 2;\n let x = 0, y = naturalY, visibility = 'inherit';\n if (labelPosition) {\n if (positions &&\n defined(distributeBox) &&\n labelPosition.distance > 0) {\n if (typeof distributeBox.pos === 'undefined') {\n visibility = 'hidden';\n }\n else {\n labelHeight = distributeBox.size;\n // Find label's y position\n y = dataLabelPositioners\n .radialDistributionY(point, dataLabel);\n }\n }\n // Find label's x position. The justify option is\n // undocumented in the API - preserve support for it\n if (dataLabelOptions.justify) {\n x = dataLabelPositioners.justify(point, dataLabel, radius, seriesCenter);\n }\n else {\n switch (dataLabelOptions.alignTo) {\n case 'connectors':\n x = dataLabelPositioners.alignToConnectors(points, halfIdx, plotWidth, plotLeft);\n break;\n case 'plotEdges':\n x = dataLabelPositioners.alignToPlotEdges(dataLabel, halfIdx, plotWidth, plotLeft);\n break;\n default:\n x = dataLabelPositioners.radialDistributionX(series, point, y - topOffset, naturalY, dataLabel);\n }\n }\n // Record the placement and visibility\n labelPosition.attribs = {\n visibility,\n align: labelPosition.alignment\n };\n labelPosition.posAttribs = {\n x: x +\n (dataLabelOptions.x || 0) + // (#12985)\n ({\n left: connectorPadding,\n right: -connectorPadding\n }[labelPosition.alignment] || 0),\n y: y +\n (dataLabelOptions.y || 0) - // (#12985)\n // Vertically center\n lineHeight / 2\n };\n labelPosition.computed.x = x;\n labelPosition.computed.y = y - topOffset;\n // Detect overflowing data labels\n if (pick(dataLabelOptions.crop, true)) {\n dataLabelWidth = dataLabel.getBBox().width;\n let sideOverflow;\n // Overflow left\n if (x - dataLabelWidth < connectorPadding &&\n halfIdx === 1 // Left half\n ) {\n sideOverflow = Math.round(dataLabelWidth - x + connectorPadding);\n overflow[3] = Math.max(sideOverflow, overflow[3]);\n // Overflow right\n }\n else if (x + dataLabelWidth >\n plotWidth - connectorPadding &&\n halfIdx === 0 // Right half\n ) {\n sideOverflow = Math.round(x +\n dataLabelWidth -\n plotWidth +\n connectorPadding);\n overflow[1] = Math.max(sideOverflow, overflow[1]);\n }\n // Overflow top\n if (y - labelHeight / 2 < 0) {\n overflow[0] = Math.max(Math.round(-y + labelHeight / 2), overflow[0]);\n // Overflow left\n }\n else if (y + labelHeight / 2 > plotHeight) {\n overflow[2] = Math.max(Math.round(y + labelHeight / 2 - plotHeight), overflow[2]);\n }\n labelPosition.sideOverflow = sideOverflow;\n }\n }\n }); // For each data label of the point\n }); // For each point\n }); // For each half\n // Do not apply the final placement and draw the connectors until we\n // have verified that labels are not spilling over.\n if (arrayMax(overflow) === 0 ||\n this.verifyDataLabelOverflow(overflow)) {\n // Place the labels in the final position\n this.placeDataLabels();\n this.points.forEach((point) => {\n point.dataLabels?.forEach((dataLabel, i) => {\n // #8864: every connector can have individual options\n const { connectorColor, connectorWidth = 1 } = (dataLabel.options || {}), labelPosition = dataLabel.dataLabelPosition;\n // Draw the connector\n if (isNumber(connectorWidth)) {\n let isNew;\n connector = dataLabel.connector;\n if (labelPosition && labelPosition.distance > 0) {\n isNew = !connector;\n if (!connector) {\n dataLabel.connector = connector = chart.renderer\n .path()\n .addClass('highcharts-data-label-connector ' +\n ' highcharts-color-' +\n point.colorIndex +\n (point.className ?\n ' ' + point.className :\n ''))\n .add(series.dataLabelsGroups?.[i]);\n }\n if (!chart.styledMode) {\n connector.attr({\n 'stroke-width': connectorWidth,\n 'stroke': (connectorColor ||\n point.color ||\n 'var(--highcharts-neutral-color-60)')\n });\n }\n connector[isNew ? 'attr' : 'animate']({\n d: point.getConnectorPath(dataLabel)\n });\n connector.attr({\n visibility: labelPosition.attribs?.visibility\n });\n }\n else if (connector) {\n dataLabel.connector = connector.destroy();\n }\n }\n });\n });\n }\n }\n /**\n * Perform the final placement of the data labels after we have verified\n * that they fall within the plot area.\n * @internal\n */\n function placeDataLabels() {\n this.points.forEach((point) => {\n (point.dataLabels || []).forEach((dataLabel) => {\n const labelPosition = dataLabel.dataLabelPosition;\n if (labelPosition) {\n // Shorten data labels with ellipsis if they still overflow\n // after the pie has reached minSize (#223).\n if (labelPosition.sideOverflow) {\n dataLabel.css({\n width: (Math.max(dataLabel.getBBox().width -\n labelPosition.sideOverflow, 0)) + 'px',\n textOverflow: (dataLabel.options?.style?.textOverflow ||\n 'ellipsis')\n });\n dataLabel.shortened = true;\n }\n dataLabel.attr(labelPosition.attribs);\n dataLabel[dataLabel.moved ? 'animate' : 'attr'](labelPosition.posAttribs);\n dataLabel.moved = true;\n }\n else if (dataLabel) {\n dataLabel.attr({ y: -9999 });\n }\n });\n // Clear for update\n delete point.distributeBox;\n }, this);\n }\n /**\n * Verify whether the data labels are allowed to draw, or we should run more\n * translation and data label positioning to keep them inside the plot area.\n * Returns true when data labels are ready to draw.\n * @internal\n */\n function verifyDataLabelOverflow(overflow) {\n const center = this.center, options = this.options, centerOption = options.center, minSize = options.minSize || 80;\n let newSize = minSize, \n // If a size is set, return true and don't try to shrink the pie\n // to fit the labels.\n ret = options.size !== null;\n if (!ret) {\n // Handle horizontal size and center\n if (centerOption[0] !== null) { // Fixed center\n newSize = Math.max(center[2] -\n Math.max(overflow[1], overflow[3]), minSize);\n }\n else { // Auto center\n newSize = Math.max(\n // Horizontal overflow\n center[2] - overflow[1] - overflow[3], minSize);\n // Horizontal center\n center[0] += (overflow[3] - overflow[1]) / 2;\n }\n // Handle vertical size and center\n if (centerOption[1] !== null) { // Fixed center\n newSize = clamp(newSize, minSize, center[2] - Math.max(overflow[0], overflow[2]));\n }\n else { // Auto center\n newSize = clamp(newSize, minSize, \n // Vertical overflow\n center[2] - overflow[0] - overflow[2]);\n // Vertical center\n center[1] += (overflow[0] - overflow[2]) / 2;\n }\n // If the size must be decreased, we need to run translate and\n // drawDataLabels again\n if (newSize < center[2]) {\n center[2] = newSize;\n center[3] = Math.min(// #3632\n options.thickness ?\n Math.max(0, newSize - options.thickness * 2) :\n Math.max(0, relativeLength(options.innerSize || 0, newSize)), newSize); // #6647\n this.translate(center);\n if (this.drawDataLabels) {\n this.drawDataLabels();\n }\n // Else, return true to indicate that the pie and its labels is\n // within the plot area\n }\n else {\n ret = true;\n }\n }\n return ret;\n }\n})(ColumnDataLabel || (ColumnDataLabel = {}));\n/* *\n *\n * Default Export\n *\n * */\n/** @internal */\nexport default ColumnDataLabel;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\n/* *\n *\n * Namespace\n *\n * */\n/** @internal */\nvar GeometryUtilities;\n(function (GeometryUtilities) {\n /* *\n *\n * Functions\n *\n * */\n /**\n * Calculates the center between a list of points.\n *\n * @internal\n *\n * @param {Array<Highcharts.PositionObject>} points\n * A list of points to calculate the center of.\n *\n * @return {Highcharts.PositionObject}\n * Calculated center\n */\n function getCenterOfPoints(points) {\n const sum = points.reduce((sum, point) => {\n sum.x += point.x;\n sum.y += point.y;\n return sum;\n }, { x: 0, y: 0 });\n return {\n x: sum.x / points.length,\n y: sum.y / points.length\n };\n }\n GeometryUtilities.getCenterOfPoints = getCenterOfPoints;\n /**\n * Calculates the distance between two points based on their x and y\n * coordinates.\n *\n * @internal\n *\n * @param {Highcharts.PositionObject} p1\n * The x and y coordinates of the first point.\n *\n * @param {Highcharts.PositionObject} p2\n * The x and y coordinates of the second point.\n *\n * @return {number}\n * Returns the distance between the points.\n */\n function getDistanceBetweenPoints(p1, p2) {\n return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));\n }\n GeometryUtilities.getDistanceBetweenPoints = getDistanceBetweenPoints;\n /**\n * Calculates the angle between two points.\n * @todo add unit tests.\n * @internal\n * @param {Highcharts.PositionObject} p1 The first point.\n * @param {Highcharts.PositionObject} p2 The second point.\n * @return {number} Returns the angle in radians.\n */\n function getAngleBetweenPoints(p1, p2) {\n return Math.atan2(p2.x - p1.x, p2.y - p1.y);\n }\n GeometryUtilities.getAngleBetweenPoints = getAngleBetweenPoints;\n /**\n * Test for point in polygon. Polygon defined as array of [x,y] points.\n * @internal\n * @param {PositionObject} point The point potentially within a polygon.\n * @param {Array<Array<number>>} polygon The polygon potentially containing the point.\n */\n function pointInPolygon({ x, y }, polygon) {\n const len = polygon.length;\n let i, j, inside = false;\n for (i = 0, j = len - 1; i < len; j = i++) {\n const [x1, y1] = polygon[i], [x2, y2] = polygon[j];\n if (y1 > y !== y2 > y &&\n (x < (x2 - x1) *\n (y - y1) /\n (y2 - y1) +\n x1)) {\n inside = !inside;\n }\n }\n return inside;\n }\n GeometryUtilities.pointInPolygon = pointInPolygon;\n})(GeometryUtilities || (GeometryUtilities = {}));\n/* *\n *\n * Default Export\n *\n * */\n/** @internal */\nexport default GeometryUtilities;\n","/* *\n *\n * Highcharts module to hide overlapping data labels.\n * This module is included in Highcharts.\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport GeometryUtilities from '../Geometry/GeometryUtilities.js';\nconst { pointInPolygon } = GeometryUtilities;\nimport { addEvent, fireEvent, getAlignFactor, objectEach, pick } from '../../Shared/Utilities.js';\n/* *\n *\n * Functions\n *\n * */\n/**\n * Hide overlapping labels. Labels are moved and faded in and out on zoom to\n * provide a smooth visual impression.\n *\n * @internal\n * @function Highcharts.Chart#hideOverlappingLabels\n * @param {Array<Highcharts.SVGElement>} labels\n * Rendered data labels\n */\nfunction chartHideOverlappingLabels(labels) {\n const chart = this, len = labels.length, isIntersectRect = (box1, box2) => !(box2.x >= box1.x + box1.width ||\n box2.x + box2.width <= box1.x ||\n box2.y >= box1.y + box1.height ||\n box2.y + box2.height <= box1.y), isPolygonOverlap = (box1Poly, box2Poly) => {\n for (const p of box1Poly) {\n if (pointInPolygon({ x: p[0], y: p[1] }, box2Poly)) {\n return true;\n }\n }\n return false;\n };\n /**\n * Get the box with its position inside the chart, as opposed to getBBox\n * that only reports the position relative to the parent.\n */\n function getAbsoluteBox(label) {\n if (label && (!label.alignAttr || label.placed)) {\n const padding = label.box ? 0 : (label.padding || 0), pos = label.dataLabelPosition?.posAttribs || // #21725\n label.alignAttr ||\n {\n x: label.attr('x'),\n y: label.attr('y')\n }, { height, polygon, width } = label.getBBox(), alignOffset = getAlignFactor(label.alignValue) * width;\n label.width = width;\n label.height = height;\n return {\n x: pos.x + (label.parentGroup?.translateX || 0) + padding - alignOffset,\n y: pos.y + (label.parentGroup?.translateY || 0) + padding,\n width: width - 2 * padding,\n height: height - 2 * padding,\n polygon\n };\n }\n }\n let label, label1, label2, box1, box2, isLabelAffected = false;\n for (let i = 0; i < len; i++) {\n label = labels[i];\n if (label) {\n // Mark with initial opacity\n label.oldOpacity = label.opacity;\n label.newOpacity = 1;\n label.absoluteBox = getAbsoluteBox(label);\n }\n }\n // Prevent a situation in a gradually rising slope, that each label will\n // hide the previous one because the previous one always has lower rank.\n labels.sort((a, b) => (b?.labelrank || 0) - (a?.labelrank || 0));\n // Detect overlapping labels\n for (let i = 0; i < len; ++i) {\n label1 = labels[i];\n box1 = label1 && label1.absoluteBox;\n const box1Poly = box1?.polygon;\n for (let j = i + 1; j < len; ++j) {\n label2 = labels[j];\n box2 = label2 && label2.absoluteBox;\n let toHide = false;\n if (box1 &&\n box2 &&\n label1 !== label2 && // #6465, polar chart with connectEnds\n label1?.newOpacity !== 0 &&\n label2?.newOpacity !== 0 &&\n // #15863 dataLabels are no longer hidden by translation\n label1?.visibility !== 'hidden' &&\n label2?.visibility !== 'hidden') {\n const box2Poly = box2.polygon;\n // If labels have polygons, only evaluate\n // based on polygons\n if (box1Poly &&\n box2Poly &&\n box1Poly !== box2Poly) {\n if (isPolygonOverlap(box1Poly, box2Poly)) {\n toHide = true;\n }\n // If there are no polygons, evaluate rectangles colliding\n }\n else if (isIntersectRect(box1, box2)) {\n toHide = true;\n }\n if (toHide) {\n const overlappingLabel = (label1?.labelrank < label2?.labelrank ?\n label1 :\n label2), labelText = overlappingLabel?.text;\n if (overlappingLabel) {\n overlappingLabel.newOpacity = 0;\n }\n if (labelText?.element.querySelector('textPath')) {\n labelText.hide();\n }\n }\n }\n }\n }\n // Hide or show\n for (const label of labels) {\n if (label && hideOrShow(label, chart)) {\n isLabelAffected = true;\n }\n }\n if (isLabelAffected) {\n fireEvent(chart, 'afterHideAllOverlappingLabels');\n }\n}\n/** @internal */\nexport function composeOverlappingDataLabels(ChartClass) {\n const chartProto = ChartClass.prototype;\n if (!chartProto.hideOverlappingLabels) {\n chartProto.hideOverlappingLabels = chartHideOverlappingLabels;\n addEvent(ChartClass, 'render', onChartRender);\n }\n}\n/**\n * Hide or show labels based on opacity.\n *\n * @internal\n * @function hideOrShow\n * @param {Highcharts.SVGElement} label\n * The label.\n * @param {Highcharts.Chart} chart\n * The chart that contains the label.\n * @return {boolean}\n * Whether label is affected\n */\nfunction hideOrShow(label, chart) {\n let complete, newOpacity, isLabelAffected = false;\n if (label) {\n newOpacity = label.newOpacity;\n if (label.oldOpacity !== newOpacity) {\n // Toggle data labels\n if (label.hasClass('highcharts-data-label')) {\n // Make sure the label is completely hidden to avoid catching\n // clicks (#4362)\n label[newOpacity ? 'removeClass' : 'addClass']('highcharts-data-label-hidden');\n complete = function () {\n if (!chart.styledMode) {\n label.css({\n pointerEvents: newOpacity ? 'auto' : 'none'\n });\n }\n };\n isLabelAffected = true;\n // Animate or set the opacity\n label[label.isOld || label.placed ? 'animate' : 'attr']({ opacity: newOpacity }, void 0, complete);\n fireEvent(chart, 'afterHideOverlappingLabel');\n // Toggle other labels, tick labels\n }\n else {\n label.attr({\n opacity: newOpacity\n });\n }\n }\n label.isOld = true;\n }\n return isLabelAffected;\n}\n/**\n * Collect potential overlapping data labels. Stack labels probably don't need\n * to be considered because they are usually accompanied by data labels that lie\n * inside the columns.\n * @internal\n */\nfunction onChartRender() {\n const chart = this;\n let labels = [];\n // Consider external label collectors\n for (const collector of (chart.labelCollectors || [])) {\n labels = labels.concat(collector());\n }\n for (const yAxis of (chart.yAxis || [])) {\n if (yAxis.stacking &&\n yAxis.options.stackLabels &&\n !yAxis.options.stackLabels.allowOverlap) {\n objectEach(yAxis.stacking.stacks, (stack) => {\n objectEach(stack, (stackItem) => {\n if (stackItem.label) {\n labels.push(stackItem.label);\n }\n });\n });\n }\n }\n for (const series of (chart.series || [])) {\n if (series.visible && series.hasDataLabels?.()) { // #3866\n const push = (points) => {\n for (const point of points) {\n if (point.visible) {\n (point.dataLabels || []).forEach((label) => {\n const options = label.options || {};\n label.labelrank = pick(options.labelrank, point.labelrank, point.shapeArgs?.height); // #4118\n // #21725: Sync target positions for generic overlap\n // checking. During animations (e.g., toggling a\n // point), DOM positions may overlap. We force\n // alignAttr to the final target coordinates so\n // getAbsoluteBox() evaluates the final resting\n // positions.\n /*\n // Commented out because it caused initial overlap\n // in the highcharts/demo/pie-semi-circle sample.\n const pos = label.dataLabelPosition?.posAttribs;\n if (pos) {\n label.alignAttr = label.alignAttr || {};\n label.alignAttr.x = pos.x;\n label.alignAttr.y = pos.y;\n }\n */\n // Allow overlap if the option is explicitly true\n if (\n // #13449\n options.allowOverlap ??\n // Pie labels outside have a separate placement\n // logic, skip the overlap logic\n (series.is('pie') &&\n Number(options.distance) > 0)) {\n label.oldOpacity = label.opacity;\n label.newOpacity = 1;\n hideOrShow(label, chart);\n // Do not allow overlap\n }\n else {\n labels.push(label);\n }\n });\n }\n }\n };\n push(series.nodes || []);\n push(series.points);\n }\n }\n this.hideOverlappingLabels(labels);\n}\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport { diffObjects, extend, find, merge, pick } from '../Shared/Utilities.js';\nimport { uniqueKey } from './Utilities.js';\n/* *\n *\n * Composition\n *\n * */\nvar Responsive;\n(function (Responsive) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /** @internal */\n function compose(ChartClass) {\n const chartProto = ChartClass.prototype;\n if (!chartProto.matchResponsiveRule) {\n extend(chartProto, {\n matchResponsiveRule,\n setResponsive\n });\n }\n return ChartClass;\n }\n Responsive.compose = compose;\n /**\n * Handle a single responsiveness rule.\n *\n * @internal\n * @function Highcharts.Chart#matchResponsiveRule\n * @param {Highcharts.ResponsiveRulesOptions} rule\n * @param {Array<string>} matches\n */\n function matchResponsiveRule(rule, matches) {\n const condition = rule.condition, fn = condition.callback || function () {\n return (this.chartWidth <= pick(condition.maxWidth, Number.MAX_VALUE) &&\n this.chartHeight <= pick(condition.maxHeight, Number.MAX_VALUE) &&\n this.chartWidth >= pick(condition.minWidth, 0) &&\n this.chartHeight >= pick(condition.minHeight, 0));\n };\n if (fn.call(this, this)) {\n matches.push(rule._id);\n }\n }\n /**\n * Update the chart based on the current chart/document size and options\n * for responsiveness.\n *\n * @internal\n * @function Highcharts.Chart#setResponsive\n * @param {boolean} [redraw=true]\n * @param {boolean} [reset=false]\n * Reset by un-applying all rules. Chart.update resets all rules before\n * applying updated options.\n */\n function setResponsive(redraw, reset) {\n const options = this.options.responsive, currentResponsive = this.currentResponsive;\n let ruleIds = [], undoOptions;\n if (!reset && options && options.rules) {\n options.rules.forEach((rule) => {\n if (typeof rule._id === 'undefined') {\n rule._id = uniqueKey();\n }\n this.matchResponsiveRule(rule, ruleIds /* , redraw */);\n }, this);\n }\n // Merge matching rules\n const mergedOptions = merge(...ruleIds\n .map((ruleId) => find(options?.rules || [], (rule) => (rule._id === ruleId)))\n .map((rule) => rule?.chartOptions));\n mergedOptions.isResponsiveOptions = true;\n // Stringified key for the rules that currently apply.\n ruleIds = (ruleIds.toString() || void 0);\n const currentRuleIds = currentResponsive?.ruleIds;\n // Changes in what rules apply\n if (ruleIds !== currentRuleIds) {\n // Undo previous rules. Before we apply a new set of rules, we\n // need to roll back completely to base options (#6291).\n if (currentResponsive) {\n this.currentResponsive = void 0;\n this.updatingResponsive = true;\n this.update(currentResponsive.undoOptions, redraw, true);\n this.updatingResponsive = false;\n }\n if (ruleIds) {\n // Get undo-options for matching rules. The `undoOptions``\n // hold the current values before they are changed by the\n // `mergedOptions`.\n undoOptions = diffObjects(mergedOptions, this.options, true, this.collectionsWithUpdate);\n undoOptions.isResponsiveOptions = true;\n this.currentResponsive = {\n ruleIds: ruleIds,\n mergedOptions: mergedOptions,\n undoOptions: undoOptions\n };\n if (!this.updatingResponsive) {\n this.update(mergedOptions, redraw, true);\n }\n }\n else {\n this.currentResponsive = void 0;\n }\n }\n }\n})(Responsive || (Responsive = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default Responsive;\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * A callback function to gain complete control on when the responsive rule\n * applies.\n *\n * @callback Highcharts.ResponsiveCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * Chart context.\n *\n * @param {Highcharts.Chart} [ctx]\n * Since v12.6.0, the chart context passed as an extra argument for arrow\n * functions.\n *\n * @return {boolean}\n * Return `true` if it applies.\n */\n(''); // Keeps doclets above in JS file\n/* *\n *\n * API Options\n *\n * */\n/**\n * Allows setting a set of rules to apply for different screen or chart\n * sizes. Each rule specifies additional chart options.\n *\n * @sample {highstock} stock/demo/responsive/\n * Stock chart\n * @sample highcharts/responsive/axis/\n * Axis\n * @sample highcharts/responsive/legend/\n * Legend\n * @sample highcharts/responsive/classname/\n * Class name\n *\n * @since 5.0.0\n * @apioption responsive\n */\n/**\n * A set of rules for responsive settings. The rules are executed from\n * the top down.\n *\n * @sample {highcharts} highcharts/responsive/axis/\n * Axis changes\n * @sample {highstock} highcharts/responsive/axis/\n * Axis changes\n * @sample {highmaps} highcharts/responsive/axis/\n * Axis changes\n *\n * @type {Array<*>}\n * @since 5.0.0\n * @apioption responsive.rules\n */\n/**\n * A full set of chart options to apply as overrides to the general\n * chart options. The chart options are applied when the given rule\n * is active.\n *\n * A special case is configuration objects that take arrays, for example\n * [xAxis](#xAxis), [yAxis](#yAxis) or [series](#series). For these\n * collections, an `id` option is used to map the new option set to\n * an existing object. If an existing object of the same id is not found,\n * the item of the same index updated. So for example, setting `chartOptions`\n * with two series items without an `id`, will cause the existing chart's\n * two series to be updated with respective options.\n *\n * @sample {highstock} stock/demo/responsive/\n * Stock chart\n * @sample highcharts/responsive/axis/\n * Axis\n * @sample highcharts/responsive/legend/\n * Legend\n * @sample highcharts/responsive/classname/\n * Class name\n *\n * @type {Highcharts.Options}\n * @since 5.0.0\n * @apioption responsive.rules.chartOptions\n */\n/**\n * Under which conditions the rule applies.\n *\n * @since 5.0.0\n * @apioption responsive.rules.condition\n */\n/**\n * A callback function to gain complete control on when the responsive\n * rule applies. Return `true` if it applies. This opens for checking\n * against other metrics than the chart size, for example the document\n * size or other elements. Since v12.6.0, the callback also receives `ctx`\n * as the first argument, so that arrow functions can access the same\n * context as regular functions using `this`.\n *\n * @type {Highcharts.ResponsiveCallbackFunction}\n * @since 5.0.0\n * @context Highcharts.Chart\n * @apioption responsive.rules.condition.callback\n */\n/**\n * The responsive rule applies if the chart height is less than this.\n *\n * @type {number}\n * @since 5.0.0\n * @apioption responsive.rules.condition.maxHeight\n */\n/**\n * The responsive rule applies if the chart width is less than this.\n *\n * @sample highcharts/responsive/axis/\n * Max width is 500\n *\n * @type {number}\n * @since 5.0.0\n * @apioption responsive.rules.condition.maxWidth\n */\n/**\n * The responsive rule applies if the chart height is greater than this.\n *\n * @type {number}\n * @default 0\n * @since 5.0.0\n * @apioption responsive.rules.condition.minHeight\n */\n/**\n * The responsive rule applies if the chart width is greater than this.\n *\n * @type {number}\n * @default 0\n * @since 5.0.0\n * @apioption responsive.rules.condition.minWidth\n */\n(''); // Keeps doclets above in JS file\n","// SPDX-License-Identifier: LicenseRef-Highcharts\n/**\n * @license Highcharts JS v13.0.0 (2026-06-11)\n * @module highcharts/highcharts\n *\n * (c) 2009-2026 Highsoft AS\n *\n * A commercial license may be required depending on use,\n * see www.highcharts.com/license\n */\n'use strict';\nimport Highcharts from '../Core/Globals.js';\nimport Defaults from '../Core/Defaults.js';\nimport Fx from '../Core/Animation/Fx.js';\nimport Animation from '../Core/Animation/AnimationUtilities.js';\nimport AST from '../Core/Renderer/HTML/AST.js';\nimport Templating from '../Core/Templating.js';\nimport RendererUtilities from '../Core/Renderer/RendererUtilities.js';\nimport SVGElement from '../Core/Renderer/SVG/SVGElement.js';\nimport SVGRenderer from '../Core/Renderer/SVG/SVGRenderer.js';\nimport HTMLElement from '../Core/Renderer/HTML/HTMLElement.js';\nimport Axis from '../Core/Axis/Axis.js';\nimport DateTimeAxis from '../Core/Axis/DateTimeAxis.js';\nimport LogarithmicAxis from '../Core/Axis/LogarithmicAxis.js';\nimport PlotLineOrBand from '../Core/Axis/PlotLineOrBand/PlotLineOrBand.js';\nimport Tick from '../Core/Axis/Tick.js';\nimport Tooltip from '../Core/Tooltip.js';\nimport Point from '../Core/Series/Point.js';\nimport Pointer from '../Core/Pointer.js';\nimport Legend from '../Core/Legend/Legend.js';\nimport LegendSymbol from '../Core/Legend/LegendSymbol.js';\nimport Chart from '../Core/Chart/Chart.js';\nimport { ScrollablePlotArea } from '../Extensions/ScrollablePlotArea.js';\nimport StackingAxis from '../Core/Axis/Stacking/StackingAxis.js';\nimport StackItem from '../Core/Axis/Stacking/StackItem.js';\nimport DataTableCore from '../Data/DataTableCore.js';\nimport Series from '../Core/Series/Series.js';\nimport SeriesRegistry from '../Core/Series/SeriesRegistry.js';\nimport '../Series/Line/LineSeries.js';\nimport '../Series/Area/AreaSeries.js';\nimport '../Series/Spline/SplineSeries.js';\nimport '../Series/AreaSpline/AreaSplineSeries.js';\nimport '../Series/Column/ColumnSeries.js';\nimport ColumnDataLabel from '../Series/Column/ColumnDataLabel.js';\nimport '../Series/Bar/BarSeries.js';\nimport '../Series/Scatter/ScatterSeries.js';\nimport '../Series/Pie/PieSeries.js';\nimport PieDataLabel from '../Series/Pie/PieDataLabel.js';\nimport DataLabel from '../Core/Series/DataLabel.js';\nimport { composeOverlappingDataLabels } from '../Core/Series/OverlappingDataLabels.js';\nimport { composeBorderRadius } from '../Extensions/BorderRadius.js';\nimport Responsive from '../Core/Responsive.js';\nimport Color from '../Core/Color/Color.js';\nimport Time from '../Core/Time.js';\nimport { addEvent, arrayMax, arrayMin, attr, clamp, correctFloat, createElement, crisp, css, defined, destroyObjectProperties, diffObjects, discardElement, erase, extend, extendClass, find, fireEvent, getMagnitude, getAlignFactor, getClosestDistance, getNestedProperty, getStyle, isArray, isClass, isDOMElement, isFunction, isNumber, isObject, isString, internalClearTimeout, merge, normalizeTickInterval, objectEach, offset, pad, pick, pushUnique, pInt, relativeLength, removeEvent, replaceNested, splat, stableSort, syncTimeout, ucfirst, wrap } from '../Shared/Utilities.js';\nimport { error, insertItem, timeUnits, uniqueKey, useSerialIds } from '../Core/Utilities.js';\nconst G = Highcharts;\n// Classes\nG.AST = AST;\nG.Axis = Axis;\nG.Chart = Chart;\nG.Color = Color;\nG.DataLabel = DataLabel;\nG.DataTable = DataTableCore;\nG.DataTableCore = DataTableCore;\nG.Fx = Fx;\nG.HTMLElement = HTMLElement;\nG.Legend = Legend;\nG.LegendSymbol = LegendSymbol;\nG.PlotLineOrBand = PlotLineOrBand;\nG.Point = Point;\nG.Pointer = Pointer;\nG.Series = Series;\nG.SeriesRegistry = SeriesRegistry;\nG.StackItem = StackItem;\nG.SVGElement = SVGElement;\nG.SVGRenderer = SVGRenderer;\nG.Templating = Templating;\nG.Tick = Tick;\nG.Time = Time;\nG.Tooltip = Tooltip;\n// Utilities\nG.addEvent = addEvent;\nG.animObject = Animation.animObject;\nG.animate = Animation.animate;\nG.arrayMax = arrayMax;\nG.arrayMin = arrayMin;\nG.attr = attr;\nG.chart = Chart.chart;\nG.clamp = clamp;\nG.color = Color.parse;\nG.correctFloat = correctFloat;\nG.createElement = createElement;\nG.css = css;\nG.crisp = crisp;\nG.dateFormat = Templating.dateFormat;\nG.defaultOptions = Defaults.defaultOptions;\nG.defined = defined;\nG.destroyObjectProperties = destroyObjectProperties;\nG.diffObjects = diffObjects;\nG.discardElement = discardElement;\nG.distribute = RendererUtilities.distribute;\nG.erase = erase;\nG.error = error;\nG.extend = extend;\nG.extendClass = extendClass;\nG.find = find;\nG.fireEvent = fireEvent;\nG.format = Templating.format;\nG.getAlignFactor = getAlignFactor;\nG.getClosestDistance = getClosestDistance;\nG.getDeferredAnimation = Animation.getDeferredAnimation;\nG.getMagnitude = getMagnitude;\nG.getNestedProperty = getNestedProperty;\nG.getOptions = Defaults.getOptions;\nG.getStyle = getStyle;\nG.insertItem = insertItem;\nG.isArray = isArray;\nG.isClass = isClass;\nG.isDOMElement = isDOMElement;\nG.isFunction = isFunction;\nG.isNumber = isNumber;\nG.isObject = isObject;\nG.isString = isString;\nG.internalClearTimeout = internalClearTimeout;\nG.merge = merge;\nG.normalizeTickInterval = normalizeTickInterval;\nG.numberFormat = Templating.numberFormat;\nG.objectEach = objectEach;\nG.offset = offset;\nG.pad = pad;\nG.pick = pick;\nG.pushUnique = pushUnique;\nG.pInt = pInt;\nG.relativeLength = relativeLength;\nG.removeEvent = removeEvent;\nG.replaceNested = replaceNested;\nG.seriesType = SeriesRegistry.seriesType;\nG.setAnimation = Animation.setAnimation;\nG.setOptions = Defaults.setOptions;\nG.splat = splat;\nG.stableSort = stableSort;\nG.stop = Animation.stop;\nG.syncTimeout = syncTimeout;\nG.time = Defaults.defaultTime;\nG.ucfirst = ucfirst;\nG.timers = Fx.timers;\nG.timeUnits = timeUnits;\nG.uniqueKey = uniqueKey;\nG.useSerialIds = useSerialIds;\nG.wrap = wrap;\n// Compositions\ncomposeBorderRadius(G.Series, G.SVGElement, G.SVGRenderer);\nColumnDataLabel.compose(G.Series.types.column);\nDataLabel.compose(G.Series);\nDateTimeAxis.compose(G.Axis);\nHTMLElement.compose(G.SVGRenderer);\nLegend.compose(G.Chart);\nLogarithmicAxis.compose(G.Axis);\ncomposeOverlappingDataLabels(G.Chart);\nPieDataLabel.compose(G.Series.types.pie);\nPlotLineOrBand.compose(G.Chart, G.Axis);\nPointer.compose(G.Chart);\nResponsive.compose(G.Chart);\nScrollablePlotArea.compose(G.Axis, G.Chart, G.Series);\nStackingAxis.compose(G.Axis, G.Chart, G.Series);\nTooltip.compose(G.Pointer);\n// Default Export\nexport default G;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n *\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n * Dynamic light/dark theme based on CSS variables\n *\n *\n * */\n'use strict';\nimport Chart from '../../Core/Chart/Chart.js';\nimport D from '../../Core/Defaults.js';\nimport { addEvent } from '../../Shared/Utilities.js';\nconst { setOptions } = D;\n/* *\n *\n * Theme\n *\n * */\n/**\n * The color variable names and values are copied from highcharts.css\n */\nconst defaultRules = `\n /* Colors for data series and points */\n --highcharts-color-0: #2caffe;\n --highcharts-color-1: #544fc5;\n --highcharts-color-2: #00e272;\n --highcharts-color-3: #fe6a35;\n --highcharts-color-4: #6b8abc;\n --highcharts-color-5: #d568fb;\n --highcharts-color-6: #2ee0ca;\n --highcharts-color-7: #fa4b42;\n --highcharts-color-8: #feb56a;\n --highcharts-color-9: #91e8e1;\n\n /* Chart background, point stroke for markers and columns etc */\n --highcharts-background-color: #ffffff;\n\n /*\n Neutral colors, grayscale by default. The default colors are defined by\n mixing the background-color with neutral, with a weight corresponding to\n the number in the name.\n\n https://www.highcharts.com/samples/highcharts/css/palette-helper\n */\n\n /* Strong text. */\n --highcharts-neutral-color-100: #000000;\n\n /* Main text, axis labels and some strokes. */\n --highcharts-neutral-color-80: #333333;\n\n /* Axis title, connector fallback. */\n --highcharts-neutral-color-60: #666666;\n\n /* Credits text, export menu stroke. */\n --highcharts-neutral-color-40: #999999;\n\n /* Disabled texts, button strokes, crosshair etc. */\n --highcharts-neutral-color-20: #cccccc;\n\n /* Grid lines etc. */\n --highcharts-neutral-color-10: #e6e6e6;\n\n /* Minor grid lines etc. */\n --highcharts-neutral-color-5: #f2f2f2;\n\n /* Tooltip background, button fills, map null points. */\n --highcharts-neutral-color-3: #f7f7f7;\n\n /*\n Highlights, shades of blue by default\n */\n\n /* Drilldown clickable labels, color axis max color. */\n --highcharts-highlight-color-100: #0022ff;\n\n /* Selection marker, menu hover, button hover, chart border, navigator\n series. */\n --highcharts-highlight-color-80: #334eff;\n\n /* Navigator mask fill. */\n --highcharts-highlight-color-60: #667aff;\n\n /* Ticks and axis line. */\n --highcharts-highlight-color-20: #ccd3ff;\n\n /* Pressed button, color axis min color. */\n --highcharts-highlight-color-10: #e6e9ff;\n\n /* Indicators */\n --highcharts-positive-color: #06b535;\n --highcharts-negative-color: #f21313;\n\n /* Transparent colors for annotations */\n --highcharts-annotation-color-0: rgba(130, 170, 255, 0.4);\n --highcharts-annotation-color-1: rgba(139, 191, 216, 0.4);\n --highcharts-annotation-color-2: rgba(150, 216, 192, 0.4);\n --highcharts-annotation-color-3: rgba(156, 229, 161, 0.4);\n --highcharts-annotation-color-4: rgba(162, 241, 130, 0.4);\n --highcharts-annotation-color-5: rgba(169, 255, 101, 0.4);\n`;\nconst darkRules = `\n /* Colors for data series and points */\n --highcharts-color-1: #00e272;\n --highcharts-color-2: #efdf00;\n\n /* UI colors */\n --highcharts-background-color: #141414;\n\n /*\n Neutral color variations\n https://www.highcharts.com/samples/highcharts/css/palette-helper\n */\n --highcharts-neutral-color-100: #ffffff;\n --highcharts-neutral-color-80: #d0d0d0;\n --highcharts-neutral-color-60: #a1a1a1;\n --highcharts-neutral-color-40: #727272;\n --highcharts-neutral-color-20: #434343;\n --highcharts-neutral-color-10: #2c2c2c;\n --highcharts-neutral-color-5: #202020;\n --highcharts-neutral-color-3: #1b1b1b;\n\n /* Highlight color variations */\n --highcharts-highlight-color-100: #2caffe;\n --highcharts-highlight-color-80: #2790cf;\n --highcharts-highlight-color-60: #2271a0;\n --highcharts-highlight-color-20: #193343;\n --highcharts-highlight-color-10: #16242b;\n`;\nconst styleSheet = `\n:root,\n.highcharts-light {\n ${defaultRules}\n}\n\n@media (prefers-color-scheme: dark) {\n :root {\n ${darkRules}\n }\n}\n\n.highcharts-dark {\n ${darkRules}\n}\n\n.highcharts-container {\n color-scheme: light dark;\n}\n\n.highcharts-light .highcharts-container {\n color-scheme: light;\n}\n\n.highcharts-dark .highcharts-container {\n color-scheme: dark;\n}\n`;\nvar DynamicDefaultTheme;\n(function (DynamicDefaultTheme) {\n /* *\n *\n * Constants\n *\n * */\n /**\n * The options are generated using the highcharts/css/palette-helper\n * sample\n */\n DynamicDefaultTheme.options = {\n colors: [\n 'var(--highcharts-color-0)',\n 'var(--highcharts-color-1)',\n 'var(--highcharts-color-2)',\n 'var(--highcharts-color-3)',\n 'var(--highcharts-color-4)',\n 'var(--highcharts-color-5)',\n 'var(--highcharts-color-6)',\n 'var(--highcharts-color-7)',\n 'var(--highcharts-color-8)',\n 'var(--highcharts-color-9)'\n ],\n global: {\n buttonTheme: {\n fill: 'var(--highcharts-neutral-color-3)',\n stroke: 'var(--highcharts-neutral-color-20)',\n style: {\n color: 'var(--highcharts-neutral-color-80)'\n },\n states: {\n hover: {\n fill: 'var(--highcharts-neutral-color-10)'\n },\n select: {\n fill: 'var(--highcharts-highlight-color-10)',\n style: {\n color: 'var(--highcharts-neutral-color-100)'\n }\n },\n disabled: {\n style: {\n color: 'var(--highcharts-neutral-color-20)'\n }\n }\n }\n }\n },\n chart: {\n borderColor: 'var(--highcharts-highlight-color-80)',\n backgroundColor: 'var(--highcharts-background-color)',\n plotBorderColor: 'var(--highcharts-neutral-color-20)'\n },\n title: {\n style: {\n color: 'var(--highcharts-neutral-color-80)'\n }\n },\n subtitle: {\n style: {\n color: 'var(--highcharts-neutral-color-60)'\n }\n },\n caption: {\n style: {\n color: 'var(--highcharts-neutral-color-60)'\n }\n },\n plotOptions: {\n line: {\n marker: {\n lineColor: 'var(--highcharts-background-color)',\n states: {\n select: {\n fillColor: 'var(--highcharts-neutral-color-20)',\n lineColor: 'var(--highcharts-neutral-color-100)'\n }\n }\n }\n },\n area: {\n marker: {\n lineColor: 'var(--highcharts-background-color)',\n states: {\n select: {\n fillColor: 'var(--highcharts-neutral-color-20)',\n lineColor: 'var(--highcharts-neutral-color-100)'\n }\n }\n }\n },\n spline: {\n marker: {\n lineColor: 'var(--highcharts-background-color)',\n states: {\n select: {\n fillColor: 'var(--highcharts-neutral-color-20)',\n lineColor: 'var(--highcharts-neutral-color-100)'\n }\n }\n }\n },\n areaspline: {\n marker: {\n lineColor: 'var(--highcharts-background-color)',\n states: {\n select: {\n fillColor: 'var(--highcharts-neutral-color-20)',\n lineColor: 'var(--highcharts-neutral-color-100)'\n }\n }\n }\n },\n column: {\n states: {\n select: {\n color: 'var(--highcharts-neutral-color-20)',\n borderColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n borderColor: 'var(--highcharts-background-color)'\n },\n bar: {\n states: {\n select: {\n color: 'var(--highcharts-neutral-color-20)',\n borderColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n borderColor: 'var(--highcharts-background-color)'\n },\n scatter: {\n marker: {\n lineColor: 'var(--highcharts-background-color)',\n states: {\n select: {\n fillColor: 'var(--highcharts-neutral-color-20)',\n lineColor: 'var(--highcharts-neutral-color-100)'\n }\n }\n }\n },\n pie: {\n borderColor: 'var(--highcharts-background-color)'\n },\n hlc: {\n states: {\n select: {\n color: 'var(--highcharts-neutral-color-20)',\n borderColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n borderColor: 'var(--highcharts-background-color)'\n },\n ohlc: {\n states: {\n select: {\n color: 'var(--highcharts-neutral-color-20)',\n borderColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n borderColor: 'var(--highcharts-background-color)'\n },\n candlestick: {\n states: {\n select: {\n color: 'var(--highcharts-neutral-color-20)',\n borderColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n borderColor: 'var(--highcharts-background-color)',\n lineColor: 'var(--highcharts-neutral-color-100)',\n upColor: 'var(--highcharts-background-color)'\n },\n flags: {\n states: {\n hover: {\n lineColor: 'var(--highcharts-neutral-color-100)',\n fillColor: 'var(--highcharts-highlight-color-20)'\n },\n select: {\n color: 'var(--highcharts-neutral-color-20)',\n borderColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n borderColor: 'var(--highcharts-background-color)',\n fillColor: 'var(--highcharts-background-color)',\n style: {\n color: 'var(--highcharts-neutral-color-100)'\n }\n },\n arearange: {\n marker: {\n lineColor: 'var(--highcharts-background-color)',\n states: {\n select: {\n fillColor: 'var(--highcharts-neutral-color-20)',\n lineColor: 'var(--highcharts-neutral-color-100)'\n }\n }\n }\n },\n areasplinerange: {\n marker: {\n lineColor: 'var(--highcharts-background-color)',\n states: {\n select: {\n fillColor: 'var(--highcharts-neutral-color-20)',\n lineColor: 'var(--highcharts-neutral-color-100)'\n }\n }\n }\n },\n boxplot: {\n states: {\n select: {\n color: 'var(--highcharts-neutral-color-20)',\n borderColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n borderColor: 'var(--highcharts-background-color)',\n fillColor: 'var(--highcharts-background-color)'\n },\n bubble: {\n marker: {\n states: {\n select: {\n fillColor: 'var(--highcharts-neutral-color-20)',\n lineColor: 'var(--highcharts-neutral-color-100)'\n }\n }\n }\n },\n columnrange: {\n states: {\n select: {\n color: 'var(--highcharts-neutral-color-20)',\n borderColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n borderColor: 'var(--highcharts-background-color)'\n },\n columnpyramid: {\n states: {\n select: {\n color: 'var(--highcharts-neutral-color-20)',\n borderColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n borderColor: 'var(--highcharts-background-color)'\n },\n errorbar: {\n states: {\n select: {\n color: 'var(--highcharts-neutral-color-20)',\n borderColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n borderColor: 'var(--highcharts-background-color)',\n fillColor: 'var(--highcharts-background-color)',\n color: 'var(--highcharts-neutral-color-100)'\n },\n gauge: {\n marker: {\n lineColor: 'var(--highcharts-background-color)',\n states: {\n select: {\n fillColor: 'var(--highcharts-neutral-color-20)',\n lineColor: 'var(--highcharts-neutral-color-100)'\n }\n }\n },\n dataLabels: {\n borderColor: 'var(--highcharts-neutral-color-20)'\n },\n dial: {\n backgroundColor: 'var(--highcharts-neutral-color-100)',\n borderColor: 'var(--highcharts-neutral-color-20)'\n },\n pivot: {\n borderColor: 'var(--highcharts-neutral-color-100)',\n backgroundColor: 'var(--highcharts-background-color)'\n }\n },\n packedbubble: {\n marker: {\n states: {\n select: {\n fillColor: 'var(--highcharts-neutral-color-20)',\n lineColor: 'var(--highcharts-neutral-color-100)'\n }\n }\n }\n },\n polygon: {\n marker: {\n lineColor: 'var(--highcharts-background-color)',\n states: {\n select: {\n fillColor: 'var(--highcharts-neutral-color-20)',\n lineColor: 'var(--highcharts-neutral-color-100)'\n }\n }\n }\n },\n waterfall: {\n states: {\n select: {\n color: 'var(--highcharts-neutral-color-20)',\n borderColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n borderColor: 'var(--highcharts-neutral-color-80)',\n lineColor: 'var(--highcharts-neutral-color-80)'\n },\n scatter3d: {\n marker: {\n lineColor: 'var(--highcharts-background-color)',\n states: {\n select: {\n fillColor: 'var(--highcharts-neutral-color-20)',\n lineColor: 'var(--highcharts-neutral-color-100)'\n }\n }\n }\n },\n map: {\n states: {\n hover: {\n borderColor: 'var(--highcharts-neutral-color-60)'\n },\n select: {\n color: 'var(--highcharts-neutral-color-20)'\n }\n },\n nullColor: 'var(--highcharts-neutral-color-3)',\n borderColor: 'var(--highcharts-neutral-color-10)'\n },\n mapline: {\n states: {\n hover: {\n borderColor: 'var(--highcharts-neutral-color-60)'\n },\n select: {\n color: 'var(--highcharts-neutral-color-20)'\n }\n },\n nullColor: 'var(--highcharts-neutral-color-3)',\n borderColor: 'var(--highcharts-neutral-color-10)'\n },\n mappoint: {\n marker: {\n lineColor: 'var(--highcharts-background-color)',\n states: {\n select: {\n fillColor: 'var(--highcharts-neutral-color-20)',\n lineColor: 'var(--highcharts-neutral-color-100)'\n }\n }\n },\n dataLabels: {\n style: {\n color: 'var(--highcharts-neutral-color-100)'\n }\n }\n },\n mapbubble: {\n marker: {\n states: {\n select: {\n fillColor: 'var(--highcharts-neutral-color-20)',\n lineColor: 'var(--highcharts-neutral-color-100)'\n }\n }\n }\n },\n heatmap: {\n marker: {\n states: {\n select: {\n fillColor: 'var(--highcharts-neutral-color-20)',\n lineColor: 'var(--highcharts-neutral-color-100)'\n }\n }\n },\n nullColor: 'var(--highcharts-neutral-color-3)'\n },\n xrange: {\n states: {\n select: {\n color: 'var(--highcharts-neutral-color-20)',\n borderColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n borderColor: 'var(--highcharts-background-color)'\n },\n gantt: {\n states: {\n select: {\n color: 'var(--highcharts-neutral-color-20)',\n borderColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n borderColor: 'var(--highcharts-background-color)'\n },\n sankey: {\n states: {\n select: {\n color: 'var(--highcharts-neutral-color-20)',\n borderColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n borderColor: 'var(--highcharts-background-color)'\n },\n dependencywheel: {\n states: {\n select: {\n color: 'var(--highcharts-neutral-color-20)',\n borderColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n borderColor: 'var(--highcharts-background-color)'\n },\n funnel: {\n states: {\n select: {\n color: 'var(--highcharts-neutral-color-20)',\n borderColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n borderColor: 'var(--highcharts-background-color)'\n },\n pyramid: {\n states: {\n select: {\n color: 'var(--highcharts-neutral-color-20)',\n borderColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n borderColor: 'var(--highcharts-background-color)'\n },\n histogram: {\n states: {\n select: {\n color: 'var(--highcharts-neutral-color-20)',\n borderColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n borderColor: 'var(--highcharts-background-color)'\n },\n bellcurve: {\n marker: {\n lineColor: 'var(--highcharts-background-color)',\n states: {\n select: {\n fillColor: 'var(--highcharts-neutral-color-20)',\n lineColor: 'var(--highcharts-neutral-color-100)'\n }\n }\n }\n },\n item: {\n marker: {\n lineColor: 'var(--highcharts-background-color)',\n states: {\n select: {\n fillColor: 'var(--highcharts-neutral-color-20)',\n lineColor: 'var(--highcharts-neutral-color-100)'\n }\n }\n },\n borderColor: 'var(--highcharts-background-color)'\n },\n organization: {\n states: {\n select: {\n color: 'var(--highcharts-neutral-color-20)',\n borderColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n borderColor: 'var(--highcharts-neutral-color-60)',\n link: {\n color: 'var(--highcharts-neutral-color-60)'\n }\n },\n solidgauge: {\n marker: {\n lineColor: 'var(--highcharts-background-color)',\n states: {\n select: {\n fillColor: 'var(--highcharts-neutral-color-20)',\n lineColor: 'var(--highcharts-neutral-color-100)'\n }\n }\n },\n dataLabels: {\n borderColor: 'var(--highcharts-neutral-color-20)'\n },\n dial: {\n backgroundColor: 'var(--highcharts-neutral-color-100)',\n borderColor: 'var(--highcharts-neutral-color-20)'\n },\n pivot: {\n borderColor: 'var(--highcharts-neutral-color-20)',\n backgroundColor: 'var(--highcharts-neutral-color-100)'\n }\n },\n timeline: {\n marker: {\n lineColor: 'var(--highcharts-background-color)',\n states: {\n select: {\n fillColor: 'var(--highcharts-neutral-color-20)',\n lineColor: 'var(--highcharts-neutral-color-100)'\n }\n }\n },\n dataLabels: {\n backgroundColor: 'var(--highcharts-background-color)',\n borderColor: 'var(--highcharts-neutral-color-40)',\n color: 'var(--highcharts-neutral-color-80)'\n }\n },\n treemap: {\n states: {\n hover: {\n borderColor: 'var(--highcharts-neutral-color-40)'\n }\n },\n borderColor: 'var(--highcharts-neutral-color-10)'\n },\n sunburst: {\n states: {\n hover: {\n borderColor: 'var(--highcharts-neutral-color-40)'\n }\n },\n borderColor: 'var(--highcharts-neutral-color-10)'\n },\n treegraph: {\n states: {\n hover: {\n borderColor: 'var(--highcharts-neutral-color-40)'\n }\n },\n borderColor: 'var(--highcharts-neutral-color-10)',\n link: {\n color: 'var(--highcharts-neutral-color-60)'\n }\n }\n },\n legend: {\n borderColor: 'var(--highcharts-neutral-color-40)',\n navigation: {\n activeColor: 'var(--highcharts-highlight-color-100)',\n inactiveColor: 'var(--highcharts-neutral-color-20)'\n },\n itemStyle: {\n color: 'var(--highcharts-neutral-color-80)'\n },\n itemHoverStyle: {\n color: 'var(--highcharts-neutral-color-100)'\n },\n itemHiddenStyle: {\n color: 'var(--highcharts-neutral-color-60)'\n },\n title: {\n style: {\n color: 'var(--highcharts-neutral-color-80)'\n }\n },\n bubbleLegend: {\n labels: {\n style: {\n color: 'var(--highcharts-neutral-color-100)'\n }\n }\n }\n },\n loading: {\n style: {\n backgroundColor: 'var(--highcharts-background-color)'\n }\n },\n tooltip: {\n backgroundColor: 'var(--highcharts-background-color)',\n style: {\n color: 'var(--highcharts-neutral-color-80)'\n }\n },\n credits: {\n style: {\n color: 'var(--highcharts-neutral-color-40)'\n }\n },\n xAxis: {\n labels: {\n style: {\n color: 'var(--highcharts-neutral-color-80)'\n }\n },\n title: {\n style: {\n color: 'var(--highcharts-neutral-color-60)'\n }\n },\n minorGridLineColor: 'var(--highcharts-neutral-color-5)',\n minorTickColor: 'var(--highcharts-neutral-color-40)',\n lineColor: 'var(--highcharts-neutral-color-80)',\n gridLineColor: 'var(--highcharts-neutral-color-10)',\n tickColor: 'var(--highcharts-neutral-color-80)',\n grid: {\n borderColor: 'var(--highcharts-neutral-color-20)'\n }\n },\n yAxis: {\n labels: {\n style: {\n color: 'var(--highcharts-neutral-color-80)'\n }\n },\n title: {\n style: {\n color: 'var(--highcharts-neutral-color-60)'\n }\n },\n minorGridLineColor: 'var(--highcharts-neutral-color-5)',\n minorTickColor: 'var(--highcharts-neutral-color-40)',\n lineColor: 'var(--highcharts-neutral-color-80)',\n gridLineColor: 'var(--highcharts-neutral-color-10)',\n tickColor: 'var(--highcharts-neutral-color-80)',\n stackLabels: {\n style: {\n color: 'var(--highcharts-neutral-color-100)'\n }\n },\n grid: {\n borderColor: 'var(--highcharts-neutral-color-20)'\n }\n },\n navigator: {\n handles: {\n backgroundColor: 'var(--highcharts-neutral-color-5)',\n borderColor: 'var(--highcharts-neutral-color-40)'\n },\n outlineColor: 'var(--highcharts-neutral-color-40)',\n xAxis: {\n gridLineColor: 'var(--highcharts-neutral-color-10)',\n labels: {\n style: {\n color: 'var(--highcharts-neutral-color-100)'\n }\n }\n }\n },\n rangeSelector: {\n inputStyle: {\n color: 'var(--highcharts-highlight-color-80)'\n },\n labelStyle: {\n color: 'var(--highcharts-neutral-color-60)'\n }\n },\n scrollbar: {\n barBackgroundColor: 'var(--highcharts-neutral-color-20)',\n barBorderColor: 'var(--highcharts-neutral-color-20)',\n buttonArrowColor: 'var(--highcharts-neutral-color-80)',\n buttonBackgroundColor: 'var(--highcharts-neutral-color-10)',\n buttonBorderColor: 'var(--highcharts-neutral-color-20)',\n trackBorderColor: 'var(--highcharts-neutral-color-20)'\n },\n pane: {\n background: {\n borderColor: 'var(--highcharts-neutral-color-20)',\n backgroundColor: 'var(--highcharts-neutral-color-5)'\n }\n },\n zAxis: {\n labels: {\n style: {\n color: 'var(--highcharts-neutral-color-80)'\n }\n },\n title: {\n style: {\n color: 'var(--highcharts-neutral-color-60)'\n }\n },\n minorGridLineColor: 'var(--highcharts-neutral-color-5)',\n minorTickColor: 'var(--highcharts-neutral-color-40)',\n lineColor: 'var(--highcharts-neutral-color-80)',\n gridLineColor: 'var(--highcharts-neutral-color-10)',\n tickColor: 'var(--highcharts-neutral-color-80)'\n },\n colorAxis: {\n labels: {\n style: {\n color: 'var(--highcharts-neutral-color-80)'\n }\n },\n title: {\n style: {\n color: 'var(--highcharts-neutral-color-60)'\n }\n },\n minorGridLineColor: 'var(--highcharts-neutral-color-5)',\n minorTickColor: 'var(--highcharts-neutral-color-40)',\n lineColor: 'var(--highcharts-neutral-color-80)',\n gridLineColor: 'var(--highcharts-background-color)',\n tickColor: 'var(--highcharts-neutral-color-80)',\n marker: {\n color: 'var(--highcharts-neutral-color-40)'\n },\n minColor: 'var(--highcharts-highlight-color-10)',\n maxColor: 'var(--highcharts-highlight-color-100)'\n },\n mapNavigation: {\n buttonOptions: {\n style: {\n color: 'var(--highcharts-neutral-color-60)'\n },\n theme: {\n fill: 'var(--highcharts-background-color)',\n stroke: 'var(--highcharts-neutral-color-10)'\n }\n }\n },\n accessibility: {\n keyboardNavigation: {\n focusBorder: {\n style: {\n color: 'var(--highcharts-highlight-color-80)'\n }\n }\n }\n },\n drilldown: {\n activeAxisLabelStyle: {\n color: 'var(--highcharts-highlight-color-100)'\n },\n activeDataLabelStyle: {\n color: 'var(--highcharts-highlight-color-100)'\n }\n },\n annotations: {\n labelOptions: {\n borderColor: 'var(--highcharts-neutral-color-100)',\n backgroundColor: 'color-mix(in srgb, ' +\n 'var(--highcharts-neutral-color-100) 75%, transparent)'\n },\n controlPointOptions: {\n style: {\n fill: 'var(--highcharts-background-color)',\n stroke: 'var(--highcharts-neutral-color-100)'\n }\n },\n types: {\n elliottWave: {\n labelOptions: {\n style: {\n color: 'var(--highcharts-neutral-color-60)'\n }\n }\n },\n fibonacci: {\n typeOptions: {\n lineColor: 'var(--highcharts-neutral-color-40)'\n },\n labelOptions: {\n style: {\n color: 'var(--highcharts-neutral-color-60)'\n }\n }\n },\n fibonacciTimeZones: {\n typeOptions: {\n line: {\n stroke: 'var(--highcharts-neutral-color-80)'\n }\n }\n },\n verticalLine: {\n labelOptions: {\n style: {\n color: 'var(--highcharts-neutral-color-60)'\n }\n }\n },\n measure: {\n typeOptions: {\n label: {\n style: {\n color: 'var(--highcharts-neutral-color-60)'\n }\n }\n }\n }\n },\n shapeOptions: {\n fill: 'color-mix(in srgb, ' +\n 'var(--highcharts-neutral-color-100) 75%, transparent)',\n stroke: 'color-mix(in srgb, ' +\n 'var(--highcharts-neutral-color-100) 75%, transparent)'\n }\n },\n navigation: {\n buttonOptions: {\n symbolFill: 'var(--highcharts-neutral-color-60)',\n symbolStroke: 'var(--highcharts-neutral-color-60)',\n theme: {\n fill: 'var(--highcharts-background-color)'\n }\n },\n menuStyle: {\n background: 'var(--highcharts-background-color)'\n },\n menuItemStyle: {\n color: 'var(--highcharts-neutral-color-80)'\n },\n menuItemHoverStyle: {\n background: 'var(--highcharts-neutral-color-5)'\n }\n }\n };\n /* *\n *\n * Functions\n *\n * */\n /**\n * Apply the theme.\n */\n function apply() {\n // Add a style sheet\n const style = document.createElement('style');\n style.nonce = 'highcharts';\n style.innerText = styleSheet;\n style.id = 'highcharts-adaptive-theme';\n document.getElementsByTagName('head')[0].appendChild(style);\n // Apply the theme\n setOptions(DynamicDefaultTheme.options);\n // Copy it over to the shadow DOM of each chart (#23967)\n addEvent(Chart, 'afterGetContainer', function () {\n const shadowRoot = this.container\n .getRootNode().host?.shadowRoot;\n if (shadowRoot &&\n !shadowRoot.getElementById('highcharts-adaptive-theme')) {\n const adaptiveStyle = style.cloneNode(true);\n shadowRoot.appendChild(adaptiveStyle);\n }\n });\n }\n DynamicDefaultTheme.apply = apply;\n})(DynamicDefaultTheme || (DynamicDefaultTheme = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default DynamicDefaultTheme;\n","// SPDX-License-Identifier: LicenseRef-Highcharts\n/**\n * @license Highcharts JS v13.0.0 (2026-06-11)\n * @module highcharts/themes/adaptive\n * @requires highcharts\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * A commercial license may be required depending on use,\n * see www.highcharts.com/license\n */\n'use strict';\nimport H from '../../Core/Globals.js';\nimport Adaptive from '../../Extensions/Themes/Adaptive.js';\nH.theme = Adaptive.options;\nAdaptive.apply();\nexport default H;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Utility functions for accessibility module.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport H from '../../Core/Globals.js';\nimport { css } from '../../Shared/Utilities.js';\nconst { doc, win } = H;\n/* *\n *\n * Constants\n *\n * */\nconst simulatedEventTarget = win.EventTarget && new win.EventTarget() || 'none';\n/* *\n *\n * Functions\n *\n * */\n/**\n * @private\n * @param {Highcharts.HTMLDOMElement} el\n * @param {string} className\n * @return {void}\n */\nfunction addClass(el, className) {\n if (el.classList) {\n el.classList.add(className);\n }\n else if (el.className.indexOf(className) < 0) {\n // Note: Dumb check for class name exists, should be fine for practical\n // use cases, but will return false positives if the element has a class\n // that contains the className.\n el.className += ' ' + className;\n }\n}\n/**\n * @private\n * @param {Highcharts.HTMLDOMElement} el\n * @param {string} className\n * @return {void}\n */\nfunction removeClass(el, className) {\n if (el.classList) {\n el.classList.remove(className);\n }\n else {\n // Note: Dumb logic that will break if the element has a class name that\n // consists of className plus something else.\n el.className = el.className.replace(new RegExp(className, 'g'), '');\n }\n}\n/**\n * Utility function to clone a mouse event for re-dispatching.\n * @private\n */\nfunction cloneMouseEvent(e) {\n if (typeof win.MouseEvent === 'function') {\n return new win.MouseEvent(e.type, e);\n }\n // No MouseEvent support, try using initMouseEvent\n if (doc?.createEvent) {\n const evt = doc.createEvent('MouseEvent');\n if (evt.initMouseEvent) {\n evt.initMouseEvent(e.type, e.bubbles, // #10561, #12161\n e.cancelable, e.view || win, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);\n return evt;\n }\n }\n return getFakeMouseEvent(e.type);\n}\n/**\n * Utility function to clone a touch event for re-dispatching.\n * @private\n */\nfunction cloneTouchEvent(e) {\n const touchListToTouchArray = (l) => {\n const touchArray = [];\n for (let i = 0; i < l.length; ++i) {\n const item = l.item(i);\n if (item) {\n touchArray.push(item);\n }\n }\n return touchArray;\n };\n if (typeof win.TouchEvent === 'function') {\n const newEvent = new win.TouchEvent(e.type, {\n touches: touchListToTouchArray(e.touches),\n targetTouches: touchListToTouchArray(e.targetTouches),\n changedTouches: touchListToTouchArray(e.changedTouches),\n ctrlKey: e.ctrlKey,\n shiftKey: e.shiftKey,\n altKey: e.altKey,\n metaKey: e.metaKey,\n bubbles: e.bubbles,\n cancelable: e.cancelable,\n composed: e.composed,\n detail: e.detail,\n view: e.view\n });\n if (e.defaultPrevented) {\n newEvent.preventDefault();\n }\n return newEvent;\n }\n const fakeEvt = cloneMouseEvent(e);\n fakeEvt.touches = e.touches;\n fakeEvt.changedTouches = e.changedTouches;\n fakeEvt.targetTouches = e.targetTouches;\n return fakeEvt;\n}\n/**\n * @private\n */\nfunction escapeStringForHTML(str) {\n return str\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n .replace(/\"/g, '&quot;')\n .replace(/'/g, '&#x27;')\n .replace(/\\//g, '&#x2F;');\n}\n/**\n * Get an element by ID\n * @private\n */\nfunction getElement(id) {\n return doc.getElementById(id);\n}\n/**\n * Get a fake mouse event of a given type. If relatedTarget is not given,\n * it will point to simulatedEventTarget, as an indicator that the event\n * is fake.\n * @private\n */\nfunction getFakeMouseEvent(type, position, relatedTarget) {\n const pos = position || {\n x: 0,\n y: 0\n };\n if (typeof win.MouseEvent === 'function') {\n return new win.MouseEvent(type, {\n bubbles: true,\n cancelable: true,\n composed: true,\n button: 0,\n buttons: 1,\n relatedTarget: relatedTarget || simulatedEventTarget,\n view: win,\n detail: type === 'click' ? 1 : 0,\n screenX: pos.x,\n screenY: pos.y,\n clientX: pos.x,\n clientY: pos.y\n });\n }\n // No MouseEvent support, try using initMouseEvent\n if (doc?.createEvent) {\n const evt = doc.createEvent('MouseEvent');\n if (evt.initMouseEvent) {\n evt.initMouseEvent(type, true, // Bubble\n true, // Cancel\n win, // View\n type === 'click' ? 1 : 0, // Detail\n // Coords\n pos.x, pos.y, pos.x, pos.y, \n // Pressed keys\n false, false, false, false, 0, // Button\n null // Related target\n );\n return evt;\n }\n }\n return { type: type };\n}\n/**\n * Get an appropriate heading level for an element. Corresponds to the\n * heading level below the previous heading in the DOM.\n *\n * Note: Only detects previous headings in the DOM that are siblings,\n * ancestors, or previous siblings of ancestors. Headings that are nested below\n * siblings of ancestors (cousins et.al) are not picked up. This is because it\n * is ambiguous whether or not the nesting is for layout purposes or indicates a\n * separate section.\n *\n * @private\n * @param {Highcharts.HTMLDOMElement} [element]\n * @return {string} The heading tag name (h1, h2 etc).\n * If no nearest heading is found, \"p\" is returned.\n */\nfunction getHeadingTagNameForElement(element) {\n const getIncreasedHeadingLevel = (tagName) => {\n const headingLevel = parseInt(tagName.slice(1), 10), newLevel = Math.min(6, headingLevel + 1);\n return 'h' + newLevel;\n };\n const isHeading = (tagName) => /^H[1-6]$/i.test(tagName);\n const getPreviousSiblingsHeading = (el) => {\n let sibling = el;\n while (sibling = sibling.previousSibling) { // eslint-disable-line\n const tagName = sibling.tagName || '';\n if (isHeading(tagName)) {\n return tagName;\n }\n }\n return '';\n };\n const getHeadingRecursive = (el) => {\n const prevSiblingsHeading = getPreviousSiblingsHeading(el);\n if (prevSiblingsHeading) {\n return getIncreasedHeadingLevel(prevSiblingsHeading);\n }\n // No previous siblings are headings, try parent node\n const parent = el.parentElement;\n if (!parent) {\n return 'h6';\n }\n const parentTagName = parent.tagName;\n if (isHeading(parentTagName)) {\n return getIncreasedHeadingLevel(parentTagName);\n }\n return getHeadingRecursive(parent);\n };\n return getHeadingRecursive(element);\n}\n/**\n * Remove an element from the DOM.\n * @private\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} [element]\n * @return {void}\n */\nfunction removeElement(element) {\n if (element && element.parentNode) {\n element.parentNode.removeChild(element);\n }\n}\n/**\n * Remove all child nodes from an element.\n * @private\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} [element]\n * @return {void}\n */\nfunction removeChildNodes(element) {\n while (element.lastChild) {\n element.removeChild(element.lastChild);\n }\n}\n/**\n * Utility function. Reverses child nodes of a DOM element.\n * @private\n */\nfunction reverseChildNodes(node) {\n let i = node.childNodes.length;\n while (i--) {\n node.appendChild(node.childNodes[i]);\n }\n}\n/**\n * Used for aria-label attributes, painting on a canvas will fail if the\n * text contains tags.\n * @private\n */\nfunction stripHTMLTagsFromString(str, isForExport = false) {\n return (typeof str === 'string') ?\n (isForExport ?\n str.replace(/<\\/?[^>]+(>|$)/g, '') :\n str.replace(/<\\/?(?!\\s)[^>]+(>|$)/g, '')) : str;\n}\n/**\n * Utility function for hiding an element visually, but still keeping it\n * available to screen reader users.\n * @private\n */\nfunction visuallyHideElement(element) {\n css(element, {\n position: 'absolute',\n width: '1px',\n height: '1px',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n clip: 'rect(1px, 1px, 1px, 1px)',\n marginTop: '-3px',\n '-ms-filter': 'progid:DXImageTransform.Microsoft.Alpha(Opacity=1)',\n filter: 'alpha(opacity=1)',\n opacity: 0.01\n });\n}\n/* *\n *\n * Default Export\n *\n * */\nconst HTMLUtilities = {\n addClass,\n cloneMouseEvent,\n cloneTouchEvent,\n escapeStringForHTML,\n getElement,\n getFakeMouseEvent,\n getHeadingTagNameForElement,\n removeChildNodes,\n removeClass,\n removeElement,\n reverseChildNodes,\n simulatedEventTarget,\n stripHTMLTagsFromString,\n visuallyHideElement\n};\nexport default HTMLUtilities;\n","/* *\n *\n * Accessibility module - internationalization support\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport F from '../Core/Templating.js';\nconst { format } = F;\nimport { getNestedProperty, pick } from '../Shared/Utilities.js';\n/* *\n *\n * Composition\n *\n * */\nvar A11yI18nComposition;\n(function (A11yI18nComposition) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * @private\n */\n function compose(ChartClass) {\n const chartProto = ChartClass.prototype;\n if (!chartProto.langFormat) {\n chartProto.langFormat = langFormat;\n }\n }\n A11yI18nComposition.compose = compose;\n /**\n * I18n utility function. Format a single array or plural statement in a\n * format string. If the statement is not an array or plural statement,\n * returns the statement within brackets. Invalid array statements return\n * an empty string.\n *\n * @private\n * @function formatExtendedStatement\n * @param {string} statement\n * @param {Highcharts.Dictionary<*>} ctx\n * Context to apply to the format string.\n */\n function formatExtendedStatement(statement, ctx) {\n const eachStart = statement.indexOf('#each('), pluralStart = statement.indexOf('#plural('), indexStart = statement.indexOf('['), indexEnd = statement.indexOf(']');\n let arr, result;\n // Dealing with an each-function?\n if (eachStart > -1) {\n const eachEnd = statement.slice(eachStart).indexOf(')') + eachStart, preEach = statement.substring(0, eachStart), postEach = statement.substring(eachEnd + 1), eachStatement = statement.substring(eachStart + 6, eachEnd), eachArguments = eachStatement.split(',');\n let lenArg = Number(eachArguments[1]), len;\n result = '';\n arr = getNestedProperty(eachArguments[0], ctx);\n if (arr) {\n lenArg = isNaN(lenArg) ? arr.length : lenArg;\n len = lenArg < 0 ?\n arr.length + lenArg :\n Math.min(lenArg, arr.length); // Overshoot\n // Run through the array for the specified length\n for (let i = 0; i < len; ++i) {\n result += preEach + arr[i] + postEach;\n }\n }\n return result.length ? result : '';\n }\n // Dealing with a plural-function?\n if (pluralStart > -1) {\n const pluralEnd = (statement.slice(pluralStart).indexOf(')') + pluralStart), pluralStatement = statement.substring(pluralStart + 8, pluralEnd), pluralArguments = pluralStatement.split(','), num = Number(getNestedProperty(pluralArguments[0], ctx));\n switch (num) {\n case 0:\n result = pick(pluralArguments[4], pluralArguments[1]);\n break;\n case 1:\n result = pick(pluralArguments[2], pluralArguments[1]);\n break;\n case 2:\n result = pick(pluralArguments[3], pluralArguments[1]);\n break;\n default:\n result = pluralArguments[1];\n }\n return result ? stringTrim(result) : '';\n }\n // Array index\n if (indexStart > -1) {\n const arrayName = statement.substring(0, indexStart), ix = Number(statement.substring(indexStart + 1, indexEnd));\n let val;\n arr = getNestedProperty(arrayName, ctx);\n if (!isNaN(ix) && arr) {\n if (ix < 0) {\n val = arr[arr.length + ix];\n // Handle negative overshoot\n if (typeof val === 'undefined') {\n val = arr[0];\n }\n }\n else {\n val = arr[ix];\n // Handle positive overshoot\n if (typeof val === 'undefined') {\n val = arr[arr.length - 1];\n }\n }\n }\n return typeof val !== 'undefined' ? val : '';\n }\n // Standard substitution, delegate to format or similar\n return '{' + statement + '}';\n }\n /* eslint-disable max-len */\n /**\n * i18n formatting function. Extends Highcharts.format() functionality by\n * also handling arrays and plural conditionals. Arrays can be indexed as\n * follows:\n *\n * - Format: 'This is the first index: {myArray[0]}. The last: {myArray[-1]}.'\n *\n * - Context: { myArray: [0, 1, 2, 3, 4, 5] }\n *\n * - Result: 'This is the first index: 0. The last: 5.'\n *\n *\n * They can also be iterated using the #each() function. This will repeat\n * the contents of the bracket expression for each element. Example:\n *\n * - Format: 'List contains: {#each(myArray)cm }'\n *\n * - Context: { myArray: [0, 1, 2] }\n *\n * - Result: 'List contains: 0cm 1cm 2cm '\n *\n *\n * The #each() function optionally takes a length parameter. If positive,\n * this parameter specifies the max number of elements to iterate through.\n * If negative, the function will subtract the number from the length of the\n * array. Use this to stop iterating before the array ends. Example:\n *\n * - Format: 'List contains: {#each(myArray, -1), }and {myArray[-1]}.'\n *\n * - Context: { myArray: [0, 1, 2, 3] }\n *\n * - Result: 'List contains: 0, 1, 2, and 3.'\n *\n *\n * Use the #plural() function to pick a string depending on whether or not a\n * context object is 1. Arguments are #plural(obj, plural, singular).\n * Example:\n *\n * - Format: 'Has {numPoints} {#plural(numPoints, points, point}.'\n *\n * - Context: { numPoints: 5 }\n *\n * - Result: 'Has 5 points.'\n *\n *\n * Optionally there are additional parameters for dual and none:\n * #plural(obj, plural, singular, dual, none). Example:\n *\n * - Format: 'Has {#plural(numPoints, many points, one point, two points,\n * none}.'\n *\n * - Context: { numPoints: 2 }\n *\n * - Result: 'Has two points.'\n *\n *\n * The dual or none parameters will take precedence if they are supplied.\n *\n * @requires modules/accessibility\n *\n * @function Highcharts.i18nFormat\n *\n * @param {string} formatString\n * The string to format.\n *\n * @param {Highcharts.Dictionary<*>} context\n * Context to apply to the format string.\n *\n * @param {Highcharts.Chart} chart\n * A `Chart` instance with a time object and numberFormatter, passed on to\n * format().\n *\n * @deprecated 11.1.0\n *\n * @return {string}\n * The formatted string.\n */\n function i18nFormat(formatString, context, chart) {\n const getFirstBracketStatement = (sourceStr, offset) => {\n const str = sourceStr.slice(offset || 0), startBracket = str.indexOf('{'), endBracket = str.indexOf('}');\n if (startBracket > -1 && endBracket > startBracket) {\n return {\n statement: str.substring(startBracket + 1, endBracket),\n begin: offset + startBracket + 1,\n end: offset + endBracket\n };\n }\n }, tokens = [];\n let bracketRes, constRes, cursor = 0;\n // Tokenize format string into bracket statements and constants\n do {\n bracketRes = getFirstBracketStatement(formatString, cursor);\n constRes = formatString.substring(cursor, bracketRes && bracketRes.begin - 1);\n // If we have constant content before this bracket statement, add it\n if (constRes.length) {\n tokens.push({\n value: constRes,\n type: 'constant'\n });\n }\n // Add the bracket statement\n if (bracketRes) {\n tokens.push({\n value: bracketRes.statement,\n type: 'statement'\n });\n }\n cursor = bracketRes ? bracketRes.end + 1 : cursor + 1;\n } while (bracketRes);\n // Perform the formatting. The formatArrayStatement function returns\n // the statement in brackets if it is not an array statement, which\n // means it gets picked up by format below.\n tokens.forEach((token) => {\n if (token.type === 'statement') {\n token.value = formatExtendedStatement(token.value, context);\n }\n });\n // Join string back together and pass to format to pick up non-array\n // statements.\n return format(tokens.reduce((acc, cur) => acc + cur.value, ''), context, chart);\n }\n A11yI18nComposition.i18nFormat = i18nFormat;\n /* eslint-enable max-len */\n /**\n * Apply context to a format string from lang options of the chart.\n *\n * @requires modules/accessibility\n *\n * @function Highcharts.Chart#langFormat\n *\n * @param {string} langKey\n * Key (using dot notation) into lang option structure.\n *\n * @param {Highcharts.Dictionary<*>} context\n * Context to apply to the format string.\n *\n * @return {string}\n * The formatted string.\n */\n function langFormat(langKey, context) {\n const keys = langKey.split('.');\n let formatString = this.options.lang, i = 0;\n for (; i < keys.length; ++i) {\n formatString = formatString && formatString[keys[i]];\n }\n return typeof formatString === 'string' ?\n i18nFormat(formatString, context, this) : '';\n }\n /**\n * @private\n * @function stringTrim\n *\n * @param {string} str\n * The input string\n *\n * @return {string}\n * The trimmed string\n */\n function stringTrim(str) {\n return str.trim && str.trim() || str.replace(/^\\s+|\\s+$/g, '');\n }\n})(A11yI18nComposition || (A11yI18nComposition = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default A11yI18nComposition;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Utils for dealing with charts.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport H from '../../Core/Globals.js';\nconst { doc } = H;\nimport HU from './HTMLUtilities.js';\nconst { stripHTMLTagsFromString: stripHTMLTags } = HU;\nimport { defined, find, fireEvent } from '../../Shared/Utilities.js';\n/* *\n *\n * Functions\n *\n * */\n/**\n * Fire an event on an element that is either wrapped by Highcharts,\n * or a DOM element.\n * @private\n */\nfunction fireEventOnWrappedOrUnwrappedElement(el, eventObject) {\n const type = eventObject.type;\n const hcEvents = el.hcEvents;\n if (!!doc?.createEvent &&\n (el.dispatchEvent || el.fireEvent)) {\n if (el.dispatchEvent) {\n el.dispatchEvent(eventObject);\n }\n else {\n el.fireEvent(type, eventObject);\n }\n }\n else if (hcEvents && hcEvents[type]) {\n fireEvent(el, type, eventObject);\n }\n else if (el.element) {\n fireEventOnWrappedOrUnwrappedElement(el.element, eventObject);\n }\n}\n/**\n * @private\n */\nfunction getChartTitle(chart) {\n return stripHTMLTags(chart.options.title.text ||\n chart.langFormat('accessibility.defaultChartTitle', { chart: chart }), chart.renderer.forExport);\n}\n/**\n * Return string with the axis name/title.\n * @private\n */\nfunction getAxisDescription(axis) {\n return axis && (axis.options.accessibility?.description ||\n axis.axisTitle?.textStr ||\n axis.options.id ||\n axis.categories && axis.chart.langFormat('accessibility.axis.defaultAxisNames.categories', {}) ||\n axis.dateTime && axis.chart.langFormat('accessibility.axis.defaultAxisNames.time', {}) ||\n axis.chart.langFormat('accessibility.axis.defaultAxisNames.values', {}));\n}\n/**\n * Return string with text description of the axis range.\n * @private\n * @param {Highcharts.Axis} axis\n * The axis to get range desc of.\n * @return {string}\n * A string with the range description for the axis.\n */\nfunction getAxisRangeDescription(axis) {\n const axisOptions = axis.options || {};\n // Handle overridden range description\n if (axisOptions.accessibility &&\n typeof axisOptions.accessibility.rangeDescription !== 'undefined') {\n return axisOptions.accessibility.rangeDescription;\n }\n // Handle category axes\n if (axis.categories) {\n return getCategoryAxisRangeDesc(axis);\n }\n // Use time range, not from-to?\n if (axis.dateTime && (axis.min === 0 || axis.dataMin === 0)) {\n return getAxisTimeLengthDesc(axis);\n }\n // Just use from and to.\n // We have the range and the unit to use, find the desc format\n return getAxisFromToDescription(axis);\n}\n/**\n * Describe the range of a category axis.\n * @private\n */\nfunction getCategoryAxisRangeDesc(axis) {\n const chart = axis.chart;\n if (axis.dataMax && axis.dataMin) {\n return chart.langFormat('accessibility.axis.rangeCategories', {\n chart: chart,\n axis: axis,\n numCategories: axis.dataMax - axis.dataMin + 1\n });\n }\n return '';\n}\n/**\n * Describe the length of the time window shown on an axis.\n * @private\n */\nfunction getAxisTimeLengthDesc(axis) {\n const chart = axis.chart, range = {}, min = axis.dataMin || axis.min || 0, max = axis.dataMax || axis.max || 0;\n let rangeUnit = 'Seconds';\n range.Seconds = (max - min) / 1000;\n range.Minutes = range.Seconds / 60;\n range.Hours = range.Minutes / 60;\n range.Days = range.Hours / 24;\n ['Minutes', 'Hours', 'Days'].forEach(function (unit) {\n if (range[unit] > 2) {\n rangeUnit = unit;\n }\n });\n const rangeValue = range[rangeUnit].toFixed(rangeUnit !== 'Seconds' &&\n rangeUnit !== 'Minutes' ? 1 : 0 // Use decimals for days/hours\n );\n // We have the range and the unit to use, find the desc format\n return chart.langFormat('accessibility.axis.timeRange' + rangeUnit, {\n chart: chart,\n axis: axis,\n range: rangeValue.replace('.0', '')\n });\n}\n/**\n * Describe an axis from-to range.\n * @private\n */\nfunction getAxisFromToDescription(axis) {\n const chart = axis.chart, options = chart.options, dateRangeFormat = (options &&\n options.accessibility &&\n options.accessibility.screenReaderSection.axisRangeDateFormat ||\n ''), extremes = {\n min: axis.dataMin || axis.min || 0,\n max: axis.dataMax || axis.max || 0\n }, format = function (key) {\n return axis.dateTime ?\n chart.time.dateFormat(dateRangeFormat, extremes[key]) :\n extremes[key].toString();\n };\n return chart.langFormat('accessibility.axis.rangeFromTo', {\n chart: chart,\n axis: axis,\n rangeFrom: format('min'),\n rangeTo: format('max')\n });\n}\n/**\n * Get the DOM element for the first point in the series.\n * @private\n * @param {Highcharts.Series} series\n * The series to get element for.\n * @return {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement|undefined}\n * The DOM element for the point.\n */\nfunction getSeriesFirstPointElement(series) {\n if (series.points && series.points.length) {\n const firstPointWithGraphic = find(series.points, (p) => !!p.graphic);\n return (firstPointWithGraphic &&\n firstPointWithGraphic.graphic &&\n firstPointWithGraphic.graphic.element);\n }\n}\n/**\n * Get the DOM element for the series that we put accessibility info on.\n * @private\n * @param {Highcharts.Series} series\n * The series to get element for.\n * @return {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement|undefined}\n * The DOM element for the series\n */\nfunction getSeriesA11yElement(series) {\n const firstPointEl = getSeriesFirstPointElement(series);\n return (firstPointEl &&\n firstPointEl.parentNode || series.graph &&\n series.graph.element || series.group &&\n series.group.element); // Could be tracker series depending on series type\n}\n/**\n * Remove aria-hidden from element. Also unhides parents of the element, and\n * hides siblings that are not explicitly unhidden.\n * @private\n */\nfunction unhideChartElementFromAT(chart, element) {\n element.setAttribute('aria-hidden', false);\n if (element === chart.renderTo ||\n !element.parentNode ||\n element.parentNode === doc.body // #16126: Full screen printing\n ) {\n return;\n }\n // Hide siblings unless their hidden state is already explicitly set\n Array.prototype.forEach.call(element.parentNode.childNodes, function (node) {\n if (!node.hasAttribute('aria-hidden')) {\n node.setAttribute('aria-hidden', true);\n }\n });\n // Repeat for parent\n unhideChartElementFromAT(chart, element.parentNode);\n}\n/**\n * Hide series from screen readers.\n * @private\n */\nfunction hideSeriesFromAT(series) {\n const seriesEl = getSeriesA11yElement(series);\n if (seriesEl) {\n seriesEl.setAttribute('aria-hidden', true);\n }\n}\n/**\n * Get series objects by series name.\n * @private\n */\nfunction getSeriesFromName(chart, name) {\n if (!name) {\n return chart.series;\n }\n return (chart.series || []).filter(function (s) {\n return s.name === name;\n });\n}\n/**\n * Get point in a series from x/y values.\n * @private\n */\nfunction getPointFromXY(series, x, y) {\n let i = series.length, res;\n while (i--) {\n res = find(series[i].points || [], function (p) {\n return p.x === x && p.y === y;\n });\n if (res) {\n return res;\n }\n }\n}\n/**\n * Get relative position of point on an x/y axis from 0 to 1.\n * @private\n */\nfunction getRelativePointAxisPosition(axis, point) {\n if (!defined(axis.dataMin) || !defined(axis.dataMax)) {\n return 0;\n }\n const axisStart = axis.toPixels(axis.dataMin), axisEnd = axis.toPixels(axis.dataMax), \n // We have to use pixel position because of axis breaks, log axis etc.\n positionProp = axis.coll === 'xAxis' ? 'x' : 'y', pointPos = axis.toPixels(point[positionProp] || 0);\n return (pointPos - axisStart) / (axisEnd - axisStart);\n}\n/**\n * Get relative position of point on an x/y axis from 0 to 1.\n * @private\n */\nfunction scrollAxisToPoint(point) {\n const xAxis = point.series.xAxis, yAxis = point.series.yAxis, axis = (xAxis && xAxis.scrollbar ? xAxis : yAxis), scrollbar = (axis && axis.scrollbar);\n if (scrollbar && defined(scrollbar.to) && defined(scrollbar.from)) {\n const range = scrollbar.to - scrollbar.from;\n const pos = getRelativePointAxisPosition(axis, point);\n scrollbar.updatePosition(pos - range / 2, pos + range / 2);\n fireEvent(scrollbar, 'changed', {\n from: scrollbar.from,\n to: scrollbar.to,\n trigger: 'scrollbar',\n DOMEvent: null\n });\n }\n}\n/* *\n *\n * Default Export\n *\n * */\nconst ChartUtilities = {\n fireEventOnWrappedOrUnwrappedElement,\n getChartTitle,\n getAxisDescription,\n getAxisRangeDescription,\n getPointFromXY,\n getSeriesFirstPointElement,\n getSeriesFromName,\n getSeriesA11yElement,\n unhideChartElementFromAT,\n hideSeriesFromAT,\n scrollAxisToPoint\n};\nexport default ChartUtilities;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Class that can keep track of elements added to DOM and clean them up on\n * destroy.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport H from '../../Core/Globals.js';\nconst { doc } = H;\nimport HU from './HTMLUtilities.js';\nconst { removeElement } = HU;\n/* *\n *\n * Class\n *\n * */\n/**\n * @private\n */\nclass DOMElementProvider {\n /* *\n *\n * Constructor\n *\n * */\n constructor() {\n this.elements = [];\n }\n /**\n * Create an element and keep track of it for later removal.\n * Same args as document.createElement\n * @private\n */\n createElement() {\n const el = doc.createElement.apply(doc, arguments);\n this.elements.push(el);\n return el;\n }\n /**\n * Destroy created element, removing it from the DOM.\n * @private\n */\n removeElement(element) {\n removeElement(element);\n this.elements.splice(this.elements.indexOf(element), 1);\n }\n /**\n * Destroy all created elements, removing them from the DOM.\n * @private\n */\n destroyCreatedElements() {\n this.elements.forEach(function (element) {\n removeElement(element);\n });\n this.elements = [];\n }\n}\n/* *\n *\n * Default Export\n *\n * */\nexport default DOMElementProvider;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Class that can keep track of events added, and clean them up on destroy.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\n/* *\n *\n * Imports\n *\n * */\nimport { addEvent } from '../../Shared/Utilities.js';\nimport H from '../../Core/Globals.js';\n/**\n * @private\n */\nclass EventProvider {\n /* *\n *\n * Constructor\n *\n * */\n constructor() {\n this.eventRemovers = [];\n }\n /**\n * Add an event to an element and keep track of it for later removal.\n * Same args as Highcharts.addEvent.\n * @private\n */\n addEvent() {\n const remover = addEvent.apply(H, arguments);\n this.eventRemovers.push({\n element: arguments[0], // HTML element\n remover\n });\n return remover;\n }\n /**\n * Remove added event.\n * @private\n */\n removeEvent(event) {\n const pos = this.eventRemovers.map((e) => e.remover).indexOf(event);\n this.eventRemovers[pos].remover();\n this.eventRemovers.splice(pos, 1);\n }\n /**\n * Remove all added events.\n * @private\n */\n removeAddedEvents() {\n this.eventRemovers.map((e) => e.remover)\n .forEach((remover) => remover());\n this.eventRemovers = [];\n }\n}\n/* *\n *\n * Default Export\n *\n * */\nexport default EventProvider;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Accessibility component class definition\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport CU from './Utils/ChartUtilities.js';\nconst { fireEventOnWrappedOrUnwrappedElement } = CU;\nimport DOMElementProvider from './Utils/DOMElementProvider.js';\nimport EventProvider from './Utils/EventProvider.js';\nimport HU from './Utils/HTMLUtilities.js';\nconst { getFakeMouseEvent } = HU;\n/* *\n *\n * Class\n *\n * */\n/**\n * The AccessibilityComponent base class, representing a part of the chart that\n * has accessibility logic connected to it. This class can be inherited from to\n * create a custom accessibility component for a chart.\n *\n * Components should take care to destroy added elements and unregister event\n * handlers on destroy. This is handled automatically if using `this.addEvent`\n * and `this.createElement`.\n *\n * @sample highcharts/accessibility/custom-component\n * Custom accessibility component\n *\n * @requires modules/accessibility\n * @class\n * @name Highcharts.AccessibilityComponent\n */\nclass AccessibilityComponent {\n /* *\n *\n * Functions\n *\n * */\n /**\n * Called when accessibility is disabled or chart is destroyed.\n *\n * @function Highcharts.AccessibilityComponent#destroy\n */\n destroy() { }\n /**\n * Get keyboard navigation handler for this component.\n *\n * @function Highcharts.AccessibilityComponent#getKeyboardNavigation\n * @return {Highcharts.KeyboardNavigationHandler|Array<Highcharts.KeyboardNavigationHandler>}\n * The keyboard navigation handler(s) for this component.\n */\n getKeyboardNavigation() {\n return [];\n }\n /**\n * Called on component initialization.\n *\n * @function Highcharts.AccessibilityComponent#init\n */\n init() { }\n /**\n * Called on every chart render.\n *\n * @function Highcharts.AccessibilityComponent#onChartRender\n */\n onChartRender() { }\n /**\n * Called on updates to the chart, including options changes.\n * Note that this is also called on first render of chart.\n *\n * @function Highcharts.AccessibilityComponent#onChartUpdate\n */\n onChartUpdate() { }\n /**\n * Initialize the class\n * @private\n * @param {Highcharts.Chart} chart The chart object\n * @param {Highcharts.ProxyProvider} proxyProvider The proxy provider of the accessibility module\n */\n initBase(chart, proxyProvider) {\n this.chart = chart;\n this.eventProvider = new EventProvider();\n this.domElementProvider = new DOMElementProvider();\n this.proxyProvider = proxyProvider;\n // Key code enum for common keys\n this.keyCodes = {\n left: 37,\n right: 39,\n up: 38,\n down: 40,\n enter: 13,\n space: 32,\n esc: 27,\n tab: 9,\n pageUp: 33,\n pageDown: 34,\n end: 35,\n home: 36\n };\n }\n /**\n * Add an event to an element and keep track of it for later removal.\n * See EventProvider for details.\n * @private\n */\n addEvent(el, type, fn, options) {\n return this.eventProvider.addEvent(el, type, fn, options);\n }\n /**\n * Create an element and keep track of it for later removal.\n * See DOMElementProvider for details.\n * @private\n */\n createElement(tagName, options) {\n return this.domElementProvider.createElement(tagName, options);\n }\n /**\n * Fire a fake click event on an element. It is useful to have this on\n * AccessibilityComponent for users of custom components.\n * @private\n */\n fakeClickEvent(el) {\n const fakeEvent = getFakeMouseEvent('click');\n fireEventOnWrappedOrUnwrappedElement(el, fakeEvent);\n }\n /**\n * Remove traces of the component.\n * @private\n */\n destroyBase() {\n this.domElementProvider.destroyCreatedElements();\n this.eventProvider.removeAddedEvents();\n }\n}\n/* *\n *\n * Default Export\n *\n * */\nexport default AccessibilityComponent;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Keyboard navigation handler base class definition\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport { find } from '../Shared/Utilities.js';\n/* *\n *\n * Class\n *\n * */\n/**\n * Define a keyboard navigation handler for use with a\n * Highcharts.AccessibilityComponent instance. This functions as an abstraction\n * layer for keyboard navigation, and defines a map of keyCodes to handler\n * functions.\n *\n * @requires modules/accessibility\n *\n * @sample highcharts/accessibility/custom-component\n * Custom accessibility component\n *\n * @class\n * @name Highcharts.KeyboardNavigationHandler\n *\n * @param {Highcharts.Chart} chart\n * The chart this module should act on.\n *\n * @param {Highcharts.KeyboardNavigationHandlerOptionsObject} options\n * Options for the keyboard navigation handler.\n */\nclass KeyboardNavigationHandler {\n /* *\n *\n * Constructor\n *\n * */\n constructor(chart, options) {\n this.chart = chart;\n this.keyCodeMap = options.keyCodeMap || [];\n this.validate = options.validate;\n this.init = options.init;\n this.terminate = options.terminate;\n // Response enum\n this.response = {\n success: 1, // Keycode was handled\n prev: 2, // Move to prev module\n next: 3, // Move to next module\n noHandler: 4, // There is no handler for this keycode\n fail: 5 // Handler failed\n };\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Find handler function(s) for key code in the keyCodeMap and run it.\n *\n * @function KeyboardNavigationHandler#run\n * @param {global.KeyboardEvent} e\n * @return {number} Returns a response code indicating whether the run was\n * a success/fail/unhandled, or if we should move to next/prev module.\n */\n run(e) {\n const keyCode = e.which || e.keyCode;\n let response = this.response.noHandler;\n const handlerCodeSet = find(this.keyCodeMap, function (codeSet) {\n return codeSet[0].indexOf(keyCode) > -1;\n });\n if (handlerCodeSet) {\n response = handlerCodeSet[1].call(this, keyCode, e);\n }\n else if (keyCode === 9) {\n // Default tab handler, move to next/prev module\n response = this.response[e.shiftKey ? 'prev' : 'next'];\n }\n return response;\n }\n}\n/* *\n *\n * Default Export\n *\n * */\nexport default KeyboardNavigationHandler;\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * Options for the keyboard navigation handler.\n *\n * @interface Highcharts.KeyboardNavigationHandlerOptionsObject\n */ /**\n* An array containing pairs of an array of keycodes, mapped to a handler\n* function. When the keycode is received, the handler is called with the\n* keycode as parameter.\n* @name Highcharts.KeyboardNavigationHandlerOptionsObject#keyCodeMap\n* @type {Array<Array<Array<number>, Function>>}\n*/ /**\n* Function to run on initialization of module.\n* @name Highcharts.KeyboardNavigationHandlerOptionsObject#init\n* @type {Function}\n*/ /**\n* Function to run before moving to next/prev module. Receives moving direction\n* as parameter: +1 for next, -1 for previous.\n* @name Highcharts.KeyboardNavigationHandlerOptionsObject#terminate\n* @type {Function|undefined}\n*/ /**\n* Function to run to validate module. Should return false if module should not\n* run, true otherwise. Receives chart as parameter.\n* @name Highcharts.KeyboardNavigationHandlerOptionsObject#validate\n* @type {Function|undefined}\n*/\n(''); // Keeps doclets above in JS file\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Accessibility component for chart container.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport AccessibilityComponent from '../AccessibilityComponent.js';\nimport KeyboardNavigationHandler from '../KeyboardNavigationHandler.js';\nimport CU from '../Utils/ChartUtilities.js';\nconst { unhideChartElementFromAT, getChartTitle } = CU;\nimport H from '../../Core/Globals.js';\nconst { doc } = H;\nimport HU from '../Utils/HTMLUtilities.js';\nconst { stripHTMLTagsFromString: stripHTMLTags } = HU;\n/**\n * The ContainerComponent class\n *\n * @private\n * @class\n * @name Highcharts.ContainerComponent\n */\nclass ContainerComponent extends AccessibilityComponent {\n /* *\n *\n * Functions\n *\n * */\n /**\n * Called on first render/updates to the chart, including options changes.\n */\n onChartUpdate() {\n this.handleSVGTitleElement();\n this.setSVGContainerLabel();\n this.setGraphicContainerAttrs();\n this.setRenderToAttrs();\n this.makeCreditsAccessible();\n }\n /**\n * @private\n */\n handleSVGTitleElement() {\n const chart = this.chart, titleId = 'highcharts-title-' + chart.index, titleContents = stripHTMLTags(chart.langFormat('accessibility.svgContainerTitle', {\n chartTitle: getChartTitle(chart)\n }));\n if (titleContents.length) {\n const titleElement = this.svgTitleElement =\n this.svgTitleElement || doc.createElementNS('http://www.w3.org/2000/svg', 'title');\n titleElement.textContent = titleContents;\n titleElement.id = titleId;\n chart.renderTo.insertBefore(titleElement, chart.renderTo.firstChild);\n }\n }\n /**\n * @private\n */\n setSVGContainerLabel() {\n const chart = this.chart, svgContainerLabel = chart.langFormat('accessibility.svgContainerLabel', {\n chartTitle: getChartTitle(chart)\n });\n if (chart.renderer.box && svgContainerLabel.length) {\n chart.renderer.box.setAttribute('aria-label', svgContainerLabel);\n }\n }\n /**\n * @private\n */\n setGraphicContainerAttrs() {\n const chart = this.chart, label = chart.langFormat('accessibility.graphicContainerLabel', {\n chartTitle: getChartTitle(chart)\n });\n if (label.length) {\n chart.container.setAttribute('aria-label', label);\n }\n }\n /**\n * Set attributes on the chart container element.\n * @private\n */\n setRenderToAttrs() {\n const chart = this.chart, shouldHaveLandmark = chart.options.accessibility\n .landmarkVerbosity !== 'disabled', containerLabel = chart.langFormat('accessibility.chartContainerLabel', {\n title: getChartTitle(chart),\n chart: chart\n });\n if (containerLabel) {\n chart.renderTo.setAttribute('role', shouldHaveLandmark ? 'region' : 'group');\n chart.renderTo.setAttribute('aria-label', containerLabel);\n }\n }\n /**\n * @private\n */\n makeCreditsAccessible() {\n const chart = this.chart, credits = chart.credits;\n if (credits) {\n if (credits.textStr) {\n credits.element.setAttribute('aria-label', chart.langFormat('accessibility.credits', {\n creditsStr: stripHTMLTags(credits.textStr, chart.renderer.forExport)\n }));\n }\n unhideChartElementFromAT(chart, credits.element);\n }\n }\n /**\n * Empty handler to just set focus on chart\n * @private\n */\n getKeyboardNavigation() {\n const chart = this.chart;\n return new KeyboardNavigationHandler(chart, {\n keyCodeMap: [],\n validate: function () {\n return true;\n },\n init: function () {\n const a11y = chart.accessibility;\n if (a11y) {\n a11y.keyboardNavigation.tabindexContainer.focus();\n }\n }\n });\n }\n /**\n * Accessibility disabled/chart destroyed.\n */\n destroy() {\n this.chart.renderTo.setAttribute('aria-hidden', true);\n }\n}\n/* *\n *\n * Default Export\n *\n * */\nexport default ContainerComponent;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Extend SVG and Chart classes with focus border capabilities.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport { addEvent, pick } from '../Shared/Utilities.js';\n/* *\n *\n * Composition\n *\n * */\nvar FocusBorderComposition;\n(function (FocusBorderComposition) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n // Attributes that trigger a focus border update\n const svgElementBorderUpdateTriggers = [\n 'x', 'y', 'transform', 'width', 'height', 'r', 'd', 'stroke-width'\n ];\n /* *\n *\n * Functions\n *\n * */\n /**\n * @private\n */\n function compose(ChartClass, SVGElementClass) {\n const chartProto = ChartClass.prototype, svgElementProto = SVGElementClass.prototype;\n if (!chartProto.renderFocusBorder) {\n chartProto.renderFocusBorder = chartRenderFocusBorder;\n chartProto.setFocusToElement = chartSetFocusToElement;\n }\n if (!svgElementProto.addFocusBorder) {\n svgElementProto.addFocusBorder = svgElementAddFocusBorder;\n svgElementProto.removeFocusBorder = svgElementRemoveFocusBorder;\n }\n }\n FocusBorderComposition.compose = compose;\n /**\n * Redraws the focus border on the currently focused element.\n *\n * @private\n * @function Highcharts.Chart#renderFocusBorder\n */\n function chartRenderFocusBorder() {\n const focusElement = this.focusElement, focusBorderOptions = this.options.accessibility.keyboardNavigation.focusBorder;\n if (focusElement) {\n focusElement.removeFocusBorder();\n if (focusBorderOptions.enabled) {\n focusElement.addFocusBorder(focusBorderOptions.margin, {\n stroke: focusBorderOptions.style.color,\n strokeWidth: focusBorderOptions.style.lineWidth,\n r: focusBorderOptions.style.borderRadius\n });\n }\n }\n }\n /**\n * Set chart's focus to an SVGElement. Calls focus() on it, and draws the\n * focus border. This is used by multiple components.\n *\n * @private\n * @function Highcharts.Chart#setFocusToElement\n *\n * @param {Highcharts.SVGElement} svgElement\n * Element to draw the border around.\n *\n * @param {SVGDOMElement|HTMLDOMElement} [focusElement]\n * If supplied, it draws the border around svgElement and sets the focus to\n * focusElement.\n */\n function chartSetFocusToElement(svgElement, focusElement) {\n const focusBorderOptions = this.options.accessibility.keyboardNavigation.focusBorder, browserFocusElement = focusElement || svgElement.element;\n // Set browser focus if possible\n if (browserFocusElement &&\n browserFocusElement.focus) {\n // If there is no focusin-listener, add one to work around Edge\n // where Narrator is not reading out points despite calling focus().\n if (!(browserFocusElement.hcEvents &&\n browserFocusElement.hcEvents.focusin)) {\n addEvent(browserFocusElement, 'focusin', function () { });\n }\n browserFocusElement.focus();\n // Hide default focus ring\n if (focusBorderOptions.hideBrowserFocusOutline) {\n browserFocusElement.style.outline = 'none';\n }\n }\n if (this.focusElement) {\n this.focusElement.removeFocusBorder();\n }\n this.focusElement = svgElement;\n // #22122, focus border should re-render after window is resized\n addEvent(this, 'endResize', function () {\n this.renderFocusBorder();\n });\n this.renderFocusBorder();\n }\n /**\n * Add hook to destroy focus border if SVG element is destroyed, unless\n * hook already exists.\n * @private\n * @param {object} el Element to add destroy hook to\n */\n function svgElementAddDestroyFocusBorderHook(el) {\n if (el.focusBorderDestroyHook) {\n return;\n }\n const origDestroy = el.destroy;\n el.destroy = function () {\n if (el.focusBorder && el.focusBorder.destroy) {\n el.focusBorder.destroy();\n }\n return origDestroy.apply(el, arguments);\n };\n el.focusBorderDestroyHook = origDestroy;\n }\n /**\n * Add focus border functionality to SVGElements. Draws a new rect on top of\n * element around its bounding box. This is used by multiple components.\n *\n * @private\n * @function Highcharts.SVGElement#addFocusBorder\n *\n * @param {number} margin\n *\n * @param {SVGAttributes} attribs\n */\n function svgElementAddFocusBorder(margin, attribs) {\n // Allow updating by just adding new border\n if (this.focusBorder) {\n this.removeFocusBorder();\n }\n // Add the border rect\n const bb = this.getBBox(), pad = pick(margin, 3), parent = this.parentGroup, scaleX = this.scaleX || parent && parent.scaleX, scaleY = this.scaleY || parent && parent.scaleY, oneDefined = scaleX ? !scaleY : scaleY, scaleBoth = oneDefined ? Math.abs(scaleX || scaleY || 1) :\n (Math.abs(scaleX || 1) + Math.abs(scaleY || 1)) / 2, lineHeight = this.renderer.fontMetrics(this).h;\n bb.x += this.translateX ? this.translateX : 0;\n bb.y += this.translateY ? this.translateY : 0;\n let borderPosX = bb.x - pad, borderPosY = bb.y - pad, borderWidth = bb.width + 2 * pad, borderHeight = bb.height + 2 * pad;\n /**\n * For text elements, apply x and y offset, #11397.\n * @private\n */\n function getTextAnchorCorrection(text) {\n let posXCorrection = 0, posYCorrection = 0;\n if (text.attr('text-anchor') === 'middle') {\n posXCorrection = posYCorrection = 0.5;\n }\n else if (!text.rotation) {\n posYCorrection = 0.75;\n }\n else {\n posXCorrection = 0.25;\n }\n return {\n x: posXCorrection,\n y: posYCorrection\n };\n }\n const isLabel = !!this.text;\n if (this.element.nodeName === 'text' || isLabel) {\n const isRotated = !!this.rotation;\n const correction = !isLabel ? getTextAnchorCorrection(this) :\n {\n x: isRotated ? 1 : 0,\n y: 0\n };\n const attrX = +this.attr('x');\n const attrY = +this.attr('y');\n if (!isNaN(attrX)) {\n borderPosX = attrX - (bb.width * correction.x) - pad;\n }\n if (!isNaN(attrY)) {\n // Correct by line height if \"text-anchor\" == \"start\", #19335.\n const dim = this.attr('text-anchor') === 'start' ?\n lineHeight :\n bb.height;\n borderPosY = attrY - (dim * correction.y) - pad;\n }\n if (isLabel && isRotated) {\n const temp = borderWidth;\n borderWidth = borderHeight;\n borderHeight = temp;\n if (!isNaN(attrX)) {\n borderPosX = attrX - (bb.height * correction.x) - pad;\n }\n if (!isNaN(attrY)) {\n borderPosY = attrY - (bb.width * correction.y) - pad;\n }\n }\n }\n this.focusBorder = this.renderer.rect(borderPosX, borderPosY, borderWidth, borderHeight, parseInt((attribs && attribs.r || 0).toString(), 10) / scaleBoth)\n .addClass('highcharts-focus-border')\n .attr({\n zIndex: 99\n })\n .add(parent);\n if (!this.renderer.styledMode) {\n this.focusBorder.attr({\n stroke: attribs && attribs.stroke,\n 'stroke-width': (attribs && attribs.strokeWidth || 0) / scaleBoth\n });\n }\n avgElementAddUpdateFocusBorderHooks(this, margin, attribs);\n svgElementAddDestroyFocusBorderHook(this);\n }\n /**\n * Add hooks to update the focus border of an element when the element\n * size/position is updated, unless already added.\n * @private\n * @param {object} el Element to add update hooks to\n * @param {...*} updateParams Parameters to pass through to addFocusBorder when updating.\n */\n function avgElementAddUpdateFocusBorderHooks(el, ...updateParams) {\n if (el.focusBorderUpdateHooks) {\n return;\n }\n el.focusBorderUpdateHooks = {};\n svgElementBorderUpdateTriggers.forEach((trigger) => {\n const setterKey = trigger + 'Setter';\n const origSetter = el[setterKey] || el._defaultSetter;\n el.focusBorderUpdateHooks[setterKey] = origSetter;\n el[setterKey] = function () {\n const ret = origSetter.apply(el, arguments);\n el.addFocusBorder.apply(el, updateParams);\n return ret;\n };\n });\n }\n /**\n * Remove hook from SVG element added by addDestroyFocusBorderHook, if\n * existing.\n * @private\n * @param {object} el Element to remove destroy hook from\n */\n function svgElementRemoveDestroyFocusBorderHook(el) {\n if (!el.focusBorderDestroyHook) {\n return;\n }\n el.destroy = el.focusBorderDestroyHook;\n delete el.focusBorderDestroyHook;\n }\n /**\n * Add focus border functionality to SVGElements. Draws a new rect on top of\n * element around its bounding box. This is used by multiple components.\n * @private\n * @function Highcharts.SVGElement#removeFocusBorder\n */\n function svgElementRemoveFocusBorder() {\n svgElementRemoveUpdateFocusBorderHooks(this);\n svgElementRemoveDestroyFocusBorderHook(this);\n if (this.focusBorder) {\n this.focusBorder.destroy();\n delete this.focusBorder;\n }\n }\n /**\n * Remove hooks from SVG element added by addUpdateFocusBorderHooks, if\n * existing.\n * @private\n * @param {object} el Element to remove update hooks from\n */\n function svgElementRemoveUpdateFocusBorderHooks(el) {\n if (!el.focusBorderUpdateHooks) {\n return;\n }\n Object.keys(el.focusBorderUpdateHooks).forEach((setterKey) => {\n const origSetter = el.focusBorderUpdateHooks[setterKey];\n if (origSetter === el._defaultSetter) {\n delete el[setterKey];\n }\n else {\n el[setterKey] = origSetter;\n }\n });\n delete el.focusBorderUpdateHooks;\n }\n})(FocusBorderComposition || (FocusBorderComposition = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default FocusBorderComposition;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Create announcer to speak messages to screen readers and other AT.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport AST from '../../Core/Renderer/HTML/AST.js';\nimport DOMElementProvider from './DOMElementProvider.js';\nimport H from '../../Core/Globals.js';\nconst { doc } = H;\nimport HU from './HTMLUtilities.js';\nconst { addClass, visuallyHideElement } = HU;\nimport { attr, internalClearTimeout } from '../../Shared/Utilities.js';\n/* *\n *\n * Class\n *\n * */\nclass Announcer {\n /* *\n *\n * Constructor\n *\n * */\n constructor(chart, type) {\n this.chart = chart;\n this.domElementProvider = new DOMElementProvider();\n this.announceRegion = this.addAnnounceRegion(type);\n }\n /* *\n *\n * Functions\n *\n * */\n destroy() {\n this.domElementProvider.destroyCreatedElements();\n }\n announce(message) {\n AST.setElementHTML(this.announceRegion, message);\n // Delete contents after a little while to avoid user finding the live\n // region in the DOM.\n if (this.clearAnnouncementRegionTimer) {\n internalClearTimeout(this.clearAnnouncementRegionTimer);\n }\n this.clearAnnouncementRegionTimer = setTimeout(() => {\n this.announceRegion.innerHTML = AST.emptyHTML;\n delete this.clearAnnouncementRegionTimer;\n }, 3000);\n }\n addAnnounceRegion(type) {\n const chartContainer = (this.chart.announcerContainer || this.createAnnouncerContainer()), div = this.domElementProvider.createElement('div');\n attr(div, {\n 'aria-hidden': false,\n 'aria-live': type,\n 'aria-atomic': true\n });\n // Apply inline hidden styles too as the class alone depends on\n // `highcharts.css` being loaded\n visuallyHideElement(div);\n if (this.chart.styledMode) {\n addClass(div, 'highcharts-visually-hidden');\n }\n chartContainer.appendChild(div);\n return div;\n }\n createAnnouncerContainer() {\n const chart = this.chart, container = doc.createElement('div');\n attr(container, {\n 'aria-hidden': false,\n 'class': 'highcharts-announcer-container'\n });\n // Hide inline so the container stays out of flow even when\n // `highcharts.css` is missing in styled mode\n visuallyHideElement(container);\n chart.renderTo.insertBefore(container, chart.renderTo.firstChild);\n chart.announcerContainer = container;\n return container;\n }\n}\n/* *\n *\n * Default Export\n *\n * */\nexport default Announcer;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Annotations accessibility code.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport HTMLUtilities from '../Utils/HTMLUtilities.js';\nconst { escapeStringForHTML, stripHTMLTagsFromString } = HTMLUtilities;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Get list of all annotation labels in the chart.\n *\n * @private\n * @param {Highcharts.Chart} chart The chart to get annotation info on.\n * @return {Array<object>} The labels, or empty array if none.\n */\nfunction getChartAnnotationLabels(chart) {\n const annotations = chart.annotations || [];\n return annotations.reduce((acc, cur) => {\n if (cur.options &&\n cur.options.visible !== false) {\n acc = acc.concat(cur.labels);\n }\n return acc;\n }, []);\n}\n/**\n * Get the text of an annotation label.\n *\n * @private\n * @param {Object} label The annotation label object\n * @return {string} The text in the label.\n */\nfunction getLabelText(label) {\n return ((label.options &&\n label.options.accessibility &&\n label.options.accessibility.description) ||\n (label.graphic &&\n label.graphic.text &&\n label.graphic.text.textStr) ||\n '');\n}\n/**\n * Describe an annotation label.\n *\n * @private\n * @param {Object} label The annotation label object to describe\n * @return {string} The description for the label.\n */\nfunction getAnnotationLabelDescription(label) {\n const a11yDesc = (label.options &&\n label.options.accessibility &&\n label.options.accessibility.description);\n if (a11yDesc) {\n return a11yDesc;\n }\n const chart = label.chart;\n const labelText = getLabelText(label);\n const points = label.points;\n const getAriaLabel = (point) => (point.graphic &&\n point.graphic.element &&\n point.graphic.element.getAttribute('aria-label') ||\n '');\n const getValueDesc = (point) => {\n const valDesc = (point.accessibility &&\n point.accessibility.valueDescription ||\n getAriaLabel(point));\n const seriesName = (point &&\n point.series.name ||\n '');\n return (seriesName ? seriesName + ', ' : '') + 'data point ' + valDesc;\n };\n const pointValueDescriptions = points\n .filter((p) => !!p.graphic) // Filter out mock points\n .map(getValueDesc)\n // Filter out points we can't describe\n .filter((desc) => !!desc);\n const numPoints = pointValueDescriptions.length;\n const pointsSelector = numPoints > 1 ?\n 'MultiplePoints' : numPoints ?\n 'SinglePoint' : 'NoPoints';\n const langFormatStr = ('accessibility.screenReaderSection.annotations.description' +\n pointsSelector);\n const context = {\n annotationText: labelText,\n annotation: label,\n numPoints: numPoints,\n annotationPoint: pointValueDescriptions[0],\n additionalAnnotationPoints: pointValueDescriptions.slice(1)\n };\n return chart.langFormat(langFormatStr, context);\n}\n/**\n * Return array of HTML strings for each annotation label in the chart.\n *\n * @private\n * @param {Highcharts.Chart} chart The chart to get annotation info on.\n * @return {Array<string>} Array of strings with HTML content for each annotation label.\n */\nfunction getAnnotationListItems(chart) {\n const labels = getChartAnnotationLabels(chart);\n return labels.map((label) => {\n const desc = escapeStringForHTML(stripHTMLTagsFromString(getAnnotationLabelDescription(label), chart.renderer.forExport));\n return desc ? `<li>${desc}</li>` : '';\n });\n}\n/**\n * Return the annotation info for a chart as string.\n *\n * @private\n * @param {Highcharts.Chart} chart The chart to get annotation info on.\n * @return {string} String with HTML content or empty string if no annotations.\n */\nfunction getAnnotationsInfoHTML(chart) {\n const annotations = chart.annotations;\n if (!(annotations && annotations.length)) {\n return '';\n }\n const annotationItems = getAnnotationListItems(chart);\n return `<ul style=\"list-style-type: none\">${annotationItems.join(' ')}</ul>`;\n}\n/**\n * Return the texts for the annotation(s) connected to a point, or empty array\n * if none.\n *\n * @private\n * @param {Highcharts.Point} point The data point to get the annotation info from.\n * @return {Array<string>} Annotation texts\n */\nfunction getPointAnnotationTexts(point) {\n const labels = getChartAnnotationLabels(point.series.chart);\n const pointLabels = labels\n .filter((label) => label.points.indexOf(point) > -1);\n if (!pointLabels.length) {\n return [];\n }\n return pointLabels.map((label) => `${getLabelText(label)}`);\n}\n/* *\n *\n * Default Export\n *\n * */\nconst AnnotationsA11y = {\n getAnnotationsInfoHTML,\n getAnnotationLabelDescription,\n getAnnotationListItems,\n getPointAnnotationTexts\n};\nexport default AnnotationsA11y;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Accessibility component for chart info region and table.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport A11yI18n from '../A11yI18n.js';\nimport AccessibilityComponent from '../AccessibilityComponent.js';\nimport Announcer from '../Utils/Announcer.js';\nimport AnnotationsA11y from './AnnotationsA11y.js';\nconst { getAnnotationsInfoHTML } = AnnotationsA11y;\nimport AST from '../../Core/Renderer/HTML/AST.js';\nimport CU from '../Utils/ChartUtilities.js';\nconst { getAxisDescription, getAxisRangeDescription, getChartTitle, unhideChartElementFromAT } = CU;\nimport F from '../../Core/Templating.js';\nconst { format } = F;\nimport H from '../../Core/Globals.js';\nconst { doc } = H;\nimport HU from '../Utils/HTMLUtilities.js';\nconst { addClass, getElement, getHeadingTagNameForElement, stripHTMLTagsFromString, visuallyHideElement } = HU;\nimport { attr, pick, replaceNested } from '../../Shared/Utilities.js';\n/* *\n *\n * Functions\n *\n * */\n/**\n * @private\n */\nfunction getTableSummary(chart) {\n return chart.langFormat('accessibility.table.tableSummary', { chart: chart });\n}\n/**\n * @private\n */\nfunction getTypeDescForMapChart(chart, formatContext) {\n return formatContext.mapTitle ?\n chart.langFormat('accessibility.chartTypes.mapTypeDescription', formatContext) :\n chart.langFormat('accessibility.chartTypes.unknownMap', formatContext);\n}\n/**\n * @private\n */\nfunction getTypeDescForCombinationChart(chart, formatContext) {\n return chart.langFormat('accessibility.chartTypes.combinationChart', formatContext);\n}\n/**\n * @private\n */\nfunction getTypeDescForEmptyChart(chart, formatContext) {\n return chart.langFormat('accessibility.chartTypes.emptyChart', formatContext);\n}\n/**\n * @private\n */\nfunction buildTypeDescriptionFromSeries(chart, types, context) {\n const firstType = types[0], typeExplanation = chart.langFormat('accessibility.seriesTypeDescriptions.' + firstType, context), multi = chart.series && chart.series.length < 2 ? 'Single' : 'Multiple';\n return (chart.langFormat('accessibility.chartTypes.' + firstType + multi, context) ||\n chart.langFormat('accessibility.chartTypes.default' + multi, context)) + (typeExplanation ? ' ' + typeExplanation : '');\n}\n/**\n * Return simplified explanation of chart type. Some types will not be\n * familiar to most users, but in those cases we try to add an explanation\n * of the type.\n *\n * @private\n * @function Highcharts.Chart#getTypeDescription\n * @param {Highcharts.Chart} chart The associated Chart instance.\n * @param {Array<string>} types The series types in this chart.\n * @return {string} The text description of the chart type.\n */\nfunction getTypeDescription(chart, types) {\n const firstType = types[0], firstSeries = chart.series && chart.series[0] || {}, mapTitle = chart.mapView && chart.mapView.geoMap &&\n chart.mapView.geoMap.title, formatContext = {\n numSeries: chart.series.length,\n numPoints: firstSeries.points && firstSeries.points.length,\n chart,\n mapTitle\n };\n if (!firstType) {\n return getTypeDescForEmptyChart(chart, formatContext);\n }\n if (firstType === 'map' || firstType === 'tiledwebmap') {\n return getTypeDescForMapChart(chart, formatContext);\n }\n if (chart.types.length > 1) {\n return getTypeDescForCombinationChart(chart, formatContext);\n }\n return buildTypeDescriptionFromSeries(chart, types, formatContext);\n}\n/**\n * @private\n */\nfunction stripEmptyHTMLTags(str) {\n // Scan alert #[71]: Loop for nested patterns\n return replaceNested(str, [/<([\\w\\-.:!]+)\\b[^<>]*>\\s*<\\/\\1>/g, '']);\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * The InfoRegionsComponent class\n *\n * @private\n * @class\n * @name Highcharts.InfoRegionsComponent\n */\nclass InfoRegionsComponent extends AccessibilityComponent {\n constructor() {\n /* *\n *\n * Properties\n *\n * */\n super(...arguments);\n this.screenReaderSections = {};\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Init the component\n * @private\n */\n init() {\n const chart = this.chart;\n const component = this;\n this.initRegionsDefinitions();\n this.addEvent(chart, 'afterGetTableAST', function (e) {\n component.onDataTableCreated(e);\n });\n this.addEvent(chart, 'afterViewData', function (e) {\n if (e.wasHidden) {\n component.dataTableDiv = e.element;\n // Use a small delay to give browsers & AT time to\n // register the new table.\n setTimeout(function () {\n component.focusDataTable();\n }, 300);\n }\n });\n this.addEvent(chart, 'afterHideData', function () {\n if (component.viewDataTableButton) {\n component.viewDataTableButton\n .setAttribute('aria-expanded', 'false');\n }\n });\n if (chart.exporting) {\n // Needed when print logic in exporting does not trigger\n // rerendering thus repositioning of screen reader DOM elements\n // (#21554)\n this.addEvent(chart, 'afterPrint', function () {\n component.updateAllScreenReaderSections();\n });\n }\n this.announcer = new Announcer(chart, 'assertive');\n }\n /**\n * @private\n */\n initRegionsDefinitions() {\n const component = this, accessibilityOptions = this.chart.options.accessibility;\n this.screenReaderSections = {\n before: {\n element: null,\n buildContent: function (chart) {\n const formatter = accessibilityOptions.screenReaderSection\n .beforeChartFormatter;\n return formatter ? formatter(chart, component) :\n component.defaultBeforeChartFormatter();\n },\n insertIntoDOM: function (el, chart) {\n chart.renderTo.insertBefore(el, chart.renderTo.firstChild);\n },\n afterInserted: function () {\n if (typeof component.sonifyButtonId !== 'undefined') {\n component.initSonifyButton(component.sonifyButtonId);\n }\n if (typeof component.dataTableButtonId !== 'undefined') {\n component.initDataTableButton(component.dataTableButtonId);\n }\n }\n },\n after: {\n element: null,\n buildContent: function (chart) {\n const formatter = accessibilityOptions.screenReaderSection\n .afterChartFormatter;\n return formatter ? formatter(chart, component) :\n component.defaultAfterChartFormatter();\n },\n insertIntoDOM: function (el, chart) {\n chart.renderTo.insertBefore(el, chart.container.nextSibling);\n },\n afterInserted: function () {\n if (component.chart.accessibility &&\n accessibilityOptions.keyboardNavigation.enabled) {\n component.chart.accessibility\n .keyboardNavigation.updateExitAnchor(); // #15986\n }\n }\n }\n };\n }\n /**\n * Called on chart render. Have to update the sections on render, in order\n * to get a11y info from series.\n */\n onChartRender() {\n this.linkedDescriptionElement = this.getLinkedDescriptionElement();\n this.setLinkedDescriptionAttrs();\n this.updateAllScreenReaderSections();\n }\n updateAllScreenReaderSections() {\n const component = this;\n Object.keys(this.screenReaderSections).forEach(function (regionKey) {\n component.updateScreenReaderSection(regionKey);\n });\n }\n /**\n * @private\n */\n getLinkedDescriptionElement() {\n const chartOptions = this.chart.options, linkedDescOption = chartOptions.accessibility.linkedDescription;\n if (!linkedDescOption) {\n return;\n }\n if (typeof linkedDescOption !== 'string') {\n return linkedDescOption;\n }\n const query = format(linkedDescOption, this.chart), queryMatch = doc.querySelectorAll(query);\n if (queryMatch.length === 1) {\n return queryMatch[0];\n }\n }\n /**\n * @private\n */\n setLinkedDescriptionAttrs() {\n const el = this.linkedDescriptionElement;\n if (el) {\n el.setAttribute('aria-hidden', 'true');\n addClass(el, 'highcharts-linked-description');\n }\n }\n /**\n * @private\n * @param {string} regionKey\n * The name/key of the region to update\n */\n updateScreenReaderSection(regionKey) {\n const chart = this.chart;\n const region = this.screenReaderSections[regionKey];\n const content = region.buildContent(chart);\n const sectionDiv = region.element = (region.element || this.createElement('div'));\n const hiddenDiv = (sectionDiv.firstChild || this.createElement('div'));\n if (content) {\n this.setScreenReaderSectionAttribs(sectionDiv, regionKey);\n AST.setElementHTML(hiddenDiv, content);\n sectionDiv.appendChild(hiddenDiv);\n region.insertIntoDOM(sectionDiv, chart);\n // Apply inline hidden styles too as the class alone depends on\n // `highcharts.css` being loaded\n visuallyHideElement(hiddenDiv);\n if (chart.styledMode) {\n addClass(hiddenDiv, 'highcharts-visually-hidden');\n }\n unhideChartElementFromAT(chart, hiddenDiv);\n if (region.afterInserted) {\n region.afterInserted();\n }\n }\n else {\n if (sectionDiv.parentNode) {\n sectionDiv.parentNode.removeChild(sectionDiv);\n }\n region.element = null;\n }\n }\n /**\n * Apply a11y attributes to a screen reader info section\n * @private\n * @param {Highcharts.HTMLDOMElement} sectionDiv The section element\n * @param {string} regionKey Name/key of the region we are setting attrs for\n */\n setScreenReaderSectionAttribs(sectionDiv, regionKey) {\n const chart = this.chart, labelText = chart.langFormat('accessibility.screenReaderSection.' + regionKey +\n 'RegionLabel', { chart: chart, chartTitle: getChartTitle(chart) }), sectionId = `highcharts-screen-reader-region-${regionKey}-${chart.index}`;\n attr(sectionDiv, {\n id: sectionId,\n 'aria-label': labelText || void 0\n });\n // Sections are wrapped to be positioned relatively to chart in case\n // elements inside are tabbed to.\n sectionDiv.style.position = 'relative';\n if (labelText) {\n sectionDiv.setAttribute('role', chart.options.accessibility.landmarkVerbosity === 'all' ?\n 'region' : 'group');\n }\n }\n /**\n * @private\n */\n defaultBeforeChartFormatter() {\n const chart = this.chart, format = chart.options.accessibility.screenReaderSection\n .beforeChartFormat;\n if (!format) {\n return '';\n }\n const axesDesc = this.getAxesDescription(), shouldHaveSonifyBtn = (chart.sonify &&\n chart.options.sonification &&\n chart.options.sonification.enabled), sonifyButtonId = 'highcharts-a11y-sonify-data-btn-' +\n chart.index, dataTableButtonId = 'hc-linkto-highcharts-data-table-' +\n chart.index, annotationsList = getAnnotationsInfoHTML(chart), annotationsTitleStr = chart.langFormat('accessibility.screenReaderSection.annotations.heading', { chart: chart }), context = {\n headingTagName: getHeadingTagNameForElement(chart.renderTo),\n chartTitle: getChartTitle(chart),\n typeDescription: this.getTypeDescriptionText(),\n chartSubtitle: this.getSubtitleText(),\n chartLongdesc: this.getLongdescText(),\n xAxisDescription: axesDesc.xAxis,\n yAxisDescription: axesDesc.yAxis,\n playAsSoundButton: shouldHaveSonifyBtn ?\n this.getSonifyButtonText(sonifyButtonId) : '',\n viewTableButton: chart.exporting?.getCSV ?\n this.getDataTableButtonText(dataTableButtonId) : '',\n annotationsTitle: annotationsList ? annotationsTitleStr : '',\n annotationsList: annotationsList\n }, formattedString = A11yI18n.i18nFormat(format, context, chart);\n this.dataTableButtonId = dataTableButtonId;\n this.sonifyButtonId = sonifyButtonId;\n return stripEmptyHTMLTags(formattedString);\n }\n /**\n * @private\n */\n defaultAfterChartFormatter() {\n const chart = this.chart;\n const format = chart.options.accessibility.screenReaderSection\n .afterChartFormat;\n if (!format) {\n return '';\n }\n const context = { endOfChartMarker: this.getEndOfChartMarkerText() };\n const formattedString = A11yI18n.i18nFormat(format, context, chart);\n return stripEmptyHTMLTags(formattedString);\n }\n /**\n * @private\n */\n getLinkedDescription() {\n const el = this.linkedDescriptionElement, content = el && el.innerHTML || '';\n return stripHTMLTagsFromString(content, this.chart.renderer.forExport);\n }\n /**\n * @private\n */\n getLongdescText() {\n const chartOptions = this.chart.options, captionOptions = chartOptions.caption, captionText = captionOptions && captionOptions.text, linkedDescription = this.getLinkedDescription();\n return (chartOptions.accessibility.description ||\n linkedDescription ||\n captionText ||\n '');\n }\n /**\n * @private\n */\n getTypeDescriptionText() {\n const chart = this.chart;\n return chart.types ?\n chart.options.accessibility.typeDescription ||\n getTypeDescription(chart, chart.types) : '';\n }\n /**\n * @private\n */\n getDataTableButtonText(buttonId) {\n const chart = this.chart, buttonText = chart.langFormat('accessibility.table.viewAsDataTableButtonText', { chart: chart, chartTitle: getChartTitle(chart) });\n return '<button id=\"' + buttonId + '\">' + buttonText + '</button>';\n }\n /**\n * @private\n */\n getSonifyButtonText(buttonId) {\n const chart = this.chart;\n if (chart.options.sonification &&\n chart.options.sonification.enabled === false) {\n return '';\n }\n const buttonText = chart.langFormat('accessibility.sonification.playAsSoundButtonText', { chart: chart, chartTitle: getChartTitle(chart) });\n return '<button id=\"' + buttonId + '\">' + buttonText + '</button>';\n }\n /**\n * @private\n */\n getSubtitleText() {\n const subtitle = (this.chart.options.subtitle);\n return stripHTMLTagsFromString(subtitle && subtitle.text || '', this.chart.renderer.forExport);\n }\n /**\n * @private\n */\n getEndOfChartMarkerText() {\n const endMarkerId = `highcharts-end-of-chart-marker-${this.chart.index}`, endMarker = getElement(endMarkerId);\n if (endMarker) {\n return endMarker.outerHTML;\n }\n const chart = this.chart, markerText = chart.langFormat('accessibility.screenReaderSection.endOfChartMarker', { chart: chart }), id = 'highcharts-end-of-chart-marker-' + chart.index;\n return '<div id=\"' + id + '\">' + markerText + '</div>';\n }\n /**\n * @private\n * @param {Highcharts.Dictionary<string>} e\n */\n onDataTableCreated(e) {\n const chart = this.chart;\n if (chart.options.accessibility.enabled) {\n if (this.viewDataTableButton) {\n this.viewDataTableButton.setAttribute('aria-expanded', 'true');\n }\n const attributes = e.tree.attributes || {};\n attributes.tabindex = -1;\n attributes.summary = getTableSummary(chart);\n e.tree.attributes = attributes;\n }\n }\n /**\n * @private\n */\n focusDataTable() {\n const tableDiv = this.dataTableDiv, table = tableDiv && tableDiv.getElementsByTagName('table')[0];\n if (table && table.focus) {\n table.focus();\n }\n }\n /**\n * @private\n * @param {string} sonifyButtonId\n */\n initSonifyButton(sonifyButtonId) {\n const el = this.sonifyButton = getElement(sonifyButtonId);\n const chart = this.chart;\n const defaultHandler = (e) => {\n if (el) {\n el.setAttribute('aria-hidden', 'true');\n el.setAttribute('aria-label', '');\n }\n e.preventDefault();\n e.stopPropagation();\n const announceMsg = chart.langFormat('accessibility.sonification.playAsSoundClickAnnouncement', { chart: chart });\n this.announcer.announce(announceMsg);\n setTimeout(() => {\n if (el) {\n el.removeAttribute('aria-hidden');\n el.removeAttribute('aria-label');\n }\n if (chart.sonify) {\n chart.sonify();\n }\n }, 1000); // Delay to let screen reader speak the button press\n };\n if (el && chart) {\n el.setAttribute('tabindex', -1);\n el.onclick = function (e) {\n const onPlayAsSoundClick = (chart.options.accessibility &&\n chart.options.accessibility.screenReaderSection\n .onPlayAsSoundClick);\n (onPlayAsSoundClick || defaultHandler).call(this, e, chart, this);\n };\n }\n }\n /**\n * Set attribs and handlers for default viewAsDataTable button if exists.\n * @private\n * @param {string} tableButtonId\n */\n initDataTableButton(tableButtonId) {\n const el = this.viewDataTableButton = getElement(tableButtonId), chart = this.chart, tableId = tableButtonId.replace('hc-linkto-', '');\n if (el) {\n attr(el, {\n tabindex: -1,\n 'aria-expanded': !!getElement(tableId)\n });\n el.onclick = chart.options.accessibility\n .screenReaderSection.onViewDataTableClick ||\n function () {\n chart.exporting?.viewData();\n };\n }\n }\n /**\n * Return object with text description of each of the chart's axes.\n * @private\n */\n getAxesDescription() {\n const chart = this.chart, shouldDescribeColl = function (collectionKey, defaultCondition) {\n const axes = chart[collectionKey];\n return axes.length > 1 || axes[0] &&\n pick(axes[0].options.accessibility &&\n axes[0].options.accessibility.enabled, defaultCondition);\n }, hasNoMap = !!chart.types &&\n chart.types.indexOf('map') < 0 &&\n chart.types.indexOf('treemap') < 0 &&\n chart.types.indexOf('tilemap') < 0, hasCartesian = !!chart.hasCartesianSeries, showXAxes = shouldDescribeColl('xAxis', !chart.angular && hasCartesian && hasNoMap), showYAxes = shouldDescribeColl('yAxis', hasCartesian && hasNoMap), desc = {};\n if (showXAxes) {\n desc.xAxis = this.getAxisDescriptionText('xAxis');\n }\n if (showYAxes) {\n desc.yAxis = this.getAxisDescriptionText('yAxis');\n }\n return desc;\n }\n /**\n * @private\n */\n getAxisDescriptionText(collectionKey) {\n const chart = this.chart;\n const axes = chart[collectionKey];\n return chart.langFormat('accessibility.axis.' + collectionKey + 'Description' + (axes.length > 1 ? 'Plural' : 'Singular'), {\n chart: chart,\n names: axes.map(function (axis) {\n return getAxisDescription(axis);\n }),\n ranges: axes.map(function (axis) {\n return getAxisRangeDescription(axis);\n }),\n numAxes: axes.length\n });\n }\n /**\n * Remove component traces\n */\n destroy() {\n if (this.announcer) {\n this.announcer.destroy();\n }\n }\n}\n/* *\n *\n * Default Export\n *\n * */\nexport default InfoRegionsComponent;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Accessibility component for exporting menu.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport AccessibilityComponent from '../AccessibilityComponent.js';\nimport KeyboardNavigationHandler from '../KeyboardNavigationHandler.js';\nimport ChartUtilities from '../Utils/ChartUtilities.js';\nconst { getChartTitle, unhideChartElementFromAT } = ChartUtilities;\nimport HTMLUtilities from '../Utils/HTMLUtilities.js';\nimport { attr } from '../../Shared/Utilities.js';\nconst { getFakeMouseEvent } = HTMLUtilities;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Get the wrapped export button element of a chart.\n * @private\n */\nfunction getExportMenuButtonElement(chart) {\n return chart.exporting?.svgElements?.[0];\n}\n/**\n * @private\n */\nfunction exportingShouldHaveA11y(chart) {\n const exportingOpts = chart.options.exporting, exportButton = getExportMenuButtonElement(chart);\n return !!(exportingOpts &&\n exportingOpts.enabled !== false &&\n exportingOpts.accessibility &&\n exportingOpts.accessibility.enabled &&\n exportButton &&\n exportButton.element);\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * The MenuComponent class\n *\n * @private\n * @class\n * @name Highcharts.MenuComponent\n */\nclass MenuComponent extends AccessibilityComponent {\n /* *\n *\n * Functions\n *\n * */\n /**\n * Init the component\n */\n init() {\n const chart = this.chart, component = this;\n this.addEvent(chart, 'exportMenuShown', function () {\n component.onMenuShown();\n });\n this.addEvent(chart, 'exportMenuHidden', function () {\n component.onMenuHidden();\n });\n this.createProxyGroup();\n }\n /**\n * @private\n */\n onMenuHidden() {\n const menu = this.chart.exporting?.contextMenuEl;\n if (menu) {\n menu.setAttribute('aria-hidden', 'true');\n }\n this.setExportButtonExpandedState('false');\n }\n /**\n * @private\n */\n onMenuShown() {\n const chart = this.chart, menu = chart.exporting?.contextMenuEl;\n if (menu) {\n this.addAccessibleContextMenuAttribs();\n unhideChartElementFromAT(chart, menu);\n }\n this.setExportButtonExpandedState('true');\n }\n /**\n * @private\n * @param {string} stateStr\n */\n setExportButtonExpandedState(stateStr) {\n if (this.exportButtonProxy) {\n this.exportButtonProxy.innerElement.setAttribute('aria-expanded', stateStr);\n }\n }\n /**\n * Called on each render of the chart. We need to update positioning of the\n * proxy overlay.\n */\n onChartRender() {\n const chart = this.chart, focusEl = chart.focusElement, a11y = chart.accessibility;\n this.proxyProvider.clearGroup('chartMenu');\n this.proxyMenuButton();\n if (this.exportButtonProxy &&\n focusEl &&\n focusEl === chart.exporting?.group) {\n if (focusEl.focusBorder) {\n chart.setFocusToElement(focusEl, this.exportButtonProxy.innerElement);\n }\n else if (a11y) {\n a11y.keyboardNavigation.tabindexContainer.focus();\n }\n }\n }\n /**\n * @private\n */\n proxyMenuButton() {\n const chart = this.chart;\n const proxyProvider = this.proxyProvider;\n const buttonEl = getExportMenuButtonElement(chart);\n if (exportingShouldHaveA11y(chart) && buttonEl) {\n this.exportButtonProxy = proxyProvider.addProxyElement('chartMenu', { click: buttonEl }, 'button', {\n 'aria-label': chart.langFormat('accessibility.exporting.menuButtonLabel', {\n chart: chart,\n chartTitle: getChartTitle(chart)\n }),\n 'aria-expanded': false,\n title: chart.options.lang.contextButtonTitle || null\n });\n }\n }\n /**\n * @private\n */\n createProxyGroup() {\n const chart = this.chart;\n if (chart && this.proxyProvider) {\n this.proxyProvider.addGroup('chartMenu');\n }\n }\n /**\n * @private\n */\n addAccessibleContextMenuAttribs() {\n const chart = this.chart, exportList = chart.exporting?.divElements;\n if (exportList && exportList.length) {\n // Set tabindex on the menu items to allow focusing by script\n // Set role to give screen readers a chance to pick up the contents\n exportList.forEach((item) => {\n if (item) {\n if (item.tagName === 'LI' &&\n !(item.children && item.children.length)) {\n item.setAttribute('tabindex', -1);\n }\n else {\n item.setAttribute('aria-hidden', 'true');\n }\n }\n });\n // Set accessibility properties on parent div\n const parentDiv = (exportList[0] && exportList[0].parentNode);\n if (parentDiv) {\n attr(parentDiv, {\n 'aria-hidden': void 0,\n 'aria-label': chart.langFormat('accessibility.exporting.chartMenuLabel', { chart }),\n role: 'list' // Needed for webkit/VO\n });\n }\n }\n }\n /**\n * Get keyboard navigation handler for this component.\n * @private\n */\n getKeyboardNavigation() {\n const keys = this.keyCodes, chart = this.chart, component = this;\n return new KeyboardNavigationHandler(chart, {\n keyCodeMap: [\n // Arrow prev handler\n [\n [keys.left, keys.up],\n function () {\n return component.onKbdPrevious(this);\n }\n ],\n // Arrow next handler\n [\n [keys.right, keys.down],\n function () {\n return component.onKbdNext(this);\n }\n ],\n // Click handler\n [\n [keys.enter, keys.space],\n function () {\n return component.onKbdClick(this);\n }\n ]\n ],\n // Only run exporting navigation if exporting support exists and is\n // enabled on chart\n validate: function () {\n return !!chart.exporting &&\n chart\n .options\n .exporting\n ?.buttons\n ?.contextButton.enabled !== false &&\n chart.options.exporting.enabled !== false &&\n (chart.options.exporting.accessibility?.enabled || false) !== false;\n },\n // Focus export menu button\n init: function () {\n const proxy = component.exportButtonProxy;\n const svgEl = component.chart.exporting?.group;\n if (proxy && svgEl) {\n chart.setFocusToElement(svgEl, proxy.innerElement);\n }\n },\n // Hide the menu\n terminate: function () {\n chart.hideExportMenu();\n }\n });\n }\n /**\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} keyboardNavigationHandler\n * @return {number} Response code\n */\n onKbdPrevious(keyboardNavigationHandler) {\n const chart = this.chart;\n const a11yOptions = chart.options.accessibility;\n const response = keyboardNavigationHandler.response;\n // Try to highlight prev item in list. Highlighting e.g.\n // separators will fail.\n let i = chart.highlightedExportItemIx || 0;\n while (i--) {\n if (chart.highlightExportItem(i)) {\n return response.success;\n }\n }\n // We failed, so wrap around or move to prev module\n if (a11yOptions.keyboardNavigation.wrapAround) {\n chart.highlightLastExportItem();\n return response.success;\n }\n return response.prev;\n }\n /**\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} keyboardNavigationHandler\n * @return {number} Response code\n */\n onKbdNext(keyboardNavigationHandler) {\n const chart = this.chart;\n const a11yOptions = chart.options.accessibility;\n const response = keyboardNavigationHandler.response;\n // Try to highlight next item in list. Highlighting e.g.\n // separators will fail.\n for (let i = (chart.highlightedExportItemIx || 0) + 1; i < (chart.exporting?.divElements?.length || 0); ++i) {\n if (chart.highlightExportItem(i)) {\n return response.success;\n }\n }\n // We failed, so wrap around or move to next module\n if (a11yOptions.keyboardNavigation.wrapAround) {\n chart.highlightExportItem(0);\n return response.success;\n }\n return response.next;\n }\n /**\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} keyboardNavigationHandler\n * @return {number} Response code\n */\n onKbdClick(keyboardNavigationHandler) {\n const chart = this.chart;\n const curHighlightedItem = chart.highlightedExportItemIx !== void 0 &&\n chart.exporting?.divElements?.[chart.highlightedExportItemIx];\n const exportButtonElement = getExportMenuButtonElement(chart)?.element;\n if (chart.exporting?.openMenu) {\n curHighlightedItem && this.fakeClickEvent(curHighlightedItem);\n }\n else {\n exportButtonElement && this.fakeClickEvent(exportButtonElement);\n chart.highlightExportItem(0);\n }\n return keyboardNavigationHandler.response.success;\n }\n}\n/* *\n *\n * Class Namespace\n *\n * */\n(function (MenuComponent) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * @private\n */\n function compose(ChartClass) {\n const chartProto = ChartClass.prototype;\n if (!chartProto.hideExportMenu) {\n chartProto.hideExportMenu = chartHideExportMenu;\n chartProto.highlightExportItem = chartHighlightExportItem;\n chartProto.highlightLastExportItem = chartHighlightLastExportItem;\n chartProto.showExportMenu = chartShowExportMenu;\n }\n }\n MenuComponent.compose = compose;\n /**\n * Show the export menu and focus the first item (if exists).\n *\n * @private\n * @function Highcharts.Chart#showExportMenu\n */\n function chartShowExportMenu() {\n const exportButton = getExportMenuButtonElement(this);\n if (exportButton) {\n const el = exportButton.element;\n if (el.onclick) {\n el.onclick = function () {\n getFakeMouseEvent('click');\n };\n }\n }\n }\n /**\n * @private\n * @function Highcharts.Chart#hideExportMenu\n */\n function chartHideExportMenu() {\n const chart = this, exportList = chart.exporting?.divElements;\n if (exportList &&\n chart.exporting?.contextMenuEl &&\n chart.exporting?.openMenu) {\n // Reset hover states etc.\n exportList.forEach((el) => {\n if (el &&\n el.className === 'highcharts-menu-item' &&\n el.onmouseout) {\n el.onmouseout(getFakeMouseEvent('mouseout'));\n }\n });\n chart.highlightedExportItemIx = 0;\n // Hide the menu div\n chart.exporting.contextMenuEl.hideMenu();\n // Make sure the chart has focus and can capture keyboard events\n chart.container.focus();\n }\n }\n /**\n * Highlight export menu item by index.\n *\n * @private\n * @function Highcharts.Chart#highlightExportItem\n */\n function chartHighlightExportItem(ix) {\n const listItem = this.exporting?.divElements?.[ix], curHighlighted = this.highlightedExportItemIx !== void 0 &&\n this.exporting?.divElements?.[this.highlightedExportItemIx];\n if (listItem &&\n listItem.tagName === 'LI' &&\n !(listItem.children && listItem.children.length)) {\n // Test if we have focus support for SVG elements\n const hasSVGFocusSupport = !!(this.renderTo.getElementsByTagName('g')[0] || {}).focus;\n // Only focus if we can set focus back to the elements after\n // destroying the menu (#7422)\n if (listItem.focus && hasSVGFocusSupport) {\n listItem.focus();\n }\n if (curHighlighted && curHighlighted.onmouseout) {\n curHighlighted.onmouseout(getFakeMouseEvent('mouseout'));\n }\n if (listItem.onmouseover) {\n listItem.onmouseover(getFakeMouseEvent('mouseover'));\n }\n this.highlightedExportItemIx = ix;\n return true;\n }\n return false;\n }\n /**\n * Try to highlight the last valid export menu item.\n *\n * @private\n * @function Highcharts.Chart#highlightLastExportItem\n */\n function chartHighlightLastExportItem() {\n const chart = this;\n if (chart.exporting?.divElements) {\n let i = chart.exporting?.divElements.length;\n while (i--) {\n if (chart.highlightExportItem(i)) {\n return true;\n }\n }\n }\n return false;\n }\n})(MenuComponent || (MenuComponent = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default MenuComponent;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Main keyboard navigation handling.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport H from '../Core/Globals.js';\nconst { doc, win } = H;\nimport MenuComponent from './Components/MenuComponent.js';\nimport EventProvider from './Utils/EventProvider.js';\nimport HTMLUtilities from './Utils/HTMLUtilities.js';\nimport { addEvent, defined, fireEvent } from '../Shared/Utilities.js';\nconst { getElement, simulatedEventTarget } = HTMLUtilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * The KeyboardNavigation class, containing the overall keyboard navigation\n * logic for the chart.\n *\n * @requires modules/accessibility\n *\n * @private\n * @class\n * @param {Highcharts.Chart} chart\n * Chart object\n * @param {Object} components\n * Map of component names to AccessibilityComponent objects.\n * @name Highcharts.KeyboardNavigation\n */\nclass KeyboardNavigation {\n /* *\n *\n * Constructor\n *\n * */\n constructor(chart, components) {\n this.currentModuleIx = NaN;\n this.modules = [];\n this.init(chart, components);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Initialize the class\n * @private\n * @param {Highcharts.Chart} chart\n * Chart object\n * @param {Object} components\n * Map of component names to AccessibilityComponent objects.\n */\n init(chart, components) {\n const ep = this.eventProvider = new EventProvider();\n this.chart = chart;\n this.components = components;\n this.modules = [];\n this.currentModuleIx = 0;\n this.update();\n ep.addEvent(this.tabindexContainer, 'keydown', (e) => this.onKeydown(e));\n ep.addEvent(this.tabindexContainer, 'focus', (e) => this.onFocus(e));\n ['mouseup', 'touchend'].forEach((eventName) => ep.addEvent(doc, eventName, (e) => this.onMouseUp(e)));\n ['mousedown', 'touchstart'].forEach((eventName) => ep.addEvent(chart.renderTo, eventName, () => {\n this.isClickingChart = true;\n }));\n }\n /**\n * Update the modules for the keyboard navigation.\n * @param {Array<string>} [order]\n * Array specifying the tab order of the components.\n */\n update(order) {\n const a11yOptions = this.chart.options.accessibility, keyboardOptions = a11yOptions && a11yOptions.keyboardNavigation, components = this.components;\n this.updateContainerTabindex();\n if (keyboardOptions &&\n keyboardOptions.enabled &&\n order &&\n order.length) {\n // We (still) have keyboard navigation. Update module list\n this.modules = order.reduce(function (modules, componentName) {\n const navModules = components[componentName]\n .getKeyboardNavigation();\n return modules.concat(navModules);\n }, []);\n this.updateExitAnchor();\n }\n else {\n this.modules = [];\n this.currentModuleIx = 0;\n this.removeExitAnchor();\n }\n }\n /**\n * We use an exit anchor to move focus out of chart whenever we want, by\n * setting focus to this div and not preventing the default tab action. We\n * also use this when users come back into the chart by tabbing back, in\n * order to navigate from the end of the chart.\n * @private\n */\n updateExitAnchor() {\n const endMarkerId = `highcharts-end-of-chart-marker-${this.chart.index}`, endMarker = getElement(endMarkerId);\n this.removeExitAnchor();\n if (endMarker) {\n this.makeElementAnExitAnchor(endMarker);\n this.exitAnchor = endMarker;\n }\n else {\n this.createExitAnchor();\n }\n }\n /**\n * Move to prev/next module.\n * @private\n * @param {number} direction\n * Direction to move. +1 for next, -1 for prev.\n * @return {boolean}\n * True if there was a valid module in direction.\n */\n move(direction) {\n const curModule = this.modules && this.modules[this.currentModuleIx];\n if (curModule && curModule.terminate) {\n curModule.terminate(direction);\n }\n // Remove existing focus border if any\n if (this.chart.focusElement) {\n this.chart.focusElement.removeFocusBorder();\n }\n this.currentModuleIx += direction;\n const newModule = this.modules && this.modules[this.currentModuleIx];\n if (newModule) {\n if (newModule.validate && !newModule.validate()) {\n return this.move(direction); // Invalid module, recurse\n }\n if (newModule.init) {\n newModule.init(direction); // Valid module, init it\n return true;\n }\n }\n // No module\n this.currentModuleIx = 0; // Reset counter\n // Set focus to chart or exit anchor depending on direction\n this.exiting = true;\n if (direction > 0) {\n this.exitAnchor && this.exitAnchor.focus();\n }\n else {\n this.tabindexContainer.focus();\n }\n return false;\n }\n /**\n * Function to run on container focus\n * @private\n * @param {global.FocusEvent} e Browser focus event.\n */\n onFocus(e) {\n const chart = this.chart, focusComesFromChart = (e.relatedTarget &&\n chart.container.contains(e.relatedTarget)), a11yOptions = chart.options.accessibility, keyboardOptions = a11yOptions && a11yOptions.keyboardNavigation, enabled = keyboardOptions && keyboardOptions.enabled;\n // Init keyboard nav if tabbing into chart\n if (enabled &&\n !this.exiting &&\n !this.tabbingInBackwards &&\n !this.isClickingChart &&\n !focusComesFromChart) {\n const ix = this.getFirstValidModuleIx();\n if (ix !== null) {\n this.currentModuleIx = ix;\n this.modules[ix].init(1);\n }\n }\n this.keyboardReset = false;\n this.exiting = false;\n }\n /**\n * Reset chart navigation state if we mouse click and it's not already\n * reset. Reset fully if outside the chart, otherwise just hide focus\n * indicator.\n * @private\n */\n onMouseUp(e) {\n delete this.isClickingChart;\n if (!this.keyboardReset &&\n e.relatedTarget !== simulatedEventTarget) {\n const chart = this.chart;\n if (!e.target ||\n !chart.container.contains(e.target)) {\n const curMod = this.modules &&\n this.modules[this.currentModuleIx || 0];\n if (curMod && curMod.terminate) {\n curMod.terminate();\n }\n this.currentModuleIx = 0;\n }\n if (chart.focusElement) {\n chart.focusElement.removeFocusBorder();\n delete chart.focusElement;\n }\n this.keyboardReset = true;\n }\n }\n /**\n * Function to run on keydown\n * @private\n * @param {global.KeyboardEvent} ev Browser keydown event.\n */\n onKeydown(ev) {\n const e = ev || win.event, curNavModule = (this.modules &&\n this.modules.length &&\n this.modules[this.currentModuleIx]);\n let preventDefault;\n const target = e.target;\n if (target &&\n target.nodeName === 'INPUT' &&\n !target.classList.contains('highcharts-a11y-proxy-element')) {\n return;\n }\n // Used for resetting nav state when clicking outside chart\n this.keyboardReset = false;\n // Used for sending focus out of the chart by the modules.\n this.exiting = false;\n // If there is a nav module for the current index, run it.\n // Otherwise, we are outside of the chart in some direction.\n if (curNavModule) {\n const response = curNavModule.run(e);\n if (response === curNavModule.response.success) {\n preventDefault = true;\n }\n else if (response === curNavModule.response.prev) {\n preventDefault = this.move(-1);\n }\n else if (response === curNavModule.response.next) {\n preventDefault = this.move(1);\n }\n if (preventDefault) {\n e.preventDefault();\n e.stopPropagation();\n }\n }\n }\n /**\n * Chart container should have tabindex if navigation is enabled.\n * @private\n */\n updateContainerTabindex() {\n const a11yOptions = this.chart.options.accessibility, keyboardOptions = a11yOptions && a11yOptions.keyboardNavigation, shouldHaveTabindex = !(keyboardOptions && keyboardOptions.enabled === false), chart = this.chart, container = chart.container;\n let tabindexContainer;\n if (chart.renderTo.hasAttribute('tabindex')) {\n container.removeAttribute('tabindex');\n tabindexContainer = chart.renderTo;\n }\n else {\n tabindexContainer = container;\n }\n this.tabindexContainer = tabindexContainer;\n const curTabindex = tabindexContainer.getAttribute('tabindex');\n if (shouldHaveTabindex && !curTabindex) {\n tabindexContainer.setAttribute('tabindex', '0');\n }\n else if (!shouldHaveTabindex) {\n chart.container.removeAttribute('tabindex');\n }\n }\n /**\n * Add new exit anchor to the chart.\n * @private\n */\n createExitAnchor() {\n const chart = this.chart, exitAnchor = this.exitAnchor = doc.createElement('div');\n chart.renderTo.appendChild(exitAnchor);\n this.makeElementAnExitAnchor(exitAnchor);\n }\n /**\n * Add attributes and events to an element to make it function as an\n * exit anchor.\n * @private\n */\n makeElementAnExitAnchor(el) {\n const chartTabindex = this.tabindexContainer.getAttribute('tabindex') || 0;\n el.setAttribute('class', 'highcharts-exit-anchor');\n el.setAttribute('tabindex', chartTabindex);\n el.setAttribute('aria-hidden', false);\n // Handle focus\n this.addExitAnchorEventsToEl(el);\n }\n /**\n * Destroy the exit anchor and remove from DOM.\n * @private\n */\n removeExitAnchor() {\n // Remove event from element and from eventRemovers array to prevent\n // memory leak (#20329).\n if (this.exitAnchor) {\n const el = this.eventProvider.eventRemovers.find((el) => el.element === this.exitAnchor);\n if (el && defined(el.remover)) {\n this.eventProvider.removeEvent(el.remover);\n }\n if (this.exitAnchor.parentNode) {\n this.exitAnchor.parentNode.removeChild(this.exitAnchor);\n }\n delete this.exitAnchor;\n }\n }\n /**\n * Add focus handler to exit anchor element.\n * @private\n */\n addExitAnchorEventsToEl(element) {\n const chart = this.chart, keyboardNavigation = this;\n this.eventProvider.addEvent(element, 'focus', function (ev) {\n const e = ev || win.event, focusComesFromChart = (e.relatedTarget &&\n chart.container.contains(e.relatedTarget)), comingInBackwards = !(focusComesFromChart || keyboardNavigation.exiting);\n if (chart.focusElement) {\n delete chart.focusElement;\n }\n if (comingInBackwards) {\n // Focus the container instead\n keyboardNavigation.tabbingInBackwards = true;\n keyboardNavigation.tabindexContainer.focus();\n delete keyboardNavigation.tabbingInBackwards;\n e.preventDefault();\n // Move to last valid keyboard nav module\n // Note the we don't run it, just set the index\n if (keyboardNavigation.modules &&\n keyboardNavigation.modules.length) {\n keyboardNavigation.currentModuleIx =\n keyboardNavigation.modules.length - 1;\n const curModule = keyboardNavigation.modules[keyboardNavigation.currentModuleIx];\n // Validate the module\n if (curModule &&\n curModule.validate && !curModule.validate()) {\n // Invalid.\n // Try moving backwards to find next valid.\n keyboardNavigation.move(-1);\n }\n else if (curModule) {\n // We have a valid module, init it\n curModule.init(-1);\n }\n }\n }\n else {\n // Don't skip the next focus, we only skip once.\n keyboardNavigation.exiting = false;\n }\n });\n }\n /**\n * Get the ix of the first module that either does not require validation or\n * validates positively.\n * @private\n */\n getFirstValidModuleIx() {\n const len = this.modules.length;\n for (let i = 0; i < len; ++i) {\n const mod = this.modules[i];\n if (!mod.validate || mod.validate()) {\n return i;\n }\n }\n return null;\n }\n /**\n * Remove all traces of keyboard navigation.\n * @private\n */\n destroy() {\n this.removeExitAnchor();\n this.eventProvider.removeAddedEvents();\n this.chart.container.removeAttribute('tabindex');\n }\n}\n/* *\n *\n * Class Namespace\n *\n * */\n(function (KeyboardNavigation) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * Composition function.\n * @private\n */\n function compose(ChartClass) {\n MenuComponent.compose(ChartClass);\n const chartProto = ChartClass.prototype;\n if (!chartProto.dismissPopupContent) {\n chartProto.dismissPopupContent = chartDismissPopupContent;\n if (doc) {\n addEvent(doc, 'keydown', documentOnKeydown);\n }\n }\n return ChartClass;\n }\n KeyboardNavigation.compose = compose;\n /**\n * Dismiss popup content in chart, including export menu and tooltip.\n * @private\n */\n function chartDismissPopupContent() {\n const chart = this;\n fireEvent(this, 'dismissPopupContent', {}, function () {\n if (chart.tooltip) {\n chart.tooltip.hide(0);\n }\n chart.hideExportMenu();\n });\n }\n /**\n * Add event listener to document to detect ESC key press and dismiss\n * hover/popup content.\n * @private\n */\n function documentOnKeydown(e) {\n const keycode = e.which || e.keyCode;\n const esc = 27;\n if (keycode === esc && H.charts) {\n H.charts.forEach((chart) => {\n if (chart && chart.dismissPopupContent) {\n chart.dismissPopupContent();\n }\n });\n }\n }\n})(KeyboardNavigation || (KeyboardNavigation = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default KeyboardNavigation;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Accessibility component for chart legend.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport A from '../../Core/Animation/AnimationUtilities.js';\nconst { animObject } = A;\nimport H from '../../Core/Globals.js';\nconst { doc } = H;\nimport Legend from '../../Core/Legend/Legend.js';\nimport AccessibilityComponent from '../AccessibilityComponent.js';\nimport KeyboardNavigationHandler from '../KeyboardNavigationHandler.js';\nimport CU from '../Utils/ChartUtilities.js';\nconst { getChartTitle } = CU;\nimport HU from '../Utils/HTMLUtilities.js';\nimport { addEvent, fireEvent, isNumber, pick, syncTimeout } from '../../Shared/Utilities.js';\nconst { stripHTMLTagsFromString: stripHTMLTags, addClass, removeClass } = HU;\n/* *\n *\n * Functions\n *\n * */\n/**\n * @private\n */\nfunction scrollLegendToItem(legend, itemIx) {\n const itemPage = (legend.allItems[itemIx].legendItem || {}).pageIx, curPage = legend.currentPage;\n if (typeof itemPage !== 'undefined' && itemPage + 1 !== curPage) {\n legend.scroll(1 + itemPage - curPage);\n }\n}\n/**\n * @private\n */\nfunction shouldDoLegendA11y(chart) {\n const items = chart.legend && chart.legend.allItems, legendA11yOptions = (chart.options.legend.accessibility || {}), unsupportedColorAxis = chart.colorAxis && chart.colorAxis.some((c) => !c.dataClasses || !c.dataClasses.length);\n return !!(items && items.length &&\n !unsupportedColorAxis &&\n legendA11yOptions.enabled !== false);\n}\n/**\n * @private\n */\nfunction setLegendItemHoverState(hoverActive, item) {\n const legendItem = item.legendItem || {};\n item.setState(hoverActive ? 'hover' : '', true);\n for (const key of ['group', 'label', 'symbol']) {\n const svgElement = legendItem[key];\n const element = svgElement && svgElement.element || svgElement;\n if (element) {\n fireEvent(element, hoverActive ? 'mouseover' : 'mouseout');\n }\n }\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * The LegendComponent class\n *\n * @private\n * @class\n * @name Highcharts.LegendComponent\n */\nclass LegendComponent extends AccessibilityComponent {\n constructor() {\n /* *\n *\n * Properties\n *\n * */\n super(...arguments);\n this.highlightedLegendItemIx = NaN;\n this.proxyGroup = null;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Init the component\n * @private\n */\n init() {\n const component = this;\n this.recreateProxies();\n // Note: Chart could create legend dynamically, so events cannot be\n // tied to the component's chart's current legend.\n // @todo 1. attach component to created legends\n // @todo 2. move listeners to composition and access `this.component`\n this.addEvent(Legend, 'afterScroll', function () {\n if (this.chart === component.chart) {\n component.proxyProvider.updateGroupProxyElementPositions('legend');\n component.updateLegendItemProxyVisibility();\n if (component.highlightedLegendItemIx > -1) {\n this.chart.highlightLegendItem(component.highlightedLegendItemIx);\n }\n }\n });\n this.addEvent(Legend, 'afterPositionItem', function (e) {\n if (this.chart === component.chart && this.chart.renderer) {\n component.updateProxyPositionForItem(e.item);\n }\n });\n this.addEvent(Legend, 'afterRender', function () {\n if (this.chart === component.chart &&\n this.chart.renderer &&\n component.recreateProxies()) {\n syncTimeout(() => component.proxyProvider\n .updateGroupProxyElementPositions('legend'), animObject(pick(this.chart.renderer.globalAnimation, true)).duration);\n }\n });\n }\n /**\n * Update visibility of legend items when using paged legend\n * @private\n */\n updateLegendItemProxyVisibility() {\n const chart = this.chart;\n const legend = chart.legend;\n const items = legend.allItems || [];\n const curPage = legend.currentPage || 1;\n const clipHeight = legend.clipHeight || 0;\n let legendItem;\n items.forEach((item) => {\n if (item.a11yProxyElement) {\n const hasPages = legend.pages && legend.pages.length;\n const proxyEl = item.a11yProxyElement.element;\n let hide = false;\n legendItem = item.legendItem || {};\n if (hasPages) {\n const itemPage = legendItem.pageIx || 0;\n const y = legendItem.y || 0;\n const h = legendItem.label ?\n Math.round(legendItem.label.getBBox().height) :\n 0;\n hide = y + h - legend.pages[itemPage] > clipHeight ||\n itemPage !== curPage - 1;\n }\n if (hide) {\n if (chart.styledMode) {\n addClass(proxyEl, 'highcharts-a11y-invisible');\n }\n else {\n proxyEl.style.visibility = 'hidden';\n }\n }\n else {\n removeClass(proxyEl, 'highcharts-a11y-invisible');\n proxyEl.style.visibility = '';\n }\n }\n });\n }\n /**\n * @private\n */\n onChartRender() {\n if (!shouldDoLegendA11y(this.chart)) {\n this.removeProxies();\n }\n }\n /**\n * @private\n */\n highlightAdjacentLegendPage(direction) {\n const chart = this.chart;\n const legend = chart.legend;\n const curPageIx = legend.currentPage || 1;\n const newPageIx = curPageIx + direction;\n const pages = legend.pages || [];\n if (newPageIx > 0 && newPageIx <= pages.length) {\n let i = 0, res;\n for (const item of legend.allItems) {\n if (((item.legendItem || {}).pageIx || 0) + 1 === newPageIx) {\n res = chart.highlightLegendItem(i);\n if (res) {\n this.highlightedLegendItemIx = i;\n }\n }\n ++i;\n }\n }\n }\n /**\n * @private\n */\n updateProxyPositionForItem(item) {\n if (item.a11yProxyElement) {\n item.a11yProxyElement.refreshPosition();\n }\n }\n /**\n * Returns false if legend a11y is disabled and proxies were not created,\n * true otherwise.\n * @private\n */\n recreateProxies() {\n const focusedElement = doc.activeElement;\n const proxyGroup = this.proxyGroup;\n const shouldRestoreFocus = focusedElement && proxyGroup &&\n proxyGroup.contains(focusedElement);\n this.removeProxies();\n if (shouldDoLegendA11y(this.chart)) {\n this.addLegendProxyGroup();\n this.proxyLegendItems();\n this.updateLegendItemProxyVisibility();\n this.updateLegendTitle();\n if (shouldRestoreFocus) {\n this.chart.highlightLegendItem(this.highlightedLegendItemIx);\n }\n return true;\n }\n return false;\n }\n /**\n * @private\n */\n removeProxies() {\n this.proxyProvider.removeGroup('legend');\n }\n /**\n * @private\n */\n updateLegendTitle() {\n const chart = this.chart;\n const legendTitle = stripHTMLTags((chart.legend &&\n chart.legend.options.title &&\n chart.legend.options.title.text ||\n '').replace(/<br ?\\/?>/g, ' '), chart.renderer.forExport);\n const legendLabel = chart.langFormat('accessibility.legend.legendLabel' + (legendTitle ? '' : 'NoTitle'), {\n chart,\n legendTitle,\n chartTitle: getChartTitle(chart)\n });\n this.proxyProvider.updateGroupAttrs('legend', {\n 'aria-label': legendLabel\n });\n }\n /**\n * @private\n */\n addLegendProxyGroup() {\n const a11yOptions = this.chart.options.accessibility;\n const groupRole = a11yOptions.landmarkVerbosity === 'all' ?\n 'region' : null;\n this.proxyGroup = this.proxyProvider.addGroup('legend', 'ul', {\n // Filled by updateLegendTitle, to keep up to date without\n // recreating group\n 'aria-label': '_placeholder_',\n role: groupRole\n });\n }\n /**\n * @private\n */\n proxyLegendItems() {\n const component = this, items = (this.chart.legend || {}).allItems || [];\n let legendItem;\n items.forEach((item) => {\n legendItem = item.legendItem || {};\n if (legendItem.label && legendItem.label.element) {\n component.proxyLegendItem(item);\n }\n });\n }\n /**\n * @private\n * @param {Highcharts.BubbleLegendItem|Point|Highcharts.Series} item\n */\n proxyLegendItem(item) {\n const legendItem = item.legendItem || {};\n const legendItemLabel = item.legendItem?.label;\n const legendLabelEl = legendItemLabel?.element;\n const ellipsis = Boolean(legendItem.label?.styles?.textOverflow === 'ellipsis');\n if (!legendItem.label || !legendItem.group) {\n return;\n }\n const itemLabel = this.chart.langFormat('accessibility.legend.legendItem', {\n chart: this.chart,\n itemName: stripHTMLTags(item.name, this.chart.renderer.forExport),\n item\n });\n const attribs = {\n tabindex: -1,\n 'aria-pressed': item.visible,\n 'aria-label': itemLabel,\n title: ''\n };\n // Check if label contains an ellipsis character (\\u2026) #22397\n if (ellipsis &&\n (legendLabelEl.textContent || '').indexOf('\\u2026') !== -1) {\n attribs.title = legendItemLabel?.textStr;\n }\n // Considers useHTML\n const proxyPositioningElement = legendItem.group.div ?\n legendItem.label :\n legendItem.group;\n item.a11yProxyElement = this.proxyProvider.addProxyElement('legend', {\n click: legendItem.label,\n visual: proxyPositioningElement.element\n }, 'button', attribs);\n }\n /**\n * Get keyboard navigation handler for this component.\n * @private\n */\n getKeyboardNavigation() {\n const keys = this.keyCodes, component = this, chart = this.chart;\n return new KeyboardNavigationHandler(chart, {\n keyCodeMap: [\n [\n [keys.left, keys.right, keys.up, keys.down],\n function (keyCode) {\n return component.onKbdArrowKey(this, keyCode);\n }\n ],\n [\n [keys.enter, keys.space],\n function () {\n return component.onKbdClick(this);\n }\n ],\n [\n [keys.pageDown, keys.pageUp],\n function (keyCode) {\n const direction = keyCode === keys.pageDown ? 1 : -1;\n component.highlightAdjacentLegendPage(direction);\n return this.response.success;\n }\n ]\n ],\n validate: function () {\n return component.shouldHaveLegendNavigation();\n },\n init: function () {\n chart.highlightLegendItem(0);\n component.highlightedLegendItemIx = 0;\n },\n terminate: function () {\n component.highlightedLegendItemIx = -1;\n chart.legend.allItems.forEach((item) => setLegendItemHoverState(false, item));\n }\n });\n }\n /**\n * Arrow key navigation\n * @private\n */\n onKbdArrowKey(keyboardNavigationHandler, key) {\n const { keyCodes: { left, up }, highlightedLegendItemIx, chart } = this, numItems = chart.legend.allItems.length, wrapAround = chart.options.accessibility\n .keyboardNavigation.wrapAround, direction = (key === left || key === up) ? -1 : 1, res = chart.highlightLegendItem(highlightedLegendItemIx + direction);\n if (res) {\n this.highlightedLegendItemIx += direction;\n }\n else if (wrapAround && numItems > 1) {\n this.highlightedLegendItemIx = direction > 0 ?\n 0 : numItems - 1;\n chart.highlightLegendItem(this.highlightedLegendItemIx);\n }\n return keyboardNavigationHandler.response.success;\n }\n /**\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} keyboardNavigationHandler\n * @return {number} Response code\n */\n onKbdClick(keyboardNavigationHandler) {\n const legendItem = this.chart.legend.allItems[this.highlightedLegendItemIx];\n if (legendItem && legendItem.a11yProxyElement) {\n legendItem.a11yProxyElement.click();\n }\n return keyboardNavigationHandler.response.success;\n }\n /**\n * @private\n */\n shouldHaveLegendNavigation() {\n if (!shouldDoLegendA11y(this.chart)) {\n return false;\n }\n const chart = this.chart, legendOptions = chart.options.legend || {}, legendA11yOptions = (legendOptions.accessibility || {});\n return !!(chart.legend.display &&\n legendA11yOptions.keyboardNavigation &&\n legendA11yOptions.keyboardNavigation.enabled);\n }\n /**\n * Clean up\n * @private\n */\n destroy() {\n this.removeProxies();\n }\n}\n/* *\n *\n * Class Namespace\n *\n * */\n(function (LegendComponent) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * Highlight legend item by index.\n * @private\n */\n function chartHighlightLegendItem(ix) {\n const items = this.legend.allItems;\n const oldIx = this.accessibility &&\n this.accessibility.components.legend.highlightedLegendItemIx;\n const itemToHighlight = items[ix], legendItem = itemToHighlight?.legendItem || {};\n if (itemToHighlight) {\n if (isNumber(oldIx) && items[oldIx]) {\n setLegendItemHoverState(false, items[oldIx]);\n }\n scrollLegendToItem(this.legend, ix);\n const legendItemProp = legendItem.label;\n const proxyBtn = itemToHighlight.a11yProxyElement &&\n itemToHighlight.a11yProxyElement.innerElement;\n if (legendItemProp && legendItemProp.element && proxyBtn) {\n this.setFocusToElement(legendItemProp, proxyBtn);\n }\n setLegendItemHoverState(true, itemToHighlight);\n return true;\n }\n return false;\n }\n /**\n * @private\n */\n function compose(ChartClass, LegendClass) {\n const chartProto = ChartClass.prototype;\n if (!chartProto.highlightLegendItem) {\n chartProto.highlightLegendItem = chartHighlightLegendItem;\n addEvent(LegendClass, 'afterColorizeItem', legendOnAfterColorizeItem);\n }\n }\n LegendComponent.compose = compose;\n /**\n * Keep track of pressed state for legend items.\n * @private\n */\n function legendOnAfterColorizeItem(e) {\n const chart = this.chart, a11yOptions = chart.options.accessibility, legendItem = e.item;\n if (a11yOptions.enabled && legendItem && legendItem.a11yProxyElement) {\n legendItem.a11yProxyElement.innerElement.setAttribute('aria-pressed', e.visible ? 'true' : 'false');\n }\n }\n})(LegendComponent || (LegendComponent = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default LegendComponent;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport H from '../../Core/Globals.js';\nconst { isTouchDevice } = H;\nimport { addEvent, merge, pick, pushUnique } from '../../Shared/Utilities.js';\n/* *\n *\n * Constants\n *\n * */\nconst composedMembers = [];\n/* *\n *\n * Variables\n *\n * */\nlet NavigatorConstructor;\n/* *\n *\n * Functions\n *\n * */\n/** @internal */\nfunction compose(ChartClass, NavigatorClass) {\n if (pushUnique(composedMembers, ChartClass)) {\n const chartProto = ChartClass.prototype;\n NavigatorConstructor = NavigatorClass;\n chartProto.callbacks.push(onChartCallback);\n addEvent(ChartClass, 'afterAddSeries', onChartAfterAddSeries);\n addEvent(ChartClass, 'afterSetChartSize', onChartAfterSetChartSize);\n addEvent(ChartClass, 'afterUpdate', onChartAfterUpdate);\n addEvent(ChartClass, 'beforeRender', onChartBeforeRender);\n addEvent(ChartClass, 'beforeShowResetZoom', onChartBeforeShowResetZoom);\n addEvent(ChartClass, 'update', onChartUpdate);\n }\n}\n/**\n * Handle adding new series.\n * @internal\n */\nfunction onChartAfterAddSeries() {\n if (this.navigator) {\n // Recompute which series should be shown in navigator, and add them\n this.navigator.setBaseSeries(null, false);\n }\n}\n/**\n * For stock charts, extend the Chart.setChartSize method so that we can set the\n * final top position of the navigator once the height of the chart, including\n * the legend, is determined. #367. We can't use Chart.getMargins, because\n * labels offsets are not calculated yet.\n * @internal\n */\nfunction onChartAfterSetChartSize() {\n const legend = this.legend, navigator = this.navigator;\n let legendOptions, xAxis, yAxis;\n if (navigator) {\n legendOptions = legend && legend.options;\n xAxis = navigator.xAxis;\n yAxis = navigator.yAxis;\n const { scrollbarHeight, scrollButtonSize } = navigator;\n // Compute the top position\n if (this.inverted) {\n navigator.left = navigator.opposite ?\n this.chartWidth - scrollbarHeight -\n navigator.height :\n this.spacing[3] + scrollbarHeight;\n navigator.top = this.plotTop + scrollButtonSize;\n }\n else {\n navigator.left = pick(xAxis.left, this.plotLeft + scrollButtonSize);\n navigator.top = navigator.navigatorOptions.top ||\n this.chartHeight -\n navigator.height -\n scrollbarHeight -\n (this.scrollbar?.options.margin || 0) -\n this.spacing[2] -\n (this.rangeSelector && this.extraBottomMargin ?\n this.rangeSelector.getHeight() :\n 0) -\n ((legendOptions &&\n legendOptions.verticalAlign === 'bottom' &&\n legendOptions.layout !== 'proximate' && // #13392\n legendOptions.enabled &&\n !legendOptions.floating) ?\n legend.legendHeight +\n pick(legendOptions.margin, 10) :\n 0) -\n (this.titleOffset ? this.titleOffset[2] : 0);\n }\n if (xAxis && yAxis) { // False if navigator is disabled (#904)\n if (this.inverted) {\n xAxis.options.left = yAxis.options.left = navigator.left;\n }\n else {\n xAxis.options.top = yAxis.options.top = navigator.top;\n }\n xAxis.setAxisSize();\n yAxis.setAxisSize();\n }\n }\n}\n/**\n * Initialize navigator, if no scrolling exists yet.\n * @internal\n */\nfunction onChartAfterUpdate(event) {\n if (!this.navigator && !this.scroller &&\n (this.options.navigator.enabled ||\n this.options.scrollbar.enabled)) {\n this.scroller = this.navigator = new NavigatorConstructor(this);\n if (pick(event.redraw, true)) {\n this.redraw(event.animation); // #7067\n }\n }\n}\n/**\n * Initialize navigator for stock charts\n * @internal\n */\nfunction onChartBeforeRender() {\n const options = this.options;\n if (options.navigator.enabled ||\n options.scrollbar.enabled) {\n this.scroller = this.navigator = new NavigatorConstructor(this);\n }\n}\n/**\n * For Stock charts. For x only zooming, do not to create the zoom button\n * because X axis zooming is already allowed by the Navigator and Range\n * selector. (#9285)\n * @internal\n */\nfunction onChartBeforeShowResetZoom() {\n const chartOptions = this.options, navigator = chartOptions.navigator, rangeSelector = chartOptions.rangeSelector;\n if (((navigator && navigator.enabled) ||\n (rangeSelector && rangeSelector.enabled)) &&\n ((!isTouchDevice &&\n this.zooming.type === 'x') ||\n (isTouchDevice && this.zooming.pinchType === 'x'))) {\n return false;\n }\n}\n/** @internal */\nfunction onChartCallback(chart) {\n const navigator = chart.navigator;\n // Initialize the navigator\n if (navigator && chart.xAxis[0]) {\n const extremes = chart.xAxis[0].getExtremes();\n navigator.render(extremes.min, extremes.max);\n }\n}\n/**\n * Merge options, if no scrolling exists yet\n * @internal\n */\nfunction onChartUpdate(e) {\n const navigatorOptions = (e.options.navigator || {}), scrollbarOptions = (e.options.scrollbar || {});\n if (!this.navigator && !this.scroller &&\n (navigatorOptions.enabled || scrollbarOptions.enabled)) {\n merge(true, this.options.navigator, navigatorOptions);\n merge(true, this.options.scrollbar, scrollbarOptions);\n delete e.options.navigator;\n delete e.options.scrollbar;\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/** @internal */\nconst ChartNavigatorComposition = {\n compose\n};\n/** @internal */\nexport default ChartNavigatorComposition;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport H from '../Globals.js';\nconst { isTouchDevice } = H;\nimport { addEvent, correctFloat, defined, isNumber, pick } from '../../Shared/Utilities.js';\n/* *\n *\n * Functions\n *\n * */\n/** @internal */\nfunction onAxisInit() {\n const axis = this;\n if (!axis.navigatorAxis) {\n axis.navigatorAxis = new NavigatorAxisAdditions(axis);\n }\n}\n/**\n * For Stock charts, override selection zooming with some special features\n * because X axis zooming is already allowed by the Navigator and Range\n * selector.\n * @internal\n */\nfunction onAxisSetExtremes(e) {\n const axis = this, chart = axis.chart, chartOptions = chart.options, navigator = chartOptions.navigator, navigatorAxis = axis.navigatorAxis, pinchType = chart.zooming.pinchType, rangeSelector = chartOptions.rangeSelector, zoomType = chart.zooming.type;\n let zoomed;\n if (axis.isXAxis &&\n (navigator?.enabled || rangeSelector?.enabled)) {\n // For y only zooming, ignore the X axis completely\n if (zoomType === 'y' && e.trigger === 'zoom') {\n zoomed = false;\n // For xy zooming, record the state of the zoom before zoom selection,\n // then when the reset button is pressed, revert to this state. This\n // should apply only if the chart is initialized with a range (#6612),\n // otherwise zoom all the way out.\n }\n else if (((e.trigger === 'zoom' && zoomType === 'xy') ||\n (isTouchDevice && pinchType === 'xy')) &&\n axis.options.range) {\n const previousZoom = navigatorAxis.previousZoom;\n // Minimum defined, zooming in\n if (defined(e.min)) {\n navigatorAxis.previousZoom = [axis.min, axis.max];\n // Minimum undefined, resetting zoom\n }\n else if (previousZoom) {\n e.min = previousZoom[0];\n e.max = previousZoom[1];\n navigatorAxis.previousZoom = void 0;\n }\n }\n }\n if (typeof zoomed !== 'undefined') {\n e.preventDefault();\n }\n}\n/* *\n *\n * Class\n *\n * */\n/** @internal */\nclass NavigatorAxisAdditions {\n /* *\n *\n * Static Functions\n *\n * */\n static compose(AxisClass) {\n if (!AxisClass.keepProps.includes('navigatorAxis')) {\n AxisClass.keepProps.push('navigatorAxis');\n addEvent(AxisClass, 'init', onAxisInit);\n addEvent(AxisClass, 'setExtremes', onAxisSetExtremes);\n }\n }\n /* *\n *\n * Constructors\n *\n * */\n constructor(axis) {\n this.axis = axis;\n }\n /* *\n *\n * Functions\n *\n * */\n destroy() {\n this.axis = void 0;\n }\n /**\n * Add logic to normalize the zoomed range in order to preserve the pressed\n * state of range selector buttons\n *\n * @internal\n * @function Highcharts.Axis#toFixedRange\n */\n toFixedRange(pxMin, pxMax, fixedMin, fixedMax) {\n const axis = this.axis, halfPointRange = (axis.pointRange || 0) / 2;\n let newMin = pick(fixedMin, axis.translate(pxMin, true, !axis.horiz)), newMax = pick(fixedMax, axis.translate(pxMax, true, !axis.horiz));\n // Add/remove half point range to/from the extremes (#1172)\n if (!defined(fixedMin)) {\n newMin = correctFloat(newMin + halfPointRange);\n }\n if (!defined(fixedMax)) {\n newMax = correctFloat(newMax - halfPointRange);\n }\n if (!isNumber(newMin) || !isNumber(newMax)) { // #1195, #7411\n newMin = newMax = void 0;\n }\n return {\n min: newMin,\n max: newMax\n };\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/** @internal */\nexport default NavigatorAxisAdditions;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport SeriesRegistry from '../../Core/Series/SeriesRegistry.js';\nconst { seriesTypes } = SeriesRegistry;\n/* *\n *\n * Constants\n *\n * */\n/**\n * The navigator is a small series below the main series, displaying\n * a view of the entire data set. It provides tools to zoom in and\n * out on parts of the data as well as panning across the dataset.\n *\n * @product highstock gantt\n * @optionparent navigator\n */\nconst NavigatorDefaults = {\n /**\n * Whether the navigator and scrollbar should adapt to updated data\n * in the base X axis. When loading data async, as in the demo below,\n * this should be `false`. Otherwise new data will trigger navigator\n * redraw, which will cause unwanted looping. In the demo below, the\n * data in the navigator is set only once. On navigating, only the main\n * chart content is updated.\n *\n * @sample {highstock} stock/demo/lazy-loading/\n * Set to false with async data loading\n *\n * @type {boolean}\n * @default true\n * @apioption navigator.adaptToUpdatedData\n */\n /**\n * An integer identifying the index to use for the base series, or a\n * string representing the id of the series.\n *\n * **Note**: As of Highcharts 5.0, this is now a deprecated option.\n * Prefer [series.showInNavigator](#plotOptions.series.showInNavigator).\n *\n * @see [series.showInNavigator](#plotOptions.series.showInNavigator)\n *\n * @deprecated 5.0.0\n * @type {number|string}\n * @default 0\n * @apioption navigator.baseSeries\n */\n /**\n * Enable or disable the navigator.\n *\n * @sample {highstock} stock/navigator/enabled/\n * Disable the navigator\n *\n * @type {boolean}\n * @default true\n * @apioption navigator.enabled\n */\n /**\n * When the chart is inverted, whether to draw the navigator on the\n * opposite side.\n *\n * @type {boolean}\n * @default false\n * @since 5.0.8\n * @apioption navigator.opposite\n */\n /**\n * The height of the navigator.\n *\n * @sample {highstock} stock/navigator/height/\n * A higher navigator\n */\n height: 40,\n /**\n * The distance from the nearest element, the X axis or X axis labels.\n *\n * @sample {highstock} stock/navigator/margin/\n * A margin of 2 draws the navigator closer to the X axis labels\n */\n margin: 22,\n /**\n * Whether the mask should be inside the range marking the zoomed\n * range, or outside. In Highcharts Stock 1.x it was always `false`.\n *\n * @sample {highstock} stock/demo/maskinside-false/\n * False, mask outside\n *\n * @since 2.0\n */\n maskInside: true,\n /**\n * Options for the handles for dragging the zoomed area.\n *\n * @sample {highstock} stock/navigator/handles/\n * Colored handles\n */\n handles: {\n /**\n * Width for handles.\n *\n * @sample {highstock} stock/navigator/styled-handles/\n * Styled handles\n *\n * @since 6.0.0\n */\n width: 7,\n /**\n * Border radius of the handles.\n *\n * @sample {highstock} stock/navigator/handles-border-radius/\n * Border radius on the navigator handles.\n *\n * @since 11.4.2\n */\n borderRadius: 0,\n /**\n * Height for handles.\n *\n * @sample {highstock} stock/navigator/styled-handles/\n * Styled handles\n *\n * @since 6.0.0\n */\n height: 15,\n /**\n * Array to define shapes of handles. 0-index for left, 1-index for\n * right.\n *\n * Additionally, the URL to a graphic can be given on this form:\n * `url(graphic.png)`. Note that for the image to be applied to\n * exported charts, its URL needs to be accessible by the export\n * server.\n *\n * Custom callbacks for symbol path generation can also be added to\n * `Highcharts.SVGRenderer.prototype.symbols`. The callback is then\n * used by its method name, as shown in the demo.\n *\n * @sample {highstock} stock/navigator/styled-handles/\n * Styled handles\n *\n * @type {Array<string>}\n * @default [\"navigator-handle\", \"navigator-handle\"]\n * @since 6.0.0\n */\n symbols: ['navigator-handle', 'navigator-handle'],\n /**\n * Allows to enable/disable handles.\n *\n * @since 6.0.0\n */\n enabled: true,\n /**\n * The width for the handle border and the stripes inside.\n *\n * @sample {highstock} stock/navigator/styled-handles/\n * Styled handles\n *\n * @since 6.0.0\n * @apioption navigator.handles.lineWidth\n */\n lineWidth: 1,\n /**\n * The fill for the handle.\n *\n * @type {Highcharts.ColorType}\n */\n backgroundColor: 'var(--highcharts-neutral-color-5)',\n /**\n * The stroke for the handle border and the stripes inside.\n *\n * @type {Highcharts.ColorType}\n */\n borderColor: 'var(--highcharts-neutral-color-40)'\n },\n /**\n * The color of the mask covering the areas of the navigator series\n * that are currently not visible in the main series. The default\n * color is bluish with an opacity of 0.3 to see the series below.\n *\n * @see In styled mode, the mask is styled with the\n * `.highcharts-navigator-mask` and\n * `.highcharts-navigator-mask-inside` classes.\n *\n * @sample {highstock} stock/navigator/maskfill/\n * Blue, semi transparent mask\n *\n * @type {Highcharts.ColorType}\n */\n maskFill: 'color-mix(var(--highcharts-highlight-color-60) 30%, transparent)',\n /**\n * The color of the line marking the currently zoomed area in the\n * navigator.\n *\n * @sample {highstock} stock/navigator/outline/\n * 2px blue outline\n *\n * @type {Highcharts.ColorType}\n */\n outlineColor: 'var(--highcharts-neutral-color-40)',\n /**\n * The width of the line marking the currently zoomed area in the\n * navigator.\n *\n * @see In styled mode, the outline stroke width is set with the\n * `.highcharts-navigator-outline` class.\n *\n * @sample {highstock} stock/navigator/outline/\n * 2px blue outline\n *\n * @type {number}\n */\n outlineWidth: 1,\n /**\n * Options for the navigator series. Available options are the same\n * as any series, documented at [plotOptions](#plotOptions.series)\n * and [series](#series).\n *\n * Unless data is explicitly defined on navigator.series, the data\n * is borrowed from the first series in the chart.\n *\n * Default series options for the navigator series are:\n * ```js\n * series: {\n * type: 'areaspline',\n * fillOpacity: 0.05,\n * dataGrouping: {\n * smoothed: true\n * },\n * lineWidth: 1,\n * marker: {\n * enabled: false\n * }\n * }\n * ```\n *\n * @see In styled mode, the navigator series is styled with the\n * `.highcharts-navigator-series` class.\n *\n * @sample {highstock} stock/navigator/series-data/\n * Using a separate data set for the navigator\n * @sample {highstock} stock/navigator/series/\n * A green navigator series\n *\n * @type {*|Array<*>|Highcharts.SeriesOptionsType|Array<Highcharts.SeriesOptionsType>}\n */\n series: {\n /**\n * The type of the navigator series.\n *\n * Heads up:\n * In column-type navigator, zooming is limited to at least one\n * point with its `pointRange`.\n *\n * @sample {highstock} stock/navigator/column/\n * Column type navigator\n *\n * @type {string}\n * @default {highstock} `areaspline` if defined, otherwise `line`\n * @default {gantt} gantt\n */\n type: (typeof seriesTypes.areaspline === 'undefined' ?\n 'line' :\n 'areaspline'),\n /**\n * The fill opacity of the navigator series.\n */\n fillOpacity: 0.05,\n /**\n * The pixel line width of the navigator series.\n */\n lineWidth: 1,\n /**\n * @ignore-option\n */\n compare: null,\n /**\n * @ignore-option\n */\n sonification: {\n enabled: false\n },\n /**\n * Unless data is explicitly defined, the data is borrowed from the\n * first series in the chart.\n *\n * @type {Array<number|Array<number|string|null>|object|null>}\n * @product highstock\n * @apioption navigator.series.data\n */\n /**\n * Data grouping options for the navigator series.\n *\n * @extends plotOptions.series.dataGrouping\n */\n dataGrouping: {\n approximation: 'average',\n enabled: true,\n groupPixelWidth: 2,\n // Replace smoothed property by anchors, #12455.\n firstAnchor: 'firstPoint',\n anchor: 'middle',\n lastAnchor: 'lastPoint',\n // Day and week differs from plotOptions.series.dataGrouping\n units: [\n ['millisecond', [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]],\n ['second', [1, 2, 5, 10, 15, 30]],\n ['minute', [1, 2, 5, 10, 15, 30]],\n ['hour', [1, 2, 3, 4, 6, 8, 12]],\n ['day', [1, 2, 3, 4]],\n ['week', [1, 2, 3]],\n ['month', [1, 3, 6]],\n ['year', null]\n ]\n },\n /**\n * Data label options for the navigator series. Data labels are\n * disabled by default on the navigator series.\n *\n * @extends plotOptions.series.dataLabels\n */\n dataLabels: {\n enabled: false,\n zIndex: 2 // #1839\n },\n id: 'highcharts-navigator-series',\n className: 'highcharts-navigator-series',\n /**\n * Sets the fill color of the navigator series.\n *\n * @type {Highcharts.ColorType}\n * @apioption navigator.series.color\n */\n /**\n * Line color for the navigator series. Allows setting the color\n * while disallowing the default candlestick setting.\n *\n * @type {Highcharts.ColorString|null}\n */\n lineColor: null, // #4602\n marker: {\n enabled: false\n },\n /**\n * Since Highcharts Stock v8, default value is the same as default\n * `pointRange` defined for a specific type (e.g. `null` for\n * column type).\n *\n * In Highcharts Stock version < 8, defaults to 0.\n *\n * @type {number|null}\n * @apioption navigator.series.pointRange\n */\n /**\n * The threshold option. Setting it to 0 will make the default\n * navigator area series draw its area from the 0 value and up.\n *\n * @type {number|null}\n */\n threshold: null\n },\n /**\n * Enable or disable navigator sticking to right, while adding new\n * points. If `undefined`, the navigator sticks to the axis maximum only\n * if it was already at the maximum prior to adding points.\n *\n * @type {boolean}\n * @default undefined\n * @since 10.2.1\n * @sample {highstock} stock/navigator/sticktomax-false/\n * stickToMax set to false\n * @apioption navigator.stickToMax\n */\n /**\n * Options for the navigator X axis. Default series options for the\n * navigator xAxis are:\n * ```js\n * xAxis: {\n * tickWidth: 0,\n * lineWidth: 0,\n * gridLineWidth: 1,\n * tickPixelInterval: 200,\n * labels: {\n * align: 'left',\n * style: {\n * color: '#888'\n * },\n * x: 3,\n * y: -4\n * }\n * }\n * ```\n *\n * @extends xAxis\n * @excluding linkedTo, maxZoom, minRange, opposite, range, scrollbar,\n * showEmpty, maxRange\n */\n xAxis: {\n /**\n * Additional range on the right side of the xAxis. Works similar to\n * `xAxis.maxPadding`, but the value is set in terms of axis values,\n * percentage or pixels.\n *\n * If it's a number, it is interpreted as axis values, which in a\n * datetime axis equals milliseconds.\n *\n * If it's a percentage string, is interpreted as percentages of the\n * axis length. An overscroll of 50% will make a 100px axis 50px longer.\n *\n * If it's a pixel string, it is interpreted as a fixed pixel value, but\n * limited to 90% of the axis length.\n *\n * If it's undefined, the value is inherited from `xAxis.overscroll`.\n *\n * Can be set for both, main xAxis and navigator's xAxis.\n *\n * @type {number | string | undefined}\n * @since 6.0.0\n * @apioption navigator.xAxis.overscroll\n */\n className: 'highcharts-navigator-xaxis',\n tickLength: 0,\n lineWidth: 0,\n gridLineColor: 'var(--highcharts-neutral-color-10)',\n id: 'navigator-x-axis',\n gridLineWidth: 1,\n tickPixelInterval: 200,\n labels: {\n align: 'left',\n /**\n * @type {Highcharts.CSSObject}\n */\n style: {\n /** @ignore */\n color: 'var(--highcharts-neutral-color-100)',\n /** @ignore */\n fontSize: '0.7em',\n /** @ignore */\n opacity: 0.6,\n /** @ignore */\n textOutline: '2px contrast'\n },\n x: 3,\n y: -4\n },\n crosshair: false\n },\n /**\n * Options for the navigator Y axis. Default series options for the\n * navigator yAxis are:\n * ```js\n * yAxis: {\n * gridLineWidth: 0,\n * startOnTick: false,\n * endOnTick: false,\n * minPadding: 0.1,\n * maxPadding: 0.1,\n * labels: {\n * enabled: false\n * },\n * title: {\n * text: null\n * },\n * tickWidth: 0\n * }\n * ```\n *\n * @extends yAxis\n * @excluding height, linkedTo, maxZoom, minRange, ordinal, range,\n * showEmpty, scrollbar, top, units, maxRange, minLength,\n * maxLength, resize\n */\n yAxis: {\n className: 'highcharts-navigator-yaxis',\n gridLineWidth: 0,\n startOnTick: false,\n endOnTick: false,\n minPadding: 0.1,\n id: 'navigator-y-axis',\n maxPadding: 0.1,\n labels: {\n enabled: false\n },\n crosshair: false,\n title: {\n text: void 0\n },\n tickLength: 0,\n tickWidth: 0\n }\n};\n/* *\n *\n * Default Export\n *\n * */\n/** @internal */\nexport default NavigatorDefaults;\n/* *\n *\n * API Options\n *\n * */\n/**\n * Maximum range which can be set using the navigator's handles.\n * Opposite of [xAxis.minRange](#xAxis.minRange).\n *\n * @sample {highstock} stock/navigator/maxrange/\n * Defined max and min range\n *\n * @type {number}\n * @since 6.0.0\n * @product highstock gantt\n * @apioption xAxis.maxRange\n */\n(''); // Keeps doclets above in JS file\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport rect from '../../Core/Renderer/SVG/Symbols.js';\nimport { relativeLength } from '../../Shared/Utilities.js';\n/* *\n *\n * Constants\n *\n * */\n/**\n * Draw one of the handles on the side of the zoomed range in the navigator.\n * @internal\n */\nfunction navigatorHandle(_x, _y, width, height, options = {}) {\n const halfWidth = options.width ? options.width / 2 : width, markerPosition = 1.5, r = relativeLength(options.borderRadius || 0, Math.min(halfWidth * 2, height));\n height = options.height || height;\n return [\n ['M', -markerPosition, height / 2 - 3.5],\n ['L', -markerPosition, height / 2 + 4.5],\n ['M', markerPosition - 1, height / 2 - 3.5],\n ['L', markerPosition - 1, height / 2 + 4.5],\n ...rect.rect(-halfWidth - 1, 0.5, halfWidth * 2 + 1, height, { r })\n ];\n}\n/* *\n *\n * Default Export\n *\n * */\n/** @internal */\nconst NavigatorSymbols = {\n 'navigator-handle': navigatorHandle\n};\n/** @internal */\nexport default NavigatorSymbols;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport { defined } from '../../Shared/Utilities.js';\n/* *\n *\n * Functions\n *\n * */\n/**\n * Sets the chart.fixedRange to the specified value. If the value is larger\n * than actual range, sets it to the maximum possible range. (#20327)\n *\n * @internal\n * @function Highcharts.StockChart#setFixedRange\n * @param {number|undefined} range\n * Range to set in axis units.\n */\nfunction setFixedRange(range) {\n const xAxis = this.xAxis[0];\n if (defined(xAxis.dataMax) &&\n defined(xAxis.dataMin) &&\n range) {\n this.fixedRange = Math.min(range, xAxis.dataMax - xAxis.dataMin);\n }\n else {\n this.fixedRange = range;\n }\n}\n/** @internal */\nconst StockUtilities = {\n setFixedRange\n};\n/** @internal */\nexport default StockUtilities;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport D from '../../Core/Defaults.js';\nconst { defaultOptions } = D;\nimport H from '../../Core/Globals.js';\nconst { composed } = H;\nimport NavigatorAxisAdditions from '../../Core/Axis/NavigatorAxisComposition.js';\nimport NavigatorDefaults from './NavigatorDefaults.js';\nimport NavigatorSymbols from './NavigatorSymbols.js';\nimport SVGRenderer from '../../Core/Renderer/SVG/SVGRenderer.js';\nimport StockUtilities from '../../Stock/Utilities/StockUtilities.js';\nconst { setFixedRange } = StockUtilities;\nimport { addEvent, extend, pushUnique } from '../../Shared/Utilities.js';\n/* *\n *\n * Variables\n *\n * */\n/* *\n *\n * Functions\n *\n * */\n/** @internal */\nfunction compose(ChartClass, AxisClass, SeriesClass) {\n NavigatorAxisAdditions.compose(AxisClass);\n if (pushUnique(composed, 'Navigator')) {\n ChartClass.prototype.setFixedRange = setFixedRange;\n extend(SVGRenderer.prototype.symbols, NavigatorSymbols);\n extend(defaultOptions, { navigator: NavigatorDefaults });\n addEvent(SeriesClass, 'afterUpdate', onSeriesAfterUpdate);\n }\n}\n/**\n * Handle updating series\n * @internal\n */\nfunction onSeriesAfterUpdate() {\n if (this.chart.navigator && !this.options.isInternal) {\n this.chart.navigator.setBaseSeries(null, false);\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/** @internal */\nconst NavigatorComposition = {\n compose\n};\n/** @internal */\nexport default NavigatorComposition;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport H from '../Globals.js';\nconst { composed } = H;\nimport { addEvent, correctFloat, defined, pick, pushUnique } from '../../Shared/Utilities.js';\n/* *\n *\n * Composition\n *\n * */\n/** @internal */\nvar ScrollbarAxis;\n(function (ScrollbarAxis) {\n /* *\n *\n * Variables\n *\n * */\n let Scrollbar;\n /* *\n *\n * Functions\n *\n * */\n /**\n * Attaches to axis events to create scrollbars if enabled.\n *\n * @internal\n *\n * @param {Highcharts.Axis} AxisClass\n * Axis class to extend.\n *\n * @param {Highcharts.Scrollbar} ScrollbarClass\n * Scrollbar class to use.\n */\n function compose(AxisClass, ScrollbarClass) {\n if (pushUnique(composed, 'Axis.Scrollbar')) {\n Scrollbar = ScrollbarClass;\n addEvent(AxisClass, 'afterGetOffset', onAxisAfterGetOffset);\n addEvent(AxisClass, 'afterInit', onAxisAfterInit);\n addEvent(AxisClass, 'afterRender', onAxisAfterRender);\n }\n }\n ScrollbarAxis.compose = compose;\n /** @internal */\n function getExtremes(axis) {\n const axisMin = pick(axis.options?.min, axis.min);\n const axisMax = pick(axis.options?.max, axis.max);\n return {\n axisMin,\n axisMax,\n scrollMin: defined(axis.dataMin) ?\n Math.min(axisMin, axis.min ?? Infinity, axis.dataMin, axis.threshold ?? Infinity) : axisMin,\n scrollMax: axis.treeGrid?.adjustedMax ?? (defined(axis.dataMax) ?\n Math.max(axisMax, axis.max ?? -Infinity, axis.dataMax, axis.threshold ?? -Infinity) :\n axisMax)\n };\n }\n /**\n * Make space for a scrollbar.\n * @internal\n */\n function onAxisAfterGetOffset() {\n const axis = this, scrollbar = axis.scrollbar, opposite = scrollbar && !scrollbar.options.opposite, index = axis.horiz ? 2 : opposite ? 3 : 1;\n if (scrollbar) {\n // Reset scrollbars offsets\n axis.chart.scrollbarsOffsets = [0, 0];\n axis.chart.axisOffset[index] +=\n scrollbar.size + (scrollbar.options.margin || 0);\n }\n }\n /**\n * Wrap axis initialization and create scrollbar if enabled.\n * @internal\n */\n function onAxisAfterInit() {\n const axis = this;\n if (axis.options?.scrollbar?.enabled) {\n // Predefined options:\n axis.options.scrollbar.vertical = !axis.horiz;\n axis.options.startOnTick = axis.options.endOnTick = false;\n axis.scrollbar = new Scrollbar(axis.chart.renderer, axis.options.scrollbar, axis.chart);\n addEvent(axis.scrollbar, 'changed', function (e) {\n const { axisMin, axisMax, scrollMin: unitedMin, scrollMax: unitedMax } = getExtremes(axis), minPX = axis.toPixels(unitedMin), maxPX = axis.toPixels(unitedMax), rangePX = maxPX - minPX;\n let to, from;\n // #12834, scroll when show/hide series, wrong extremes\n if (!defined(axisMin) || !defined(axisMax)) {\n return;\n }\n if ((axis.horiz && !axis.reversed) ||\n (!axis.horiz && axis.reversed)) {\n to = Math.min(unitedMax, axis.toValue(minPX + rangePX * this.to));\n from = Math.max(unitedMin, axis.toValue(minPX + rangePX * this.from));\n }\n else {\n // Y-values in browser are reversed, but this also\n // applies for reversed horizontal axis:\n to = Math.min(unitedMax, axis.toValue(minPX + rangePX * (1 - this.from)));\n from = Math.max(unitedMin, axis.toValue(minPX + rangePX * (1 - this.to)));\n }\n if (this.shouldUpdateExtremes(e.DOMType)) {\n // #17977, set animation to undefined instead of true\n const animate = e.DOMType === 'mousemove' ||\n e.DOMType === 'touchmove' ? false : void 0;\n axis.setExtremes(correctFloat(from), correctFloat(to), true, animate, e);\n }\n else {\n // When live redraw is disabled, don't change extremes\n // Only change the position of the scrollbar thumb\n this.setRange(this.from, this.to);\n }\n });\n }\n }\n /**\n * Wrap rendering axis, and update scrollbar if one is created.\n * @internal\n */\n function onAxisAfterRender() {\n const axis = this, { scrollMin, scrollMax } = getExtremes(axis), scrollbar = axis.scrollbar, offset = (axis.axisTitleMargin || 0) + (axis.titleOffset || 0), scrollbarsOffsets = axis.chart.scrollbarsOffsets, axisMargin = axis.options.margin || 0;\n let offsetsIndex, from, to;\n if (scrollbar && scrollbarsOffsets) {\n if (axis.horiz) {\n // Reserve space for labels/title\n if (!axis.opposite) {\n scrollbarsOffsets[1] += offset;\n }\n scrollbar.position(axis.left, (axis.top +\n axis.height +\n 2 +\n scrollbarsOffsets[1] -\n (axis.opposite ? axisMargin : 0)), axis.width, axis.height);\n // Next scrollbar should reserve space for margin (if set)\n if (!axis.opposite) {\n scrollbarsOffsets[1] += axisMargin;\n }\n offsetsIndex = 1;\n }\n else {\n // Reserve space for labels/title\n if (axis.opposite) {\n scrollbarsOffsets[0] += offset;\n }\n let xPosition;\n if (!scrollbar.options.opposite) {\n xPosition = axis.opposite ? 0 : axisMargin;\n }\n else {\n xPosition = axis.left +\n axis.width +\n 2 +\n scrollbarsOffsets[0] -\n (axis.opposite ? 0 : axisMargin);\n }\n scrollbar.position(xPosition, axis.top, axis.width, axis.height);\n // Next scrollbar should reserve space for margin (if set)\n if (axis.opposite) {\n scrollbarsOffsets[0] += axisMargin;\n }\n offsetsIndex = 0;\n }\n scrollbarsOffsets[offsetsIndex] += scrollbar.size +\n (scrollbar.options.margin || 0);\n if (isNaN(scrollMin) ||\n isNaN(scrollMax) ||\n !defined(axis.min) ||\n !defined(axis.max) ||\n (defined(axis.dataMin) && // #23335\n axis.dataMin === axis.dataMax // #10733\n )) {\n // Default action: when data extremes are the same or there is\n // not extremes on the axis, but scrollbar exists, make it\n // full size\n scrollbar.setRange(0, 1);\n }\n else if (axis.min === axis.max) { // #20359\n // When the extremes are the same, set the scrollbar to a point\n // within the extremes range. Utilize pointRange to perform the\n // calculations. (#20359)\n const interval = axis.pointRange / (axis.dataMax +\n 1);\n from = interval * axis.min;\n to = interval * (axis.max + 1);\n scrollbar.setRange(from, to);\n }\n else {\n from = (axis.toPixels(axis.min) - axis.toPixels(scrollMin)) /\n (axis.toPixels(scrollMax) - axis.toPixels(scrollMin));\n to = (axis.toPixels(axis.max) - axis.toPixels(scrollMin)) /\n (axis.toPixels(scrollMax) - axis.toPixels(scrollMin));\n if ((axis.horiz && !axis.reversed) ||\n (!axis.horiz && axis.reversed)) {\n scrollbar.setRange(from, to);\n }\n else {\n // Inverse vertical axis\n scrollbar.setRange(1 - to, 1 - from);\n }\n }\n }\n }\n})(ScrollbarAxis || (ScrollbarAxis = {}));\n/* *\n *\n * Default Export\n *\n * */\n/** @internal */\nexport default ScrollbarAxis;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\n/* *\n *\n * Constant\n *\n * */\n/**\n *\n * The scrollbar is a means of panning over the X axis of a stock chart.\n * Scrollbars can also be applied to other types of axes.\n *\n * Another approach to scrollable charts is the [chart.scrollablePlotArea](\n * https://api.highcharts.com/highcharts/chart.scrollablePlotArea) option that\n * is especially suitable for simpler cartesian charts on mobile.\n *\n * In styled mode, all the presentational options for the\n * scrollbar are replaced by the classes `.highcharts-scrollbar-thumb`,\n * `.highcharts-scrollbar-arrow`, `.highcharts-scrollbar-button`,\n * `.highcharts-scrollbar-rifles` and `.highcharts-scrollbar-track`.\n *\n * @sample stock/yaxis/inverted-bar-scrollbar/\n * A scrollbar on a simple bar chart\n *\n * @product highstock gantt\n * @optionparent scrollbar\n */\nconst ScrollbarDefaults = {\n /**\n * The height of the scrollbar. If `buttonsEnabled` is true , the height\n * also applies to the width of the scroll arrows so that they are always\n * squares.\n *\n * @sample stock/scrollbar/style/\n * Non-default height\n *\n * @type {number}\n */\n height: 10,\n /**\n * The border rounding radius of the bar.\n *\n * @sample stock/scrollbar/style/\n * Scrollbar styling\n */\n barBorderRadius: 5,\n /**\n * The corner radius of the scrollbar buttons.\n *\n * @sample stock/scrollbar/style/\n * Scrollbar styling\n */\n buttonBorderRadius: 0,\n /**\n * Enable or disable the buttons at the end of the scrollbar.\n *\n * @since 11.0.0\n */\n buttonsEnabled: false,\n /**\n * Enable or disable the scrollbar.\n *\n * @sample stock/scrollbar/enabled/\n * Disable the scrollbar, only use navigator\n *\n * @type {boolean}\n * @default true\n * @apioption scrollbar.enabled\n */\n /**\n * Whether to redraw the main chart as the scrollbar or the navigator\n * zoomed window is moved. Defaults to `true` for modern browsers and\n * `false` for legacy IE browsers as well as mobile devices. This option\n * works regardless of whether the scrollbar is enabled or not.\n *\n * @sample stock/scrollbar/liveredraw\n * Setting live redraw to false\n *\n * @type {boolean}\n * @since 1.3\n */\n liveRedraw: void 0,\n /**\n * The margin between the scrollbar and its axis when the scrollbar is\n * applied directly to an axis, or the navigator in case that is enabled.\n * Defaults to 10 for axis, 3 for navigator.\n *\n * @type {number|undefined}\n */\n margin: void 0,\n /**\n * The minimum width of the scrollbar.\n *\n * @since 1.2.5\n */\n minWidth: 6,\n /** @ignore-option */\n opposite: true,\n /**\n * Whether to show or hide the scrollbar when the scrolled content is\n * zoomed out to it full extent.\n *\n * @type {boolean}\n * @default true\n * @apioption scrollbar.showFull\n */\n step: 0.2,\n /**\n * The z index of the scrollbar group.\n */\n zIndex: 3,\n /**\n * The background color of the scrollbar itself.\n *\n * @sample stock/scrollbar/style/\n * Scrollbar styling\n *\n * @type {Highcharts.ColorType}\n */\n barBackgroundColor: 'var(--highcharts-neutral-color-20)',\n /**\n * The width of the bar's border.\n *\n * @sample stock/scrollbar/style/\n * Scrollbar styling\n */\n barBorderWidth: 0,\n /**\n * The color of the scrollbar's border.\n *\n * @type {Highcharts.ColorType}\n */\n barBorderColor: 'var(--highcharts-neutral-color-20)',\n /**\n * The color of the small arrow inside the scrollbar buttons.\n *\n * @sample stock/scrollbar/style/\n * Scrollbar styling\n *\n * @type {Highcharts.ColorType}\n */\n buttonArrowColor: 'var(--highcharts-neutral-color-80)',\n /**\n * The color of scrollbar buttons.\n *\n * @sample stock/scrollbar/style/\n * Scrollbar styling\n *\n * @type {Highcharts.ColorType}\n */\n buttonBackgroundColor: 'var(--highcharts-neutral-color-10)',\n /**\n * The color of the border of the scrollbar buttons.\n *\n * @sample stock/scrollbar/style/\n * Scrollbar styling\n *\n * @type {Highcharts.ColorType}\n */\n buttonBorderColor: 'var(--highcharts-neutral-color-20)',\n /**\n * The border width of the scrollbar buttons.\n *\n * @sample stock/scrollbar/style/\n * Scrollbar styling\n */\n buttonBorderWidth: 1,\n /**\n * The color of the small rifles in the middle of the scrollbar.\n *\n * @type {Highcharts.ColorType}\n */\n rifleColor: 'none',\n /**\n * The color of the track background.\n *\n * @sample stock/scrollbar/style/\n * Scrollbar styling\n *\n * @type {Highcharts.ColorType}\n */\n trackBackgroundColor: 'rgba(255, 255, 255, 0.001)', // #18922\n /**\n * The color of the border of the scrollbar track.\n *\n * @sample stock/scrollbar/style/\n * Scrollbar styling\n *\n * @type {Highcharts.ColorType}\n */\n trackBorderColor: 'var(--highcharts-neutral-color-20)',\n /**\n * The corner radius of the border of the scrollbar track.\n *\n * @sample stock/scrollbar/style/\n * Scrollbar styling\n */\n trackBorderRadius: 5,\n /**\n * The width of the border of the scrollbar track.\n *\n * @sample stock/scrollbar/style/\n * Scrollbar styling\n */\n trackBorderWidth: 1\n};\n/* *\n *\n * Default Export\n *\n * */\n/** @internal */\nexport default ScrollbarDefaults;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport D from '../../Core/Defaults.js';\nconst { defaultOptions } = D;\nimport H from '../../Core/Globals.js';\nconst { composed } = H;\nimport ScrollbarAxis from '../../Core/Axis/ScrollbarAxis.js';\nimport ScrollbarDefaults from './ScrollbarDefaults.js';\nimport { addEvent, correctFloat, crisp, defined, destroyObjectProperties, extend, fireEvent, merge, pick, pushUnique, removeEvent } from '../../Shared/Utilities.js';\n/* *\n *\n * Constants\n *\n * */\n/* eslint-disable no-invalid-this, valid-jsdoc */\n/**\n * A reusable scrollbar, internally used in Highcharts Stock's\n * navigator and optionally on individual axes.\n *\n * @internal\n * @class\n * @name Highcharts.Scrollbar\n * @param {Highcharts.SVGRenderer} renderer\n * @param {Highcharts.ScrollbarOptions} options\n * @param {Highcharts.Chart} chart\n */\nclass Scrollbar {\n /* *\n *\n * Static Functions\n *\n * */\n static compose(AxisClass) {\n ScrollbarAxis.compose(AxisClass, Scrollbar);\n if (pushUnique(composed, 'Scrollbar')) {\n extend(defaultOptions, { scrollbar: ScrollbarDefaults });\n }\n }\n /**\n * When we have vertical scrollbar, rifles and arrow in buttons should be\n * rotated. The same method is used in Navigator's handles, to rotate them.\n *\n * @function Highcharts.swapXY\n *\n * @param {Highcharts.SVGPathArray} path\n * Path to be rotated.\n *\n * @param {boolean} [vertical]\n * If vertical scrollbar, swap x-y values.\n *\n * @return {Highcharts.SVGPathArray}\n * Rotated path.\n *\n * @requires modules/stock\n */\n static swapXY(path, vertical) {\n if (vertical) {\n path.forEach((seg) => {\n const len = seg.length;\n let temp;\n for (let i = 0; i < len; i += 2) {\n temp = seg[i + 1];\n if (typeof temp === 'number') {\n seg[i + 1] = seg[i + 2];\n seg[i + 2] = temp;\n }\n }\n });\n }\n return path;\n }\n /* *\n *\n * Constructors\n *\n * */\n constructor(renderer, options, chart) {\n /* *\n *\n * Properties\n *\n * */\n this._events = [];\n this.chartX = 0;\n this.chartY = 0;\n this.from = 0;\n this.scrollbarButtons = [];\n this.scrollbarLeft = 0;\n this.scrollbarStrokeWidth = 1;\n this.scrollbarTop = 0;\n this.size = 0;\n this.to = 0;\n this.trackBorderWidth = 1;\n this.x = 0;\n this.y = 0;\n this.init(renderer, options, chart);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Set up the mouse and touch events for the Scrollbar\n *\n * @internal\n * @function Highcharts.Scrollbar#addEvents\n */\n addEvents() {\n const buttonsOrder = this.options.inverted ? [1, 0] : [0, 1], buttons = this.scrollbarButtons, bar = this.scrollbarGroup.element, track = this.track.element, mouseDownHandler = this.mouseDownHandler.bind(this), mouseMoveHandler = this.mouseMoveHandler.bind(this), mouseUpHandler = this.mouseUpHandler.bind(this);\n const _events = [\n // Mouse events\n [\n buttons[buttonsOrder[0]].element,\n 'click',\n this.buttonToMinClick.bind(this)\n ],\n [\n buttons[buttonsOrder[1]].element,\n 'click',\n this.buttonToMaxClick.bind(this)\n ],\n [track, 'click', this.trackClick.bind(this)],\n [bar, 'mousedown', mouseDownHandler],\n [bar.ownerDocument, 'mousemove', mouseMoveHandler],\n [bar.ownerDocument, 'mouseup', mouseUpHandler],\n // Touch events\n [bar, 'touchstart', mouseDownHandler],\n [bar.ownerDocument, 'touchmove', mouseMoveHandler],\n [bar.ownerDocument, 'touchend', mouseUpHandler]\n ];\n // Add them all\n _events.forEach(function (args) {\n addEvent.apply(null, args);\n });\n this._events = _events;\n }\n buttonToMaxClick(e) {\n const scroller = this;\n const range = ((scroller.to - scroller.from) *\n pick(scroller.options.step, 0.2));\n scroller.updatePosition(scroller.from + range, scroller.to + range);\n fireEvent(scroller, 'changed', {\n from: scroller.from,\n to: scroller.to,\n trigger: 'scrollbar',\n DOMEvent: e\n });\n }\n buttonToMinClick(e) {\n const scroller = this;\n const range = correctFloat(scroller.to - scroller.from) *\n pick(scroller.options.step, 0.2);\n scroller.updatePosition(correctFloat(scroller.from - range), correctFloat(scroller.to - range));\n fireEvent(scroller, 'changed', {\n from: scroller.from,\n to: scroller.to,\n trigger: 'scrollbar',\n DOMEvent: e\n });\n }\n /**\n * Get normalized (0-1) cursor position over the scrollbar\n *\n * @internal\n * @function Highcharts.Scrollbar#cursorToScrollbarPosition\n *\n * @param {*} normalizedEvent\n * normalized event, with chartX and chartY values\n *\n * @return {Highcharts.Dictionary<number>}\n * Local position {chartX, chartY}\n */\n cursorToScrollbarPosition(normalizedEvent) {\n const scroller = this, options = scroller.options, minWidthDifference = options.minWidth > scroller.calculatedWidth ?\n options.minWidth :\n 0; // `minWidth` distorts translation\n return {\n chartX: (normalizedEvent.chartX - scroller.x -\n scroller.xOffset) /\n (scroller.barWidth - minWidthDifference),\n chartY: (normalizedEvent.chartY - scroller.y -\n scroller.yOffset) /\n (scroller.barWidth - minWidthDifference)\n };\n }\n /**\n * Destroys allocated elements.\n *\n * @internal\n * @function Highcharts.Scrollbar#destroy\n */\n destroy() {\n const scroller = this, navigator = scroller.chart.scroller;\n // Disconnect events added in addEvents\n scroller.removeEvents();\n // Destroy properties\n [\n 'track',\n 'scrollbarRifles',\n 'scrollbar',\n 'scrollbarGroup',\n 'group'\n ].forEach(function (prop) {\n if (scroller[prop] && scroller[prop].destroy) {\n scroller[prop] = scroller[prop].destroy();\n }\n });\n // #6421, chart may have more scrollbars\n if (navigator && scroller === navigator.scrollbar) {\n navigator.scrollbar = null;\n // Destroy elements in collection\n destroyObjectProperties(navigator.scrollbarButtons);\n }\n }\n /**\n * Draw the scrollbar buttons with arrows\n *\n * @internal\n * @function Highcharts.Scrollbar#drawScrollbarButton\n * @param {number} index\n * 0 is left, 1 is right\n */\n drawScrollbarButton(index) {\n const scroller = this, renderer = scroller.renderer, scrollbarButtons = scroller.scrollbarButtons, options = scroller.options, size = scroller.size, group = renderer.g().add(scroller.group);\n scrollbarButtons.push(group);\n if (options.buttonsEnabled) {\n // Create a rectangle for the scrollbar button\n const rect = renderer.rect()\n .addClass('highcharts-scrollbar-button')\n .add(group);\n // Presentational attributes\n if (!scroller.chart.styledMode) {\n rect.attr({\n stroke: options.buttonBorderColor,\n 'stroke-width': options.buttonBorderWidth,\n fill: options.buttonBackgroundColor\n });\n }\n // Place the rectangle based on the rendered stroke width\n rect.attr(rect.crisp({\n x: -0.5,\n y: -0.5,\n width: size,\n height: size,\n r: options.buttonBorderRadius\n }, rect.strokeWidth()));\n // Button arrow\n const arrow = renderer\n .path(Scrollbar.swapXY([[\n 'M',\n size / 2 + (index ? -1 : 1),\n size / 2 - 3\n ], [\n 'L',\n size / 2 + (index ? -1 : 1),\n size / 2 + 3\n ], [\n 'L',\n size / 2 + (index ? 2 : -2),\n size / 2\n ]], options.vertical))\n .addClass('highcharts-scrollbar-arrow')\n .add(scrollbarButtons[index]);\n if (!scroller.chart.styledMode) {\n arrow.attr({\n fill: options.buttonArrowColor\n });\n }\n }\n }\n /**\n * @internal\n * @function Highcharts.Scrollbar#init\n * @param {Highcharts.SVGRenderer} renderer\n * @param {Highcharts.ScrollbarOptions} options\n * @param {Highcharts.Chart} chart\n */\n init(renderer, options, chart) {\n const scroller = this;\n scroller.scrollbarButtons = [];\n scroller.renderer = renderer;\n scroller.userOptions = options;\n scroller.options = merge(ScrollbarDefaults, defaultOptions.scrollbar, options);\n scroller.options.margin = pick(scroller.options.margin, 10);\n scroller.chart = chart;\n // Backward compatibility\n scroller.size = pick(scroller.options.size, scroller.options.height);\n // Init\n if (options.enabled) {\n scroller.render();\n scroller.addEvents();\n }\n }\n mouseDownHandler(e) {\n const scroller = this, normalizedEvent = scroller.chart.pointer?.normalize(e) || e, mousePosition = scroller.cursorToScrollbarPosition(normalizedEvent);\n scroller.chartX = mousePosition.chartX;\n scroller.chartY = mousePosition.chartY;\n scroller.initPositions = [scroller.from, scroller.to];\n scroller.grabbedCenter = true;\n }\n /**\n * Event handler for the mouse move event.\n * @internal\n */\n mouseMoveHandler(e) {\n const scroller = this, normalizedEvent = scroller.chart.pointer?.normalize(e) || e, options = scroller.options, direction = options.vertical ?\n 'chartY' : 'chartX', initPositions = scroller.initPositions || [];\n let scrollPosition, chartPosition, change;\n // In iOS, a mousemove event with e.pageX === 0 is fired when\n // holding the finger down in the center of the scrollbar. This\n // should be ignored.\n if (scroller.grabbedCenter &&\n // #4696, scrollbar failed on Android\n (!e.touches || e.touches[0][direction] !== 0)) {\n chartPosition = scroller.cursorToScrollbarPosition(normalizedEvent)[direction];\n scrollPosition = scroller[direction];\n change = chartPosition - scrollPosition;\n scroller.hasDragged = true;\n scroller.updatePosition(initPositions[0] + change, initPositions[1] + change);\n if (scroller.hasDragged) {\n fireEvent(scroller, 'changed', {\n from: scroller.from,\n to: scroller.to,\n trigger: 'scrollbar',\n DOMType: e.type,\n DOMEvent: e\n });\n }\n }\n }\n /**\n * Event handler for the mouse up event.\n * @internal\n */\n mouseUpHandler(e) {\n const scroller = this;\n if (scroller.hasDragged) {\n fireEvent(scroller, 'changed', {\n from: scroller.from,\n to: scroller.to,\n trigger: 'scrollbar',\n DOMType: e.type,\n DOMEvent: e\n });\n }\n scroller.grabbedCenter =\n scroller.hasDragged =\n scroller.chartX =\n scroller.chartY = null;\n }\n /**\n * Position the scrollbar, method called from a parent with defined\n * dimensions.\n *\n * @internal\n * @function Highcharts.Scrollbar#position\n * @param {number} x\n * x-position on the chart\n * @param {number} y\n * y-position on the chart\n * @param {number} width\n * width of the scrollbar\n * @param {number} height\n * height of the scrollbar\n */\n position(x, y, width, height) {\n const scroller = this, options = scroller.options, { buttonsEnabled, margin = 0, vertical } = options, method = scroller.rendered ? 'animate' : 'attr';\n let xOffset = height, yOffset = 0;\n // Make the scrollbar visible when it is repositioned, #15763.\n scroller.group.show();\n scroller.x = x;\n scroller.y = y + this.trackBorderWidth;\n scroller.width = width; // Width with buttons\n scroller.height = height;\n scroller.xOffset = xOffset;\n scroller.yOffset = yOffset;\n // If Scrollbar is a vertical type, swap options:\n if (vertical) {\n scroller.width = scroller.yOffset = width = yOffset = scroller.size;\n scroller.xOffset = xOffset = 0;\n scroller.yOffset = yOffset = buttonsEnabled ? scroller.size : 0;\n // Width without buttons\n scroller.barWidth = height - (buttonsEnabled ? width * 2 : 0);\n scroller.x = x = x + margin;\n }\n else {\n scroller.height = height = scroller.size;\n scroller.xOffset = xOffset = buttonsEnabled ? scroller.size : 0;\n // Width without buttons\n scroller.barWidth = width - (buttonsEnabled ? height * 2 : 0);\n scroller.y = scroller.y + margin;\n }\n // Set general position for a group:\n scroller.group[method]({\n translateX: x,\n translateY: scroller.y\n });\n // Resize background/track:\n scroller.track[method]({\n width: width,\n height: height\n });\n // Move right/bottom button to its place:\n scroller.scrollbarButtons[1][method]({\n translateX: vertical ? 0 : width - xOffset,\n translateY: vertical ? height - yOffset : 0\n });\n }\n /**\n * Removes the event handlers attached previously with addEvents.\n *\n * @internal\n * @function Highcharts.Scrollbar#removeEvents\n */\n removeEvents() {\n this._events.forEach(function (args) {\n removeEvent.apply(null, args);\n });\n this._events.length = 0;\n }\n /**\n * Render scrollbar with all required items.\n *\n * @internal\n * @function Highcharts.Scrollbar#render\n */\n render() {\n const scroller = this, renderer = scroller.renderer, options = scroller.options, size = scroller.size, styledMode = scroller.chart.styledMode, group = renderer.g('scrollbar')\n .attr({\n zIndex: options.zIndex\n })\n .hide() // Initially hide the scrollbar #15863\n .add();\n // Draw the scrollbar group\n scroller.group = group;\n // Draw the scrollbar track:\n scroller.track = renderer.rect()\n .addClass('highcharts-scrollbar-track')\n .attr({\n r: options.trackBorderRadius || 0,\n height: size,\n width: size\n }).add(group);\n if (!styledMode) {\n scroller.track.attr({\n fill: options.trackBackgroundColor,\n stroke: options.trackBorderColor,\n 'stroke-width': options.trackBorderWidth\n });\n }\n const trackBorderWidth = scroller.trackBorderWidth =\n scroller.track.strokeWidth();\n scroller.track.attr({\n x: -crisp(0, trackBorderWidth),\n y: -crisp(0, trackBorderWidth)\n });\n // Draw the scrollbar itself\n scroller.scrollbarGroup = renderer.g().add(group);\n scroller.scrollbar = renderer.rect()\n .addClass('highcharts-scrollbar-thumb')\n .attr({\n height: size - trackBorderWidth,\n width: size - trackBorderWidth,\n r: options.barBorderRadius || 0\n }).add(scroller.scrollbarGroup);\n scroller.scrollbarRifles = renderer\n .path(Scrollbar.swapXY([\n ['M', -3, size / 4],\n ['L', -3, 2 * size / 3],\n ['M', 0, size / 4],\n ['L', 0, 2 * size / 3],\n ['M', 3, size / 4],\n ['L', 3, 2 * size / 3]\n ], options.vertical))\n .addClass('highcharts-scrollbar-rifles')\n .add(scroller.scrollbarGroup);\n if (!styledMode) {\n scroller.scrollbar.attr({\n fill: options.barBackgroundColor,\n stroke: options.barBorderColor,\n 'stroke-width': options.barBorderWidth\n });\n scroller.scrollbarRifles.attr({\n stroke: options.rifleColor,\n 'stroke-width': 1\n });\n }\n scroller.scrollbarStrokeWidth = scroller.scrollbar.strokeWidth();\n scroller.scrollbarGroup.translate(-crisp(0, scroller.scrollbarStrokeWidth), -crisp(0, scroller.scrollbarStrokeWidth));\n // Draw the buttons:\n scroller.drawScrollbarButton(0);\n scroller.drawScrollbarButton(1);\n }\n /**\n * Set scrollbar size, with a given scale.\n *\n * @internal\n * @function Highcharts.Scrollbar#setRange\n * @param {number} from\n * scale (0-1) where bar should start\n * @param {number} to\n * scale (0-1) where bar should end\n */\n setRange(from, to) {\n const scroller = this, options = scroller.options, vertical = options.vertical, minWidth = options.minWidth, fullWidth = scroller.barWidth, method = (this.rendered &&\n !this.hasDragged &&\n !(this.chart.navigator && this.chart.navigator.hasDragged)) ? 'animate' : 'attr';\n if (!defined(fullWidth)) {\n return;\n }\n const toPX = fullWidth * Math.min(to, 1);\n let fromPX, newSize;\n from = Math.max(from, 0);\n fromPX = Math.ceil(fullWidth * from);\n scroller.calculatedWidth = newSize = correctFloat(toPX - fromPX);\n // We need to recalculate position, if minWidth is used\n if (newSize < minWidth) {\n fromPX = (fullWidth - minWidth + newSize) * from;\n newSize = minWidth;\n }\n const newPos = Math.floor(fromPX + scroller.xOffset + scroller.yOffset);\n const newRiflesPos = newSize / 2 - 0.5; // -0.5 -> rifle line width / 2\n // Store current position:\n scroller.from = from;\n scroller.to = to;\n if (!vertical) {\n scroller.scrollbarGroup[method]({\n translateX: newPos\n });\n scroller.scrollbar[method]({\n width: newSize\n });\n scroller.scrollbarRifles[method]({\n translateX: newRiflesPos\n });\n scroller.scrollbarLeft = newPos;\n scroller.scrollbarTop = 0;\n }\n else {\n scroller.scrollbarGroup[method]({\n translateY: newPos\n });\n scroller.scrollbar[method]({\n height: newSize\n });\n scroller.scrollbarRifles[method]({\n translateY: newRiflesPos\n });\n scroller.scrollbarTop = newPos;\n scroller.scrollbarLeft = 0;\n }\n if (newSize <= 12) {\n scroller.scrollbarRifles.hide();\n }\n else {\n scroller.scrollbarRifles.show();\n }\n // Show or hide the scrollbar based on the showFull setting\n if (options.showFull === false) {\n if (from <= 0 && to >= 1) {\n scroller.group.hide();\n }\n else {\n scroller.group.show();\n }\n }\n scroller.rendered = true;\n }\n /**\n * Checks if the extremes should be updated in response to a scrollbar\n * change event.\n *\n * @internal\n * @function Highcharts.Scrollbar#shouldUpdateExtremes\n */\n shouldUpdateExtremes(eventType) {\n return (pick(this.options.liveRedraw, H.svg &&\n !H.isTouchDevice &&\n !this.chart.boosted) ||\n // Mouseup always should change extremes\n eventType === 'mouseup' ||\n eventType === 'touchend' ||\n // Internal events\n !defined(eventType));\n }\n trackClick(e) {\n const scroller = this;\n const normalizedEvent = scroller.chart.pointer?.normalize(e) || e, range = scroller.to - scroller.from, top = scroller.y + scroller.scrollbarTop, left = scroller.x + scroller.scrollbarLeft;\n if ((scroller.options.vertical && normalizedEvent.chartY > top) ||\n (!scroller.options.vertical && normalizedEvent.chartX > left)) {\n // On the top or on the left side of the track:\n scroller.updatePosition(scroller.from + range, scroller.to + range);\n }\n else {\n // On the bottom or the right side of the track:\n scroller.updatePosition(scroller.from - range, scroller.to - range);\n }\n fireEvent(scroller, 'changed', {\n from: scroller.from,\n to: scroller.to,\n trigger: 'scrollbar',\n DOMEvent: e\n });\n }\n /**\n * Update the scrollbar with new options\n *\n * @internal\n * @function Highcharts.Scrollbar#update\n * @param {Highcharts.ScrollbarOptions} options\n */\n update(options) {\n this.destroy();\n this.init(this.chart.renderer, merge(true, this.options, options), this.chart);\n }\n /**\n * Update position option in the Scrollbar, with normalized 0-1 scale\n *\n * @internal\n * @function Highcharts.Scrollbar#updatePosition\n * @param {number} from\n * @param {number} to\n */\n updatePosition(from, to) {\n if (to > 1) {\n from = correctFloat(1 - correctFloat(to - from));\n to = 1;\n }\n if (from < 0) {\n to = correctFloat(to - from);\n from = 0;\n }\n this.from = from;\n this.to = to;\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\nScrollbar.defaultOptions = ScrollbarDefaults;\n/* *\n *\n * Default Export\n *\n * */\n/** @internal */\nexport default Scrollbar;\n","/* *\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Torstein Hønsi\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n * */\n'use strict';\nimport Axis from '../../Core/Axis/Axis.js';\nimport ChartNavigatorComposition from './ChartNavigatorComposition.js';\nimport D from '../../Core/Defaults.js';\nconst { defaultOptions } = D;\nimport H from '../../Core/Globals.js';\nconst { isTouchDevice } = H;\nimport NavigatorAxisAdditions from '../../Core/Axis/NavigatorAxisComposition.js';\nimport NavigatorComposition from './NavigatorComposition.js';\nimport Scrollbar from '../Scrollbar/Scrollbar.js';\nimport { addEvent, clamp, correctFloat, defined, destroyObjectProperties, erase, extend, find, fireEvent, isArray, isNumber, merge, pick, removeEvent, splat } from '../../Shared/Utilities.js';\n/* *\n *\n * Functions\n *\n * */\n/**\n * Finding the min or max of a set of variables where we don't know if they are\n * defined, is a pattern that is repeated several places in Highcharts. Consider\n * making this a global utility method.\n * @internal\n */\nfunction numExt(extreme, ...args) {\n const numbers = [].filter.call(args, isNumber);\n if (numbers.length) {\n return Math[extreme].apply(0, numbers);\n }\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * The Navigator class\n *\n * @internal\n * @class\n * @name Highcharts.Navigator\n *\n * @param {Highcharts.Chart} chart\n * Chart object\n */\nclass Navigator {\n /* *\n *\n * Static Properties\n *\n * */\n static compose(ChartClass, AxisClass, SeriesClass) {\n ChartNavigatorComposition.compose(ChartClass, Navigator);\n NavigatorComposition.compose(ChartClass, AxisClass, SeriesClass);\n }\n /* *\n *\n * Constructor\n *\n * */\n constructor(chart) {\n this.isDirty = false;\n this.scrollbarHeight = 0;\n this.init(chart);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Draw one of the handles on the side of the zoomed range in the navigator.\n *\n * @internal\n * @function Highcharts.Navigator#drawHandle\n *\n * @param {number} x\n * The x center for the handle\n *\n * @param {number} index\n * 0 for left and 1 for right\n *\n * @param {boolean|undefined} inverted\n * Flag for chart.inverted\n *\n * @param {string} verb\n * Use 'animate' or 'attr'\n */\n drawHandle(x, index, inverted, verb) {\n const navigator = this, height = navigator.navigatorOptions.handles.height;\n // Place it\n navigator.handles[index][verb](inverted ? {\n translateX: Math.round(navigator.left + navigator.height / 2),\n translateY: Math.round(navigator.top + parseInt(x, 10) + 0.5 - height)\n } : {\n translateX: Math.round(navigator.left + parseInt(x, 10)),\n translateY: Math.round(navigator.top + navigator.height / 2 - height / 2 - 1)\n });\n }\n /**\n * Render outline around the zoomed range\n *\n * @internal\n * @function Highcharts.Navigator#drawOutline\n *\n * @param {number} zoomedMin\n * in pixels position where zoomed range starts\n *\n * @param {number} zoomedMax\n * in pixels position where zoomed range ends\n *\n * @param {boolean|undefined} inverted\n * flag if chart is inverted\n *\n * @param {string} verb\n * use 'animate' or 'attr'\n */\n drawOutline(zoomedMin, zoomedMax, inverted, verb) {\n const navigator = this, maskInside = navigator.navigatorOptions.maskInside, outlineWidth = navigator.outline.strokeWidth(), halfOutline = outlineWidth / 2, outlineCorrection = (outlineWidth % 2) / 2, // #5800\n scrollButtonSize = navigator.scrollButtonSize, navigatorSize = navigator.size, navigatorTop = navigator.top, height = navigator.height, lineTop = navigatorTop - halfOutline, lineBtm = navigatorTop + height;\n let left = navigator.left, verticalMin, path;\n if (inverted) {\n verticalMin = navigatorTop + zoomedMax + outlineCorrection;\n zoomedMax = navigatorTop + zoomedMin + outlineCorrection;\n path = [\n [\n 'M',\n left + height,\n navigatorTop - scrollButtonSize - outlineCorrection\n ],\n // Top right of zoomed range\n ['L', left + height, verticalMin],\n ['L', left, verticalMin], // Top left of z.r.\n ['M', left, zoomedMax], // Bottom left of z.r.\n ['L', left + height, zoomedMax], // Bottom right of z.r.\n [\n 'L',\n left + height,\n navigatorTop + navigatorSize + scrollButtonSize\n ]\n ];\n if (maskInside) {\n path.push(\n // Upper left of zoomed range\n ['M', left + height, verticalMin - halfOutline], \n // Upper right of z.r.\n [\n 'L',\n left + height,\n zoomedMax + halfOutline\n ]);\n }\n }\n else {\n left -= scrollButtonSize;\n zoomedMin += left + scrollButtonSize - outlineCorrection;\n zoomedMax += left + scrollButtonSize - outlineCorrection;\n path = [\n // Left\n ['M', left, lineTop],\n // Upper left of zoomed range\n ['L', zoomedMin, lineTop],\n // Lower left of z.r.\n ['L', zoomedMin, lineBtm],\n // Lower right of z.r.\n ['M', zoomedMax, lineBtm],\n // Upper right of z.r.\n ['L', zoomedMax, lineTop],\n // Right\n [\n 'L',\n left + navigatorSize + scrollButtonSize * 2,\n lineTop\n ]\n ];\n if (maskInside) {\n path.push(\n // Upper left of zoomed range\n ['M', zoomedMin - halfOutline, lineTop], \n // Upper right of z.r.\n ['L', zoomedMax + halfOutline, lineTop]);\n }\n }\n navigator.outline[verb]({\n d: path\n });\n }\n /**\n * Render outline around the zoomed range\n *\n * @internal\n * @function Highcharts.Navigator#drawMasks\n *\n * @param {number} zoomedMin\n * in pixels position where zoomed range starts\n *\n * @param {number} zoomedMax\n * in pixels position where zoomed range ends\n *\n * @param {boolean|undefined} inverted\n * flag if chart is inverted\n *\n * @param {string} verb\n * use 'animate' or 'attr'\n */\n drawMasks(zoomedMin, zoomedMax, inverted, verb) {\n const navigator = this, left = navigator.left, top = navigator.top, navigatorHeight = navigator.height;\n let height, width, x, y;\n // Determine rectangle position & size\n // According to (non)inverted position:\n if (inverted) {\n x = [left, left, left];\n y = [top, top + zoomedMin, top + zoomedMax];\n width = [navigatorHeight, navigatorHeight, navigatorHeight];\n height = [\n zoomedMin,\n zoomedMax - zoomedMin,\n navigator.size - zoomedMax\n ];\n }\n else {\n x = [left, left + zoomedMin, left + zoomedMax];\n y = [top, top, top];\n width = [\n zoomedMin,\n zoomedMax - zoomedMin,\n navigator.size - zoomedMax\n ];\n height = [navigatorHeight, navigatorHeight, navigatorHeight];\n }\n navigator.shades.forEach((shade, i) => {\n shade[verb]({\n x: x[i],\n y: y[i],\n width: width[i],\n height: height[i]\n });\n });\n }\n /**\n * Generate and update DOM elements for a navigator:\n *\n * - main navigator group\n *\n * - all shades\n *\n * - outline\n *\n * - handles\n *\n * @internal\n * @function Highcharts.Navigator#renderElements\n */\n renderElements() {\n const navigator = this, navigatorOptions = navigator.navigatorOptions, maskInside = navigatorOptions.maskInside, chart = navigator.chart, inverted = chart.inverted, renderer = chart.renderer, mouseCursor = {\n cursor: inverted ? 'ns-resize' : 'ew-resize'\n }, \n // Create the main navigator group\n navigatorGroup = navigator.navigatorGroup ??\n (navigator.navigatorGroup = renderer\n .g('navigator')\n .attr({\n zIndex: 8,\n visibility: 'hidden'\n })\n .add());\n // Create masks, each mask will get events and fill:\n [\n !maskInside,\n maskInside,\n !maskInside\n ].forEach((hasMask, index) => {\n const shade = navigator.shades[index] ??\n (navigator.shades[index] = renderer.rect()\n .addClass('highcharts-navigator-mask' +\n (index === 1 ? '-inside' : '-outside'))\n .add(navigatorGroup));\n if (!chart.styledMode) {\n shade.attr({\n fill: hasMask ? navigatorOptions.maskFill : 'rgba(0,0,0,0)'\n });\n if (index === 1) {\n shade.css(mouseCursor);\n }\n }\n });\n // Create the outline:\n if (!navigator.outline) {\n navigator.outline = renderer.path()\n .addClass('highcharts-navigator-outline')\n .add(navigatorGroup);\n }\n if (!chart.styledMode) {\n navigator.outline.attr({\n 'stroke-width': navigatorOptions.outlineWidth,\n stroke: navigatorOptions.outlineColor\n });\n }\n // Create the handles:\n if (navigatorOptions.handles?.enabled) {\n let redrawHandles = false;\n const handlesOptions = navigatorOptions.handles, { height, width } = handlesOptions;\n [0, 1].forEach((index) => {\n const newSymbolName = handlesOptions.symbols[index];\n redrawHandles = redrawHandles ||\n (navigator.handles[index]?.symbolName !== newSymbolName);\n // First render of handles or update of handle symbol\n if (redrawHandles) {\n navigator.handles[index]?.destroy();\n navigator.handles[index] = renderer.symbol(newSymbolName, -width / 2 - 1, 0, width, height, handlesOptions);\n // Z index is 6 for right handle, 7 for left. Can't be 10,\n // because of the tooltip in inverted chart (#2908).\n navigator.handles[index].attr({ zIndex: 7 - index })\n .addClass('highcharts-navigator-handle ' +\n 'highcharts-navigator-handle-' +\n ['left', 'right'][index]).add(navigatorGroup);\n }\n if (chart.inverted) {\n navigator.handles[index].attr({\n rotation: 90,\n rotationOriginX: Math.floor(-width / 2),\n rotationOriginY: (height + width) / 2\n });\n }\n if (!chart.styledMode) {\n navigator.handles[index]\n .attr({\n fill: handlesOptions.backgroundColor,\n stroke: handlesOptions.borderColor,\n 'stroke-width': handlesOptions.lineWidth,\n width: handlesOptions.width,\n height: handlesOptions.height,\n x: -width / 2 - 1,\n y: 0\n })\n .css(mouseCursor);\n }\n });\n if (redrawHandles) {\n navigator.partsEventsToUnbind?.forEach((unbind) => {\n unbind();\n });\n navigator.partsEventsToUnbind = [\n ...navigator.getPartsEvents('mousedown'),\n ...navigator.getPartsEvents('touchstart')\n ];\n }\n }\n }\n /**\n * Update navigator\n *\n * @internal\n * @function Highcharts.Navigator#update\n *\n * @param {Highcharts.NavigatorOptions} options\n * Options to merge in when updating navigator\n */\n update(options, redraw = false) {\n const chart = this.chart, invertedUpdate = chart.options.chart.inverted !==\n chart.scrollbar?.options.vertical;\n merge(true, chart.options.navigator, options);\n this.navigatorOptions = chart.options.navigator || {};\n this.setOpposite();\n // Revert to destroy/init for navigator/scrollbar enabled toggle\n if (defined(options.enabled) || invertedUpdate) {\n this.destroy();\n this.navigatorEnabled = options.enabled || this.navigatorEnabled;\n return this.init(chart);\n }\n if (this.navigatorEnabled) {\n this.isDirty = true;\n if (options.adaptToUpdatedData === false) {\n this.baseSeries.forEach((series) => {\n removeEvent(series, 'updatedData', this.updatedDataHandler);\n }, this);\n }\n if (options.adaptToUpdatedData) {\n this.baseSeries.forEach((series) => {\n series.eventsToUnbind.push(addEvent(series, 'updatedData', this.updatedDataHandler));\n }, this);\n }\n // Update navigator series\n if (options.series || options.baseSeries) {\n this.setBaseSeries(void 0, false);\n }\n // Update navigator axis\n if (options.height || options.xAxis || options.yAxis) {\n this.height = options.height ?? this.height;\n const offsets = this.getXAxisOffsets();\n this.xAxis.update({\n ...options.xAxis,\n offsets,\n [chart.inverted ? 'width' : 'height']: this.height,\n [chart.inverted ? 'height' : 'width']: void 0\n }, false);\n this.yAxis.update({\n ...options.yAxis,\n [chart.inverted ? 'width' : 'height']: this.height\n }, false);\n }\n }\n if (redraw) {\n chart.redraw();\n }\n }\n /**\n * Render the navigator\n *\n * @internal\n * @function Highcharts.Navigator#render\n * @param {number} min\n * X axis value minimum\n * @param {number} max\n * X axis value maximum\n * @param {number} [pxMin]\n * Pixel value minimum\n * @param {number} [pxMax]\n * Pixel value maximum\n */\n render(min, max, pxMin, pxMax) {\n const navigator = this, chart = navigator.chart, xAxis = navigator.xAxis, pointRange = xAxis.pointRange || 0, scrollbarXAxis = xAxis.navigatorAxis.fake ? chart.xAxis[0] : xAxis, navigatorEnabled = navigator.navigatorEnabled, rendered = navigator.rendered, inverted = chart.inverted, minRange = chart.xAxis[0].minRange, maxRange = chart.xAxis[0].options.maxRange, scrollButtonSize = navigator.scrollButtonSize;\n let navigatorWidth, scrollbarLeft, scrollbarTop, scrollbarHeight = navigator.scrollbarHeight, navigatorSize, verb;\n // Don't redraw while moving the handles (#4703).\n if (this.hasDragged && !defined(pxMin)) {\n return;\n }\n if (this.isDirty) {\n // Update DOM navigator elements\n this.renderElements();\n }\n min = correctFloat(min - pointRange / 2);\n max = correctFloat(max + pointRange / 2);\n // Don't render the navigator until we have data (#486, #4202, #5172).\n if (!isNumber(min) || !isNumber(max)) {\n // However, if navigator was already rendered, we may need to resize\n // it. For example hidden series, but visible navigator (#6022).\n if (rendered) {\n pxMin = 0;\n pxMax = pick(xAxis.width, scrollbarXAxis.width);\n }\n else {\n return;\n }\n }\n navigator.left = pick(xAxis.left, \n // In case of scrollbar only, without navigator\n chart.plotLeft + scrollButtonSize +\n (inverted ? chart.plotWidth : 0));\n let zoomedMax = navigator.size = navigatorSize = pick(xAxis.len, (inverted ? chart.plotHeight : chart.plotWidth) -\n 2 * scrollButtonSize);\n if (inverted) {\n navigatorWidth = scrollbarHeight;\n }\n else {\n navigatorWidth = navigatorSize + 2 * scrollButtonSize;\n }\n // Get the pixel position of the handles\n pxMin = pick(pxMin, xAxis.toPixels(min, true));\n pxMax = pick(pxMax, xAxis.toPixels(max, true));\n // Verify (#1851, #2238)\n if (!isNumber(pxMin) || Math.abs(pxMin) === Infinity) {\n pxMin = 0;\n pxMax = navigatorWidth;\n }\n // Are we below the minRange? (#2618, #6191)\n const newMin = xAxis.toValue(pxMin, true), newMax = xAxis.toValue(pxMax, true), currentRange = Math.abs(correctFloat(newMax - newMin));\n if (defined(minRange) && currentRange < minRange) {\n if (this.grabbedLeft) {\n pxMin = xAxis.toPixels(newMax - minRange - pointRange, true);\n }\n else if (this.grabbedRight) {\n pxMax = xAxis.toPixels(newMin + minRange + pointRange, true);\n }\n }\n else if (defined(maxRange) &&\n correctFloat(currentRange - pointRange) > maxRange) {\n if (this.grabbedLeft) {\n pxMin = xAxis.toPixels(newMax - maxRange - pointRange, true);\n }\n else if (this.grabbedRight) {\n pxMax = xAxis.toPixels(newMin + maxRange + pointRange, true);\n }\n }\n // Handles are allowed to cross, but never exceed the plot area\n navigator.zoomedMax = clamp(Math.max(pxMin, pxMax), 0, zoomedMax);\n navigator.zoomedMin = clamp(navigator.fixedWidth ?\n navigator.zoomedMax - navigator.fixedWidth :\n Math.min(pxMin, pxMax), 0, zoomedMax);\n navigator.range = navigator.zoomedMax - navigator.zoomedMin;\n zoomedMax = Math.round(navigator.zoomedMax);\n const zoomedMin = Math.round(navigator.zoomedMin);\n if (navigatorEnabled) {\n navigator.navigatorGroup.attr({\n visibility: 'inherit'\n });\n // Place elements\n verb = rendered && !navigator.hasDragged ? 'animate' : 'attr';\n navigator.drawMasks(zoomedMin, zoomedMax, inverted, verb);\n navigator.drawOutline(zoomedMin, zoomedMax, inverted, verb);\n if (navigator.navigatorOptions.handles?.enabled) {\n navigator.drawHandle(zoomedMin, 0, inverted, verb);\n navigator.drawHandle(zoomedMax, 1, inverted, verb);\n }\n }\n if (navigator.scrollbar) {\n if (inverted) {\n scrollbarTop = navigator.top - scrollButtonSize;\n scrollbarLeft = navigator.left - scrollbarHeight +\n (navigatorEnabled || !scrollbarXAxis.opposite ? 0 :\n // Multiple axes has offsets:\n (scrollbarXAxis.titleOffset || 0) +\n // Self margin from the axis.title\n scrollbarXAxis.axisTitleMargin);\n scrollbarHeight = navigatorSize + 2 * scrollButtonSize;\n }\n else {\n scrollbarTop = navigator.top + (navigatorEnabled ?\n navigator.height :\n -scrollbarHeight);\n scrollbarLeft = navigator.left - scrollButtonSize;\n }\n // Reposition scrollbar\n navigator.scrollbar.position(scrollbarLeft, scrollbarTop, navigatorWidth, scrollbarHeight);\n // Keep scale 0-1\n navigator.scrollbar.setRange(\n // Use real value, not rounded because range can be very small\n // (#1716)\n navigator.zoomedMin / (navigatorSize || 1), navigator.zoomedMax / (navigatorSize || 1));\n }\n navigator.rendered = true;\n this.isDirty = false;\n fireEvent(this, 'afterRender');\n }\n /**\n * Set up the mouse and touch events for the navigator. Shades and handles\n * events are added inside the `renderElements` method by calling the\n * `getPartsEvents` method.\n *\n * @internal\n * @function Highcharts.Navigator#addMouseEvents\n */\n addMouseEvents() {\n const navigator = this, chart = navigator.chart, container = chart.container;\n const eventsToUnbind = [];\n let mouseMoveHandler, mouseUpHandler;\n /**\n * Create mouse events' handlers.\n * Make them as separate functions to enable wrapping them:\n */\n navigator.mouseMoveHandler = mouseMoveHandler = function (e) {\n navigator.onMouseMove(e);\n };\n navigator.mouseUpHandler = mouseUpHandler = function (e) {\n navigator.onMouseUp(e);\n };\n eventsToUnbind.push(\n // Add mouse move and mouseup events. These are bind to doc/div,\n // because Navigator.grabbedSomething flags are stored in mousedown\n // events\n addEvent(chart.renderTo, 'mousemove', mouseMoveHandler), addEvent(container.ownerDocument, 'mouseup', mouseUpHandler), \n // Touch events\n addEvent(chart.renderTo, 'touchmove', mouseMoveHandler), addEvent(container.ownerDocument, 'touchend', mouseUpHandler));\n navigator.eventsToUnbind = eventsToUnbind;\n // Data events\n if (navigator.series && navigator.series[0]) {\n eventsToUnbind.push(addEvent(navigator.series[0].xAxis, 'foundExtremes', function () {\n chart.navigator?.modifyNavigatorAxisExtremes();\n }));\n }\n }\n /**\n * Generate events for handles and masks\n *\n * @internal\n * @function Highcharts.Navigator#getPartsEvents\n *\n * @param {string} eventName\n * Event name handler, 'mousedown' or 'touchstart'\n *\n * @return {Array<Function>}\n * An array of functions to remove navigator functions from the\n * events again.\n */\n getPartsEvents(eventName) {\n const navigator = this, events = [];\n ['shades', 'handles'].forEach((name) => {\n navigator[name].forEach(function (navigatorItem, index) {\n events.push(addEvent(navigatorItem.element, eventName, function (e) {\n navigator[`${name}Mousedown`](e, index);\n }));\n });\n });\n return events;\n }\n /**\n * Mousedown on a shaded mask, either:\n *\n * - will be stored for future drag&drop\n *\n * - will directly shift to a new range\n *\n * @internal\n * @function Highcharts.Navigator#shadesMousedown\n *\n * @param {Highcharts.PointerEventObject} e\n * Mouse event\n *\n * @param {number} index\n * Index of a mask in Navigator.shades array\n */\n shadesMousedown(e, index) {\n e = this.chart.pointer?.normalize(e) || e;\n const navigator = this, chart = navigator.chart, xAxis = navigator.xAxis, zoomedMin = navigator.zoomedMin, navigatorSize = navigator.size, range = navigator.range;\n let navigatorPosition = navigator.left, chartX = e.chartX, fixedMax, fixedMin, ext, left;\n // For inverted chart, swap some options:\n if (chart.inverted) {\n chartX = e.chartY;\n navigatorPosition = navigator.top;\n }\n if (index === 1) {\n // Store information for drag&drop\n navigator.grabbedCenter = chartX;\n navigator.fixedWidth = range;\n navigator.dragOffset = chartX - zoomedMin;\n }\n else {\n // Shift the range by clicking on shaded areas\n left = chartX - navigatorPosition - range / 2;\n if (index === 0) {\n left = Math.max(0, left);\n }\n else if (index === 2 && left + range >= navigatorSize) {\n left = navigatorSize - range;\n if (navigator.reversedExtremes) {\n // #7713\n left -= range;\n fixedMin = navigator.getUnionExtremes()?.dataMin;\n }\n else {\n // #2293, #3543\n fixedMax = navigator.getUnionExtremes()?.dataMax;\n }\n }\n if (left !== zoomedMin) { // It has actually moved\n navigator.fixedWidth = range; // #1370\n ext = xAxis.navigatorAxis.toFixedRange(left, left + range, fixedMin, fixedMax);\n if (defined(ext.min)) { // #7411\n fireEvent(this, 'setRange', {\n min: Math.min(ext.min, ext.max),\n max: Math.max(ext.min, ext.max),\n redraw: true,\n eventArguments: {\n trigger: 'navigator'\n }\n });\n }\n }\n }\n }\n /**\n * Mousedown on a handle mask.\n * Will store necessary information for drag&drop.\n *\n * @internal\n * @function Highcharts.Navigator#handlesMousedown\n * @param {Highcharts.PointerEventObject} e\n * Mouse event\n * @param {number} index\n * Index of a handle in Navigator.handles array\n */\n handlesMousedown(e, index) {\n e = this.chart.pointer?.normalize(e) || e;\n const navigator = this, chart = navigator.chart, baseXAxis = chart.xAxis[0], \n // For reversed axes, min and max are changed,\n // so the other extreme should be stored\n reverse = navigator.reversedExtremes;\n if (index === 0) {\n // Grab the left handle\n navigator.grabbedLeft = true;\n navigator.otherHandlePos = navigator.zoomedMax;\n navigator.fixedExtreme = reverse ? baseXAxis.min : baseXAxis.max;\n }\n else {\n // Grab the right handle\n navigator.grabbedRight = true;\n navigator.otherHandlePos = navigator.zoomedMin;\n navigator.fixedExtreme = reverse ? baseXAxis.max : baseXAxis.min;\n }\n chart.setFixedRange(void 0);\n }\n /**\n * Mouse move event based on x/y mouse position.\n *\n * @internal\n * @function Highcharts.Navigator#onMouseMove\n *\n * @param {Highcharts.PointerEventObject} e\n * Mouse event\n */\n onMouseMove(e) {\n const navigator = this, chart = navigator.chart, navigatorSize = navigator.navigatorSize, range = navigator.range, dragOffset = navigator.dragOffset, inverted = chart.inverted;\n let left = navigator.left, chartX;\n // In iOS, a mousemove event with e.pageX === 0 is fired when holding\n // the finger down in the center of the scrollbar. This should be\n // ignored.\n if (!e.touches || e.touches[0].pageX !== 0) { // #4696\n e = chart.pointer?.normalize(e) || e;\n chartX = e.chartX;\n // Swap some options for inverted chart\n if (inverted) {\n left = navigator.top;\n chartX = e.chartY;\n }\n // Drag left handle or top handle\n if (navigator.grabbedLeft) {\n navigator.hasDragged = true;\n navigator.render(0, 0, chartX - left, navigator.otherHandlePos);\n // Drag right handle or bottom handle\n }\n else if (navigator.grabbedRight) {\n navigator.hasDragged = true;\n navigator.render(0, 0, navigator.otherHandlePos, chartX - left);\n // Drag scrollbar or open area in navigator\n }\n else if (navigator.grabbedCenter && dragOffset) {\n navigator.hasDragged = true;\n if (chartX < dragOffset) { // Outside left\n chartX = dragOffset;\n // Outside right\n }\n else if (chartX >\n navigatorSize + dragOffset - range) {\n chartX = navigatorSize + dragOffset - range;\n }\n navigator.render(0, 0, chartX - dragOffset, chartX - dragOffset + range);\n }\n if (navigator.hasDragged &&\n pick(navigator.scrollbarOptions?.liveRedraw, \n // By default, don't run live redraw on touch\n // devices or if the chart is in boost.\n !isTouchDevice &&\n !this.chart.boosted)) {\n e.DOMType = e.type;\n setTimeout(function () {\n navigator.onMouseUp(e);\n }, 0);\n }\n }\n }\n /**\n * Mouse up event based on x/y mouse position.\n *\n * @internal\n * @function Highcharts.Navigator#onMouseUp\n * @param {Highcharts.PointerEventObject} e\n * Mouse event\n */\n onMouseUp(e) {\n const navigator = this, chart = navigator.chart, xAxis = navigator.xAxis, scrollbar = navigator.scrollbar, DOMEvent = e.DOMEvent || e, inverted = chart.inverted, verb = navigator.rendered && !navigator.hasDragged ?\n 'animate' : 'attr';\n let zoomedMax, zoomedMin, unionExtremes, fixedMin, fixedMax, ext;\n if (\n // MouseUp is called for both, navigator and scrollbar (that order),\n // which causes calling afterSetExtremes twice. Prevent first call\n // by checking if scrollbar is going to set new extremes (#6334)\n (navigator.hasDragged && (!scrollbar || !scrollbar.hasDragged)) ||\n e.trigger === 'scrollbar') {\n unionExtremes = navigator.getUnionExtremes();\n // When dragging one handle, make sure the other one doesn't change\n if (navigator.zoomedMin === navigator.otherHandlePos) {\n fixedMin = navigator.fixedExtreme;\n }\n else if (navigator.zoomedMax === navigator.otherHandlePos) {\n fixedMax = navigator.fixedExtreme;\n }\n // Snap to right edge (#4076)\n if (navigator.zoomedMax === navigator.size) {\n fixedMax = navigator.reversedExtremes ?\n unionExtremes.dataMin :\n unionExtremes.dataMax;\n }\n // Snap to left edge (#7576)\n if (navigator.zoomedMin === 0) {\n fixedMin = navigator.reversedExtremes ?\n unionExtremes.dataMax :\n unionExtremes.dataMin;\n }\n ext = xAxis.navigatorAxis.toFixedRange(navigator.zoomedMin, navigator.zoomedMax, fixedMin, fixedMax);\n if (defined(ext.min)) {\n fireEvent(this, 'setRange', {\n min: Math.min(ext.min, ext.max),\n max: Math.max(ext.min, ext.max),\n redraw: true,\n animation: navigator.hasDragged ? false : null,\n eventArguments: {\n trigger: 'navigator',\n triggerOp: 'navigator-drag',\n DOMEvent: DOMEvent // #1838\n }\n });\n }\n }\n if (e.DOMType !== 'mousemove' &&\n e.DOMType !== 'touchmove') {\n navigator.grabbedLeft = navigator.grabbedRight =\n navigator.grabbedCenter = navigator.fixedWidth =\n navigator.fixedExtreme = navigator.otherHandlePos =\n navigator.hasDragged = navigator.dragOffset = null;\n }\n // Update position of navigator shades, outline and handles (#12573)\n if (navigator.navigatorEnabled &&\n isNumber(navigator.zoomedMin) &&\n isNumber(navigator.zoomedMax)) {\n zoomedMin = Math.round(navigator.zoomedMin);\n zoomedMax = Math.round(navigator.zoomedMax);\n if (navigator.shades) {\n navigator.drawMasks(zoomedMin, zoomedMax, inverted, verb);\n }\n if (navigator.outline) {\n navigator.drawOutline(zoomedMin, zoomedMax, inverted, verb);\n }\n if (navigator.navigatorOptions.handles?.enabled &&\n Object.keys(navigator.handles).length ===\n navigator.handles.length) {\n navigator.drawHandle(zoomedMin, 0, inverted, verb);\n navigator.drawHandle(zoomedMax, 1, inverted, verb);\n }\n }\n }\n /**\n * Removes the event handlers attached previously with addEvents.\n *\n * @internal\n * @function Highcharts.Navigator#removeEvents\n */\n removeEvents() {\n this.eventsToUnbind?.forEach((unbind) => {\n unbind();\n });\n this.eventsToUnbind = void 0;\n this.removeBaseSeriesEvents();\n }\n /**\n * Remove data events.\n *\n * @internal\n * @function Highcharts.Navigator#removeBaseSeriesEvents\n */\n removeBaseSeriesEvents() {\n const baseSeries = this.baseSeries || [];\n if (this.navigatorEnabled && baseSeries[0]) {\n if (this.navigatorOptions.adaptToUpdatedData !== false) {\n baseSeries.forEach(function (series) {\n removeEvent(series, 'updatedData', this.updatedDataHandler);\n }, this);\n }\n // We only listen for extremes-events on the first baseSeries\n if (baseSeries[0].xAxis) {\n removeEvent(baseSeries[0].xAxis, 'foundExtremes', this.modifyBaseAxisExtremes);\n }\n }\n }\n /**\n * Calculate the navigator xAxis offsets\n *\n * @internal\n */\n getXAxisOffsets() {\n return (this.chart.inverted ?\n [this.scrollButtonSize, 0, -this.scrollButtonSize, 0] :\n [0, -this.scrollButtonSize, 0, this.scrollButtonSize]);\n }\n /**\n * Initialize the Navigator object\n *\n * @internal\n * @function Highcharts.Navigator#init\n */\n init(chart) {\n const chartOptions = chart.options, navigatorOptions = chartOptions.navigator || {}, navigatorEnabled = navigatorOptions.enabled, scrollbarOptions = chartOptions.scrollbar || {}, scrollbarEnabled = scrollbarOptions.enabled, height = navigatorEnabled && navigatorOptions.height || 0, scrollbarHeight = scrollbarEnabled && scrollbarOptions.height || 0, scrollButtonSize = scrollbarOptions.buttonsEnabled && scrollbarHeight || 0;\n this.handles = [];\n this.shades = [];\n this.chart = chart;\n this.setBaseSeries();\n this.height = height;\n this.scrollbarHeight = scrollbarHeight;\n this.scrollButtonSize = scrollButtonSize;\n this.scrollbarEnabled = scrollbarEnabled;\n this.navigatorEnabled = !!navigatorEnabled;\n this.navigatorOptions = navigatorOptions;\n this.scrollbarOptions = scrollbarOptions;\n this.setOpposite();\n const navigator = this, baseSeries = navigator.baseSeries, xAxisIndex = chart.xAxis.length, yAxisIndex = chart.yAxis.length, baseXaxis = baseSeries && baseSeries[0] && baseSeries[0].xAxis ||\n chart.xAxis[0] || { options: {} };\n chart.isDirtyBox = true;\n if (navigator.navigatorEnabled) {\n const offsets = this.getXAxisOffsets();\n // An x axis is required for scrollbar also\n navigator.xAxis = new Axis(chart, merge({\n // Inherit base xAxis' break, ordinal options and overscroll\n breaks: baseXaxis.options.breaks,\n ordinal: baseXaxis.options.ordinal,\n overscroll: baseXaxis.options.overscroll\n }, navigatorOptions.xAxis, {\n type: 'datetime',\n yAxis: navigatorOptions.yAxis?.id,\n index: xAxisIndex,\n isInternal: true,\n offset: 0,\n keepOrdinalPadding: true, // #2436\n startOnTick: false,\n endOnTick: false,\n // Inherit base xAxis' padding when ordinal is false (#16915).\n minPadding: baseXaxis.options.ordinal ? 0 :\n baseXaxis.options.minPadding,\n maxPadding: baseXaxis.options.ordinal ? 0 :\n baseXaxis.options.maxPadding,\n zoomEnabled: false\n }, chart.inverted ? {\n offsets,\n width: height\n } : {\n offsets,\n height\n }), 'xAxis');\n navigator.yAxis = new Axis(chart, merge(navigatorOptions.yAxis, {\n alignTicks: false,\n offset: 0,\n index: yAxisIndex,\n isInternal: true,\n reversed: pick((navigatorOptions.yAxis &&\n navigatorOptions.yAxis.reversed), (chart.yAxis[0] && chart.yAxis[0].reversed), false), // #14060\n zoomEnabled: false\n }, chart.inverted ? {\n width: height\n } : {\n height: height\n }), 'yAxis');\n navigator.xAxis.clippable = false;\n navigator.yAxis.clippable = false;\n // If we have a base series, initialize the navigator series\n if (baseSeries ||\n navigatorOptions.series?.data ||\n navigatorOptions.series?.dataTable) {\n navigator.updateNavigatorSeries(false);\n // If not, set up an event to listen for added series\n }\n else if (chart.series.length === 0) {\n navigator.unbindRedraw = addEvent(chart, 'beforeRedraw', function () {\n // We've got one, now add it as base\n if (chart.series.length > 0 && !navigator.series) {\n navigator.setBaseSeries();\n navigator.unbindRedraw?.(); // Reset\n }\n });\n }\n navigator.reversedExtremes = (chart.inverted && !navigator.xAxis.reversed) || (!chart.inverted && navigator.xAxis.reversed);\n // Render items, so we can bind events to them:\n navigator.renderElements();\n // Add mouse events\n navigator.addMouseEvents();\n // In case of scrollbar only, fake an x axis to get translation\n }\n else {\n navigator.xAxis = {\n chart,\n navigatorAxis: {\n fake: true\n },\n translate: function (value, reverse) {\n const axis = chart.xAxis[0], ext = axis.getExtremes(), scrollTrackWidth = axis.len - 2 * scrollButtonSize, min = numExt('min', axis.options.min, ext.dataMin), valueRange = numExt('max', axis.options.max, ext.dataMax) - min;\n return reverse ?\n // From pixel to value\n (value * valueRange / scrollTrackWidth) + min :\n // From value to pixel\n scrollTrackWidth * (value - min) / valueRange;\n },\n toPixels: function (value) {\n return this.translate(value);\n },\n toValue: function (value) {\n return this.translate(value, true);\n }\n };\n navigator.xAxis.navigatorAxis.axis = navigator.xAxis;\n navigator.xAxis.navigatorAxis.toFixedRange = (NavigatorAxisAdditions.prototype.toFixedRange.bind(navigator.xAxis.navigatorAxis));\n }\n // Initialize the scrollbar\n if (chart.options.scrollbar?.enabled) {\n const options = merge(chart.options.scrollbar, { vertical: chart.inverted });\n if (!isNumber(options.margin)) {\n options.margin = chart.inverted ? -3 : 3;\n }\n chart.scrollbar = navigator.scrollbar = new Scrollbar(chart.renderer, options, chart);\n addEvent(navigator.scrollbar, 'changed', function (e) {\n const range = navigator.size, to = range * this.to, from = range * this.from;\n navigator.hasDragged = navigator.scrollbar?.hasDragged;\n navigator.render(0, 0, from, to);\n if (this.shouldUpdateExtremes(e.DOMType)) {\n setTimeout(function () {\n navigator.onMouseUp(e);\n });\n }\n });\n }\n // Add data events\n navigator.addBaseSeriesEvents();\n // Add redraw events\n navigator.addChartEvents();\n }\n /**\n * Set the opposite property on navigator\n *\n * @internal\n */\n setOpposite() {\n const navigatorOptions = this.navigatorOptions, navigatorEnabled = this.navigatorEnabled, chart = this.chart;\n this.opposite = pick(navigatorOptions.opposite, Boolean(!navigatorEnabled && chart.inverted)); // #6262\n }\n /**\n * Get the union data extremes of the chart - the outer data extremes of the\n * base X axis and the navigator axis.\n *\n * @internal\n * @function Highcharts.Navigator#getUnionExtremes\n */\n getUnionExtremes(returnFalseOnNoBaseSeries) {\n const baseAxis = this.chart.xAxis[0], time = this.chart.time, navAxis = this.xAxis, navAxisOptions = navAxis.options, baseAxisOptions = baseAxis.options;\n let ret;\n if (!returnFalseOnNoBaseSeries || baseAxis.dataMin !== null) {\n ret = {\n dataMin: pick(// #4053\n time.parse(navAxisOptions?.min), numExt('min', time.parse(baseAxisOptions.min), baseAxis.dataMin, navAxis.dataMin, navAxis.min)),\n dataMax: pick(time.parse(navAxisOptions?.max), numExt('max', time.parse(baseAxisOptions.max), baseAxis.dataMax, navAxis.dataMax, navAxis.max))\n };\n }\n return ret;\n }\n /**\n * Set the base series and update the navigator series from this. With a bit\n * of modification we should be able to make this an API method to be called\n * from the outside\n *\n * @internal\n * @function Highcharts.Navigator#setBaseSeries\n * @param {Highcharts.SeriesOptionsType} [baseSeriesOptions]\n * Additional series options for a navigator\n * @param {boolean} [redraw]\n * Whether to redraw after update.\n */\n setBaseSeries(baseSeriesOptions, redraw) {\n const chart = this.chart, baseSeries = this.baseSeries = [];\n baseSeriesOptions = (baseSeriesOptions ||\n chart.options.navigator?.baseSeries ||\n (chart.series.length ?\n // Find the first non-navigator series (#8430)\n find(chart.series, (s) => (!s.options.isInternal)).index :\n 0));\n // Iterate through series and add the ones that should be shown in\n // navigator.\n (chart.series || []).forEach((series, i) => {\n if (\n // Don't include existing nav series\n !series.options.isInternal &&\n (series.options.showInNavigator ||\n (i === baseSeriesOptions ||\n series.options.id === baseSeriesOptions) &&\n series.options.showInNavigator !== false)) {\n baseSeries.push(series);\n }\n });\n // When run after render, this.xAxis already exists\n if (this.xAxis && !this.xAxis.navigatorAxis.fake) {\n this.updateNavigatorSeries(true, redraw);\n }\n }\n /**\n * Update series in the navigator from baseSeries, adding new if does not\n * exist.\n *\n * @internal\n * @function Highcharts.Navigator.updateNavigatorSeries\n */\n updateNavigatorSeries(addEvents, redraw) {\n const navigator = this, chart = navigator.chart, baseSeries = navigator.baseSeries, navSeriesMixin = {\n enableMouseTracking: false,\n index: null, // #6162\n linkedTo: null, // #6734\n group: 'nav', // For columns\n padXAxis: false,\n xAxis: this.navigatorOptions.xAxis?.id,\n yAxis: this.navigatorOptions.yAxis?.id,\n showInLegend: false,\n stacking: void 0, // #4823\n isInternal: true,\n states: {\n inactive: {\n opacity: 1\n }\n }\n }, \n // Remove navigator series that are no longer in the baseSeries\n navigatorSeries = navigator.series =\n (navigator.series || []).filter((navSeries) => {\n const base = navSeries.baseSeries;\n if (base && baseSeries.indexOf(base) < 0) { // Not in array\n // If there is still a base series connected to this\n // series, remove event handler and reference.\n if (base) {\n removeEvent(base, 'updatedData', navigator.updatedDataHandler);\n delete base.navigatorSeries;\n }\n // Kill the nav series. It may already have been\n // destroyed (#8715).\n if (navSeries.chart) {\n navSeries.destroy();\n }\n return false;\n }\n return true;\n });\n let baseOptions, mergedNavSeriesOptions, chartNavigatorSeriesOptions = navigator.navigatorOptions.series, baseNavigatorOptions;\n // Go through each base series and merge the options to create new\n // series\n if (baseSeries && baseSeries.length) {\n baseSeries.forEach((base) => {\n const linkedNavSeries = base.navigatorSeries, userNavOptions = extend(\n // Grab color and visibility from base as default\n {\n color: base.color,\n visible: base.visible\n }, !isArray(chartNavigatorSeriesOptions) ?\n chartNavigatorSeriesOptions :\n defaultOptions.navigator.series);\n // Don't update if the series exists in nav and we have disabled\n // adaptToUpdatedData.\n if (linkedNavSeries &&\n navigator.navigatorOptions.adaptToUpdatedData === false) {\n return;\n }\n navSeriesMixin.name = 'Navigator ' + baseSeries.length;\n baseOptions = base.options || {};\n baseNavigatorOptions = baseOptions.navigatorOptions || {};\n // The dataLabels options are not merged correctly\n // if the settings are an array, #13847.\n userNavOptions.dataLabels = splat(userNavOptions.dataLabels);\n mergedNavSeriesOptions = merge(baseOptions, navSeriesMixin, userNavOptions, baseNavigatorOptions);\n // Once nav series type is resolved, pick correct pointRange\n mergedNavSeriesOptions.pointRange = pick(\n // Strictly set pointRange in options\n userNavOptions.pointRange, baseNavigatorOptions.pointRange, \n // Fallback to default values, e.g. `null` for column\n defaultOptions.plotOptions[mergedNavSeriesOptions.type || 'line']?.pointRange);\n // Merge data separately. Do a slice to avoid mutating the\n // navigator options from base series (#4923).\n const navigatorSeriesData = baseNavigatorOptions.data || userNavOptions.data, navigatorSeriesDataTable = baseNavigatorOptions.dataTable ||\n userNavOptions.dataTable;\n navigator.hasNavigatorData =\n navigator.hasNavigatorData ||\n !!navigatorSeriesData ||\n !!navigatorSeriesDataTable;\n mergedNavSeriesOptions.data =\n navigatorSeriesData ||\n baseOptions.data?.slice(0);\n mergedNavSeriesOptions.dataTable =\n navigatorSeriesDataTable ||\n baseOptions.dataTable;\n // Update or add the series\n if (linkedNavSeries && linkedNavSeries.options) {\n linkedNavSeries.update(mergedNavSeriesOptions, redraw);\n }\n else {\n base.navigatorSeries = chart.initSeries(mergedNavSeriesOptions);\n // Trigger setSortedData with dataSorting enabled (#20318)\n fireEvent(base.navigatorSeries, 'afterUpdate');\n base.navigatorSeries.baseSeries = base; // Store ref\n navigatorSeries.push(base.navigatorSeries);\n }\n });\n }\n // If user has defined data (and no base series) or explicitly defined\n // navigator.series as an array, we create these series on top of any\n // base series.\n if ((chartNavigatorSeriesOptions?.data ||\n chartNavigatorSeriesOptions?.dataTable) &&\n !(baseSeries && baseSeries.length) ||\n isArray(chartNavigatorSeriesOptions)) {\n const colors = chart.options.colors || [];\n navigator.hasNavigatorData = false;\n // Allow navigator.series to be an array\n chartNavigatorSeriesOptions =\n splat(chartNavigatorSeriesOptions);\n chartNavigatorSeriesOptions.forEach((userSeriesOptions, i) => {\n navSeriesMixin.name =\n 'Navigator ' + (navigatorSeries.length + 1);\n mergedNavSeriesOptions = merge(defaultOptions.navigator?.series, {\n // Since we don't have a base series to pull color from,\n // try to fake it by using color from series with same\n // index. Otherwise pull from the colors array. We need\n // an explicit color as otherwise updates will increment\n // color counter and we'll get a new color for each\n // update of the nav series.\n color: (chart.series[i] &&\n !chart.series[i].options.isInternal &&\n chart.series[i].color) ||\n colors[i] ||\n colors[0]\n }, navSeriesMixin, userSeriesOptions);\n mergedNavSeriesOptions.data = userSeriesOptions.data;\n mergedNavSeriesOptions.dataTable = userSeriesOptions.dataTable;\n if (mergedNavSeriesOptions.data ||\n mergedNavSeriesOptions.dataTable) {\n navigator.hasNavigatorData = true;\n navigatorSeries.push(chart.initSeries(mergedNavSeriesOptions));\n }\n });\n }\n if (addEvents) {\n this.addBaseSeriesEvents();\n }\n }\n /**\n * Add data events.\n * For example when main series is updated we need to recalculate extremes\n *\n * @internal\n * @function Highcharts.Navigator#addBaseSeriesEvent\n */\n addBaseSeriesEvents() {\n const navigator = this, baseSeries = navigator.baseSeries || [];\n // Bind modified extremes event to first base's xAxis only.\n // In event of > 1 base-xAxes, the navigator will ignore those.\n // Adding this multiple times to the same axis is no problem, as\n // duplicates should be discarded by the browser.\n if (baseSeries[0] && baseSeries[0].xAxis) {\n baseSeries[0].eventsToUnbind.push(addEvent(baseSeries[0].xAxis, 'foundExtremes', this.modifyBaseAxisExtremes));\n }\n baseSeries.forEach((base) => {\n // Link base series show/hide to navigator series visibility\n base.eventsToUnbind.push(addEvent(base, 'show', function () {\n if (this.navigatorSeries) {\n this.navigatorSeries.setVisible(true, false);\n }\n }));\n base.eventsToUnbind.push(addEvent(base, 'hide', function () {\n if (this.navigatorSeries) {\n this.navigatorSeries.setVisible(false, false);\n }\n }));\n // Respond to updated data in the base series, unless explicitly\n // not adapting to data changes.\n if (this.navigatorOptions.adaptToUpdatedData !== false) {\n if (base.xAxis) {\n base.eventsToUnbind.push(addEvent(base, 'updatedData', this.updatedDataHandler));\n }\n }\n // Handle series removal\n base.eventsToUnbind.push(addEvent(base, 'remove', function () {\n if (baseSeries) {\n erase(baseSeries, base); // #21043\n }\n if (this.navigatorSeries && navigator.series) {\n erase(navigator.series, this.navigatorSeries);\n if (defined(this.navigatorSeries.options)) {\n this.navigatorSeries.remove(false);\n }\n delete this.navigatorSeries;\n }\n }));\n });\n }\n /**\n * Get minimum from all base series connected to the navigator\n * @internal\n * @param {number} currentSeriesMin\n * Minium from the current series\n * @return {number}\n * Minimum from all series\n */\n getBaseSeriesMin(currentSeriesMin) {\n return this.baseSeries.reduce(function (min, series) {\n // #10193\n return Math.min(min, series.getColumn('x')[0] ?? min);\n }, currentSeriesMin);\n }\n /**\n * Set the navigator x axis extremes to reflect the total. The navigator\n * extremes should always be the extremes of the union of all series in the\n * chart as well as the navigator series.\n *\n * @internal\n * @function Highcharts.Navigator#modifyNavigatorAxisExtremes\n */\n modifyNavigatorAxisExtremes() {\n const xAxis = this.xAxis;\n if (typeof xAxis.getExtremes !== 'undefined') {\n const unionExtremes = this.getUnionExtremes(true);\n if (unionExtremes &&\n (unionExtremes.dataMin !== xAxis.min ||\n unionExtremes.dataMax !== xAxis.max)) {\n xAxis.min = unionExtremes.dataMin;\n xAxis.max = unionExtremes.dataMax;\n }\n }\n }\n /**\n * Hook to modify the base axis extremes with information from the Navigator\n *\n * @internal\n * @function Highcharts.Navigator#modifyBaseAxisExtremes\n */\n modifyBaseAxisExtremes() {\n const baseXAxis = this, navigator = baseXAxis.chart.navigator, baseExtremes = baseXAxis.getExtremes(), baseMin = baseExtremes.min, baseMax = baseExtremes.max, baseDataMin = baseExtremes.dataMin, baseDataMax = baseExtremes.dataMax, range = baseMax - baseMin, stickToMin = navigator?.stickToMin, stickToMax = navigator?.stickToMax, overscroll = pick(baseXAxis.ordinal?.convertOverscroll(baseXAxis.options.overscroll), 0), navigatorSeries = navigator.series && navigator.series[0], hasSetExtremes = !!baseXAxis.setExtremes, \n // When the extremes have been set by range selector button, don't\n // stick to min or max. The range selector buttons will handle the\n // extremes. (#5489)\n unmutable = baseXAxis.eventArgs &&\n baseXAxis.eventArgs.trigger === 'rangeSelectorButton';\n let newMax, newMin;\n if (!unmutable) {\n // If the zoomed range is already at the min, move it to the right\n // as new data comes in\n if (stickToMin) {\n newMin = baseDataMin;\n newMax = newMin + range;\n }\n // If the zoomed range is already at the max, move it to the right\n // as new data comes in\n if (stickToMax) {\n newMax = baseDataMax + overscroll;\n // If stickToMin is true, the new min value is set above\n if (!stickToMin) {\n newMin = Math.max(baseDataMin, // Don't go below data extremes (#13184)\n newMax - range, navigator.getBaseSeriesMin(navigatorSeries && navigatorSeries.xData ?\n navigatorSeries.xData[0] :\n -Number.MAX_VALUE));\n }\n }\n // Update the extremes\n if (hasSetExtremes && (stickToMin || stickToMax)) {\n if (isNumber(newMin)) {\n baseXAxis.min = baseXAxis.userMin = newMin;\n baseXAxis.max = baseXAxis.userMax = newMax;\n }\n }\n }\n // Reset\n navigator.stickToMin =\n navigator.stickToMax = null;\n }\n /**\n * Handler for updated data on the base series. When data is modified, the\n * navigator series must reflect it. This is called from the Chart.redraw\n * function before axis and series extremes are computed.\n *\n * @internal\n * @function Highcharts.Navigator#updateDataHandler\n */\n updatedDataHandler() {\n const navigator = this.chart.navigator, baseSeries = this, navigatorSeries = this.navigatorSeries, shouldStickToMax = navigator.reversedExtremes ?\n Math.round(navigator.zoomedMin) === 0 :\n Math.round(navigator.zoomedMax) >= Math.round(navigator.size);\n // If the scrollbar is scrolled all the way to the right, keep right as\n // new data comes in, unless user set navigator.stickToMax to false.\n navigator.stickToMax = pick(this.chart.options.navigator &&\n this.chart.options.navigator.stickToMax, shouldStickToMax);\n navigator.stickToMin = navigator.shouldStickToMin(baseSeries, navigator);\n // Set the navigator series data to the new data of the base series\n if (navigatorSeries && !navigator.hasNavigatorData) {\n navigatorSeries.options.pointStart = baseSeries.getColumn('x')[0];\n navigatorSeries.setData(baseSeries.options.data || baseSeries.options.dataTable, false, void 0, false); // #5414\n }\n }\n /**\n * Detect if the zoomed area should stick to the minimum, #14742.\n *\n * @internal\n * @function Highcharts.Navigator#shouldStickToMin\n */\n shouldStickToMin(baseSeries, navigator) {\n const xDataMin = navigator.getBaseSeriesMin(baseSeries.getColumn('x')[0]), xAxis = baseSeries.xAxis, max = xAxis.max, min = xAxis.min, range = xAxis.options.range;\n let stickToMin = true;\n if (isNumber(max) && isNumber(min)) {\n // If range declared, stick to the minimum only if the range\n // is smaller than the data set range.\n if (range && max - xDataMin > 0) {\n stickToMin = max - xDataMin < range;\n }\n else {\n // If the current axis minimum falls outside the new\n // updated dataset, we must adjust.\n stickToMin = min <= xDataMin;\n }\n }\n else {\n stickToMin = false; // #15864\n }\n return stickToMin;\n }\n /**\n * Add chart events, like redrawing navigator, when chart requires that.\n *\n * @internal\n * @function Highcharts.Navigator#addChartEvents\n */\n addChartEvents() {\n if (!this.eventsToUnbind) {\n this.eventsToUnbind = [];\n }\n this.eventsToUnbind.push(\n // Move the scrollbar after redraw, like after data updata even if\n // axes don't redraw\n addEvent(this.chart, 'redraw', function () {\n const navigator = this.navigator, xAxis = navigator && (navigator.baseSeries &&\n navigator.baseSeries[0] &&\n navigator.baseSeries[0].xAxis ||\n this.xAxis[0]); // #5709, #13114\n if (xAxis) {\n navigator.render(xAxis.min, xAxis.max);\n }\n }), \n // Make room for the navigator, can be placed around the chart:\n addEvent(this.chart, 'getMargins', function () {\n const chart = this, navigator = chart.navigator;\n let marginName = navigator.opposite ?\n 'plotTop' : 'marginBottom';\n if (chart.inverted) {\n marginName = navigator.opposite ?\n 'marginRight' : 'plotLeft';\n }\n chart[marginName] = (chart[marginName] || 0) + (navigator.navigatorEnabled || !chart.inverted ?\n navigator.height +\n (this.scrollbar?.options.margin || 0) +\n navigator.scrollbarHeight : 0) + (navigator.navigatorOptions.margin || 0);\n }), addEvent(this, 'setRange', function (e) {\n this.chart.xAxis[0].setExtremes(e.min, e.max, e.redraw, e.animation, e.eventArguments);\n }));\n }\n /**\n * Destroys allocated elements.\n *\n * @internal\n * @function Highcharts.Navigator#destroy\n */\n destroy() {\n // Disconnect events added in addEvents\n this.removeEvents();\n if (this.xAxis) {\n erase(this.chart.xAxis, this.xAxis);\n erase(this.chart.axes, this.xAxis);\n }\n if (this.yAxis) {\n erase(this.chart.yAxis, this.yAxis);\n erase(this.chart.axes, this.yAxis);\n }\n // Destroy series\n (this.series || []).forEach((s) => {\n if (s.destroy) {\n s.destroy();\n }\n });\n // Destroy properties\n [\n 'series', 'xAxis', 'yAxis', 'shades', 'outline', 'scrollbarTrack',\n 'scrollbarRifles', 'scrollbarGroup', 'scrollbar', 'navigatorGroup',\n 'rendered'\n ].forEach((prop) => {\n if (this[prop] && this[prop].destroy) {\n this[prop].destroy();\n }\n this[prop] = null;\n });\n // Destroy elements in collection\n [this.handles].forEach((coll) => {\n destroyObjectProperties(coll);\n });\n // Clean up linked series\n this.baseSeries.forEach((s) => {\n s.navigatorSeries = void 0;\n });\n this.navigatorEnabled = false;\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/** @internal */\nexport default Navigator;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n *\n * Accessibility component for the navigator.\n *\n * Author: Øystein Moseng\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\n/* *\n *\n * Imports\n *\n * */\nimport AccessibilityComponent from '../AccessibilityComponent.js';\nimport Announcer from '../Utils/Announcer.js';\nimport KeyboardNavigationHandler from '../KeyboardNavigationHandler.js';\nimport Navigator from '../../Stock/Navigator/Navigator.js';\nimport A from '../../Core/Animation/AnimationUtilities.js';\nconst { animObject } = A;\nimport T from '../../Core/Templating.js';\nconst { format } = T;\nimport HU from '../Utils/HTMLUtilities.js';\nconst { getFakeMouseEvent } = HU;\nimport CU from '../Utils/ChartUtilities.js';\nconst { getAxisRangeDescription, fireEventOnWrappedOrUnwrappedElement } = CU;\nimport { clamp, internalClearTimeout, pick, syncTimeout } from '../../Shared/Utilities.js';\n/**\n * The NavigatorComponent class\n *\n * @private\n * @class\n * @name Highcharts.NavigatorComponent\n */\nclass NavigatorComponent extends AccessibilityComponent {\n /**\n * Init the component\n * @private\n */\n init() {\n const chart = this.chart, component = this;\n this.announcer = new Announcer(chart, 'polite');\n // Update positions after render\n this.addEvent(Navigator, 'afterRender', function () {\n if (this.chart === component.chart &&\n this.chart.renderer) {\n syncTimeout(() => {\n component.proxyProvider\n .updateGroupProxyElementPositions('navigator');\n component.updateHandleValues();\n }, animObject(pick(this.chart.renderer.globalAnimation, true)).duration);\n }\n });\n }\n /**\n * Called on updates\n * @private\n */\n onChartUpdate() {\n const chart = this.chart, options = chart.options, navigator = options.navigator;\n if (navigator.enabled && navigator.accessibility?.enabled) {\n const verbosity = options.accessibility.landmarkVerbosity, groupFormatStr = options.lang\n .accessibility?.navigator.groupLabel;\n // We just recreate the group for simplicity. Could consider\n // updating the existing group if the verbosity has not changed.\n this.proxyProvider.removeGroup('navigator');\n this.proxyProvider.addGroup('navigator', 'div', {\n role: verbosity === 'all' ? 'region' : 'group',\n 'aria-label': format(groupFormatStr, { chart }, chart)\n });\n const handleFormatStr = options.lang\n .accessibility?.navigator.handleLabel;\n [0, 1].forEach((n) => {\n const handle = this.getHandleByIx(n);\n if (handle) {\n const proxyEl = this.proxyProvider.addProxyElement('navigator', {\n click: handle\n }, 'input', {\n type: 'range',\n 'aria-label': format(handleFormatStr, { handleIx: n, chart }, chart)\n });\n this[n ? 'maxHandleProxy' : 'minHandleProxy'] =\n proxyEl.innerElement;\n proxyEl.innerElement.style.pointerEvents = 'none';\n proxyEl.innerElement.oninput =\n () => this.updateNavigator();\n }\n });\n this.updateHandleValues();\n }\n else {\n this.proxyProvider.removeGroup('navigator');\n }\n }\n /**\n * Get navigation for a navigator handle.\n * @private\n * @return {Highcharts.KeyboardNavigationHandler} The module object.\n */\n getNavigatorHandleNavigation(handleIx) {\n const component = this, chart = this.chart, proxyEl = handleIx ? this.maxHandleProxy : this.minHandleProxy, keys = this.keyCodes;\n return new KeyboardNavigationHandler(chart, {\n keyCodeMap: [[\n [keys.left, keys.right, keys.up, keys.down],\n function (keyCode) {\n if (proxyEl) {\n const delta = keyCode === keys.left ||\n keyCode === keys.up ? -1 : 1;\n proxyEl.value = '' + clamp(parseFloat(proxyEl.value) + delta, 0, 100);\n component.updateNavigator(() => {\n const handle = component.getHandleByIx(handleIx);\n if (handle) {\n chart.setFocusToElement(handle, proxyEl);\n }\n });\n }\n return this.response.success;\n }\n ]],\n init: () => {\n chart.setFocusToElement(this.getHandleByIx(handleIx), proxyEl);\n },\n validate: () => !!(this.getHandleByIx(handleIx) && proxyEl &&\n chart.options.navigator.accessibility?.enabled)\n });\n }\n /**\n * Get keyboard navigation handlers for this component.\n * @return {Array<Highcharts.KeyboardNavigationHandler>}\n * List of module objects.\n */\n getKeyboardNavigation() {\n return [\n this.getNavigatorHandleNavigation(0),\n this.getNavigatorHandleNavigation(1)\n ];\n }\n /**\n * Remove component traces\n */\n destroy() {\n if (this.updateNavigatorThrottleTimer) {\n internalClearTimeout(this.updateNavigatorThrottleTimer);\n }\n this.proxyProvider.removeGroup('navigator');\n if (this.announcer) {\n this.announcer.destroy();\n }\n }\n /**\n * Update the value of the handles to match current navigator pos.\n * @private\n */\n updateHandleValues() {\n const navigator = this.chart.navigator;\n if (navigator && this.minHandleProxy && this.maxHandleProxy) {\n const length = navigator.size;\n this.minHandleProxy.value =\n '' + Math.round(navigator.zoomedMin / length * 100);\n this.maxHandleProxy.value =\n '' + Math.round(navigator.zoomedMax / length * 100);\n }\n }\n /**\n * Get a navigator handle by its index\n * @private\n */\n getHandleByIx(ix) {\n const navigator = this.chart.navigator;\n return navigator && navigator.handles &&\n navigator.handles[ix];\n }\n /**\n * Update navigator to match changed proxy values.\n * @private\n */\n updateNavigator(beforeAnnounce) {\n const performUpdate = (beforeAnnounce) => {\n const chart = this.chart, { navigator, pointer } = chart, keyboardNavigation = this.chart.accessibility?.keyboardNavigation;\n if (navigator &&\n pointer &&\n this.minHandleProxy &&\n this.maxHandleProxy) {\n const chartPos = pointer.getChartPosition(), minNewX = parseFloat(this.minHandleProxy.value) /\n 100 * navigator.size, maxNewX = parseFloat(this.maxHandleProxy.value) /\n 100 * navigator.size;\n // Fire fake events in order for each handle.\n [\n [0, 'mousedown', navigator.zoomedMin],\n [0, 'mousemove', minNewX],\n [0, 'mouseup', minNewX],\n [1, 'mousedown', navigator.zoomedMax],\n [1, 'mousemove', maxNewX],\n [1, 'mouseup', maxNewX]\n ].forEach(([handleIx, type, x]) => {\n const handle = this.getHandleByIx(handleIx)?.element;\n if (handle) {\n fireEventOnWrappedOrUnwrappedElement(handle, getFakeMouseEvent(type, {\n x: chartPos.left + navigator.left + x,\n y: chartPos.top + navigator.top\n }, handle));\n }\n });\n // If navigating by keyboard, do not reset #22122\n if (keyboardNavigation) {\n keyboardNavigation.keyboardReset = false;\n }\n if (beforeAnnounce) {\n beforeAnnounce();\n }\n // Announce the update\n const announceFormatStr = chart.options.lang\n .accessibility?.navigator.changeAnnouncement, axisRangeDescription = getAxisRangeDescription(chart.xAxis[0]);\n this.announcer.announce(format(announceFormatStr, { axisRangeDescription, chart }, chart));\n }\n };\n // Throttle updates so as not to reduce performance with\n // continuous keypress.\n if (this.updateNavigatorThrottleTimer) {\n internalClearTimeout(this.updateNavigatorThrottleTimer);\n }\n this.updateNavigatorThrottleTimer = setTimeout(performUpdate.bind(this, beforeAnnounce), 20);\n }\n}\n/* *\n *\n * Export Default\n *\n * */\nexport default NavigatorComponent;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Place descriptions on a series and its points.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport AnnotationsA11y from '../AnnotationsA11y.js';\nconst { getPointAnnotationTexts } = AnnotationsA11y;\nimport ChartUtilities from '../../Utils/ChartUtilities.js';\nconst { getAxisDescription, getSeriesFirstPointElement, getSeriesA11yElement, unhideChartElementFromAT } = ChartUtilities;\nimport F from '../../../Core/Templating.js';\nconst { format, numberFormat } = F;\nimport HTMLUtilities from '../../Utils/HTMLUtilities.js';\nconst { reverseChildNodes, stripHTMLTagsFromString: stripHTMLTags } = HTMLUtilities;\nimport { defined, find, isString, isNumber, pick } from '../../../Shared/Utilities.js';\n/* *\n *\n * Functions\n *\n * */\n/**\n * @private\n */\nfunction findFirstPointWithGraphic(point) {\n const sourcePointIndex = point.index;\n if (!point.series || !point.series.data || !defined(sourcePointIndex)) {\n return null;\n }\n const nullInteraction = point.series.options?.nullInteraction;\n return find(point.series.data, function (p) {\n return !!(p &&\n typeof p.index !== 'undefined' &&\n (nullInteraction || p.index > sourcePointIndex) &&\n p.graphic &&\n p.graphic.element);\n }) || null;\n}\n/**\n * Whether or not we should add a mock point element in\n * order to describe a point that has no graphic.\n * @private\n */\nfunction shouldAddMockPoint(point) {\n // Note: Sunburst series use isNull for hidden points on drilldown.\n // Ignore these.\n const series = point.series, chart = series && series.chart, isSunburst = series && series.is('sunburst'), isNull = point.isNull, shouldDescribeNull = chart &&\n chart\n .options.accessibility.point.describeNull;\n return isNull && !isSunburst && shouldDescribeNull;\n}\n/**\n * @private\n */\nfunction makeMockElement(point, pos) {\n const renderer = point.series.chart.renderer, mock = renderer.rect(pos.x, pos.y, 1, 1);\n mock.attr({\n 'class': 'highcharts-a11y-mock-point',\n fill: 'none',\n opacity: 0,\n 'fill-opacity': 0,\n 'stroke-opacity': 0\n });\n return mock;\n}\n/**\n * @private\n */\nfunction addMockPointElement(point) {\n const series = point.series, firstPointWithGraphic = findFirstPointWithGraphic(point), firstGraphic = firstPointWithGraphic && firstPointWithGraphic.graphic, parentGroup = firstGraphic ?\n firstGraphic.parentGroup :\n series.graph || series.group, mockPos = firstPointWithGraphic ? {\n x: pick(point.plotX, firstPointWithGraphic.plotX, 0),\n y: pick(point.plotY, firstPointWithGraphic.plotY, 0)\n } : {\n x: pick(point.plotX, 0),\n y: pick(point.plotY, 0)\n }, mockElement = makeMockElement(point, mockPos);\n if (parentGroup && parentGroup.element) {\n point.graphic = mockElement;\n point.hasMockGraphic = true;\n mockElement.add(parentGroup);\n // Move to correct pos in DOM\n parentGroup.element.insertBefore(mockElement.element, firstGraphic ? firstGraphic.element : null);\n return mockElement.element;\n }\n}\n/**\n * @private\n */\nfunction hasMorePointsThanDescriptionThreshold(series) {\n const chartA11yOptions = series.chart.options.accessibility, threshold = (chartA11yOptions.series.pointDescriptionEnabledThreshold);\n return !!(threshold !== false &&\n series.points &&\n series.points.length >= +threshold);\n}\n/**\n * @private\n */\nfunction shouldSetScreenReaderPropsOnPoints(series) {\n const seriesA11yOptions = series.options.accessibility || {};\n return !hasMorePointsThanDescriptionThreshold(series) &&\n !seriesA11yOptions.exposeAsGroupOnly;\n}\n/**\n * @private\n */\nfunction shouldSetKeyboardNavPropsOnPoints(series) {\n const chartA11yOptions = series.chart.options.accessibility, seriesNavOptions = chartA11yOptions.keyboardNavigation.seriesNavigation;\n return !!(series.points && (series.points.length <\n +seriesNavOptions.pointNavigationEnabledThreshold ||\n seriesNavOptions.pointNavigationEnabledThreshold === false));\n}\n/**\n * @private\n */\nfunction shouldDescribeSeriesElement(series) {\n const chart = series.chart, chartOptions = chart.options.chart, chartHas3d = chartOptions.options3d && chartOptions.options3d.enabled, hasMultipleSeries = chart.series.length > 1, describeSingleSeriesOption = chart.options.accessibility.series.describeSingleSeries, exposeAsGroupOnlyOption = (series.options.accessibility || {}).exposeAsGroupOnly, noDescribe3D = chartHas3d && hasMultipleSeries;\n return !noDescribe3D && (hasMultipleSeries || describeSingleSeriesOption ||\n exposeAsGroupOnlyOption || hasMorePointsThanDescriptionThreshold(series));\n}\n/**\n * @private\n */\nfunction pointNumberToString(point, value) {\n const series = point.series, chart = series.chart, a11yPointOptions = chart.options.accessibility.point || {}, seriesA11yPointOptions = series.options.accessibility &&\n series.options.accessibility.point || {}, tooltipOptions = series.tooltipOptions || {}, lang = chart.options.lang;\n if (isNumber(value)) {\n return numberFormat(value, seriesA11yPointOptions.valueDecimals ||\n a11yPointOptions.valueDecimals ||\n tooltipOptions.valueDecimals ||\n -1, lang.decimalPoint, lang.accessibility.thousandsSep || lang.thousandsSep);\n }\n return value;\n}\n/**\n * @private\n */\nfunction getSeriesDescriptionText(series) {\n const seriesA11yOptions = series.options.accessibility || {}, descOpt = seriesA11yOptions.description;\n return descOpt && series.chart.langFormat('accessibility.series.description', {\n description: descOpt,\n series: series\n }) || '';\n}\n/**\n * @private\n */\nfunction getSeriesAxisDescriptionText(series, axisCollection) {\n const axis = series[axisCollection];\n return series.chart.langFormat('accessibility.series.' + axisCollection + 'Description', {\n name: getAxisDescription(axis),\n series: series\n });\n}\n/**\n * Get accessible time description for a point on a datetime axis.\n *\n * @private\n */\nfunction getPointA11yTimeDescription(point) {\n const series = point.series, chart = series.chart, seriesA11yOptions = series.options.accessibility &&\n series.options.accessibility.point || {}, a11yOptions = chart.options.accessibility.point || {}, dateXAxis = series.xAxis && series.xAxis.dateTime;\n if (dateXAxis) {\n const tooltipDateFormat = dateXAxis.getXDateFormat(point.x || 0, chart.options.tooltip.dateTimeLabelFormats), dateFormat = seriesA11yOptions.dateFormatter &&\n seriesA11yOptions.dateFormatter(point) ||\n a11yOptions.dateFormatter?.(point) ||\n seriesA11yOptions.dateFormat ||\n a11yOptions.dateFormat ||\n tooltipDateFormat;\n return chart.time.dateFormat(dateFormat, point.x || 0, void 0);\n }\n}\n/**\n * @private\n */\nfunction getPointXDescription(point) {\n const timeDesc = getPointA11yTimeDescription(point), xAxis = point.series.xAxis || {}, pointCategory = xAxis.categories && defined(point.category) &&\n ('' + point.category).replace('<br/>', ' '), canUseId = defined(point.id) &&\n ('' + point.id).indexOf('highcharts-') < 0, fallback = 'x, ' + point.x;\n return point.name || timeDesc || pointCategory ||\n (canUseId ? point.id : fallback);\n}\n/**\n * @private\n */\nfunction getPointArrayMapValueDescription(point, prefix, suffix) {\n const pre = prefix || '', suf = suffix || '', keyToValStr = function (key) {\n const num = pointNumberToString(point, pick(point[key], point.options[key]));\n return num !== void 0 ?\n key + ': ' + pre + num + suf :\n num;\n }, pointArrayMap = point.series.pointArrayMap;\n return pointArrayMap.reduce(function (desc, key) {\n const propDesc = keyToValStr(key);\n return propDesc ?\n (desc + (desc.length ? ', ' : '') + propDesc) :\n desc;\n }, '');\n}\n/**\n * @private\n */\nfunction getPointValue(point) {\n const series = point.series, a11yPointOpts = series.chart.options.accessibility.point || {}, seriesA11yPointOpts = series.chart.options.accessibility &&\n series.chart.options.accessibility.point || {}, tooltipOptions = series.tooltipOptions || {}, valuePrefix = seriesA11yPointOpts.valuePrefix ||\n a11yPointOpts.valuePrefix ||\n tooltipOptions.valuePrefix ||\n '', valueSuffix = seriesA11yPointOpts.valueSuffix ||\n a11yPointOpts.valueSuffix ||\n tooltipOptions.valueSuffix ||\n '', fallbackKey = (typeof point.value !==\n 'undefined' ?\n 'value' : 'y'), fallbackDesc = pointNumberToString(point, point[fallbackKey]);\n if (point.isNull) {\n return series.chart.langFormat('accessibility.series.nullPointValue', {\n point: point\n });\n }\n if (series.pointArrayMap) {\n return getPointArrayMapValueDescription(point, valuePrefix, valueSuffix);\n }\n return valuePrefix + fallbackDesc + valueSuffix;\n}\n/**\n * Return the description for the annotation(s) connected to a point, or\n * empty string if none.\n *\n * @private\n * @param {Highcharts.Point} point\n * The data point to get the annotation info from.\n * @return {string}\n * Annotation description\n */\nfunction getPointAnnotationDescription(point) {\n const chart = point.series.chart;\n const langKey = 'accessibility.series.pointAnnotationsDescription';\n const annotations = getPointAnnotationTexts(point);\n const context = { point, annotations };\n return annotations.length ? chart.langFormat(langKey, context) : '';\n}\n/**\n * Return string with information about point.\n * @private\n */\nfunction getPointValueDescription(point) {\n const series = point.series, chart = series.chart, seriesA11yOptions = series.options.accessibility, seriesValueDescFormat = seriesA11yOptions && seriesA11yOptions.point &&\n seriesA11yOptions.point.valueDescriptionFormat, pointValueDescriptionFormat = seriesValueDescFormat ||\n chart.options.accessibility.point.valueDescriptionFormat, showXDescription = pick(series.xAxis &&\n series.xAxis.options.accessibility &&\n series.xAxis.options.accessibility.enabled, !chart.angular && series.type !== 'flowmap'), xDesc = showXDescription ? getPointXDescription(point) : '', context = {\n point: point,\n index: defined(point.index) ? (point.index + 1) : '',\n xDescription: xDesc,\n value: getPointValue(point),\n separator: showXDescription ? ', ' : ''\n };\n return format(pointValueDescriptionFormat, context, chart);\n}\n/**\n * Return string with information about point.\n * @private\n */\nfunction defaultPointDescriptionFormatter(point) {\n const series = point.series, shouldExposeSeriesName = series.chart.series.length > 1 ||\n series.options.name, valText = getPointValueDescription(point), description = point.options && point.options.accessibility &&\n point.options.accessibility.description, userDescText = description ? ' ' + description : '', seriesNameText = shouldExposeSeriesName ? ' ' + series.name + '.' : '', annotationsDesc = getPointAnnotationDescription(point), pointAnnotationsText = annotationsDesc ? ' ' + annotationsDesc : '';\n point.accessibility = point.accessibility || {};\n point.accessibility.valueDescription = valText;\n return valText + userDescText + seriesNameText + pointAnnotationsText;\n}\n/**\n * Set a11y props on a point element\n * @private\n * @param {Highcharts.Point} point\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} pointElement\n */\nfunction setPointScreenReaderAttribs(point, pointElement) {\n const series = point.series, seriesPointA11yOptions = series.options.accessibility?.point || {}, a11yPointOptions = series.chart.options.accessibility.point || {}, label = stripHTMLTags((isString(seriesPointA11yOptions.descriptionFormat) &&\n format(seriesPointA11yOptions.descriptionFormat, point, series.chart)) ||\n seriesPointA11yOptions.descriptionFormatter?.(point) ||\n (isString(a11yPointOptions.descriptionFormat) &&\n format(a11yPointOptions.descriptionFormat, point, series.chart)) ||\n a11yPointOptions.descriptionFormatter?.(point) ||\n defaultPointDescriptionFormatter(point), series.chart.renderer.forExport);\n pointElement.setAttribute('role', 'img');\n pointElement.setAttribute('aria-label', label);\n}\n/**\n * Add accessible info to individual point elements of a series\n * @private\n * @param {Highcharts.Series} series\n */\nfunction describePointsInSeries(series) {\n const setScreenReaderProps = shouldSetScreenReaderPropsOnPoints(series), setKeyboardProps = shouldSetKeyboardNavPropsOnPoints(series), shouldDescribeNullPoints = series.chart.options.accessibility\n .point.describeNull;\n if (setScreenReaderProps || setKeyboardProps) {\n series.points.forEach((point) => {\n const pointEl = point.graphic && point.graphic.element ||\n shouldAddMockPoint(point) && addMockPointElement(point), pointA11yDisabled = (point.options &&\n point.options.accessibility &&\n point.options.accessibility.enabled === false);\n if (pointEl) {\n if (point.isNull && !shouldDescribeNullPoints) {\n pointEl.setAttribute('aria-hidden', true);\n return;\n }\n // We always set tabindex, as long as we are setting props.\n // When setting tabindex, also remove default outline to\n // avoid ugly border on click.\n pointEl.setAttribute('tabindex', '-1');\n if (!series.chart.styledMode) {\n pointEl.style.outline = 'none';\n }\n if (setScreenReaderProps && !pointA11yDisabled) {\n setPointScreenReaderAttribs(point, pointEl);\n }\n else {\n pointEl.setAttribute('aria-hidden', true);\n }\n }\n });\n }\n}\n/**\n * Return string with information about series.\n * @private\n */\nfunction defaultSeriesDescriptionFormatter(series) {\n const chart = series.chart, chartTypes = chart.types || [], description = getSeriesDescriptionText(series), shouldDescribeAxis = function (coll) {\n return chart[coll] && chart[coll].length > 1 && series[coll];\n }, seriesNumber = series.index + 1, xAxisInfo = getSeriesAxisDescriptionText(series, 'xAxis'), yAxisInfo = getSeriesAxisDescriptionText(series, 'yAxis'), summaryContext = {\n seriesNumber,\n series,\n chart\n }, combinationSuffix = chartTypes.length > 1 ? 'Combination' : '', summary = chart.langFormat('accessibility.series.summary.' + series.type + combinationSuffix, summaryContext) || chart.langFormat('accessibility.series.summary.default' + combinationSuffix, summaryContext), axisDescription = (shouldDescribeAxis('yAxis') ? ' ' + yAxisInfo + '.' : '') + (shouldDescribeAxis('xAxis') ? ' ' + xAxisInfo + '.' : ''), formatStr = pick(series.options.accessibility &&\n series.options.accessibility.descriptionFormat, chart.options.accessibility.series.descriptionFormat, '');\n return format(formatStr, {\n seriesDescription: summary,\n authorDescription: (description ? ' ' + description : ''),\n axisDescription,\n series,\n chart,\n seriesNumber\n }, void 0);\n}\n/**\n * Set a11y props on a series element\n * @private\n * @param {Highcharts.Series} series\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} seriesElement\n */\nfunction describeSeriesElement(series, seriesElement) {\n const seriesA11yOptions = series.options.accessibility || {}, a11yOptions = series.chart.options.accessibility, landmarkVerbosity = a11yOptions.landmarkVerbosity;\n // Handle role attribute\n if (seriesA11yOptions.exposeAsGroupOnly) {\n seriesElement.setAttribute('role', 'img');\n }\n else if (landmarkVerbosity === 'all') {\n seriesElement.setAttribute('role', 'region');\n }\n else {\n seriesElement.setAttribute('role', 'group');\n }\n seriesElement.setAttribute('tabindex', '-1');\n if (!series.chart.styledMode) {\n // Don't show browser outline on click, despite tabindex\n seriesElement.style.outline = 'none';\n }\n seriesElement.setAttribute('aria-label', stripHTMLTags(a11yOptions.series.descriptionFormatter &&\n a11yOptions.series.descriptionFormatter(series) ||\n defaultSeriesDescriptionFormatter(series), series.chart.renderer.forExport));\n}\n/**\n * Put accessible info on series and points of a series.\n * @param {Highcharts.Series} series The series to add info on.\n */\nfunction describeSeries(series) {\n const chart = series.chart, firstPointEl = getSeriesFirstPointElement(series), seriesEl = getSeriesA11yElement(series), is3d = chart.is3d && chart.is3d();\n if (seriesEl) {\n // For some series types the order of elements do not match the\n // order of points in series. In that case we have to reverse them\n // in order for AT to read them out in an understandable order.\n // Due to z-index issues we cannot do this for 3D charts.\n if (seriesEl.lastChild === firstPointEl && !is3d) {\n reverseChildNodes(seriesEl);\n }\n describePointsInSeries(series);\n unhideChartElementFromAT(chart, seriesEl);\n if (shouldDescribeSeriesElement(series)) {\n describeSeriesElement(series, seriesEl);\n }\n else {\n seriesEl.removeAttribute('aria-label');\n }\n }\n}\n/* *\n *\n * Default Export\n *\n * */\nconst SeriesDescriber = {\n defaultPointDescriptionFormatter,\n defaultSeriesDescriptionFormatter,\n describeSeries\n};\nexport default SeriesDescriber;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Handle announcing new data for a chart.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport H from '../../../Core/Globals.js';\nconst { composed } = H;\nimport Announcer from '../../Utils/Announcer.js';\nimport ChartUtilities from '../../Utils/ChartUtilities.js';\nconst { getChartTitle } = ChartUtilities;\nimport EventProvider from '../../Utils/EventProvider.js';\nimport SeriesDescriber from './SeriesDescriber.js';\nimport { addEvent, defined, internalClearTimeout, pushUnique } from '../../../Shared/Utilities.js';\nconst { defaultPointDescriptionFormatter, defaultSeriesDescriptionFormatter } = SeriesDescriber;\n/* *\n *\n * Functions\n *\n * */\n/**\n * @private\n */\nfunction chartHasAnnounceEnabled(chart) {\n return !!chart.options.accessibility.announceNewData.enabled;\n}\n/**\n * @private\n */\nfunction findPointInDataArray(point) {\n const candidates = point.series.data.filter((candidate) => (point.x === candidate.x && point.y === candidate.y));\n return candidates.length === 1 ? candidates[0] : point;\n}\n/**\n * Get array of unique series from two arrays\n * @private\n */\nfunction getUniqueSeries(arrayA, arrayB) {\n const uniqueSeries = (arrayA || []).concat(arrayB || []).reduce((acc, cur) => {\n acc[cur.name + cur.index] = cur;\n return acc;\n }, {});\n return Object\n .keys(uniqueSeries)\n .map((ix) => uniqueSeries[ix]);\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * @private\n * @class\n */\nclass NewDataAnnouncer {\n /* *\n *\n * Constructor\n *\n * */\n constructor(chart) {\n this.dirty = {\n allSeries: {}\n };\n this.lastAnnouncementTime = 0;\n this.chart = chart;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Initialize the new data announcer.\n * @private\n */\n init() {\n const chart = this.chart;\n const announceOptions = (chart.options.accessibility.announceNewData);\n const announceType = announceOptions.interruptUser ?\n 'assertive' : 'polite';\n this.lastAnnouncementTime = 0;\n this.dirty = {\n allSeries: {}\n };\n this.eventProvider = new EventProvider();\n this.announcer = new Announcer(chart, announceType);\n this.addEventListeners();\n }\n /**\n * Remove traces of announcer.\n * @private\n */\n destroy() {\n this.eventProvider.removeAddedEvents();\n this.announcer.destroy();\n }\n /**\n * Add event listeners for the announcer\n * @private\n */\n addEventListeners() {\n const announcer = this, chart = this.chart, e = this.eventProvider;\n e.addEvent(chart, 'afterApplyDrilldown', function () {\n announcer.lastAnnouncementTime = 0;\n });\n e.addEvent(chart, 'afterAddSeries', function (e) {\n announcer.onSeriesAdded(e.series);\n });\n e.addEvent(chart, 'redraw', function () {\n announcer.announceDirtyData();\n });\n }\n /**\n * On new data series added, update dirty list.\n * @private\n * @param {Highcharts.Series} series\n */\n onSeriesAdded(series) {\n if (chartHasAnnounceEnabled(this.chart)) {\n this.dirty.hasDirty = true;\n this.dirty.allSeries[series.name + series.index] = series;\n // Add it to newSeries storage unless we already have one\n this.dirty.newSeries = defined(this.dirty.newSeries) ?\n void 0 : series;\n }\n }\n /**\n * Gather what we know and announce the data to user.\n * @private\n */\n announceDirtyData() {\n const chart = this.chart, announcer = this;\n if (chart.options.accessibility.announceNewData &&\n this.dirty.hasDirty) {\n let newPoint = this.dirty.newPoint;\n // If we have a single new point, see if we can find it in the\n // data array. Otherwise we can only pass through options to\n // the description builder, and it is a bit sparse in info.\n if (newPoint) {\n newPoint = findPointInDataArray(newPoint);\n }\n this.queueAnnouncement(Object\n .keys(this.dirty.allSeries)\n .map((ix) => announcer.dirty.allSeries[ix]), this.dirty.newSeries, newPoint);\n // Reset\n this.dirty = {\n allSeries: {}\n };\n }\n }\n /**\n * Announce to user that there is new data.\n * @private\n * @param {Array<Highcharts.Series>} dirtySeries\n * Array of series with new data.\n * @param {Highcharts.Series} [newSeries]\n * If a single new series was added, a reference to this series.\n * @param {Highcharts.Point} [newPoint]\n * If a single point was added, a reference to this point.\n */\n queueAnnouncement(dirtySeries, newSeries, newPoint) {\n const chart = this.chart;\n const annOptions = chart.options.accessibility.announceNewData;\n if (annOptions.enabled) {\n const now = +new Date();\n const dTime = now - this.lastAnnouncementTime;\n const time = Math.max(0, annOptions.minAnnounceInterval - dTime);\n // Add series from previously queued announcement.\n const allSeries = getUniqueSeries(this.queuedAnnouncement && this.queuedAnnouncement.series, dirtySeries);\n // Build message and announce\n const message = this.buildAnnouncementMessage(allSeries, newSeries, newPoint);\n if (message) {\n // Is there already one queued?\n if (this.queuedAnnouncement) {\n internalClearTimeout(this.queuedAnnouncementTimer);\n }\n // Build the announcement\n this.queuedAnnouncement = {\n time: now,\n message: message,\n series: allSeries\n };\n // Queue the announcement\n this.queuedAnnouncementTimer = setTimeout(() => {\n if (this && this.announcer) {\n this.lastAnnouncementTime = +new Date();\n this.announcer.announce(this.queuedAnnouncement.message);\n delete this.queuedAnnouncement;\n delete this.queuedAnnouncementTimer;\n }\n }, time);\n }\n }\n }\n /**\n * Get announcement message for new data.\n * @private\n * @param {Array<Highcharts.Series>} dirtySeries\n * Array of series with new data.\n * @param {Highcharts.Series} [newSeries]\n * If a single new series was added, a reference to this series.\n * @param {Highcharts.Point} [newPoint]\n * If a single point was added, a reference to this point.\n *\n * @return {string|null}\n * The announcement message to give to user.\n */\n buildAnnouncementMessage(dirtySeries, newSeries, newPoint) {\n const chart = this.chart, annOptions = chart.options.accessibility.announceNewData;\n // User supplied formatter?\n if (annOptions.announcementFormatter) {\n const formatterRes = annOptions.announcementFormatter(dirtySeries, newSeries, newPoint, this);\n if (formatterRes !== false) {\n return formatterRes.length ? formatterRes : null;\n }\n }\n // Default formatter - use lang options\n const multiple = H.charts && H.charts.length > 1 ?\n 'Multiple' : 'Single', langKey = newSeries ? 'newSeriesAnnounce' + multiple :\n newPoint ? 'newPointAnnounce' + multiple : 'newDataAnnounce', chartTitle = getChartTitle(chart);\n return chart.langFormat('accessibility.announceNewData.' + langKey, {\n chartTitle: chartTitle,\n seriesDesc: newSeries ?\n defaultSeriesDescriptionFormatter(newSeries) :\n null,\n pointDesc: newPoint ?\n defaultPointDescriptionFormatter(newPoint) :\n null,\n point: newPoint,\n series: newSeries\n });\n }\n}\n/* *\n *\n * Class Namespace\n *\n * */\n(function (NewDataAnnouncer) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Static Functions\n *\n * */\n /**\n * @private\n */\n function compose(SeriesClass) {\n if (pushUnique(composed, 'A11y.NDA')) {\n addEvent(SeriesClass, 'addPoint', seriesOnAddPoint);\n addEvent(SeriesClass, 'updatedData', seriesOnUpdatedData);\n }\n }\n NewDataAnnouncer.compose = compose;\n /**\n * On new point added, update dirty list.\n * @private\n * @param {Highcharts.Point} point\n */\n function seriesOnAddPoint(e) {\n const chart = this.chart, newDataAnnouncer = chart.accessibility?.components\n .series.newDataAnnouncer;\n if (newDataAnnouncer &&\n newDataAnnouncer.chart === chart &&\n chartHasAnnounceEnabled(chart)) {\n // Add it to newPoint storage unless we already have one\n newDataAnnouncer.dirty.newPoint = (defined(newDataAnnouncer.dirty.newPoint) ?\n void 0 :\n e.point);\n }\n }\n /**\n * On new data in the series, make sure we add it to the dirty list.\n * @private\n */\n function seriesOnUpdatedData() {\n const chart = this.chart, newDataAnnouncer = chart.accessibility?.components\n .series.newDataAnnouncer;\n if (newDataAnnouncer &&\n newDataAnnouncer.chart === chart &&\n chartHasAnnounceEnabled(chart)) {\n newDataAnnouncer.dirty.hasDirty = true;\n newDataAnnouncer.dirty.allSeries[this.name + this.index] = this;\n }\n }\n})(NewDataAnnouncer || (NewDataAnnouncer = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default NewDataAnnouncer;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Proxy elements are used to shadow SVG elements in HTML for assistive\n * technology, such as screen readers or voice input software.\n *\n * The ProxyElement class represents such an element, and deals with\n * overlay positioning and mirroring events for the target.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport H from '../Core/Globals.js';\nconst { doc, win } = H;\nimport EventProvider from './Utils/EventProvider.js';\nimport ChartUtilities from './Utils/ChartUtilities.js';\nconst { fireEventOnWrappedOrUnwrappedElement } = ChartUtilities;\nimport HTMLUtilities from './Utils/HTMLUtilities.js';\nimport { attr, css, merge } from '../Shared/Utilities.js';\nconst { cloneMouseEvent, cloneTouchEvent, getFakeMouseEvent, removeElement } = HTMLUtilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a proxy element that overlays a target and relays events\n * to its target.\n *\n * @private\n * @class\n */\nclass ProxyElement {\n /* *\n *\n * Constructor\n *\n * */\n constructor(chart, target, proxyElementType = 'button', wrapperElementType, attributes) {\n this.chart = chart;\n this.target = target;\n this.eventProvider = new EventProvider();\n const innerEl = this.innerElement =\n doc.createElement(proxyElementType), wrapperEl = this.element = wrapperElementType ?\n doc.createElement(wrapperElementType) : innerEl;\n if (!chart.styledMode) {\n this.hideElementVisually(innerEl);\n }\n if (wrapperElementType) {\n if (wrapperElementType === 'li' && !chart.styledMode) {\n wrapperEl.style.listStyle = 'none';\n }\n wrapperEl.appendChild(innerEl);\n this.element = wrapperEl;\n }\n this.updateTarget(target, attributes);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Fake a click event on the target.\n */\n click() {\n const pos = this.getTargetPosition();\n pos.x += pos.width / 2;\n pos.y += pos.height / 2;\n const fakeEventObject = getFakeMouseEvent('click', pos);\n fireEventOnWrappedOrUnwrappedElement(this.target.click, fakeEventObject);\n }\n /**\n * Update the target to be proxied. The position and events are updated to\n * match the new target.\n * @param {object} target The new target definition\n * @param {object} attributes New HTML attributes to apply to the proxy. Set an\n * attribute to null to remove.\n */\n updateTarget(target, attributes) {\n this.target = target;\n this.updateCSSClassName();\n const attrs = attributes || {};\n Object.keys(attrs).forEach((a) => {\n if (attrs[a] === null) {\n delete attrs[a];\n }\n });\n const targetAriaLabel = this.getTargetAttr(target.click, 'aria-label');\n attr(this.innerElement, merge(targetAriaLabel ? {\n 'aria-label': targetAriaLabel\n } : {}, attrs));\n this.eventProvider.removeAddedEvents();\n this.addProxyEventsToElement(this.innerElement, target.click);\n this.refreshPosition();\n }\n /**\n * Refresh the position of the proxy element to match the current target\n */\n refreshPosition() {\n const bBox = this.getTargetPosition();\n css(this.innerElement, {\n width: (bBox.width || 1) + 'px',\n height: (bBox.height || 1) + 'px',\n left: (Math.round(bBox.x) || 0) + 'px',\n top: (Math.round(bBox.y) || 0) + 'px'\n });\n }\n /**\n * Remove button from DOM, and clear events.\n */\n remove() {\n this.eventProvider.removeAddedEvents();\n removeElement(this.element);\n }\n // -------------------------- private ------------------------------------\n /**\n * Update the CSS class name to match target\n */\n updateCSSClassName() {\n const stringHasNoTooltip = (s) => (s.indexOf('highcharts-no-tooltip') > -1);\n const noTooltipOnGroup = stringHasNoTooltip(this.chart.legend?.group?.div?.className || '');\n const targetClassName = this.getTargetAttr(this.target.click, 'class') || '';\n const noTooltipOnTarget = stringHasNoTooltip(targetClassName);\n this.innerElement.className = noTooltipOnGroup || noTooltipOnTarget ?\n 'highcharts-a11y-proxy-element highcharts-no-tooltip' :\n 'highcharts-a11y-proxy-element';\n }\n /**\n * Mirror events for a proxy element to a target\n */\n addProxyEventsToElement(element, target) {\n [\n 'click', 'touchstart', 'touchend', 'touchcancel', 'touchmove',\n 'mouseover', 'mouseenter', 'mouseleave', 'mouseout'\n ].forEach((evtType) => {\n const isTouchEvent = evtType.indexOf('touch') === 0;\n this.eventProvider.addEvent(element, evtType, (e) => {\n const clonedEvent = isTouchEvent ?\n cloneTouchEvent(e) :\n cloneMouseEvent(e);\n if (target) {\n fireEventOnWrappedOrUnwrappedElement(target, clonedEvent);\n }\n e.stopPropagation();\n // #9682, #15318: Touch scrolling didn't work when touching\n // proxy\n if (!isTouchEvent) {\n e.preventDefault();\n }\n }, { passive: false });\n });\n }\n /**\n * Set visually hidden style on a proxy element\n */\n hideElementVisually(el) {\n css(el, {\n borderWidth: 0,\n backgroundColor: 'transparent',\n cursor: 'pointer',\n outline: 'none',\n opacity: 0.001,\n filter: 'alpha(opacity=1)',\n zIndex: 999,\n overflow: 'hidden',\n padding: 0,\n margin: 0,\n display: 'block',\n position: 'absolute',\n '-ms-filter': 'progid:DXImageTransform.Microsoft.Alpha(Opacity=1)'\n });\n }\n /**\n * Get the position relative to chart container for the target\n */\n getTargetPosition() {\n const clickTarget = this.target.click;\n // We accept both DOM elements and wrapped elements as click targets.\n const clickTargetElement = clickTarget.element ?\n clickTarget.element :\n clickTarget;\n const posElement = this.target.visual || clickTargetElement;\n const chartDiv = this.chart.renderTo, pointer = this.chart.pointer;\n if (chartDiv && posElement?.getBoundingClientRect && pointer) {\n const scrollTop = win.scrollY ||\n doc.documentElement.scrollTop, rectEl = posElement.getBoundingClientRect(), chartPos = pointer.getChartPosition();\n return {\n x: (rectEl.left - chartPos.left) / chartPos.scaleX,\n // #21994, Add scroll position as \"getBoundingClientRect\"\n // returns the position from the viewport, not the document top.\n y: ((rectEl.top + scrollTop) - chartPos.top) / chartPos.scaleY,\n width: rectEl.right / chartPos.scaleX -\n rectEl.left / chartPos.scaleX,\n height: rectEl.bottom / chartPos.scaleY -\n rectEl.top / chartPos.scaleY\n };\n }\n return { x: 0, y: 0, width: 1, height: 1 };\n }\n /**\n * Get an attribute value of a target\n */\n getTargetAttr(target, key) {\n if (target.element) {\n return target.element.getAttribute(key);\n }\n return target.getAttribute(key);\n }\n}\n/* *\n *\n * Default Export\n *\n * */\nexport default ProxyElement;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Proxy elements are used to shadow SVG elements in HTML for assistive\n * technology, such as screen readers or voice input software.\n *\n * The ProxyProvider keeps track of all proxy elements of the a11y module,\n * and updating their order and positioning.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport H from '../Core/Globals.js';\nconst { doc } = H;\nimport CU from './Utils/ChartUtilities.js';\nconst { unhideChartElementFromAT } = CU;\nimport DOMElementProvider from './Utils/DOMElementProvider.js';\nimport HU from './Utils/HTMLUtilities.js';\nconst { removeChildNodes } = HU;\nimport ProxyElement from './ProxyElement.js';\nimport { attr, css } from '../Shared/Utilities.js';\n/* *\n *\n * Class\n *\n * */\n/**\n * Keeps track of all proxy elements and proxy groups.\n *\n * @private\n * @class\n */\nclass ProxyProvider {\n /* *\n *\n * Constructor\n *\n * */\n constructor(chart) {\n this.chart = chart;\n this.domElementProvider = new DOMElementProvider();\n this.groups = {};\n this.groupOrder = [];\n this.beforeChartProxyPosContainer = this.createProxyPosContainer('before');\n this.afterChartProxyPosContainer = this.createProxyPosContainer('after');\n this.update();\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable */\n /**\n * Add a new proxy element to a group, proxying a target control.\n */\n addProxyElement(groupKey, target, proxyElementType = 'button', attributes) {\n const group = this.groups[groupKey];\n if (!group) {\n throw new Error('ProxyProvider.addProxyElement: Invalid group key ' + groupKey);\n }\n const wrapperElementType = group.type === 'ul' || group.type === 'ol' ?\n 'li' : void 0, proxy = new ProxyElement(this.chart, target, proxyElementType, wrapperElementType, attributes);\n group.proxyContainerElement.appendChild(proxy.element);\n group.proxyElements.push(proxy);\n return proxy;\n }\n /**\n * Create a group that will contain proxy elements. The group order is\n * automatically updated according to the last group order keys.\n *\n * Returns the added group.\n */\n addGroup(groupKey, groupElementType = 'div', attributes) {\n const existingGroup = this.groups[groupKey];\n if (existingGroup) {\n return existingGroup.groupElement;\n }\n const proxyContainer = this.domElementProvider\n .createElement(groupElementType);\n // If we want to add a role to the group, and still use e.g.\n // a list group, we need a wrapper div around the proxyContainer.\n // Used for setting region role on legend.\n let groupElement;\n if (attributes && attributes.role && groupElementType !== 'div') {\n groupElement = this.domElementProvider.createElement('div');\n groupElement.appendChild(proxyContainer);\n }\n else {\n groupElement = proxyContainer;\n }\n groupElement.className = 'highcharts-a11y-proxy-group highcharts-a11y-proxy-group-' +\n groupKey.replace(/\\W/g, '-');\n this.groups[groupKey] = {\n proxyContainerElement: proxyContainer,\n groupElement,\n type: groupElementType,\n proxyElements: []\n };\n attr(groupElement, attributes || {});\n if (groupElementType === 'ul') {\n proxyContainer.setAttribute('role', 'list'); // Needed for webkit\n }\n // Add the group to the end by default, and perhaps then we\n // won't have to reorder the whole set of groups.\n this.afterChartProxyPosContainer.appendChild(groupElement);\n this.updateGroupOrder(this.groupOrder);\n return groupElement;\n }\n /**\n * Update HTML attributes of a group.\n */\n updateGroupAttrs(groupKey, attributes) {\n const group = this.groups[groupKey];\n if (!group) {\n throw new Error('ProxyProvider.updateGroupAttrs: Invalid group key ' + groupKey);\n }\n attr(group.groupElement, attributes);\n }\n /**\n * Reorder the proxy groups.\n *\n * The group key \"series\" refers to the chart's data points / <svg> element.\n * This is so that the keyboardNavigation.order option can be used to\n * determine the proxy group order.\n */\n updateGroupOrder(groupKeys) {\n // Store so that we can update order when a new group is created\n this.groupOrder = groupKeys.slice();\n // Don't unnecessarily reorder, because keyboard focus is lost\n if (this.isDOMOrderGroupOrder()) {\n return;\n }\n const seriesIx = groupKeys.indexOf('series');\n const beforeKeys = seriesIx > -1 ? groupKeys.slice(0, seriesIx) : groupKeys;\n const afterKeys = seriesIx > -1 ? groupKeys.slice(seriesIx + 1) : [];\n // Store focused element since it will be lost when reordering\n const activeElement = doc.activeElement;\n // Add groups to correct container\n ['before', 'after'].forEach((pos) => {\n const posContainer = this[pos === 'before' ?\n 'beforeChartProxyPosContainer' :\n 'afterChartProxyPosContainer'];\n const keys = pos === 'before' ? beforeKeys : afterKeys;\n removeChildNodes(posContainer);\n keys.forEach((groupKey) => {\n const group = this.groups[groupKey];\n if (group) {\n posContainer.appendChild(group.groupElement);\n }\n });\n });\n // Attempt to restore focus after reordering, but note that this may\n // cause screen readers re-announcing the button.\n if ((this.beforeChartProxyPosContainer.contains(activeElement) ||\n this.afterChartProxyPosContainer.contains(activeElement)) &&\n activeElement && activeElement.focus) {\n activeElement.focus();\n }\n }\n /**\n * Remove all proxy elements in a group\n */\n clearGroup(groupKey) {\n const group = this.groups[groupKey];\n if (!group) {\n throw new Error('ProxyProvider.clearGroup: Invalid group key ' + groupKey);\n }\n removeChildNodes(group.proxyContainerElement);\n }\n /**\n * Remove a group from the DOM and from the proxy provider's group list.\n * All child elements are removed.\n * If the group does not exist, nothing happens.\n */\n removeGroup(groupKey) {\n const group = this.groups[groupKey];\n if (group) {\n // Remove detached HTML elements to prevent memory leak (#20329).\n this.domElementProvider.removeElement(group.groupElement);\n // Sometimes groupElement is a wrapper around the proxyContainer, so\n // the real one proxyContainer needs to be removed also.\n if (group.groupElement !== group.proxyContainerElement) {\n this.domElementProvider.removeElement(group.proxyContainerElement);\n }\n delete this.groups[groupKey];\n }\n }\n /**\n * Update the position and order of all proxy groups and elements\n */\n update() {\n this.updatePosContainerPositions();\n this.updateGroupOrder(this.groupOrder);\n this.updateProxyElementPositions();\n }\n /**\n * Update all proxy element positions\n */\n updateProxyElementPositions() {\n Object.keys(this.groups).forEach(this.updateGroupProxyElementPositions.bind(this));\n }\n /**\n * Update a group's proxy elements' positions.\n * If the group does not exist, nothing happens.\n */\n updateGroupProxyElementPositions(groupKey) {\n const group = this.groups[groupKey];\n if (group) {\n group.proxyElements.forEach((el) => el.refreshPosition());\n }\n }\n /**\n * Remove all added elements\n */\n destroy() {\n this.domElementProvider.destroyCreatedElements();\n }\n // -------------------------- private ------------------------------------\n /**\n * Create and return a pos container element (the overall containers for\n * the proxy groups).\n */\n createProxyPosContainer(classNamePostfix) {\n const el = this.domElementProvider.createElement('div');\n el.setAttribute('aria-hidden', 'false');\n el.className = 'highcharts-a11y-proxy-container' + (classNamePostfix ? '-' + classNamePostfix : '');\n // Position inline so the container stays out of flow even when\n // `highcharts.css` is missing in styled mode\n css(el, {\n position: 'absolute',\n top: '0',\n left: '0',\n whiteSpace: 'nowrap'\n });\n return el;\n }\n /**\n * Get an array of group keys that corresponds to the current group order\n * in the DOM.\n */\n getCurrentGroupOrderInDOM() {\n const getGroupKeyFromElement = (el) => {\n const allGroups = Object.keys(this.groups);\n let i = allGroups.length;\n while (i--) {\n const groupKey = allGroups[i];\n const group = this.groups[groupKey];\n if (group && el === group.groupElement) {\n return groupKey;\n }\n }\n };\n const getChildrenGroupOrder = (el) => {\n const childrenOrder = [];\n const children = el.children;\n for (let i = 0; i < children.length; ++i) {\n const groupKey = getGroupKeyFromElement(children[i]);\n if (groupKey) {\n childrenOrder.push(groupKey);\n }\n }\n return childrenOrder;\n };\n const before = getChildrenGroupOrder(this.beforeChartProxyPosContainer);\n const after = getChildrenGroupOrder(this.afterChartProxyPosContainer);\n before.push('series');\n return before.concat(after);\n }\n /**\n * Check if the current DOM order matches the current group order, so that\n * a reordering/update is unnecessary.\n */\n isDOMOrderGroupOrder() {\n const domOrder = this.getCurrentGroupOrderInDOM();\n const groupOrderWithGroups = this.groupOrder.filter((x) => x === 'series' || !!this.groups[x]);\n let i = domOrder.length;\n if (i !== groupOrderWithGroups.length) {\n return false;\n }\n while (i--) {\n if (domOrder[i] !== groupOrderWithGroups[i]) {\n return false;\n }\n }\n return true;\n }\n /**\n * Update the DOM positions of the before/after proxy\n * positioning containers for the groups.\n */\n updatePosContainerPositions() {\n const chart = this.chart;\n // If exporting, don't add these containers to the DOM.\n if (chart.renderer.forExport) {\n return;\n }\n const rendererSVGEl = chart.renderer.box;\n chart.container.insertBefore(this.afterChartProxyPosContainer, rendererSVGEl.nextSibling);\n chart.container.insertBefore(this.beforeChartProxyPosContainer, rendererSVGEl);\n unhideChartElementFromAT(this.chart, this.afterChartProxyPosContainer);\n unhideChartElementFromAT(this.chart, this.beforeChartProxyPosContainer);\n }\n}\n/* *\n *\n * Export Default\n *\n * */\nexport default ProxyProvider;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Accessibility component for the range selector.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport AccessibilityComponent from '../AccessibilityComponent.js';\nimport Announcer from '../Utils/Announcer.js';\nimport ChartUtilities from '../Utils/ChartUtilities.js';\nconst { unhideChartElementFromAT, getAxisRangeDescription } = ChartUtilities;\nimport KeyboardNavigationHandler from '../KeyboardNavigationHandler.js';\nimport { addEvent, attr } from '../../Shared/Utilities.js';\n/* *\n *\n * Functions\n *\n * */\n/**\n * Do we want date input navigation\n * @private\n */\nfunction shouldRunInputNavigation(chart) {\n return Boolean(chart.rangeSelector &&\n chart.rangeSelector.inputGroup &&\n chart.rangeSelector.inputGroup.element.style.visibility !== 'hidden' &&\n chart.options.rangeSelector.inputEnabled !== false &&\n chart.rangeSelector.minInput &&\n chart.rangeSelector.maxInput);\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * The RangeSelectorComponent class\n *\n * @private\n * @class\n * @name Highcharts.RangeSelectorComponent\n */\nclass RangeSelectorComponent extends AccessibilityComponent {\n /* *\n *\n * Functions\n *\n * */\n /**\n * Init the component\n * @private\n */\n init() {\n const chart = this.chart;\n this.announcer = new Announcer(chart, 'polite');\n }\n /**\n * Called on first render/updates to the chart, including options changes.\n */\n onChartUpdate() {\n const chart = this.chart, component = this, rangeSelector = chart.rangeSelector;\n if (!rangeSelector) {\n return;\n }\n this.updateSelectorVisibility();\n this.setDropdownAttrs();\n if (rangeSelector.buttons &&\n rangeSelector.buttons.length) {\n rangeSelector.buttons.forEach((button) => {\n component.setRangeButtonAttrs(button);\n });\n }\n // Make sure input boxes are accessible and focusable\n if (rangeSelector.maxInput && rangeSelector.minInput) {\n ['minInput', 'maxInput'].forEach(function (key, i) {\n const input = rangeSelector[key];\n if (input) {\n unhideChartElementFromAT(chart, input);\n component.setRangeInputAttrs(input, 'accessibility.rangeSelector.' + (i ? 'max' : 'min') +\n 'InputLabel');\n }\n });\n }\n }\n /**\n * Hide buttons from AT when showing dropdown, and vice versa.\n * @private\n */\n updateSelectorVisibility() {\n const chart = this.chart;\n const rangeSelector = chart.rangeSelector;\n const dropdown = (rangeSelector &&\n rangeSelector.dropdown);\n const buttons = (rangeSelector &&\n rangeSelector.buttons ||\n []);\n const hideFromAT = (el) => el.setAttribute('aria-hidden', true);\n if (rangeSelector &&\n rangeSelector.hasVisibleDropdown &&\n dropdown) {\n unhideChartElementFromAT(chart, dropdown);\n buttons.forEach((btn) => hideFromAT(btn.element));\n }\n else {\n if (dropdown) {\n hideFromAT(dropdown);\n }\n buttons.forEach((btn) => unhideChartElementFromAT(chart, btn.element));\n }\n }\n /**\n * Set accessibility related attributes on dropdown element.\n * @private\n */\n setDropdownAttrs() {\n const chart = this.chart;\n const dropdown = (chart.rangeSelector &&\n chart.rangeSelector.dropdown);\n if (dropdown) {\n const label = chart.langFormat('accessibility.rangeSelector.dropdownLabel', { rangeTitle: chart.options.lang.rangeSelectorZoom });\n dropdown.setAttribute('aria-label', label);\n dropdown.setAttribute('tabindex', -1);\n }\n }\n /**\n * Set attrs for a range button\n * @private\n */\n setRangeButtonAttrs(button) {\n attr(button.element, {\n tabindex: -1,\n role: 'button'\n });\n }\n /**\n * Set attrs for a date input\n * @private\n */\n setRangeInputAttrs(input, langKey) {\n const chart = this.chart;\n attr(input, {\n tabindex: -1,\n 'aria-label': chart.langFormat(langKey, { chart: chart })\n });\n }\n /**\n * Handle arrow key nav\n * @private\n */\n onButtonNavKbdArrowKey(keyboardNavigationHandler, keyCode) {\n const response = keyboardNavigationHandler.response, keys = this.keyCodes, chart = this.chart, wrapAround = chart.options.accessibility\n .keyboardNavigation.wrapAround, direction = (keyCode === keys.left || keyCode === keys.up) ? -1 : 1, didHighlight = chart.highlightRangeSelectorButton(chart.highlightedRangeSelectorItemIx + direction);\n if (!didHighlight) {\n if (wrapAround) {\n keyboardNavigationHandler.init(direction);\n return response.success;\n }\n return response[direction > 0 ? 'next' : 'prev'];\n }\n return response.success;\n }\n /**\n * Handle keyboard click\n * @private\n */\n onButtonNavKbdClick(keyboardNavigationHandler) {\n const response = keyboardNavigationHandler.response, chart = this.chart, wasDisabled = chart.oldRangeSelectorItemState === 3;\n if (!wasDisabled) {\n this.fakeClickEvent(chart.rangeSelector.buttons[chart.highlightedRangeSelectorItemIx].element);\n }\n return response.success;\n }\n /**\n * Called whenever a range selector button has been clicked, either by\n * mouse, touch, or kbd/voice/other.\n * @private\n */\n onAfterBtnClick() {\n const chart = this.chart;\n const axisRangeDescription = getAxisRangeDescription(chart.xAxis[0]);\n const announcement = chart.langFormat('accessibility.rangeSelector.clickButtonAnnouncement', { chart, axisRangeDescription });\n if (announcement) {\n this.announcer.announce(announcement);\n }\n }\n /**\n * Handle move between input elements with Tab key\n * @private\n */\n onInputKbdMove(direction) {\n const chart = this.chart;\n const rangeSel = chart.rangeSelector;\n const newIx = chart.highlightedInputRangeIx = (chart.highlightedInputRangeIx || 0) + direction;\n const newIxOutOfRange = newIx > 1 || newIx < 0;\n if (newIxOutOfRange) {\n if (chart.accessibility) {\n // Ignore focus\n chart.accessibility.keyboardNavigation.exiting = true;\n chart.accessibility.keyboardNavigation.tabindexContainer\n .focus();\n return chart.accessibility.keyboardNavigation.move(direction);\n }\n }\n else if (rangeSel) {\n const svgEl = rangeSel[newIx ? 'maxDateBox' : 'minDateBox'];\n const inputEl = rangeSel[newIx ? 'maxInput' : 'minInput'];\n if (svgEl && inputEl) {\n chart.setFocusToElement(svgEl, inputEl);\n }\n }\n return true;\n }\n /**\n * Init date input navigation\n * @private\n */\n onInputNavInit(direction) {\n const component = this;\n const chart = this.chart;\n const buttonIxToHighlight = direction > 0 ? 0 : 1;\n const rangeSel = chart.rangeSelector;\n const svgEl = (rangeSel &&\n rangeSel[buttonIxToHighlight ? 'maxDateBox' : 'minDateBox']);\n const minInput = (rangeSel && rangeSel.minInput);\n const maxInput = (rangeSel && rangeSel.maxInput);\n const inputEl = buttonIxToHighlight ? maxInput : minInput;\n chart.highlightedInputRangeIx = buttonIxToHighlight;\n if (svgEl && minInput && maxInput) {\n chart.setFocusToElement(svgEl, inputEl);\n // Tab-press with the input focused does not propagate to chart\n // automatically, so we manually catch and handle it when relevant.\n if (this.removeInputKeydownHandler) {\n this.removeInputKeydownHandler();\n }\n const keydownHandler = (e) => {\n const isTab = (e.which || e.keyCode) === this.keyCodes.tab;\n if (isTab &&\n component.onInputKbdMove(e.shiftKey ? -1 : 1)) {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n const minRemover = addEvent(minInput, 'keydown', keydownHandler);\n const maxRemover = addEvent(maxInput, 'keydown', keydownHandler);\n this.removeInputKeydownHandler = () => {\n minRemover();\n maxRemover();\n };\n }\n }\n /**\n * Terminate date input nav\n * @private\n */\n onInputNavTerminate() {\n const rangeSel = (this.chart.rangeSelector || {});\n if (rangeSel.maxInput) {\n rangeSel.hideInput('max');\n }\n if (rangeSel.minInput) {\n rangeSel.hideInput('min');\n }\n if (this.removeInputKeydownHandler) {\n this.removeInputKeydownHandler();\n delete this.removeInputKeydownHandler;\n }\n }\n /**\n * Init range selector dropdown nav\n * @private\n */\n initDropdownNav() {\n const chart = this.chart;\n const rangeSelector = chart.rangeSelector;\n const dropdown = (rangeSelector && rangeSelector.dropdown);\n if (rangeSelector && dropdown) {\n chart.setFocusToElement(rangeSelector.buttonGroup, dropdown);\n if (this.removeDropdownKeydownHandler) {\n this.removeDropdownKeydownHandler();\n }\n // Tab-press with dropdown focused does not propagate to chart\n // automatically, so we manually catch and handle it when relevant.\n this.removeDropdownKeydownHandler = addEvent(dropdown, 'keydown', (e) => {\n const isTab = (e.which || e.keyCode) === this.keyCodes.tab, a11y = chart.accessibility;\n if (isTab) {\n e.preventDefault();\n e.stopPropagation();\n if (a11y) {\n a11y.keyboardNavigation.move(e.shiftKey ? -1 : 1);\n }\n }\n });\n }\n }\n /**\n * Get navigation for the range selector buttons.\n * @private\n * @return {Highcharts.KeyboardNavigationHandler} The module object.\n */\n getRangeSelectorButtonNavigation() {\n const chart = this.chart;\n const keys = this.keyCodes;\n const component = this;\n return new KeyboardNavigationHandler(chart, {\n keyCodeMap: [\n [\n [keys.left, keys.right, keys.up, keys.down],\n function (keyCode) {\n return component.onButtonNavKbdArrowKey(this, keyCode);\n }\n ],\n [\n [keys.enter, keys.space],\n function () {\n return component.onButtonNavKbdClick(this);\n }\n ]\n ],\n validate: function () {\n return !!(chart.rangeSelector &&\n chart.rangeSelector.buttons &&\n chart.rangeSelector.buttons.length);\n },\n init: function (direction) {\n const rangeSelector = chart.rangeSelector;\n if (rangeSelector && rangeSelector.hasVisibleDropdown) {\n component.initDropdownNav();\n }\n else if (rangeSelector) {\n const lastButtonIx = rangeSelector.buttons.length - 1;\n chart.highlightRangeSelectorButton(direction > 0 ? 0 : lastButtonIx);\n }\n },\n terminate: function () {\n if (component.removeDropdownKeydownHandler) {\n component.removeDropdownKeydownHandler();\n delete component.removeDropdownKeydownHandler;\n }\n }\n });\n }\n /**\n * Get navigation for the range selector input boxes.\n * @private\n * @return {Highcharts.KeyboardNavigationHandler}\n * The module object.\n */\n getRangeSelectorInputNavigation() {\n const chart = this.chart;\n const component = this;\n return new KeyboardNavigationHandler(chart, {\n keyCodeMap: [],\n validate: function () {\n return shouldRunInputNavigation(chart);\n },\n init: function (direction) {\n component.onInputNavInit(direction);\n },\n terminate: function () {\n component.onInputNavTerminate();\n }\n });\n }\n /**\n * Get keyboard navigation handlers for this component.\n * @return {Array<Highcharts.KeyboardNavigationHandler>}\n * List of module objects.\n */\n getKeyboardNavigation() {\n return [\n this.getRangeSelectorButtonNavigation(),\n this.getRangeSelectorInputNavigation()\n ];\n }\n /**\n * Remove component traces\n */\n destroy() {\n if (this.removeDropdownKeydownHandler) {\n this.removeDropdownKeydownHandler();\n }\n if (this.removeInputKeydownHandler) {\n this.removeInputKeydownHandler();\n }\n if (this.announcer) {\n this.announcer.destroy();\n }\n }\n}\n/* *\n *\n * Class Namespace\n *\n * */\n(function (RangeSelectorComponent) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * Highlight range selector button by index.\n *\n * @private\n * @function Highcharts.Chart#highlightRangeSelectorButton\n */\n function chartHighlightRangeSelectorButton(ix) {\n const buttons = (this.rangeSelector &&\n this.rangeSelector.buttons ||\n []);\n const curHighlightedIx = this.highlightedRangeSelectorItemIx;\n const curSelectedIx = (this.rangeSelector &&\n this.rangeSelector.selected);\n // Deselect old\n if (typeof curHighlightedIx !== 'undefined' &&\n buttons[curHighlightedIx] &&\n curHighlightedIx !== curSelectedIx) {\n buttons[curHighlightedIx].setState(this.oldRangeSelectorItemState || 0);\n }\n // Select new\n this.highlightedRangeSelectorItemIx = ix;\n if (buttons[ix]) {\n this.setFocusToElement(buttons[ix].box, buttons[ix].element);\n if (ix !== curSelectedIx) {\n this.oldRangeSelectorItemState = buttons[ix].state;\n buttons[ix].setState(1);\n }\n return true;\n }\n return false;\n }\n /**\n * Build compositions\n * @private\n */\n function compose(ChartClass, RangeSelectorClass) {\n const chartProto = ChartClass.prototype;\n if (!chartProto.highlightRangeSelectorButton) {\n chartProto.highlightRangeSelectorButton = (chartHighlightRangeSelectorButton);\n addEvent(RangeSelectorClass, 'afterBtnClick', rangeSelectorAfterBtnClick);\n }\n }\n RangeSelectorComponent.compose = compose;\n /**\n * Range selector does not have destroy-setup for class instance events - so\n * we set it on the class and call the component from here.\n * @private\n */\n function rangeSelectorAfterBtnClick() {\n const a11y = this.chart.accessibility;\n if (a11y && a11y.components.rangeSelector) {\n return a11y.components.rangeSelector.onAfterBtnClick();\n }\n }\n})(RangeSelectorComponent || (RangeSelectorComponent = {}));\n/* *\n *\n * Export Default\n *\n * */\nexport default RangeSelectorComponent;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Handle forcing series markers.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport H from '../../../Core/Globals.js';\nconst { composed } = H;\nimport { addEvent, merge, pushUnique } from '../../../Shared/Utilities.js';\n/* *\n *\n * Composition\n *\n * */\nvar ForcedMarkersComposition;\n(function (ForcedMarkersComposition) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * @private\n */\n function compose(SeriesClass) {\n if (pushUnique(composed, 'A11y.FM')) {\n addEvent(SeriesClass, 'afterSetOptions', seriesOnAfterSetOptions);\n addEvent(SeriesClass, 'render', seriesOnRender);\n addEvent(SeriesClass, 'afterRender', seriesOnAfterRender);\n addEvent(SeriesClass, 'renderCanvas', seriesOnRenderCanvas);\n }\n }\n ForcedMarkersComposition.compose = compose;\n /**\n * @private\n */\n function forceZeroOpacityMarkerOptions(options) {\n merge(true, options, {\n marker: {\n enabled: true,\n states: {\n normal: {\n opacity: 0\n }\n }\n }\n });\n }\n /**\n * @private\n */\n function getPointMarkerOpacity(pointOptions) {\n return pointOptions.marker.states &&\n pointOptions.marker.states.normal &&\n pointOptions.marker.states.normal.opacity;\n }\n /**\n * @private\n */\n function handleForcePointMarkers(series) {\n let i = series.points.length;\n while (i--) {\n const point = series.points[i];\n const pointOptions = point.options;\n const hadForcedMarker = point.hasForcedA11yMarker;\n delete point.hasForcedA11yMarker;\n if (pointOptions.marker) {\n const isStillForcedMarker = hadForcedMarker &&\n getPointMarkerOpacity(pointOptions) === 0;\n if (pointOptions.marker.enabled && !isStillForcedMarker) {\n unforcePointMarkerOptions(pointOptions);\n point.hasForcedA11yMarker = false;\n }\n else if (pointOptions.marker.enabled === false) {\n forceZeroOpacityMarkerOptions(pointOptions);\n point.hasForcedA11yMarker = true;\n }\n }\n }\n }\n /**\n * @private\n */\n function hasIndividualPointMarkerOptions(series) {\n return !!(series._hasPointMarkers &&\n series.points &&\n series.points.length);\n }\n /**\n * @private\n */\n function isWithinDescriptionThreshold(series) {\n const a11yOptions = series.chart.options.accessibility;\n return series.points.length <\n a11yOptions.series.pointDescriptionEnabledThreshold ||\n a11yOptions.series\n .pointDescriptionEnabledThreshold === false;\n }\n /**\n * Process marker graphics after render\n * @private\n */\n function seriesOnAfterRender() {\n const series = this;\n // For styled mode the rendered graphic does not reflect the style\n // options, and we need to add/remove classes to achieve the same.\n if (series.chart.styledMode) {\n if (series.markerGroup) {\n series.markerGroup[series.a11yMarkersForced ? 'addClass' : 'removeClass']('highcharts-a11y-markers-hidden');\n }\n // Do we need to handle individual points?\n if (hasIndividualPointMarkerOptions(series)) {\n series.points.forEach((point) => {\n if (point.graphic) {\n point.graphic[point.hasForcedA11yMarker ?\n 'addClass' : 'removeClass']('highcharts-a11y-marker-hidden');\n point.graphic[point.hasForcedA11yMarker === false ?\n 'addClass' :\n 'removeClass']('highcharts-a11y-marker-visible');\n }\n });\n }\n }\n }\n /**\n * Keep track of options to reset markers to if no longer forced.\n * @private\n */\n function seriesOnAfterSetOptions(e) {\n this.resetA11yMarkerOptions = merge(e.options.marker || {}, this.userOptions.marker || {});\n }\n /**\n * Keep track of forcing markers.\n * @private\n */\n function seriesOnRender() {\n const series = this, options = series.options;\n if (shouldForceMarkers(series)) {\n if (options.marker?.enabled === false) {\n series.a11yMarkersForced = true;\n forceZeroOpacityMarkerOptions(series.options);\n }\n if (hasIndividualPointMarkerOptions(series)) {\n handleForcePointMarkers(series);\n }\n }\n else if (series.a11yMarkersForced) {\n delete series.a11yMarkersForced;\n // Mark series dirty to ensure marker graphics are cleaned up\n series.isDirty = true;\n unforceSeriesMarkerOptions(series);\n if (options.marker?.enabled === false) { // #23329\n delete series.resetA11yMarkerOptions; // #16624\n }\n }\n else if (series.chart.styledMode &&\n options.marker?.enabled === false &&\n !hasIndividualPointMarkerOptions(series)) {\n // `a11yMarkersForced` can be reset during `Series.update`.\n // Clean up stale marker graphics that may still exist (#24164).\n destroyPointMarkerGraphics(series);\n }\n }\n /**\n * @private\n */\n function shouldForceMarkers(series) {\n const chart = series.chart, chartA11yEnabled = chart.options.accessibility.enabled, seriesA11yEnabled = (series.options.accessibility &&\n series.options.accessibility.enabled) !== false;\n return (chartA11yEnabled &&\n seriesA11yEnabled &&\n isWithinDescriptionThreshold(series));\n }\n /**\n * @private\n */\n function unforcePointMarkerOptions(pointOptions) {\n merge(true, pointOptions.marker, {\n states: {\n normal: {\n opacity: getPointMarkerOpacity(pointOptions) || 1\n }\n }\n });\n }\n /**\n * @private\n */\n function destroyPointMarkerGraphics(series) {\n series.points?.forEach((point) => {\n if (point.graphic) {\n point.graphic = point.graphic.destroy();\n }\n });\n }\n /**\n * Reset markers to normal\n * @private\n */\n function unforceSeriesMarkerOptions(series) {\n const resetMarkerOptions = series.resetA11yMarkerOptions;\n if (resetMarkerOptions) {\n const originalOpacity = resetMarkerOptions.states &&\n resetMarkerOptions.states.normal &&\n resetMarkerOptions.states.normal.opacity;\n // Prevent ghost markers when zooming out (#23878).\n if (series.chart.styledMode &&\n resetMarkerOptions.enabled === false) {\n destroyPointMarkerGraphics(series);\n }\n // Temporarily set the old marker options to enabled in order to\n // trigger destruction of the markers in Series.update.\n if (series.userOptions && series.userOptions.marker) {\n series.userOptions.marker.enabled = true;\n }\n series.update({\n marker: {\n enabled: resetMarkerOptions.enabled,\n states: {\n normal: { opacity: originalOpacity }\n }\n }\n });\n }\n }\n /**\n * Reset markers if series is boosted and had forced markers (#17320).\n * @private\n */\n function seriesOnRenderCanvas() {\n if (this.boosted && this.a11yMarkersForced) {\n merge(true, this.options, {\n marker: {\n enabled: false\n }\n });\n delete this.a11yMarkersForced;\n }\n }\n})(ForcedMarkersComposition || (ForcedMarkersComposition = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default ForcedMarkersComposition;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Handle keyboard navigation for series.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport Point from '../../../Core/Series/Point.js';\nimport Series from '../../../Core/Series/Series.js';\nimport SeriesRegistry from '../../../Core/Series/SeriesRegistry.js';\nconst { seriesTypes } = SeriesRegistry;\nimport H from '../../../Core/Globals.js';\nconst { doc } = H;\nimport KeyboardNavigationHandler from '../../KeyboardNavigationHandler.js';\nimport EventProvider from '../../Utils/EventProvider.js';\nimport ChartUtilities from '../../Utils/ChartUtilities.js';\nimport { defined, fireEvent } from '../../../Shared/Utilities.js';\nconst { getPointFromXY, getSeriesFromName, scrollAxisToPoint } = ChartUtilities;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Get the index of a point in a series. This is needed when using e.g. data\n * grouping.\n *\n * @private\n * @function getPointIndex\n * @param {Highcharts.AccessibilityPoint} point\n * The point to find index of.\n * @return {number|undefined}\n * The index in the series.points array of the point.\n */\nfunction getPointIndex(point) {\n const index = point.index, points = point.series.points;\n let i = points.length;\n if (points[index] !== point) {\n while (i--) {\n if (points[i] === point) {\n return i;\n }\n }\n }\n else {\n return index;\n }\n}\n/**\n * Determine if series navigation should be skipped\n * @private\n */\nfunction isSkipSeries(series) {\n const a11yOptions = series.chart.options.accessibility, seriesNavOptions = a11yOptions.keyboardNavigation.seriesNavigation, seriesA11yOptions = series.options.accessibility || {}, seriesKbdNavOptions = seriesA11yOptions.keyboardNavigation;\n return seriesKbdNavOptions && seriesKbdNavOptions.enabled === false ||\n seriesA11yOptions.enabled === false ||\n series.options.enableMouseTracking === false || // #8440\n !series.visible ||\n // Skip all points in a series where pointNavigationEnabledThreshold is\n // reached\n (seriesNavOptions.pointNavigationEnabledThreshold &&\n +seriesNavOptions.pointNavigationEnabledThreshold <=\n series.points.length);\n}\n/**\n * Determine if navigation for a point should be skipped\n * @private\n */\nfunction isSkipPoint(point) {\n const series = point.series, nullInteraction = series.options.nullInteraction, pointOptions = point.options, pointA11yOptions = pointOptions.accessibility, a11yOptions = series.chart.options.accessibility, pointA11yDisabled = pointA11yOptions?.enabled === false;\n return a11yOptions\n .keyboardNavigation\n .seriesNavigation\n .skipNullPoints ?? (!(!point.isNull || nullInteraction) &&\n point.visible === false ||\n point.isInside === false ||\n pointA11yDisabled ||\n isSkipSeries(series));\n}\n/**\n * Get the first point that is not a skip point in this series.\n * @private\n */\nfunction getFirstValidPointInSeries(series) {\n const points = series.points || [], len = points.length;\n for (let i = 0; i < len; ++i) {\n if (!isSkipPoint(points[i])) {\n return points[i];\n }\n }\n return null;\n}\n/**\n * Get the first point that is not a skip point in this chart.\n * @private\n */\nfunction getFirstValidPointInChart(chart) {\n const series = chart.series || [], len = series.length;\n for (let i = 0; i < len; ++i) {\n if (!isSkipSeries(series[i])) {\n const point = getFirstValidPointInSeries(series[i]);\n if (point) {\n return point;\n }\n }\n }\n return null;\n}\n/**\n * @private\n */\nfunction highlightLastValidPointInChart(chart) {\n const numSeries = chart.series.length;\n let i = numSeries, res = false;\n while (i--) {\n chart.highlightedPoint = chart.series[i].points[chart.series[i].points.length - 1];\n // Highlight first valid point in the series will also\n // look backwards. It always starts from currently\n // highlighted point.\n res = chart.series[i].highlightNextValidPoint();\n if (res) {\n break;\n }\n }\n return res;\n}\n/**\n * After drilling down/up, we need to set focus to the first point for\n * screen readers and keyboard nav.\n * @private\n */\nfunction updateChartFocusAfterDrilling(chart) {\n const point = getFirstValidPointInChart(chart);\n if (point) {\n point.highlight(false); // Do not visually highlight\n }\n}\n/**\n * Highlight the first point in chart that is not a skip point\n * @private\n */\nfunction highlightFirstValidPointInChart(chart) {\n delete chart.highlightedPoint;\n const point = getFirstValidPointInChart(chart);\n return point ? point.highlight() : false;\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * @private\n * @class\n * @name Highcharts.SeriesKeyboardNavigation\n */\nclass SeriesKeyboardNavigation {\n /* *\n *\n * Constructor\n *\n * */\n constructor(chart, keyCodes) {\n this.keyCodes = keyCodes;\n this.chart = chart;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Init the keyboard navigation\n */\n init() {\n const keyboardNavigation = this, chart = this.chart, e = this.eventProvider = new EventProvider();\n e.addEvent(Series, 'destroy', function () {\n return keyboardNavigation.onSeriesDestroy(this);\n });\n e.addEvent(chart, 'afterApplyDrilldown', function () {\n updateChartFocusAfterDrilling(this);\n });\n e.addEvent(chart, 'drilldown', function (e) {\n const point = e.point, series = point.series;\n keyboardNavigation.lastDrilledDownPoint = {\n x: point.x,\n y: point.y,\n seriesName: series ? series.name : ''\n };\n });\n e.addEvent(chart, 'drillupall', function () {\n setTimeout(function () {\n keyboardNavigation.onDrillupAll();\n }, 10);\n });\n // Heatmaps et al. alter z-index in setState, causing elements\n // to lose focus\n e.addEvent(Point, 'afterSetState', function () {\n const point = this;\n const pointEl = point.graphic && point.graphic.element;\n const focusedElement = doc.activeElement;\n // VO brings focus with it to container, causing series nav to run.\n // If then navigating with virtual cursor, it is possible to leave\n // keyboard nav module state on the data points and still activate\n // proxy buttons.\n const focusedElClassName = (focusedElement && focusedElement.getAttribute('class'));\n const isProxyFocused = focusedElClassName &&\n focusedElClassName.indexOf('highcharts-a11y-proxy-element') > -1;\n if (chart.highlightedPoint === point &&\n focusedElement !== pointEl &&\n !isProxyFocused &&\n pointEl &&\n pointEl.focus) {\n pointEl.focus();\n }\n });\n }\n /**\n * After drillup we want to find the point that was drilled down to and\n * highlight it.\n * @private\n */\n onDrillupAll() {\n const last = this.lastDrilledDownPoint, chart = this.chart, series = last && getSeriesFromName(chart, last.seriesName);\n let point;\n if (last && series && defined(last.x) && defined(last.y)) {\n point = getPointFromXY(series, last.x, last.y);\n }\n point = point || getFirstValidPointInChart(chart);\n // Container focus can be lost on drillup due to deleted elements.\n if (chart.container) {\n chart.container.focus();\n }\n if (point && point.highlight) {\n point.highlight(false); // Do not visually highlight\n }\n }\n /**\n * @private\n */\n getKeyboardNavigationHandler() {\n const keyboardNavigation = this, keys = this.keyCodes, chart = this.chart, inverted = chart.inverted;\n return new KeyboardNavigationHandler(chart, {\n keyCodeMap: [\n [\n inverted ? [keys.up, keys.down] : [keys.left, keys.right],\n function (keyCode) {\n return keyboardNavigation.onKbdSideways(this, keyCode);\n }\n ],\n [\n inverted ? [keys.left, keys.right] : [keys.up, keys.down],\n function (keyCode) {\n return keyboardNavigation.onKbdVertical(this, keyCode);\n }\n ],\n [\n [keys.enter, keys.space],\n function (keyCode, event) {\n const point = chart.highlightedPoint;\n if (point) {\n const { plotLeft, plotTop } = this.chart, { plotX = 0, plotY = 0 } = point;\n event = {\n ...event,\n chartX: plotLeft + plotX,\n chartY: plotTop + plotY,\n point: point,\n target: point.graphic?.element || event.target\n };\n fireEvent(point.series, 'click', event);\n point.firePointEvent('click', event);\n }\n return this.response.success;\n }\n ],\n [\n [keys.home],\n function () {\n highlightFirstValidPointInChart(chart);\n return this.response.success;\n }\n ],\n [\n [keys.end],\n function () {\n highlightLastValidPointInChart(chart);\n return this.response.success;\n }\n ],\n [\n [keys.pageDown, keys.pageUp],\n function (keyCode) {\n chart.highlightAdjacentSeries(keyCode === keys.pageDown);\n return this.response.success;\n }\n ]\n ],\n init: function () {\n return keyboardNavigation.onHandlerInit(this);\n },\n validate: function () {\n return !!getFirstValidPointInChart(chart);\n },\n terminate: function () {\n return keyboardNavigation.onHandlerTerminate();\n }\n });\n }\n /**\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} handler\n * @param {number} keyCode\n * @return {number}\n * response\n */\n onKbdSideways(handler, keyCode) {\n const keys = this.keyCodes, isNext = keyCode === keys.right || keyCode === keys.down;\n return this.attemptHighlightAdjacentPoint(handler, isNext);\n }\n /**\n * When keyboard navigation inits.\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} handler The handler object\n * @return {number}\n * response\n */\n onHandlerInit(handler) {\n const chart = this.chart, kbdNavOptions = chart.options.accessibility.keyboardNavigation;\n if (kbdNavOptions.seriesNavigation.rememberPointFocus &&\n chart.highlightedPoint) {\n chart.highlightedPoint.highlight();\n }\n else {\n highlightFirstValidPointInChart(chart);\n }\n return handler.response.success;\n }\n /**\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} handler\n * @param {number} keyCode\n * @return {number}\n * response\n */\n onKbdVertical(handler, keyCode) {\n const chart = this.chart, keys = this.keyCodes, isNext = keyCode === keys.down || keyCode === keys.right, navOptions = chart.options.accessibility.keyboardNavigation\n .seriesNavigation;\n // Handle serialized mode, act like left/right\n if (navOptions.mode && navOptions.mode === 'serialize') {\n return this.attemptHighlightAdjacentPoint(handler, isNext);\n }\n // Normal mode, move between series\n const highlightMethod = (chart.highlightedPoint &&\n chart.highlightedPoint.series.keyboardMoveVertical) ?\n 'highlightAdjacentPointVertical' :\n 'highlightAdjacentSeries';\n chart[highlightMethod](isNext);\n return handler.response.success;\n }\n /**\n * @private\n */\n onHandlerTerminate() {\n const chart = this.chart, kbdNavOptions = chart.options.accessibility.keyboardNavigation;\n if (chart.tooltip) {\n chart.tooltip.hide(0);\n }\n const hoverSeries = (chart.highlightedPoint && chart.highlightedPoint.series);\n if (hoverSeries && hoverSeries.onMouseOut) {\n hoverSeries.onMouseOut();\n }\n if (chart.highlightedPoint && chart.highlightedPoint.onMouseOut) {\n chart.highlightedPoint.onMouseOut();\n }\n if (!kbdNavOptions.seriesNavigation.rememberPointFocus) {\n delete chart.highlightedPoint;\n }\n }\n /**\n * Function that attempts to highlight next/prev point. Handles wrap around.\n * @private\n */\n attemptHighlightAdjacentPoint(handler, directionIsNext) {\n const chart = this.chart, wrapAround = chart.options.accessibility.keyboardNavigation\n .wrapAround, highlightSuccessful = chart.highlightAdjacentPoint(directionIsNext);\n if (!highlightSuccessful) {\n if (wrapAround && (directionIsNext ?\n highlightFirstValidPointInChart(chart) :\n highlightLastValidPointInChart(chart))) {\n return handler.response.success;\n }\n return handler.response[directionIsNext ? 'next' : 'prev'];\n }\n return handler.response.success;\n }\n /**\n * @private\n */\n onSeriesDestroy(series) {\n const chart = this.chart, currentHighlightedPointDestroyed = chart.highlightedPoint &&\n chart.highlightedPoint.series === series;\n if (currentHighlightedPointDestroyed) {\n delete chart.highlightedPoint;\n if (chart.focusElement) {\n chart.focusElement.removeFocusBorder();\n }\n }\n }\n /**\n * @private\n */\n destroy() {\n this.eventProvider.removeAddedEvents();\n }\n}\n/* *\n *\n * Class Namespace\n *\n * */\n(function (SeriesKeyboardNavigation) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * Function to highlight next/previous point in chart.\n *\n * @private\n * @function Highcharts.Chart#highlightAdjacentPoint\n *\n * @param {boolean} next\n * Flag for the direction.\n *\n * @return {Highcharts.Point|boolean}\n * Returns highlighted point on success, false on failure (no adjacent point\n * to highlight in chosen direction).\n */\n function chartHighlightAdjacentPoint(next) {\n const chart = this, series = chart.series, curPoint = chart.highlightedPoint, curPointIndex = curPoint && getPointIndex(curPoint) || 0, curPoints = curPoint && curPoint.series.points || [], lastSeries = chart.series && chart.series[chart.series.length - 1], lastPoint = lastSeries &&\n lastSeries.points &&\n lastSeries.points[lastSeries.points.length - 1];\n let newSeries, newPoint;\n // If no points, return false\n if (!series[0] || !series[0].points) {\n return false;\n }\n if (!curPoint) {\n // No point is highlighted yet. Try first/last point depending on\n // move direction\n newPoint = next ? series[0].points[0] : lastPoint;\n }\n else {\n // We have a highlighted point. Grab next/prev point & series.\n newSeries = series[curPoint.series.index + (next ? 1 : -1)];\n newPoint = curPoints[curPointIndex + (next ? 1 : -1)];\n if (!newPoint && newSeries) {\n // Done with this series, try next one\n newPoint = newSeries.points[next ? 0 : newSeries.points.length - 1];\n }\n // If there is no adjacent point, we return false\n if (!newPoint) {\n return false;\n }\n }\n // Recursively skip points\n if (isSkipPoint(newPoint)) {\n // If we skip this whole series, move to the end of the series\n // before we recurse, just to optimize\n newSeries = newPoint.series;\n if (isSkipSeries(newSeries)) {\n chart.highlightedPoint = next ?\n newSeries.points[newSeries.points.length - 1] :\n newSeries.points[0];\n }\n else {\n // Otherwise, just move one point\n chart.highlightedPoint = newPoint;\n }\n // Retry\n return chart.highlightAdjacentPoint(next);\n }\n // There is an adjacent point, highlight it\n return newPoint.highlight();\n }\n /**\n * Highlight the closest point vertically.\n * @private\n */\n function chartHighlightAdjacentPointVertical(down) {\n const curPoint = this.highlightedPoint;\n let minDistance = Infinity, bestPoint;\n if (!defined(curPoint.plotX) || !defined(curPoint.plotY)) {\n return false;\n }\n this.series.forEach((series) => {\n if (isSkipSeries(series)) {\n return;\n }\n series.points.forEach((point) => {\n if (!defined(point.plotY) || !defined(point.plotX) ||\n point === curPoint) {\n return;\n }\n let yDistance = point.plotY - curPoint.plotY;\n const width = Math.abs(point.plotX - curPoint.plotX), distance = Math.abs(yDistance) * Math.abs(yDistance) +\n width * width * 4; // Weigh horizontal distance highly\n // Reverse distance number if axis is reversed\n if (series.yAxis && series.yAxis.reversed) {\n yDistance *= -1;\n }\n if (yDistance <= 0 && down || yDistance >= 0 && !down ||\n distance < 5 || // Points in same spot => infinite loop\n isSkipPoint(point)) {\n return;\n }\n if (distance < minDistance) {\n minDistance = distance;\n bestPoint = point;\n }\n });\n });\n return bestPoint ? bestPoint.highlight() : false;\n }\n /**\n * Highlight next/previous series in chart. Returns false if no adjacent\n * series in the direction, otherwise returns new highlighted point.\n * @private\n */\n function chartHighlightAdjacentSeries(down) {\n const chart = this, curPoint = chart.highlightedPoint, lastSeries = chart.series && chart.series[chart.series.length - 1], lastPoint = lastSeries && lastSeries.points &&\n lastSeries.points[lastSeries.points.length - 1];\n let newSeries, newPoint, adjacentNewPoint;\n // If no point is highlighted, highlight the first/last point\n if (!chart.highlightedPoint) {\n newSeries = down ? (chart.series && chart.series[0]) : lastSeries;\n newPoint = down ?\n (newSeries && newSeries.points && newSeries.points[0]) :\n lastPoint;\n return newPoint ? newPoint.highlight() : false;\n }\n newSeries = (chart.series[curPoint.series.index + (down ? -1 : 1)]);\n if (!newSeries) {\n return false;\n }\n // We have a new series in this direction, find the right point\n // Weigh xDistance as counting much higher than Y distance\n newPoint = getClosestPoint(curPoint, newSeries, 4);\n if (!newPoint) {\n return false;\n }\n // New series and point exists, but we might want to skip it\n if (isSkipSeries(newSeries)) {\n // Skip the series\n newPoint.highlight();\n // Try recurse\n adjacentNewPoint = chart.highlightAdjacentSeries(down);\n if (!adjacentNewPoint) {\n // Recurse failed\n curPoint.highlight();\n return false;\n }\n // Recurse succeeded\n return adjacentNewPoint;\n }\n // Highlight the new point or any first valid point back or forwards\n // from it\n newPoint.highlight();\n return newPoint.series.highlightNextValidPoint();\n }\n /**\n * @private\n */\n function compose(ChartClass, PointClass, SeriesClass) {\n const chartProto = ChartClass.prototype, pointProto = PointClass.prototype, seriesProto = SeriesClass.prototype;\n if (!chartProto.highlightAdjacentPoint) {\n chartProto.highlightAdjacentPoint = chartHighlightAdjacentPoint;\n chartProto.highlightAdjacentPointVertical = (chartHighlightAdjacentPointVertical);\n chartProto.highlightAdjacentSeries = chartHighlightAdjacentSeries;\n pointProto.highlight = pointHighlight;\n /**\n * Set for which series types it makes sense to move to the closest\n * point with up/down arrows, and which series types should just\n * move to next series.\n * @private\n */\n seriesProto.keyboardMoveVertical = true;\n [\n 'column',\n 'gantt',\n 'pie'\n ].forEach((type) => {\n if (seriesTypes[type]) {\n seriesTypes[type].prototype.keyboardMoveVertical = false;\n }\n });\n seriesProto.highlightNextValidPoint = (seriesHighlightNextValidPoint);\n }\n }\n SeriesKeyboardNavigation.compose = compose;\n /**\n * Get the point in a series that is closest (in pixel distance) to a\n * reference point. Optionally supply weight factors for x and y directions.\n * @private\n */\n function getClosestPoint(point, series, xWeight, yWeight) {\n let minDistance = Infinity, dPoint, minIx, distance, i = series.points.length;\n const hasUndefinedPosition = (point) => (!(defined(point.plotX) && defined(point.plotY)));\n if (hasUndefinedPosition(point)) {\n return;\n }\n while (i--) {\n dPoint = series.points[i];\n if (hasUndefinedPosition(dPoint)) {\n continue;\n }\n distance = (point.plotX - dPoint.plotX) *\n (point.plotX - dPoint.plotX) *\n (xWeight || 1) +\n (point.plotY - dPoint.plotY) *\n (point.plotY - dPoint.plotY) *\n (yWeight || 1);\n if (distance < minDistance) {\n minDistance = distance;\n minIx = i;\n }\n }\n return defined(minIx) ? series.points[minIx] : void 0;\n }\n /**\n * Highlights a point (show tooltip, display hover state, focus element).\n *\n * @private\n * @function Highcharts.Point#highlight\n *\n * @return {Highcharts.Point}\n * This highlighted point.\n */\n function pointHighlight(highlightVisually = true) {\n const chart = this.series.chart, tooltipElement = chart.tooltip?.label?.element;\n if ((!this.isNull ||\n this.series.options?.nullInteraction) && highlightVisually) {\n this.onMouseOver(); // Show the hover marker and tooltip\n }\n else {\n if (chart.tooltip) {\n chart.tooltip.hide(0);\n }\n // Do not call blur on the element, as it messes up the focus of the\n // div element of the chart\n }\n scrollAxisToPoint(this);\n // We focus only after calling onMouseOver because the state change can\n // change z-index and mess up the element.\n if (this.graphic) {\n chart.setFocusToElement(this.graphic);\n if (!highlightVisually && chart.focusElement) {\n chart.focusElement.removeFocusBorder();\n }\n }\n chart.highlightedPoint = this;\n // Get position of the tooltip.\n const tooltipTop = tooltipElement?.getBoundingClientRect().top;\n if (tooltipElement && tooltipTop && tooltipTop < 0) {\n // Calculate scroll position.\n const scrollTop = window.scrollY, newScrollTop = scrollTop + tooltipTop;\n // Scroll window to new position.\n window.scrollTo({\n behavior: 'smooth',\n top: newScrollTop\n });\n }\n return this;\n }\n /**\n * Highlight first valid point in a series. Returns the point if\n * successfully highlighted, otherwise false. If there is a highlighted\n * point in the series, use that as starting point.\n *\n * @private\n * @function Highcharts.Series#highlightNextValidPoint\n */\n function seriesHighlightNextValidPoint() {\n const curPoint = this.chart.highlightedPoint, start = (curPoint && curPoint.series) === this ?\n getPointIndex(curPoint) :\n 0, points = this.points, len = points.length;\n if (points && len) {\n for (let i = start; i < len; ++i) {\n if (!isSkipPoint(points[i])) {\n return points[i].highlight();\n }\n }\n for (let j = start; j >= 0; --j) {\n if (!isSkipPoint(points[j])) {\n return points[j].highlight();\n }\n }\n }\n return false;\n }\n})(SeriesKeyboardNavigation || (SeriesKeyboardNavigation = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default SeriesKeyboardNavigation;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Accessibility component for series and points.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport AccessibilityComponent from '../../AccessibilityComponent.js';\nimport ChartUtilities from '../../Utils/ChartUtilities.js';\nconst { hideSeriesFromAT } = ChartUtilities;\nimport ForcedMarkers from './ForcedMarkers.js';\nimport NewDataAnnouncer from './NewDataAnnouncer.js';\nimport SeriesDescriber from './SeriesDescriber.js';\nconst { describeSeries } = SeriesDescriber;\nimport SeriesKeyboardNavigation from './SeriesKeyboardNavigation.js';\n/* *\n *\n * Class\n *\n * */\n/**\n * The SeriesComponent class\n *\n * @private\n * @class\n * @name Highcharts.SeriesComponent\n */\nclass SeriesComponent extends AccessibilityComponent {\n /* *\n *\n * Static Functions\n *\n * */\n /**\n * @private\n */\n static compose(ChartClass, PointClass, SeriesClass) {\n NewDataAnnouncer.compose(SeriesClass);\n ForcedMarkers.compose(SeriesClass);\n SeriesKeyboardNavigation.compose(ChartClass, PointClass, SeriesClass);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Init the component.\n */\n init() {\n this.newDataAnnouncer = new NewDataAnnouncer(this.chart);\n this.newDataAnnouncer.init();\n this.keyboardNavigation = new SeriesKeyboardNavigation(this.chart, this.keyCodes);\n this.keyboardNavigation.init();\n this.hideTooltipFromATWhenShown();\n this.hideSeriesLabelsFromATWhenShown();\n }\n /**\n * @private\n */\n hideTooltipFromATWhenShown() {\n const component = this;\n if (this.chart.tooltip) {\n this.addEvent(this.chart.tooltip.constructor, 'refresh', function () {\n if (this.chart === component.chart &&\n this.label &&\n this.label.element) {\n this.label.element.setAttribute('aria-hidden', true);\n }\n });\n }\n }\n /**\n * @private\n */\n hideSeriesLabelsFromATWhenShown() {\n this.addEvent(this.chart, 'afterDrawSeriesLabels', function () {\n this.series.forEach(function (series) {\n if (series.labelBySeries) {\n series.labelBySeries.attr('aria-hidden', true);\n }\n });\n });\n }\n /**\n * Called on chart render. It is necessary to do this for render in case\n * markers change on zoom/pixel density.\n */\n onChartRender() {\n const chart = this.chart;\n chart.series.forEach(function (series) {\n const shouldDescribeSeries = (series.options.accessibility &&\n series.options.accessibility.enabled) !== false &&\n series.visible && series.getPointsCollection().length !== 0;\n if (shouldDescribeSeries) {\n describeSeries(series);\n }\n else {\n hideSeriesFromAT(series);\n }\n });\n }\n /**\n * Get keyboard navigation handler for this component.\n * @private\n */\n getKeyboardNavigation() {\n return this.keyboardNavigation.getKeyboardNavigationHandler();\n }\n /**\n * Remove traces\n * @private\n */\n destroy() {\n this.newDataAnnouncer.destroy();\n this.keyboardNavigation.destroy();\n }\n}\n/* *\n *\n * Default Export\n *\n * */\nexport default SeriesComponent;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Accessibility component for chart zoom.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport AccessibilityComponent from '../AccessibilityComponent.js';\nimport CU from '../Utils/ChartUtilities.js';\nconst { unhideChartElementFromAT } = CU;\nimport HU from '../Utils/HTMLUtilities.js';\nconst { getFakeMouseEvent } = HU;\nimport KeyboardNavigationHandler from '../KeyboardNavigationHandler.js';\nimport { attr, pick } from '../../Shared/Utilities.js';\n/* *\n *\n * Functions\n *\n * */\n/**\n * @private\n */\nfunction chartHasMapZoom(chart) {\n return !!((chart.mapView) &&\n chart.mapNavigation &&\n chart.mapNavigation.navButtons.length);\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * The ZoomComponent class\n *\n * @private\n * @class\n * @name Highcharts.ZoomComponent\n */\nclass ZoomComponent extends AccessibilityComponent {\n constructor() {\n /* *\n *\n * Properties\n *\n * */\n super(...arguments);\n this.focusedMapNavButtonIx = -1;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Initialize the component\n */\n init() {\n const component = this, chart = this.chart;\n this.proxyProvider.addGroup('zoom', 'div');\n [\n 'afterShowResetZoom', 'afterApplyDrilldown', 'drillupall'\n ].forEach((eventType) => {\n component.addEvent(chart, eventType, function () {\n component.updateProxyOverlays();\n });\n });\n }\n /**\n * Called when chart is updated\n */\n onChartUpdate() {\n const chart = this.chart, component = this;\n // Make map zoom buttons accessible\n if (chart.mapNavigation) {\n chart.mapNavigation.navButtons.forEach((button, i) => {\n unhideChartElementFromAT(chart, button.element);\n component.setMapNavButtonAttrs(button.element, 'accessibility.zoom.mapZoom' + (i ? 'Out' : 'In'));\n });\n }\n }\n /**\n * @private\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} button\n * @param {string} labelFormatKey\n */\n setMapNavButtonAttrs(button, labelFormatKey) {\n const chart = this.chart, label = chart.langFormat(labelFormatKey, { chart: chart });\n attr(button, {\n tabindex: -1,\n role: 'button',\n 'aria-label': label\n });\n }\n /**\n * Update the proxy overlays on every new render to ensure positions are\n * correct.\n */\n onChartRender() {\n this.updateProxyOverlays();\n }\n /**\n * Update proxy overlays, recreating the buttons.\n */\n updateProxyOverlays() {\n const chart = this.chart;\n // Always start with a clean slate\n this.proxyProvider.clearGroup('zoom');\n if (chart.resetZoomButton) {\n this.createZoomProxyButton(chart.resetZoomButton, 'resetZoomProxyButton', chart.langFormat('accessibility.zoom.resetZoomButton', { chart: chart }));\n }\n if (chart.drillUpButton &&\n chart.breadcrumbs &&\n chart.breadcrumbs.list) {\n const lastBreadcrumb = chart.breadcrumbs.list[chart.breadcrumbs.list.length - 1];\n this.createZoomProxyButton(chart.drillUpButton, 'drillUpProxyButton', chart.langFormat('accessibility.drillUpButton', {\n chart: chart,\n buttonText: chart.breadcrumbs.getButtonText(lastBreadcrumb)\n }));\n }\n }\n /**\n * @private\n * @param {Highcharts.SVGElement} buttonEl\n * @param {string} buttonProp\n * @param {string} label\n */\n createZoomProxyButton(buttonEl, buttonProp, label) {\n this[buttonProp] = this.proxyProvider.addProxyElement('zoom', {\n click: buttonEl\n }, 'button', {\n 'aria-label': label,\n tabindex: -1\n });\n }\n /**\n * Get keyboard navigation handler for map zoom.\n * @private\n * @return {Highcharts.KeyboardNavigationHandler} The module object\n */\n getMapZoomNavigation() {\n const keys = this.keyCodes, chart = this.chart, component = this;\n return new KeyboardNavigationHandler(chart, {\n keyCodeMap: [\n [\n [keys.up, keys.down, keys.left, keys.right],\n function (keyCode) {\n return component.onMapKbdArrow(this, keyCode);\n }\n ],\n [\n [keys.tab],\n function (_keyCode, e) {\n return component.onMapKbdTab(this, e);\n }\n ],\n [\n [keys.space, keys.enter],\n function () {\n return component.onMapKbdClick(this);\n }\n ]\n ],\n validate: function () {\n return chartHasMapZoom(chart);\n },\n init: function (direction) {\n return component.onMapNavInit(direction);\n }\n });\n }\n /**\n * Arrow key panning for maps.\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} keyboardNavigationHandler The handler context.\n * @param {number} keyCode Key pressed.\n * @return {number} Response code\n */\n onMapKbdArrow(keyboardNavigationHandler, keyCode) {\n const chart = this.chart, keys = this.keyCodes, target = chart.container, isY = keyCode === keys.up || keyCode === keys.down, stepDirection = (keyCode === keys.left || keyCode === keys.up) ?\n 1 : -1, granularity = 10, diff = (isY ? chart.plotHeight : chart.plotWidth) /\n granularity * stepDirection, \n // Randomize since same mousedown coords twice is ignored in MapView\n r = Math.random() * 10, startPos = {\n x: target.offsetLeft + chart.plotLeft + chart.plotWidth / 2 + r,\n y: target.offsetTop + chart.plotTop + chart.plotHeight / 2 + r\n }, endPos = isY ? { x: startPos.x, y: startPos.y + diff } :\n { x: startPos.x + diff, y: startPos.y };\n [\n getFakeMouseEvent('mousedown', startPos),\n getFakeMouseEvent('mousemove', endPos),\n getFakeMouseEvent('mouseup', endPos)\n ].forEach((e) => target.dispatchEvent(e));\n return keyboardNavigationHandler.response.success;\n }\n /**\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} keyboardNavigationHandler\n * @param {global.KeyboardEvent} event\n * @return {number} Response code\n */\n onMapKbdTab(keyboardNavigationHandler, event) {\n const chart = this.chart;\n const response = keyboardNavigationHandler.response;\n const isBackwards = event.shiftKey;\n const isMoveOutOfRange = isBackwards && !this.focusedMapNavButtonIx ||\n !isBackwards && this.focusedMapNavButtonIx;\n // Deselect old\n chart.mapNavigation.navButtons[this.focusedMapNavButtonIx].setState(0);\n if (isMoveOutOfRange) {\n if (chart.mapView) {\n chart.mapView.zoomBy(); // Reset zoom\n }\n return response[isBackwards ? 'prev' : 'next'];\n }\n // Select other button\n this.focusedMapNavButtonIx += isBackwards ? -1 : 1;\n const button = chart.mapNavigation.navButtons[this.focusedMapNavButtonIx];\n chart.setFocusToElement(button.box, button.element);\n button.setState(2);\n return response.success;\n }\n /**\n * Called on map button click.\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} keyboardNavigationHandler The handler context object\n * @return {number} Response code\n */\n onMapKbdClick(keyboardNavigationHandler) {\n const el = this.chart.mapNavigation.navButtons[this.focusedMapNavButtonIx].element;\n this.fakeClickEvent(el);\n return keyboardNavigationHandler.response.success;\n }\n /**\n * @private\n * @param {number} direction\n */\n onMapNavInit(direction) {\n const chart = this.chart, zoomIn = chart.mapNavigation.navButtons[0], zoomOut = chart.mapNavigation.navButtons[1], initialButton = direction > 0 ? zoomIn : zoomOut;\n chart.setFocusToElement(initialButton.box, initialButton.element);\n initialButton.setState(2);\n this.focusedMapNavButtonIx = direction > 0 ? 0 : 1;\n }\n /**\n * Get keyboard navigation handler for a simple chart button. Provide the\n * button reference for the chart, and a function to call on click.\n *\n * @private\n * @param {string} buttonProp The property on chart referencing the button.\n * @return {Highcharts.KeyboardNavigationHandler} The module object\n */\n simpleButtonNavigation(buttonProp, proxyProp, onClick) {\n const keys = this.keyCodes, component = this, chart = this.chart;\n return new KeyboardNavigationHandler(chart, {\n keyCodeMap: [\n [\n [keys.tab, keys.up, keys.down, keys.left, keys.right],\n function (keyCode, e) {\n const isBackwards = (keyCode === keys.tab && e.shiftKey ||\n keyCode === keys.left ||\n keyCode === keys.up);\n // Arrow/tab => just move\n return this.response[isBackwards ? 'prev' : 'next'];\n }\n ],\n [\n [keys.space, keys.enter],\n function () {\n const res = onClick(this, chart);\n return pick(res, this.response.success);\n }\n ]\n ],\n validate: function () {\n const hasButton = (chart[buttonProp] &&\n chart[buttonProp].box &&\n component[proxyProp].innerElement);\n return hasButton;\n },\n init: function () {\n chart.setFocusToElement(chart[buttonProp].box, component[proxyProp].innerElement);\n }\n });\n }\n /**\n * Get keyboard navigation handlers for this component.\n * @return {Array<Highcharts.KeyboardNavigationHandler>}\n * List of module objects\n */\n getKeyboardNavigation() {\n return [\n this.simpleButtonNavigation('resetZoomButton', 'resetZoomProxyButton', function (_handler, chart) {\n chart.zoomOut();\n }),\n this.simpleButtonNavigation('drillUpButton', 'drillUpProxyButton', function (handler, chart) {\n chart.drillUp();\n return handler.response.prev;\n }),\n this.getMapZoomNavigation()\n ];\n }\n}\n/* *\n *\n * Default Export\n *\n * */\nexport default ZoomComponent;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Handling for Windows High Contrast Mode.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport H from '../Core/Globals.js';\nconst { doc, isMS, win } = H;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Detect WHCM in the browser.\n *\n * @function Highcharts#isHighContrastModeActive\n * @private\n * @return {boolean} Returns true if the browser is in High Contrast mode.\n */\nfunction isHighContrastModeActive() {\n // Test BG image for IE\n if (isMS && win.getComputedStyle) {\n const testDiv = doc.createElement('div');\n const imageSrc = 'data:image/gif;base64,' +\n 'R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';\n testDiv.style.backgroundImage = `url(${imageSrc})`; // #13071\n doc.body.appendChild(testDiv);\n const bi = (testDiv.currentStyle ||\n win.getComputedStyle(testDiv)).backgroundImage;\n doc.body.removeChild(testDiv);\n return bi === 'none';\n }\n // Other browsers use the forced-colors standard\n return win.matchMedia && win.matchMedia('(forced-colors: active)').matches;\n}\n/**\n * Force high contrast theme for the chart. The default theme is defined in\n * a separate file.\n *\n * @function Highcharts#setHighContrastTheme\n * @private\n * @param {Highcharts.AccessibilityChart} chart The chart to set the theme of.\n * @return {void}\n */\nfunction setHighContrastTheme(chart) {\n // We might want to add additional functionality here in the future for\n // storing the old state so that we can reset the theme if HC mode is\n // disabled. For now, the user will have to reload the page.\n const highContrastState = chart.highContrastState || (chart.highContrastState = {});\n highContrastState.active = true;\n highContrastState.applying = true;\n try {\n // Apply theme to chart\n const theme = (chart.options.accessibility.highContrastTheme);\n chart.update(theme, false);\n const hasCustomColors = theme.colors?.length > 1;\n // Force series colors (plotOptions is not enough)\n chart.series.forEach(function (s) {\n const plotOpts = theme.plotOptions[s.type] || {};\n const fillColor = hasCustomColors && s.colorIndex !== void 0 ?\n theme.colors[s.colorIndex] :\n plotOpts.color || 'window';\n const seriesOptions = {\n color: plotOpts.color || 'windowText',\n colors: hasCustomColors ?\n theme.colors : [plotOpts.color || 'windowText'],\n borderColor: plotOpts.borderColor || 'window',\n fillColor\n };\n s.update(seriesOptions, false);\n if (s.points) {\n // Force point colors if existing\n s.points.forEach(function (p) {\n if (p.options && p.options.color) {\n p.update({\n color: plotOpts.color || 'windowText',\n borderColor: plotOpts.borderColor || 'window'\n }, false);\n }\n });\n }\n });\n // The redraw for each series and after is required for 3D pie\n // (workaround)\n chart.redraw();\n }\n finally {\n delete highContrastState.applying;\n }\n}\n/* *\n *\n * Default Export\n *\n * */\nconst whcm = {\n isHighContrastModeActive,\n setHighContrastTheme\n};\nexport default whcm;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Default theme for Windows High Contrast Mode.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nconst theme = {\n chart: {\n backgroundColor: 'window'\n },\n title: {\n style: {\n color: 'windowText'\n }\n },\n subtitle: {\n style: {\n color: 'windowText'\n }\n },\n colorAxis: {\n minColor: 'windowText',\n maxColor: 'windowText',\n stops: [],\n dataClasses: []\n },\n colors: ['windowText'],\n xAxis: {\n gridLineColor: 'windowText',\n labels: {\n style: {\n color: 'windowText'\n }\n },\n lineColor: 'windowText',\n minorGridLineColor: 'windowText',\n tickColor: 'windowText',\n title: {\n style: {\n color: 'windowText'\n }\n }\n },\n yAxis: {\n gridLineColor: 'windowText',\n labels: {\n style: {\n color: 'windowText'\n }\n },\n lineColor: 'windowText',\n minorGridLineColor: 'windowText',\n tickColor: 'windowText',\n title: {\n style: {\n color: 'windowText'\n }\n }\n },\n tooltip: {\n backgroundColor: 'window',\n borderColor: 'windowText',\n style: {\n color: 'windowText'\n }\n },\n plotOptions: {\n series: {\n lineColor: 'windowText',\n fillColor: 'window',\n borderColor: 'windowText',\n edgeColor: 'windowText',\n borderWidth: 1,\n dataLabels: {\n connectorColor: 'windowText',\n color: 'windowText',\n style: {\n color: 'windowText',\n textOutline: 'none'\n }\n },\n marker: {\n lineColor: 'windowText',\n fillColor: 'windowText'\n }\n },\n pie: {\n color: 'window',\n colors: ['window'],\n borderColor: 'windowText',\n borderWidth: 1\n },\n boxplot: {\n fillColor: 'window'\n },\n candlestick: {\n lineColor: 'windowText',\n fillColor: 'window'\n },\n errorbar: {\n fillColor: 'window'\n }\n },\n legend: {\n backgroundColor: 'window',\n itemStyle: {\n color: 'windowText'\n },\n itemHoverStyle: {\n color: 'windowText'\n },\n itemHiddenStyle: {\n color: '#555'\n },\n title: {\n style: {\n color: 'windowText'\n }\n }\n },\n credits: {\n style: {\n color: 'windowText'\n }\n },\n drilldown: {\n activeAxisLabelStyle: {\n color: 'windowText'\n },\n activeDataLabelStyle: {\n color: 'windowText'\n }\n },\n navigation: {\n buttonOptions: {\n symbolStroke: 'windowText',\n theme: {\n fill: 'window'\n }\n }\n },\n rangeSelector: {\n buttonTheme: {\n fill: 'window',\n stroke: 'windowText',\n style: {\n color: 'windowText'\n },\n states: {\n hover: {\n fill: 'window',\n stroke: 'windowText',\n style: {\n color: 'windowText'\n }\n },\n select: {\n fill: '#444',\n stroke: 'windowText',\n style: {\n color: 'windowText'\n }\n }\n }\n },\n inputBoxBorderColor: 'windowText',\n inputStyle: {\n backgroundColor: 'window',\n color: 'windowText'\n },\n labelStyle: {\n color: 'windowText'\n }\n },\n navigator: {\n handles: {\n backgroundColor: 'window',\n borderColor: 'windowText'\n },\n outlineColor: 'windowText',\n maskFill: 'transparent',\n series: {\n color: 'windowText',\n lineColor: 'windowText'\n },\n xAxis: {\n gridLineColor: 'windowText'\n }\n },\n scrollbar: {\n barBackgroundColor: '#444',\n barBorderColor: 'windowText',\n buttonArrowColor: 'windowText',\n buttonBackgroundColor: 'window',\n buttonBorderColor: 'windowText',\n rifleColor: 'windowText',\n trackBackgroundColor: 'window',\n trackBorderColor: 'windowText'\n }\n};\n/* *\n *\n * Default Export\n *\n * */\nexport default theme;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Default options for accessibility.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\n/* *\n *\n * API Options\n *\n * */\n/**\n * Formatter callback for the accessibility announcement.\n *\n * @callback Highcharts.AccessibilityAnnouncementFormatter\n *\n * @param {Array<Highcharts.Series>} updatedSeries\n * Array of all series that received updates. If an announcement is already\n * queued, the series that received updates for that announcement are also\n * included in this array.\n *\n * @param {Highcharts.Series} [addedSeries]\n * This is provided if {@link Highcharts.Chart#addSeries} was called, and there\n * is a new series. In that case, this argument is a reference to the new\n * series.\n *\n * @param {Highcharts.Point} [addedPoint]\n * This is provided if {@link Highcharts.Series#addPoint} was called, and there\n * is a new point. In that case, this argument is a reference to the new point.\n *\n * @return {false|string}\n * The function should return a string with the text to announce to the user.\n * Return empty string to not announce anything. Return `false` to use the\n * default announcement format.\n */\n/**\n * @interface Highcharts.PointAccessibilityOptionsObject\n */ /**\n* Provide a description of the data point, announced to screen readers.\n* @name Highcharts.PointAccessibilityOptionsObject#description\n* @type {string|undefined}\n* @requires modules/accessibility\n* @since 7.1.0\n*/ /**\n* Enable or disable exposing the point to assistive technology\n* @name Highcharts.PointAccessibilityOptionsObject#enabled\n* @type {boolean|undefined}\n* @requires modules/accessibility\n* @since 9.0.1\n*/\n/* *\n * @interface Highcharts.PointOptionsObject in parts/Point.ts\n */ /**\n* @name Highcharts.PointOptionsObject#accessibility\n* @type {Highcharts.PointAccessibilityOptionsObject|undefined}\n* @requires modules/accessibility\n* @since 7.1.0\n*/\n/**\n * @callback Highcharts.ScreenReaderClickCallbackFunction\n *\n * @param {global.MouseEvent} evt\n * Mouse click event\n *\n * @param {Highcharts.Chart} [chart]\n * Chart context.\n *\n * @param {global.GlobalEventHandlers} [ctx]\n * Since v12.6.0, the global event handlers context passed as an extra\n * argument for arrow functions.\n *\n * @return {void}\n */\n/**\n * Creates a formatted string for the screen reader module.\n *\n * @callback Highcharts.ScreenReaderFormatterCallbackFunction<T>\n *\n * @param {T} context\n * Context to format\n *\n * @param {*} [outerContext]\n * Since v12.6.0, the outer context passed as an extra argument for\n * arrow functions.\n *\n * @return {string}\n * Formatted string for the screen reader module.\n */\nconst Options = {\n /**\n * Options for configuring accessibility for the chart. Requires the\n * [accessibility module](https://code.highcharts.com/modules/accessibility.js)\n * to be loaded. For a description of the module and information\n * on its features, see\n * [Highcharts Accessibility](https://www.highcharts.com/docs/accessibility/accessibility-module).\n *\n * @since 5.0.0\n * @requires modules/accessibility\n * @optionparent accessibility\n */\n accessibility: {\n /**\n * Enable accessibility functionality for the chart. For more\n * information on how to include these features, and why this is\n * recommended, see [Highcharts Accessibility](https://www.highcharts.com/docs/accessibility/accessibility-module).\n *\n * Highcharts will by default emit a warning to the console if\n * the [accessibility module](https://code.highcharts.com/modules/accessibility.js)\n * is not loaded. Setting this option to `false` will override\n * and silence the warning.\n *\n * Once the module is loaded, setting this option to `false`\n * will disable the module for this chart.\n *\n * @since 5.0.0\n */\n enabled: true,\n /**\n * Accessibility options for the screen reader information sections\n * added before and after the chart.\n *\n * @since 8.0.0\n */\n screenReaderSection: {\n /**\n * Function to run upon clicking the \"View as Data Table\" link in\n * the screen reader region.\n *\n * By default Highcharts will insert and set focus to a data table\n * representation of the chart.\n *\n * @type {Highcharts.ScreenReaderClickCallbackFunction}\n * @since 8.0.0\n * @apioption accessibility.screenReaderSection.onViewDataTableClick\n */\n /**\n * Function to run upon clicking the \"Play as sound\" button in\n * the screen reader region.\n *\n * By default Highcharts will call the `chart.sonify` function.\n *\n * @type {Highcharts.ScreenReaderClickCallbackFunction}\n * @since 8.0.1\n * @apioption accessibility.screenReaderSection.onPlayAsSoundClick\n */\n /**\n * A formatter function to create the HTML contents of the hidden\n * screen reader information region before the chart. Receives one\n * argument, `chart`, referring to the chart object. Should return a\n * string with the HTML content of the region. By default this\n * returns an automatic description of the chart based on\n * [beforeChartFormat](#accessibility.screenReaderSection.beforeChartFormat).\n *\n * @type {Highcharts.ScreenReaderFormatterCallbackFunction<Highcharts.Chart>}\n * @since 8.0.0\n * @apioption accessibility.screenReaderSection.beforeChartFormatter\n */\n /**\n * Format for the screen reader information region before the chart.\n * Supported HTML tags are `<h1-6>`, `<p>`, `<div>`, `<a>`, `<ul>`,\n * `<ol>`, `<li>`, and `<button>`. Attributes are not supported,\n * except for id on `<div>`, `<a>`, and `<button>`. Id is required\n * on `<a>` and `<button>` in the format `<tag id=\"abcd\">`. Numbers,\n * lower- and uppercase letters, \"-\" and \"#\" are valid characters in\n * IDs.\n *\n * The headingTagName is an auto-detected heading (h1-h6) that\n * corresponds to the heading level below the previous heading in\n * the DOM.\n *\n * Set to empty string to remove the region altogether.\n *\n * @sample highcharts/accessibility/before-chart-format\n * beforeChartFormat\n *\n * @since 8.0.0\n */\n beforeChartFormat: '<{headingTagName}>{chartTitle}</{headingTagName}>' +\n '<div>{typeDescription}</div>' +\n '<div>{chartSubtitle}</div>' +\n '<div>{chartLongdesc}</div>' +\n '<div>{playAsSoundButton}</div>' +\n '<div>{viewTableButton}</div>' +\n '<div>{xAxisDescription}</div>' +\n '<div>{yAxisDescription}</div>' +\n '<div>{annotationsTitle}{annotationsList}</div>',\n /**\n * A formatter function to create the HTML contents of the hidden\n * screen reader information region after the chart. Analogous to\n * [beforeChartFormatter](#accessibility.screenReaderSection.beforeChartFormatter).\n *\n * @type {Highcharts.ScreenReaderFormatterCallbackFunction<Highcharts.Chart>}\n * @since 8.0.0\n * @apioption accessibility.screenReaderSection.afterChartFormatter\n */\n /**\n * Format for the screen reader information region after the chart.\n * Analogous to [beforeChartFormat](#accessibility.screenReaderSection.beforeChartFormat).\n *\n * @since 8.0.0\n */\n afterChartFormat: '{endOfChartMarker}',\n /**\n * Date format to use to describe range of datetime axes.\n *\n * For an overview of the replacement codes, see\n * [dateFormat](/class-reference/Highcharts.Time#dateFormat).\n *\n * @see [point.dateFormat](#accessibility.point.dateFormat)\n *\n * @since 8.0.0\n */\n axisRangeDateFormat: '%Y-%m-%d %H:%M:%S'\n },\n /**\n * Accessibility options global to all data series. Individual series\n * can also have specific [accessibility options](#plotOptions.series.accessibility)\n * set.\n *\n * @since 8.0.0\n */\n series: {\n /**\n * Formatter function to use instead of the default for series\n * descriptions. Receives one argument, `series`, referring to the\n * series to describe. Should return a string with the description\n * of the series for a screen reader user. If `false` is returned,\n * the default formatter will be used for that series.\n *\n * @see [series.descriptionFormat](#accessibility.series.descriptionFormat)\n * @see [series.description](#plotOptions.series.description)\n *\n * @type {Highcharts.ScreenReaderFormatterCallbackFunction<Highcharts.Series>}\n * @since 8.0.0\n * @apioption accessibility.series.descriptionFormatter\n */\n /**\n * Format to use for describing the data series group to assistive\n * technology - including screen readers.\n *\n * The series context and its subproperties are available under the\n * variable `{series}`, for example `{series.name}` for the series\n * name, and `{series.points.length}` for the number of data points.\n *\n * The chart context and its subproperties are available under the\n * variable `{chart}`, for example `{chart.series.length}` for the\n * number of series in the chart.\n *\n * `{seriesDescription}` refers to the automatic description of the\n * series type and number of points added by Highcharts by default.\n * `{authorDescription}` refers to the description added in\n * [series.description](#plotOptions.series.description) if one is\n * present. `{axisDescription}` refers to the description added if\n * the chart has multiple X or Y axes.\n *\n * Note that if [series.descriptionFormatter](#accessibility.series.descriptionFormatter)\n * is declared it will take precedence, and this option will be\n * overridden.\n *\n * @sample highcharts/accessibility/advanced-accessible\n * Accessible low-medium-high chart\n *\n * @type {string}\n * @since 10.1.0\n */\n descriptionFormat: '{seriesDescription}{authorDescription}{axisDescription}',\n /**\n * Whether or not to add series descriptions to charts with a single\n * series.\n *\n * @since 8.0.0\n */\n describeSingleSeries: false,\n /**\n * When a series contains more points than this, we no longer expose\n * information about individual points to screen readers.\n * Note that the keyboard navigation remains functional, but points\n * won't have accessible descriptions unless handled separately.\n *\n * Set to `false` to disable.\n *\n * @sample highcharts/accessibility/point-description-enabled-threshold\n * pointDescriptionEnabledThreshold\n *\n * @type {boolean|number}\n * @since 8.0.0\n */\n pointDescriptionEnabledThreshold: 200\n },\n /**\n * Options for descriptions of individual data points.\n *\n * @since 8.0.0\n */\n point: {\n /**\n * Date format to use for points on datetime axes when describing\n * them to screen reader users.\n *\n * Defaults to the same format as in tooltip.\n *\n * For an overview of the replacement codes, see\n * [dateFormat](/class-reference/Highcharts.Time#dateFormat).\n *\n * @see [dateFormatter](#accessibility.point.dateFormatter)\n *\n * @type {string}\n * @since 8.0.0\n * @apioption accessibility.point.dateFormat\n */\n /**\n * Formatter function to determine the date/time format used with\n * points on datetime axes when describing them to screen reader\n * users. Receives one argument, `point`, referring to the point\n * to describe. Should return a date format string compatible with\n * [dateFormat](/class-reference/Highcharts.Time#dateFormat).\n *\n * @see [dateFormat](#accessibility.point.dateFormat)\n *\n * @type {Highcharts.ScreenReaderFormatterCallbackFunction<Highcharts.Point>}\n * @since 8.0.0\n * @apioption accessibility.point.dateFormatter\n */\n /**\n * Prefix to add to the values in the point descriptions. Uses\n * [tooltip.valuePrefix](#tooltip.valuePrefix) if not defined.\n *\n * @type {string}\n * @since 8.0.0\n * @apioption accessibility.point.valuePrefix\n */\n /**\n * Suffix to add to the values in the point descriptions. Uses\n * [tooltip.valueSuffix](#tooltip.valueSuffix) if not defined.\n *\n * @type {string}\n * @since 8.0.0\n * @apioption accessibility.point.valueSuffix\n */\n /**\n * Decimals to use for the values in the point descriptions. Uses\n * [tooltip.valueDecimals](#tooltip.valueDecimals) if not defined.\n *\n * @type {number}\n * @since 8.0.0\n * @apioption accessibility.point.valueDecimals\n */\n /**\n * A [format string](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)\n * to use instead of the default for point descriptions.\n *\n * The context of the format string is the point instance.\n *\n * As opposed to [accessibility.point.valueDescriptionFormat](#accessibility.point.valueDescriptionFormat),\n * this option replaces the whole description.\n *\n * @type {string}\n * @since 11.1.0\n * @sample highcharts/demo/advanced-accessible\n * Description format\n * @apioption accessibility.point.descriptionFormat\n */\n /**\n * Formatter function to use instead of the default for point\n * descriptions.\n *\n * Receives one argument, `point`, referring to the point to\n * describe. Should return a string with the description of the\n * point for a screen reader user. If `false` is returned, the\n * default formatter will be used for that point.\n *\n * Note: Prefer using [accessibility.point.valueDescriptionFormat](#accessibility.point.valueDescriptionFormat)\n * instead if possible, as default functionality such as describing\n * annotations will be preserved.\n *\n * @see [accessibility.point.valueDescriptionFormat](#accessibility.point.valueDescriptionFormat)\n * @see [point.accessibility.description](#series.line.data.accessibility.description)\n *\n * @type {Highcharts.ScreenReaderFormatterCallbackFunction<Highcharts.Point>}\n * @since 8.0.0\n * @apioption accessibility.point.descriptionFormatter\n */\n /**\n * Format to use for describing the values of data points\n * to assistive technology - including screen readers.\n * The point context is available as `{point}`.\n *\n * Other available context variables include `{index}`, `{value}`, and `{xDescription}`.\n *\n * Additionally, the series name, annotation info, and\n * description added in `point.accessibility.description`\n * is added by default if relevant. To override this, use the\n * [accessibility.point.descriptionFormatter](#accessibility.point.descriptionFormatter)\n * option.\n *\n * @see [point.accessibility.description](#series.line.data.accessibility.description)\n * @see [accessibility.point.descriptionFormatter](#accessibility.point.descriptionFormatter)\n *\n * @type {string}\n * @since 8.0.1\n */\n valueDescriptionFormat: '{xDescription}{separator}{value}.',\n /**\n * Whether or not to describe points with the value `null` to\n * assistive technology, such as screen readers.\n *\n * @sample {highmaps} maps/demo/all-areas-as-null\n * Accessible map with null points\n *\n * @type {boolean}\n * @since 10.1.0\n */\n describeNull: true\n },\n /**\n * Amount of landmarks/regions to create for screen reader users. More\n * landmarks can make navigation with screen readers easier, but can\n * be distracting if there are lots of charts on the page. Three modes\n * are available:\n * - `all`: Adds regions for all series, legend, information\n * region.\n * - `one`: Adds a single landmark per chart.\n * - `disabled`: No landmarks are added.\n *\n * @since 7.1.0\n * @validvalue [\"all\", \"one\", \"disabled\"]\n */\n landmarkVerbosity: 'all',\n /**\n * Link the chart to an HTML element describing the contents of the\n * chart.\n *\n * It is always recommended to describe charts using visible text, to\n * improve SEO as well as accessibility for users with disabilities.\n * This option lets an HTML element with a description be linked to the\n * chart, so that screen reader users can connect the two.\n *\n * By setting this option to a string, Highcharts runs the string as an\n * HTML selector query on the entire document. If there is only a single\n * match, this element is linked to the chart. The content of the linked\n * element will be included in the chart description for screen reader\n * users.\n *\n * By default, the chart looks for an adjacent sibling element with the\n * `highcharts-description` class.\n *\n * The feature can be disabled by setting the option to an empty string,\n * or overridden by providing the\n * [accessibility.description](#accessibility.description) option.\n * Alternatively, the HTML element to link can be passed in directly as\n * an HTML node.\n *\n * If you need the description to be part of the exported image,\n * consider using the [caption](#caption) feature.\n *\n * If you need the description to be hidden visually, use the\n * [accessibility.description](#accessibility.description) option.\n *\n * @see [caption](#caption)\n * @see [description](#accessibility.description)\n * @see [typeDescription](#accessibility.typeDescription)\n *\n * @sample highcharts/accessibility/accessible-line\n * Accessible line chart\n *\n * @type {string|Highcharts.HTMLDOMElement}\n * @since 8.0.0\n */\n linkedDescription: '*[data-highcharts-chart=\"{index}\"] + .highcharts-description', // eslint-disable-line\n /**\n * A hook for adding custom components to the accessibility module.\n * Should be an object mapping component names to instances of classes\n * inheriting from the Highcharts.AccessibilityComponent base class.\n * Remember to add the component to the\n * [keyboardNavigation.order](#accessibility.keyboardNavigation.order)\n * for the keyboard navigation to be usable.\n *\n * @sample highcharts/accessibility/custom-component\n * Custom accessibility component\n *\n * @type {*}\n * @since 7.1.0\n * @apioption accessibility.customComponents\n */\n /**\n * Theme to apply to the chart when Windows High Contrast Mode is\n * detected. By default, a high contrast theme matching the high\n * contrast system colors is used.\n *\n * @type {*}\n * @since 7.1.3\n * @apioption accessibility.highContrastTheme\n */\n /**\n * Controls how [highContrastTheme](#accessibility.highContrastTheme)\n * is applied.\n *\n * The default option is `auto`, which applies the high contrast theme\n * the user's system has a high contrast theme active.\n *\n * @sample highcharts/accessibility/high-contrast-mode\n * High contrast mode enabled\n *\n * @since 11.4.0\n */\n highContrastMode: 'auto',\n /**\n * A text description of the chart.\n *\n * **Note: Prefer using [linkedDescription](#accessibility.linkedDescription)\n * or [caption](#caption.text) instead.**\n *\n * If the Accessibility module is loaded, this option is included by\n * default as a long description of the chart in the hidden screen\n * reader information region.\n *\n * Note: Since Highcharts now supports captions and linked descriptions,\n * it is preferred to define the description using those methods, as a\n * visible caption/description benefits all users. If the\n * `accessibility.description` option is defined, the linked description\n * is ignored, and the caption is hidden from screen reader users.\n *\n * @see [linkedDescription](#accessibility.linkedDescription)\n * @see [caption](#caption)\n * @see [typeDescription](#accessibility.typeDescription)\n *\n * @type {string}\n * @since 5.0.0\n * @apioption accessibility.description\n */\n /**\n * A text description of the chart type.\n *\n * If the Accessibility module is loaded, this will be included in the\n * description of the chart in the screen reader information region.\n *\n * Highcharts will by default attempt to guess the chart type, but for\n * more complex charts it is recommended to specify this property for\n * clarity.\n *\n * @type {string}\n * @since 5.0.0\n * @apioption accessibility.typeDescription\n */\n /**\n * Options for keyboard navigation.\n *\n * @declare Highcharts.KeyboardNavigationOptionsObject\n * @since 5.0.0\n */\n keyboardNavigation: {\n /**\n * Enable keyboard navigation for the chart.\n *\n * @since 5.0.0\n */\n enabled: true,\n /**\n * Options for the focus border drawn around elements while\n * navigating through them.\n *\n * @sample highcharts/accessibility/custom-focus\n * Custom focus ring\n *\n * @declare Highcharts.KeyboardNavigationFocusBorderOptionsObject\n * @since 6.0.3\n */\n focusBorder: {\n /**\n * Enable/disable focus border for chart.\n *\n * @since 6.0.3\n */\n enabled: true,\n /**\n * Hide the browser's default focus indicator.\n *\n * @since 6.0.4\n */\n hideBrowserFocusOutline: true,\n /**\n * Style options for the focus border drawn around elements\n * while navigating through them. Note that some browsers in\n * addition draw their own borders for focused elements. These\n * automatic borders cannot be styled by Highcharts.\n *\n * In styled mode, the border is given the\n * `.highcharts-focus-border` class.\n *\n * @type {Highcharts.CSSObject}\n * @since 6.0.3\n */\n style: {\n /**\n * @type {Highcharts.ColorType}\n */\n color: 'var(--highcharts-highlight-color-80)',\n lineWidth: 2,\n borderRadius: 3\n },\n /**\n * Focus border margin around the elements.\n *\n * @since 6.0.3\n */\n margin: 2\n },\n /**\n * Order of tab navigation in the chart. Determines which elements\n * are tabbed to first. Available elements are: `series`, `zoom`,\n * `rangeSelector`, `navigator`, `chartMenu`, `legend` and `container`.\n * In addition, any custom components can be added here. Adding\n * `container` first in order will make the keyboard focus stop on\n * the chart container first, requiring the user to tab again to\n * enter the chart.\n *\n * @sample highcharts/accessibility/custom-component\n * Custom order is set\n *\n * @type {Array<string>}\n * @since 7.1.0\n */\n order: [\n 'series', 'zoom', 'rangeSelector',\n 'navigator', 'legend', 'chartMenu'\n ],\n /**\n * Whether or not to wrap around when reaching the end of arrow-key\n * navigation for an element in the chart.\n * @since 7.1.0\n */\n wrapAround: true,\n /**\n * Options for the keyboard navigation of data points and series.\n *\n * @declare Highcharts.KeyboardNavigationSeriesNavigationOptionsObject\n * @since 8.0.0\n */\n seriesNavigation: {\n /**\n * Set the keyboard navigation mode for the chart. Can be\n * \"normal\" or \"serialize\". In normal mode, left/right arrow\n * keys move between points in a series, while up/down arrow\n * keys move between series. Up/down navigation acts\n * intelligently to figure out which series makes sense to move\n * to from any given point.\n *\n * In \"serialize\" mode, points are instead navigated as a single\n * list. Left/right behaves as in \"normal\" mode. Up/down arrow\n * keys will behave like left/right. This can be useful for\n * unifying navigation behavior with/without screen readers\n * enabled.\n *\n * @type {string}\n * @default normal\n * @since 8.0.0\n * @validvalue [\"normal\", \"serialize\"]\n * @apioption accessibility.keyboardNavigation.seriesNavigation.mode\n */\n /**\n * Skip null points when navigating through points with the\n * keyboard. By default this is the opposite of\n * [series.nullInteraction](https://api.highcharts.com/highcharts/plotOptions.series.nullInteraction).\n *\n * @since 8.0.0\n */\n skipNullPoints: void 0,\n /**\n * When a series contains more points than this, we no longer\n * allow keyboard navigation for it.\n *\n * Set to `false` to disable.\n *\n * @type {boolean|number}\n * @since 8.0.0\n */\n pointNavigationEnabledThreshold: false,\n /**\n * Remember which point was focused even after navigating away\n * from the series, so that when navigating back to the series\n * you start at the last focused point.\n *\n * @type {boolean}\n * @since 10.1.0\n */\n rememberPointFocus: false\n }\n },\n /**\n * Options for announcing new data to screen reader users. Useful\n * for dynamic data applications and drilldown.\n *\n * Keep in mind that frequent announcements will not be useful to\n * users, as they won't have time to explore the new data. For these\n * applications, consider making snapshots of the data accessible, and\n * do the announcements in batches.\n *\n * @declare Highcharts.AccessibilityAnnounceNewDataOptionsObject\n * @since 7.1.0\n */\n announceNewData: {\n /**\n * Optional formatter callback for the announcement. Receives\n * up to three arguments. The first argument is always an array\n * of all series that received updates. If an announcement is\n * already queued, the series that received updates for that\n * announcement are also included in this array. The second\n * argument is provided if `chart.addSeries` was called, and\n * there is a new series. In that case, this argument is a\n * reference to the new series. The third argument, similarly,\n * is provided if `series.addPoint` was called, and there is a\n * new point. In that case, this argument is a reference to the\n * new point.\n *\n * The function should return a string with the text to announce\n * to the user. Return empty string to not announce anything.\n * Return `false` to use the default announcement format.\n *\n * @sample highcharts/accessibility/custom-dynamic\n * High priority live alerts\n *\n * @type {Highcharts.AccessibilityAnnouncementFormatter}\n * @apioption accessibility.announceNewData.announcementFormatter\n */\n /**\n * Enable announcing new data to screen reader users\n * @sample highcharts/accessibility/accessible-dynamic\n * Dynamic data accessible\n */\n enabled: false,\n /**\n * Minimum interval between announcements in milliseconds. If\n * new data arrives before this amount of time has passed, it is\n * queued for announcement. If another new data event happens\n * while an announcement is queued, the queued announcement is\n * dropped, and the latest announcement is queued instead. Set\n * to 0 to allow all announcements, but be warned that frequent\n * announcements are disturbing to users.\n */\n minAnnounceInterval: 5000,\n /**\n * Choose whether or not the announcements should interrupt the\n * screen reader. If not enabled, the user will be notified once\n * idle. It is recommended not to enable this setting unless\n * there is a specific reason to do so.\n */\n interruptUser: false\n }\n },\n /**\n * Accessibility options for a data point.\n *\n * @declare Highcharts.PointAccessibilityOptionsObject\n * @since 7.1.0\n * @apioption series.line.data.accessibility\n */\n /**\n * Provide a description of the data point, announced to screen readers.\n *\n * @type {string}\n * @since 7.1.0\n * @apioption series.line.data.accessibility.description\n */\n /**\n * Set to false to disable accessibility functionality for a specific point.\n * The point will not be included in keyboard navigation, and will not be\n * exposed to assistive technology.\n *\n * @type {boolean}\n * @since 9.0.1\n * @apioption series.line.data.accessibility.enabled\n */\n /**\n * Accessibility options for a series.\n *\n * @declare Highcharts.SeriesAccessibilityOptionsObject\n * @since 7.1.0\n * @requires modules/accessibility\n * @apioption plotOptions.series.accessibility\n */\n /**\n * Enable/disable accessibility functionality for a specific series.\n *\n * @type {boolean}\n * @since 7.1.0\n * @apioption plotOptions.series.accessibility.enabled\n */\n /**\n * Provide a description of the series, announced to screen readers.\n *\n * @type {string}\n * @since 7.1.0\n * @apioption plotOptions.series.accessibility.description\n */\n /**\n * Format to use for describing the data series group to assistive\n * technology - including screen readers.\n *\n * @see [series.descriptionFormat](#accessibility.series.descriptionFormat)\n * @type {string}\n * @since 11.0.0\n * @apioption plotOptions.series.accessibility.descriptionFormat\n */\n /**\n * Expose only the series element to screen readers, not its points.\n *\n * @type {boolean}\n * @since 7.1.0\n * @apioption plotOptions.series.accessibility.exposeAsGroupOnly\n */\n /**\n * Point accessibility options for a series.\n *\n * @extends accessibility.point\n * @since 9.3.0\n * @requires modules/accessibility\n * @apioption plotOptions.series.accessibility.point\n */\n /**\n * Formatter function to use instead of the default for point\n * descriptions. Same as `accessibility.point.descriptionFormatter`, but\n * applies to a series instead of the whole chart.\n *\n * Note: Prefer using [accessibility.point.valueDescriptionFormat](#plotOptions.series.accessibility.point.valueDescriptionFormat)\n * instead if possible, as default functionality such as describing\n * annotations will be preserved.\n *\n * @see [accessibility.point.valueDescriptionFormat](#plotOptions.series.accessibility.point.valueDescriptionFormat)\n * @see [point.accessibility.description](#series.line.data.accessibility.description)\n * @see [accessibility.point.descriptionFormatter](#accessibility.point.descriptionFormatter)\n *\n * @type {Highcharts.ScreenReaderFormatterCallbackFunction<Highcharts.Point>}\n * @since 9.3.0\n * @apioption plotOptions.series.accessibility.point.descriptionFormatter\n */\n /**\n * Keyboard navigation for a series\n *\n * @declare Highcharts.SeriesAccessibilityKeyboardNavigationOptionsObject\n * @since 7.1.0\n * @apioption plotOptions.series.accessibility.keyboardNavigation\n */\n /**\n * Enable/disable keyboard navigation support for a specific series.\n *\n * @type {boolean}\n * @since 7.1.0\n * @apioption plotOptions.series.accessibility.keyboardNavigation.enabled\n */\n /**\n * Accessibility options for an annotation label.\n *\n * @declare Highcharts.AnnotationLabelAccessibilityOptionsObject\n * @since 8.0.1\n * @requires modules/accessibility\n * @apioption annotations.labelOptions.accessibility\n */\n /**\n * Description of an annotation label for screen readers and other assistive\n * technology.\n *\n * @type {string}\n * @since 8.0.1\n * @apioption annotations.labelOptions.accessibility.description\n */\n /**\n * Accessibility options for an axis. Requires the accessibility module.\n *\n * @declare Highcharts.AxisAccessibilityOptionsObject\n * @since 7.1.0\n * @requires modules/accessibility\n * @apioption xAxis.accessibility\n */\n /**\n * Enable axis accessibility features, including axis information in the\n * screen reader information region. If this is disabled on the xAxis, the\n * x values are not exposed to screen readers for the individual data points\n * by default.\n *\n * @type {boolean}\n * @since 7.1.0\n * @apioption xAxis.accessibility.enabled\n */\n /**\n * Description for an axis to expose to screen reader users.\n *\n * @type {string}\n * @since 7.1.0\n * @apioption xAxis.accessibility.description\n */\n /**\n * Range description for an axis. Overrides the default range description.\n * Set to empty to disable range description for this axis.\n *\n * @type {string}\n * @since 7.1.0\n * @apioption xAxis.accessibility.rangeDescription\n */\n /**\n * @optionparent legend\n */\n legend: {\n /**\n * Accessibility options for the legend. Requires the Accessibility\n * module.\n *\n * @since 7.1.0\n * @requires modules/accessibility\n */\n accessibility: {\n /**\n * Enable accessibility support for the legend.\n *\n * @since 7.1.0\n */\n enabled: true,\n /**\n * Options for keyboard navigation for the legend.\n *\n * @since 7.1.0\n * @requires modules/accessibility\n */\n keyboardNavigation: {\n /**\n * Enable keyboard navigation for the legend.\n *\n * @see [accessibility.keyboardNavigation](#accessibility.keyboardNavigation.enabled)\n *\n * @since 7.1.0\n */\n enabled: true\n }\n }\n },\n /**\n * @optionparent exporting\n */\n exporting: {\n /**\n * Accessibility options for the exporting menu. Requires the\n * Accessibility module.\n *\n * @since 7.1.0\n * @requires modules/accessibility\n */\n accessibility: {\n /**\n * Enable accessibility support for the export menu.\n *\n * @since 7.1.0\n */\n enabled: true\n }\n },\n /**\n * @optionparent navigator\n */\n navigator: {\n /**\n * Accessibility options for the navigator. Requires the\n * Accessibility module.\n *\n * @since 11.2.0\n * @requires modules/accessibility\n */\n accessibility: {\n /**\n * Enable accessibility support for the navigator.\n *\n * @since 11.2.0\n */\n enabled: true\n }\n }\n};\nexport default Options;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Default lang/i18n options for accessibility.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\n/* *\n *\n * API Options\n *\n * */\nconst langOptions = {\n /**\n * Configure the accessibility strings in the chart. Requires the\n * [accessibility module](https://code.highcharts.com/modules/accessibility.js)\n * to be loaded. For a description of the module and information on its\n * features, see\n * [Highcharts Accessibility](https://www.highcharts.com/docs/chart-concepts/accessibility).\n *\n * The lang options use [Format Strings](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#format-strings)\n * with variables that are replaced at run time. These variables should be\n * used when available, to avoid duplicating text that is defined elsewhere.\n *\n * For more dynamic control over the accessibility functionality, see\n * [accessibility.point.descriptionFormatter](#accessibility.point.descriptionFormatter),\n * [accessibility.series.descriptionFormatter](#accessibility.series.descriptionFormatter),\n * and\n * [accessibility.screenReaderSection.beforeChartFormatter](#accessibility.screenReaderSection.beforeChartFormatter).\n *\n * @since 6.0.6\n * @optionparent lang.accessibility\n */\n accessibility: {\n /**\n * @deprecated 10.2.1\n * @type {string}\n * @apioption lang.accessibility.resetZoomButton\n */\n /**\n * Default title of the chart for assistive technology, for charts\n * without a chart title.\n */\n defaultChartTitle: 'Chart',\n /**\n * Accessible label for the chart container HTML element.\n * `{title}` refers to the chart title.\n */\n chartContainerLabel: '{title}. Highcharts interactive chart.',\n /**\n * Accessible label for the chart SVG element.\n * `{chartTitle}` refers to the chart title.\n */\n svgContainerLabel: 'Interactive chart',\n /**\n * Accessible label for the drill-up button.\n * `{buttonText}` refers to the visual text on the button.\n */\n drillUpButton: '{buttonText}',\n /**\n * Accessible label for the chart credits.\n * `{creditsStr}` refers to the visual text in the credits.\n */\n credits: 'Chart credits: {creditsStr}',\n /**\n * Thousands separator to use when formatting numbers for screen\n * readers. Note that many screen readers will not handle space as a\n * thousands separator, and will consider \"11 700\" as two numbers.\n *\n * Set to `null` to use the separator defined in\n * [lang.thousandsSep](lang.thousandsSep).\n *\n * @since 7.1.0\n */\n thousandsSep: ',',\n /**\n * Title element text for the chart SVG element. Leave this\n * empty to disable adding the title element. Browsers will display\n * this content when hovering over elements in the chart. Assistive\n * technology may use this element to label the chart.\n *\n * @since 6.0.8\n */\n svgContainerTitle: '',\n /**\n * Set a label on the container wrapping the SVG.\n *\n * @see [chartContainerLabel](#lang.accessibility.chartContainerLabel)\n *\n * @since 8.0.0\n */\n graphicContainerLabel: '',\n /**\n * Language options for the screen reader information sections added\n * before and after the charts.\n *\n * @since 8.0.0\n */\n screenReaderSection: {\n beforeRegionLabel: '',\n afterRegionLabel: '',\n /**\n * Language options for annotation descriptions.\n *\n * @since 8.0.1\n */\n annotations: {\n heading: 'Chart annotations summary',\n descriptionSinglePoint: ('{annotationText}. Related to {annotationPoint}'),\n descriptionMultiplePoints: ('{annotationText}. Related to {annotationPoint}' +\n '{#each additionalAnnotationPoints}' +\n ', also related to {this}' +\n '{/each}'),\n descriptionNoPoints: '{annotationText}'\n },\n /**\n * Label for the end of the chart. Announced by screen readers.\n *\n * @since 8.0.0\n */\n endOfChartMarker: 'End of interactive chart.'\n },\n /**\n * Language options for sonification.\n *\n * @since 8.0.1\n */\n sonification: {\n playAsSoundButtonText: 'Play as sound, {chartTitle}',\n playAsSoundClickAnnouncement: 'Play'\n },\n /**\n * Language options for accessibility of the legend.\n *\n * @since 8.0.0\n */\n legend: {\n /**\n * Accessible label for the legend, for charts where there is no\n * legend title defined.\n */\n legendLabelNoTitle: 'Toggle series visibility, {chartTitle}',\n /**\n * Accessible label for the legend, for charts where there is a\n * legend title defined. `{legendTitle}` refers to the visual text\n * in the legend title.\n */\n legendLabel: 'Chart legend: {legendTitle}',\n /**\n * Accessible label for individual legend items. `{itemName}` refers\n * to the visual text in the legend for that item.\n */\n legendItem: 'Show {itemName}'\n },\n /**\n * Chart and map zoom accessibility language options.\n *\n * @since 8.0.0\n */\n zoom: {\n mapZoomIn: 'Zoom chart',\n mapZoomOut: 'Zoom out chart',\n resetZoomButton: 'Reset zoom'\n },\n /**\n * Range selector language options for accessibility.\n *\n * @since 8.0.0\n */\n rangeSelector: {\n dropdownLabel: '{rangeTitle}',\n minInputLabel: 'Select start date.',\n maxInputLabel: 'Select end date.',\n clickButtonAnnouncement: 'Viewing {axisRangeDescription}'\n },\n /**\n * Navigator language options for accessibility.\n *\n * @since 11.2.0\n */\n navigator: {\n /**\n * Label for the navigator handles.\n *\n * Receives `handleIx` and `chart` as context.\n * `handleIx` refers to the index of the navigator handle.\n */\n handleLabel: '{#eq handleIx 0}Start, percent{else}End, percent{/eq}',\n /**\n * Label for the navigator region.\n *\n * Receives `chart` as context.\n */\n groupLabel: 'Axis zoom',\n /**\n * Announcement for assistive technology when navigator values\n * are changed.\n *\n * Receives `axisRangeDescription` and `chart` as context.\n * `axisRangeDescription` corresponds to the range description\n * defined in [lang.accessibility.axis](#lang.accessibility.axis)\n */\n changeAnnouncement: '{axisRangeDescription}'\n },\n /**\n * Stock tools language options for accessibility.\n *\n * @since 12.6.0\n */\n stockTools: {\n groupLabel: 'Stock chart tools',\n arrowLabel: 'Toggle submenu'\n },\n /**\n * Accessibility language options for the data table.\n *\n * @since 8.0.0\n */\n table: {\n viewAsDataTableButtonText: 'View as data table, {chartTitle}',\n tableSummary: 'Table representation of chart.'\n },\n /**\n * Default announcement for new data in charts. If addPoint or\n * addSeries is used, and only one series/point is added, the\n * `newPointAnnounce` and `newSeriesAnnounce` strings are used.\n * The `...Single` versions will be used if there is only one chart\n * on the page, and the `...Multiple` versions will be used if there\n * are multiple charts on the page. For all other new data events,\n * the `newDataAnnounce` string will be used.\n *\n * @since 7.1.0\n */\n announceNewData: {\n newDataAnnounce: 'Updated data for chart {chartTitle}',\n newSeriesAnnounceSingle: 'New data series: {seriesDesc}',\n newPointAnnounceSingle: 'New data point: {pointDesc}',\n newSeriesAnnounceMultiple: 'New data series in chart {chartTitle}: {seriesDesc}',\n newPointAnnounceMultiple: 'New data point in chart {chartTitle}: {pointDesc}'\n },\n /**\n * Descriptions of lesser known series types. The relevant\n * description is added to the screen reader information region\n * when these series types are used.\n *\n * @since 6.0.6\n */\n seriesTypeDescriptions: {\n boxplot: 'Box plot charts are typically used to display ' +\n 'groups of statistical data. Each data point in the ' +\n 'chart can have up to 5 values: minimum, lower quartile, ' +\n 'median, upper quartile, and maximum.',\n arearange: 'Arearange charts are line charts displaying a ' +\n 'range between a lower and higher value for each point.',\n areasplinerange: 'These charts are line charts displaying a ' +\n 'range between a lower and higher value for each point.',\n bubble: 'Bubble charts are scatter charts where each data ' +\n 'point also has a size value.',\n columnrange: 'Columnrange charts are column charts ' +\n 'displaying a range between a lower and higher value for ' +\n 'each point.',\n errorbar: 'Errorbar series are used to display the ' +\n 'variability of the data.',\n funnel: 'Funnel charts are used to display reduction of data ' +\n 'in stages.',\n pyramid: 'Pyramid charts consist of a single pyramid with ' +\n 'item heights corresponding to each point value.',\n waterfall: 'A waterfall chart is a column chart where each ' +\n 'column contributes towards a total end value.'\n },\n /**\n * Chart type description strings. This is added to the chart\n * information region.\n *\n * If there is only a single series type used in the chart, we use\n * the format string for the series type, or default if missing.\n * There is one format string for cases where there is only a single\n * series in the chart, and one for multiple series of the same\n * type.\n *\n * @since 6.0.6\n */\n chartTypes: {\n /* eslint-disable max-len */\n emptyChart: 'Empty chart',\n mapTypeDescription: 'Map of {mapTitle} with {numSeries} data series.',\n unknownMap: 'Map of unspecified region with {numSeries} data series.',\n combinationChart: 'Combination chart with {numSeries} data series.',\n defaultSingle: 'Chart with {numPoints} data ' +\n '{#eq numPoints 1}point{else}points{/eq}.',\n defaultMultiple: 'Chart with {numSeries} data series.',\n splineSingle: 'Line chart with {numPoints} data ' +\n '{#eq numPoints 1}point{else}points{/eq}.',\n splineMultiple: 'Line chart with {numSeries} lines.',\n lineSingle: 'Line chart with {numPoints} data ' +\n '{#eq numPoints 1}point{else}points{/eq}.',\n lineMultiple: 'Line chart with {numSeries} lines.',\n columnSingle: 'Bar chart with {numPoints} ' +\n '{#eq numPoints 1}bar{else}bars{/eq}.',\n columnMultiple: 'Bar chart with {numSeries} data series.',\n barSingle: 'Bar chart with {numPoints} ' +\n '{#eq numPoints 1}bar{else}bars{/eq}.',\n barMultiple: 'Bar chart with {numSeries} data series.',\n pieSingle: 'Pie chart with {numPoints} ' +\n '{#eq numPoints 1}slice{else}slices{/eq}.',\n pieMultiple: 'Pie chart with {numSeries} pies.',\n scatterSingle: 'Scatter chart with {numPoints} ' +\n '{#eq numPoints 1}point{else}points{/eq}.',\n scatterMultiple: 'Scatter chart with {numSeries} data series.',\n boxplotSingle: 'Boxplot with {numPoints} ' +\n '{#eq numPoints 1}box{else}boxes{/eq}.',\n boxplotMultiple: 'Boxplot with {numSeries} data series.',\n bubbleSingle: 'Bubble chart with {numPoints} ' +\n '{#eq numPoints 1}bubbles{else}bubble{/eq}.',\n bubbleMultiple: 'Bubble chart with {numSeries} data series.'\n }, /* eslint-enable max-len */\n /**\n * Axis description format strings.\n *\n * @since 6.0.6\n */\n axis: {\n /* eslint-disable max-len */\n xAxisDescriptionSingular: 'The chart has 1 X axis displaying {names[0]}. {ranges[0]}',\n xAxisDescriptionPlural: 'The chart has {numAxes} X axes displaying {#each names}{#unless @first},{/unless}{#if @last} and{/if} {this}{/each}.',\n yAxisDescriptionSingular: 'The chart has 1 Y axis displaying {names[0]}. {ranges[0]}',\n yAxisDescriptionPlural: 'The chart has {numAxes} Y axes displaying {#each names}{#unless @first},{/unless}{#if @last} and{/if} {this}{/each}.',\n timeRangeDays: 'Data range: {range} days.',\n timeRangeHours: 'Data range: {range} hours.',\n timeRangeMinutes: 'Data range: {range} minutes.',\n timeRangeSeconds: 'Data range: {range} seconds.',\n rangeFromTo: 'Data ranges from {rangeFrom} to {rangeTo}.',\n rangeCategories: 'Data range: {numCategories} categories.',\n defaultAxisNames: {\n categories: 'categories',\n time: 'Time',\n values: 'values'\n }\n }, /* eslint-enable max-len */\n /**\n * Exporting menu format strings for accessibility module.\n *\n * @since 6.0.6\n */\n exporting: {\n chartMenuLabel: 'Chart menu',\n menuButtonLabel: 'View chart context menu, {chartTitle}'\n },\n /**\n * Lang configuration for different series types. For more dynamic\n * control over the series element descriptions, see\n * [accessibility.seriesDescriptionFormatter](#accessibility.seriesDescriptionFormatter).\n *\n * @since 6.0.6\n */\n series: {\n /**\n * Lang configuration for the series main summary. Each series\n * type has two modes:\n *\n * 1. This series type is the only series type used in the\n * chart\n *\n * 2. This is a combination chart with multiple series types\n *\n * If a definition does not exist for the specific series type\n * and mode, the 'default' lang definitions are used.\n *\n * Chart and its subproperties can be accessed with the `{chart}` variable.\n * The series and its subproperties can be accessed with the `{series}` variable.\n *\n * The series index (starting from 1) can be accessed with the `{seriesNumber}` variable.\n *\n * @since 6.0.6\n */\n summary: {\n /* eslint-disable max-len */\n 'default': '{series.name}, series {seriesNumber} of {chart.series.length} with {series.points.length} data {#eq series.points.length 1}point{else}points{/eq}.',\n defaultCombination: '{series.name}, series {seriesNumber} of {chart.series.length} with {series.points.length} data {#eq series.points.length 1}point{else}points{/eq}.',\n line: '{series.name}, line {seriesNumber} of {chart.series.length} with {series.points.length} data {#eq series.points.length 1}point{else}points{/eq}.',\n lineCombination: '{series.name}, series {seriesNumber} of {chart.series.length}. Line with {series.points.length} data {#eq series.points.length 1}point{else}points{/eq}.',\n spline: '{series.name}, line {seriesNumber} of {chart.series.length} with {series.points.length} data {#eq series.points.length 1}point{else}points{/eq}.',\n splineCombination: '{series.name}, series {seriesNumber} of {chart.series.length}. Line with {series.points.length} data {#eq series.points.length 1}point{else}points{/eq}.',\n column: '{series.name}, bar series {seriesNumber} of {chart.series.length} with {series.points.length} {#eq series.points.length 1}bar{else}bars{/eq}.',\n columnCombination: '{series.name}, series {seriesNumber} of {chart.series.length}. Bar series with {series.points.length} {#eq series.points.length 1}bar{else}bars{/eq}.',\n bar: '{series.name}, bar series {seriesNumber} of {chart.series.length} with {series.points.length} {#eq series.points.length 1}bar{else}bars{/eq}.',\n barCombination: '{series.name}, series {seriesNumber} of {chart.series.length}. Bar series with {series.points.length} {#eq series.points.length 1}bar{else}bars{/eq}.',\n pie: '{series.name}, pie {seriesNumber} of {chart.series.length} with {series.points.length} {#eq series.points.length 1}slice{else}slices{/eq}.',\n pieCombination: '{series.name}, series {seriesNumber} of {chart.series.length}. Pie with {series.points.length} {#eq series.points.length 1}slice{else}slices{/eq}.',\n scatter: '{series.name}, scatter plot {seriesNumber} of {chart.series.length} with {series.points.length} {#eq series.points.length 1}point{else}points{/eq}.',\n scatterCombination: '{series.name}, series {seriesNumber} of {chart.series.length}, scatter plot with {series.points.length} {#eq series.points.length 1}point{else}points{/eq}.',\n boxplot: '{series.name}, boxplot {seriesNumber} of {chart.series.length} with {series.points.length} {#eq series.points.length 1}box{else}boxes{/eq}.',\n boxplotCombination: '{series.name}, series {seriesNumber} of {chart.series.length}. Boxplot with {series.points.length} {#eq series.points.length 1}box{else}boxes{/eq}.',\n bubble: '{series.name}, bubble series {seriesNumber} of {chart.series.length} with {series.points.length} {#eq series.points.length 1}bubble{else}bubbles{/eq}.',\n bubbleCombination: '{series.name}, series {seriesNumber} of {chart.series.length}. Bubble series with {series.points.length} {#eq series.points.length 1}bubble{else}bubbles{/eq}.',\n map: '{series.name}, map {seriesNumber} of {chart.series.length} with {series.points.length} {#eq series.points.length 1}area{else}areas{/eq}.',\n mapCombination: '{series.name}, series {seriesNumber} of {chart.series.length}. Map with {series.points.length} {#eq series.points.length 1}area{else}areas{/eq}.',\n mapline: '{series.name}, line {seriesNumber} of {chart.series.length} with {series.points.length} data {#eq series.points.length 1}point{else}points{/eq}.',\n maplineCombination: '{series.name}, series {seriesNumber} of {chart.series.length}. Line with {series.points.length} data {#eq series.points.length 1}point{else}points{/eq}.',\n mapbubble: '{series.name}, bubble series {seriesNumber} of {chart.series.length} with {series.points.length} {#eq series.points.length 1}bubble{else}bubbles{/eq}.',\n mapbubbleCombination: '{series.name}, series {seriesNumber} of {chart.series.length}. Bubble series with {series.points.length} {#eq series.points.length 1}bubble{else}bubbles{/eq}.'\n }, /* eslint-enable max-len */\n /**\n * User supplied description text. This is added in the point\n * comment description by default if present.\n *\n * `{description}` refers to the value given in\n * [point.accessibility.description](#series.line.data.accessibility.description).\n *\n * @since 6.0.6\n */\n description: '{description}',\n /**\n * X-axis description for series if there are multiple xAxes in\n * the chart.\n *\n * @since 6.0.6\n */\n xAxisDescription: 'X axis, {name}',\n /**\n * Y-axis description for series if there are multiple yAxes in\n * the chart.\n *\n * @since 6.0.6\n */\n yAxisDescription: 'Y axis, {name}',\n /**\n * Description for the value of null points.\n *\n * @since 8.0.0\n */\n nullPointValue: 'No value',\n /**\n * Description for annotations on a point, as it is made available\n * to assistive technology.\n *\n * @since 8.0.1\n */\n pointAnnotationsDescription: '{#each annotations}' +\n 'Annotation: {this}{/each}'\n }\n }\n};\n/* *\n *\n * Default Export\n *\n * */\nexport default langOptions;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Default options for accessibility.\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n/* eslint-disable max-len */\n/*\n * List of deprecated options:\n *\n * chart.description -> accessibility.description\n * chart.typeDescription -> accessibility.typeDescription\n * series.description -> series.accessibility.description\n * series.exposeElementToA11y -> series.accessibility.exposeAsGroupOnly\n * series.pointDescriptionFormat ->\n * series.accessibility.point.descriptionFormat\n * series.pointDescriptionFormatter ->\n * series.accessibility.pointDescriptionFormatter\n * series.accessibility.pointDescriptionFormatter ->\n * series.accessibility.point.descriptionFormatter\n * series.skipKeyboardNavigation ->\n * series.accessibility.keyboardNavigation.enabled\n * point.description -> point.accessibility.description !!!! WARNING: No longer deprecated and handled, removed for HC8.\n * axis.description -> axis.accessibility.description\n *\n * accessibility.pointDateFormat -> accessibility.point.dateFormat\n * accessibility.addTableShortcut -> Handled by screenReaderSection.beforeChartFormat\n * accessibility.pointDateFormatter -> accessibility.point.dateFormatter\n * accessibility.pointDescriptionFormatter -> accessibility.point.descriptionFormatter\n * accessibility.pointDescriptionThreshold -> accessibility.series.pointDescriptionEnabledThreshold\n * accessibility.pointNavigationThreshold -> accessibility.keyboardNavigation.seriesNavigation.pointNavigationEnabledThreshold\n * accessibility.pointValueDecimals -> accessibility.point.valueDecimals\n * accessibility.pointValuePrefix -> accessibility.point.valuePrefix\n * accessibility.pointValueSuffix -> accessibility.point.valueSuffix\n * accessibility.screenReaderSectionFormatter -> accessibility.screenReaderSection.beforeChartFormatter\n * accessibility.describeSingleSeries -> accessibility.series.describeSingleSeries\n * accessibility.seriesDescriptionFormatter -> accessibility.series.descriptionFormatter\n * accessibility.onTableAnchorClick -> accessibility.screenReaderSection.onViewDataTableClick\n * accessibility.axisRangeDateFormat -> accessibility.screenReaderSection.axisRangeDateFormat\n * accessibility.keyboardNavigation.skipNullPoints -> accessibility.keyboardNavigation.seriesNavigation.skipNullPoints\n * accessibility.keyboardNavigation.mode -> accessibility.keyboardNavigation.seriesNavigation.mode\n *\n * lang.accessibility.chartHeading -> no longer used, remove\n * lang.accessibility.legendItem -> lang.accessibility.legend.legendItem\n * lang.accessibility.legendLabel -> lang.accessibility.legend.legendLabel\n * lang.accessibility.mapZoomIn -> lang.accessibility.zoom.mapZoomIn\n * lang.accessibility.mapZoomOut -> lang.accessibility.zoom.mapZoomOut\n * lang.accessibility.resetZoomButton -> lang.accessibility.zoom.resetZoomButton\n * lang.accessibility.screenReaderRegionLabel -> lang.accessibility.screenReaderSection.beforeRegionLabel\n * lang.accessibility.rangeSelectorButton -> lang.accessibility.rangeSelector.buttonText\n * lang.accessibility.rangeSelectorMaxInput -> lang.accessibility.rangeSelector.maxInputLabel\n * lang.accessibility.rangeSelectorMinInput -> lang.accessibility.rangeSelector.minInputLabel\n * lang.accessibility.svgContainerEnd -> lang.accessibility.screenReaderSection.endOfChartMarker\n * lang.accessibility.viewAsDataTable -> lang.accessibility.table.viewAsDataTableButtonText\n * lang.accessibility.tableSummary -> lang.accessibility.table.tableSummary\n *\n */\n/* eslint-enable max-len */\n'use strict';\nimport { pick } from '../../Shared/Utilities.js';\nimport { error } from '../../Core/Utilities.js';\n/* *\n *\n * Functions\n *\n * */\n/**\n * Set a new option on a root prop, where the option is defined as an array of\n * suboptions.\n * @private\n * @param {Record<string, *>} root\n * @param {Array<string>} optionAsArray\n * @param {*} val\n * @return {void}\n */\nfunction traverseSetOption(root, optionAsArray, val) {\n let opt = root, prop, i = 0;\n for (; i < optionAsArray.length - 1; ++i) {\n prop = optionAsArray[i];\n opt = opt[prop] = pick(opt[prop], {});\n }\n opt[optionAsArray[optionAsArray.length - 1]] = val;\n}\n/**\n * If we have a clear root option node for old and new options and a mapping\n * between, we can use this generic function for the copy and warn logic.\n */\nfunction deprecateFromOptionsMap(chart, rootOldAsArray, rootNewAsArray, mapToNewOptions) {\n /**\n * @private\n */\n function getChildProp(root, propAsArray) {\n return propAsArray.reduce(function (acc, cur) {\n return acc[cur];\n }, root);\n }\n const rootOld = getChildProp(chart.options, rootOldAsArray), rootNew = getChildProp(chart.options, rootNewAsArray);\n Object.keys(mapToNewOptions).forEach(function (oldOptionKey) {\n const val = rootOld[oldOptionKey];\n if (typeof val !== 'undefined') {\n traverseSetOption(rootNew, mapToNewOptions[oldOptionKey], val);\n error(32, false, chart, {\n [rootOldAsArray.join('.') + '.' + oldOptionKey]: (rootNewAsArray.join('.') + '.' +\n mapToNewOptions[oldOptionKey].join('.'))\n });\n }\n });\n}\n/**\n * @private\n */\nfunction copyDeprecatedChartOptions(chart) {\n const chartOptions = chart.options.chart, a11yOptions = chart.options.accessibility || {};\n ['description', 'typeDescription'].forEach(function (prop) {\n if (chartOptions[prop]) {\n a11yOptions[prop] = chartOptions[prop];\n error(32, false, chart, { [`chart.${prop}`]: `use accessibility.${prop}` });\n }\n });\n}\n/**\n * @private\n */\nfunction copyDeprecatedAxisOptions(chart) {\n chart.axes.forEach(function (axis) {\n const opts = axis.options;\n if (opts && opts.description) {\n opts.accessibility = opts.accessibility || {};\n opts.accessibility.description = opts.description;\n error(32, false, chart, {\n 'axis.description': 'use axis.accessibility.description'\n });\n }\n });\n}\n/**\n * @private\n */\nfunction copyDeprecatedSeriesOptions(chart) {\n // Map of deprecated series options. New options are defined as\n // arrays of paths under series.options.\n const oldToNewSeriesOptions = {\n description: ['accessibility', 'description'],\n exposeElementToA11y: ['accessibility', 'exposeAsGroupOnly'],\n pointDescriptionFormat: [\n 'accessibility', 'point', 'descriptionFormat'\n ],\n pointDescriptionFormatter: [\n 'accessibility', 'point', 'descriptionFormatter'\n ],\n skipKeyboardNavigation: [\n 'accessibility', 'keyboardNavigation', 'enabled'\n ],\n 'accessibility.pointDescriptionFormatter': [\n 'accessibility', 'point', 'descriptionFormatter'\n ]\n };\n chart.series.forEach(function (series) {\n // Handle series wide options\n Object.keys(oldToNewSeriesOptions).forEach(function (oldOption) {\n let optionVal = series.options[oldOption];\n // Special case\n if (oldOption === 'accessibility.pointDescriptionFormatter') {\n optionVal = (series.options.accessibility &&\n series.options.accessibility\n .pointDescriptionFormatter);\n }\n if (typeof optionVal !== 'undefined') {\n // Set the new option\n traverseSetOption(series.options, oldToNewSeriesOptions[oldOption], \n // Note that skipKeyboardNavigation has inverted option\n // value, since we set enabled rather than disabled\n oldOption === 'skipKeyboardNavigation' ?\n !optionVal : optionVal);\n error(32, false, chart, {\n [`series.${oldOption}`]: ('series.' +\n oldToNewSeriesOptions[oldOption].join('.'))\n });\n }\n });\n });\n}\n/**\n * @private\n */\nfunction copyDeprecatedTopLevelAccessibilityOptions(chart) {\n deprecateFromOptionsMap(chart, ['accessibility'], ['accessibility'], {\n pointDateFormat: ['point', 'dateFormat'],\n pointDateFormatter: ['point', 'dateFormatter'],\n pointDescriptionFormatter: ['point', 'descriptionFormatter'],\n pointDescriptionThreshold: [\n 'series',\n 'pointDescriptionEnabledThreshold'\n ],\n pointNavigationThreshold: [\n 'keyboardNavigation', 'seriesNavigation',\n 'pointNavigationEnabledThreshold'\n ],\n pointValueDecimals: ['point', 'valueDecimals'],\n pointValuePrefix: ['point', 'valuePrefix'],\n pointValueSuffix: ['point', 'valueSuffix'],\n screenReaderSectionFormatter: [\n 'screenReaderSection',\n 'beforeChartFormatter'\n ],\n describeSingleSeries: ['series', 'describeSingleSeries'],\n seriesDescriptionFormatter: ['series', 'descriptionFormatter'],\n onTableAnchorClick: ['screenReaderSection', 'onViewDataTableClick'],\n axisRangeDateFormat: ['screenReaderSection', 'axisRangeDateFormat']\n });\n}\n/**\n * @private\n */\nfunction copyDeprecatedKeyboardNavigationOptions(chart) {\n deprecateFromOptionsMap(chart, ['accessibility', 'keyboardNavigation'], ['accessibility', 'keyboardNavigation', 'seriesNavigation'], {\n skipNullPoints: ['skipNullPoints'],\n mode: ['mode']\n });\n}\n/**\n * @private\n */\nfunction copyDeprecatedLangOptions(chart) {\n deprecateFromOptionsMap(chart, ['lang', 'accessibility'], ['lang', 'accessibility'], {\n legendItem: ['legend', 'legendItem'],\n legendLabel: ['legend', 'legendLabel'],\n mapZoomIn: ['zoom', 'mapZoomIn'],\n mapZoomOut: ['zoom', 'mapZoomOut'],\n resetZoomButton: ['zoom', 'resetZoomButton'],\n screenReaderRegionLabel: [\n 'screenReaderSection',\n 'beforeRegionLabel'\n ],\n rangeSelectorButton: ['rangeSelector', 'buttonText'],\n rangeSelectorMaxInput: ['rangeSelector', 'maxInputLabel'],\n rangeSelectorMinInput: ['rangeSelector', 'minInputLabel'],\n svgContainerEnd: ['screenReaderSection', 'endOfChartMarker'],\n viewAsDataTable: ['table', 'viewAsDataTableButtonText'],\n tableSummary: ['table', 'tableSummary']\n });\n}\n/**\n * Copy options that are deprecated over to new options. Logs warnings to\n * console if deprecated options are used.\n *\n * @private\n */\nfunction copyDeprecatedOptions(chart) {\n copyDeprecatedChartOptions(chart);\n copyDeprecatedAxisOptions(chart);\n if (chart.series) {\n copyDeprecatedSeriesOptions(chart);\n }\n copyDeprecatedTopLevelAccessibilityOptions(chart);\n copyDeprecatedKeyboardNavigationOptions(chart);\n copyDeprecatedLangOptions(chart);\n}\n/* *\n *\n * Default Export\n *\n * */\nexport default copyDeprecatedOptions;\n","/* *\n *\n * (c) 2009-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * Accessibility module for Highcharts\n *\n * Integration of this software requires a license.\n * - For commercial use, see www.highcharts.com/license\n * - For non-commercial, see www.highcharts.com/license-eula\n *\n *\n * */\n'use strict';\nimport D from '../Core/Defaults.js';\nconst { defaultOptions } = D;\nimport H from '../Core/Globals.js';\nconst { doc } = H;\nimport HU from './Utils/HTMLUtilities.js';\nconst { removeElement } = HU;\nimport A11yI18n from './A11yI18n.js';\nimport ContainerComponent from './Components/ContainerComponent.js';\nimport FocusBorderComposition from './FocusBorder.js';\nimport InfoRegionsComponent from './Components/InfoRegionsComponent.js';\nimport KeyboardNavigation from './KeyboardNavigation.js';\nimport LegendComponent from './Components/LegendComponent.js';\nimport MenuComponent from './Components/MenuComponent.js';\nimport NavigatorComponent from './Components/NavigatorComponent.js';\nimport NewDataAnnouncer from './Components/SeriesComponent/NewDataAnnouncer.js';\nimport ProxyProvider from './ProxyProvider.js';\nimport RangeSelectorComponent from './Components/RangeSelectorComponent.js';\nimport SeriesComponent from './Components/SeriesComponent/SeriesComponent.js';\nimport ZoomComponent from './Components/ZoomComponent.js';\nimport whcm from './HighContrastMode.js';\nimport highContrastTheme from './HighContrastTheme.js';\nimport defaultOptionsA11Y from './Options/A11yDefaults.js';\nimport defaultLangOptions from './Options/LangDefaults.js';\nimport copyDeprecatedOptions from './Options/DeprecatedOptions.js';\nimport { addEvent, extend, fireEvent, merge } from '../Shared/Utilities.js';\n/* *\n *\n * Class\n *\n * */\n/**\n * The Accessibility class\n *\n * @private\n * @requires modules/accessibility\n *\n * @class\n * @name Highcharts.Accessibility\n *\n * @param {Highcharts.Chart} chart\n * Chart object\n */\nclass Accessibility {\n /* *\n *\n * Constructor\n *\n * */\n constructor(chart) {\n this.init(chart);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Initialize the accessibility class\n * @private\n * @param {Highcharts.Chart} chart\n * Chart object\n */\n init(chart) {\n this.chart = chart;\n // Abort on old browsers\n if (!doc?.addEventListener) {\n this.zombie = true;\n this.components = {};\n chart.renderTo.setAttribute('aria-hidden', true);\n return;\n }\n // Copy over any deprecated options that are used. We could do this on\n // every update, but it is probably not needed.\n copyDeprecatedOptions(chart);\n this.proxyProvider = new ProxyProvider(this.chart);\n this.initComponents();\n this.keyboardNavigation = new KeyboardNavigation(chart, this.components);\n }\n /**\n * @private\n */\n initComponents() {\n const chart = this.chart;\n const proxyProvider = this.proxyProvider;\n const a11yOptions = chart.options.accessibility;\n this.components = {\n container: new ContainerComponent(),\n infoRegions: new InfoRegionsComponent(),\n legend: new LegendComponent(),\n chartMenu: new MenuComponent(),\n rangeSelector: new RangeSelectorComponent(),\n series: new SeriesComponent(),\n zoom: new ZoomComponent(),\n navigator: new NavigatorComponent()\n };\n if (a11yOptions.customComponents) {\n extend(this.components, a11yOptions.customComponents);\n }\n const components = this.components;\n this.getComponentOrder().forEach(function (componentName) {\n components[componentName].initBase(chart, proxyProvider);\n components[componentName].init();\n });\n }\n /**\n * Get order to update components in.\n * @private\n */\n getComponentOrder() {\n if (!this.components) {\n return []; // For zombie accessibility object on old browsers\n }\n if (!this.components.series) {\n return Object.keys(this.components);\n }\n const componentsExceptSeries = Object.keys(this.components)\n .filter((c) => c !== 'series');\n // Update series first, so that other components can read accessibility\n // info on points.\n return ['series'].concat(componentsExceptSeries);\n }\n /**\n * Update all components.\n */\n update() {\n const components = this.components, chart = this.chart, a11yOptions = chart.options.accessibility;\n fireEvent(chart, 'beforeA11yUpdate');\n // Update the chart type list as this is used by multiple modules\n chart.types = this.getChartTypes();\n // Update proxies. We don't update proxy positions since most likely we\n // need to recreate the proxies on update.\n const kbdNavOrder = a11yOptions.keyboardNavigation.order;\n this.proxyProvider.updateGroupOrder(kbdNavOrder);\n // Update markup\n this.getComponentOrder().forEach(function (componentName) {\n components[componentName].onChartUpdate();\n fireEvent(chart, 'afterA11yComponentUpdate', {\n name: componentName,\n component: components[componentName]\n });\n });\n // Update keyboard navigation\n this.keyboardNavigation.update(kbdNavOrder);\n // Handle high contrast mode\n // Reapply after updates while HC mode is active, but avoid recursion\n // while the theme itself is being applied through chart.update.\n if (!chart.highContrastState?.applying &&\n a11yOptions.highContrastMode !== false && (chart.highContrastState?.active ||\n whcm.isHighContrastModeActive() ||\n a11yOptions.highContrastMode === true)) {\n whcm.setHighContrastTheme(chart);\n }\n fireEvent(chart, 'afterA11yUpdate', {\n accessibility: this\n });\n }\n /**\n * Destroy all elements.\n */\n destroy() {\n const chart = this.chart || {};\n // Destroy components\n const components = this.components;\n Object.keys(components).forEach(function (componentName) {\n components[componentName].destroy();\n components[componentName].destroyBase();\n });\n // Destroy proxy provider\n if (this.proxyProvider) {\n this.proxyProvider.destroy();\n }\n // Remove announcer container\n if (chart.announcerContainer) {\n removeElement(chart.announcerContainer);\n }\n // Kill keyboard nav\n if (this.keyboardNavigation) {\n this.keyboardNavigation.destroy();\n }\n // Hide container from screen readers if it exists\n if (chart.renderTo) {\n chart.renderTo.setAttribute('aria-hidden', true);\n }\n // Remove focus border if it exists\n if (chart.focusElement) {\n chart.focusElement.removeFocusBorder();\n }\n }\n /**\n * Return a list of the types of series we have in the chart.\n * @private\n */\n getChartTypes() {\n const types = {};\n this.chart.series.forEach(function (series) {\n types[series.type] = 1;\n });\n return Object.keys(types);\n }\n}\n/* *\n *\n * Class Namespace\n *\n * */\n(function (Accessibility) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n Accessibility.i18nFormat = A11yI18n.i18nFormat;\n /* *\n *\n * Functions\n *\n * */\n /**\n * Destroy with chart.\n * @private\n */\n function chartOnDestroy() {\n if (this.accessibility) {\n this.accessibility.destroy();\n }\n }\n /**\n * Handle updates to the module and send render updates to components.\n * @private\n */\n function chartOnRender() {\n // Update/destroy\n if (this.a11yDirty && this.renderTo) {\n delete this.a11yDirty;\n this.updateA11yEnabled();\n }\n const a11y = this.accessibility;\n if (a11y && !a11y.zombie) {\n a11y.proxyProvider.updateProxyElementPositions();\n a11y.getComponentOrder().forEach(function (componentName) {\n a11y.components[componentName].onChartRender();\n });\n }\n }\n /**\n * Update with chart/series/point updates.\n * @private\n */\n function chartOnUpdate(e) {\n // Merge new options\n const newOptions = e.options.accessibility;\n if (newOptions) {\n // Handle custom component updating specifically\n if (newOptions.customComponents) {\n this.options.accessibility.customComponents =\n newOptions.customComponents;\n delete newOptions.customComponents;\n }\n merge(true, this.options.accessibility, newOptions);\n // Recreate from scratch\n if (this.accessibility && this.accessibility.destroy) {\n this.accessibility.destroy();\n delete this.accessibility;\n }\n }\n // Mark dirty for update\n this.a11yDirty = true;\n }\n /**\n * @private\n */\n function chartUpdateA11yEnabled() {\n let a11y = this.accessibility;\n const accessibilityOptions = this.options.accessibility, svg = this.renderer.boxWrapper.element, title = this.title;\n if (accessibilityOptions && accessibilityOptions.enabled) {\n if (a11y && !a11y.zombie) {\n a11y.update();\n }\n else {\n this.accessibility = a11y = new Accessibility(this);\n if (a11y && !a11y.zombie) {\n a11y.update();\n }\n // If a11y has been disabled, and is now enabled\n if (svg.getAttribute('role') === 'img') {\n svg.removeAttribute('role');\n }\n }\n }\n else if (a11y) {\n // Destroy if after update we have a11y and it is disabled\n if (a11y.destroy) {\n a11y.destroy();\n }\n delete this.accessibility;\n }\n else {\n // If a11y has been disabled dynamically or is disabled\n this.renderTo.setAttribute('role', 'img');\n this.renderTo.setAttribute('aria-hidden', false);\n this.renderTo.setAttribute('aria-label', ((title && title.element.textContent) || '').replace(/</g, '&lt;'));\n svg.setAttribute('aria-hidden', true);\n const description = document.getElementsByClassName('highcharts-description')[0];\n if (description) {\n description.setAttribute('aria-hidden', false);\n description.classList.remove('highcharts-linked-description');\n }\n }\n }\n /**\n * @private\n */\n function compose(ChartClass, LegendClass, PointClass, SeriesClass, SVGElementClass, RangeSelectorClass) {\n // Ordered:\n KeyboardNavigation.compose(ChartClass);\n NewDataAnnouncer.compose(SeriesClass);\n LegendComponent.compose(ChartClass, LegendClass);\n MenuComponent.compose(ChartClass);\n SeriesComponent.compose(ChartClass, PointClass, SeriesClass);\n A11yI18n.compose(ChartClass);\n FocusBorderComposition.compose(ChartClass, SVGElementClass);\n // RangeSelector\n if (RangeSelectorClass) {\n RangeSelectorComponent.compose(ChartClass, RangeSelectorClass);\n }\n const chartProto = ChartClass.prototype;\n if (!chartProto.updateA11yEnabled) {\n chartProto.updateA11yEnabled = chartUpdateA11yEnabled;\n addEvent(ChartClass, 'destroy', chartOnDestroy);\n addEvent(ChartClass, 'render', chartOnRender);\n addEvent(ChartClass, 'update', chartOnUpdate);\n // Mark dirty for update\n ['addSeries', 'init'].forEach((event) => {\n addEvent(ChartClass, event, function () {\n this.a11yDirty = true;\n });\n });\n // Direct updates (events happen after render)\n ['afterApplyDrilldown', 'drillupall'].forEach((event) => {\n addEvent(ChartClass, event, function chartOnAfterDrilldown() {\n const a11y = this.accessibility;\n if (a11y && !a11y.zombie) {\n a11y.update();\n }\n });\n });\n addEvent(PointClass, 'update', pointOnUpdate);\n // Mark dirty for update\n ['update', 'updatedData', 'remove'].forEach((event) => {\n addEvent(SeriesClass, event, function () {\n if (this.chart.accessibility) {\n this.chart.a11yDirty = true;\n }\n });\n });\n }\n }\n Accessibility.compose = compose;\n /**\n * Mark dirty for update.\n * @private\n */\n function pointOnUpdate() {\n if (this.series.chart.accessibility) {\n this.series.chart.a11yDirty = true;\n }\n }\n})(Accessibility || (Accessibility = {}));\n/* *\n *\n * Registry\n *\n * */\n// Add default options\nmerge(true, defaultOptions, defaultOptionsA11Y, {\n accessibility: {\n highContrastTheme: highContrastTheme\n },\n lang: defaultLangOptions\n});\n/* *\n *\n * Default Export\n *\n * */\nexport default Accessibility;\n","// SPDX-License-Identifier: LicenseRef-Highcharts\n/**\n * @license Highcharts JS v13.0.0 (2026-06-11)\n * @module highcharts/modules/accessibility\n * @requires highcharts\n *\n * Accessibility module\n *\n * (c) 2010-2026 Highsoft AS\n * Author: Øystein Moseng\n *\n * A commercial license may be required depending on use,\n * see www.highcharts.com/license\n */\n'use strict';\nimport Highcharts from '../../Core/Globals.js';\nimport Accessibility from '../../Accessibility/Accessibility.js';\nimport AccessibilityComponent from '../../Accessibility/AccessibilityComponent.js';\nimport ChartUtilities from '../../Accessibility/Utils/ChartUtilities.js';\nimport HTMLUtilities from '../../Accessibility/Utils/HTMLUtilities.js';\nimport KeyboardNavigationHandler from '../../Accessibility/KeyboardNavigationHandler.js';\nimport SeriesDescriber from '../../Accessibility/Components/SeriesComponent/SeriesDescriber.js';\nconst G = Highcharts;\n// Classes\nG.i18nFormat = Accessibility.i18nFormat;\nG.A11yChartUtilities = ChartUtilities;\nG.A11yHTMLUtilities = HTMLUtilities;\nG.AccessibilityComponent = AccessibilityComponent;\nG.KeyboardNavigationHandler = KeyboardNavigationHandler;\nG.SeriesAccessibilityDescriber = SeriesDescriber;\n// Compositions\nAccessibility.compose(G.Chart, G.Legend, G.Point, G.Series, G.SVGElement, G.RangeSelector);\nexport default Highcharts;\n","// References:\n// Dark mode: https://www.highcharts.com/docs/chart-design-and-style/themes#dark-mode-in-highcharts-the-adaptive-theme.\n// Templating: https://www.highcharts.com/docs/chart-concepts/templating.\n\n// ── External Dependencies & Registrations\n// This order is load-bearing, not stylistic: the adaptive theme and accessibility modules assume `Highcharts.Chart`,\n// `.Legend`, etc. are already set on the shared instance by the time their own top-level compose() calls run.\nimport Highcharts from 'highcharts/es-modules/masters/highcharts.src.js';\n\nimport 'highcharts/es-modules/masters/themes/adaptive.src.js';\nimport 'highcharts/es-modules/masters/modules/accessibility.src.js';\nimport type { Chart, Options, SeriesOptionsType } from 'highcharts/highcharts.src';\nexport type { Options as HighchartsOptions } from 'highcharts/highcharts.src';\n\n// ── DPUse Framework\nimport type {\n PresentationCartesianTypeId,\n PresentationPolarTypeId,\n PresentationRangeTypeId,\n PresentationView,\n PresentationVisualContentConfig\n} from '@dpuse/dpuse-shared/component/presentation';\n\n// ── Types ────────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nexport interface HighchartsView extends PresentationView {\n chart: Chart;\n}\n\n// ── Constants ────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nconst CARTESIAN_SERIES_TYPE_MAP: Record<PresentationCartesianTypeId, 'area' | 'areaspline' | 'bar' | 'column' | 'line' | 'spline'> = {\n areaLine: 'area',\n areaSpline: 'areaspline',\n bar: 'bar',\n column: 'column',\n line: 'line',\n spline: 'spline'\n};\nconst POLAR_SERIES_TYPE_MAP: Record<PresentationPolarTypeId, 'area' | 'arearange' | 'areaspline' | 'column' | 'columnrange' | 'line' | 'spline'> = {\n areaLine: 'area',\n areaRange: 'arearange',\n areaSpline: 'areaspline',\n column: 'column',\n columnRange: 'columnrange',\n line: 'line',\n spline: 'spline'\n};\nconst RANGE_SERIES_TYPE_MAP: Record<PresentationRangeTypeId, 'arearange' | 'areasplinerange' | 'columnrange'> = {\n areaLine: 'arearange',\n areaSpline: 'areasplinerange',\n bar: 'columnrange',\n column: 'columnrange'\n};\nconst HIGHCHARTS_ID = 'highcharts';\n\n// ── State ────────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nconst state = {\n isDependencyWheelAndSankeyModulesLoaded: false,\n isHighchartsMoreLoaded: false,\n isPatternFillLoaded: false,\n isStreamgraphModuleLoaded: false\n};\n\n// ── Tools ────────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nexport class HighchartsTool {\n // Actions - Render cartesian chart.\n renderCartesianChart(typeId: PresentationCartesianTypeId, contentConfig: PresentationVisualContentConfig, renderTo: HTMLElement, callback?: () => void): HighchartsView {\n const type = CARTESIAN_SERIES_TYPE_MAP[typeId];\n const series: SeriesOptionsType[] = Array.from(contentConfig.data.measures, (measure) => ({ type, name: measure.name, data: measure.values }));\n const options: Options = {\n chart: { type },\n plotOptions: { series: { borderColor: '#333' } },\n series,\n title: { text: contentConfig.title.text },\n xAxis: { categories: contentConfig.data.dimension.values.map((value) => value.label?.text ?? '') },\n yAxis: { title: { text: contentConfig.title.text } }\n };\n const chart = Highcharts.chart(renderTo, options, callback);\n return {\n chart,\n resize: () => {\n chart.reflow();\n },\n vendorId: HIGHCHARTS_ID\n };\n }\n\n // Actions - Render.\n async render(options: Options, renderTo: HTMLElement, callback?: () => void): Promise<unknown> {\n await Promise.all([this.loadHighchartsMore(), this.loadPatternFill()]);\n\n const chart = Highcharts.chart(renderTo, options, callback);\n return {\n chart,\n resize: () => {\n chart.reflow();\n },\n vendorId: HIGHCHARTS_ID\n };\n }\n\n // Actions - Render period flow & boundaries chart.\n async renderPeriodFlowBoundaries(contentConfig: PresentationVisualContentConfig, renderTo: HTMLElement, callback?: () => void): Promise<HighchartsView> {\n await this.loadHighchartsMore();\n\n const series: SeriesOptionsType[] = Array.from(contentConfig.data.measures, (measure) => ({ type: 'waterfall', name: measure.name, data: measure.values }));\n\n // const series: SeriesOptionsType[] = [];\n // const data = [];\n // for (let index = 0; index < content.data.categoryLabels.length; index++) {\n // data.push([content.data.measures[0].values[index][0], content.data.measures[1].values[index][0]]);\n // }\n // series.push({ type: type.options.highchartsType, name: 'Unknown', data });\n\n const options: Options = {\n chart: { type: 'waterfall' },\n plotOptions: { series: { borderColor: '#333' } },\n series,\n title: { text: contentConfig.title.text },\n xAxis: { categories: contentConfig.data.dimension.values.map((value) => value.label?.text ?? '') },\n yAxis: { title: { text: contentConfig.title.text } }\n };\n\n const chart = Highcharts.chart(renderTo, options, callback);\n return {\n chart,\n resize: () => {\n chart.reflow();\n },\n vendorId: HIGHCHARTS_ID\n };\n }\n\n // Actions - Render polar chart.\n async renderPolarChart(typeId: PresentationPolarTypeId, contentConfig: PresentationVisualContentConfig, renderTo: HTMLElement, callback?: () => void): Promise<HighchartsView> {\n await this.loadHighchartsMore();\n\n const type = POLAR_SERIES_TYPE_MAP[typeId];\n const series: SeriesOptionsType[] = Array.from(contentConfig.data.measures, (measure) => ({ type, name: measure.name, data: measure.values }));\n\n const options: Options = {\n chart: { polar: true },\n plotOptions: { series: { borderColor: '#333' } },\n series,\n title: { text: contentConfig.title.text },\n xAxis: { categories: contentConfig.data.dimension.values.map((value) => value.label?.text ?? '') },\n yAxis: { title: { text: contentConfig.title.text } }\n };\n\n const chart = Highcharts.chart(renderTo, options, callback);\n return {\n chart,\n resize: () => {\n chart.reflow();\n },\n vendorId: HIGHCHARTS_ID\n };\n }\n\n // Actions - Render range chart.\n async renderRangeChart(typeId: PresentationRangeTypeId, contentConfig: PresentationVisualContentConfig, renderTo: HTMLElement, callback?: () => void): Promise<HighchartsView> {\n await this.loadHighchartsMore();\n\n const type = RANGE_SERIES_TYPE_MAP[typeId];\n const series: SeriesOptionsType[] = [];\n const data = [];\n for (let index = 0; index < contentConfig.data.dimension.values.length; index++) {\n data.push([contentConfig.data.measures[0]?.values[index]?.[0] ?? 0, contentConfig.data.measures[1]?.values[index]?.[0] ?? 0]);\n }\n series.push({ type, name: 'Unknown', data });\n\n const options: Options = {\n chart: { type, inverted: typeId === 'bar' ? true : false },\n plotOptions: { series: { borderColor: '#333' } },\n series,\n title: { text: contentConfig.title.text },\n xAxis: { categories: contentConfig.data.dimension.values.map((value) => value.label?.text ?? '') },\n yAxis: { title: { text: contentConfig.title.text } }\n };\n\n const chart = Highcharts.chart(renderTo, options, callback);\n return {\n chart,\n resize: () => {\n chart.reflow();\n },\n vendorId: HIGHCHARTS_ID\n };\n }\n\n // Set color mode.\n // The adaptive theme (see the reference at the top of this file) reacts to the OS-level prefers-color-scheme\n // media query on its own, but has no idea about an in-app light/dark toggle. Its CSS also recognises the\n // 'highcharts-light'/'highcharts-dark' classes on any ancestor, so toggling them on <html> is all that's needed\n // to override the OS setting for already-rendered charts too - Highcharts' theme is CSS-variable based, so no\n // chart re-render is required.\n setColorMode(colorModeId: string): void {\n if (typeof document === 'undefined') return;\n\n document.documentElement.classList.toggle('highcharts-dark', colorModeId === 'dark');\n document.documentElement.classList.toggle('highcharts-light', colorModeId !== 'dark');\n }\n\n // Helpers - Load dependency wheel and sankey modules.\n private async loadDependencyWheelAndSankeyModules(): Promise<void> {\n if (state.isDependencyWheelAndSankeyModulesLoaded) return;\n\n await Promise.all([import('highcharts/es-modules/masters/modules/dependency-wheel.src.js'), import('highcharts/es-modules/masters/modules/sankey.src.js')]);\n state.isDependencyWheelAndSankeyModulesLoaded = true;\n }\n\n // Helpers - Load Highcharts more.\n private async loadHighchartsMore(): Promise<void> {\n if (state.isHighchartsMoreLoaded) return;\n\n await import('./highchartsMoreCustom');\n state.isHighchartsMoreLoaded = true;\n }\n\n // Helpers - Load pattern fill module.\n private async loadPatternFill(): Promise<void> {\n if (state.isPatternFillLoaded) return;\n\n await import('highcharts/es-modules/masters/modules/pattern-fill.src.js');\n state.isPatternFillLoaded = true;\n }\n\n // Helpers - Load stream graph module.\n private async loadStreamGraphModule(): Promise<void> {\n if (state.isStreamgraphModuleLoaded) return;\n\n await import('highcharts/es-modules/masters/modules/streamgraph.src.js');\n state.isStreamgraphModuleLoaded = true;\n }\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81],"mappings":";;;;;AAwBA,IAAI;CACH,SAA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