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EAAOjH,EAChBgI,EAAI7F,GAAKsG,EAAMzI,GAEnB6nE,EAAM3hE,EAAQ4wB,YAAc,EAAI92B,EAChCuD,KAAKuM,SAASqlB,QAAQza,EAAM7R,MAAQg/D,EAAKntD,EAAM7T,OAASghE,GAAK,GAG9C,IAAXl4B,GAA2B,IAAXC,IAChB9yB,EAAIvZ,KAAKsnB,UAAW,CAChBsoB,UAAW,SAAS3nC,OAAOmkC,EAAQ,MAAMnkC,OAAOokC,EAAQ,OAE5DmU,GAAWpU,EACXqU,GAAWpU,GAEfmU,GAAW98C,EAAOe,EAAItH,EACtBsjD,GAAWv7C,EAAMT,EAAI7F,GAGzBoB,KAAKkiE,KAAKp6D,KAAKuE,MAAM5H,EAAItH,GAAI2K,KAAKuE,MAAM5H,EAAI7F,GAAK,GACjD4hD,EAASC,EACb,EACOxS,CACX,CAxtC6B,E","sources":["../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Core/Axis/AxisDefaults.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Core/Axis/Axis.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Core/Axis/Tick.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Core/Chart/Chart.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Core/Foundation.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Core/Legend/Legend.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Core/Legend/LegendSymbol.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Core/MSPointer.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Core/Pointer.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Core/Renderer/RendererRegistry.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Core/Renderer/RendererUtilities.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Core/Renderer/SVG/SVGElement.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Core/Renderer/SVG/SVGLabel.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Core/Renderer/SVG/TextBuilder.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Core/Renderer/SVG/SVGRenderer.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Core/Renderer/SVG/Symbols.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Core/Series/SeriesDefaults.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Core/Series/Series.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Core/Tooltip.js"],"sourcesContent":["/* *\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\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.defaultXAxisOptions = {\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 point where the break starts.\n *\n * @type {number}\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 point where the break ends.\n *\n * @type {number}\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}\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 * 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 *\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 * 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 * 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 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 string\n * representations used for each unit. For intermediate values,\n * different units may be used, for example the `day` unit can be used\n * on midnight and `hour` unit be used for intermediate values on the\n * same axis.\n *\n * For an overview of the replacement codes, see\n * [dateFormat](/class-reference/Highcharts.Time#dateFormat).\n *\n * Defaults to:\n * ```js\n * {\n * millisecond: '%H:%M:%S.%L',\n * second: '%H:%M:%S',\n * minute: '%H:%M',\n * hour: '%H:%M',\n * day: '%e. %b',\n * week: '%e. %b',\n * month: '%b \\'%y',\n * year: '%Y'\n * }\n * ```\n *\n * @sample {highcharts} highcharts/xaxis/datetimelabelformats/\n * Different day format on X axis\n * @sample {highstock} stock/xaxis/datetimelabelformats/\n * More information in x axis labels\n *\n * @declare Highcharts.AxisDateTimeLabelFormatsOptions\n * @product highcharts highstock gantt\n */\n dateTimeLabelFormats: {\n /**\n * @declare Highcharts.AxisDateTimeLabelFormatsOptionsObject\n * @type {string|*}\n */\n millisecond: {\n main: '%H:%M:%S.%L',\n range: false\n },\n /**\n * @declare Highcharts.AxisDateTimeLabelFormatsOptionsObject\n * @type {string|*}\n */\n second: {\n main: '%H:%M:%S',\n range: false\n },\n /**\n * @declare Highcharts.AxisDateTimeLabelFormatsOptionsObject\n * @type {string|*}\n */\n minute: {\n main: '%H:%M',\n range: false\n },\n /**\n * @declare Highcharts.AxisDateTimeLabelFormatsOptionsObject\n * @type {string|*}\n */\n hour: {\n main: '%H:%M',\n range: false\n },\n /**\n * @declare Highcharts.AxisDateTimeLabelFormatsOptionsObject\n * @type {string|*}\n */\n day: {\n main: '%e. %b'\n },\n /**\n * @declare Highcharts.AxisDateTimeLabelFormatsOptionsObject\n * @type {string|*}\n */\n week: {\n main: '%e. %b'\n },\n /**\n * @declare Highcharts.AxisDateTimeLabelFormatsOptionsObject\n * @type {string|*}\n */\n month: {\n main: '%b \\'%y'\n },\n /**\n * @declare Highcharts.AxisDateTimeLabelFormatsOptionsObject\n * @type {string|*}\n */\n year: {\n main: '%Y'\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.\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 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.\n * When false, 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 /**\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}\n * @default undefined\n * @since 4.1.0\n * @product highcharts highstock gantt\n * @apioption xAxis.labels.autoRotation\n */\n autoRotation: void 0,\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 * Polar charts only. The label's pixel distance from the perimeter\n * of the plot area.\n *\n * @type {number}\n * @default undefined\n * @product highcharts gantt\n */\n distance: void 0,\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 * @default {highcharts|highstock|gantt} true\n * @default {highmaps} false\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 *\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.\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\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.\n *\n * @product highcharts gantt\n */\n padding: 5,\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 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.\n *\n * @sample {highcharts} highcharts/xaxis/labels-x/\n * Y axis labels placed on grid lines\n */\n x: 0,\n /**\n * The y position offset of all labels relative to the tick\n * positions on the axis. The default makes it adapt to the font\n * size of the bottom axis.\n *\n * @sample {highcharts} highcharts/xaxis/labels-x/\n * Y 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 zIndex: 7,\n /**\n * CSS styles for the label. Use `whiteSpace: 'nowrap'` to prevent\n * wrapping of category labels. Use `textOverflow: 'none'` to\n * prevent ellipsis (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 /** @internal */\n color: \"#666666\" /* Palette.neutralColor60 */,\n /** @internal */\n cursor: 'default',\n /** @internal */\n fontSize: '11px'\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 * @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 * @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 `null`, the max value is\n * automatically calculated.\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|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\n * @type {number}\n * @product highcharts highstock\n * @apioption xAxis.maxZoom\n */\n /**\n * The minimum value of the axis. If `null` the min value is\n * automatically calculated.\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|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 `null` or `undefined`, minor ticks are not\n * 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 * Null by default\n * @sample {highcharts} highcharts/yaxis/minortickinterval-5/\n * 5 units\n * @sample {highcharts} highcharts/yaxis/minortickinterval-log-auto/\n * \"auto\"\n * @sample {highcharts} highcharts/yaxis/minortickinterval-log/\n * 0.1\n * @sample {highstock} stock/demo/basic-line/\n * Null by default\n * @sample {highstock} stock/xaxis/minortickinterval-auto/\n * \"auto\"\n *\n * @type {number|string|null}\n * @apioption xAxis.minorTickInterval\n */\n /**\n * The pixel length of the minor tick marks.\n *\n * @sample {highcharts} highcharts/yaxis/minorticklength/\n * 10px 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. Unless\n * [minorTickInterval](#xAxis.minorTickInterval) is set, the tick\n * interval is calculated as a fifth of the `tickInterval`.\n *\n * On a logarithmic axis, minor ticks are laid out based on a best\n * guess, attempting to enter approximately 5 minor ticks between\n * each major tick.\n *\n * Prior to v6.0.0, ticks were unabled in auto layout by setting\n * `minorTickInterval` to `\"auto\"`.\n *\n * @productdesc {highcharts}\n * On axes using [categories](#xAxis.categories), minor ticks are not\n * supported.\n *\n * @sample {highcharts} highcharts/yaxis/minorticks-true/\n * Enabled on linear Y axis\n *\n * @type {boolean}\n * @default false\n * @since 6.0.0\n * @apioption xAxis.minorTicks\n */\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 it's 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 * @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 {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 */\n opposite: false,\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 value is set in milliseconds. Can be set for\n * both main `xAxis` and the navigator's `xAxis`.\n *\n * @sample {highstock} stock/xaxis/overscroll/\n * One minute overscroll with live data\n *\n * @type {number}\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 * 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 * 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`.\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 * 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 behaviour 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 *\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 behaviour of [tickPixelInterval](\n * #xAxis.tickPixelInterval) and [tickInterval](#xAxis.tickInterval).\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}\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\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 of the axis title from the axis line. By default,\n * this distance is computed from the offset width of the labels,\n * the labels' distance from the axis and the title's margin.\n * However when the offset option is set, it overrides all this.\n *\n * @sample {highcharts} highcharts/yaxis/title-offset/\n * Place the axis title on top of the axis\n * @sample {highstock} highcharts/yaxis/title-offset/\n * Place the axis title on top of the Y axis\n *\n * @type {number}\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.\n *\n * @sample {highcharts} highcharts/yaxis/title-offset/\n * Horizontal\n */\n rotation: 0,\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 `textOverflow: 'ellipsis'`, by\n * setting a 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 /** @internal */\n color: \"#666666\" /* Palette.neutralColor60 */\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 * @product highcharts gantt\n */\n type: 'linear',\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 */\n uniqueNames: true,\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 * @type {Array|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 * @default #f2f2f2\n */\n minorGridLineColor: \"#f2f2f2\" /* Palette.neutralColor5 */,\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 * @default #999999\n */\n minorTickColor: \"#999999\" /* Palette.neutralColor40 */,\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 * @productdesc {highmaps}\n * In Highmaps, the axis line is hidden by default, because the axis is\n * not visible by default.\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 * @default #ccd6eb\n */\n lineColor: \"#ccd6eb\" /* Palette.highlightColor20 */,\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 * @default #e6e6e6\n */\n gridLineColor: \"#e6e6e6\" /* Palette.neutralColor10 */,\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.\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 {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 * @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 * @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 * @default #ccd6eb\n */\n tickColor: \"#ccd6eb\" /* Palette.highlightColor20 */\n // tickWidth: 1\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.defaultYAxisOptions = {\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>}\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 * Angular gauges and solid gauges only.\n * The label's pixel distance from the perimeter of the plot area.\n *\n * Since v7.1.2: If it's a percentage string, it is interpreted the\n * same as [series.radius](#plotOptions.gauge.radius), so label can be\n * aligned under the gauge's shape.\n *\n * @sample {highcharts} highcharts/yaxis/labels-distance/\n * Labels centered under the arc\n *\n * @type {number|string}\n * @default -25\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 * @see [yAxis.labels.distance](#yAxis.labels.distance)\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 x: -8\n },\n /**\n * @productdesc {highmaps}\n * In Highmaps, the axis line is hidden by default, because the axis is\n * not visible by default.\n *\n * @type {Highcharts.ColorType}\n * @apioption yAxis.lineColor\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/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/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 * Defines the horizontal alignment of the stack total label. Can be one\n * of `\"left\"`, `\"center\"` or `\"right\"`. The default value is calculated\n * at runtime and depends on orientation and whether the stack is\n * 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 same\n * 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 the\n * texts anchor point is placed with regards to the stack, `textAlign`\n * determines how the text is aligned against its anchor point. Possible\n * values are `\"left\"`, `\"center\"` and `\"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-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 one\n * of `\"top\"`, `\"middle\"` or `\"bottom\"`. The default value is calculated\n * at runtime and depends on orientation and whether the stack is\n * 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 depends\n * on orientation and whether the stack is positive or 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 depends\n * on orientation and whether the stack is positive or 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 * 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 rotation of the text in degrees. 0 is horizontal, 270 is\n * vertical reading from bottom to top.\n *\n * @sample {highcharts} highcharts/yaxis/title-offset/\n * Horizontal\n */\n rotation: 270,\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`.\n *\n * @sample {highcharts} highcharts/xaxis/title-text/\n * Custom HTML\n *\n * @type {string|null}\n * @default {highcharts} Values\n * @default {highstock} undefined\n * @product highcharts highstock gantt\n */\n text: 'Values'\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 * 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}\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 /* eslint-disable valid-jsdoc */\n /**\n * Callback JavaScript function to format the label. The value is\n * given by `this.total`.\n *\n * @sample {highcharts} highcharts/yaxis/stacklabels-formatter/\n * Added units to stack total value\n *\n * @type {Highcharts.FormatterCallbackFunction}\n * @since 2.1.5\n * @product highcharts\n */\n formatter: function () {\n var numberFormatter = this.axis.chart.numberFormatter;\n /* eslint-enable valid-jsdoc */\n return 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 /** @internal */\n color: \"#000000\" /* Palette.neutralColor100 */,\n /** @internal */\n fontSize: '11px',\n /** @internal */\n fontWeight: 'bold',\n /** @internal */\n textOutline: '1px contrast'\n }\n },\n gridLineWidth: 1,\n lineWidth: 0\n // tickWidth: 0\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 // This variable extends the defaultOptions for left axes.\n AxisDefaults.defaultLeftAxisOptions = {\n labels: {\n x: -15\n },\n title: {\n rotation: 270\n }\n };\n // This variable extends the defaultOptions for right axes.\n AxisDefaults.defaultRightAxisOptions = {\n labels: {\n x: 15\n },\n title: {\n rotation: 90\n }\n };\n // This variable extends the defaultOptions for bottom axes.\n AxisDefaults.defaultBottomAxisOptions = {\n labels: {\n autoRotation: [-45],\n x: 0\n // overflow: undefined,\n // staggerLines: null\n },\n margin: 15,\n title: {\n rotation: 0\n }\n };\n // This variable extends the defaultOptions for top axes.\n AxisDefaults.defaultTopAxisOptions = {\n labels: {\n autoRotation: [-45],\n x: 0\n // overflow: undefined\n // staggerLines: null\n },\n margin: 15,\n title: {\n rotation: 0\n }\n };\n})(AxisDefaults || (AxisDefaults = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default AxisDefaults;\n","/* *\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport A from '../Animation/AnimationUtilities.js';\nvar animObject = A.animObject;\nimport AxisDefaults from './AxisDefaults.js';\nimport Color from '../Color/Color.js';\nimport D from '../Defaults.js';\nvar defaultOptions = D.defaultOptions;\nimport F from '../Foundation.js';\nvar registerEventOptions = F.registerEventOptions;\nimport H from '../Globals.js';\nvar deg2rad = H.deg2rad;\nimport Tick from './Tick.js';\nimport U from '../Utilities.js';\nvar arrayMax = U.arrayMax, arrayMin = U.arrayMin, clamp = U.clamp, correctFloat = U.correctFloat, defined = U.defined, destroyObjectProperties = U.destroyObjectProperties, erase = U.erase, error = U.error, extend = U.extend, fireEvent = U.fireEvent, isArray = U.isArray, isNumber = U.isNumber, isString = U.isString, merge = U.merge, normalizeTickInterval = U.normalizeTickInterval, objectEach = U.objectEach, pick = U.pick, relativeLength = U.relativeLength, removeEvent = U.removeEvent, splat = U.splat, syncTimeout = U.syncTimeout;\nvar getNormalizedTickInterval = function (axis, tickInterval) { return normalizeTickInterval(tickInterval, void 0, void 0, pick(axis.options.allowDecimals, \n// If the tick interval is greather 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); };\n/* *\n *\n * Class\n *\n * */\n/**\n * Create a new axis object. Called internally when instanciating 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 */\nvar Axis = /** @class */ (function () {\n /* *\n *\n * Constructors\n *\n * */\n function Axis(chart, userOptions) {\n this.alternateBands = void 0;\n this.bottom = void 0;\n this.chart = void 0;\n this.closestPointRange = void 0;\n this.coll = void 0;\n this.eventOptions = void 0;\n this.hasNames = void 0;\n this.hasVisibleSeries = void 0;\n this.height = void 0;\n this.isLinked = void 0;\n this.labelEdge = void 0; // @todo\n this.labelFormatter = void 0;\n this.left = void 0;\n this.len = void 0;\n this.max = void 0;\n this.maxLabelLength = void 0;\n this.min = void 0;\n this.minorTickInterval = void 0;\n this.minorTicks = void 0;\n this.minPixelPadding = void 0;\n this.names = void 0;\n this.offset = void 0;\n this.options = void 0;\n this.overlap = void 0;\n this.paddedTicks = void 0;\n this.plotLinesAndBands = void 0;\n this.plotLinesAndBandsGroups = void 0;\n this.pointRange = void 0;\n this.pointRangePadding = void 0;\n this.pos = void 0;\n this.positiveValuesOnly = void 0;\n this.right = void 0;\n this.series = void 0;\n this.side = void 0;\n this.tickAmount = void 0;\n this.tickInterval = void 0;\n this.tickmarkOffset = void 0;\n this.tickPositions = void 0;\n this.tickRotCorr = void 0;\n this.ticks = void 0;\n this.top = void 0;\n this.transA = void 0;\n this.transB = void 0;\n this.translationSlope = void 0;\n this.userOptions = void 0;\n this.visible = void 0;\n this.width = void 0;\n this.zoomEnabled = void 0;\n this.init(chart, userOptions);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Overrideable 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 Axis.prototype.init = function (chart, userOptions) {\n var isXAxis = userOptions.isX, axis = this;\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 = chart.inverted && !axis.isZAxis ? !isXAxis : isXAxis;\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 = axis.coll || (isXAxis ? 'xAxis' : 'yAxis');\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, (axis.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 var options = this.options, labelsOptions = options.labels, type = options.type;\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 =\n 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}\n * @readonly\n */\n axis.categories = options.categories || (axis.hasNames ? [] : void 0);\n if (!axis.names) { // Preserve on update (#3830)\n axis.names = [];\n axis.names.keys = {};\n }\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 postition on axis.\n *\n * @see {@link Highcharts.Tick}\n *\n * @name Highcharts.Axis#ticks\n * @type {Highcharts.Dictionary}\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}\n */\n axis.minorTicks = {};\n // List of plotLines/Bands\n axis.plotLinesAndBands = [];\n // Alternate bands\n axis.alternateBands = {};\n // Axis metrics\n axis.len = 0;\n axis.minRange = axis.userMinRange = options.minRange || options.maxZoom;\n axis.range = options.range;\n axis.offset = options.offset || 0;\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|null}\n */\n axis.max = null;\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|null}\n */\n axis.min = null;\n /**\n * The processed crosshair options.\n *\n * @name Highcharts.Axis#crosshair\n * @type {boolean|Highcharts.AxisCrosshairOptions}\n */\n var 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 chart[axis.coll].push(axis);\n }\n /**\n * All series associated to the axis.\n *\n * @name Highcharts.Axis#series\n * @type {Array}\n */\n axis.series = axis.series || []; // populated by Series\n // Reversed axis\n if (chart.inverted &&\n !axis.isZAxis &&\n isXAxis &&\n typeof axis.reversed === 'undefined') {\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 * @private\n * @function Highcharts.Axis#setOptions\n *\n * @param {Highcharts.AxisOptions} userOptions\n * Axis options.\n *\n * @emits Highcharts.Axis#event:afterSetOptions\n */\n Axis.prototype.setOptions = function (userOptions) {\n this.options = merge(AxisDefaults.defaultXAxisOptions, (this.coll === 'yAxis') && AxisDefaults.defaultYAxisOptions, [\n AxisDefaults.defaultTopAxisOptions,\n AxisDefaults.defaultRightAxisOptions,\n AxisDefaults.defaultBottomAxisOptions,\n AxisDefaults.defaultLeftAxisOptions\n ][this.side], merge(\n // if set in setOptions (#1053):\n defaultOptions[this.coll], userOptions));\n fireEvent(this, 'afterSetOptions', { userOptions: 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 * @param {Highcharts.AxisLabelsFormatterContextObject} [ctx]\n * Formatter context of axis label.\n *\n * @return {string}\n * The formatted label content.\n */\n Axis.prototype.defaultLabelFormatter = function (ctx) {\n var axis = this.axis, chart = this.chart, numberFormatter = chart.numberFormatter, 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 var i = numericSymbols && numericSymbols.length, multi, ret;\n if (categories) {\n ret = \"\".concat(this.value);\n }\n else if (dateTimeLabelFormat) { // datetime axis\n ret = time.dateFormat(dateTimeLabelFormat, value);\n }\n else if (i && 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) + numericSymbols[i];\n }\n }\n }\n if (typeof ret === 'undefined') {\n if (Math.abs(value) >= 10000) { // add thousands separators\n ret = numberFormatter(value, -1);\n }\n else { // small numbers\n ret = numberFormatter(value, -1, void 0, ''); // #2466\n }\n }\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 * @private\n * @function Highcharts.Axis#getSeriesExtremes\n *\n * @emits Highcharts.Axis#event:afterGetSeriesExtremes\n * @emits Highcharts.Axis#event:getSeriesExtremes\n */\n Axis.prototype.getSeriesExtremes = function () {\n var axis = this, chart = axis.chart;\n var 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 = null;\n axis.softThreshold = !axis.isXAxis;\n // Loop through this axis' series\n axis.series.forEach(function (series) {\n if (series.visible ||\n !chart.options.chart.ignoreHiddenSeries) {\n var seriesOptions = series.options;\n var xData = void 0, threshold = seriesOptions.threshold, seriesDataMin = void 0, seriesDataMax = void 0;\n axis.hasVisibleSeries = true;\n // Validate threshold in logarithmic axes\n if (axis.positiveValuesOnly && threshold <= 0) {\n threshold = null;\n }\n // Get dataMin and dataMax for X axes\n if (axis.isXAxis) {\n xData = series.xData;\n if (xData.length) {\n xData = axis.logarithmic ?\n xData.filter(axis.validatePositiveValue) :\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 var 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 * @private\n * @function Highcharts.Axis#translate\n */\n Axis.prototype.translate = function (val, backwards, cvsCoord, old, handleLog, pointPlacement) {\n var axis = (this.linkedParent || this), // #1417\n localMin = (old && axis.old ? axis.old.min : axis.min);\n if (!isNumber(localMin)) {\n return NaN;\n }\n var minPixelPadding = axis.minPixelPadding, doPostTranslate = (axis.isOrdinal ||\n axis.brokenAxis && axis.brokenAxis.hasBreaks ||\n (axis.logarithmic && handleLog)) && axis.lin2val;\n var 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 var value = sign * (val - localMin) * localA;\n returnValue = (!axis.isRadial ? correctFloat(value) : value) +\n cvsOffset +\n (sign * minPixelPadding) +\n (isNumber(pointPlacement) ? localA * pointPlacement : 0);\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} value\n * A value in terms of axis units.\n *\n * @param {boolean} paneCoordinates\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 Axis.prototype.toPixels = function (value, paneCoordinates) {\n return this.translate(value, false, !this.horiz, void 0, true) +\n (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 Axis.prototype.toValue = function (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 Axis.prototype.getPlotLinePath = function (options) {\n var 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 var 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 * @private\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 var evt = {\n value: value,\n lineWidth: lineWidth,\n old: old,\n force: force,\n acrossPanes: options.acrossPanes,\n translatedValue: 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, -1e5, 1e5);\n x1 = x2 = Math.round(translatedValue + transB);\n y1 = y2 = Math.round(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;\n x1 = x2 = between(x1, axisLeft, axisLeft + axis.width);\n }\n else {\n x1 = axisLeft;\n x2 = cWidth - axis.right;\n y1 = y2 = between(y1, axisTop, axisTop + axis.height);\n }\n e.path = skip && !force ?\n null :\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}\n * An array of axis values where ticks should be placed.\n */\n Axis.prototype.getLinearTickPositions = function (tickInterval, min, max) {\n var roundedMin = correctFloat(Math.floor(min / tickInterval) * tickInterval), roundedMax = correctFloat(Math.ceil(max / tickInterval) * tickInterval), tickPositions = [];\n var 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 Axis.prototype.getMinorTickInterval = function () {\n var options = this.options;\n if (options.minorTicks === true) {\n return pick(options.minorTickInterval, 'auto');\n }\n if (options.minorTicks === false) {\n return null;\n }\n return options.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}\n * An array of axis values where ticks should be placed.\n */\n Axis.prototype.getMinorTickPositions = function () {\n var axis = this, options = axis.options, tickPositions = axis.tickPositions, minorTickInterval = axis.minorTickInterval, pointRangePadding = axis.pointRangePadding || 0, min = axis.min - pointRangePadding, // #1498\n max = axis.max + pointRangePadding, // #1498\n range = max - min;\n var 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 var logarithmic_1 = axis.logarithmic;\n if (logarithmic_1) {\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_1.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 * @private\n * @function Highcharts.Axis#adjustForMinRange\n */\n Axis.prototype.adjustForMinRange = function () {\n var axis = this, options = axis.options, log = axis.logarithmic;\n var min = axis.min, max = axis.max, zoomOffset, spaceAvailable, closestDataRange = 0, i, distance, xData, loopLength, minArgs, maxArgs, minRange;\n // Set the automatic minimum range based on the closest point distance\n if (axis.isXAxis &&\n typeof axis.minRange === 'undefined' &&\n !log) {\n if (defined(options.min) ||\n defined(options.max) ||\n defined(options.floor) ||\n defined(options.ceiling)) {\n axis.minRange = null; // don't do this again\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 axis.series.forEach(function (series) {\n xData = series.xData;\n loopLength = series.xIncrement ? 1 : xData.length - 1;\n if (xData.length > 1) {\n for (i = loopLength; i > 0; i--) {\n distance = xData[i] - xData[i - 1];\n if (!closestDataRange ||\n distance < closestDataRange) {\n closestDataRange = distance;\n }\n }\n }\n });\n axis.minRange = Math.min(closestDataRange * 5, axis.dataMax - axis.dataMin);\n }\n }\n // if minRange is exceeded, adjust\n if (max - min < axis.minRange) {\n spaceAvailable =\n axis.dataMax - axis.dataMin >=\n axis.minRange;\n minRange = axis.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 pick(options.min, min - zoomOffset)\n ];\n // If space is available, stay within the data range\n if (spaceAvailable) {\n minArgs[2] = axis.logarithmic ?\n axis.logarithmic.log2lin(axis.dataMin) :\n axis.dataMin;\n }\n min = arrayMax(minArgs);\n maxArgs = [\n min + minRange,\n pick(options.max, min + minRange)\n ];\n // If space is availabe, stay within the data range\n if (spaceAvailable) {\n maxArgs[2] = log ?\n log.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] = pick(options.min, max - minRange);\n min = arrayMax(minArgs);\n }\n }\n // Record modified extremes\n axis.min = min;\n axis.max = max;\n };\n /**\n * Find the closestPointRange across all series.\n *\n * @private\n * @function Highcharts.Axis#getClosest\n */\n Axis.prototype.getClosest = function () {\n var ret;\n if (this.categories) {\n ret = 1;\n }\n else {\n this.series.forEach(function (series) {\n var seriesClosest = series.closestPointRange, visible = series.visible ||\n !series.chart.options.chart.ignoreHiddenSeries;\n if (!series.noSharedTooltip &&\n defined(seriesClosest) &&\n visible) {\n ret = defined(ret) ?\n Math.min(ret, seriesClosest) :\n seriesClosest;\n }\n });\n }\n return ret;\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 * @private\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 Axis.prototype.nameToX = function (point) {\n var explicitCategories = isArray(this.options.categories), names = explicitCategories ? this.categories : this.names;\n var nameX = point.options.x, x;\n point.series.requireSorting = false;\n if (!defined(nameX)) {\n nameX = this.options.uniqueNames && names ?\n (explicitCategories ?\n names.indexOf(point.name) :\n pick(names.keys[point.name], -1)) :\n point.series.autoIncrement();\n }\n if (nameX === -1) { // Not found in currenct categories\n if (!explicitCategories && names) {\n x = names.length;\n }\n }\n else {\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 // Backwards mapping is much faster than array searching (#7725)\n this.names.keys[point.name] = x;\n }\n else if (point.x) {\n x = point.x; // #17438\n }\n return x;\n };\n /**\n * When changes have been done to series data, update the axis.names.\n *\n * @private\n * @function Highcharts.Axis#updateNames\n */\n Axis.prototype.updateNames = function () {\n var axis = this, names = this.names, i = names.length;\n if (i > 0) {\n Object.keys(names.keys).forEach(function (key) {\n delete (names.keys)[key];\n });\n names.length = 0;\n this.minRange = this.userMinRange; // Reset\n (this.series || []).forEach(function (series) {\n // Reset incrementer (#5928)\n series.xIncrement = null;\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, series.xData.length - 1);\n series.processData();\n series.generatePoints();\n }\n series.data.forEach(function (point, i) {\n var x;\n if (point &&\n point.options &&\n typeof point.name !== 'undefined' // #9562\n ) {\n x = axis.nameToX(point);\n if (typeof x !== 'undefined' && x !== point.x) {\n point.x = x;\n series.xData[i] = x;\n }\n }\n });\n });\n }\n };\n /**\n * Update translation information.\n *\n * @private\n * @function Highcharts.Axis#setAxisTranslation\n *\n * @emits Highcharts.Axis#event:afterSetAxisTranslation\n */\n Axis.prototype.setAxisTranslation = function () {\n var axis = this, range = axis.max - axis.min, linkedParent = axis.linkedParent, hasCategories = !!axis.categories, isXAxis = axis.isXAxis;\n var 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 var 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 var isPointPlacementAxis = series.is('xrange') ?\n !isXAxis :\n isXAxis;\n // minPointOffset is the value padding to the left of\n // the axis in order to make room for points with a\n // pointRange, typically columns. When the\n // pointPlacement option is 'between' or 'on', this\n // 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 && 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 // pointRange means the width reserved for each point, like in a\n // column chart\n axis.pointRange = Math.min(pointRange, axis.single && hasCategories ? 1 : range);\n // closestPointRange means the closest distance between points. In\n // columns it is mostly equal to pointRange, but in lines pointRange\n // 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 * @private\n * @function Highcharts.Axis#minFromRange\n */\n Axis.prototype.minFromRange = function () {\n var axis = this;\n return axis.max - axis.range;\n };\n /**\n * Set the tick positions to round values and optionally extend the extremes\n * to the nearest tick.\n *\n * @private\n * @function Highcharts.Axis#setTickInterval\n *\n * @param {boolean} secondPass\n * TO-DO: parameter description\n *\n * @emits Highcharts.Axis#event:foundExtremes\n */\n Axis.prototype.setTickInterval = function (secondPass) {\n var axis = this, chart = axis.chart, log = axis.logarithmic, options = axis.options, isXAxis = axis.isXAxis, isLinked = axis.isLinked, tickPixelIntervalOption = options.tickPixelInterval, categories = axis.categories, softThreshold = axis.softThreshold;\n var maxPadding = options.maxPadding, minPadding = options.minPadding, length, linkedParentExtremes, \n // Only non-negative tickInterval is valid, #12961\n tickIntervalOption = isNumber(options.tickInterval) && options.tickInterval >= 0 ?\n options.tickInterval : void 0, threshold = isNumber(axis.threshold) ? axis.threshold : null, thresholdMin, thresholdMax, hardMin, hardMax;\n if (!axis.dateTime && !categories && !isLinked) {\n this.getTickAmount();\n }\n // Min or max set either by zooming/setExtremes or initial options\n hardMin = pick(axis.userMin, options.min);\n hardMax = pick(axis.userMax, options.max);\n // Linked axis gets the extremes from the parent axis\n if (isLinked) {\n axis.linkedParent = chart[axis.coll][options.linkedTo];\n linkedParentExtremes = axis.linkedParent.getExtremes();\n axis.min = pick(linkedParentExtremes.min, linkedParentExtremes.dataMin);\n axis.max = pick(linkedParentExtremes.max, linkedParentExtremes.dataMax);\n if (options.type !== axis.linkedParent.options.type) {\n // Can't link axes of different type\n error(11, 1, chart);\n }\n // Initial min and max from the extreme data values\n }\n else {\n // Adjust to hard threshold\n if (softThreshold && defined(threshold)) {\n if (axis.dataMin >= threshold) {\n thresholdMin = threshold;\n minPadding = 0;\n }\n else if (axis.dataMax <= threshold) {\n thresholdMax = threshold;\n maxPadding = 0;\n }\n }\n axis.min = pick(hardMin, thresholdMin, axis.dataMin);\n axis.max = pick(hardMax, thresholdMax, axis.dataMax);\n }\n if (log) {\n if (axis.positiveValuesOnly &&\n !secondPass &&\n Math.min(axis.min, pick(axis.dataMin, axis.min)) <= 0) { // #978\n // Can't plot negative values on log axis\n error(10, 1, chart);\n }\n // The correctFloat cures #934, float errors on full tens. But it\n // was too aggressive for #4360 because of conversion back to lin,\n // therefore use precision 15.\n axis.min = correctFloat(log.log2lin(axis.min), 16);\n axis.max = correctFloat(log.log2lin(axis.max), 16);\n }\n // handle zoomed range\n if (axis.range && defined(axis.max)) {\n // #618, #6773:\n axis.userMin = axis.min = hardMin =\n Math.max(axis.dataMin, axis.minFromRange());\n axis.userMax = hardMax = axis.max;\n axis.range = null; // don't use it when running setExtremes\n }\n // Hook for Highcharts Stock Scroller.\n // Consider combining with beforePadding.\n fireEvent(axis, 'foundExtremes');\n // Hook for adjusting this.min and this.max. Used by bubble series.\n if (axis.beforePadding) {\n axis.beforePadding();\n }\n // adjust min and max for the minimum range\n axis.adjustForMinRange();\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 && axis.stacking.usePercentage) &&\n !isLinked &&\n defined(axis.min) &&\n defined(axis.max)) {\n length = axis.max - axis.min;\n if (length) {\n if (!defined(hardMin) && minPadding) {\n axis.min -= length * minPadding;\n }\n if (!defined(hardMax) && maxPadding) {\n axis.max += length * maxPadding;\n }\n }\n }\n // Handle options for floor, ceiling, softMin and softMax (#6359)\n if (!isNumber(axis.userMin)) {\n if (isNumber(options.softMin) && options.softMin < axis.min) {\n axis.min = hardMin = options.softMin; // #6894\n }\n if (isNumber(options.floor)) {\n axis.min = Math.max(axis.min, options.floor);\n }\n }\n if (!isNumber(axis.userMax)) {\n if (isNumber(options.softMax) && options.softMax > axis.max) {\n axis.max = hardMax = options.softMax; // #6894\n }\n if (isNumber(options.ceiling)) {\n axis.max = Math.min(axis.max, options.ceiling);\n }\n }\n // When the threshold is soft, adjust the extreme value only if the data\n // extreme and the padded extreme land on either side of the threshold.\n // For example, a series of [0, 1, 2, 3] would make the yAxis add a tick\n // for -1 because of the default minPadding and startOnTick options.\n // This is prevented by the softThreshold option.\n if (softThreshold && defined(axis.dataMin)) {\n threshold = threshold || 0;\n if (!defined(hardMin) &&\n axis.min < threshold &&\n axis.dataMin >= threshold) {\n axis.min = axis.options.minRange ?\n Math.min(threshold, axis.max -\n axis.minRange) :\n threshold;\n }\n else if (!defined(hardMax) &&\n axis.max > threshold &&\n axis.dataMax <= threshold) {\n axis.max = axis.options.minRange ?\n Math.max(threshold, axis.min +\n axis.minRange) :\n threshold;\n }\n }\n // If min is bigger than highest, or if max less than lowest value, the\n // chart should not render points. (#14417)\n if (isNumber(axis.min) &&\n isNumber(axis.max) &&\n !this.chart.polar &&\n (axis.min > axis.max)) {\n if (defined(axis.options.min)) {\n axis.max = axis.min;\n }\n else if (defined(axis.options.max)) {\n axis.min = axis.max;\n }\n }\n // get tickInterval\n if (axis.min === axis.max ||\n typeof axis.min === 'undefined' ||\n typeof axis.max === 'undefined') {\n axis.tickInterval = 1;\n }\n else if (isLinked &&\n axis.linkedParent &&\n !tickIntervalOption &&\n tickPixelIntervalOption ===\n axis.linkedParent.options.tickPixelInterval) {\n axis.tickInterval = tickIntervalOption =\n axis.linkedParent.tickInterval;\n }\n else {\n axis.tickInterval = pick(tickIntervalOption, this.tickAmount ?\n ((axis.max - axis.min) /\n Math.max(this.tickAmount - 1, 1)) :\n void 0, \n // For categoried 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 (axis.max - axis.min) *\n 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 var hasExtremesChanged_1 = axis.min !==\n (axis.old && axis.old.min) ||\n axis.max !== (axis.old && 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.forceCropping());\n series.processData(hasExtremesChanged_1);\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: hasExtremesChanged_1 });\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 var 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 axis.dateTime &&\n !axis.series.some(function (s) { return s.noSharedTooltip; }) ?\n axis.closestPointRange : 0);\n if (!tickIntervalOption && axis.tickInterval < minTickInterval) {\n axis.tickInterval = minTickInterval;\n }\n // For linear axes, normalize the interval\n if (!axis.dateTime && !axis.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 * @private\n * @function Highcharts.Axis#setTickPositions\n *\n * @emits Highcharts.Axis#event:afterSetTickPositions\n */\n Axis.prototype.setTickPositions = function () {\n var axis = this, options = this.options, tickPositionsOption = options.tickPositions, tickPositioner = options.tickPositioner, minorTickIntervalOption = this.getMinorTickInterval(), hasVerticalPanning = this.hasVerticalPanning(), isColorAxis = this.coll === 'colorAxis', startOnTick = ((isColorAxis || !hasVerticalPanning) && options.startOnTick), endOnTick = ((isColorAxis || !hasVerticalPanning) && options.endOnTick);\n var tickPositions = [], tickPositionerResult;\n // Set the tickmarkOffset\n this.tickmarkOffset = (this.categories &&\n options.tickmarkPlacement === 'between' &&\n this.tickInterval === 1) ? 0.5 : 0; // #3202\n // get minorTickInterval\n this.minorTickInterval =\n minorTickIntervalOption === 'auto' &&\n this.tickInterval ?\n this.tickInterval / 5 :\n minorTickIntervalOption;\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 parseInt(this.min, 10) === this.min ||\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 || !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 && 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 var startingTickInterval = this.tickInterval;\n var 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]);\n if (tickPositionerResult) {\n tickPositions = tickPositionerResult;\n }\n }\n }\n this.tickPositions = tickPositions;\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 // Substract 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(function (s) {\n return (s.is('heatmap') && s.options.pointPlacement === 'between');\n })) {\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 * @private\n * @function Highcharts.Axis#trimTicks\n *\n * @param {Array} 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 Axis.prototype.trimTicks = function (tickPositions, startOnTick, endOnTick) {\n var roundedMin = tickPositions[0], roundedMax = tickPositions[tickPositions.length - 1], minPointOffset = (!this.isOrdinal && this.minPointOffset) || 0; // (#12716)\n fireEvent(this, 'trimTicks');\n if (!this.isLinked) {\n if (startOnTick && roundedMin !== -Infinity) { // #6502\n this.min = roundedMin;\n }\n else {\n while (this.min - minPointOffset > tickPositions[0]) {\n tickPositions.shift();\n }\n }\n if (endOnTick) {\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 * @private\n * @function Highcharts.Axis#alignToOthers\n *\n * @return {boolean|undefined}\n * True if there are other axes.\n */\n Axis.prototype.alignToOthers = function () {\n var axis = this, alignedAxes = [this], options = axis.options, alignThresholds = (this.coll === 'yAxis' &&\n this.chart.options.chart.alignThresholds), thresholdAlignments = [];\n var hasOther;\n axis.thresholdAlignment = void 0;\n if ((\n // Only if alignTicks or alignThresholds is true\n (this.chart.options.chart.alignTicks !== false &&\n options.alignTicks) || (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 var getKey_1 = function (axis) {\n var horiz = axis.horiz, options = axis.options;\n return [\n horiz ? options.left : options.top,\n options.width,\n options.height,\n options.pane\n ].join(',');\n };\n var thisKey_1 = getKey_1(this);\n this.chart[this.coll].forEach(function (otherAxis) {\n var series = otherAxis.series;\n if (\n // #4442\n series.length &&\n series.some(function (s) { return s.visible; }) &&\n otherAxis !== axis &&\n getKey_1(otherAxis) === thisKey_1) {\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(function (otherAxis) {\n var 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 var thresholdAlignment_1 = thresholdAlignments.length > 1 ?\n thresholdAlignments.reduce(function (sum, n) { return (sum += n); }, 0) / thresholdAlignments.length :\n void 0;\n alignedAxes.forEach(function (axis) {\n axis.thresholdAlignment = thresholdAlignment_1;\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 * @private\n * @function Highcharts.Axis#getThresholdAlignment\n */\n Axis.prototype.getThresholdAlignment = function (callerAxis) {\n if (!isNumber(this.dataMin) ||\n (this !== callerAxis &&\n this.series.some(function (s) { return (s.isDirty || s.isDirtyData); }))) {\n this.getSeriesExtremes();\n }\n if (isNumber(this.threshold)) {\n var 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 * @private\n * @function Highcharts.Axis#getTickAmount\n */\n Axis.prototype.getTickAmount = function () {\n var axis = this, options = this.options, tickPixelInterval = options.tickPixelInterval;\n var 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 * @private\n * @function Highcharts.Axis#adjustTickAmount\n */\n Axis.prototype.adjustTickAmount = function () {\n var axis = this, finalTickAmt = axis.finalTickAmt, max = axis.max, min = axis.min, options = axis.options, tickPositions = axis.tickPositions, tickAmount = axis.tickAmount, thresholdAlignment = axis.thresholdAlignment, currentTickAmount = tickPositions && tickPositions.length, threshold = pick(axis.threshold, axis.softThreshold ? 0 : null);\n var len, i, tickInterval = axis.tickInterval, thresholdTickIndex;\n var \n // Extend the tickPositions by appending a position\n append = function () { return tickPositions.push(correctFloat(tickPositions[tickPositions.length - 1] +\n tickInterval)); }, \n // Extend the tickPositions by prepending a position\n prepend = function () { return 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.5 ?\n Math.ceil(thresholdAlignment * (tickAmount - 1)) :\n Math.floor(thresholdAlignment * (tickAmount - 1));\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 var adjustExtremes = function () {\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 * @private\n * @function Highcharts.Axis#setScale\n *\n * @emits Highcharts.Axis#event:afterSetScale\n */\n Axis.prototype.setScale = function () {\n var axis = this;\n var isDirtyData = false, isXAxisDirty = false;\n axis.series.forEach(function (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 && series.xAxis.isDirty) ||\n false);\n });\n // set the new axisLength\n axis.setAxisSize();\n var isDirtyAxisLength = axis.len !== (axis.old && 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 && axis.old.userMin) ||\n axis.userMax !== (axis.old && axis.old.userMax) ||\n axis.alignToOthers()) {\n if (axis.stacking) {\n axis.stacking.resetStacks();\n axis.stacking.buildStacks();\n }\n axis.forceRedraw = false;\n // get data extremes if needed\n axis.getSeriesExtremes();\n // get fixed positions based on tickInterval\n axis.setTickInterval();\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 && axis.old.min) ||\n axis.max !== (axis.old && axis.old.max);\n }\n }\n else if (axis.stacking) {\n axis.stacking.cleanStacks();\n }\n // Recalculate panning state object, when the data\n // has changed. It is required when vertical panning is enabled.\n if (isDirtyData && axis.panningState) {\n axis.panningState.isDirty = true;\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} [newMin]\n * The new minimum value.\n *\n * @param {number} [newMax]\n * The new maximum value.\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} [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 Axis.prototype.setExtremes = function (newMin, newMax, redraw, animation, eventArguments) {\n var axis = this, chart = axis.chart;\n redraw = pick(redraw, true); // defaults to true\n axis.series.forEach(function (serie) {\n delete serie.kdTree;\n });\n // Extend the arguments with min and max\n eventArguments = extend(eventArguments, {\n min: newMin,\n max: newMax\n });\n // Fire the event\n fireEvent(axis, 'setExtremes', eventArguments, function () {\n axis.userMin = newMin;\n axis.userMax = newMax;\n axis.eventArgs = eventArguments;\n if (redraw) {\n chart.redraw(animation);\n }\n });\n };\n /**\n * Overridable method for zooming chart. Pulled out in a separate method to\n * allow overriding in stock charts.\n *\n * @private\n * @function Highcharts.Axis#zoom\n */\n Axis.prototype.zoom = function (newMin, newMax) {\n var axis = this, dataMin = this.dataMin, dataMax = this.dataMax, options = this.options, min = Math.min(dataMin, pick(options.min, dataMin)), max = Math.max(dataMax, pick(options.max, dataMax)), evt = {\n newMin: newMin,\n newMax: newMax\n };\n fireEvent(this, 'zoom', evt, function (e) {\n // Use e.newMin and e.newMax - event handlers may have altered them\n var newMin = e.newMin, newMax = e.newMax;\n if (newMin !== axis.min || newMax !== axis.max) { // #5790\n // Prevent pinch zooming out of range. Check for defined is for\n // #1946. #1734.\n if (!axis.allowZoomOutside) {\n // #6014, sometimes newMax will be smaller than min (or\n // newMin will be larger than max).\n if (defined(dataMin)) {\n if (newMin < min) {\n newMin = min;\n }\n if (newMin > max) {\n newMin = max;\n }\n }\n if (defined(dataMax)) {\n if (newMax < min) {\n newMax = min;\n }\n if (newMax > max) {\n newMax = max;\n }\n }\n }\n // In full view, displaying the reset zoom button is not\n // required\n axis.displayBtn = (typeof newMin !== 'undefined' ||\n typeof newMax !== 'undefined');\n // Do it\n axis.setExtremes(newMin, newMax, false, void 0, { trigger: 'zoom' });\n }\n e.zoomed = true;\n });\n return evt.zoomed;\n };\n /**\n * Update the axis metrics.\n *\n * @private\n * @function Highcharts.Axis#setAxisSize\n */\n Axis.prototype.setAxisSize = function () {\n var 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 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 Axis.prototype.getExtremes = function () {\n var 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 Axis.prototype.getThreshold = function (threshold) {\n var 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 * @private\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 Axis.prototype.autoLabelAlign = function (rotation) {\n var angle = (pick(rotation, 0) - (this.side * 90) + 720) % 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 * @private\n * @function Highcharts.Axis#tickSize\n *\n * @param {string} [prefix]\n * 'tick' or 'minorTick'\n *\n * @return {Array|undefined}\n * An array of tickLength and tickWidth\n */\n Axis.prototype.tickSize = function (prefix) {\n var 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 var 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 var e = { tickSize: tickSize };\n fireEvent(this, 'afterTickSize', e);\n return e.tickSize;\n };\n /**\n * Return the size of the labels.\n *\n * @private\n * @function Highcharts.Axis#labelMetrics\n */\n Axis.prototype.labelMetrics = function () {\n var index = this.tickPositions && this.tickPositions[0] || 0;\n return this.chart.renderer.fontMetrics(this.options.labels.style.fontSize, this.ticks[index] && this.ticks[index].label);\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 * @private\n * @function Highcharts.Axis#unsquish\n */\n Axis.prototype.unsquish = function () {\n var labelOptions = this.options.labels, horiz = this.horiz, tickInterval = this.tickInterval, slotSize = this.len / (((this.categories ? 1 : 0) +\n this.max -\n this.min) /\n tickInterval), rotationOption = labelOptions.rotation, labelMetrics = this.labelMetrics(), 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 var step = spaceNeeded / (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 var 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 var step = void 0, score = void 0;\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 (var _i = 0, autoRotation_1 = autoRotation; _i < autoRotation_1.length; _i++) {\n var rot = autoRotation_1[_i];\n if (rot === rotationOption ||\n (rot && rot >= -90 && rot <= 90)) { // #3891\n step = getStep(Math.abs(labelMetrics.h / 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(labelMetrics.h);\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 * @private\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 Axis.prototype.getSlotWidth = function (tick) {\n // #5086, #1580, #1931\n var 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) {\n if (labelOptions.rotation) { // #4415\n return 0;\n }\n return ((this.staggerLines || 1) * this.len) / slotCount;\n }\n if (!horiz) {\n // #7028\n var cssWidth = labelOptions.style.width;\n if (cssWidth !== void 0) {\n return parseInt(String(cssWidth), 10);\n }\n if (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 * @private\n * @function Highcharts.Axis#renderUnsquish\n */\n Axis.prototype.renderUnsquish = function () {\n var 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 - 2 * labelOptions.padding)), attr = {}, labelMetrics = this.labelMetrics(), textOverflowOption = labelStyleOptions.textOverflow;\n var commonWidth, commonTextOverflow, maxLabelLength = 0, label, i, pos;\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 var tick = ticks[tickPosition];\n // Replace label - sorting animation\n if (tick.movedLabel) {\n tick.replaceMovedLabel();\n }\n if (tick &&\n tick.label &&\n tick.label.textPxLength > maxLabelLength) {\n maxLabelLength = tick.label.textPxLength;\n }\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 if (!textOverflowOption) {\n commonTextOverflow = 'clip';\n // On vertical axis, only allow word wrap if there is room\n // for more lines.\n i = tickPositions.length;\n while (!horiz && i--) {\n pos = tickPositions[i];\n label = ticks[pos].label;\n if (label) {\n // Reset ellipsis in order to get the correct\n // bounding box (#4070)\n if (label.styles &&\n label.styles.textOverflow === 'ellipsis') {\n label.css({ textOverflow: 'clip' });\n // Set the correct width in order to read\n // the bounding box height (#4678, #5034)\n }\n else if (label.textPxLength > slotWidth) {\n label.css({ width: slotWidth + 'px' });\n }\n if (label.getBBox().height > (this.len / tickPositions.length -\n (labelMetrics.h - labelMetrics.f))) {\n label.specificTextOverflow = 'ellipsis';\n }\n }\n }\n }\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 (!textOverflowOption) {\n commonTextOverflow = 'ellipsis';\n }\n }\n // Set the explicit or automatic label alignment\n this.labelAlign = labelOptions.align ||\n this.autoLabelAlign(this.labelRotation);\n if (this.labelAlign) {\n attr.align = this.labelAlign;\n }\n // Apply general and specific CSS\n tickPositions.forEach(function (pos) {\n var tick = ticks[pos], label = tick && 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 ||\n // Resetting CSS, #4928\n label.element.tagName === 'SPAN')) {\n css.width = commonWidth + 'px';\n if (!textOverflowOption) {\n css.textOverflow = (label.specificTextOverflow ||\n commonTextOverflow);\n }\n label.css(css);\n // Reset previously shortened label (#8210)\n }\n else if (label.styles &&\n label.styles.width &&\n !css.width &&\n !widthOption) {\n label.css({ width: null });\n }\n delete label.specificTextOverflow;\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 Axis.prototype.hasData = function () {\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 Axis.prototype.addTitle = function (display) {\n var axis = this, renderer = axis.chart.renderer, horiz = axis.horiz, opposite = axis.opposite, options = axis.options, axisTitleOptions = options.title, styledMode = axis.chart.styledMode;\n var 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,\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 * @private\n * @function Highcharts.Axis#generateTick\n *\n * @param {number} pos\n * The tick position in axis values.\n *\n * @param {number} [i]\n * The index of the tick in {@link Axis.tickPositions}.\n */\n Axis.prototype.generateTick = function (pos) {\n var 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 * Render the tick labels to a preliminary position to get their sizes\n *\n * @private\n * @function Highcharts.Axis#getOffset\n *\n * @emits Highcharts.Axis#event:afterGetOffset\n */\n Axis.prototype.getOffset = function () {\n var _this = this;\n var axis = this, chart = axis.chart, horiz = axis.horiz, options = axis.options, side = axis.side, ticks = axis.ticks, tickPositions = axis.tickPositions, coll = axis.coll, axisParent = axis.axisParent // Used in color axis\n , renderer = chart.renderer, invertedSide = (chart.inverted && !axis.isZAxis ?\n [1, 0, 3, 2][side] :\n side), hasData = axis.hasData(), axisTitleOptions = options.title, labelOptions = options.labels, axisOffset = chart.axisOffset, clipOffset = chart.clipOffset, directionFactor = [-1, 1, 1, -1][side], className = options.className;\n var showAxis, titleOffset = 0, titleOffsetOption, titleMargin = 0, labelOffset = 0, // reset\n labelOffsetPadded, lineHeightCorrection;\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 // Create the axisGroup and gridGroup elements on first iteration\n if (!axis.axisGroup) {\n var createGroup = function (name, suffix, zIndex) { return renderer.g(name)\n .attr({ zIndex: zIndex })\n .addClass(\"highcharts-\".concat(coll.toLowerCase()).concat(suffix, \" \") +\n (_this.isRadial ? \"highcharts-radial-axis\".concat(suffix, \" \") : '') +\n (className || ''))\n .add(axisParent); };\n axis.gridGroup = createGroup('grid', '-grid', options.gridZIndex);\n axis.axisGroup = createGroup('axis', '', options.zIndex);\n axis.labelGroup = createGroup('axis-labels', '-labels', labelOptions.zIndex);\n }\n if (hasData || axis.isLinked) {\n // Generate ticks\n tickPositions.forEach(function (pos) {\n // i is not used here, but may be used in overrides\n axis.generateTick(pos);\n });\n axis.renderUnsquish();\n // Left side must be align: right and right side must\n // have align: left for labels\n axis.reserveSpaceDefault = (side === 0 ||\n side === 2 ||\n { 1: 'left', 3: 'right' }[side] === axis.labelAlign);\n if (pick(labelOptions.reserveSpace, axis.labelAlign === 'center' ? true : null, axis.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 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 &&\n axisTitleOptions.text &&\n axisTitleOptions.enabled !== false) {\n axis.addTitle(showAxis);\n if (showAxis && 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 * pick(options.offset, axisOffset[side] ? axisOffset[side] + (options.margin || 0) : 0);\n axis.tickRotCorr = axis.tickRotCorr || { x: 0, y: 0 }; // polar\n if (side === 0) {\n lineHeightCorrection = -axis.labelMetrics().h;\n }\n else if (side === 2) {\n lineHeightCorrection = axis.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 pick(labelOptions.y, axis.tickRotCorr.y + directionFactor * 8) :\n labelOptions.x);\n }\n axis.axisTitleMargin = pick(titleOffsetOption, labelOffsetPadded);\n if (axis.getMaxLabelDimensions) {\n axis.maxLabelDimensions = axis.getMaxLabelDimensions(ticks, tickPositions);\n }\n // Due to GridAxis.tickSize, tickSize should be calculated after ticks\n // has rendered.\n if (coll !== 'colorAxis') {\n var tickSize = this.tickSize('tick');\n axisOffset[side] = Math.max(axisOffset[side], (axis.axisTitleMargin || 0) + titleOffset +\n directionFactor * axis.offset, labelOffsetPadded, // #3027\n tickPositions && 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 var clip = !axis.axisLine || options.offset ?\n 0 :\n // #4308, #4371:\n Math.floor(axis.axisLine.strokeWidth() / 2) * 2;\n clipOffset[invertedSide] =\n Math.max(clipOffset[invertedSide], 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 Axis.prototype.getLinePath = function (lineWidth) {\n var 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 Axis.prototype.renderLine = function () {\n if (!this.axisLine) {\n this.axisLine = this.chart.renderer.path()\n .addClass('highcharts-axis-line')\n .add(this.axisGroup);\n if (!this.chart.styledMode) {\n this.axisLine.attr({\n stroke: this.options.lineColor,\n 'stroke-width': this.options.lineWidth,\n zIndex: 7\n });\n }\n }\n };\n /**\n * Position the axis title.\n *\n * @private\n * @function Highcharts.Axis#getTitlePosition\n *\n * @return {Highcharts.PositionObject}\n * X and Y positions for the title.\n */\n Axis.prototype.getTitlePosition = function () {\n // compute anchor points for each of the title align options\n var 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, axisTitle = this.axisTitle, fontMetrics = this.chart.renderer.fontMetrics(axisTitleOptions.style.fontSize, 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 behaviour (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,\n textHeightOvershoot,\n fontMetrics.f,\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 Axis.prototype.renderMinorTick = function (pos, slideIn) {\n var axis = this;\n var 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 Axis.prototype.renderTick = function (pos, i, slideIn) {\n var 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 && 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 * @private\n * @function Highcharts.Axis#render\n *\n * @emits Highcharts.Axis#event:afterRender\n */\n Axis.prototype.render = function () {\n var 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, tickmarkOffset = axis.tickmarkOffset, axisLine = axis.axisLine, showAxis = axis.showAxis, animation = animObject(renderer.globalAnimation);\n var 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 // If the series has data draw the ticks. Else only the line and title\n if (axis.hasData() || isLinked) {\n var slideInTicks_1 = 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_1);\n });\n }\n // Major ticks. Pull out the first item and render it last so that\n // we can get the position of the neighbour label. #808.\n if (tickPositions.length) { // #1300\n tickPositions.forEach(function (pos, i) {\n axis.renderTick(pos, i, slideInTicks_1);\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 var forDestruction = [], delay = animation.duration, destroyInactiveItems = function () {\n var 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 var titleXy = axis.getTitlePosition();\n axisTitle[axisTitle.isNew ? 'attr' : 'animate'](titleXy);\n axisTitle.isNew = false;\n }\n // Stacked totals:\n if (stackLabelOptions && stackLabelOptions.enabled && axis.stacking) {\n axis.stacking.renderStackTotals();\n }\n // End stacked totals\n // Record old scaling for updating/animation\n axis.old = {\n len: axis.len,\n max: axis.max,\n min: axis.min,\n transA: axis.transA,\n userMax: axis.userMax,\n userMin: axis.userMin\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 * @private\n * @function Highcharts.Axis#redraw\n */\n Axis.prototype.redraw = function () {\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 * Returns an array of axis properties, that should be untouched during\n * reinitialization.\n *\n * @private\n * @function Highcharts.Axis#getKeepProps\n */\n Axis.prototype.getKeepProps = function () {\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 * @private\n * @function Highcharts.Axis#destroy\n *\n * @param {boolean} [keepEvents]\n * Whether to preserve events, used internally in Axis.update.\n */\n Axis.prototype.destroy = function (keepEvents) {\n var 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 var i = plotLinesAndBands.length;\n while (i--) { // #1975\n plotLinesAndBands[i].destroy();\n }\n }\n // Destroy elements\n ['axisLine', 'axisTitle', 'axisGroup',\n 'gridGroup', 'labelGroup', 'cross', 'scrollbar'].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 (var 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 Axis.prototype.drawCrosshair = function (e, point) {\n var options = this.crosshair, snap = pick(options && options.snap, true), chart = this.chart;\n var path, pos, categorized, graphic = this.cross, 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 && 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 // 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 && e.chartX,\n chartY: e && 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 // Draw the cross\n if (!graphic) {\n this.cross = graphic = 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 .add();\n // Presentational attributes\n if (!chart.styledMode) {\n graphic.attr({\n stroke: options.color ||\n (categorized ?\n Color\n .parse(\"#ccd6eb\" /* Palette.highlightColor20 */)\n .setOpacity(0.25)\n .get() :\n \"#cccccc\" /* Palette.neutralColor20 */),\n 'stroke-width': pick(options.width, 1)\n }).css({\n 'pointer-events': 'none'\n });\n if (options.dashStyle) {\n graphic.attr({\n dashstyle: options.dashStyle\n });\n }\n }\n }\n graphic.show().attr({\n d: path\n });\n if (categorized && !options.width) {\n graphic.attr({\n 'stroke-width': this.transA\n });\n }\n this.cross.e = e;\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 Axis.prototype.hideCrosshair = function () {\n if (this.cross) {\n this.cross.hide();\n }\n fireEvent(this, 'afterHideCrosshair');\n };\n /**\n * Check whether the chart has vertical panning ('y' or 'xy' type).\n *\n * @private\n * @function Highcharts.Axis#hasVerticalPanning\n */\n Axis.prototype.hasVerticalPanning = function () {\n var panningOptions = this.chart.options.chart.panning;\n return Boolean(panningOptions &&\n panningOptions.enabled && // #14624\n /y/.test(panningOptions.type));\n };\n /**\n * Check whether the given value is a positive valid axis value.\n *\n * @private\n * @function Highcharts.Axis#validatePositiveValue\n *\n * @param {unknown} value\n * The axis value\n */\n Axis.prototype.validatePositiveValue = function (value) {\n return isNumber(value) && value > 0;\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 Axis.prototype.update = function (options, redraw) {\n var 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 Axis.prototype.remove = function (redraw) {\n var chart = this.chart, key = this.coll, // xAxis or yAxis\n axisSeries = this.series;\n var 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[key], this);\n chart[key].forEach(function (axis, i) {\n // Re-index, #1706, #8075\n axis.options.index = axis.userOptions.index = i;\n });\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 Axis.prototype.setTitle = function (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} categories\n * The new categories.\n *\n * @param {boolean} [redraw=true]\n * Whether to redraw the chart.\n */\n Axis.prototype.setCategories = function (categories, redraw) {\n this.update({ categories: categories }, redraw);\n };\n /* *\n *\n * Static Properties\n *\n * */\n Axis.defaultOptions = AxisDefaults.defaultXAxisOptions;\n // Properties to survive after destroy, needed for Axis.update (#4317,\n // #5773, #5881).\n Axis.keepProps = [\n 'extKey',\n 'hcEvents',\n 'names',\n 'series',\n 'userMax',\n 'userMin'\n ];\n return Axis;\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 *\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}\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 * @return {Highcharts.AxisTickPositionsArray}\n */\n/**\n * @interface Highcharts.AxisTickPositionsArray\n * @augments Array\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}\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}\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 * @return {string}\n */\n''; // keeps doclets above in JS file\n","/* *\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport F from '../FormatUtilities.js';\nimport H from '../Globals.js';\nvar deg2rad = H.deg2rad;\nimport U from '../Utilities.js';\nvar clamp = U.clamp, correctFloat = U.correctFloat, defined = U.defined, destroyObjectProperties = U.destroyObjectProperties, extend = U.extend, fireEvent = U.fireEvent, isNumber = U.isNumber, merge = U.merge, objectEach = U.objectEach, pick = U.pick;\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 */\nvar Tick = /** @class */ (function () {\n /* *\n *\n * Constructors\n *\n * */\n function Tick(axis, pos, type, noLabel, parameters) {\n this.isNew = true;\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 * @private\n * @function Highcharts.Tick#addLabel\n */\n Tick.prototype.addLabel = function () {\n var 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 && tick.options.labels, options.labels), tickPositions = axis.tickPositions, isFirst = pos === tickPositions[0], isLast = pos === tickPositions[tickPositions.length - 1], animateLabels = (!labelOptions.step || labelOptions.step === 1) &&\n axis.tickInterval === 1, tickPositionInfo = tickPositions.info;\n var label = tick.label, dateTimeLabelFormat, dateTimeLabelFormats, i;\n // The context value\n var 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 higher rank is set for this\n // position, use that. If not, use the general format.\n if (axis.dateTime) {\n if (tickPositionInfo) {\n dateTimeLabelFormats = chart.time.resolveDTLFormat(options.dateTimeLabelFormats[(!options.grid &&\n tickPositionInfo.higherRanks[pos]) ||\n tickPositionInfo.unitName]);\n dateTimeLabelFormat = dateTimeLabelFormats.main;\n }\n else if (isNumber(value)) { // #1441\n dateTimeLabelFormat = axis.dateTime.getXDateFormat(value, options.dateTimeLabelFormats ||\n {});\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 // Get the string\n var ctx = {\n axis: axis,\n chart: chart,\n dateTimeLabelFormat: dateTimeLabelFormat,\n isFirst: isFirst,\n isLast: isLast,\n pos: pos,\n tick: tick,\n tickPositionInfo: tickPositionInfo,\n value: 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 var labelFormatter = function (ctx) {\n if (labelOptions.formatter) {\n return labelOptions.formatter.call(ctx, ctx);\n }\n if (labelOptions.format) {\n ctx.text = axis.defaultLabelFormatter.call(ctx, ctx);\n return F.format(labelOptions.format, ctx, chart);\n }\n return axis.defaultLabelFormatter.call(ctx, ctx);\n };\n var str = labelFormatter.call(ctx, ctx);\n // Set up conditional formatting based on the format list if existing.\n var list = dateTimeLabelFormats && 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) {\n return;\n }\n }\n label.attr({\n text: ''\n });\n };\n }\n else {\n // #15692\n tick.shortenLabel = void 0;\n }\n // Call only after first render\n if (animateLabels && axis._addedPlotLB) {\n tick.moveLabel(str, labelOptions);\n }\n // First call\n if (!defined(label) && !tick.movedLabel) {\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({ x: 0, y: 0 }, str, labelOptions);\n // Base value to detect change for new calls to getBBox\n tick.rotation = 0;\n // update\n }\n else if (label && label.textStr !== str && !animateLabels) {\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: null });\n }\n label.attr({ text: str });\n label.textPxLength = label.getBBox().width;\n }\n };\n /**\n * Render and return the label of the tick.\n *\n * @private\n * @function Highcharts.Tick#createLabel\n */\n Tick.prototype.createLabel = function (xy, str, labelOptions) {\n var axis = this.axis, chart = axis.chart, label = defined(str) && labelOptions.enabled ?\n chart.renderer\n .text(str, xy.x, xy.y, labelOptions.useHTML)\n .add(axis.labelGroup) :\n null;\n // Un-rotated length\n if (label) {\n // Without position absolute, IE export sometimes is wrong\n if (!chart.styledMode) {\n label.css(merge(labelOptions.style));\n }\n label.textPxLength = label.getBBox().width;\n }\n return label;\n };\n /**\n * Destructor for the tick prototype\n *\n * @private\n * @function Highcharts.Tick#destroy\n */\n Tick.prototype.destroy = function () {\n destroyObjectProperties(this, this.axis);\n };\n /**\n * Gets the x and y positions for ticks in terms of pixels.\n *\n * @private\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 Tick.prototype.getPosition = function (horiz, tickPos, tickmarkOffset, old) {\n var 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, -1e5, 1e5);\n fireEvent(this, 'afterGetPosition', { pos: pos });\n return pos;\n };\n /**\n * Get the x, y position of the tick label\n * @private\n */\n Tick.prototype.getLabelPosition = function (x, y, label, horiz, labelOptions, tickmarkOffset, index, step) {\n var 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), pos = {};\n var yOffset, line;\n if (axis.side === 0) {\n yOffset = label.rotation ? -8 : -label.getBBox().height;\n }\n else if (axis.side === 2) {\n yOffset = rotCorr.y + 8;\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 labelOptions.x +\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 * @private\n * @function Highcharts.Tick#getLabelSize\n */\n Tick.prototype.getLabelSize = function () {\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 * @private\n */\n Tick.prototype.getMarkPath = function (x, y, tickLength, tickWidth, horiz, 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 neighbour label.\n *\n * @private\n * @function Highcharts.Tick#handleOverflow\n */\n Tick.prototype.handleOverflow = function (xy) {\n var 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 = {\n left: 0,\n center: 0.5,\n right: 1\n }[axis.labelAlign || label.attr('align')], labelWidth = label.getBBox().width, slotWidth = axis.getSlotWidth(tick), xCorrection = factor, css = {};\n var 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) {\n if (tick.shortenLabel) {\n tick.shortenLabel();\n }\n else {\n css.width = Math.floor(textWidth) + 'px';\n if (!(labelOptions.style || {}).textOverflow) {\n css.textOverflow = 'ellipsis';\n }\n label.css(css);\n }\n }\n };\n /**\n * Try to replace the label if the same one already exists.\n *\n * @private\n * @function Highcharts.Tick#moveLabel\n */\n Tick.prototype.moveLabel = function (str, labelOptions) {\n var tick = this, label = tick.label, axis = tick.axis, reversed = axis.reversed;\n var moved = false, labelPos, xPos, yPos;\n if (label && label.textStr === str) {\n tick.movedLabel = label;\n moved = true;\n delete tick.label;\n }\n else { // Find a label with the same string\n objectEach(axis.ticks, function (currentTick) {\n if (!moved &&\n !currentTick.isNew &&\n currentTick !== tick &&\n currentTick.label &&\n currentTick.label.textStr === str) {\n tick.movedLabel = currentTick.label;\n moved = true;\n currentTick.labelPos = tick.movedLabel.xy;\n delete currentTick.label;\n }\n });\n }\n // Create new label if the actual one is moved\n if (!moved && (tick.labelPos || label)) {\n labelPos = tick.labelPos || label.xy;\n xPos = axis.horiz ?\n (reversed ? 0 : axis.width + axis.left) : labelPos.x;\n yPos = axis.horiz ?\n labelPos.y : (reversed ? (axis.width + axis.left) : 0);\n tick.movedLabel = tick.createLabel({ x: xPos, y: yPos }, str, labelOptions);\n if (tick.movedLabel) {\n tick.movedLabel.attr({ opacity: 0 });\n }\n }\n };\n /**\n * Put everything in place\n *\n * @private\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 Tick.prototype.render = function (index, old, opacity) {\n var 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, reverseCrisp = ((horiz && x === axis.pos + axis.len) ||\n (!horiz && y === axis.pos)) ? -1 : 1; // #1480, #1687\n var labelOpacity = pick(opacity, tick.label && tick.label.newOpacity, // #15528\n 1);\n opacity = pick(opacity, 1);\n this.isActive = true;\n // Create the grid line\n this.renderGridLine(old, opacity, reverseCrisp);\n // create the tick mark\n this.renderMark(xy, opacity, reverseCrisp);\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 * @private\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 * @param {number} reverseCrisp Modifier for avoiding overlapping 1 or -1\n */\n Tick.prototype.renderGridLine = function (old, opacity, reverseCrisp) {\n var 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 var 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() * reverseCrisp,\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 * @private\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 * @param {number} reverseCrisp Modifier for avoiding overlapping 1 or -1\n */\n Tick.prototype.renderMark = function (xy, opacity, reverseCrisp) {\n var 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 var mark = tick.mark;\n var 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() * reverseCrisp, 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 * @private\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 Tick.prototype.renderLabel = function (xy, old, opacity, index) {\n var 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 var 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 &&\n !labelOptions.step &&\n !labelOptions.rotation &&\n !old &&\n 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 * Replace labels with the moved ones to perform animation. Additionally\n * destroy unused labels.\n *\n * @private\n * @function Highcharts.Tick#replaceMovedLabel\n */\n Tick.prototype.replaceMovedLabel = function () {\n var tick = this, label = tick.label, axis = tick.axis, reversed = axis.reversed;\n var x, y;\n // Animate and destroy\n if (label && !tick.isNew) {\n x = axis.horiz ? (reversed ? axis.left : axis.width + axis.left) : label.xy.x;\n y = axis.horiz ?\n label.xy.y :\n (reversed ? axis.width + axis.top : axis.top);\n label.animate({ x: x, y: y, opacity: 0 }, void 0, label.destroy);\n delete tick.label;\n }\n axis.isDirty = true;\n tick.label = tick.movedLabel;\n delete tick.movedLabel;\n };\n return Tick;\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 * @private\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|undefined}\n*/ /**\n* Set tickmarkOffset for the tick.\n* @name Highcharts.TickParametersObject#tickmarkOffset\n* @type {number|undefined}\n*/\n/**\n * Additonal time tick information.\n *\n * @interface Highcharts.TimeTicksInfoObject\n * @extends Highcharts.TimeNormalizedObject\n */ /**\n* @name Highcharts.TimeTicksInfoObject#higherRanks\n* @type {Array}\n*/ /**\n* @name Highcharts.TimeTicksInfoObject#totalRange\n* @type {number}\n*/\n(''); // keeps doclets above in JS file\n","/* *\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport A from '../Animation/AnimationUtilities.js';\nvar animate = A.animate, animObject = A.animObject, setAnimation = A.setAnimation;\nimport Axis from '../Axis/Axis.js';\nimport D from '../Defaults.js';\nvar defaultOptions = D.defaultOptions, defaultTime = D.defaultTime;\nimport FormatUtilities from '../FormatUtilities.js';\nvar numberFormat = FormatUtilities.numberFormat;\nimport Foundation from '../Foundation.js';\nvar registerEventOptions = Foundation.registerEventOptions;\nimport H from '../Globals.js';\nvar charts = H.charts, doc = H.doc, marginNames = H.marginNames, svg = H.svg, win = H.win;\nimport Legend from '../Legend/Legend.js';\nimport MSPointer from '../MSPointer.js';\nimport Pointer from '../Pointer.js';\nimport RendererRegistry from '../Renderer/RendererRegistry.js';\nimport SeriesRegistry from '../Series/SeriesRegistry.js';\nvar seriesTypes = SeriesRegistry.seriesTypes;\nimport SVGRenderer from '../Renderer/SVG/SVGRenderer.js';\nimport Time from '../Time.js';\nimport U from '../Utilities.js';\nimport AST from '../Renderer/HTML/AST.js';\nvar addEvent = U.addEvent, attr = U.attr, cleanRecursively = U.cleanRecursively, createElement = U.createElement, css = U.css, defined = U.defined, discardElement = U.discardElement, erase = U.erase, error = U.error, extend = U.extend, find = U.find, fireEvent = U.fireEvent, getStyle = U.getStyle, isArray = U.isArray, isNumber = U.isNumber, isObject = U.isObject, isString = U.isString, merge = U.merge, objectEach = U.objectEach, pick = U.pick, pInt = U.pInt, relativeLength = U.relativeLength, removeEvent = U.removeEvent, splat = U.splat, syncTimeout = U.syncTimeout, uniqueKey = U.uniqueKey;\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} [callback]\n * Function to run when the chart has loaded and 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.\n */\nvar Chart = /** @class */ (function () {\n function Chart(a, b, c) {\n this.axes = void 0;\n this.axisOffset = void 0;\n this.bounds = void 0;\n this.chartHeight = void 0;\n this.chartWidth = void 0;\n this.clipBox = void 0;\n this.colorCounter = void 0;\n this.container = void 0;\n this.eventOptions = void 0;\n this.index = void 0;\n this.isResizing = void 0;\n this.labelCollectors = void 0;\n this.legend = void 0;\n this.margin = void 0;\n this.numberFormatter = void 0;\n this.options = void 0;\n this.plotBox = void 0;\n this.plotHeight = void 0;\n this.plotLeft = void 0;\n this.plotTop = void 0;\n this.plotWidth = void 0;\n this.pointCount = void 0;\n this.pointer = void 0;\n this.renderer = void 0;\n this.renderTo = void 0;\n this.series = void 0;\n this.sharedClips = {};\n this.spacing = void 0;\n this.spacingBox = void 0;\n this.symbolCounter = void 0;\n this.time = void 0;\n this.titleOffset = void 0;\n this.userOptions = void 0;\n this.xAxis = void 0;\n this.yAxis = void 0;\n this.getArgs(a, b, c);\n }\n /**\n * Factory function for basic charts.\n *\n * @example\n * // Render a chart in to div#container\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 * @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} [callback]\n * Function to run when the chart has loaded and 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.\n *\n * @return {Highcharts.Chart}\n * Returns the Chart object.\n */\n Chart.chart = function (a, b, c) {\n return new Chart(a, b, c);\n };\n /* *\n *\n * Functions\n *\n * */\n /**\n * Handle the arguments passed to the constructor.\n *\n * @private\n * @function Highcharts.Chart#getArgs\n *\n * @param {...Array<*>} arguments\n * All arguments for the constructor.\n *\n * @emits Highcharts.Chart#event:init\n * @emits Highcharts.Chart#event:afterInit\n */\n Chart.prototype.getArgs = function (a, b, c) {\n // Remove the optional first argument, renderTo, and\n // set it on this.\n if (isString(a) || a.nodeName) {\n this.renderTo = a;\n this.init(b, c);\n }\n else {\n this.init(a, b);\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} [callback]\n * Function to run when the chart has loaded and and all external\n * images are loaded.\n *\n *\n * @emits Highcharts.Chart#event:init\n * @emits Highcharts.Chart#event:afterInit\n */\n Chart.prototype.init = function (userOptions, callback) {\n // Handle regular options\n var userPlotOptions = userOptions.plotOptions || {};\n // Fire the event with a default function\n fireEvent(this, 'init', { args: arguments }, function () {\n var options = merge(defaultOptions, userOptions); // do the merge\n var optionsChart = options.chart;\n // Override (by copy of user options) or clear tooltip options\n // in chart.options.plotOptions (#6218)\n objectEach(options.plotOptions, function (typeOptions, type) {\n if (isObject(typeOptions)) { // #8766\n typeOptions.tooltip = (userPlotOptions[type] && // override by copy:\n merge(userPlotOptions[type].tooltip)) || void 0; // or clear\n }\n });\n // User options have higher priority than default options\n // (#6218). In case of exporting: path is changed\n options.tooltip.userOptions = (userOptions.chart &&\n userOptions.chart.forExport &&\n userOptions.tooltip.userOptions) || userOptions.tooltip;\n /**\n * The original options given to the constructor or a chart factory\n * like {@link Highcharts.chart} and {@link Highcharts.stockChart}.\n *\n * @name Highcharts.Chart#userOptions\n * @type {Highcharts.Options}\n */\n this.userOptions = userOptions;\n this.margin = [];\n this.spacing = [];\n // Pixel data bounds for touch zoom\n this.bounds = { h: {}, v: {} };\n // An array of functions that returns labels that should be\n // considered for anti-collision\n this.labelCollectors = [];\n this.callback = callback;\n this.isResizing = 0;\n var zooming = optionsChart.zooming = optionsChart.zooming || {};\n // Other options have no default so just pick\n if (userOptions.chart && !userOptions.chart.zooming) {\n zooming.resetButton = optionsChart.resetZoomButton;\n }\n zooming.key = pick(zooming.key, optionsChart.zoomKey);\n zooming.pinchType = pick(zooming.pinchType, optionsChart.pinchType);\n zooming.singleTouch = pick(zooming.singleTouch, optionsChart.zoomBySingleTouch);\n zooming.type = pick(zooming.type, optionsChart.zoomType);\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}\n */\n this.axes = [];\n /**\n * All the current series in the chart.\n *\n * @name Highcharts.Chart#series\n * @type {Array}\n */\n this.series = [];\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 =\n userOptions.time && Object.keys(userOptions.time).length ?\n new Time(userOptions.time) :\n H.time;\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;\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 var 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 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}\n */\n chart.xAxis = [];\n /**\n * A collection of the Y axes in the chart.\n *\n * @name Highcharts.Chart#yAxis\n * @type {Array}\n *\n * @todo\n * Make events official: Fire the event `afterInit`.\n */\n chart.yAxis = [];\n chart.pointCount = chart.colorCounter = chart.symbolCounter = 0;\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 /**\n * Internal function to unitialize an individual series.\n *\n * @private\n * @function Highcharts.Chart#initSeries\n */\n Chart.prototype.initSeries = function (options) {\n var chart = this, optionsChart = chart.options.chart, type = (options.type ||\n optionsChart.type ||\n optionsChart.defaultSeriesType), SeriesClass = seriesTypes[type];\n // No such series type\n if (!SeriesClass) {\n error(17, true, chart, { missingModuleFor: type });\n }\n var series = new SeriesClass();\n if (typeof series.init === 'function') {\n series.init(chart, options);\n }\n return series;\n };\n /**\n * Internal function to set data for all series with enabled sorting.\n *\n * @private\n * @function Highcharts.Chart#setSeriesData\n */\n Chart.prototype.setSeriesData = function () {\n this.getSeriesOrderByLinks().forEach(function (series) {\n // We need to set data for series with sorting after series init\n if (!series.points && !series.data && series.enabledDataSorting) {\n series.setData(series.options.data, false);\n }\n });\n };\n /**\n * Sort and return chart series in order depending on the number of linked\n * series.\n *\n * @private\n * @function Highcharts.Series#getSeriesOrderByLinks\n */\n Chart.prototype.getSeriesOrderByLinks = function () {\n return this.series.concat().sort(function (a, b) {\n if (a.linkedSeries.length || b.linkedSeries.length) {\n return b.linkedSeries.length - a.linkedSeries.length;\n }\n return 0;\n });\n };\n /**\n * Order all series above a given index. When series are added and ordered\n * by configuration, only the last series is handled (#248, #1123, #2456,\n * #6112). This function is called on series initialization and destroy.\n *\n * @private\n * @function Highcharts.Series#orderSeries\n * @param {number} [fromIndex]\n * If this is given, only the series above this index are handled.\n */\n Chart.prototype.orderSeries = function (fromIndex) {\n var series = this.series;\n for (var i = (fromIndex || 0), iEnd = series.length; i < iEnd; ++i) {\n if (series[i]) {\n /**\n * Contains the series' index in the `Chart.series` array.\n *\n * @name Highcharts.Series#index\n * @type {number}\n * @readonly\n */\n series[i].index = i;\n series[i].name = series[i].getName();\n }\n }\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 Chart.prototype.isInsidePlot = function (plotX, plotY, options) {\n var _a;\n if (options === void 0) { options = {}; }\n var _b = this, inverted = _b.inverted, plotBox = _b.plotBox, plotLeft = _b.plotLeft, plotTop = _b.plotTop, scrollablePlotBox = _b.scrollablePlotBox;\n var scrollLeft = 0, scrollTop = 0;\n if (options.visiblePlotOnly && this.scrollingContainer) {\n (_a = this.scrollingContainer, scrollLeft = _a.scrollLeft, scrollTop = _a.scrollTop);\n }\n var series = options.series, box = (options.visiblePlotOnly && scrollablePlotBox) || plotBox, x = options.inverted ? plotY : plotX, y = options.inverted ? plotX : plotY, e = {\n x: x,\n y: y,\n isInsidePlot: true,\n options: options\n };\n if (!options.ignoreX) {\n var xAxis = (series &&\n (inverted && !this.polar ? series.yAxis : series.xAxis)) || {\n pos: plotLeft,\n len: Infinity\n };\n var 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 var yAxis = (options.axis && !options.axis.isXAxis && options.axis) || (series && (inverted ? series.xAxis : series.yAxis)) || {\n pos: plotTop,\n len: Infinity\n };\n var 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} [animation]\n * If or how to apply animation to the redraw.\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 Chart.prototype.redraw = function (animation) {\n fireEvent(this, 'beforeRedraw');\n var 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 var hasDirtyStacks, hasStackedSeries, i, isDirtyBox = chart.isDirtyBox, redrawLegend = chart.isDirtyLegend, serie;\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();\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 var 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 // 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 Chart.prototype.get = function (id) {\n var series = this.series;\n /**\n * @private\n */\n function itemById(item) {\n return (item.id === id ||\n (item.options && item.options.id === id));\n }\n var ret = \n // Search axes\n find(this.axes, itemById) ||\n // Search series\n find(this.series, itemById);\n // Search points\n for (var 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 * @private\n * @function Highcharts.Chart#getAxes\n * @emits Highcharts.Chart#event:afterGetAxes\n * @emits Highcharts.Chart#event:getAxes\n */\n Chart.prototype.getAxes = function () {\n var chart = this, options = this.options, xAxisOptions = options.xAxis = splat(options.xAxis || {}), yAxisOptions = options.yAxis = splat(options.yAxis || {});\n fireEvent(this, 'getAxes');\n // make sure the options are arrays and add some members\n xAxisOptions.forEach(function (axis, i) {\n axis.index = i;\n axis.isX = true;\n });\n yAxisOptions.forEach(function (axis, i) {\n axis.index = i;\n });\n // concatenate all axis options into one array\n var optionsArray = xAxisOptions.concat(yAxisOptions);\n optionsArray.forEach(function (axisOptions) {\n new Axis(chart, axisOptions); // eslint-disable-line no-new\n });\n fireEvent(this, 'afterGetAxes');\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 *\n * @function Highcharts.Chart#getSelectedPoints\n *\n * @return {Array}\n * The currently selected points.\n */\n Chart.prototype.getSelectedPoints = function () {\n return this.series.reduce(function (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(function (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}\n * The currently selected series.\n */\n Chart.prototype.getSelectedSeries = function () {\n return this.series.filter(function (serie) {\n return serie.selected;\n });\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 Chart.prototype.setTitle = function (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 * @private\n * @function Highcharts.Chart#applyDescription\n * @param name {string}\n * Either title, subtitle or caption\n * @param {Highcharts.TitleOptions|Highcharts.SubtitleOptions|Highcharts.CaptionOptions|undefined} explicitOptions\n * The options to set, will be merged with default options.\n */\n Chart.prototype.applyDescription = function (name, explicitOptions) {\n var chart = this;\n // Default style\n var style = name === 'title' ? {\n color: \"#333333\" /* Palette.neutralColor80 */,\n fontSize: this.options.isStock ? '16px' : '18px' // #2944\n } : {\n color: \"#666666\" /* Palette.neutralColor60 */\n };\n // Merge default options with explicit options\n var options = this.options[name] = merge(\n // Default styles\n (!this.styledMode && { style: style }), this.options[name], explicitOptions);\n var elem = this[name];\n if (elem && explicitOptions) {\n this[name] = 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-' + name,\n zIndex: options.zIndex || 4\n })\n .add();\n // Update methods, shortcut to Chart.setTitle, Chart.setSubtitle and\n // Chart.setCaption\n elem.update = function (updateOptions) {\n var fn = {\n title: 'setTitle',\n subtitle: 'setSubtitle',\n caption: 'setCaption'\n }[name];\n chart[fn](updateOptions);\n };\n // Presentational\n if (!this.styledMode) {\n elem.css(options.style);\n }\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[name] = 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 * @private\n * @function Highcharts.Chart#layOutTitles\n *\n * @param {boolean} [redraw=true]\n * @emits Highcharts.Chart#event:afterLayOutTitles\n */\n Chart.prototype.layOutTitles = function (redraw) {\n var titleOffset = [0, 0, 0], renderer = this.renderer, spacingBox = this.spacingBox;\n // Lay out the title and the subtitle respectively\n ['title', 'subtitle', 'caption'].forEach(function (key) {\n var title = this[key], titleOptions = (this.options[key]), verticalAlign = titleOptions.verticalAlign || 'top', offset = key === 'title' ?\n verticalAlign === 'top' ? -3 : 0 :\n // Floating subtitle (#6574)\n verticalAlign === 'top' ? titleOffset[0] + 2 : 0;\n var titleSize, height;\n if (title) {\n if (!this.styledMode) {\n titleSize = (titleOptions.style &&\n titleOptions.style.fontSize);\n }\n titleSize = renderer.fontMetrics(titleSize, title).b;\n title\n .css({\n width: (titleOptions.width ||\n spacingBox.width + (titleOptions.widthAdjust || 0)) + 'px'\n });\n // Skip the cache for HTML (#3481, #11666)\n height = Math.round(title.getBBox(titleOptions.useHTML).height);\n title.align(extend({\n y: verticalAlign === 'bottom' ?\n titleSize :\n offset + titleSize,\n height: height\n }, titleOptions), false, 'spacingBox');\n if (!titleOptions.floating) {\n if (verticalAlign === 'top') {\n titleOffset[0] = Math.ceil(titleOffset[0] +\n height);\n }\n else if (verticalAlign === 'bottom') {\n titleOffset[2] = Math.ceil(titleOffset[2] +\n height);\n }\n }\n }\n }, this);\n // Handle title.margin and caption.margin\n if (titleOffset[0] &&\n (this.options.title.verticalAlign || 'top') === 'top') {\n titleOffset[0] += this.options.title.margin;\n }\n if (titleOffset[2] &&\n this.options.caption.verticalAlign === 'bottom') {\n titleOffset[2] += this.options.caption.margin;\n }\n var 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 && pick(redraw, true) && this.isDirtyBox) {\n this.redraw();\n }\n }\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 * @private\n * @function Highcharts.Chart#getChartSize\n */\n Chart.prototype.getChartSize = function () {\n var chart = this, optionsChart = chart.options.chart, widthOption = optionsChart.width, heightOption = optionsChart.height, renderTo = chart.renderTo;\n // Get inner width and height\n if (!defined(widthOption)) {\n chart.containerWidth = getStyle(renderTo, 'width');\n }\n if (!defined(heightOption)) {\n chart.containerHeight = getStyle(renderTo, 'height');\n }\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 || chart.containerWidth || 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 (chart.containerHeight > 1 ?\n chart.containerHeight :\n 400));\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 * @private\n * @function Highcharts.Chart#temporaryDisplay\n *\n * @param {boolean} [revert]\n * Revert to the saved original styles.\n */\n Chart.prototype.temporaryDisplay = function (revert) {\n var node = this.renderTo, tempStyle;\n if (!revert) {\n while (node && 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.hcOricDetached) {\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 && 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 Chart.prototype.setClassName = function (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 * @private\n * @function Highcharts.Chart#afterGetContainer\n * @emits Highcharts.Chart#event:afterGetContainer\n */\n Chart.prototype.getContainer = function () {\n var chart = this, options = chart.options, optionsChart = options.chart, indexAttrName = 'data-highcharts-chart', containerId = uniqueKey();\n var containerStyle, renderTo = chart.renderTo;\n if (!renderTo) {\n chart.renderTo = renderTo =\n optionsChart.renderTo;\n }\n if (isString(renderTo)) {\n chart.renderTo = renderTo =\n doc.getElementById(renderTo);\n }\n // Display an error if the renderTo is wrong\n if (!renderTo) {\n error(13, true, chart);\n }\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 var 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 var chartWidth = chart.chartWidth;\n var chartHeight = chart.chartHeight;\n // Allow table cells and flex-boxes to shrink without the chart blocking\n // them out (#6427)\n css(renderTo, { overflow: 'hidden' });\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',\n zIndex: 0,\n '-webkit-tap-highlight-color': 'rgba(0,0,0,0)',\n userSelect: 'none',\n 'touch-action': 'manipulation',\n outline: 'none'\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 var container = createElement('div', {\n id: containerId\n }, containerStyle, renderTo);\n chart.container = container;\n // cache the cursor (#1650)\n chart._cursor = container.style.cursor;\n // Initialize the renderer\n var Renderer = optionsChart.renderer || !svg ?\n RendererRegistry.getRendererType(optionsChart.renderer) :\n SVGRenderer;\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 Renderer(container, chartWidth, chartHeight, void 0, optionsChart.forExport, options.exporting && options.exporting.allowHTML, chart.styledMode);\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 }\n else {\n // Initialize definitions\n for (var key in options.defs) { // eslint-disable-line guard-for-in\n this.renderer.definition(options.defs[key]);\n }\n }\n // Add a reference to the charts index\n chart.renderer.chartIndex = chart.index;\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 * @private\n * @function Highcharts.Chart#getMargins\n * @emits Highcharts.Chart#event:getMargins\n */\n Chart.prototype.getMargins = function (skipAxes) {\n var _a = this, spacing = _a.spacing, margin = _a.margin, titleOffset = _a.titleOffset;\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 && this.legend.display) {\n this.legend.adjustMargins(margin, spacing);\n }\n fireEvent(this, 'getMargins');\n if (!skipAxes) {\n this.getAxisMargins();\n }\n };\n /**\n * @private\n * @function Highcharts.Chart#getAxisMargins\n */\n Chart.prototype.getAxisMargins = function () {\n var chart = this, \n // [top, right, bottom, left]\n axisOffset = chart.axisOffset = [0, 0, 0, 0], colorAxis = chart.colorAxis, margin = chart.margin, getOffset = function (axes) {\n axes.forEach(function (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 && colorAxis.length) {\n getOffset(colorAxis);\n }\n // Add the axis offsets\n marginNames.forEach(function (m, side) {\n if (!defined(margin[side])) {\n chart[m] += axisOffset[side];\n }\n });\n chart.setChartSize();\n };\n /**\n * Reflows the chart to its container. By default, the chart reflows\n * automatically to its container following a `window.resize` event, as per\n * the [chart.reflow](https://api.highcharts.com/highcharts/chart.reflow)\n * option. However, there are no reliable events for div resize, so if the\n * container is resized without a window resize event, this must be called\n * explicitly.\n *\n * @sample highcharts/members/chart-reflow/\n * Resize div and reflow\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 Chart.prototype.reflow = function (e) {\n var chart = this, optionsChart = chart.options.chart, renderTo = chart.renderTo, hasUserSize = (defined(optionsChart.width) &&\n defined(optionsChart.height)), width = optionsChart.width || getStyle(renderTo, 'width'), height = optionsChart.height || getStyle(renderTo, 'height'), target = e ? e.target : win;\n delete chart.pointer.chartPosition;\n // Width and height checks for display:none. Target is doc in IE8 and\n // Opera, win in Firefox, Chrome and IE9.\n if (!hasUserSize &&\n !chart.isPrinting &&\n width &&\n height &&\n (target === win || target === doc)) {\n if (width !== chart.containerWidth ||\n height !== chart.containerHeight) {\n U.clearTimeout(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 }\n }, e ? 100 : 0);\n }\n chart.containerWidth = width;\n chart.containerHeight = height;\n }\n };\n /**\n * Toggle the event handlers necessary for auto resizing, depending on the\n * `chart.reflow` option.\n *\n * @private\n * @function Highcharts.Chart#setReflow\n */\n Chart.prototype.setReflow = function (reflow) {\n var chart = this;\n if (reflow !== false && !this.unbindReflow) {\n this.unbindReflow = addEvent(win, 'resize', function (e) {\n // a removed event listener still runs in Edge and IE if the\n // listener was removed while the event runs, so check if the\n // chart is not destroyed (#11609)\n if (chart.options) {\n chart.reflow(e);\n }\n });\n addEvent(this, 'destroy', this.unbindReflow);\n }\n else if (reflow === false && this.unbindReflow) {\n // Unbind and unset\n this.unbindReflow = this.unbindReflow();\n }\n // The following will add listeners to re-fit the chart before and after\n // printing (#2284). However it only works in WebKit. Should have worked\n // in Firefox, but not supported in IE.\n /*\n if (win.matchMedia) {\n win.matchMedia('print').addListener(function reflow() {\n chart.reflow();\n });\n }\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} [animation=true]\n * Whether and how to apply animation.\n *\n *\n * @emits Highcharts.Chart#event:endResize\n * @emits Highcharts.Chart#event:resize\n */\n Chart.prototype.setSize = function (width, height, animation) {\n var 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 var 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 // Resize the container with the global animation applied if enabled\n // (#2503)\n if (!chart.styledMode) {\n (globalAnimation ? animate : css)(chart.container, {\n width: chart.chartWidth + 'px',\n height: chart.chartHeight + 'px'\n }, globalAnimation);\n }\n chart.setChartSize(true);\n renderer.setSize(chart.chartWidth, chart.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 = null;\n fireEvent(chart, 'resize');\n // Fire endResize and set isResizing back. If animation is disabled,\n // fire without delay\n syncTimeout(function () {\n if (chart) {\n fireEvent(chart, 'endResize', null, function () {\n chart.isResizing -= 1;\n });\n }\n }, animObject(globalAnimation).duration);\n };\n /**\n * Set the public chart properties. This is done before and after the\n * pre-render to determine margin sizes.\n *\n * @private\n * @function Highcharts.Chart#setChartSize\n * @emits Highcharts.Chart#event:afterSetChartSize\n */\n Chart.prototype.setChartSize = function (skipAxes) {\n var chart = this, inverted = chart.inverted, renderer = chart.renderer, chartWidth = chart.chartWidth, chartHeight = chart.chartHeight, optionsChart = chart.options.chart, spacing = chart.spacing, clipOffset = chart.clipOffset;\n var 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));\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));\n chart.plotSizeX = inverted ? plotHeight : plotWidth;\n chart.plotSizeY = inverted ? plotWidth : plotHeight;\n chart.plotBorderWidth = optionsChart.plotBorderWidth || 0;\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 var plotBorderWidth = 2 * Math.floor(chart.plotBorderWidth / 2), clipX = Math.ceil(Math.max(plotBorderWidth, clipOffset[3]) / 2), clipY = Math.ceil(Math.max(plotBorderWidth, clipOffset[0]) / 2);\n chart.clipBox = {\n x: clipX,\n y: clipY,\n width: Math.floor(chart.plotSizeX -\n Math.max(plotBorderWidth, clipOffset[1]) / 2 -\n clipX),\n height: Math.max(0, Math.floor(chart.plotSizeY -\n Math.max(plotBorderWidth, clipOffset[2]) / 2 -\n clipY))\n };\n if (!skipAxes) {\n chart.axes.forEach(function (axis) {\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 * @private\n * @function Highcharts.Chart#resetMargins\n */\n Chart.prototype.resetMargins = function () {\n fireEvent(this, 'resetMargins');\n var chart = this, chartOptions = chart.options.chart;\n // Create margin and spacing array\n ['margin', 'spacing'].forEach(function splashArrays(target) {\n var value = chartOptions[target], values = isObject(value) ? value : [value, value, value, value];\n [\n 'Top',\n 'Right',\n 'Bottom',\n 'Left'\n ].forEach(function (sideName, side) {\n chart[target][side] = pick(chartOptions[target + sideName], values[side]);\n });\n });\n // Set margin names like chart.plotTop, chart.plotLeft,\n // chart.marginRight, chart.marginBottom.\n marginNames.forEach(function (m, side) {\n chart[m] = pick(chart.margin[side], chart.spacing[side]);\n });\n chart.axisOffset = [0, 0, 0, 0]; // top, right, bottom, left\n chart.clipOffset = [0, 0, 0, 0];\n };\n /**\n * Internal function to draw or redraw the borders and backgrounds for chart\n * and plot area.\n *\n * @private\n * @function Highcharts.Chart#drawChartBox\n * @emits Highcharts.Chart#event:afterDrawChartBox\n */\n Chart.prototype.drawChartBox = function () {\n var chart = this, optionsChart = chart.options.chart, renderer = chart.renderer, chartWidth = chart.chartWidth, chartHeight = chart.chartHeight, styledMode = chart.styledMode, plotBGImage = chart.plotBGImage, chartBackgroundColor = optionsChart.backgroundColor, plotBackgroundColor = optionsChart.plotBackgroundColor, plotBackgroundImage = optionsChart.plotBackgroundImage, plotLeft = chart.plotLeft, plotTop = chart.plotTop, plotWidth = chart.plotWidth, plotHeight = chart.plotHeight, plotBox = chart.plotBox, clipRect = chart.clipRect, clipBox = chart.clipBox;\n var 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 + (optionsChart.shadow ? 8 : 0);\n bgAttr = {\n fill: chartBackgroundColor || '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(optionsChart.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](plotBox);\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 // Above the grid\n })\n .add();\n }\n if (!styledMode) {\n // Presentational\n plotBorder.attr({\n stroke: optionsChart.plotBorderColor,\n 'stroke-width': optionsChart.plotBorderWidth || 0,\n fill: 'none'\n });\n }\n plotBorder[verb](plotBorder.crisp({\n x: plotLeft,\n y: plotTop,\n width: plotWidth,\n height: plotHeight\n }, -plotBorder.strokeWidth())); // #3282 plotBorder should be negative;\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 * @private\n * @function Highcharts.Chart#propFromSeries\n */\n Chart.prototype.propFromSeries = function () {\n var chart = this, optionsChart = chart.options.chart, seriesOptions = chart.options.series;\n var 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 || optionsChart.defaultSeriesType)];\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 && 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 * @private\n * @function Highcharts.Chart#linkSeries\n * @emits Highcharts.Chart#event:afterLinkSeries\n */\n Chart.prototype.linkSeries = function () {\n var 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 var linkedTo = series.options.linkedTo;\n if (isString(linkedTo)) {\n if (linkedTo === ':previous') {\n linkedTo = chart.series[series.index - 1];\n }\n else {\n linkedTo = chart.get(linkedTo);\n }\n // #3341 avoid mutual linking\n if (linkedTo && linkedTo.linkedParent !== series) {\n linkedTo.linkedSeries.push(series);\n series.linkedParent = linkedTo;\n if (linkedTo.enabledDataSorting) {\n series.setDataSortingOptions();\n }\n series.visible = pick(series.options.visible, linkedTo.options.visible, series.visible); // #3879\n }\n }\n });\n fireEvent(this, 'afterLinkSeries');\n };\n /**\n * Render series for the chart.\n *\n * @private\n * @function Highcharts.Chart#renderSeries\n */\n Chart.prototype.renderSeries = function () {\n this.series.forEach(function (serie) {\n serie.translate();\n serie.render();\n });\n };\n /**\n * Render labels for the chart.\n *\n * @private\n * @function Highcharts.Chart#renderLabels\n */\n Chart.prototype.renderLabels = function () {\n var chart = this, labels = chart.options.labels;\n if (labels.items) {\n labels.items.forEach(function (label) {\n var style = extend(labels.style, label.style), x = pInt(style.left) + chart.plotLeft, y = pInt(style.top) + chart.plotTop + 12;\n // delete to prevent rewriting in IE\n delete style.left;\n delete style.top;\n chart.renderer.text(label.html, x, y)\n .attr({ zIndex: 2 })\n .css(style)\n .add();\n });\n }\n };\n /**\n * Render all graphics for the chart. Runs internally on initialization.\n *\n * @private\n * @function Highcharts.Chart#render\n */\n Chart.prototype.render = function () {\n var chart = this, axes = chart.axes, colorAxis = chart.colorAxis, renderer = chart.renderer, options = chart.options, renderAxes = function (axes) {\n axes.forEach(function (axis) {\n if (axis.visible) {\n axis.render();\n }\n });\n };\n var correction = 0; // correction for X axis labels\n // Title\n chart.setTitle();\n /**\n * The overview of the chart's series.\n *\n * @name Highcharts.Chart#legend\n * @type {Highcharts.Legend}\n */\n chart.legend = new Legend(chart, options.legend);\n // Get stacks\n if (chart.getStacks) {\n chart.getStacks();\n }\n // Get chart margins\n chart.getMargins(true);\n chart.setChartSize();\n // Record preliminary dimensions for later comparison\n var tempWidth = chart.plotWidth;\n axes.some(function (axis) {\n if (axis.horiz &&\n axis.visible &&\n axis.options.labels.enabled &&\n axis.series.length) {\n // 21 is the most common correction for X axis labels\n correction = 21;\n return true;\n }\n });\n // use Math.max to prevent negative plotHeight\n chart.plotHeight = Math.max(chart.plotHeight - correction, 0);\n var tempHeight = chart.plotHeight;\n // Get margins by pre-rendering axes\n axes.forEach(function (axis) {\n axis.setScale();\n });\n chart.getAxisMargins();\n // If the plot area size has changed significantly, calculate tick\n // positions again\n var redoHorizontal = tempWidth / chart.plotWidth > 1.1;\n // Height is more sensitive, use lower threshold\n var redoVertical = tempHeight / chart.plotHeight > 1.05;\n if (redoHorizontal || redoVertical) {\n axes.forEach(function (axis) {\n if ((axis.horiz && redoHorizontal) ||\n (!axis.horiz && redoVertical)) {\n // update to reflect the new margins\n axis.setTickInterval(true);\n }\n });\n chart.getMargins(); // second pass to check for new labels\n }\n // Draw the borders and backgrounds\n chart.drawChartBox();\n // Axes\n if (chart.hasCartesianSeries) {\n renderAxes(axes);\n }\n else if (colorAxis && colorAxis.length) {\n renderAxes(colorAxis);\n }\n // The series\n if (!chart.seriesGroup) {\n chart.seriesGroup = renderer.g('series-group')\n .attr({ zIndex: 3 })\n .add();\n }\n chart.renderSeries();\n // Labels\n chart.renderLabels();\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 Chart.prototype.addCredits = function (credits) {\n var 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)\n .addClass('highcharts-credits')\n .on('click', function () {\n if (creds.href) {\n win.location.href = creds.href;\n }\n })\n .attr({\n align: creds.position.align,\n zIndex: 8\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 Chart.prototype.destroy = function () {\n var chart = this, axes = chart.axes, series = chart.series, container = chart.container, parentNode = container && container.parentNode;\n var i;\n // fire the chart.destoy 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 if (this.scroller && this.scroller.destroy) {\n this.scroller.destroy();\n }\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(function (name) {\n var prop = chart[name];\n if (prop && prop.destroy) {\n chart[name] = prop.destroy();\n }\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 * @private\n * @function Highcharts.Chart#firstRender\n * @emits Highcharts.Chart#event:beforeRender\n */\n Chart.prototype.firstRender = function () {\n var chart = this, options = chart.options;\n // Hook for oldIE to check whether the chart is ready to render\n if (chart.isReadyToRender && !chart.isReadyToRender()) {\n return;\n }\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.getAxes();\n // Initialize the series\n (isArray(options.series) ? options.series : []).forEach(\n // #9680\n function (serieOptions) {\n chart.initSeries(serieOptions);\n });\n chart.linkSeries();\n chart.setSeriesData();\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 // depends on inverted and on margins being set\n if (Pointer) {\n if (MSPointer.isRequired()) {\n chart.pointer = new MSPointer(chart, options);\n }\n else {\n /**\n * The Pointer that keeps track of mouse and touch interaction.\n *\n * @memberof Highcharts.Chart\n * @name pointer\n * @type {Highcharts.Pointer}\n * @instance\n */\n chart.pointer = new Pointer(chart, options);\n }\n }\n chart.render();\n chart.pointer.getChartPosition(); // #14973\n // Fire the load event if there are no external images\n if (!chart.renderer.imgCount && !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 * @private\n * @function Highcharts.Chart#onload\n * @emits Highcharts.Chart#event:load\n * @emits Highcharts.Chart#event:render\n */\n Chart.prototype.onload = function () {\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(this.options.chart.reflow);\n }\n this.warnIfA11yModuleNotLoaded();\n // Don't run again\n this.hasLoaded = true;\n };\n /**\n * Emit console warning if the a11y module is not loaded.\n */\n Chart.prototype.warnIfA11yModuleNotLoaded = function () {\n var _a = this, options = _a.options, title = _a.title;\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 && title.element.textContent) || ''\n // #17753, < is not allowed in SVG attributes\n ).replace(/} [animation]\n * Whether to apply animation, and optionally animation\n * configuration.\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 Chart.prototype.addSeries = function (options, redraw, animation) {\n var chart = this;\n var 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 if (series.enabledDataSorting) {\n // We need to call `setData` after `linkSeries`\n series.setData(options.data, false);\n }\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} [animation=true]\n * Whether and how to apply animation in the redraw.\n *\n * @return {Highcharts.Axis}\n * The newly generated Axis object.\n */\n Chart.prototype.addAxis = function (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} [animation=true]\n * Whether and how to apply animation in the redraw.\n *\n * @return {Highcharts.ColorAxis}\n * The newly generated Axis object.\n */\n Chart.prototype.addColorAxis = function (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 * @private\n * @function Highcharts.Chart#createAxis\n *\n * @param {string} type\n * An axis type.\n *\n * @param {...Array<*>} arguments\n * All arguments for the constructor.\n *\n * @return {Highcharts.Axis | Highcharts.ColorAxis}\n * The newly generated Axis object.\n */\n Chart.prototype.createAxis = function (type, options) {\n var axis = new Axis(this, merge(options.axis, {\n index: this[type].length,\n isX: type === 'xAxis'\n }));\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 Chart.prototype.showLoading = function (str) {\n var chart = this, options = chart.options, loadingOptions = options.loading, setLoadingSize = function () {\n if (loadingDiv) {\n css(loadingDiv, {\n left: chart.plotLeft + 'px',\n top: chart.plotTop + 'px',\n width: chart.plotWidth + 'px',\n height: chart.plotHeight + 'px'\n });\n }\n };\n var 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(loadingOptions.style, {\n zIndex: 10\n }));\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: loadingOptions.style.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 Chart.prototype.hideLoading = function () {\n var 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} [animation=true]\n * Whether to apply animation, and optionally animation\n * configuration.\n *\n * @emits Highcharts.Chart#event:update\n * @emits Highcharts.Chart#event:afterUpdate\n */\n Chart.prototype.update = function (options, redraw, oneToOne, animation) {\n var chart = this, adders = {\n credits: 'addCredits',\n title: 'setTitle',\n subtitle: 'setSubtitle',\n caption: 'setCaption'\n }, isResponsiveOptions = options.isResponsiveOptions, itemsForRemoval = [];\n var 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 = cleanRecursively(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 var optionsChart = options.chart;\n if (optionsChart) {\n merge(true, chart.options.chart, optionsChart);\n // Setter function\n if ('className' in optionsChart) {\n chart.setClassName(optionsChart.className);\n }\n if ('reflow' in optionsChart) {\n chart.setReflow(optionsChart.reflow);\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 if (isResponsiveOptions) {\n chart.isDirtyBox = true;\n }\n else {\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 if (options.time) {\n // Maintaining legacy global time. If the chart is instanciated\n // first with global time, then updated with time options, we need\n // to create a new Time instance to avoid mutating the global time\n // (#10536).\n if (this.time === defaultTime) {\n this.time = new Time(options.time);\n }\n // If we're updating, the time class is different from other chart\n // classes (chart.legend, chart.tooltip etc) in that it doesn't know\n // about the chart. The other chart[something].update functions also\n // set the chart.options[something]. For the time class however we\n // need to update the chart options separately. #14230.\n merge(true, chart.options.time, options.time);\n }\n // Some option stuctures 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(function (coll) {\n var indexMap;\n if (options[coll]) {\n // In stock charts, the navigator series are also part of the\n // chart.series array, but those series should not be handled\n // here (#8196) and neither should the navigator axis (#9671).\n indexMap = [];\n chart[coll].forEach(function (s, i) {\n if (!s.options.isInternal) {\n indexMap.push(pick(s.options.index, i));\n }\n });\n splat(options[coll]).forEach(function (newOptions, i) {\n var hasId = defined(newOptions.id);\n var 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][indexMap ? indexMap[i] : i];\n // Check if we grabbed an item with an exising but\n // different id (#13541)\n if (item && hasId && defined(item.options.id)) {\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(function (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(function (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.getSeriesOrderByLinks().forEach(function (series) {\n // Avoid removed navigator series\n if (series.chart) {\n series.update({}, false);\n }\n }, this);\n }\n // Update size. Redraw is forced.\n var newWidth = optionsChart && optionsChart.width;\n var 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 Chart.prototype.setSubtitle = function (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 Chart.prototype.setCaption = function (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 Chart.prototype.showResetZoom = function () {\n var chart = this, lang = defaultOptions.lang, btnOptions = chart.options.chart.zooming.resetButton, theme = btnOptions.theme, alignTo = (btnOptions.relativeTo === 'chart' ||\n btnOptions.relativeTo === 'spacingBox' ?\n null :\n 'scrollablePlotBox');\n /**\n * @private\n */\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 Chart.prototype.zoomOut = function () {\n fireEvent(this, 'selection', { resetSelection: true }, this.zoom);\n };\n /**\n * Zoom into a given portion of the chart given by axis coordinates.\n *\n * @private\n * @function Highcharts.Chart#zoom\n * @param {Highcharts.SelectEventObject} event\n */\n Chart.prototype.zoom = function (event) {\n var chart = this, pointer = chart.pointer;\n var displayButton = false, hasZoomed;\n // If zoom is called with no arguments, reset the axes\n if (!event || event.resetSelection) {\n chart.axes.forEach(function (axis) {\n hasZoomed = axis.zoom();\n });\n pointer.initiated = false; // #6804\n }\n else { // else, zoom in on all axes\n event.xAxis.concat(event.yAxis).forEach(function (axisData) {\n var axis = axisData.axis, isXAxis = axis.isXAxis;\n // don't zoom more than minRange\n if (pointer[isXAxis ? 'zoomX' : 'zoomY'] &&\n (defined(pointer.mouseDownX) &&\n defined(pointer.mouseDownY) &&\n chart.isInsidePlot(pointer.mouseDownX - chart.plotLeft, pointer.mouseDownY - chart.plotTop, { axis: axis })) || !defined(chart.inverted ? pointer.mouseDownX : pointer.mouseDownY)) {\n hasZoomed = axis.zoom(axisData.min, axisData.max);\n if (axis.displayBtn) {\n displayButton = true;\n }\n }\n });\n }\n // Show or hide the Reset zoom button\n var resetZoomButton = chart.resetZoomButton;\n if (displayButton && !resetZoomButton) {\n chart.showResetZoom();\n }\n else if (!displayButton && isObject(resetZoomButton)) {\n chart.resetZoomButton = resetZoomButton.destroy();\n }\n // Redraw\n if (hasZoomed) {\n chart.redraw(pick(chart.options.chart.animation, event && event.animation, chart.pointCount < 100));\n }\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 * @private\n * @function Highcharts.Chart#pan\n * @param {Highcharts.PointerEventObject} e\n * @param {string} panning\n */\n Chart.prototype.pan = function (e, panning) {\n var chart = this, hoverPoints = chart.hoverPoints, panningOptions = (typeof panning === 'object' ?\n panning :\n {\n enabled: panning,\n type: 'x'\n }), chartOptions = chart.options.chart;\n if (chartOptions && chartOptions.panning) {\n chartOptions.panning = panningOptions;\n }\n var type = panningOptions.type;\n var doRedraw;\n fireEvent(this, 'pan', { originalEvent: e }, function () {\n // remove active points for shared tooltip\n if (hoverPoints) {\n hoverPoints.forEach(function (point) {\n point.setState();\n });\n }\n var axes = chart.xAxis;\n if (type === 'xy') {\n axes = axes.concat(chart.yAxis);\n }\n else if (type === 'y') {\n axes = chart.yAxis;\n }\n var nextMousePos = {};\n axes.forEach(function (axis) {\n if (!axis.options.panningEnabled || axis.options.isInternal) {\n return;\n }\n var horiz = axis.horiz, mousePos = e[horiz ? 'chartX' : 'chartY'], mouseDown = horiz ? 'mouseDownX' : 'mouseDownY', startPos = chart[mouseDown], halfPointRange = axis.minPointOffset || 0, pointRangeDirection = (axis.reversed && !chart.inverted) ||\n (!axis.reversed && chart.inverted) ?\n -1 :\n 1, extremes = axis.getExtremes(), panMin = axis.toValue(startPos - mousePos, true) +\n halfPointRange * pointRangeDirection, panMax = axis.toValue(startPos + axis.len - mousePos, true) -\n ((halfPointRange * pointRangeDirection) ||\n (axis.isXAxis && axis.pointRangePadding) ||\n 0), flipped = panMax < panMin, hasVerticalPanning = axis.hasVerticalPanning();\n var newMin = flipped ? panMax : panMin, newMax = flipped ? panMin : panMax, panningState = axis.panningState, spill;\n // General calculations of panning state.\n // This is related to using vertical panning. (#11315).\n if (hasVerticalPanning &&\n !axis.isXAxis && (!panningState || panningState.isDirty)) {\n axis.series.forEach(function (series) {\n var processedData = series.getProcessedData(true), dataExtremes = series.getExtremes(processedData.yData, true);\n if (!panningState) {\n panningState = {\n startMin: Number.MAX_VALUE,\n startMax: -Number.MAX_VALUE\n };\n }\n if (isNumber(dataExtremes.dataMin) &&\n isNumber(dataExtremes.dataMax)) {\n panningState.startMin = Math.min(pick(series.options.threshold, Infinity), dataExtremes.dataMin, panningState.startMin);\n panningState.startMax = Math.max(pick(series.options.threshold, -Infinity), dataExtremes.dataMax, panningState.startMax);\n }\n });\n }\n var paddedMin = Math.min(pick(panningState && panningState.startMin, extremes.dataMin), halfPointRange ?\n extremes.min :\n axis.toValue(axis.toPixels(extremes.min) -\n axis.minPixelPadding));\n var paddedMax = Math.max(pick(panningState && panningState.startMax, extremes.dataMax), halfPointRange ?\n extremes.max :\n axis.toValue(axis.toPixels(extremes.max) +\n axis.minPixelPadding));\n axis.panningState = panningState;\n // It is not necessary to calculate extremes on ordinal axis,\n // because they are already calculated, so we don't want to\n // override them.\n if (!axis.isOrdinal) {\n // If the new range spills over, either to the min or max,\n // adjust the new range.\n spill = paddedMin - newMin;\n if (spill > 0) {\n newMax += spill;\n newMin = paddedMin;\n }\n spill = newMax - paddedMax;\n if (spill > 0) {\n newMax = paddedMax;\n newMin -= spill;\n }\n // Set new extremes if they are actually new\n if (axis.series.length &&\n newMin !== extremes.min &&\n newMax !== extremes.max &&\n newMin >= paddedMin &&\n newMax <= paddedMax) {\n axis.setExtremes(newMin, newMax, false, false, { trigger: 'pan' });\n if (!chart.resetZoomButton &&\n // Show reset zoom button only when both newMin and\n // newMax values are between padded axis range.\n newMin !== paddedMin &&\n newMax !== paddedMax &&\n type.match('y')) {\n chart.showResetZoom();\n axis.displayBtn = false;\n }\n doRedraw = true;\n }\n // set new reference for next run:\n nextMousePos[mouseDown] = mousePos;\n }\n });\n objectEach(nextMousePos, function (pos, down) {\n chart[down] = pos;\n });\n if (doRedraw) {\n chart.redraw(false);\n }\n css(chart.container, { cursor: 'move' });\n });\n };\n return Chart;\n}());\nextend(Chart.prototype, {\n // Hook for adding callbacks in modules\n callbacks: [],\n /**\n * These collections (arrays) implement `Chart.addSomethig` method used in\n * chart.update() to create new object in the collection. Equivalent for\n * deleting is resolved by simple `Somethig.remove()`.\n *\n * Note: We need to define these references after initializers are bound to\n * chart's prototype.\n *\n * @private\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 * @private\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 * @private\n */\n propsRequireDirtyBox: [\n 'backgroundColor',\n 'borderColor',\n 'borderWidth',\n 'borderRadius',\n 'plotBackgroundColor',\n 'plotBackgroundImage',\n 'plotBorderColor',\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 * @private\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 * @private\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 * @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-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport U from './Utilities.js';\nvar addEvent = U.addEvent, isFunction = U.isFunction, objectEach = U.objectEach, removeEvent = U.removeEvent;\n/* *\n *\n * Class Namespace\n *\n * */\nvar Foundation;\n(function (Foundation) {\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Register event options. If an event handler is set on the options, it\n * should be subject to Chart.update, Axis.update and Series.update. This is\n * contrary to general handlers that are set directly using addEvent either\n * on the class or on the instance. #6538, #6943, #10861.\n * @private\n */\n function registerEventOptions(component, options) {\n // A lookup over those events that are added by _options_ (not\n // programmatically). These are updated through .update()\n component.eventOptions = component.eventOptions || {};\n // Register event listeners\n objectEach(options.events, function (event, eventType) {\n // If event does not exist, or is changed by the .update()\n // function\n if (component.eventOptions[eventType] !== event) {\n // Remove existing if set by option\n if (component.eventOptions[eventType]) {\n removeEvent(component, eventType, component.eventOptions[eventType]);\n delete component.eventOptions[eventType];\n }\n if (isFunction(event)) {\n component.eventOptions[eventType] = event;\n addEvent(component, eventType, event);\n }\n }\n });\n }\n Foundation.registerEventOptions = registerEventOptions;\n})(Foundation || (Foundation = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default Foundation;\n","/* *\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport A from '../Animation/AnimationUtilities.js';\nvar animObject = A.animObject, setAnimation = A.setAnimation;\nimport F from '../FormatUtilities.js';\nvar format = F.format;\nimport H from '../Globals.js';\nvar isFirefox = H.isFirefox, marginNames = H.marginNames, win = H.win;\nimport Point from '../Series/Point.js';\nimport R from '../Renderer/RendererUtilities.js';\nvar distribute = R.distribute;\nimport U from '../Utilities.js';\nvar addEvent = U.addEvent, createElement = U.createElement, css = U.css, defined = U.defined, discardElement = U.discardElement, find = U.find, fireEvent = U.fireEvent, isNumber = U.isNumber, merge = U.merge, pick = U.pick, relativeLength = U.relativeLength, stableSort = U.stableSort, syncTimeout = U.syncTimeout, wrap = U.wrap;\n/* *\n *\n * Class\n *\n * */\n/**\n * The overview of the chart's series. The legend object is instanciated\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 */\nvar Legend = /** @class */ (function () {\n /* *\n *\n * Constructors\n *\n * */\n function Legend(chart, options) {\n /* *\n *\n * Properties\n *\n * */\n this.allItems = [];\n this.box = void 0;\n this.contentGroup = void 0;\n this.display = false;\n this.group = void 0;\n this.initialItemY = 0;\n this.itemHeight = 0;\n this.itemMarginBottom = 0;\n this.itemMarginTop = 0;\n this.itemX = 0;\n this.itemY = 0;\n this.lastItemY = 0;\n this.lastLineHeight = 0;\n this.legendHeight = 0;\n this.legendWidth = 0;\n this.maxItemWidth = 0;\n this.maxLegendWidth = 0;\n this.offsetWidth = 0;\n this.options = void 0;\n this.padding = 0;\n this.pages = [];\n this.proximate = false;\n this.scrollGroup = void 0;\n this.symbolHeight = 0;\n this.symbolWidth = 0;\n this.titleHeight = 0;\n this.totalItemWidth = 0;\n this.widthOption = 0;\n this.chart = chart;\n this.init(chart, options);\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Initialize the legend.\n *\n * @private\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 Legend.prototype.init = function (chart, options) {\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 // move checkboxes\n addEvent(this.chart, 'endResize', function () {\n this.legend.positionCheckboxes();\n });\n if (this.proximate) {\n this.unchartrender = addEvent(this.chart, 'render', function () {\n this.legend.proximatePositions();\n this.legend.positionItems();\n });\n }\n else if (this.unchartrender) {\n this.unchartrender();\n }\n }\n };\n /**\n * @private\n * @function Highcharts.Legend#setOptions\n * @param {Highcharts.LegendOptions} options\n */\n Legend.prototype.setOptions = function (options) {\n var 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 || 0;\n this.itemMarginBottom = options.itemMarginBottom || 0;\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 Legend.prototype.update = function (options, redraw) {\n var chart = this.chart;\n this.setOptions(merge(true, this.options, options));\n this.destroy();\n chart.isDirtyLegend = chart.isDirtyBox = true;\n if (pick(redraw, true)) {\n chart.redraw();\n }\n fireEvent(this, 'afterUpdate');\n };\n /**\n * Set the colors for the legend item.\n *\n * @private\n * @function Highcharts.Legend#colorizeItem\n * @param {Highcharts.BubbleLegendItem|Highcharts.Point|Highcharts.Series} item\n * A Series or Point instance\n * @param {boolean} [visible=false]\n * Dimmed or colored\n *\n * @todo\n * Make events official: Fires the event `afterColorizeItem`.\n */\n Legend.prototype.colorizeItem = function (item, visible) {\n var _a = item.legendItem || {}, group = _a.group, label = _a.label, line = _a.line, symbol = _a.symbol;\n if (group) {\n group[visible ? 'removeClass' : 'addClass']('highcharts-legend-item-hidden');\n }\n if (!this.chart.styledMode) {\n var legend = this, options = legend.options, hiddenColor = legend.itemHiddenStyle.color, textColor = visible ?\n options.itemStyle.color :\n hiddenColor, symbolColor = visible ?\n (item.color || hiddenColor) :\n hiddenColor, markerOptions = item.options && item.options.marker;\n var symbolAttr = { fill: symbolColor };\n if (label) {\n label.css({\n fill: textColor,\n color: textColor // #1553, oldIE\n });\n }\n if (line) {\n line.attr({ stroke: symbolColor });\n }\n if (symbol) {\n // Apply marker options\n if (markerOptions && symbol.isMarker) { // #585\n symbolAttr = item.pointAttribs();\n if (!visible) {\n // #6769\n symbolAttr.stroke = symbolAttr.fill = hiddenColor;\n }\n }\n symbol.attr(symbolAttr);\n }\n }\n fireEvent(this, 'afterColorizeItem', { item: item, visible: visible });\n };\n /**\n * @private\n * @function Highcharts.Legend#positionItems\n */\n Legend.prototype.positionItems = function () {\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 * @private\n * @function Highcharts.Legend#positionItem\n * @param {Highcharts.BubbleLegendItem|Highcharts.Point|Highcharts.Series} item\n * The item to position\n */\n Legend.prototype.positionItem = function (item) {\n var _this = this;\n var legend = this, _a = item.legendItem || {}, group = _a.group, _b = _a.x, x = _b === void 0 ? 0 : _b, _c = _a.y, y = _c === void 0 ? 0 : _c, options = legend.options, symbolPadding = options.symbolPadding, ltr = !options.rtl, checkbox = item.checkbox;\n if (group && group.element) {\n var attribs = {\n translateX: ltr ?\n x :\n legend.legendWidth - x - 2 * symbolPadding - 4,\n translateY: y\n };\n var complete = function () {\n fireEvent(_this, 'afterPositionItem', { item: 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 * @private\n * @function Highcharts.Legend#destroyItem\n * @param {Highcharts.BubbleLegendItem|Highcharts.Point|Highcharts.Series} item\n * The item to remove\n */\n Legend.prototype.destroyItem = function (item) {\n var checkbox = item.checkbox, legendItem = item.legendItem || {};\n // destroy SVG elements\n for (var _i = 0, _a = ['group', 'label', 'line', 'symbol']; _i < _a.length; _i++) {\n var key = _a[_i];\n if (legendItem[key]) {\n legendItem[key] = legendItem[key].destroy();\n }\n }\n if (checkbox) {\n discardElement(checkbox);\n }\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 * @private\n * @function Highcharts.Legend#destroy\n */\n Legend.prototype.destroy = function () {\n var legend = this;\n // Destroy items\n for (var _i = 0, _a = this.getAllItems(); _i < _a.length; _i++) {\n var item = _a[_i];\n this.destroyItem(item);\n }\n // Destroy legend elements\n for (var _b = 0, _c = [\n 'clipRect',\n 'up',\n 'down',\n 'pager',\n 'nav',\n 'box',\n 'title',\n 'group'\n ]; _b < _c.length; _b++) {\n var key = _c[_b];\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 * @private\n * @function Highcharts.Legend#positionCheckboxes\n */\n Legend.prototype.positionCheckboxes = function () {\n var alignAttr = this.group && this.group.alignAttr, clipHeight = this.clipHeight || this.legendHeight, titleHeight = this.titleHeight;\n var translateY;\n if (alignAttr) {\n translateY = alignAttr.translateY;\n this.allItems.forEach(function (item) {\n var checkbox = item.checkbox;\n var 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 * @private\n * @function Highcharts.Legend#renderTitle\n */\n Legend.prototype.renderTitle = function () {\n var options = this.options, padding = this.padding, titleOptions = options.title;\n var 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 * @param {Highcharts.Point|Highcharts.Series} item\n * The item for which to update the text in the legend.\n */\n Legend.prototype.setText = function (item) {\n var options = this.options;\n item.legendItem.label.attr({\n text: options.labelFormat ?\n format(options.labelFormat, item, this.chart) :\n options.labelFormatter.call(item)\n });\n };\n /**\n * Render a single specific legend item. Called internally from the `render`\n * function.\n *\n * @private\n * @function Highcharts.Legend#renderItem\n * @param {Highcharts.BubbleLegendItem|Highcharts.Point|Highcharts.Series} item\n * The item to render.\n */\n Legend.prototype.renderItem = function (item) {\n var 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 var 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(chart.styledMode ? 12 : itemStyle.fontSize, label);\n legend.baseline =\n legend.fontMetrics.f + 3 + legend.itemMarginTop;\n label.attr('y', legend.baseline);\n legend.symbolHeight =\n 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: ((options.itemWidth ||\n legend.widthOption ||\n chart.spacingBox.width) - itemExtraWidth) + 'px'\n });\n }\n // Always update the text\n legend.setText(item);\n // calculate the positions for the next line\n var bBox = label.getBBox();\n var fontMetricsH = (legend.fontMetrics && 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 * @private\n * @function Highcharts.Legend#layoutItem\n * @param {Highcharts.BubbleLegendItem|Highcharts.Point|Highcharts.Series} item\n */\n Legend.prototype.layoutItem = function (item) {\n var 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 * @private\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 Legend.prototype.getAllItems = function () {\n var allItems = [];\n this.chart.series.forEach(function (series) {\n var seriesOptions = series && 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: allItems });\n return allItems;\n };\n /**\n * Get a short, three letter string reflecting the alignment and layout.\n *\n * @private\n * @function Highcharts.Legend#getAlignment\n * @return {string}\n * The alignment, empty string if floating\n */\n Legend.prototype.getAlignment = function () {\n var 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 * @private\n * @function Highcharts.Legend#adjustMargins\n * @param {Array} margin\n * @param {Array} spacing\n */\n Legend.prototype.adjustMargins = function (margin, spacing) {\n var 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(function (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 pick(options.margin, 12) +\n spacing[side] +\n (chart.titleOffset[side] || 0)));\n }\n });\n }\n };\n /**\n * @private\n * @function Highcharts.Legend#proximatePositions\n */\n Legend.prototype.proximatePositions = function () {\n var chart = this.chart, boxes = [], alignLeft = this.options.align === 'left';\n this.allItems.forEach(function (item) {\n var 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: item\n });\n }\n }, this);\n var legendItem;\n for (var _i = 0, _a = distribute(boxes, chart.plotHeight); _i < _a.length; _i++) {\n var box = _a[_i];\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 * @private\n * @function Highcharts.Legend#render\n */\n Legend.prototype.render = function () {\n var legend = this, chart = legend.chart, renderer = chart.renderer, options = legend.options, padding = legend.padding, \n // add each series or point\n allItems = legend.getAllItems();\n var 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, chart.spacingBox.width - padding);\n // Compute how wide the legend is allowed to be\n allowedWidth = chart.spacingBox.width - 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, function (a, b) {\n return ((a.options && a.options.legendIndex) || 0) -\n ((b.options && b.options.legendIndex) || 0);\n });\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 = (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 * @private\n * @function Highcharts.align\n * @param {Highcharts.BBoxObject} alignTo\n */\n Legend.prototype.align = function (alignTo) {\n if (alignTo === void 0) { alignTo = this.chart.spacingBox; }\n var chart = this.chart, options = this.options;\n // If aligning to the top and the layout is horizontal, adjust for\n // the title (#7428)\n var 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: 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 * @private\n * @function Highcharts.Legend#handleOverflow\n */\n Legend.prototype.handleOverflow = function (legendHeight) {\n var 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 // useHTML\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 var clipHeight, lastY, legendItem, 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(function (item, i) {\n legendItem = item.legendItem || {};\n var y = legendItem.y || 0, h = Math.round(legendItem.label.getBBox().height);\n var 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) {\n (allItems[i - 1].legendItem || {}).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\n y + h - pages[len - 1] > clipHeight &&\n // and will fully fit inside a new page\n h <= clipHeight) {\n pages.push(y);\n legendItem.pageIx = len;\n }\n if (y !== lastY) {\n lastY = y;\n }\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, 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 * @private\n * @function Highcharts.Legend#scroll\n *\n * @param {number} scrollBy\n * The number of pages to scroll.\n *\n * @param {boolean|Partial} [animation]\n * Whether and how to apply animation.\n *\n */\n Legend.prototype.scroll = function (scrollBy, animation) {\n var _this = this;\n var chart = this.chart, pages = this.pages, pageCount = pages.length, clipHeight = this.clipHeight, navOptions = this.options.navigation, pager = this.pager, padding = this.padding;\n var 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 var animOptions = animObject(pick(animation, chart.renderer.globalAnimation, true));\n syncTimeout(function () {\n fireEvent(_this, 'afterScroll', { currentPage: currentPage });\n }, animOptions.duration);\n }\n };\n /**\n * @private\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.Point#event:legendItemClick\n * @emits Highcharts.Series#event:legendItemClick\n */\n Legend.prototype.setItemEvents = function (item, legendLabel, useHTML) {\n var legend = this, legendItem = item.legendItem || {}, boxWrapper = legend.chart.renderer.boxWrapper, isPoint = item instanceof Point, 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 var setOtherItemsState = function (state) {\n legend.allItems.forEach(function (otherItem) {\n if (item !== otherItem) {\n [otherItem]\n .concat(otherItem.linkedSeries || [])\n .forEach(function (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 (var _i = 0, legendElements_1 = legendElements; _i < legendElements_1.length; _i++) {\n var element = legendElements_1[_i];\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 var strLegendItemClick = 'legendItemClick', fnLegendItemClick = 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 // Pass over the click/touch event. #4.\n event = {\n browserEvent: event\n };\n // click the name or symbol\n if (item.firePointEvent) { // point\n item.firePointEvent(strLegendItemClick, event, fnLegendItemClick);\n }\n else {\n fireEvent(item, strLegendItemClick, event, fnLegendItemClick);\n }\n });\n }\n }\n };\n /**\n * @private\n * @function Highcharts.Legend#createCheckboxForItem\n * @param {Highcharts.BubbleLegendItem|Point|Highcharts.Series} item\n * @emits Highcharts.Series#event:checkboxClick\n */\n Legend.prototype.createCheckboxForItem = function (item) {\n var 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 var 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 return Legend;\n}());\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/**\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 * @callback Highcharts.PointLegendItemClickCallbackFunction\n *\n * @param {Highcharts.Point} this\n * The point on which the event occured.\n *\n * @param {Highcharts.PointLegendItemClickEventObject} event\n * The event that occured.\n */\n/**\n * Information about the legend click event.\n *\n * @interface Highcharts.PointLegendItemClickEventObject\n */ /**\n* Related browser event.\n* @name Highcharts.PointLegendItemClickEventObject#browserEvent\n* @type {Highcharts.PointerEvent}\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 * Series color as used by the legend and some series types.\n * @name Highcharts.Series#color\n * @type {Highcharts.ColorType|undefined}\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 * @callback Highcharts.SeriesLegendItemClickCallbackFunction\n *\n * @param {Highcharts.Series} this\n * The series where the event occured.\n *\n * @param {Highcharts.SeriesLegendItemClickEventObject} event\n * The event that occured.\n */\n/**\n * Information about the legend click event.\n *\n * @interface Highcharts.SeriesLegendItemClickEventObject\n */ /**\n* Related browser event.\n* @name Highcharts.SeriesLegendItemClickEventObject#browserEvent\n* @type {Highcharts.PointerEvent}\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-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport U from '../Utilities.js';\nvar extend = U.extend, merge = U.merge, pick = U.pick;\n/* *\n *\n * Namespace\n *\n * */\nvar LegendSymbol;\n(function (LegendSymbol) {\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Get the series' symbol in the legend.\n *\n * This method should be overridable to create custom symbols through\n * Highcharts.seriesTypes[type].prototype.drawLegendSymbol.\n *\n * @private\n * @function Highcharts.LegendSymbolMixin.drawLineMarker\n *\n * @param {Highcharts.Legend} legend\n * The legend object.\n */\n function drawLineMarker(legend) {\n var legendItem = this.legendItem = this.legendItem || {}, options = this.options, symbolWidth = legend.symbolWidth, symbolHeight = legend.symbolHeight, generalRadius = symbolHeight / 2, renderer = this.chart.renderer, legendItemGroup = legendItem.group, verticalCenter = legend.baseline -\n Math.round(legend.fontMetrics.b * 0.3);\n var attr = {}, legendSymbol, markerOptions = options.marker, lineSizer = 0;\n // Draw the line\n if (!this.chart.styledMode) {\n attr = {\n 'stroke-width': Math.min(options.lineWidth || 0, 24)\n };\n if (options.dashStyle) {\n attr.dashstyle = options.dashStyle;\n }\n else if (options.linecap !== 'square') {\n attr['stroke-linecap'] = 'round';\n }\n }\n legendItem.line = renderer\n .path()\n .addClass('highcharts-graph')\n .attr(attr)\n .add(legendItemGroup);\n if (attr['stroke-linecap']) {\n lineSizer = Math.min(legendItem.line.strokeWidth(), symbolWidth) / 2;\n }\n legendItem.line\n .attr({\n d: [\n ['M', lineSizer, verticalCenter],\n ['L', symbolWidth - lineSizer, verticalCenter]\n ]\n });\n // Draw the marker\n if (markerOptions && markerOptions.enabled !== false && symbolWidth) {\n // Do not allow the marker to be larger than the symbolHeight\n var radius = Math.min(pick(markerOptions.radius, generalRadius), generalRadius);\n // Restrict symbol markers size\n if (this.symbol.indexOf('url') === 0) {\n markerOptions = merge(markerOptions, {\n width: symbolHeight,\n height: symbolHeight\n });\n radius = 0;\n }\n legendItem.symbol = legendSymbol = renderer\n .symbol(this.symbol, (symbolWidth / 2) - radius, verticalCenter - radius, 2 * radius, 2 * radius, extend({ context: 'legend' }, markerOptions))\n .addClass('highcharts-point')\n .add(legendItemGroup);\n legendSymbol.isMarker = true;\n }\n }\n LegendSymbol.drawLineMarker = drawLineMarker;\n /**\n * Get the series' symbol in the legend.\n *\n * This method should be overridable to create custom symbols through\n * Highcharts.seriesTypes[type].prototype.drawLegendSymbol.\n *\n * @private\n * @function Highcharts.LegendSymbolMixin.drawRectangle\n *\n * @param {Highcharts.Legend} legend\n * The legend object\n *\n * @param {Highcharts.Point|Highcharts.Series} item\n * The series (this) or point\n */\n function drawRectangle(legend, item) {\n var legendItem = item.legendItem || {}, options = legend.options, symbolHeight = legend.symbolHeight, square = options.squareSymbol, symbolWidth = square ? symbolHeight : legend.symbolWidth;\n legendItem.symbol = this.chart.renderer\n .rect(square ? (legend.symbolWidth - symbolHeight) / 2 : 0, legend.baseline - symbolHeight + 1, // #3988\n symbolWidth, symbolHeight, pick(legend.options.symbolRadius, symbolHeight / 2))\n .addClass('highcharts-point')\n .attr({\n zIndex: 3\n })\n .add(legendItem.group);\n }\n LegendSymbol.drawRectangle = drawRectangle;\n})(LegendSymbol || (LegendSymbol = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default LegendSymbol;\n","/* *\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport H from './Globals.js';\nvar charts = H.charts, doc = H.doc, noop = H.noop, win = H.win;\nimport Pointer from './Pointer.js';\nimport U from './Utilities.js';\nvar addEvent = U.addEvent, css = U.css, objectEach = U.objectEach, pick = U.pick, removeEvent = U.removeEvent;\n/* *\n *\n * Constants\n *\n * */\n// The touches object keeps track of the points being touched at all times\nvar touches = {};\nvar hasPointerEvent = !!win.PointerEvent;\n/* *\n *\n * Functions\n *\n * */\n/* eslint-disable valid-jsdoc */\n/** @private */\nfunction getWebkitTouches() {\n var fake = [];\n fake.item = function (i) {\n return this[i];\n };\n objectEach(touches, function (touch) {\n fake.push({\n pageX: touch.pageX,\n pageY: touch.pageY,\n target: touch.target\n });\n });\n return fake;\n}\n/** @private */\nfunction translateMSPointer(e, method, wktype, func) {\n var chart = charts[Pointer.hoverChartIndex || NaN];\n if ((e.pointerType === 'touch' ||\n e.pointerType === e.MSPOINTER_TYPE_TOUCH) && chart) {\n var p = chart.pointer;\n func(e);\n p[method]({\n type: wktype,\n target: e.currentTarget,\n preventDefault: noop,\n touches: getWebkitTouches()\n });\n }\n}\n/* *\n *\n * Class\n *\n * */\n/** @private */\nvar MSPointer = /** @class */ (function (_super) {\n __extends(MSPointer, _super);\n function MSPointer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /* *\n *\n * Static Functions\n *\n * */\n MSPointer.isRequired = function () {\n return !!(!H.hasTouch && (win.PointerEvent || win.MSPointerEvent));\n };\n /* *\n *\n * Functions\n *\n * */\n /**\n * Add or remove the MS Pointer specific events\n * @private\n * @function Highcharts.Pointer#batchMSEvents\n */\n MSPointer.prototype.batchMSEvents = function (fn) {\n fn(this.chart.container, hasPointerEvent ? 'pointerdown' : 'MSPointerDown', this.onContainerPointerDown);\n fn(this.chart.container, hasPointerEvent ? 'pointermove' : 'MSPointerMove', this.onContainerPointerMove);\n fn(doc, hasPointerEvent ? 'pointerup' : 'MSPointerUp', this.onDocumentPointerUp);\n };\n // Destroy MS events also\n MSPointer.prototype.destroy = function () {\n this.batchMSEvents(removeEvent);\n _super.prototype.destroy.call(this);\n };\n // Disable default IE actions for pinch and such on chart element\n MSPointer.prototype.init = function (chart, options) {\n _super.prototype.init.call(this, chart, options);\n if (this.hasZoom) { // #4014\n css(chart.container, {\n '-ms-touch-action': 'none',\n 'touch-action': 'none'\n });\n }\n };\n /**\n * @private\n * @function Highcharts.Pointer#onContainerPointerDown\n */\n MSPointer.prototype.onContainerPointerDown = function (e) {\n translateMSPointer(e, 'onContainerTouchStart', 'touchstart', function (e) {\n touches[e.pointerId] = {\n pageX: e.pageX,\n pageY: e.pageY,\n target: e.currentTarget\n };\n });\n };\n /**\n * @private\n * @function Highcharts.Pointer#onContainerPointerMove\n */\n MSPointer.prototype.onContainerPointerMove = function (e) {\n translateMSPointer(e, 'onContainerTouchMove', 'touchmove', function (e) {\n touches[e.pointerId] = ({ pageX: e.pageX, pageY: e.pageY });\n if (!touches[e.pointerId].target) {\n touches[e.pointerId].target = e.currentTarget;\n }\n });\n };\n /**\n * @private\n * @function Highcharts.Pointer#onDocumentPointerUp\n */\n MSPointer.prototype.onDocumentPointerUp = function (e) {\n translateMSPointer(e, 'onDocumentTouchEnd', 'touchend', function (e) {\n delete touches[e.pointerId];\n });\n };\n // Add IE specific touch events to chart\n MSPointer.prototype.setDOMEvents = function () {\n var tooltip = this.chart.tooltip;\n _super.prototype.setDOMEvents.call(this);\n if (this.hasZoom ||\n pick((tooltip && tooltip.options.followTouchMove), true)) {\n this.batchMSEvents(addEvent);\n }\n };\n return MSPointer;\n}(Pointer));\n/* *\n *\n * Default Export\n *\n * */\nexport default MSPointer;\n","/* *\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport Color from './Color/Color.js';\nvar color = Color.parse;\nimport H from './Globals.js';\nvar charts = H.charts, noop = H.noop;\nimport Tooltip from './Tooltip.js';\nimport U from './Utilities.js';\nvar addEvent = U.addEvent, attr = U.attr, css = U.css, defined = U.defined, extend = U.extend, find = U.find, fireEvent = U.fireEvent, isNumber = U.isNumber, isObject = U.isObject, objectEach = U.objectEach, offset = U.offset, pick = U.pick, splat = U.splat;\n/* *\n *\n * Class\n *\n * */\n/* eslint-disable no-invalid-this, valid-jsdoc */\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 */\nvar Pointer = /** @class */ (function () {\n /* *\n *\n * Constructors\n *\n * */\n function Pointer(chart, options) {\n this.lastValidTouch = {};\n this.pinchDown = [];\n this.runChartClick = false;\n this.eventsToUnbind = [];\n this.chart = chart;\n this.hasDragged = false;\n this.options = options;\n this.init(chart, options);\n }\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 * @private\n * @function Highcharts.Pointer#applyInactiveState\n *\n * @param {Array} points\n * Currently hovered points\n */\n Pointer.prototype.applyInactiveState = function (points) {\n var activeSeries = [], series;\n // Get all active series from the hovered points\n (points || []).forEach(function (item) {\n 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 = activeSeries.concat(series.linkedSeries);\n }\n // Include navigator series\n if (series.navigatorSeries) {\n activeSeries.push(series.navigatorSeries);\n }\n });\n // Now loop over all series, filtering out active series\n this.chart.series.forEach(function (inactiveSeries) {\n if (activeSeries.indexOf(inactiveSeries) === -1) {\n // Inactive series\n inactiveSeries.setState('inactive', true);\n }\n else if (inactiveSeries.options.inactiveOtherPoints) {\n // Active series, but other points should be inactivated\n inactiveSeries.setAllPointsToState('inactive');\n }\n });\n };\n /**\n * Destroys the Pointer object and disconnects DOM events.\n *\n * @function Highcharts.Pointer#destroy\n */\n Pointer.prototype.destroy = function () {\n var pointer = this;\n this.eventsToUnbind.forEach(function (unbind) { return unbind(); });\n this.eventsToUnbind = [];\n if (!H.chartCount) {\n if (Pointer.unbindDocumentMouseUp) {\n Pointer.unbindDocumentMouseUp = Pointer.unbindDocumentMouseUp();\n }\n if (Pointer.unbindDocumentTouchEnd) {\n Pointer.unbindDocumentTouchEnd = (Pointer.unbindDocumentTouchEnd());\n }\n }\n // memory and CPU leak\n clearInterval(pointer.tooltipTimeout);\n objectEach(pointer, function (_val, prop) {\n pointer[prop] = void 0;\n });\n };\n /**\n * Calculate attrs for selection marker.\n * @private\n * @function Highcharts.Pointer#getSelectionMarkerAttrs\n * @emits getSelectionMarkerAttrs\n */\n Pointer.prototype.getSelectionMarkerAttrs = function (chartX, chartY) {\n var _this = this;\n var e = {\n args: { chartX: chartX, chartY: chartY },\n attrs: {},\n shapeType: 'rect'\n };\n fireEvent(this, 'getSelectionMarkerAttrs', e, function (e) {\n var _a = _this, chart = _a.chart, _b = _a.mouseDownX, mouseDownX = _b === void 0 ? 0 : _b, _c = _a.mouseDownY, mouseDownY = _c === void 0 ? 0 : _c, zoomHor = _a.zoomHor, zoomVert = _a.zoomVert, attrs = e.attrs;\n var 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\n if (zoomHor) {\n size = chartX - mouseDownX;\n attrs.width = 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.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 * @private\n * @function Highcharts.Pointer#drag\n */\n Pointer.prototype.drag = function (e) {\n var chart = this.chart, chartOptions = chart.options.chart, plotLeft = chart.plotLeft, plotTop = chart.plotTop, plotWidth = chart.plotWidth, plotHeight = chart.plotHeight, mouseDownX = (this.mouseDownX || 0), mouseDownY = (this.mouseDownY || 0), panningEnabled = isObject(chartOptions.panning) ?\n chartOptions.panning && chartOptions.panning.enabled :\n chartOptions.panning, panKey = (chartOptions.panKey && e[chartOptions.panKey + 'Key']);\n var 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 var _a = this.getSelectionMarkerAttrs(chartX, chartY), shapeType = _a.shapeType, attrs = _a.attrs;\n // make a selection\n if ((chart.hasCartesianSeries || chart.mapView) &&\n (this.zoomX || this.zoomY) &&\n clickedInside &&\n !panKey) {\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: chartOptions.selectionMarkerFill ||\n color(\"#335cad\" /* Palette.highlightColor80 */)\n .setOpacity(0.25).get()\n });\n }\n }\n }\n if (selectionMarker) {\n selectionMarker.attr(attrs);\n }\n // panning\n if (clickedInside &&\n !selectionMarker &&\n panningEnabled) {\n chart.pan(e, chartOptions.panning);\n }\n }\n };\n /**\n * Start a drag operation.\n * @private\n * @function Highcharts.Pointer#dragStart\n */\n Pointer.prototype.dragStart = function (e) {\n var chart = this.chart;\n // Record the start position\n chart.mouseIsDown = e.type;\n chart.cancelClick = false;\n chart.mouseDownX = this.mouseDownX = e.chartX;\n chart.mouseDownY = this.mouseDownY = e.chartY;\n };\n /**\n * Get selection box to calculate extremes\n * @private\n * @function Highcharts.Pointer#getSelectionBox\n * @emits getSelectionBox\n */\n Pointer.prototype.getSelectionBox = function (marker) {\n var e = {\n args: { marker: marker },\n result: {}\n };\n fireEvent(this, 'getSelectionBox', e, function (e) {\n e.result = {\n x: marker.attr ? +marker.attr('x') : marker.x,\n y: marker.attr ? +marker.attr('y') : marker.y,\n width: marker.attr ? marker.attr('width') : marker.width,\n height: marker.attr ? marker.attr('height') : marker.height\n };\n });\n return e.result;\n };\n /**\n * On mouse up or touch end across the entire document, drop the selection.\n * @private\n * @function Highcharts.Pointer#drop\n */\n Pointer.prototype.drop = function (e) {\n var pointer = this, chart = this.chart, hasPinched = this.hasPinched;\n if (this.selectionMarker) {\n var _a = this.getSelectionBox(this.selectionMarker), x_1 = _a.x, y_1 = _a.y, width_1 = _a.width, height_1 = _a.height;\n var selectionData_1 = {\n originalEvent: e,\n xAxis: [],\n yAxis: [],\n x: x_1,\n y: y_1,\n width: width_1,\n height: height_1\n }, \n // Start by false runZoom, unless when we have a mapView, in\n // which case the zoom will be handled in the selection event.\n runZoom_1 = Boolean(chart.mapView);\n // a selection has been made\n if (this.hasDragged || hasPinched) {\n // record each axis' min and max\n chart.axes.forEach(function (axis) {\n if (axis.zoomEnabled &&\n defined(axis.min) &&\n (hasPinched ||\n pointer[{\n xAxis: 'zoomX',\n yAxis: 'zoomY'\n }[axis.coll]]) &&\n isNumber(x_1) &&\n isNumber(y_1) &&\n isNumber(width_1) &&\n isNumber(height_1)) { // #859, #3569\n var horiz = axis.horiz, minPixelPadding = e.type === 'touchend' ?\n axis.minPixelPadding :\n 0, // #1207, #3075\n selectionMin = axis.toValue((horiz ? x_1 : y_1) + minPixelPadding), selectionMax = axis.toValue((horiz ? x_1 + width_1 : y_1 + height_1) -\n minPixelPadding);\n selectionData_1[axis.coll].push({\n axis: axis,\n // Min/max for reversed axes\n min: Math.min(selectionMin, selectionMax),\n max: Math.max(selectionMin, selectionMax)\n });\n runZoom_1 = true;\n }\n });\n if (runZoom_1) {\n fireEvent(chart, 'selection', selectionData_1, function (args) {\n chart.zoom(extend(args, hasPinched ?\n { animation: false } :\n null));\n });\n }\n }\n if (isNumber(chart.index)) {\n this.selectionMarker = this.selectionMarker.destroy();\n }\n // Reset scaling preview\n if (hasPinched) {\n this.scaleGroups();\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 = this.hasDragged = this.hasPinched = false;\n this.pinchDown = [];\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} 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 Pointer.prototype.findNearestKDPoint = function (series, shared, e) {\n var closest;\n /** @private */\n function sort(p1, p2) {\n var isCloserX = p1.distX - p2.distX, isCloser = p1.dist - p2.dist, isAbove = ((p2.series.group && p2.series.group.zIndex) -\n (p1.series.group && p1.series.group.zIndex));\n var 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 var 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 /**\n * @private\n * @function Highcharts.Pointer#getChartCoordinatesFromPoint\n */\n Pointer.prototype.getChartCoordinatesFromPoint = function (point, inverted) {\n var series = point.series, xAxis = series.xAxis, yAxis = series.yAxis, shapeArgs = point.shapeArgs;\n if (xAxis && yAxis) {\n var x = pick(point.clientX, point.plotX);\n var 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 && 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 Pointer.prototype.getChartPosition = function () {\n if (this.chartPosition) {\n return this.chartPosition;\n }\n var container = this.chart.container;\n var pos = offset(container);\n this.chartPosition = {\n left: pos.left,\n top: pos.top,\n scaleX: 1,\n scaleY: 1\n };\n var offsetWidth = container.offsetWidth;\n var offsetHeight = container.offsetHeight;\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 Pointer.prototype.getCoordinates = function (e) {\n var coordinates = {\n xAxis: [],\n yAxis: []\n };\n this.chart.axes.forEach(function (axis) {\n coordinates[axis.isXAxis ? 'xAxis' : 'yAxis'].push({\n axis: 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 * @private\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} 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 Pointer.prototype.getHoverData = function (existingHoverPoint, existingHoverSeries, series, isDirectTouch, shared, e) {\n var hoverPoints = [], useExisting = !!(isDirectTouch && existingHoverPoint), filter = function (s) {\n return (s.visible &&\n !(!shared && s.directTouch) && // #3821\n pick(s.options.enableMouseTracking, true));\n };\n var 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 var 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(function (s) { return s.stickyTracking &&\n (eventArgs.filter || filter)(s); });\n // Use existing hovered point or find the one closest to coordinates.\n var hoverPoint = useExisting || !e ?\n existingHoverPoint :\n this.findNearestKDPoint(searchSeries, shared, e);\n // Assign hover series\n hoverSeries = hoverPoint && 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 var point = find(s.points, function (p) {\n return p.x === hoverPoint.x && !p.isNull;\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 /**\n * @private\n * @function Highcharts.Pointer#getPointFromEvent\n */\n Pointer.prototype.getPointFromEvent = function (e) {\n var target = e.target, point;\n while (target && !point) {\n point = target.point;\n target = target.parentNode;\n }\n return point;\n };\n /**\n * @private\n * @function Highcharts.Pointer#onTrackerMouseOut\n */\n Pointer.prototype.onTrackerMouseOut = function (e) {\n var chart = this.chart;\n var relatedTarget = e.relatedTarget || e.toElement;\n var 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 Pointer.prototype.inClass = function (element, className) {\n var 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 * @private\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 Pointer.prototype.init = function (chart, options) {\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 && options.chart.events.click);\n this.pinchDown = [];\n this.lastValidTouch = {};\n if (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, options.tooltip);\n }\n this.setDOMEvents();\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 Pointer.prototype.normalize = function (e, chartPosition) {\n var touches = e.touches;\n // iOS (#2757)\n var 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 var 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 /**\n * @private\n * @function Highcharts.Pointer#onContainerClick\n */\n Pointer.prototype.onContainerClick = function (e) {\n var chart = this.chart;\n var hoverPoint = chart.hoverPoint;\n var pEvt = this.normalize(e);\n var plotLeft = chart.plotLeft;\n var 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 /**\n * @private\n * @function Highcharts.Pointer#onContainerMouseDown\n */\n Pointer.prototype.onContainerMouseDown = function (e) {\n var isPrimaryButton = ((e.buttons || e.button) & 1) === 1;\n // Normalize before the 'if' for the legacy IE (#7850)\n e = this.normalize(e);\n // #11635, Firefox does not reliable 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 (incl. IE 8 support)\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 e.preventDefault();\n }\n this.dragStart(e);\n }\n };\n /**\n * When mouse leaves the container, hide the tooltip.\n * @private\n * @function Highcharts.Pointer#onContainerMouseLeave\n */\n Pointer.prototype.onContainerMouseLeave = function (e) {\n var chart = charts[pick(Pointer.hoverChartIndex, -1)];\n var tooltip = this.chart.tooltip;\n e = this.normalize(e);\n // #4886, MS Touch end fires mouseleave but with no related target\n if (chart &&\n (e.relatedTarget || e.toElement)) {\n chart.pointer.reset();\n // Also reset the chart position, used in #149 fix\n chart.pointer.chartPosition = void 0;\n }\n // #11635, Firefox wheel scroll does not fire out events consistently\n if (tooltip && !tooltip.isHidden) {\n this.reset();\n }\n };\n /**\n * When mouse enters the container, delete pointer's chartPosition.\n * @private\n * @function Highcharts.Pointer#onContainerMouseEnter\n */\n Pointer.prototype.onContainerMouseEnter = function (e) {\n delete this.chartPosition;\n };\n /**\n * The mousemove, touchmove and touchstart event handler\n * @private\n * @function Highcharts.Pointer#onContainerMouseMove\n */\n Pointer.prototype.onContainerMouseMove = function (e) {\n var chart = this.chart, tooltip = chart.tooltip, pEvt = this.normalize(e);\n this.setHoverChartIndex();\n // In IE8 we apparently need this returnValue set to false in order to\n // avoid text being selected. But in Chrome, e.returnValue is prevented,\n // plus we don't need to run e.preventDefault to prevent selected text\n // in modern browsers. So we set it conditionally. Remove it when IE8 is\n // no longer needed. #2251, #3224.\n if (!pEvt.preventDefault) {\n pEvt.returnValue = false;\n }\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.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 &&\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 /**\n * @private\n * @function Highcharts.Pointer#onDocumentTouchEnd\n */\n Pointer.prototype.onDocumentTouchEnd = function (e) {\n var hoverChart = charts[pick(Pointer.hoverChartIndex, -1)];\n if (hoverChart) {\n hoverChart.pointer.drop(e);\n }\n };\n /**\n * @private\n * @function Highcharts.Pointer#onContainerTouchMove\n */\n Pointer.prototype.onContainerTouchMove = function (e) {\n if (this.touchSelect(e)) {\n this.onContainerMouseMove(e);\n }\n else {\n this.touch(e);\n }\n };\n /**\n * @private\n * @function Highcharts.Pointer#onContainerTouchStart\n */\n Pointer.prototype.onContainerTouchStart = function (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 * @private\n * @function Highcharts.Pointer#onDocumentMouseMove\n */\n Pointer.prototype.onDocumentMouseMove = function (e) {\n var chart = this.chart;\n var tooltip = chart.tooltip;\n var chartPosition = this.chartPosition;\n var 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 &&\n tooltip.shouldStickOnContact(pEvt)) &&\n !this.inClass(pEvt.target, 'highcharts-tracker')) {\n this.reset();\n }\n };\n /**\n * @private\n * @function Highcharts.Pointer#onDocumentMouseUp\n */\n Pointer.prototype.onDocumentMouseUp = function (e) {\n var chart = charts[pick(Pointer.hoverChartIndex, -1)];\n if (chart) {\n chart.pointer.drop(e);\n }\n };\n /**\n * Handle touch events with two touches\n * @private\n * @function Highcharts.Pointer#pinch\n */\n Pointer.prototype.pinch = function (e) {\n var self = this, chart = self.chart, pinchDown = self.pinchDown, touches = (e.touches || []), touchesLength = touches.length, lastValidTouch = self.lastValidTouch, hasZoom = self.hasZoom, transform = {}, fireClickEvent = touchesLength === 1 && ((self.inClass(e.target, 'highcharts-tracker') &&\n chart.runTrackerClick) ||\n self.runChartClick), clip = {}, tooltip = self.chart.tooltip, followTouchMove = touchesLength === 1 &&\n pick((tooltip && tooltip.options.followTouchMove), true);\n var selectionMarker = self.selectionMarker;\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 self.initiated = true;\n }\n else if (followTouchMove) {\n // #16119: Prevent blocking scroll when single-finger panning is\n // not enabled\n self.initiated = false;\n }\n // On touch devices, only proceed to trigger click if a handler is\n // defined\n if (hasZoom &&\n self.initiated &&\n !fireClickEvent &&\n e.cancelable !== false) {\n e.preventDefault();\n }\n // Normalize each touch\n [].map.call(touches, function (e) {\n return self.normalize(e);\n });\n // Register the touch start position\n if (e.type === 'touchstart') {\n [].forEach.call(touches, function (e, i) {\n pinchDown[i] = { chartX: e.chartX, chartY: e.chartY };\n });\n lastValidTouch.x = [pinchDown[0].chartX, pinchDown[1] &&\n pinchDown[1].chartX];\n lastValidTouch.y = [pinchDown[0].chartY, pinchDown[1] &&\n pinchDown[1].chartY];\n // Identify the data bounds in pixels\n chart.axes.forEach(function (axis) {\n if (axis.zoomEnabled) {\n var bounds = chart.bounds[axis.horiz ? 'h' : 'v'], minPixelPadding = axis.minPixelPadding, min = axis.toPixels(Math.min(pick(axis.options.min, axis.dataMin), axis.dataMin)), max = axis.toPixels(Math.max(pick(axis.options.max, axis.dataMax), axis.dataMax)), absMin = Math.min(min, max), absMax = Math.max(min, max);\n // Store the bounds for use in the touchmove handler\n bounds.min = Math.min(axis.pos, absMin - minPixelPadding);\n bounds.max = Math.max(axis.pos + axis.len, absMax + minPixelPadding);\n }\n });\n self.res = true; // reset on next move\n // Optionally move the tooltip on touchmove\n }\n else if (followTouchMove) {\n this.runPointActions(self.normalize(e));\n // Event type is touchmove, handle panning and pinching\n }\n else if (pinchDown.length) { // can be 0 when releasing, if touchend\n // fires first\n fireEvent(chart, 'touchpan', { originalEvent: e }, function () {\n // Set the marker\n if (!selectionMarker) {\n // @todo It's a mock object, so maybe we need a separate\n // interface\n self.selectionMarker = selectionMarker = extend({\n destroy: noop,\n touch: true\n }, chart.plotBox);\n }\n self.pinchTranslate(pinchDown, touches, transform, selectionMarker, clip, lastValidTouch);\n self.hasPinched = hasZoom;\n // Scale and translate the groups to provide visual feedback\n // during pinching\n self.scaleGroups(transform, clip);\n });\n if (self.res) {\n self.res = false;\n this.reset(false, 0);\n }\n }\n };\n /**\n * Run translation operations\n * @private\n * @function Highcharts.Pointer#pinchTranslate\n */\n Pointer.prototype.pinchTranslate = function (pinchDown, touches, transform, selectionMarker, clip, lastValidTouch) {\n if (this.zoomHor) {\n this.pinchTranslateDirection(true, pinchDown, touches, transform, selectionMarker, clip, lastValidTouch);\n }\n if (this.zoomVert) {\n this.pinchTranslateDirection(false, pinchDown, touches, transform, selectionMarker, clip, lastValidTouch);\n }\n };\n /**\n * Run translation operations for each direction (horizontal and vertical)\n * independently.\n * @private\n * @function Highcharts.Pointer#pinchTranslateDirection\n */\n Pointer.prototype.pinchTranslateDirection = function (horiz, pinchDown, touches, transform, selectionMarker, clip, lastValidTouch, forcedScale) {\n var chart = this.chart, xy = horiz ? 'x' : 'y', XY = horiz ? 'X' : 'Y', sChartXY = ('chart' + XY), wh = horiz ? 'width' : 'height', plotLeftTop = chart['plot' + (horiz ? 'Left' : 'Top')], inverted = chart.inverted, bounds = chart.bounds[horiz ? 'h' : 'v'], singleTouch = pinchDown.length === 1, touch0Start = pinchDown[0][sChartXY], touch1Start = !singleTouch && pinchDown[1][sChartXY], setScale = function () {\n // Don't zoom if fingers are too close on this axis\n if (typeof touch1Now === 'number' &&\n Math.abs(touch0Start - touch1Start) > 20) {\n scale = forcedScale ||\n Math.abs(touch0Now - touch1Now) /\n Math.abs(touch0Start - touch1Start);\n }\n clipXY = ((plotLeftTop - touch0Now) / scale) + touch0Start;\n selectionWH = chart['plot' + (horiz ? 'Width' : 'Height')] / scale;\n };\n var selectionWH, selectionXY, clipXY, scale = forcedScale || 1, touch0Now = touches[0][sChartXY], touch1Now = !singleTouch && touches[1][sChartXY], outOfBounds;\n // Set the scale, first pass\n setScale();\n // The clip position (x or y) is altered if out of bounds, the selection\n // position is not\n selectionXY = clipXY;\n // Out of bounds\n if (selectionXY < bounds.min) {\n selectionXY = bounds.min;\n outOfBounds = true;\n }\n else if (selectionXY + selectionWH > bounds.max) {\n selectionXY = bounds.max - selectionWH;\n outOfBounds = true;\n }\n // Is the chart dragged off its bounds, determined by dataMin and\n // dataMax?\n if (outOfBounds) {\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 // 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 // Set geometry for clipping, selection and transformation\n if (!inverted) {\n clip[xy] = clipXY - plotLeftTop;\n clip[wh] = selectionWH;\n }\n var scaleKey = inverted ?\n (horiz ? 'scaleY' : 'scaleX') : 'scale' + XY;\n var transformScale = inverted ? 1 / scale : scale;\n selectionMarker[wh] = selectionWH;\n selectionMarker[xy] = selectionXY;\n transform[scaleKey] = scale;\n transform['translate' + XY] = (transformScale * plotLeftTop) +\n (touch0Now - (transformScale * touch0Start));\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 */\n Pointer.prototype.reset = function (allowMove, delay) {\n var pointer = this, chart = pointer.chart, hoverSeries = chart.hoverSeries, hoverPoint = chart.hoverPoint, hoverPoints = chart.hoverPoints, tooltip = chart.tooltip, tooltipPoints = tooltip && 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 pointer.hoverX = chart.hoverPoints = chart.hoverPoint = null;\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 * @private\n * @function Highcharts.Pointer#runPointActions\n *\n * @emits Highcharts.Point#event:mouseOut\n * @emits Highcharts.Point#event:mouseOver\n */\n Pointer.prototype.runPointActions = function (e, p, force) {\n var pointer = this, chart = pointer.chart, series = chart.series, tooltip = (chart.tooltip && chart.tooltip.options.enabled ?\n chart.tooltip :\n void 0), shared = (tooltip ?\n tooltip.shared :\n false);\n var hoverPoint = p || chart.hoverPoint, hoverSeries = hoverPoint && hoverPoint.series || chart.hoverSeries;\n var // onMouseOver or already hovering a series with directTouch\n isDirectTouch = (!e || e.type !== 'touchmove') && (!!p || ((hoverSeries && 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 var points = hoverData.hoverPoints, followPointer = hoverSeries &&\n 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 && 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|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, function () {\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 var 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', function (e) {\n var chart = charts[Pointer.hoverChartIndex];\n if (chart) {\n chart.pointer.onDocumentMouseMove(e);\n }\n });\n pointer.eventsToUnbind.push(pointer.unDocMouseMove);\n }\n // Issues related to crosshair #4927, #5269 #5066, #5658\n chart.axes.forEach(function drawAxisCrosshair(axis) {\n var snap = pick((axis.crosshair || {}).snap, true);\n var point;\n if (snap) {\n point = chart.hoverPoint; // #13002\n if (!point || point.series[axis.coll] !== axis) {\n point = find(points, function (p) {\n return p.series && p.series[axis.coll] === axis;\n });\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 * Scale series groups to a certain scale and translation.\n * @private\n * @function Highcharts.Pointer#scaleGroups\n */\n Pointer.prototype.scaleGroups = function (attribs, clip) {\n var chart = this.chart;\n // Scale each series\n chart.series.forEach(function (series) {\n var seriesAttribs = attribs || series.getPlotBox(); // #1701\n if (series.group &&\n ((series.xAxis && series.xAxis.zoomEnabled) ||\n chart.mapView)) {\n series.group.attr(seriesAttribs);\n if (series.markerGroup) {\n series.markerGroup.attr(seriesAttribs);\n series.markerGroup.clip(clip ? chart.clipRect : null);\n }\n if (series.dataLabelsGroup) {\n series.dataLabelsGroup.attr(seriesAttribs);\n }\n }\n });\n // Clip\n chart.clipRect.attr(clip || chart.clipBox);\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 * @private\n * @function Highcharts.Pointer#setDOMEvents\n */\n Pointer.prototype.setDOMEvents = function () {\n var _this = this;\n var container = this.chart.container, ownerDoc = container.ownerDocument;\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)));\n this.eventsToUnbind.push(addEvent(container, 'mouseleave', this.onContainerMouseLeave.bind(this)));\n if (!Pointer.unbindDocumentMouseUp) {\n Pointer.unbindDocumentMouseUp = addEvent(ownerDoc, 'mouseup', this.onDocumentMouseUp.bind(this));\n }\n // In case we are dealing with overflow, reset the chart position when\n // scrolling parent elements\n var parent = this.chart.renderTo.parentElement;\n while (parent && parent.tagName !== 'BODY') {\n this.eventsToUnbind.push(addEvent(parent, 'scroll', function () {\n delete _this.chartPosition;\n }));\n parent = parent.parentElement;\n }\n if (H.hasTouch) {\n this.eventsToUnbind.push(addEvent(container, 'touchstart', this.onContainerTouchStart.bind(this), { passive: false }));\n this.eventsToUnbind.push(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 }\n };\n /**\n * Sets the index of the hovered chart and leaves the previous hovered\n * chart, to reset states like tooltip.\n * @private\n * @function Highcharts.Pointer#setHoverChartIndex\n */\n Pointer.prototype.setHoverChartIndex = function () {\n var chart = this.chart;\n var hoverChart = H.charts[pick(Pointer.hoverChartIndex, -1)];\n if (hoverChart &&\n hoverChart !== chart) {\n hoverChart.pointer.onContainerMouseLeave({ relatedTarget: chart.container });\n }\n if (!hoverChart ||\n !hoverChart.mouseIsDown) {\n Pointer.hoverChartIndex = chart.index;\n }\n };\n /**\n * General touch handler shared by touchstart and touchmove.\n * @private\n * @function Highcharts.Pointer#touch\n */\n Pointer.prototype.touch = function (e, start) {\n var chart = this.chart;\n var hasMoved, pinchDown, isInside;\n this.setHoverChartIndex();\n if (e.touches.length === 1) {\n e = this.normalize(e);\n isInside = chart.isInsidePlot(e.chartX - chart.plotLeft, e.chartY - chart.plotTop, {\n visiblePlotOnly: true\n });\n if (isInside && !chart.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 behaviour in Android by\n // checking how much it moved, and cancelling on small\n // distances. #3450.\n if (e.type === 'touchmove') {\n pinchDown = this.pinchDown;\n hasMoved = pinchDown[0] ? Math.sqrt(// #5266\n Math.pow(pinchDown[0].chartX - e.chartX, 2) +\n Math.pow(pinchDown[0].chartY - e.chartY, 2)) >= 4 : 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 }\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 * @private\n * @function Highcharts.Pointer#touchSelect\n */\n Pointer.prototype.touchSelect = function (e) {\n return Boolean(this.chart.options.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 * @private\n * @function Highcharts.Pointer#zoomOption\n */\n Pointer.prototype.zoomOption = function (e) {\n var chart = this.chart, options = chart.options.chart, inverted = chart.inverted;\n var zoomType = options.zooming.type || '', zoomX, zoomY;\n // Look for the pinchType option\n if (/touch/.test(e.type)) {\n zoomType = pick(options.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 };\n return Pointer;\n}());\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}\n*/ /**\n* Positions on the y-axis.\n* @name Highcharts.PointerAxisCoordinatesObject#yAxis\n* @type {Array}\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* 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}\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}\n*/\n''; // keeps doclets above in JS file\n","/* *\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport H from '../Globals.js';\n/* *\n *\n * Namespace\n *\n * */\nvar RendererRegistry;\n(function (RendererRegistry) {\n /* *\n *\n * Constants\n *\n * */\n RendererRegistry.rendererTypes = {};\n /* *\n *\n * Variables\n *\n * */\n var defaultRenderer;\n /* *\n *\n * Functions\n *\n * */\n /**\n * Gets a registered renderer class. If no renderer type is provided or the\n * requested renderer was not founded, the default renderer is returned.\n *\n * @param {string} [rendererType]\n * Renderer type or the default renderer.\n *\n * @return {Highcharts.Class}\n * Returns the requested renderer class or the default renderer class.\n */\n function getRendererType(rendererType) {\n if (rendererType === void 0) { rendererType = defaultRenderer; }\n return (RendererRegistry.rendererTypes[rendererType] || RendererRegistry.rendererTypes[defaultRenderer]);\n }\n RendererRegistry.getRendererType = getRendererType;\n /**\n * Register a renderer class.\n *\n * @param {string} rendererType\n * Renderer type to register.\n *\n * @param {Highcharts.Class} rendererClass\n * Returns the requested renderer class or the default renderer class.\n *\n * @param {boolean} setAsDefault\n * Sets the renderer class as the default renderer.\n */\n function registerRendererType(rendererType, rendererClass, setAsDefault) {\n RendererRegistry.rendererTypes[rendererType] = rendererClass;\n if (!defaultRenderer || setAsDefault) {\n defaultRenderer = rendererType;\n H.Renderer = rendererClass; // compatibility\n }\n }\n RendererRegistry.registerRendererType = registerRendererType;\n})(RendererRegistry || (RendererRegistry = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default RendererRegistry;\n","/* *\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\n/* *\n *\n * Imports\n *\n * */\nimport U from '../Utilities.js';\nvar clamp = U.clamp, pick = U.pick, stableSort = U.stableSort;\n/* *\n *\n * Namespace\n *\n * */\nvar RendererUtilities;\n(function (RendererUtilities) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\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 * @private\n */\n function distribute(boxes, len, maxDistance) {\n // Original array will be altered with added .pos\n var origBoxes = boxes, reducedLen = origBoxes.reducedLen || len, sortByRank = function (a, b) {\n return (b.rank || 0) - (a.rank || 0);\n }, sortByTarget = function (a, b) {\n return a.target - b.target;\n };\n var i, overlapping = true, restBoxes = [], // The outranked overshoot\n box, target, total = 0;\n // If the total size exceeds the len, remove those boxes with the lowest\n // rank\n i = boxes.length;\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 i = 0;\n total = 0;\n while (total <= reducedLen) {\n total += boxes[i].size;\n i++;\n }\n restBoxes = boxes.splice(i - 1, boxes.length);\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(function (box) { return ({\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 origBoxes.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(function (box) {\n var posInCompositeBox = 0;\n // Exceeded maxDistance => abort\n return (box.targets || []).some(function () {\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(function (box) { return 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 * */\nexport default RendererUtilities;\n","/* *\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport A from '../../Animation/AnimationUtilities.js';\nvar animate = A.animate, animObject = A.animObject, stop = A.stop;\nimport Color from '../../Color/Color.js';\nimport H from '../../Globals.js';\nvar deg2rad = H.deg2rad, doc = H.doc, noop = H.noop, svg = H.svg, SVG_NS = H.SVG_NS, win = H.win;\nimport U from '../../Utilities.js';\nvar addEvent = U.addEvent, attr = U.attr, createElement = U.createElement, css = U.css, defined = U.defined, erase = U.erase, extend = U.extend, fireEvent = U.fireEvent, isArray = U.isArray, isFunction = U.isFunction, isNumber = U.isNumber, isString = U.isString, merge = U.merge, objectEach = U.objectEach, pick = U.pick, pInt = U.pInt, removeEvent = U.removeEvent, syncTimeout = U.syncTimeout, uniqueKey = U.uniqueKey;\n/* *\n *\n * Class\n *\n * */\n/* eslint-disable no-invalid-this, valid-jsdoc */\n/**\n * The SVGElement prototype is a JavaScript wrapper for SVG elements used in the\n * rendering layer of Highcharts. Combined with the\n * {@link Highcharts.SVGRenderer}\n * object, these prototypes allow freeform annotation in the charts or even in\n * HTML pages without instanciating a chart. The SVGElement can also wrap HTML\n * labels, when `text` or `label` elements are created with the `useHTML`\n * parameter.\n *\n * The SVGElement instances are created through factory functions on the\n * {@link Highcharts.SVGRenderer}\n * object, like\n * {@link Highcharts.SVGRenderer#rect|rect},\n * {@link Highcharts.SVGRenderer#path|path},\n * {@link Highcharts.SVGRenderer#text|text},\n * {@link Highcharts.SVGRenderer#label|label},\n * {@link Highcharts.SVGRenderer#g|g}\n * and more.\n *\n * @class\n * @name Highcharts.SVGElement\n */\nvar SVGElement = /** @class */ (function () {\n function SVGElement() {\n /* *\n *\n * Properties\n *\n * */\n this.element = void 0;\n this.onEvents = {};\n this.opacity = 1; // Default base for animation\n this.renderer = void 0;\n this.SVG_NS = SVG_NS;\n // Custom attributes used for symbols, these should be filtered out when\n // setting SVGElement attributes (#9375).\n this.symbolCustomAttribs = [\n 'x',\n 'y',\n 'width',\n 'height',\n 'r',\n 'start',\n 'end',\n 'innerR',\n 'anchorX',\n 'anchorY',\n 'rounded'\n ];\n }\n // @todo public zIndex?: number;\n /* *\n *\n * Functions\n *\n * */\n /**\n * Get the current value of an attribute or pseudo attribute,\n * used mainly for animation. Called internally from\n * the {@link Highcharts.SVGRenderer#attr} function.\n *\n * @private\n * @function Highcharts.SVGElement#_defaultGetter\n *\n * @param {string} key\n * Property key.\n *\n * @return {number|string}\n * Property value.\n */\n SVGElement.prototype._defaultGetter = function (key) {\n var ret = pick(this[key + 'Value'], // align getter\n this[key], this.element ? this.element.getAttribute(key) : null, 0);\n if (/^[\\-0-9\\.]+$/.test(ret)) { // is numerical\n ret = parseFloat(ret);\n }\n return ret;\n };\n /**\n * @private\n * @function Highcharts.SVGElement#_defaultSetter\n *\n * @param {string} value\n *\n * @param {string} key\n *\n * @param {Highcharts.SVGDOMElement} element\n *\n */\n SVGElement.prototype._defaultSetter = function (value, key, element) {\n element.setAttribute(key, value);\n };\n /**\n * Add the element to the DOM. All elements must be added this way.\n *\n * @sample highcharts/members/renderer-g\n * Elements added to a group\n *\n * @function Highcharts.SVGElement#add\n *\n * @param {Highcharts.SVGElement} [parent]\n * The parent item to add it to. If undefined, the element is added\n * to the {@link Highcharts.SVGRenderer.box}.\n *\n * @return {Highcharts.SVGElement}\n * Returns the SVGElement for chaining.\n */\n SVGElement.prototype.add = function (parent) {\n var renderer = this.renderer, element = this.element;\n var inserted;\n if (parent) {\n this.parentGroup = parent;\n }\n // Build formatted text\n if (typeof this.textStr !== 'undefined' &&\n this.element.nodeName === 'text' // Not for SVGLabel instances\n ) {\n renderer.buildText(this);\n }\n // Mark as added\n this.added = true;\n // If we're adding to renderer root, or other elements in the group\n // have a z index, we need to handle it\n if (!parent || parent.handleZ || this.zIndex) {\n inserted = this.zIndexSetter();\n }\n // If zIndex is not handled, append at the end\n if (!inserted) {\n (parent ?\n parent.element :\n renderer.box).appendChild(element);\n }\n // fire an event for internal hooks\n if (this.onAdd) {\n this.onAdd();\n }\n return this;\n };\n /**\n * Add a class name to an element.\n *\n * @function Highcharts.SVGElement#addClass\n *\n * @param {string} className\n * The new class name to add.\n *\n * @param {boolean} [replace=false]\n * When true, the existing class name(s) will be overwritten with the new\n * one. When false, the new one is added.\n *\n * @return {Highcharts.SVGElement}\n * Return the SVG element for chainability.\n */\n SVGElement.prototype.addClass = function (className, replace) {\n var currentClassName = replace ? '' : (this.attr('class') || '');\n // Trim the string and remove duplicates\n className = (className || '')\n .split(/ /g)\n .reduce(function (newClassName, name) {\n if (currentClassName.indexOf(name) === -1) {\n newClassName.push(name);\n }\n return newClassName;\n }, (currentClassName ?\n [currentClassName] :\n []))\n .join(' ');\n if (className !== currentClassName) {\n this.attr('class', className);\n }\n return this;\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 *\n * @private\n * @function Highcharts.SVGElement#afterSetters\n */\n SVGElement.prototype.afterSetters = function () {\n // Update transform. Do this outside the loop to prevent redundant\n // updating for batch setting of attributes.\n if (this.doTransform) {\n this.updateTransform();\n this.doTransform = false;\n }\n };\n /**\n * Align the element relative to the chart or another box.\n *\n * @function Highcharts.SVGElement#align\n *\n * @param {Highcharts.AlignObject} [alignOptions]\n * The alignment options. The function can be called without this\n * parameter in order to re-align an element after the box has been\n * updated.\n *\n * @param {boolean} [alignByTranslate]\n * Align element by translation.\n *\n * @param {string|Highcharts.BBoxObject} [box]\n * The box to align to, needs a width and height. When the box is a\n * string, it refers to an object in the Renderer. For example, when\n * box is `spacingBox`, it refers to `Renderer.spacingBox` which\n * holds `width`, `height`, `x` and `y` properties.\n *\n * @return {Highcharts.SVGElement} Returns the SVGElement for chaining.\n */\n SVGElement.prototype.align = function (alignOptions, alignByTranslate, box) {\n var attribs = {}, renderer = this.renderer, alignedObjects = renderer.alignedObjects;\n var x, y, alignTo, alignFactor, vAlignFactor;\n // First call on instanciate\n if (alignOptions) {\n this.alignOptions = alignOptions;\n this.alignByTranslate = alignByTranslate;\n if (!box || isString(box)) {\n this.alignTo = alignTo = box || 'renderer';\n // prevent duplicates, like legendGroup after resize\n erase(alignedObjects, this);\n alignedObjects.push(this);\n box = void 0; // reassign it below\n }\n // When called on resize, no arguments are supplied\n }\n else {\n alignOptions = this.alignOptions;\n alignByTranslate = this.alignByTranslate;\n alignTo = this.alignTo;\n }\n box = pick(box, renderer[alignTo], alignTo === 'scrollablePlotBox' ?\n renderer.plotBox : void 0, renderer);\n // Assign variables\n var align = alignOptions.align, vAlign = alignOptions.verticalAlign;\n // default: left align\n x = (box.x || 0) + (alignOptions.x || 0);\n // default: top align\n y = (box.y || 0) + (alignOptions.y || 0);\n // Align\n if (align === 'right') {\n alignFactor = 1;\n }\n else if (align === 'center') {\n alignFactor = 2;\n }\n if (alignFactor) {\n x += (box.width - (alignOptions.width || 0)) /\n alignFactor;\n }\n attribs[alignByTranslate ? 'translateX' : 'x'] = Math.round(x);\n // Vertical align\n if (vAlign === 'bottom') {\n vAlignFactor = 1;\n }\n else if (vAlign === 'middle') {\n vAlignFactor = 2;\n }\n if (vAlignFactor) {\n y += (box.height - (alignOptions.height || 0)) /\n vAlignFactor;\n }\n attribs[alignByTranslate ? 'translateY' : 'y'] = Math.round(y);\n // Animate only if already placed\n this[this.placed ? 'animate' : 'attr'](attribs);\n this.placed = true;\n this.alignAttr = attribs;\n return this;\n };\n /**\n * @private\n * @function Highcharts.SVGElement#alignSetter\n * @param {\"left\"|\"center\"|\"right\"} value\n */\n SVGElement.prototype.alignSetter = function (value) {\n var convert = {\n left: 'start',\n center: 'middle',\n right: 'end'\n };\n if (convert[value]) {\n this.alignValue = value;\n this.element.setAttribute('text-anchor', convert[value]);\n }\n };\n /**\n * Animate to given attributes or CSS properties.\n *\n * @sample highcharts/members/element-on/\n * Setting some attributes by animation\n *\n * @function Highcharts.SVGElement#animate\n *\n * @param {Highcharts.SVGAttributes} params\n * SVG attributes or CSS to animate.\n *\n * @param {boolean|Partial} [options]\n * Animation options.\n *\n * @param {Function} [complete]\n * Function to perform at the end of animation.\n *\n * @return {Highcharts.SVGElement}\n * Returns the SVGElement for chaining.\n */\n SVGElement.prototype.animate = function (params, options, complete) {\n var _this = this;\n var animOptions = animObject(pick(options, this.renderer.globalAnimation, true)), deferTime = animOptions.defer;\n // When the page is hidden save resources in the background by not\n // running animation at all (#9749).\n if (pick(doc.hidden, doc.msHidden, doc.webkitHidden, false)) {\n animOptions.duration = 0;\n }\n if (animOptions.duration !== 0) {\n // allows using a callback with the global animation without\n // overwriting it\n if (complete) {\n animOptions.complete = complete;\n }\n // If defer option is defined delay the animation #12901\n syncTimeout(function () {\n if (_this.element) {\n animate(_this, params, animOptions);\n }\n }, deferTime);\n }\n else {\n this.attr(params, void 0, complete || animOptions.complete);\n // Call the end step synchronously\n objectEach(params, function (val, prop) {\n if (animOptions.step) {\n animOptions.step.call(this, val, { prop: prop, pos: 1, elem: this });\n }\n }, this);\n }\n return this;\n };\n /**\n * Apply a text outline through a custom CSS property, by copying the text\n * element and apply stroke to the copy. Used internally. Contrast checks at\n * [example](https://jsfiddle.net/highcharts/43soe9m1/2/).\n *\n * @example\n * // Specific color\n * text.css({\n * textOutline: '1px black'\n * });\n * // Automatic contrast\n * text.css({\n * color: '#000000', // black text\n * textOutline: '1px contrast' // => white outline\n * });\n *\n * @private\n * @function Highcharts.SVGElement#applyTextOutline\n *\n * @param {string} textOutline\n * A custom CSS `text-outline` setting, defined by `width color`.\n */\n SVGElement.prototype.applyTextOutline = function (textOutline) {\n var elem = this.element, hasContrast = textOutline.indexOf('contrast') !== -1, styles = {};\n // When the text shadow is set to contrast, use dark stroke for light\n // text and vice versa.\n if (hasContrast) {\n styles.textOutline = textOutline = textOutline.replace(/contrast/g, this.renderer.getContrast(elem.style.fill));\n }\n // Extract the stroke width and color\n var parts = textOutline.split(' ');\n var color = parts[parts.length - 1];\n var strokeWidth = parts[0];\n if (strokeWidth && strokeWidth !== 'none' && H.svg) {\n this.fakeTS = true; // Fake text shadow\n // Since the stroke is applied on center of the actual outline, we\n // need to double it to get the correct stroke-width outside the\n // glyphs.\n strokeWidth = strokeWidth.replace(/(^[\\d\\.]+)(.*?)$/g, function (match, digit, unit) {\n return (2 * Number(digit)) + unit;\n });\n // Remove shadows from previous runs.\n this.removeTextOutline();\n var outline_1 = doc.createElementNS(SVG_NS, 'tspan');\n attr(outline_1, {\n 'class': 'highcharts-text-outline',\n fill: color,\n stroke: color,\n 'stroke-width': strokeWidth,\n 'stroke-linejoin': 'round'\n });\n // For each of the tspans and text nodes, create a copy in the\n // outline.\n var parentElem = elem.querySelector('textPath') || elem;\n [].forEach.call(parentElem.childNodes, function (childNode) {\n var clone = childNode.cloneNode(true);\n if (clone.removeAttribute) {\n ['fill', 'stroke', 'stroke-width', 'stroke'].forEach(function (prop) { return clone\n .removeAttribute(prop); });\n }\n outline_1.appendChild(clone);\n });\n // Collect the sum of dy from all children, included nested ones\n var totalHeight_1 = 0;\n [].forEach.call(parentElem.querySelectorAll('text tspan'), function (element) {\n totalHeight_1 += Number(element.getAttribute('dy'));\n });\n // Insert an absolutely positioned break before the original text\n // to keep it in place\n var br = doc.createElementNS(SVG_NS, 'tspan');\n br.textContent = '\\u200B';\n // Reset the position for the following text\n attr(br, {\n x: Number(elem.getAttribute('x')),\n dy: -totalHeight_1\n });\n // Insert the outline\n outline_1.appendChild(br);\n parentElem.insertBefore(outline_1, parentElem.firstChild);\n }\n };\n /**\n * @function Highcharts.SVGElement#attr\n * @param {string} key\n * @return {number|string}\n */ /**\n * Apply native and custom attributes to the SVG elements.\n *\n * In order to set the rotation center for rotation, set x and y to 0 and\n * use `translateX` and `translateY` attributes to position the element\n * instead.\n *\n * Attributes frequently used in Highcharts are `fill`, `stroke`,\n * `stroke-width`.\n *\n * @sample highcharts/members/renderer-rect/\n * Setting some attributes\n *\n * @example\n * // Set multiple attributes\n * element.attr({\n * stroke: 'red',\n * fill: 'blue',\n * x: 10,\n * y: 10\n * });\n *\n * // Set a single attribute\n * element.attr('stroke', 'red');\n *\n * // Get an attribute\n * element.attr('stroke'); // => 'red'\n *\n * @function Highcharts.SVGElement#attr\n *\n * @param {string|Highcharts.SVGAttributes} [hash]\n * The native and custom SVG attributes.\n *\n * @param {number|string|Highcharts.SVGPathArray} [val]\n * If the type of the first argument is `string`, the second can be a\n * value, which will serve as a single attribute setter. If the first\n * argument is a string and the second is undefined, the function\n * serves as a getter and the current value of the property is\n * returned.\n *\n * @param {Function} [complete]\n * A callback function to execute after setting the attributes. This\n * makes the function compliant and interchangeable with the\n * {@link SVGElement#animate} function.\n *\n * @param {boolean} [continueAnimation=true]\n * Used internally when `.attr` is called as part of an animation\n * step. Otherwise, calling `.attr` for an attribute will stop\n * animation for that attribute.\n *\n * @return {Highcharts.SVGElement}\n * If used as a setter, it returns the current\n * {@link Highcharts.SVGElement} so the calls can be chained. If\n * used as a getter, the current value of the attribute is returned.\n */\n SVGElement.prototype.attr = function (hash, val, complete, continueAnimation) {\n var element = this.element, symbolCustomAttribs = this.symbolCustomAttribs;\n var key, hasSetSymbolSize, ret = this, skipAttr, setter;\n // single key-value pair\n if (typeof hash === 'string' && typeof val !== 'undefined') {\n key = hash;\n hash = {};\n hash[key] = val;\n }\n // used as a getter: first argument is a string, second is undefined\n if (typeof hash === 'string') {\n ret = (this[hash + 'Getter'] ||\n this._defaultGetter).call(this, hash, element);\n // setter\n }\n else {\n objectEach(hash, function eachAttribute(val, key) {\n skipAttr = false;\n // Unless .attr is from the animator update, stop current\n // running animation of this property\n if (!continueAnimation) {\n stop(this, key);\n }\n // Special handling of symbol attributes\n if (this.symbolName &&\n symbolCustomAttribs.indexOf(key) !== -1) {\n if (!hasSetSymbolSize) {\n this.symbolAttr(hash);\n hasSetSymbolSize = true;\n }\n skipAttr = true;\n }\n if (this.rotation && (key === 'x' || key === 'y')) {\n this.doTransform = true;\n }\n if (!skipAttr) {\n setter = (this[key + 'Setter'] ||\n this._defaultSetter);\n setter.call(this, val, key, element);\n // Let the shadow follow the main element\n if (!this.styledMode &&\n this.shadows &&\n /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/\n .test(key)) {\n this.updateShadows(key, val, setter);\n }\n }\n }, this);\n this.afterSetters();\n }\n // In accordance with animate, run a complete callback\n if (complete) {\n complete.call(this);\n }\n return ret;\n };\n /**\n * Apply a clipping rectangle to this element.\n *\n * @function Highcharts.SVGElement#clip\n *\n * @param {Highcharts.ClipRectElement} [clipRect]\n * The clipping rectangle. If skipped, the current clip is removed.\n *\n * @return {Highcharts.SVGElement}\n * Returns the SVG element to allow chaining.\n */\n SVGElement.prototype.clip = function (clipRect) {\n return this.attr('clip-path', clipRect ?\n 'url(' + this.renderer.url + '#' + clipRect.id + ')' :\n 'none');\n };\n /**\n * Calculate the coordinates needed for drawing a rectangle crisply and\n * return the calculated attributes.\n *\n * @function Highcharts.SVGElement#crisp\n *\n * @param {Highcharts.RectangleObject} rect\n * Rectangle to crisp.\n *\n * @param {number} [strokeWidth]\n * The stroke width to consider when computing crisp positioning. It can\n * also be set directly on the rect parameter.\n *\n * @return {Highcharts.RectangleObject}\n * The modified rectangle arguments.\n */\n SVGElement.prototype.crisp = function (rect, strokeWidth) {\n var wrapper = this;\n strokeWidth = strokeWidth || rect.strokeWidth || 0;\n // Math.round because strokeWidth can sometimes have roundoff errors\n var normalizer = Math.round(strokeWidth) % 2 / 2;\n // normalize for crisp edges\n rect.x = Math.floor(rect.x || wrapper.x || 0) + normalizer;\n rect.y = Math.floor(rect.y || wrapper.y || 0) + normalizer;\n rect.width = Math.floor((rect.width || wrapper.width || 0) - 2 * normalizer);\n rect.height = Math.floor((rect.height || wrapper.height || 0) - 2 * normalizer);\n if (defined(rect.strokeWidth)) {\n rect.strokeWidth = strokeWidth;\n }\n return rect;\n };\n /**\n * Build and apply an SVG gradient out of a common JavaScript configuration\n * object. This function is called from the attribute setters. An event\n * hook is added for supporting other complex color types.\n *\n * @private\n * @function Highcharts.SVGElement#complexColor\n *\n * @param {Highcharts.GradientColorObject|Highcharts.PatternObject} colorOptions\n * The gradient or pattern options structure.\n *\n * @param {string} prop\n * The property to apply, can either be `fill` or `stroke`.\n *\n * @param {Highcharts.SVGDOMElement} elem\n * SVG element to apply the gradient on.\n */\n SVGElement.prototype.complexColor = function (colorOptions, prop, elem) {\n var renderer = this.renderer;\n var colorObject, gradName, gradAttr, radAttr, gradients, stops, stopColor, stopOpacity, radialReference, id, key = [], value;\n fireEvent(this.renderer, 'complexColor', {\n args: arguments\n }, function () {\n // Apply linear or radial gradients\n if (colorOptions.radialGradient) {\n gradName = 'radialGradient';\n }\n else if (colorOptions.linearGradient) {\n gradName = 'linearGradient';\n }\n if (gradName) {\n gradAttr = colorOptions[gradName];\n gradients = renderer.gradients;\n stops = colorOptions.stops;\n radialReference = elem.radialReference;\n // Keep < 2.2 kompatibility\n if (isArray(gradAttr)) {\n colorOptions[gradName] = gradAttr = {\n x1: gradAttr[0],\n y1: gradAttr[1],\n x2: gradAttr[2],\n y2: gradAttr[3],\n gradientUnits: 'userSpaceOnUse'\n };\n }\n // Correct the radial gradient for the radial reference system\n if (gradName === 'radialGradient' &&\n radialReference &&\n !defined(gradAttr.gradientUnits)) {\n // Save the radial attributes for updating\n radAttr = gradAttr;\n gradAttr = merge(gradAttr, renderer.getRadialAttr(radialReference, radAttr), { gradientUnits: 'userSpaceOnUse' });\n }\n // Build the unique key to detect whether we need to create a\n // new element (#1282)\n objectEach(gradAttr, function (value, n) {\n if (n !== 'id') {\n key.push(n, value);\n }\n });\n objectEach(stops, function (val) {\n key.push(val);\n });\n key = key.join(',');\n // Check if a gradient object with the same config object is\n // created within this renderer\n if (gradients[key]) {\n id = gradients[key].attr('id');\n }\n else {\n // Set the id and create the element\n gradAttr.id = id = uniqueKey();\n var gradientObject_1 = gradients[key] =\n renderer.createElement(gradName)\n .attr(gradAttr)\n .add(renderer.defs);\n gradientObject_1.radAttr = radAttr;\n // The gradient needs to keep a list of stops to be able to\n // destroy them\n gradientObject_1.stops = [];\n stops.forEach(function (stop) {\n if (stop[1].indexOf('rgba') === 0) {\n colorObject = Color.parse(stop[1]);\n stopColor = colorObject.get('rgb');\n stopOpacity = colorObject.get('a');\n }\n else {\n stopColor = stop[1];\n stopOpacity = 1;\n }\n var stopObject = renderer.createElement('stop').attr({\n offset: stop[0],\n 'stop-color': stopColor,\n 'stop-opacity': stopOpacity\n }).add(gradientObject_1);\n // Add the stop element to the gradient\n gradientObject_1.stops.push(stopObject);\n });\n }\n // Set the reference to the gradient object\n value = 'url(' + renderer.url + '#' + id + ')';\n elem.setAttribute(prop, value);\n elem.gradient = key;\n // Allow the color to be concatenated into tooltips formatters\n // etc. (#2995)\n colorOptions.toString = function () {\n return value;\n };\n }\n });\n };\n /**\n * Set styles for the element. In addition to CSS styles supported by\n * native SVG and HTML elements, there are also some custom made for\n * Highcharts, like `width`, `ellipsis` and `textOverflow` for SVG text\n * elements.\n *\n * @sample highcharts/members/renderer-text-on-chart/\n * Styled text\n *\n * @function Highcharts.SVGElement#css\n *\n * @param {Highcharts.CSSObject} styles\n * The new CSS styles.\n *\n * @return {Highcharts.SVGElement}\n * Return the SVG element for chaining.\n */\n SVGElement.prototype.css = function (styles) {\n var oldStyles = this.styles, newStyles = {}, elem = this.element;\n var textWidth, hasNew = !oldStyles;\n // convert legacy\n if (styles.color) {\n styles.fill = styles.color;\n }\n // Filter out existing styles to increase performance (#2640)\n if (oldStyles) {\n objectEach(styles, function (value, n) {\n if (oldStyles && oldStyles[n] !== value) {\n newStyles[n] = value;\n hasNew = true;\n }\n });\n }\n if (hasNew) {\n // Merge the new styles with the old ones\n if (oldStyles) {\n styles = extend(oldStyles, newStyles);\n }\n // Get the text width from style\n // Previously set, unset it (#8234)\n if (styles.width === null || styles.width === 'auto') {\n delete this.textWidth;\n // Apply new\n }\n else if (elem.nodeName.toLowerCase() === 'text' &&\n styles.width) {\n textWidth = this.textWidth = pInt(styles.width);\n }\n // store object\n this.styles = styles;\n if (textWidth && (!svg && this.renderer.forExport)) {\n delete styles.width;\n }\n var stylesToApply_1 = merge(styles);\n if (elem.namespaceURI === this.SVG_NS) {\n // These CSS properties are interpreted internally by the SVG\n // renderer, but are not supported by SVG and should not be\n // added to the DOM. In styled mode, no CSS should find its way\n // to the DOM whatsoever (#6173, #6474).\n ['textOutline', 'textOverflow', 'width'].forEach(function (key) { return (stylesToApply_1 &&\n delete stylesToApply_1[key]); });\n }\n css(elem, stylesToApply_1);\n if (this.added) {\n // Rebuild text after added. Cache mechanisms in the buildText\n // will prevent building if there are no significant changes.\n if (this.element.nodeName === 'text') {\n this.renderer.buildText(this);\n }\n // Apply text outline after added\n if (styles.textOutline) {\n this.applyTextOutline(styles.textOutline);\n }\n }\n }\n return this;\n };\n /**\n * @private\n * @function Highcharts.SVGElement#dashstyleSetter\n * @param {string} value\n */\n SVGElement.prototype.dashstyleSetter = function (value) {\n var i, strokeWidth = this['stroke-width'];\n // If \"inherit\", like maps in IE, assume 1 (#4981). With HC5 and the new\n // strokeWidth function, we should be able to use that instead.\n if (strokeWidth === 'inherit') {\n strokeWidth = 1;\n }\n value = value && value.toLowerCase();\n if (value) {\n var v = value\n .replace('shortdashdotdot', '3,1,1,1,1,1,')\n .replace('shortdashdot', '3,1,1,1')\n .replace('shortdot', '1,1,')\n .replace('shortdash', '3,1,')\n .replace('longdash', '8,3,')\n .replace(/dot/g, '1,3,')\n .replace('dash', '4,3,')\n .replace(/,$/, '')\n .split(','); // ending comma\n i = v.length;\n while (i--) {\n v[i] = '' + (pInt(v[i]) * pick(strokeWidth, NaN));\n }\n value = v.join(',').replace(/NaN/g, 'none'); // #3226\n this.element.setAttribute('stroke-dasharray', value);\n }\n };\n /**\n * Destroy the element and element wrapper and clear up the DOM and event\n * hooks.\n *\n * @function Highcharts.SVGElement#destroy\n */\n SVGElement.prototype.destroy = function () {\n var wrapper = this, element = wrapper.element || {}, renderer = wrapper.renderer, ownerSVGElement = element.ownerSVGElement;\n var parentToClean = (renderer.isSVG &&\n element.nodeName === 'SPAN' &&\n wrapper.parentGroup ||\n void 0), grandParent, i;\n // remove events\n element.onclick = element.onmouseout = element.onmouseover =\n element.onmousemove = element.point = null;\n stop(wrapper); // stop running animations\n if (wrapper.clipPath && ownerSVGElement) {\n var clipPath_1 = wrapper.clipPath;\n // Look for existing references to this clipPath and remove them\n // before destroying the element (#6196).\n // The upper case version is for Edge\n [].forEach.call(ownerSVGElement.querySelectorAll('[clip-path],[CLIP-PATH]'), function (el) {\n if (el.getAttribute('clip-path').indexOf(clipPath_1.element.id) > -1) {\n el.removeAttribute('clip-path');\n }\n });\n wrapper.clipPath = clipPath_1.destroy();\n }\n // Destroy stops in case this is a gradient object @todo old code?\n if (wrapper.stops) {\n for (i = 0; i < wrapper.stops.length; i++) {\n wrapper.stops[i].destroy();\n }\n wrapper.stops.length = 0;\n wrapper.stops = void 0;\n }\n // remove element\n wrapper.safeRemoveChild(element);\n if (!renderer.styledMode) {\n wrapper.destroyShadows();\n }\n // In case of useHTML, clean up empty containers emulating SVG groups\n // (#1960, #2393, #2697).\n while (parentToClean &&\n parentToClean.div &&\n parentToClean.div.childNodes.length === 0) {\n grandParent = parentToClean.parentGroup;\n wrapper.safeRemoveChild(parentToClean.div);\n delete parentToClean.div;\n parentToClean = grandParent;\n }\n // remove from alignObjects\n if (wrapper.alignTo) {\n erase(renderer.alignedObjects, wrapper);\n }\n objectEach(wrapper, function (val, key) {\n // Destroy child elements of a group\n if (wrapper[key] &&\n wrapper[key].parentGroup === wrapper &&\n wrapper[key].destroy) {\n wrapper[key].destroy();\n }\n // Delete all properties\n delete wrapper[key];\n });\n return;\n };\n /**\n * Destroy shadows on the element.\n *\n * @private\n * @function Highcharts.SVGElement#destroyShadows\n *\n */\n SVGElement.prototype.destroyShadows = function () {\n (this.shadows || []).forEach(function (shadow) {\n this.safeRemoveChild(shadow);\n }, this);\n this.shadows = void 0;\n };\n /**\n * @private\n * @function Highcharts.SVGElement#dSettter\n * @param {number|string|Highcharts.SVGPathArray} value\n * @param {string} key\n * @param {Highcharts.SVGDOMElement} element\n */\n SVGElement.prototype.dSetter = function (value, key, element) {\n if (isArray(value)) {\n // Backwards compatibility, convert one-dimensional array into an\n // array of segments\n if (typeof value[0] === 'string') {\n value = this.renderer.pathToSegments(value);\n }\n this.pathArray = value;\n value = value.reduce(function (acc, seg, i) {\n if (!seg || !seg.join) {\n return (seg || '').toString();\n }\n return (i ? acc + ' ' : '') + seg.join(' ');\n }, '');\n }\n if (/(NaN| {2}|^$)/.test(value)) {\n value = 'M 0 0';\n }\n // Check for cache before resetting. Resetting causes disturbance in the\n // DOM, causing flickering in some cases in Edge/IE (#6747). Also\n // possible performance gain.\n if (this[key] !== value) {\n element.setAttribute(key, value);\n this[key] = value;\n }\n };\n /**\n * Fade out an element by animating its opacity down to 0, and hide it on\n * complete. Used internally for the tooltip.\n *\n * @function Highcharts.SVGElement#fadeOut\n *\n * @param {number} [duration=150]\n * The fade duration in milliseconds.\n */\n SVGElement.prototype.fadeOut = function (duration) {\n var elemWrapper = this;\n elemWrapper.animate({\n opacity: 0\n }, {\n duration: pick(duration, 150),\n complete: function () {\n // #3088, assuming we're only using this for tooltips\n elemWrapper.hide();\n }\n });\n };\n /**\n * @private\n * @function Highcharts.SVGElement#fillSetter\n * @param {Highcharts.ColorType} value\n * @param {string} key\n * @param {Highcharts.SVGDOMElement} element\n */\n SVGElement.prototype.fillSetter = function (value, key, element) {\n if (typeof value === 'string') {\n element.setAttribute(key, value);\n }\n else if (value) {\n this.complexColor(value, key, element);\n }\n };\n /**\n * Get the bounding box (width, height, x and y) for the element. Generally\n * used to get rendered text size. Since this is called a lot in charts,\n * the results are cached based on text properties, in order to save DOM\n * traffic. The returned bounding box includes the rotation, so for example\n * a single text line of rotation 90 will report a greater height, and a\n * width corresponding to the line-height.\n *\n * @sample highcharts/members/renderer-on-chart/\n * Draw a rectangle based on a text's bounding box\n *\n * @function Highcharts.SVGElement#getBBox\n *\n * @param {boolean} [reload]\n * Skip the cache and get the updated DOM bouding box.\n *\n * @param {number} [rot]\n * Override the element's rotation. This is internally used on axis\n * labels with a value of 0 to find out what the bounding box would\n * be have been if it were not rotated.\n *\n * @return {Highcharts.BBoxObject}\n * The bounding box with `x`, `y`, `width` and `height` properties.\n */\n SVGElement.prototype.getBBox = function (reload, rot) {\n var wrapper = this, alignValue = wrapper.alignValue, element = wrapper.element, renderer = wrapper.renderer, styles = wrapper.styles, textStr = wrapper.textStr, cache = renderer.cache, cacheKeys = renderer.cacheKeys, isSVG = element.namespaceURI === wrapper.SVG_NS, rotation = pick(rot, wrapper.rotation, 0), fontSize = renderer.styledMode ? (element &&\n SVGElement.prototype.getStyle.call(element, 'font-size')) : (styles && styles.fontSize);\n var bBox, width, height, toggleTextShadowShim, cacheKey;\n // Avoid undefined and null (#7316)\n if (defined(textStr)) {\n cacheKey = textStr.toString();\n // Since numbers are monospaced, and numerical labels appear a lot\n // in a chart, we assume that a label of n characters has the same\n // bounding box as others of the same length. Unless there is inner\n // HTML in the label. In that case, leave the numbers as is (#5899).\n if (cacheKey.indexOf('<') === -1) {\n cacheKey = cacheKey.replace(/[0-9]/g, '0');\n }\n // Properties that affect bounding box\n cacheKey += [\n '',\n rotation,\n fontSize,\n wrapper.textWidth,\n alignValue,\n styles && styles.textOverflow,\n styles && styles.fontWeight // #12163\n ].join(',');\n }\n if (cacheKey && !reload) {\n bBox = cache[cacheKey];\n }\n // No cache found\n if (!bBox) {\n // SVG elements\n if (isSVG || renderer.forExport) {\n try { // Fails in Firefox if the container has display: none.\n // When the text shadow shim is used, we need to hide the\n // fake shadows to get the correct bounding box (#3872)\n toggleTextShadowShim = this.fakeTS && function (display) {\n var outline = element.querySelector('.highcharts-text-outline');\n if (outline) {\n css(outline, { display: display });\n }\n };\n // Workaround for #3842, Firefox reporting wrong bounding\n // box for shadows\n if (isFunction(toggleTextShadowShim)) {\n toggleTextShadowShim('none');\n }\n bBox = element.getBBox ?\n // SVG: use extend because IE9 is not allowed to change\n // width and height in case of rotation (below)\n extend({}, element.getBBox()) : {\n // HTML elements with `exporting.allowHTML` and\n // legacy IE in export mode\n width: element.offsetWidth,\n height: element.offsetHeight,\n x: 0,\n y: 0\n };\n // #3842\n if (isFunction(toggleTextShadowShim)) {\n toggleTextShadowShim('');\n }\n }\n catch (e) {\n '';\n }\n // If the bBox is not set, the try-catch block above failed. The\n // other condition is for Opera that returns a width of\n // -Infinity on hidden elements.\n if (!bBox || bBox.width < 0) {\n bBox = { x: 0, y: 0, width: 0, height: 0 };\n }\n // VML Renderer or useHTML within SVG\n }\n else {\n bBox = wrapper.htmlGetBBox();\n }\n // True SVG elements as well as HTML elements in modern browsers\n // using the .useHTML option need to compensated for rotation\n if (renderer.isSVG) {\n width = bBox.width;\n height = bBox.height;\n // Workaround for wrong bounding box in IE, Edge and Chrome on\n // Windows. With Highcharts' default font, IE and Edge report\n // a box height of 16.899 and Chrome rounds it to 17. If this\n // stands uncorrected, it results in more padding added below\n // the text than above when adding a label border or background.\n // Also vertical positioning is affected.\n // https://jsfiddle.net/highcharts/em37nvuj/\n // (#1101, #1505, #1669, #2568, #6213).\n if (isSVG) {\n bBox.height = height = ({\n '11px,17': 14,\n '13px,20': 16\n }[\"\".concat(fontSize || '', \",\").concat(Math.round(height))] ||\n height);\n }\n // Adjust for rotated text\n if (rotation) {\n var baseline = Number(element.getAttribute('y') || 0) - bBox.y, alignFactor = {\n 'right': 1,\n 'center': 0.5\n }[alignValue || 0] || 0, rad = rotation * deg2rad, rad90 = (rotation - 90) * deg2rad, wCosRad = width * Math.cos(rad), wSinRad = width * Math.sin(rad), cosRad90 = Math.cos(rad90), sinRad90 = Math.sin(rad90), \n // Find the starting point on the left side baseline of\n // the text\n pX = bBox.x + alignFactor * (width - wCosRad), pY = bBox.y + baseline - alignFactor * wSinRad, \n // Find all corners\n aX = pX + baseline * cosRad90, bX = aX + wCosRad, cX = bX - height * cosRad90, dX = cX - wCosRad, aY = pY + baseline * sinRad90, bY = aY + wSinRad, cY = bY - height * sinRad90, dY = cY - wSinRad;\n // Deduct the bounding box from the corners\n bBox.x = Math.min(aX, bX, cX, dX);\n bBox.y = Math.min(aY, bY, cY, dY);\n bBox.width = Math.max(aX, bX, cX, dX) - bBox.x;\n bBox.height = Math.max(aY, bY, cY, dY) - bBox.y;\n }\n }\n // Cache it. When loading a chart in a hidden iframe in Firefox and\n // IE/Edge, the bounding box height is 0, so don't cache it (#5620).\n if (cacheKey && (textStr === '' || bBox.height > 0)) {\n // Rotate (#4681)\n while (cacheKeys.length > 250) {\n delete cache[cacheKeys.shift()];\n }\n if (!cache[cacheKey]) {\n cacheKeys.push(cacheKey);\n }\n cache[cacheKey] = bBox;\n }\n }\n return bBox;\n };\n /**\n * Get the computed style. Only in styled mode.\n *\n * @example\n * chart.series[0].points[0].graphic.getStyle('stroke-width'); // => '1px'\n *\n * @function Highcharts.SVGElement#getStyle\n *\n * @param {string} prop\n * The property name to check for.\n *\n * @return {string}\n * The current computed value.\n */\n SVGElement.prototype.getStyle = function (prop) {\n return win\n .getComputedStyle(this.element || this, '')\n .getPropertyValue(prop);\n };\n /**\n * Check if an element has the given class name.\n *\n * @function Highcharts.SVGElement#hasClass\n *\n * @param {string} className\n * The class name to check for.\n *\n * @return {boolean}\n * Whether the class name is found.\n */\n SVGElement.prototype.hasClass = function (className) {\n return ('' + this.attr('class'))\n .split(' ')\n .indexOf(className) !== -1;\n };\n /**\n * Hide the element, similar to setting the `visibility` attribute to\n * `hidden`.\n *\n * @function Highcharts.SVGElement#hide\n *\n * @return {Highcharts.SVGElement}\n * Returns the SVGElement for chaining.\n */\n SVGElement.prototype.hide = function () {\n return this.attr({ visibility: 'hidden' });\n };\n /**\n * @private\n */\n SVGElement.prototype.htmlGetBBox = function () {\n return { height: 0, width: 0, x: 0, y: 0 };\n };\n /**\n * Initialize the SVG element. This function only exists to make the\n * initialization process overridable. It should not be called directly.\n *\n * @function Highcharts.SVGElement#init\n *\n * @param {Highcharts.SVGRenderer} renderer\n * The SVGRenderer instance to initialize to.\n *\n * @param {string} nodeName\n * The SVG node name.\n */\n SVGElement.prototype.init = function (renderer, nodeName) {\n /**\n * The primary DOM node. Each `SVGElement` instance wraps a main DOM\n * node, but may also represent more nodes.\n *\n * @name Highcharts.SVGElement#element\n * @type {Highcharts.SVGDOMElement|Highcharts.HTMLDOMElement}\n */\n this.element = nodeName === 'span' ?\n createElement(nodeName) :\n doc.createElementNS(this.SVG_NS, nodeName);\n /**\n * The renderer that the SVGElement belongs to.\n *\n * @name Highcharts.SVGElement#renderer\n * @type {Highcharts.SVGRenderer}\n */\n this.renderer = renderer;\n fireEvent(this, 'afterInit');\n };\n /**\n * Add an event listener. This is a simple setter that replaces the\n * previous event of the same type added by this function, as opposed to\n * the {@link Highcharts#addEvent} function.\n *\n * @sample highcharts/members/element-on/\n * A clickable rectangle\n *\n * @function Highcharts.SVGElement#on\n *\n * @param {string} eventType\n * The event type.\n *\n * @param {Function} handler\n * The handler callback.\n *\n * @return {Highcharts.SVGElement}\n * The SVGElement for chaining.\n */\n SVGElement.prototype.on = function (eventType, handler) {\n var onEvents = this.onEvents;\n if (onEvents[eventType]) {\n // Unbind existing event\n onEvents[eventType]();\n }\n onEvents[eventType] = addEvent(this.element, eventType, handler);\n return this;\n };\n /**\n * @private\n * @function Highcharts.SVGElement#opacitySetter\n * @param {string} value\n * @param {string} key\n * @param {Highcharts.SVGDOMElement} element\n */\n SVGElement.prototype.opacitySetter = function (value, key, element) {\n // Round off to avoid float errors, like tests where opacity lands on\n // 9.86957e-06 instead of 0\n var opacity = Number(Number(value).toFixed(3));\n this.opacity = opacity;\n element.setAttribute(key, opacity);\n };\n /**\n * Remove a class name from the element.\n *\n * @function Highcharts.SVGElement#removeClass\n *\n * @param {string|RegExp} className\n * The class name to remove.\n *\n * @return {Highcharts.SVGElement} Returns the SVG element for chainability.\n */\n SVGElement.prototype.removeClass = function (className) {\n return this.attr('class', ('' + this.attr('class'))\n .replace(isString(className) ?\n new RegExp(\"(^| )\".concat(className, \"( |$)\")) : // #12064, #13590\n className, ' ')\n .replace(/ +/g, ' ')\n .trim());\n };\n /**\n *\n * @private\n */\n SVGElement.prototype.removeTextOutline = function () {\n var outline = this.element\n .querySelector('tspan.highcharts-text-outline');\n if (outline) {\n this.safeRemoveChild(outline);\n }\n };\n /**\n * Removes an element from the DOM.\n *\n * @private\n * @function Highcharts.SVGElement#safeRemoveChild\n *\n * @param {Highcharts.SVGDOMElement|Highcharts.HTMLDOMElement} element\n * The DOM node to remove.\n */\n SVGElement.prototype.safeRemoveChild = function (element) {\n var parentNode = element.parentNode;\n if (parentNode) {\n parentNode.removeChild(element);\n }\n };\n /**\n * Set the coordinates needed to draw a consistent radial gradient across\n * a shape regardless of positioning inside the chart. Used on pie slices\n * to make all the slices have the same radial reference point.\n *\n * @function Highcharts.SVGElement#setRadialReference\n *\n * @param {Array} coordinates\n * The center reference. The format is `[centerX, centerY, diameter]` in\n * pixels.\n *\n * @return {Highcharts.SVGElement}\n * Returns the SVGElement for chaining.\n */\n SVGElement.prototype.setRadialReference = function (coordinates) {\n var existingGradient = (this.element.gradient &&\n this.renderer.gradients[this.element.gradient]);\n this.element.radialReference = coordinates;\n // On redrawing objects with an existing gradient, the gradient needs\n // to be repositioned (#3801)\n if (existingGradient && existingGradient.radAttr) {\n existingGradient.animate(this.renderer.getRadialAttr(coordinates, existingGradient.radAttr));\n }\n return this;\n };\n /**\n * Set a text path for a `text` or `label` element, allowing the text to\n * flow along a path.\n *\n * In order to unset the path for an existing element, call `setTextPath`\n * with `{ enabled: false }` as the second argument.\n *\n * @sample highcharts/members/renderer-textpath/ Text path demonstrated\n *\n * @function Highcharts.SVGElement#setTextPath\n *\n * @param {Highcharts.SVGElement|undefined} path\n * Path to follow. If undefined, it allows changing options for the\n * existing path.\n *\n * @param {Highcharts.DataLabelsTextPathOptionsObject} textPathOptions\n * Options.\n *\n * @return {Highcharts.SVGElement} Returns the SVGElement for chaining.\n */\n SVGElement.prototype.setTextPath = function (path, textPathOptions) {\n var _this = this;\n // Defaults\n textPathOptions = merge(true, {\n enabled: true,\n attributes: {\n dy: -5,\n startOffset: '50%',\n textAnchor: 'middle'\n }\n }, textPathOptions);\n var url = this.renderer.url, textWrapper = this.text || this, textPath = textWrapper.textPath, attributes = textPathOptions.attributes, enabled = textPathOptions.enabled;\n path = path || (textPath && textPath.path);\n // Remove previously added event\n if (textPath) {\n textPath.undo();\n }\n if (path && enabled) {\n var undo = addEvent(textWrapper, 'afterModifyTree', function (e) {\n if (path && enabled) {\n // Set ID for the path\n var textPathId = path.attr('id');\n if (!textPathId) {\n path.attr('id', textPathId = uniqueKey());\n }\n // Set attributes for the \n var textAttribs = {\n // dx/dy options must by set on (parent), the\n // rest should be set on \n x: 0,\n y: 0\n };\n if (defined(attributes.dx)) {\n textAttribs.dx = attributes.dx;\n delete attributes.dx;\n }\n if (defined(attributes.dy)) {\n textAttribs.dy = attributes.dy;\n delete attributes.dy;\n }\n textWrapper.attr(textAttribs);\n // Handle label properties\n _this.attr({ transform: '' });\n if (_this.box) {\n _this.box = _this.box.destroy();\n }\n // Wrap the nodes in a textPath\n var children = e.nodes.slice(0);\n e.nodes.length = 0;\n e.nodes[0] = {\n tagName: 'textPath',\n attributes: extend(attributes, {\n 'text-anchor': attributes.textAnchor,\n href: \"\".concat(url, \"#\").concat(textPathId)\n }),\n children: children\n };\n }\n });\n // Set the reference\n textWrapper.textPath = { path: path, undo: undo };\n }\n else {\n textWrapper.attr({ dx: 0, dy: 0 });\n delete textWrapper.textPath;\n }\n if (this.added) {\n // Rebuild text after added\n textWrapper.textCache = '';\n this.renderer.buildText(textWrapper);\n }\n return this;\n };\n /**\n * Add a shadow to the element. Must be called after the element is added to\n * the DOM. In styled mode, this method is not used, instead use `defs` and\n * filters.\n *\n * @example\n * renderer.rect(10, 100, 100, 100)\n * .attr({ fill: 'red' })\n * .shadow(true);\n *\n * @function Highcharts.SVGElement#shadow\n *\n * @param {boolean|Highcharts.ShadowOptionsObject} [shadowOptions]\n * The shadow options. If `true`, the default options are applied. If\n * `false`, the current shadow will be removed.\n *\n * @param {Highcharts.SVGElement} [group]\n * The SVG group element where the shadows will be applied. The\n * default is to add it to the same parent as the current element.\n * Internally, this is ised for pie slices, where all the shadows are\n * added to an element behind all the slices.\n *\n * @param {boolean} [cutOff]\n * Used internally for column shadows.\n *\n * @return {Highcharts.SVGElement}\n * Returns the SVGElement for chaining.\n */\n SVGElement.prototype.shadow = function (shadowOptions, group, cutOff) {\n var shadows = [], _a = this, element = _a.element, oldShadowOptions = _a.oldShadowOptions, parentGroup = _a.parentGroup, parentInverted = parentGroup && parentGroup.rotation === 90, defaultShadowOptions = {\n color: \"#000000\" /* Palette.neutralColor100 */,\n offsetX: parentInverted ? -1 : 1,\n offsetY: parentInverted ? -1 : 1,\n opacity: 0.15,\n width: 3\n };\n var i, shadow, strokeWidth, shadowElementOpacity, update = false, \n // compensate for inverted plot area\n transform, options;\n if (shadowOptions === true) {\n options = defaultShadowOptions;\n }\n else if (typeof shadowOptions === 'object') {\n options = extend(defaultShadowOptions, shadowOptions);\n }\n // Update shadow when options change (#12091).\n if (options) {\n // Go over each key to look for change\n if (options && oldShadowOptions) {\n objectEach(options, function (value, key) {\n if (value !== oldShadowOptions[key]) {\n update = true;\n }\n });\n }\n if (update) {\n this.destroyShadows();\n }\n this.oldShadowOptions = options;\n }\n if (!options) {\n this.destroyShadows();\n }\n else if (!this.shadows) {\n shadowElementOpacity = options.opacity / options.width;\n transform = parentInverted ?\n \"translate(\".concat(options.offsetY, \", \").concat(options.offsetX, \")\") :\n \"translate(\".concat(options.offsetX, \", \").concat(options.offsetY, \")\");\n for (i = 1; i <= options.width; i++) {\n shadow = element.cloneNode(false);\n strokeWidth = (options.width * 2) + 1 - (2 * i);\n attr(shadow, {\n stroke: (shadowOptions.color ||\n \"#000000\" /* Palette.neutralColor100 */),\n 'stroke-opacity': shadowElementOpacity * i,\n 'stroke-width': strokeWidth,\n transform: transform,\n fill: 'none'\n });\n shadow.setAttribute('class', (shadow.getAttribute('class') || '') + ' highcharts-shadow');\n if (cutOff) {\n attr(shadow, 'height', Math.max(attr(shadow, 'height') - strokeWidth, 0));\n shadow.cutHeight = strokeWidth;\n }\n if (group) {\n group.element.appendChild(shadow);\n }\n else if (element.parentNode) {\n element.parentNode.insertBefore(shadow, element);\n }\n shadows.push(shadow);\n }\n this.shadows = shadows;\n }\n return this;\n };\n /**\n * Show the element after it has been hidden.\n *\n * @function Highcharts.SVGElement#show\n *\n * @param {boolean} [inherit=true]\n * Set the visibility attribute to `inherit` rather than `visible`.\n * The difference is that an element with `visibility=\"visible\"`\n * will be visible even if the parent is hidden.\n *\n * @return {Highcharts.SVGElement}\n * Returns the SVGElement for chaining.\n */\n SVGElement.prototype.show = function (inherit) {\n if (inherit === void 0) { inherit = true; }\n return this.attr({ visibility: inherit ? 'inherit' : 'visible' });\n };\n /**\n * Set the stroke-width and record it on the SVGElement\n *\n * @private\n * @function Highcharts.SVGElement#strokeSetter\n * @param {number|string|ColorType} value\n * @param {string} key\n * @param {Highcharts.SVGDOMElement} element\n */\n SVGElement.prototype['stroke-widthSetter'] = function (value, key, element) {\n // Record it for quick access in getter\n this[key] = value;\n element.setAttribute(key, value);\n };\n /**\n * Get the computed stroke width in pixel values. This is used extensively\n * when drawing shapes to ensure the shapes are rendered crisp and\n * positioned correctly relative to each other. Using\n * `shape-rendering: crispEdges` leaves us less control over positioning,\n * for example when we want to stack columns next to each other, or position\n * things pixel-perfectly within the plot box.\n *\n * The common pattern when placing a shape is:\n * - Create the SVGElement and add it to the DOM. In styled mode, it will\n * now receive a stroke width from the style sheet. In classic mode we\n * will add the `stroke-width` attribute.\n * - Read the computed `elem.strokeWidth()`.\n * - Place it based on the stroke width.\n *\n * @function Highcharts.SVGElement#strokeWidth\n *\n * @return {number}\n * The stroke width in pixels. Even if the given stroke widtch (in CSS or by\n * attributes) is based on `em` or other units, the pixel size is returned.\n */\n SVGElement.prototype.strokeWidth = function () {\n // In non-styled mode, read the stroke width as set by .attr\n if (!this.renderer.styledMode) {\n return this['stroke-width'] || 0;\n }\n // In styled mode, read computed stroke width\n var val = this.getStyle('stroke-width');\n var ret = 0, dummy;\n // Read pixel values directly\n if (val.indexOf('px') === val.length - 2) {\n ret = pInt(val);\n // Other values like em, pt etc need to be measured\n }\n else if (val !== '') {\n dummy = doc.createElementNS(SVG_NS, 'rect');\n attr(dummy, {\n width: val,\n 'stroke-width': 0\n });\n this.element.parentNode.appendChild(dummy);\n ret = dummy.getBBox().width;\n dummy.parentNode.removeChild(dummy);\n }\n return ret;\n };\n /**\n * If one of the symbol size affecting parameters are changed,\n * check all the others only once for each call to an element's\n * .attr() method\n *\n * @private\n * @function Highcharts.SVGElement#symbolAttr\n *\n * @param {Highcharts.SVGAttributes} hash\n * The attributes to set.\n */\n SVGElement.prototype.symbolAttr = function (hash) {\n var wrapper = this;\n [\n 'x',\n 'y',\n 'r',\n 'start',\n 'end',\n 'width',\n 'height',\n 'innerR',\n 'anchorX',\n 'anchorY',\n 'clockwise'\n ].forEach(function (key) {\n wrapper[key] = pick(hash[key], wrapper[key]);\n });\n wrapper.attr({\n d: wrapper.renderer.symbols[wrapper.symbolName](wrapper.x, wrapper.y, wrapper.width, wrapper.height, wrapper)\n });\n };\n /**\n * @private\n * @function Highcharts.SVGElement#textSetter\n * @param {string} value\n */\n SVGElement.prototype.textSetter = function (value) {\n if (value !== this.textStr) {\n // Delete size caches when the text changes\n // delete this.bBox; // old code in series-label\n delete this.textPxLength;\n this.textStr = value;\n if (this.added) {\n this.renderer.buildText(this);\n }\n }\n };\n /**\n * @private\n * @function Highcharts.SVGElement#titleSetter\n * @param {string} value\n */\n SVGElement.prototype.titleSetter = function (value) {\n var el = this.element;\n var titleNode = el.getElementsByTagName('title')[0] ||\n doc.createElementNS(this.SVG_NS, 'title');\n // Move to first child\n if (el.insertBefore) {\n el.insertBefore(titleNode, el.firstChild);\n }\n else {\n el.appendChild(titleNode);\n }\n // Replace text content and escape markup\n titleNode.textContent =\n // #3276, #3895\n String(pick(value, ''))\n .replace(/<[^>]*>/g, '')\n .replace(/</g, '<')\n .replace(/>/g, '>');\n };\n /**\n * Bring the element to the front. Alternatively, a new zIndex can be set.\n *\n * @sample highcharts/members/element-tofront/\n * Click an element to bring it to front\n *\n * @function Highcharts.SVGElement#toFront\n *\n * @return {Highcharts.SVGElement}\n * Returns the SVGElement for chaining.\n */\n SVGElement.prototype.toFront = function () {\n var element = this.element;\n element.parentNode.appendChild(element);\n return this;\n };\n /**\n * Move an object and its children by x and y values.\n *\n * @function Highcharts.SVGElement#translate\n *\n * @param {number} x\n * The x value.\n *\n * @param {number} y\n * The y value.\n *\n * @return {Highcharts.SVGElement}\n * Translated element.\n */\n SVGElement.prototype.translate = function (x, y) {\n return this.attr({\n translateX: x,\n translateY: y\n });\n };\n /**\n * Update the shadow elements with new attributes.\n *\n * @private\n * @function Highcharts.SVGElement#updateShadows\n *\n * @param {string} key\n * The attribute name.\n *\n * @param {number} value\n * The value of the attribute.\n *\n * @param {Function} setter\n * The setter function, inherited from the parent wrapper.\n */\n SVGElement.prototype.updateShadows = function (key, value, setter) {\n var shadows = this.shadows;\n if (shadows) {\n var i = shadows.length;\n while (i--) {\n setter.call(shadows[i], key === 'height' ?\n Math.max(value - (shadows[i].cutHeight || 0), 0) :\n key === 'd' ? this.d : value, key, shadows[i]);\n }\n }\n };\n /**\n * Update the transform attribute based on internal properties. Deals with\n * the custom `translateX`, `translateY`, `rotation`, `scaleX` and `scaleY`\n * attributes and updates the SVG `transform` attribute.\n *\n * @private\n * @function Highcharts.SVGElement#updateTransform\n */\n SVGElement.prototype.updateTransform = function () {\n var _a = this, element = _a.element, matrix = _a.matrix, _b = _a.rotation, rotation = _b === void 0 ? 0 : _b, scaleX = _a.scaleX, scaleY = _a.scaleY, _c = _a.translateX, translateX = _c === void 0 ? 0 : _c, _d = _a.translateY, translateY = _d === void 0 ? 0 : _d;\n // Apply translate. Nearly all transformed elements have translation,\n // so instead of checking for translate = 0, do it always (#1767,\n // #1846).\n var transform = ['translate(' + translateX + ',' + translateY + ')'];\n // apply matrix\n if (defined(matrix)) {\n transform.push('matrix(' + matrix.join(',') + ')');\n }\n // Apply rotation\n if (rotation) { // text rotation or inverted chart\n transform.push('rotate(' + rotation + ' ' +\n pick(this.rotationOriginX, element.getAttribute('x'), 0) +\n ' ' +\n pick(this.rotationOriginY, element.getAttribute('y') || 0) + ')');\n }\n // apply scale\n if (defined(scaleX) || defined(scaleY)) {\n transform.push('scale(' + pick(scaleX, 1) + ' ' + pick(scaleY, 1) + ')');\n }\n if (transform.length && !(this.text || this).textPath) {\n element.setAttribute('transform', transform.join(' '));\n }\n };\n /**\n * @private\n * @function Highcharts.SVGElement#visibilitySetter\n *\n * @param {string} value\n *\n * @param {string} key\n *\n * @param {Highcharts.SVGDOMElement} element\n *\n */\n SVGElement.prototype.visibilitySetter = function (value, key, element) {\n // IE9-11 doesn't handle visibilty:inherit well, so we remove the\n // attribute instead (#2881, #3909)\n if (value === 'inherit') {\n element.removeAttribute(key);\n }\n else if (this[key] !== value) { // #6747\n element.setAttribute(key, value);\n }\n this[key] = value;\n };\n /**\n * @private\n * @function Highcharts.SVGElement#xGetter\n */\n SVGElement.prototype.xGetter = function (key) {\n if (this.element.nodeName === 'circle') {\n if (key === 'x') {\n key = 'cx';\n }\n else if (key === 'y') {\n key = 'cy';\n }\n }\n return this._defaultGetter(key);\n };\n /**\n * @private\n * @function Highcharts.SVGElement#zIndexSetter\n */\n SVGElement.prototype.zIndexSetter = function (value, key) {\n var renderer = this.renderer, parentGroup = this.parentGroup, parentWrapper = parentGroup || renderer, parentNode = parentWrapper.element || renderer.box, element = this.element, svgParent = parentNode === renderer.box;\n var childNodes, otherElement, otherZIndex, inserted = false, undefinedOtherZIndex, run = this.added, i;\n if (defined(value)) {\n // So we can read it for other elements in the group\n element.setAttribute('data-z-index', value);\n value = +value;\n if (this[key] === value) {\n // Only update when needed (#3865)\n run = false;\n }\n }\n else if (defined(this[key])) {\n element.removeAttribute('data-z-index');\n }\n this[key] = value;\n // Insert according to this and other elements' zIndex. Before .add() is\n // called, nothing is done. Then on add, or by later calls to\n // zIndexSetter, the node is placed on the right place in the DOM.\n if (run) {\n value = this.zIndex;\n if (value && parentGroup) {\n parentGroup.handleZ = true;\n }\n childNodes = parentNode.childNodes;\n for (i = childNodes.length - 1; i >= 0 && !inserted; i--) {\n otherElement = childNodes[i];\n otherZIndex = otherElement.getAttribute('data-z-index');\n undefinedOtherZIndex = !defined(otherZIndex);\n if (otherElement !== element) {\n if (\n // Negative zIndex versus no zIndex:\n // On all levels except the highest. If the parent is\n // , then we don't want to put items before \n // or \n value < 0 &&\n undefinedOtherZIndex &&\n !svgParent &&\n !i) {\n parentNode.insertBefore(element, childNodes[i]);\n inserted = true;\n }\n else if (\n // Insert after the first element with a lower zIndex\n pInt(otherZIndex) <= value ||\n // If negative zIndex, add this before first undefined\n // zIndex element\n (undefinedOtherZIndex &&\n (!defined(value) || value >= 0))) {\n parentNode.insertBefore(element, childNodes[i + 1] || null // null for oldIE export\n );\n inserted = true;\n }\n }\n }\n if (!inserted) {\n parentNode.insertBefore(element, childNodes[svgParent ? 3 : 0] || null // null for oldIE\n );\n inserted = true;\n }\n }\n return inserted;\n };\n return SVGElement;\n}());\n// Some shared setters and getters\nSVGElement.prototype.strokeSetter = SVGElement.prototype.fillSetter;\nSVGElement.prototype.yGetter = SVGElement.prototype.xGetter;\nSVGElement.prototype.matrixSetter =\n SVGElement.prototype.rotationOriginXSetter =\n SVGElement.prototype.rotationOriginYSetter =\n SVGElement.prototype.rotationSetter =\n SVGElement.prototype.scaleXSetter =\n SVGElement.prototype.scaleYSetter =\n SVGElement.prototype.translateXSetter =\n SVGElement.prototype.translateYSetter =\n SVGElement.prototype.verticalAlignSetter = function (value, key) {\n this[key] = value;\n this.doTransform = true;\n };\n/* *\n *\n * Default Export\n *\n * */\nexport default SVGElement;\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * Reference to the global SVGElement class as a workaround for a name conflict\n * in the Highcharts namespace.\n *\n * @global\n * @typedef {global.SVGElement} GlobalSVGElement\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/SVGElement\n */\n/**\n * The horizontal alignment of an element.\n *\n * @typedef {\"center\"|\"left\"|\"right\"} Highcharts.AlignValue\n */\n/**\n * Options to align the element relative to the chart or another box.\n *\n * @interface Highcharts.AlignObject\n */ /**\n* Horizontal alignment. Can be one of `left`, `center` and `right`.\n*\n* @name Highcharts.AlignObject#align\n* @type {Highcharts.AlignValue|undefined}\n*\n* @default left\n*/ /**\n* Vertical alignment. Can be one of `top`, `middle` and `bottom`.\n*\n* @name Highcharts.AlignObject#verticalAlign\n* @type {Highcharts.VerticalAlignValue|undefined}\n*\n* @default top\n*/ /**\n* Horizontal pixel offset from alignment.\n*\n* @name Highcharts.AlignObject#x\n* @type {number|undefined}\n*\n* @default 0\n*/ /**\n* Vertical pixel offset from alignment.\n*\n* @name Highcharts.AlignObject#y\n* @type {number|undefined}\n*\n* @default 0\n*/ /**\n* Use the `transform` attribute with translateX and translateY custom\n* attributes to align this elements rather than `x` and `y` attributes.\n*\n* @name Highcharts.AlignObject#alignByTranslate\n* @type {boolean|undefined}\n*\n* @default false\n*/\n/**\n * Bounding box of an element.\n *\n * @interface Highcharts.BBoxObject\n * @extends Highcharts.PositionObject\n */ /**\n* Height of the bounding box.\n*\n* @name Highcharts.BBoxObject#height\n* @type {number}\n*/ /**\n* Width of the bounding box.\n*\n* @name Highcharts.BBoxObject#width\n* @type {number}\n*/ /**\n* Horizontal position of the bounding box.\n*\n* @name Highcharts.BBoxObject#x\n* @type {number}\n*/ /**\n* Vertical position of the bounding box.\n*\n* @name Highcharts.BBoxObject#y\n* @type {number}\n*/\n/**\n * An object of key-value pairs for SVG attributes. Attributes in Highcharts\n * elements for the most parts correspond to SVG, but some are specific to\n * Highcharts, like `zIndex`, `rotation`, `rotationOriginX`,\n * `rotationOriginY`, `translateX`, `translateY`, `scaleX` and `scaleY`. SVG\n * attributes containing a hyphen are _not_ camel-cased, they should be\n * quoted to preserve the hyphen.\n *\n * @example\n * {\n * 'stroke': '#ff0000', // basic\n * 'stroke-width': 2, // hyphenated\n * 'rotation': 45 // custom\n * 'd': ['M', 10, 10, 'L', 30, 30, 'z'] // path definition, note format\n * }\n *\n * @interface Highcharts.SVGAttributes\n */ /**\n* @name Highcharts.SVGAttributes#[key:string]\n* @type {*}\n*/ /**\n* @name Highcharts.SVGAttributes#d\n* @type {string|Highcharts.SVGPathArray|undefined}\n*/ /**\n* @name Highcharts.SVGAttributes#dx\n* @type {number|undefined}\n*/ /**\n* @name Highcharts.SVGAttributes#dy\n* @type {number|undefined}\n*/ /**\n* @name Highcharts.SVGAttributes#fill\n* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject|undefined}\n*/ /**\n* @name Highcharts.SVGAttributes#inverted\n* @type {boolean|undefined}\n*/ /**\n* @name Highcharts.SVGAttributes#matrix\n* @type {Array|undefined}\n*/ /**\n* @name Highcharts.SVGAttributes#rotation\n* @type {number|undefined}\n*/ /**\n* @name Highcharts.SVGAttributes#rotationOriginX\n* @type {number|undefined}\n*/ /**\n* @name Highcharts.SVGAttributes#rotationOriginY\n* @type {number|undefined}\n*/ /**\n* @name Highcharts.SVGAttributes#scaleX\n* @type {number|undefined}\n*/ /**\n* @name Highcharts.SVGAttributes#scaleY\n* @type {number|undefined}\n*/ /**\n* @name Highcharts.SVGAttributes#stroke\n* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject|undefined}\n*/ /**\n* @name Highcharts.SVGAttributes#style\n* @type {string|Highcharts.CSSObject|undefined}\n*/ /**\n* @name Highcharts.SVGAttributes#translateX\n* @type {number|undefined}\n*/ /**\n* @name Highcharts.SVGAttributes#translateY\n* @type {number|undefined}\n*/ /**\n* @name Highcharts.SVGAttributes#zIndex\n* @type {number|undefined}\n*/\n/**\n * An SVG DOM element. The type is a reference to the regular SVGElement in the\n * global scope.\n *\n * @typedef {globals.GlobalSVGElement} Highcharts.SVGDOMElement\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/SVGElement\n */\n/**\n * The vertical alignment of an element.\n *\n * @typedef {\"bottom\"|\"middle\"|\"top\"} Highcharts.VerticalAlignValue\n */\n''; // keeps doclets above in JS file\n","/* *\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport SVGElement from './SVGElement.js';\nimport U from '../../Utilities.js';\nvar defined = U.defined, extend = U.extend, isNumber = U.isNumber, merge = U.merge, pick = U.pick, removeEvent = U.removeEvent;\n/* *\n *\n * Class\n *\n * */\n/**\n * SVG label to render text.\n * @private\n * @class\n * @name Highcharts.SVGLabel\n * @augments Highcharts.SVGElement\n */\nvar SVGLabel = /** @class */ (function (_super) {\n __extends(SVGLabel, _super);\n /* *\n *\n * Constructor\n *\n * */\n function SVGLabel(renderer, str, x, y, shape, anchorX, anchorY, useHTML, baseline, className) {\n var _this = _super.call(this) || this;\n _this.paddingLeftSetter = _this.paddingSetter;\n _this.paddingRightSetter = _this.paddingSetter;\n _this.init(renderer, 'g');\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 var 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 return _this;\n }\n /* *\n *\n * Functions\n *\n * */\n SVGLabel.prototype.alignSetter = function (value) {\n var alignFactor = ({\n left: 0,\n center: 0.5,\n right: 1\n })[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 }\n };\n SVGLabel.prototype.anchorXSetter = function (value, key) {\n this.anchorX = value;\n this.boxAttr(key, Math.round(value) - this.getCrispAdjust() - this.xSetting);\n };\n SVGLabel.prototype.anchorYSetter = function (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 */\n SVGLabel.prototype.boxAttr = function (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 */\n SVGLabel.prototype.css = function (styles) {\n if (styles) {\n var textStyles_1 = {};\n // Create a copy to avoid altering the original object\n // (#537)\n styles = merge(styles);\n SVGLabel.textProps.forEach(function (prop) {\n if (typeof styles[prop] !== 'undefined') {\n textStyles_1[prop] = styles[prop];\n delete styles[prop];\n }\n });\n this.text.css(textStyles_1);\n // Update existing text, box (#9400, #12163, #18212)\n if ('fontSize' in textStyles_1 || 'fontWeight' in textStyles_1) {\n this.updateTextPadding();\n }\n else if ('width' in textStyles_1 || 'textOverflow' in textStyles_1) {\n this.updateBoxSize();\n }\n }\n return SVGElement.prototype.css.call(this, styles);\n };\n /*\n * Destroy and release memory.\n */\n SVGLabel.prototype.destroy = function () {\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 SVGLabel.prototype.fillSetter = function (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 */\n SVGLabel.prototype.getBBox = function () {\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) {\n this.updateBoxSize();\n }\n var padding = this.padding;\n var paddingLeft = pick(this.paddingLeft, padding);\n return {\n width: this.width,\n height: this.height,\n x: this.bBox.x - paddingLeft,\n y: this.bBox.y - padding\n };\n };\n SVGLabel.prototype.getCrispAdjust = function () {\n return this.renderer.styledMode && this.box ?\n this.box.strokeWidth() % 2 / 2 :\n (this['stroke-width'] ? parseInt(this['stroke-width'], 10) : 0) % 2 / 2;\n };\n SVGLabel.prototype.heightSetter = function (value) {\n this.heightSetting = value;\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 */\n SVGLabel.prototype.onAdd = function () {\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 SVGLabel.prototype.paddingSetter = function (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 SVGLabel.prototype.rSetter = function (value, key) {\n this.boxAttr(key, value);\n };\n SVGLabel.prototype.shadow = function (b) {\n if (b && !this.renderer.styledMode) {\n this.updateBoxSize();\n if (this.box) {\n this.box.shadow(b);\n }\n }\n return this;\n };\n SVGLabel.prototype.strokeSetter = function (value, key) {\n // for animation getter (#6776)\n this.stroke = value;\n this.boxAttr(key, value);\n };\n SVGLabel.prototype['stroke-widthSetter'] = function (value, key) {\n if (value) {\n this.needsBox = true;\n }\n this['stroke-width'] = value;\n this.boxAttr(key, value);\n };\n SVGLabel.prototype['text-alignSetter'] = function (value) {\n this.textAlign = value;\n };\n SVGLabel.prototype.textSetter = function (text) {\n if (typeof text !== 'undefined') {\n // Must use .attr to ensure transforms are done (#10009)\n this.text.attr({ text: text });\n }\n this.updateTextPadding();\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 */\n SVGLabel.prototype.updateBoxSize = function () {\n var text = this.text, style = text.element.style, attribs = {}, padding = this.padding, \n // #12165 error when width is null (auto)\n // #12163 when fontweight: bold, recalculate bBox withot 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() :\n SVGLabel.emptyBBox);\n var crispAdjust;\n this.width = this.getPaddedWidth();\n this.height = (this.heightSetting || bBox.height || 0) + 2 * padding;\n var metrics = this.renderer.fontMetrics(style && style.fontSize, 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 var 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 */\n SVGLabel.prototype.updateTextPadding = function () {\n var text = this.text;\n if (!text.textPath) {\n this.updateBoxSize();\n // Determine y based on the baseline\n var textY = this.baseline ? 0 : this.baselineOffset;\n var textX = pick(this.paddingLeft, this.padding);\n // compensate for alignment\n if (defined(this.widthSetting) &&\n this.bBox &&\n (this.textAlign === 'center' || this.textAlign === 'right')) {\n textX += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width);\n }\n // update if anything changed\n if (textX !== text.x || textY !== text.y) {\n text.attr('x', textX);\n // #8159 - prevent misplaced data labels in treemap\n // (useHTML: true)\n if (text.hasBoxWidthChanged) {\n this.bBox = text.getBBox(true);\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 SVGLabel.prototype.widthSetter = function (value) {\n // width:auto => null\n this.widthSetting = isNumber(value) ? value : void 0;\n };\n SVGLabel.prototype.getPaddedWidth = function () {\n var padding = this.padding;\n var paddingLeft = pick(this.paddingLeft, padding);\n var paddingRight = pick(this.paddingRight, padding);\n return ((this.widthSetting || this.bBox.width || 0) +\n paddingLeft +\n paddingRight);\n };\n SVGLabel.prototype.xSetter = function (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 this.xSetting = Math.round(value);\n this.attr('translateX', this.xSetting);\n };\n SVGLabel.prototype.ySetter = function (value) {\n this.ySetting = this.y = Math.round(value);\n this.attr('translateY', this.ySetting);\n };\n /* *\n *\n * Static Properties\n *\n * */\n SVGLabel.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 * @private\n * @name Highcharts.SVGLabel#textProps\n * @type {Array}\n */\n SVGLabel.textProps = [\n 'color', 'direction', 'fontFamily', 'fontSize', 'fontStyle',\n 'fontWeight', 'lineHeight', 'textAlign', 'textDecoration',\n 'textOutline', 'textOverflow', 'width'\n ];\n return SVGLabel;\n}(SVGElement));\n/* *\n *\n * Default Export\n *\n * */\nexport default SVGLabel;\n","/* *\n *\n * (c) 2010-2020 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport AST from '../HTML/AST.js';\nimport H from '../../Globals.js';\nvar doc = H.doc, SVG_NS = H.SVG_NS, win = H.win;\nimport U from '../../Utilities.js';\nvar attr = U.attr, extend = U.extend, fireEvent = U.fireEvent, isString = U.isString, objectEach = U.objectEach, pick = U.pick;\n/* *\n *\n * Class\n *\n * */\n/**\n * SVG Text Builder\n * @private\n * @class\n * @name Highcharts.TextBuilder\n */\nvar TextBuilder = /** @class */ (function () {\n function TextBuilder(svgElement) {\n var textStyles = svgElement.styles;\n this.renderer = svgElement.renderer;\n this.svgElement = svgElement;\n this.width = svgElement.textWidth;\n this.textLineHeight = textStyles && textStyles.lineHeight;\n this.textOutline = textStyles && textStyles.textOutline;\n this.ellipsis = Boolean(textStyles && textStyles.textOverflow === 'ellipsis');\n this.noWrap = Boolean(textStyles && textStyles.whiteSpace === 'nowrap');\n this.fontSize = textStyles && textStyles.fontSize;\n }\n /**\n * Build an SVG representation of the pseudo HTML given in the object's\n * svgElement.\n *\n * @private\n *\n * @return {void}.\n */\n TextBuilder.prototype.buildSVG = function () {\n var wrapper = this.svgElement, textNode = wrapper.element, renderer = wrapper.renderer, textStr = pick(wrapper.textStr, '').toString(), hasMarkup = textStr.indexOf('<') !== -1, childNodes = textNode.childNodes, tempParent = this.width && !wrapper.added && renderer.box, regexMatchBreaks = //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 this.fontSize,\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 (var 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\n tempParent.appendChild(textNode);\n }\n // Step 1. Parse the markup safely and directly into a tree\n // structure.\n var 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 || '', ['<', '>']) // #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 *\n * @private\n *\n */\n TextBuilder.prototype.modifyDOM = function () {\n var _this = this;\n var wrapper = this.svgElement;\n var 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 var 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'), function (br, i) {\n if (br.nextSibling && br.previousSibling) { // #5261\n if (i === 0 && br.previousSibling.nodeType === 1) {\n wrapper.firstLineMetrics = wrapper.renderer\n .fontMetrics(void 0, 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: x\n });\n }\n });\n // Constrain the line width, either by ellipsis or wrapping\n var width = this.width || 0;\n if (!width) {\n return;\n }\n // Insert soft line breaks into each text node\n var modifyTextNode = function (textNode, parentElement) {\n var text = textNode.textContent || '';\n var words = text\n .replace(/([^\\^])-/g, '$1- ') // Split on hyphens\n // .trim()\n .split(' '); // #1273\n var hasWhiteSpace = !_this.noWrap && (words.length > 1 || wrapper.element.childNodes.length > 1);\n var dy = _this.getLineHeight(parentElement);\n var lineNo = 0;\n var startAt = wrapper.actualWidth;\n if (_this.ellipsis) {\n if (text) {\n _this.truncate(textNode, text, void 0, 0, \n // Target width\n Math.max(0, \n // Substract the font face to make room for the\n // ellipsis itself\n width - parseInt(_this.fontSize || 12, 10)), \n // Build the text to test for\n function (text, currentIndex) {\n return text.substring(0, currentIndex) + '\\u2026';\n });\n }\n }\n else if (hasWhiteSpace) {\n var lines = [];\n // Remove preceding siblings in order to make the text length\n // calculation correct in the truncate function\n var 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, \n // Build the text to test for\n function (t, currentIndex) {\n return words\n .slice(0, currentIndex)\n .join(' ')\n .replace(/- /g, '-');\n });\n startAt = wrapper.actualWidth;\n lineNo++;\n }\n // Reinsert the preceding child nodes\n precedingSiblings.forEach(function (childNode) {\n parentElement.insertBefore(childNode, textNode);\n });\n // Insert the previous lines before the original text node\n lines.forEach(function (line) {\n // Insert the line\n parentElement.insertBefore(doc.createTextNode(line), textNode);\n // Insert a break\n var br = doc.createElementNS(SVG_NS, 'tspan');\n br.textContent = '\\u200B'; // zero-width space\n attr(br, { dy: dy, x: x });\n parentElement.insertBefore(br, textNode);\n });\n }\n };\n // Recurse down the DOM tree and handle line breaks for each text node\n var modifyChildren = (function (node) {\n var childNodes = [].slice.call(node.childNodes);\n childNodes.forEach(function (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 , or pure text node.\n *\n * @param {DOMElementType|Text} node The node to check for\n *\n * @return {number} The rendered line height\n */\n TextBuilder.prototype.getLineHeight = function (node) {\n var fontSizeStyle;\n // If the node is a text node, use its parent\n var element = (node.nodeType === win.Node.TEXT_NODE) ?\n node.parentElement :\n node;\n if (!this.renderer.styledMode) {\n fontSizeStyle =\n element && /(px|em)$/.test(element.style.fontSize) ?\n element.style.fontSize :\n (this.fontSize || this.renderer.style.fontSize || 12);\n }\n return this.textLineHeight ?\n parseInt(this.textLineHeight.toString(), 10) :\n this.renderer.fontMetrics(fontSizeStyle, 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 * @private\n *\n * @param {ASTNode[]} nodes The AST nodes\n *\n */\n TextBuilder.prototype.modifyTree = function (nodes) {\n var _this = this;\n var modifyChild = function (node, i) {\n var _a = node.attributes, attributes = _a === void 0 ? {} : _a, children = node.children, _b = node.style, style = _b === void 0 ? {} : _b, tagName = node.tagName, 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 && 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 var nextNode = nodes[i + 1];\n if (nextNode && 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(function (child) { return child.tagName === '#text'; })) {\n node.children = [{ children: children, tagName: 'tspan' }];\n }\n if (tagName !== '#text' && tagName !== 'a') {\n node.tagName = 'tspan';\n }\n extend(node, { attributes: attributes, style: style });\n // Recurse\n if (children) {\n children\n .filter(function (c) { return c.tagName !== '#text'; })\n .forEach(modifyChild);\n }\n };\n nodes.forEach(modifyChild);\n fireEvent(this.svgElement, 'afterModifyTree', { nodes: 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 TextBuilder.prototype.truncate = function (textNode, text, words, startAt, width, getString) {\n var svgElement = this.svgElement;\n var renderer = svgElement.renderer, rotation = svgElement.rotation;\n // Cache the lengths to avoid checking the same twice\n var lengths = [];\n // Word wrap cannot be truncated to shorter than one word, ellipsis\n // text can be completely blank.\n var minIndex = words ? 1 : 0;\n var maxIndex = (text || words || '').length;\n var currentIndex = maxIndex;\n var str;\n var actualWidth;\n var 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 var end = concatenatedEnd || charEnd;\n var 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 (e) {\n '';\n }\n // Legacy\n }\n else if (renderer.getSpanWidth) { // #9058 jsdom\n textNode.textContent = getString(text || words, charEnd);\n lengths[end] = startAt +\n renderer.getSpanWidth(svgElement, textNode);\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 }\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 * @private\n *\n * @param {string} inputStr The string to unescape\n * @param {Array} [except] Exceptions\n *\n * @return {string} The processed string\n */\n TextBuilder.prototype.unescapeEntities = function (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 return TextBuilder;\n}());\nexport default TextBuilder;\n","/* *\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport AST from '../HTML/AST.js';\nimport Color from '../../Color/Color.js';\nimport H from '../../Globals.js';\nvar charts = H.charts, deg2rad = H.deg2rad, doc = H.doc, isFirefox = H.isFirefox, isMS = H.isMS, isWebKit = H.isWebKit, noop = H.noop, SVG_NS = H.SVG_NS, symbolSizes = H.symbolSizes, win = H.win;\nimport RendererRegistry from '../RendererRegistry.js';\nimport SVGElement from './SVGElement.js';\nimport SVGLabel from './SVGLabel.js';\nimport Symbols from './Symbols.js';\nimport TextBuilder from './TextBuilder.js';\nimport U from '../../Utilities.js';\nvar addEvent = U.addEvent, attr = U.attr, createElement = U.createElement, css = U.css, defined = U.defined, destroyObjectProperties = U.destroyObjectProperties, extend = U.extend, isArray = U.isArray, isNumber = U.isNumber, isObject = U.isObject, isString = U.isString, merge = U.merge, pick = U.pick, pInt = U.pInt, uniqueKey = U.uniqueKey;\n/* *\n *\n * Variables\n *\n * */\nvar 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. Through the VMLRenderer, part of the `oldie.js`\n * module, it also brings vector graphics to IE <= 8.\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 * @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 */\nvar SVGRenderer = /** @class */ (function () {\n /* *\n *\n * Constructors\n *\n * */\n function SVGRenderer(container, width, height, style, forExport, allowHTML, styledMode) {\n /* *\n *\n * Properties\n *\n * */\n this.alignedObjects = void 0;\n /**\n * The root `svg` node of the renderer.\n *\n * @name Highcharts.SVGRenderer#box\n * @type {Highcharts.SVGDOMElement}\n */\n this.box = void 0;\n /**\n * The wrapper for the root `svg` node of the renderer.\n *\n * @name Highcharts.SVGRenderer#boxWrapper\n * @type {Highcharts.SVGElement}\n */\n this.boxWrapper = void 0;\n this.cache = void 0;\n this.cacheKeys = void 0;\n this.chartIndex = void 0;\n /**\n * A pointer to the `defs` node of the root SVG.\n *\n * @name Highcharts.SVGRenderer#defs\n * @type {Highcharts.SVGElement}\n */\n this.defs = void 0;\n this.globalAnimation = void 0;\n this.gradients = void 0;\n this.height = void 0;\n this.imgCount = void 0;\n this.isSVG = void 0;\n this.style = void 0;\n /**\n * Page url used for internal references.\n *\n * @private\n * @name Highcharts.SVGRenderer#url\n * @type {string}\n */\n this.url = void 0;\n this.width = void 0;\n this.init(container, width, height, style, forExport, allowHTML, styledMode);\n }\n /* *\n *\n * Functions\n *\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 SVGRenderer.prototype.init = function (container, width, height, style, forExport, allowHTML, styledMode) {\n var renderer = this, boxWrapper = renderer\n .createElement('svg')\n .attr({\n version: '1.1',\n 'class': 'highcharts-root'\n }), element = boxWrapper.element;\n if (!styledMode) {\n boxWrapper.css(this.getStyle(style));\n }\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 // object properties\n renderer.isSVG = true;\n this.box = element;\n this.boxWrapper = boxWrapper;\n renderer.alignedObjects = [];\n this.url = this.getReferenceURL();\n // Add description\n var desc = this.createElement('desc').add();\n desc.element.appendChild(doc.createTextNode('Created with Highcharts 10.3.3'));\n renderer.defs = this.createElement('defs').add();\n renderer.allowHTML = allowHTML;\n renderer.forExport = forExport;\n renderer.styledMode = styledMode;\n renderer.gradients = {}; // Object where gradient SvgElements are stored\n renderer.cache = {}; // Cache for numerical bounding boxes\n renderer.cacheKeys = [];\n renderer.imgCount = 0;\n renderer.setSize(width, height, false);\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 var 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 * 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 SVGRenderer.prototype.definition = function (def) {\n var 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 * @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 SVGRenderer.prototype.getReferenceURL = function () {\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 var id = uniqueKey();\n var 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: 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(#\".concat(id, \")\"),\n fill: 'rgba(0,0,0,0.001)'\n }\n }]\n }]);\n var svg = ast.addToDOM(doc.body);\n css(svg, {\n position: 'fixed',\n top: 0,\n left: 0,\n zIndex: 9e5\n });\n var hitElement = doc.elementFromPoint(6, 6);\n hasInternalReferenceBug = (hitElement && hitElement.id) === 'hitme';\n doc.body.removeChild(svg);\n }\n if (hasInternalReferenceBug) {\n return win.location.href\n .split('#')[0] // remove the hash\n .replace(/<[^>]*>/g, '') // wing cut HTML\n // escape parantheses and quotes\n .replace(/([\\('\\)])/g, '\\\\$1')\n // replace spaces (needed for Safari only)\n .replace(/ /g, '%20');\n }\n }\n return '';\n };\n /**\n * Get the global style setting for the renderer.\n *\n * @private\n * @function Highcharts.SVGRenderer#getStyle\n *\n * @param {Highcharts.CSSObject} style\n * Style settings.\n *\n * @return {Highcharts.CSSObject}\n * The style settings mixed with defaults.\n */\n SVGRenderer.prototype.getStyle = function (style) {\n this.style = extend({\n fontFamily: '\"Lucida Grande\", \"Lucida Sans Unicode\", ' +\n 'Arial, Helvetica, sans-serif',\n fontSize: '12px'\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 SVGRenderer.prototype.setStyle = function (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 * needto render preliminarily in another div to get the text bounding boxes\n * right.\n *\n * @function Highcharts.SVGRenderer#isHidden\n *\n * @return {boolean}\n * True if it is hidden.\n */\n SVGRenderer.prototype.isHidden = function () {\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 SVGRenderer.prototype.destroy = function () {\n var 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 // Defs are null in VMLRenderer\n // Otherwise, destroy them here.\n if (rendererDefs) {\n renderer.defs = rendererDefs.destroy();\n }\n // Remove sub pixel fix handler (#982)\n if (renderer.unSubPixelFix) {\n renderer.unSubPixelFix();\n }\n renderer.alignedObjects = null;\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 SVGRenderer.prototype.createElement = function (nodeName) {\n var wrapper = new this.Element();\n wrapper.init(this, nodeName);\n return wrapper;\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 * @private\n * @function Highcharts.SVGRenderer#getRadialAttr\n */\n SVGRenderer.prototype.getRadialAttr = function (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 * 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 * @private\n * @function Highcharts.SVGRenderer#buildText\n *\n * @param {Highcharts.SVGElement} wrapper\n * The parent SVGElement.\n */\n SVGRenderer.prototype.buildText = function (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 SVGRenderer.prototype.getContrast = function (color) {\n // #6216, #17273\n var rgba = Color.parse(color).rgba\n .map(function (b8) {\n var c = b8 / 255;\n return c <= 0.03928 ?\n c / 12.92 :\n Math.pow((c + 0.055) / 1.055, 2.4);\n });\n // Relative luminance\n var 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 ? '#FFFFFF' : '#000000';\n };\n /**\n * Create a button with preset states.\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} 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 SVGRenderer.prototype.button = function (text, x, y, callback, theme, hoverState, selectState, disabledState, shape, useHTML) {\n if (theme === void 0) { theme = {}; }\n var label = this.label(text, x, y, shape, void 0, void 0, useHTML, void 0, 'button'), styledMode = this.styledMode, states = theme.states || {};\n var curState = 0;\n theme = merge(theme);\n delete theme.states;\n var normalStyle = merge({\n color: \"#333333\" /* Palette.neutralColor80 */,\n cursor: 'pointer',\n fontWeight: 'normal'\n }, theme.style);\n delete theme.style;\n // Remove stylable attributes. Pass in the ButtonThemeObject and get the\n // SVGAttributes subset back.\n var normalState = AST.filterUserAttributes(theme);\n // Default, non-stylable attributes\n label.attr(merge({ padding: 8, r: 2 }, normalState));\n // Presentational. The string type is a mistake, it is just for\n // compliance with SVGAttribute and is not used in button theme.\n var hoverStyle, selectStyle, disabledStyle;\n if (!styledMode) {\n // Normal state - prepare the attributes\n normalState = merge({\n fill: \"#f7f7f7\" /* Palette.neutralColor3 */,\n stroke: \"#cccccc\" /* Palette.neutralColor20 */,\n 'stroke-width': 1\n }, normalState);\n // Hover state\n hoverState = merge(normalState, {\n fill: \"#e6e6e6\" /* Palette.neutralColor10 */\n }, AST.filterUserAttributes(hoverState || states.hover || {}));\n hoverStyle = hoverState.style;\n delete hoverState.style;\n // Pressed state\n selectState = merge(normalState, {\n fill: \"#e6ebf5\" /* Palette.highlightColor10 */,\n style: {\n color: \"#000000\" /* Palette.neutralColor100 */,\n fontWeight: 'bold'\n }\n }, AST.filterUserAttributes(selectState || states.select || {}));\n selectStyle = selectState.style;\n delete selectState.style;\n // Disabled state\n disabledState = merge(normalState, {\n style: {\n color: \"#cccccc\" /* Palette.neutralColor20 */\n }\n }, AST.filterUserAttributes(disabledState || states.disabled || {}));\n disabledStyle = disabledState.style;\n delete disabledState.style;\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 = function (state) {\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 || 0]);\n if (!styledMode) {\n label\n .attr([\n normalState,\n hoverState,\n selectState,\n disabledState\n ][state || 0]);\n var css_1 = [\n normalStyle,\n hoverStyle,\n selectStyle,\n disabledStyle\n ][state || 0];\n if (isObject(css_1)) {\n label.css(css_1);\n }\n }\n };\n // Presentational attributes\n if (!styledMode) {\n label\n .attr(normalState)\n .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 element.\n // Should this be reconsidered, we need more complex logic to share\n // events between the and its
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', function (e) { return 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 neighbour 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 * @param {string} [roundingFunction=round]\n * The rounding function name on the `Math` object, can be one of\n * `round`, `floor` or `ceil`.\n *\n * @return {Highcharts.SVGPathArray}\n * The original points array, but modified to render crisply.\n */\n SVGRenderer.prototype.crispLine = function (points, width, roundingFunction) {\n if (roundingFunction === void 0) { roundingFunction = 'round'; }\n var start = points[0];\n var end = points[1];\n // Normalize to a crisp line\n if (defined(start[1]) && start[1] === end[1]) {\n // Substract due to #1129. Now bottom and left axis gridlines behave\n // the same.\n start[1] = end[1] =\n Math[roundingFunction](start[1]) - (width % 2 / 2);\n }\n if (defined(start[2]) && start[2] === end[2]) {\n start[2] = end[2] =\n Math[roundingFunction](start[2]) + (width % 2 / 2);\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} [attribs]\n * The initial attributes.\n *\n * @return {Highcharts.SVGElement}\n * The generated wrapper element.\n */\n SVGRenderer.prototype.path = function (path) {\n var 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 /**\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 SVGRenderer.prototype.circle = function (x, y, r) {\n var 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 /**\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 SVGRenderer.prototype.arc = function (x, y, r, innerR, start, end) {\n var 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: innerR, start: start, end: end };\n }\n // Arcs are defined as symbols for the ability to set\n // attributes in attr and animate\n var arc = this.symbol('arc', x, y, r, r, options);\n arc.r = r; // #959\n return arc;\n };\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 SVGRenderer.prototype.rect = function (x, y, width, height, r, strokeWidth) {\n r = isObject(x) ? x.r : r;\n var wrapper = this.createElement('rect');\n var attribs = (isObject(x) ?\n x :\n typeof x === 'undefined' ?\n {} :\n {\n x: x,\n y: y,\n width: Math.max(width, 0),\n height: Math.max(height, 0)\n });\n if (!this.styledMode) {\n if (typeof strokeWidth !== 'undefined') {\n attribs['stroke-width'] = strokeWidth;\n attribs = wrapper.crisp(attribs);\n }\n attribs.fill = 'none';\n }\n if (r) {\n attribs.r = r;\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 /**\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} [animate=true]\n * Whether and how to animate.\n */\n SVGRenderer.prototype.setSize = function (width, height, animate) {\n var 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\n * can be used for styling and scripting.\n *\n * @return {Highcharts.SVGElement}\n * The generated wrapper element.\n */\n SVGRenderer.prototype.g = function (name) {\n var 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} src\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\n * height.\n *\n * @param {Function} [onload]\n * Event handler for image load.\n *\n * @return {Highcharts.SVGElement}\n * The generated wrapper element.\n */\n SVGRenderer.prototype.image = function (src, x, y, width, height, onload) {\n var attribs = { preserveAspectRatio: 'none' }, setSVGImageSource = function (el, src) {\n // Set the href in the xlink namespace\n if (el.setAttributeNS) {\n el.setAttributeNS('http://www.w3.org/1999/xlink', 'href', src);\n }\n else {\n // could be exporting in IE\n // using href throws \"not supported\" in ie7 and under,\n // requries regex shim to fix later\n el.setAttribute('hc-svg-href', src);\n }\n };\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 var elemWrapper = this.createElement('image').attr(attribs), onDummyLoad = function (e) {\n setSVGImageSource(elemWrapper.element, src);\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 setSVGImageSource(elemWrapper.element, 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==' /* eslint-disable-line */);\n var dummy = new win.Image();\n addEvent(dummy, 'load', onDummyLoad);\n dummy.src = src;\n if (dummy.complete) {\n onDummyLoad({});\n }\n }\n else {\n setSVGImageSource(elemWrapper.element, src);\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 SVGRenderer.prototype.symbol = function (symbol, x, y, width, height, options) {\n var 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 var 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, Math.round(x || 0), Math.round(y || 0), width || 0, height || 0, options);\n }\n obj = this.path(path);\n if (!ren.styledMode) {\n obj.attr('fill', 'none');\n }\n // expando 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 var img_1 = 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_1.imgwidth = pick(symbolSizes[imageSrc] && symbolSizes[imageSrc].width, options && options.width);\n img_1.imgheight = pick(symbolSizes[imageSrc] && symbolSizes[imageSrc].height, options && options.height);\n /**\n * Set the size and position\n */\n centerImage = function (obj) { return 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(function (key) {\n img_1[key + 'Setter'] = function (value, key) {\n this[key] = value;\n var _a = this, alignByTranslate = _a.alignByTranslate, element = _a.element, width = _a.width, height = _a.height, imgwidth = _a.imgwidth, imgheight = _a.imgheight;\n var imgSize = this['img' + key];\n if (defined(imgSize)) {\n var scale = 1;\n // Scale and center the image within its container.\n // The name `backgroundSize` is taken from the CSS spec,\n // but the value `within` is made up. Other possible\n // values in the spec, `cover` and `contain`, can be\n // implemented if needed.\n if (options &&\n options.backgroundSize === 'within' &&\n width &&\n height) {\n scale = Math.min(width / imgwidth, height / imgheight);\n imgSize = Math.round(imgSize * scale);\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) {\n element.setAttribute(key, imgSize);\n }\n if (!alignByTranslate) {\n this.translate(((width || 0) - (imgSize * scale)) / 2, ((height || 0) - (imgSize * scale)) / 2);\n }\n }\n };\n });\n if (defined(x)) {\n img_1.attr({\n x: x,\n y: y\n });\n }\n img_1.isImg = true;\n if (defined(img_1.imgwidth) && defined(img_1.imgheight)) {\n centerImage(img_1);\n }\n else {\n // Initialize image to be 0 size so export will still function\n // if there's no cached sizes.\n img_1.attr({ width: 0, height: 0 });\n // Create a dummy JavaScript image to get the width and height.\n createElement('img', {\n onload: function () {\n var 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_1.imgwidth = this.width;\n img_1.imgheight = this.height;\n if (img_1.element) {\n centerImage(img_1);\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.imgCount--;\n if (!ren.imgCount && chart && !chart.hasLoaded) {\n chart.onload();\n }\n },\n src: imageSrc\n });\n this.imgCount++;\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 * @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 * @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 SVGRenderer.prototype.clipRect = function (x, y, width, height) {\n var \n // Add a hyphen at the end to avoid confusion in testing indexes\n // -1 and -10, -11 etc (#6550)\n id = uniqueKey() + '-', clipPath = this.createElement('clipPath').attr({\n id: id\n }).add(this.defs), wrapper = this.rect(x, y, width, height, 0).add(clipPath);\n wrapper.id = id;\n wrapper.clipPath = clipPath;\n wrapper.count = 0;\n return wrapper;\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 SVGRenderer.prototype.text = function (str, x, y, useHTML) {\n var 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 var wrapper = renderer.createElement('text').attr(attribs);\n if (!useHTML || (renderer.forExport && !renderer.allowHTML)) {\n wrapper.xSetter = function (value, key, element) {\n var tspans = element.getElementsByTagName('tspan'), parentVal = element.getAttribute(key);\n for (var i = 0, tspan = void 0; 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 {number|string} [fontSize]\n * The current font size to inspect. If not given, the font size\n * will be found from the DOM element.\n *\n * @param {Highcharts.SVGElement|Highcharts.SVGDOMElement} [elem]\n * The element to inspect for a current font size.\n *\n * @return {Highcharts.FontMetricsObject}\n * The font metrics.\n */\n SVGRenderer.prototype.fontMetrics = function (fontSize, elem) {\n if ((this.styledMode || !/px/.test(fontSize)) &&\n (win.getComputedStyle) // old IE doesn't support it\n ) {\n fontSize = elem && SVGElement.prototype.getStyle.call(elem, 'font-size');\n }\n else {\n fontSize = fontSize ||\n // When the elem is a DOM element (#5932)\n (elem && elem.style && elem.style.fontSize) ||\n // Fall back on the renderer style default\n (this.style && this.style.fontSize);\n }\n // Handle different units\n if (/px/.test(fontSize)) {\n fontSize = pInt(fontSize);\n }\n else {\n fontSize = 12;\n }\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 var lineHeight = (fontSize < 24 ?\n fontSize + 3 :\n Math.round(fontSize * 1.2)), baseline = Math.round(lineHeight * 0.8);\n return {\n h: lineHeight,\n b: baseline,\n f: fontSize\n };\n };\n /**\n * Correct X and Y positioning of a label for rotation (#1764).\n *\n * @private\n * @function Highcharts.SVGRenderer#rotCorr\n */\n SVGRenderer.prototype.rotCorr = function (baseline, rotation, alterY) {\n var 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 * @private\n * @function Highcharts.SVGRenderer#pathToSegments\n */\n SVGRenderer.prototype.pathToSegments = function (path) {\n var ret = [];\n var segment = [];\n var 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 (var 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\n * the `baseline` parameter.\n *\n * @param {string} [shape='rect']\n * The shape of the label's border/background, if any. Defaults to\n * `rect`. Other possible values are `callout` or other shapes\n * defined in {@link Highcharts.SVGRenderer#symbols}.\n *\n * @param {number} [anchorX]\n * In case the `shape` has a pointer, like a flag, this is the\n * coordinates it should be pinned to.\n *\n * @param {number} [anchorY]\n * In case the `shape` has a pointer, like a flag, this is the\n * coordinates 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,\n * like {@link Highcharts.SVGRenderer#text|renderer.text}, or to the\n * upper border 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 SVGRenderer.prototype.label = function (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 * @private\n * @function Highcharts.SVGRenderer#alignElements\n */\n SVGRenderer.prototype.alignElements = function () {\n this.alignedObjects.forEach(function (el) { return el.align(); });\n };\n return SVGRenderer;\n}());\nextend(SVGRenderer.prototype, {\n /**\n * A pointer to the renderer's associated Element class. The VMLRenderer\n * will have a pointer to VMLElement here.\n *\n * @name Highcharts.SVGRenderer#Element\n * @type {Highcharts.SVGElement}\n */\n Element: SVGElement,\n SVG_NS: 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 `<` will render as `<`.\n *\n * @example\n * // Add support for unescaping quotes\n * Highcharts.SVGRenderer.prototype.escapes['\"'] = '"';\n *\n * @name Highcharts.SVGRenderer#escapes\n * @type {Highcharts.Dictionary}\n */\n escapes: {\n '&': '&',\n '<': '<',\n '>': '>',\n \"'\": ''',\n '\"': '"'\n },\n /**\n * An extendable collection of functions for defining symbol paths.\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\n * @function Highcharts.SVGRenderer#draw\n */\n draw: noop\n});\n/* *\n *\n * Registry\n *\n * */\nRendererRegistry.registerRendererType('svg', SVGRenderer, true);\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 instanciated 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 #000000\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|Array|Array|Array|Array|Array)>} 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-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport U from '../../Utilities.js';\nvar defined = U.defined, isNumber = U.isNumber, pick = U.pick;\n/* *\n *\n * Functions\n *\n * */\n/* eslint-disable require-jsdoc, valid-jsdoc */\nfunction arc(x, y, w, h, options) {\n var arc = [];\n if (options) {\n var start = options.start || 0, rx = pick(options.r, w), ry = pick(options.r, h || w), proximity = 0.001, fullCircle = (Math.abs((options.end || 0) - start - 2 * Math.PI) <\n proximity), \n // Substract a small number to prevent cos and sin of start\n // and end from becoming equal on 360 arcs (related: #1561)\n end = (options.end || 0) - proximity, innerRadius = options.innerR, open_1 = pick(options.open, fullCircle), cosStart = Math.cos(start), sinStart = Math.sin(start), cosEnd = Math.cos(end), sinEnd = 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 arc.push([\n 'M',\n x + rx * cosStart,\n y + ry * sinStart\n ], [\n 'A',\n rx,\n ry,\n 0,\n longArc,\n pick(options.clockwise, 1),\n x + rx * cosEnd,\n y + ry * sinEnd\n ]);\n if (defined(innerRadius)) {\n arc.push(open_1 ?\n [\n 'M',\n x + innerRadius * cosEnd,\n y + innerRadius * sinEnd\n ] : [\n 'L',\n x + innerRadius * cosEnd,\n y + innerRadius * sinEnd\n ], [\n 'A',\n innerRadius,\n innerRadius,\n 0,\n longArc,\n // Clockwise - opposite to the outer arc clockwise\n defined(options.clockwise) ? 1 - options.clockwise : 0,\n x + innerRadius * cosStart,\n y + innerRadius * sinStart\n ]);\n }\n if (!open_1) {\n arc.push(['Z']);\n }\n }\n return arc;\n}\n/**\n * Callout shape used for default tooltips, also used for rounded\n * rectangles in VML\n */\nfunction callout(x, y, w, h, options) {\n var arrowLength = 6, halfDistance = 6, r = Math.min((options && options.r) || 0, w, h), safeDistance = r + halfDistance, anchorX = options && options.anchorX, anchorY = options && options.anchorY || 0;\n var path = roundedRect(x, y, w, h, { r: r });\n if (!isNumber(anchorX)) {\n return path;\n }\n // Anchor on right side\n if (x + anchorX >= w) {\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 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 // Anchor on left side\n }\n else if (x + anchorX <= 0) {\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 path.splice(7, 1, ['L', x, h / 2], ['L', anchorX, anchorY], ['L', x, h / 2], ['L', x, y + r]);\n }\n }\n else if ( // replace bottom\n anchorY &&\n anchorY > h &&\n anchorX > x + safeDistance &&\n anchorX < x + 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 &&\n anchorY < 0 &&\n anchorX > x + safeDistance &&\n anchorX < x + w - 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}\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}\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\nfunction rect(x, y, w, h, options) {\n if (options && 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}\nfunction roundedRect(x, y, w, h, options) {\n var r = (options && options.r) || 0;\n return [\n ['M', x + r, y],\n ['L', x + w - r, y],\n ['C', x + w, y, x + w, y, x + w, y + r],\n ['L', x + w, y + h - r],\n ['C', x + w, y + h, x + w, y + h, x + w - r, y + h],\n ['L', x + r, y + h],\n ['C', x, y + h, x, y + h, x, y + h - r],\n ['L', x, y + r],\n ['C', x, y, x, y, x + r, y] // top-left corner\n ];\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}\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}\nvar Symbols = {\n arc: arc,\n callout: callout,\n circle: circle,\n diamond: diamond,\n rect: rect,\n roundedRect: roundedRect,\n square: rect,\n triangle: triangle,\n 'triangle-down': triangleDown\n};\n/* *\n *\n * Default Export\n *\n * */\nexport default Symbols;\n","/* *\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\n/* *\n *\n * API Options\n *\n * */\n/**\n * General options for all series types.\n *\n * @optionparent plotOptions.series\n */\nvar seriesDefaults = {\n // base series options\n /**\n * The SVG value used for the `stroke-linecap` and `stroke-linejoin`\n * of a line graph. Round means that lines are rounded in the ends and\n * bends.\n *\n * @type {Highcharts.SeriesLinecapValue}\n * @default round\n * @since 3.0.7\n * @apioption plotOptions.line.linecap\n */\n /**\n * Pixel width of the graph line.\n *\n * @see In styled mode, the line stroke-width can be set with the\n * `.highcharts-graph` class name.\n *\n * @sample {highcharts} highcharts/plotoptions/series-linewidth-general/\n * On all series\n * @sample {highcharts} highcharts/plotoptions/series-linewidth-specific/\n * On one single series\n *\n * @product highcharts highstock\n *\n * @private\n */\n lineWidth: 2,\n /**\n * For some series, there is a limit that shuts down animation\n * by default when the total number of points in the chart is too high.\n * For example, for a column chart and its derivatives, animation does\n * not run if there is more than 250 points totally. To disable this\n * cap, set `animationLimit` to `Infinity`. This option works if animation\n * is fired on individual points, not on a group of points like e.g. during\n * the initial animation.\n *\n * @sample {highcharts} highcharts/plotoptions/series-animationlimit/\n * Animation limit on updating individual points\n *\n * @type {number}\n * @apioption plotOptions.series.animationLimit\n */\n /**\n * Allow this series' points to be selected by clicking on the graphic\n * (columns, point markers, pie slices, map areas etc).\n *\n * The selected points can be handled by point select and unselect\n * events, or collectively by the [getSelectedPoints\n * ](/class-reference/Highcharts.Chart#getSelectedPoints) function.\n *\n * And alternative way of selecting points is through dragging.\n *\n * @sample {highcharts} highcharts/plotoptions/series-allowpointselect-line/\n * Line\n * @sample {highcharts} highcharts/plotoptions/series-allowpointselect-column/\n * Column\n * @sample {highcharts} highcharts/plotoptions/series-allowpointselect-pie/\n * Pie\n * @sample {highcharts} highcharts/chart/events-selection-points/\n * Select a range of points through a drag selection\n * @sample {highmaps} maps/plotoptions/series-allowpointselect/\n * Map area\n * @sample {highmaps} maps/plotoptions/mapbubble-allowpointselect/\n * Map bubble\n *\n * @since 1.2.0\n *\n * @private\n */\n allowPointSelect: false,\n /**\n * When true, each point or column edge is rounded to its nearest pixel\n * in order to render sharp on screen. In some cases, when there are a\n * lot of densely packed columns, this leads to visible difference\n * in column widths or distance between columns. In these cases,\n * setting `crisp` to `false` may look better, even though each column\n * is rendered blurry.\n *\n * @sample {highcharts} highcharts/plotoptions/column-crisp-false/\n * Crisp is false\n *\n * @since 5.0.10\n * @product highcharts highstock gantt\n *\n * @private\n */\n crisp: true,\n /**\n * If true, a checkbox is displayed next to the legend item to allow\n * selecting the series. The state of the checkbox is determined by\n * the `selected` option.\n *\n * @productdesc {highmaps}\n * Note that if a `colorAxis` is defined, the color axis is represented\n * in the legend, not the series.\n *\n * @sample {highcharts} highcharts/plotoptions/series-showcheckbox-true/\n * Show select box\n *\n * @since 1.2.0\n *\n * @private\n */\n showCheckbox: false,\n /**\n * Enable or disable the initial animation when a series is displayed.\n * The animation can also be set as a configuration object. Please\n * note that this option only applies to the initial animation of the\n * series itself. For other animations, see [chart.animation](\n * #chart.animation) 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 * - `duration`: The duration of the animation in milliseconds. (Defaults to\n * `1000`)\n *\n * - `easing`: Can be a string reference to an easing function set on\n * the `Math` object or a function. See the _Custom easing function_\n * demo below. (Defaults to `easeInOutSine`)\n *\n * Due to poor performance, animation is disabled in old IE browsers\n * for several chart types.\n *\n * @sample {highcharts} highcharts/plotoptions/series-animation-disabled/\n * Animation disabled\n * @sample {highcharts} highcharts/plotoptions/series-animation-slower/\n * Slower animation\n * @sample {highcharts} highcharts/plotoptions/series-animation-easing/\n * Custom easing function\n * @sample {highstock} stock/plotoptions/animation-slower/\n * Slower animation\n * @sample {highstock} stock/plotoptions/animation-easing/\n * Custom easing function\n * @sample {highmaps} maps/plotoptions/series-animation-true/\n * Animation enabled on map series\n * @sample {highmaps} maps/plotoptions/mapbubble-animation-false/\n * Disabled on mapbubble series\n *\n * @type {boolean|Highcharts.AnimationOptionsObject}\n * @default {highcharts} true\n * @default {highstock} true\n * @default {highmaps} false\n *\n * @private\n */\n animation: {\n /** @ignore-option */\n duration: 1000\n },\n /**\n * An additional class name to apply to the series' graphical elements.\n * This option does not replace default class names of the graphical\n * element. Changes to the series' color will also be reflected in a\n * chart's legend and tooltip.\n *\n * @sample {highcharts} highcharts/css/point-series-classname\n *\n * @type {string}\n * @since 5.0.0\n * @apioption plotOptions.series.className\n */\n /**\n * Disable this option to allow series rendering in the whole plotting\n * area.\n *\n * **Note:** Clipping should be always enabled when\n * [chart.zoomType](#chart.zoomType) is set\n *\n * @sample {highcharts} highcharts/plotoptions/series-clip/\n * Disabled clipping\n *\n * @default true\n * @type {boolean}\n * @since 3.0.0\n * @apioption plotOptions.series.clip\n */\n /**\n * The main color of the series. In line type series it applies to the\n * line and the point markers unless otherwise specified. In bar type\n * series it applies to the bars unless a color is specified per point.\n * The default value is pulled from the `options.colors` array.\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 * @productdesc {highmaps}\n * In maps, the series color is rarely used, as most choropleth maps use\n * the color to denote the value of each point. The series color can\n * however be used in a map with multiple series holding categorized\n * data.\n *\n * @sample {highcharts} highcharts/plotoptions/series-color-general/\n * General plot option\n * @sample {highcharts} highcharts/plotoptions/series-color-specific/\n * One specific series\n * @sample {highcharts} highcharts/plotoptions/series-color-area/\n * Area color\n * @sample {highcharts} highcharts/series/infographic/\n * Pattern fill\n * @sample {highmaps} maps/demo/category-map/\n * Category map by multiple series\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @apioption plotOptions.series.color\n */\n /**\n * Styled mode only. A specific color index to use for the series, so its\n * graphic representations are given the class name `highcharts-color-{n}`.\n *\n * @sample {highcharts} highcharts/css/colorindex/\n * Series and point color index\n *\n * @type {number}\n * @since 5.0.0\n * @apioption plotOptions.series.colorIndex\n */\n /**\n * Whether to connect a graph line across null points, or render a gap\n * between the two points on either side of the null.\n *\n * @sample {highcharts} highcharts/plotoptions/series-connectnulls-false/\n * False by default\n * @sample {highcharts} highcharts/plotoptions/series-connectnulls-true/\n * True\n *\n * @type {boolean}\n * @default false\n * @product highcharts highstock\n * @apioption plotOptions.series.connectNulls\n */\n /**\n * You can set the cursor to \"pointer\" if you have click events attached\n * to the series, to signal to the user that the points and lines can\n * be clicked.\n *\n * In styled mode, the series cursor can be set with the same classes\n * as listed under [series.color](#plotOptions.series.color).\n *\n * @sample {highcharts} highcharts/plotoptions/series-cursor-line/\n * On line graph\n * @sample {highcharts} highcharts/plotoptions/series-cursor-column/\n * On columns\n * @sample {highcharts} highcharts/plotoptions/series-cursor-scatter/\n * On scatter markers\n * @sample {highstock} stock/plotoptions/cursor/\n * Pointer on a line graph\n * @sample {highmaps} maps/plotoptions/series-allowpointselect/\n * Map area\n * @sample {highmaps} maps/plotoptions/mapbubble-allowpointselect/\n * Map bubble\n *\n * @type {string|Highcharts.CursorValue}\n * @apioption plotOptions.series.cursor\n */\n /**\n * A reserved subspace to store options and values for customized\n * functionality. Here you can add additional data for your own event\n * callbacks and formatter callbacks.\n *\n * @sample {highcharts} highcharts/point/custom/\n * Point and series with custom data\n *\n * @type {Highcharts.Dictionary<*>}\n * @apioption plotOptions.series.custom\n */\n /**\n * Name of the dash style to use for the graph, or for some series types\n * the outline of each shape.\n *\n * In styled mode, the\n * [stroke dash-array](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/css/series-dashstyle/)\n * can be set with the same classes as listed under\n * [series.color](#plotOptions.series.color).\n *\n * @sample {highcharts} highcharts/plotoptions/series-dashstyle-all/\n * Possible values demonstrated\n * @sample {highcharts} highcharts/plotoptions/series-dashstyle/\n * Chart suitable for printing in black and white\n * @sample {highstock} highcharts/plotoptions/series-dashstyle-all/\n * Possible values demonstrated\n * @sample {highmaps} highcharts/plotoptions/series-dashstyle-all/\n * Possible values demonstrated\n * @sample {highmaps} maps/plotoptions/series-dashstyle/\n * Dotted borders on a map\n *\n * @type {Highcharts.DashStyleValue}\n * @default Solid\n * @since 2.1\n * @apioption plotOptions.series.dashStyle\n */\n /**\n * A description of the series to add to the screen reader information\n * about the series.\n *\n * @type {string}\n * @since 5.0.0\n * @requires modules/accessibility\n * @apioption plotOptions.series.description\n */\n /**\n * Options for the series data sorting.\n *\n * @type {Highcharts.DataSortingOptionsObject}\n * @since 8.0.0\n * @product highcharts highstock\n * @apioption plotOptions.series.dataSorting\n */\n /**\n * Enable or disable data sorting for the series. Use [xAxis.reversed](\n * #xAxis.reversed) to change the sorting order.\n *\n * @sample {highcharts} highcharts/datasorting/animation/\n * Data sorting in scatter-3d\n * @sample {highcharts} highcharts/datasorting/labels-animation/\n * Axis labels animation\n * @sample {highcharts} highcharts/datasorting/dependent-sorting/\n * Dependent series sorting\n * @sample {highcharts} highcharts/datasorting/independent-sorting/\n * Independent series sorting\n *\n * @type {boolean}\n * @since 8.0.0\n * @apioption plotOptions.series.dataSorting.enabled\n */\n /**\n * Whether to allow matching points by name in an update. If this option\n * is disabled, points will be matched by order.\n *\n * @sample {highcharts} highcharts/datasorting/match-by-name/\n * Enabled match by name\n *\n * @type {boolean}\n * @since 8.0.0\n * @apioption plotOptions.series.dataSorting.matchByName\n */\n /**\n * Determines what data value should be used to sort by.\n *\n * @sample {highcharts} highcharts/datasorting/sort-key/\n * Sort key as `z` value\n *\n * @type {string}\n * @since 8.0.0\n * @default y\n * @apioption plotOptions.series.dataSorting.sortKey\n */\n /**\n * Enable or disable the mouse tracking for a specific series. This\n * includes point tooltips and click events on graphs and points. For\n * large datasets it improves performance.\n *\n * @sample {highcharts} highcharts/plotoptions/series-enablemousetracking-false/\n * No mouse tracking\n * @sample {highmaps} maps/plotoptions/series-enablemousetracking-false/\n * No mouse tracking\n *\n * @type {boolean}\n * @default true\n * @apioption plotOptions.series.enableMouseTracking\n */\n /**\n * Whether to use the Y extremes of the total chart width or only the\n * zoomed area when zooming in on parts of the X axis. By default, the\n * Y axis adjusts to the min and max of the visible data. Cartesian\n * series only.\n *\n * @type {boolean}\n * @default false\n * @since 4.1.6\n * @product highcharts highstock gantt\n * @apioption plotOptions.series.getExtremesFromAll\n */\n /**\n * An array specifying which option maps to which key in the data point\n * array. This makes it convenient to work with unstructured data arrays\n * from different sources.\n *\n * @see [series.data](#series.line.data)\n *\n * @sample {highcharts|highstock} highcharts/series/data-keys/\n * An extended data array with keys\n * @sample {highcharts|highstock} highcharts/series/data-nested-keys/\n * Nested keys used to access object properties\n *\n * @type {Array}\n * @since 4.1.6\n * @apioption plotOptions.series.keys\n */\n /**\n * The line cap used for line ends and line joins on the graph.\n *\n * @sample highcharts/series-line/linecap/\n * Line cap comparison\n *\n * @type {Highcharts.SeriesLinecapValue}\n * @default round\n * @product highcharts highstock\n * @apioption plotOptions.series.linecap\n */\n /**\n * The [id](#series.id) of another series to link to. Additionally,\n * the value can be \":previous\" to link to the previous series. When\n * two series are linked, only the first one appears in the legend.\n * Toggling the visibility of this also toggles the linked series.\n *\n * If master series uses data sorting and linked series does not have\n * its own sorting definition, the linked series will be sorted in the\n * same order as the master one.\n *\n * @sample {highcharts|highstock} highcharts/demo/arearange-line/\n * Linked series\n *\n * @type {string}\n * @since 3.0\n * @product highcharts highstock gantt\n * @apioption plotOptions.series.linkedTo\n */\n /**\n * Options for the corresponding navigator series if `showInNavigator`\n * is `true` for this series. Available options are the same as any\n * series, documented at [plotOptions](#plotOptions.series) and\n * [series](#series).\n *\n * These options are merged with options in [navigator.series](\n * #navigator.series), and will take precedence if the same option is\n * defined both places.\n *\n * @see [navigator.series](#navigator.series)\n *\n * @type {Highcharts.PlotSeriesOptions}\n * @since 5.0.0\n * @product highstock\n * @apioption plotOptions.series.navigatorOptions\n */\n /**\n * The color for the parts of the graph or points that are below the\n * [threshold](#plotOptions.series.threshold). Note that `zones` takes\n * precedence over the negative color. Using `negativeColor` is\n * equivalent to applying a zone with value of 0.\n *\n * @see In styled mode, a negative color is applied by setting this option\n * to `true` combined with the `.highcharts-negative` class name.\n *\n * @sample {highcharts} highcharts/plotoptions/series-negative-color/\n * Spline, area and column\n * @sample {highcharts} highcharts/plotoptions/arearange-negativecolor/\n * Arearange\n * @sample {highcharts} highcharts/css/series-negative-color/\n * Styled mode\n * @sample {highstock} highcharts/plotoptions/series-negative-color/\n * Spline, area and column\n * @sample {highstock} highcharts/plotoptions/arearange-negativecolor/\n * Arearange\n * @sample {highmaps} highcharts/plotoptions/series-negative-color/\n * Spline, area and column\n * @sample {highmaps} highcharts/plotoptions/arearange-negativecolor/\n * Arearange\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 3.0\n * @apioption plotOptions.series.negativeColor\n */\n /**\n * Same as\n * [accessibility.series.descriptionFormatter](#accessibility.series.descriptionFormatter),\n * but for an individual series. Overrides the chart wide configuration.\n *\n * @type {Function}\n * @since 5.0.12\n * @apioption plotOptions.series.pointDescriptionFormatter\n */\n /**\n * If no x values are given for the points in a series, `pointInterval`\n * defines the interval of the x values. For example, if a series\n * contains one value every decade starting from year 0, set\n * `pointInterval` to `10`. In true `datetime` axes, the `pointInterval`\n * is set in milliseconds.\n *\n * It can be also be combined with `pointIntervalUnit` to draw irregular\n * time intervals.\n *\n * If combined with `relativeXValue`, an x value can be set on each\n * point, and the `pointInterval` is added x times to the `pointStart`\n * setting.\n *\n * Please note that this options applies to the _series data_, not the\n * interval of the axis ticks, which is independent.\n *\n * @sample {highcharts} highcharts/plotoptions/series-pointstart-datetime/\n * Datetime X axis\n * @sample {highcharts} highcharts/plotoptions/series-relativexvalue/\n * Relative x value\n * @sample {highstock} stock/plotoptions/pointinterval-pointstart/\n * Using pointStart and pointInterval\n * @sample {highstock} stock/plotoptions/relativexvalue/\n * Relative x value\n *\n * @type {number}\n * @default 1\n * @product highcharts highstock gantt\n * @apioption plotOptions.series.pointInterval\n */\n /**\n * On datetime series, this allows for setting the\n * [pointInterval](#plotOptions.series.pointInterval) to irregular time\n * units, `day`, `month` and `year`. A day is usually the same as 24\n * hours, but `pointIntervalUnit` also takes the DST crossover into\n * consideration when dealing with local time. Combine this option with\n * `pointInterval` to draw weeks, quarters, 6 months, 10 years etc.\n *\n * Please note that this options applies to the _series data_, not the\n * interval of the axis ticks, which is independent.\n *\n * @sample {highcharts} highcharts/plotoptions/series-pointintervalunit/\n * One point a month\n * @sample {highstock} highcharts/plotoptions/series-pointintervalunit/\n * One point a month\n *\n * @type {string}\n * @since 4.1.0\n * @product highcharts highstock gantt\n * @validvalue [\"day\", \"month\", \"year\"]\n * @apioption plotOptions.series.pointIntervalUnit\n */\n /**\n * Possible values: `\"on\"`, `\"between\"`, `number`.\n *\n * In a column chart, when pointPlacement is `\"on\"`, the point will not\n * create any padding of the X axis. In a polar column chart this means\n * that the first column points directly north. If the pointPlacement is\n * `\"between\"`, the columns will be laid out between ticks. This is\n * useful for example for visualising an amount between two points in\n * time or in a certain sector of a polar chart.\n *\n * Since Highcharts 3.0.2, the point placement can also be numeric,\n * where 0 is on the axis value, -0.5 is between this value and the\n * previous, and 0.5 is between this value and the next. Unlike the\n * textual options, numeric point placement options won't affect axis\n * padding.\n *\n * Note that pointPlacement needs a [pointRange](\n * #plotOptions.series.pointRange) to work. For column series this is\n * computed, but for line-type series it needs to be set.\n *\n * For the `xrange` series type and gantt charts, if the Y axis is a\n * category axis, the `pointPlacement` applies to the Y axis rather than\n * the (typically datetime) X axis.\n *\n * Defaults to `undefined` in cartesian charts, `\"between\"` in polar\n * charts.\n *\n * @see [xAxis.tickmarkPlacement](#xAxis.tickmarkPlacement)\n *\n * @sample {highcharts|highstock} highcharts/plotoptions/series-pointplacement-between/\n * Between in a column chart\n * @sample {highcharts|highstock} highcharts/plotoptions/series-pointplacement-numeric/\n * Numeric placement for custom layout\n * @sample {highcharts|highstock} maps/plotoptions/heatmap-pointplacement/\n * Placement in heatmap\n *\n * @type {string|number}\n * @since 2.3.0\n * @product highcharts highstock gantt\n * @apioption plotOptions.series.pointPlacement\n */\n /**\n * If no x values are given for the points in a series, pointStart\n * defines on what value to start. For example, if a series contains one\n * yearly value starting from 1945, set pointStart to 1945.\n *\n * If combined with `relativeXValue`, an x value can be set on each\n * point. The x value from the point options is multiplied by\n * `pointInterval` and added to `pointStart` to produce a modified x\n * value.\n *\n * @sample {highcharts} highcharts/plotoptions/series-pointstart-linear/\n * Linear\n * @sample {highcharts} highcharts/plotoptions/series-pointstart-datetime/\n * Datetime\n * @sample {highcharts} highcharts/plotoptions/series-relativexvalue/\n * Relative x value\n * @sample {highstock} stock/plotoptions/pointinterval-pointstart/\n * Using pointStart and pointInterval\n * @sample {highstock} stock/plotoptions/relativexvalue/\n * Relative x value\n *\n * @type {number}\n * @default 0\n * @product highcharts highstock gantt\n * @apioption plotOptions.series.pointStart\n */\n /**\n * When true, X values in the data set are relative to the current\n * `pointStart`, `pointInterval` and `pointIntervalUnit` settings. This\n * allows compression of the data for datasets with irregular X values.\n *\n * The real X values are computed on the formula `f(x) = ax + b`, where\n * `a` is the `pointInterval` (optionally with a time unit given by\n * `pointIntervalUnit`), and `b` is the `pointStart`.\n *\n * @sample {highcharts} highcharts/plotoptions/series-relativexvalue/\n * Relative X value\n * @sample {highstock} stock/plotoptions/relativexvalue/\n * Relative X value\n *\n * @type {boolean}\n * @default false\n * @product highcharts highstock\n * @apioption plotOptions.series.relativeXValue\n */\n /**\n * Whether to select the series initially. If `showCheckbox` is true,\n * the checkbox next to the series name in the legend will be checked\n * for a selected series.\n *\n * @sample {highcharts} highcharts/plotoptions/series-selected/\n * One out of two series selected\n *\n * @type {boolean}\n * @default false\n * @since 1.2.0\n * @apioption plotOptions.series.selected\n */\n /**\n * Whether to apply a drop shadow to the graph line. Since 2.3 the\n * shadow can be an object configuration containing `color`, `offsetX`,\n * `offsetY`, `opacity` and `width`.\n *\n * @sample {highcharts} highcharts/plotoptions/series-shadow/\n * Shadow enabled\n *\n * @type {boolean|Highcharts.ShadowOptionsObject}\n * @default false\n * @apioption plotOptions.series.shadow\n */\n /**\n * Whether to display this particular series or series type in the\n * legend. Standalone series are shown in legend by default, and linked\n * series are not. Since v7.2.0 it is possible to show series that use\n * colorAxis by setting this option to `true`.\n *\n * @sample {highcharts} highcharts/plotoptions/series-showinlegend/\n * One series in the legend, one hidden\n *\n * @type {boolean}\n * @apioption plotOptions.series.showInLegend\n */\n /**\n * Whether or not to show the series in the navigator. Takes precedence\n * over [navigator.baseSeries](#navigator.baseSeries) if defined.\n *\n * @type {boolean}\n * @since 5.0.0\n * @product highstock\n * @apioption plotOptions.series.showInNavigator\n */\n /**\n * If set to `true`, the accessibility module will skip past the points\n * in this series for keyboard navigation.\n *\n * @type {boolean}\n * @since 5.0.12\n * @apioption plotOptions.series.skipKeyboardNavigation\n */\n /**\n * Whether to stack the values of each series on top of each other.\n * Possible values are `undefined` to disable, `\"normal\"` to stack by\n * value or `\"percent\"`.\n *\n * When stacking is enabled, data must be sorted\n * in ascending X order.\n *\n * Some stacking options are related to specific series types. In the\n * streamgraph series type, the stacking option is set to `\"stream\"`.\n * The second one is `\"overlap\"`, which only applies to waterfall\n * series.\n *\n * @see [yAxis.reversedStacks](#yAxis.reversedStacks)\n *\n * @sample {highcharts} highcharts/plotoptions/series-stacking-line/\n * Line\n * @sample {highcharts} highcharts/plotoptions/series-stacking-column/\n * Column\n * @sample {highcharts} highcharts/plotoptions/series-stacking-bar/\n * Bar\n * @sample {highcharts} highcharts/plotoptions/series-stacking-area/\n * Area\n * @sample {highcharts} highcharts/plotoptions/series-stacking-percent-line/\n * Line\n * @sample {highcharts} highcharts/plotoptions/series-stacking-percent-column/\n * Column\n * @sample {highcharts} highcharts/plotoptions/series-stacking-percent-bar/\n * Bar\n * @sample {highcharts} highcharts/plotoptions/series-stacking-percent-area/\n * Area\n * @sample {highcharts} highcharts/plotoptions/series-waterfall-with-normal-stacking\n * Waterfall with normal stacking\n * @sample {highcharts} highcharts/plotoptions/series-waterfall-with-overlap-stacking\n * Waterfall with overlap stacking\n * @sample {highstock} stock/plotoptions/stacking/\n * Area\n *\n * @type {string}\n * @product highcharts highstock\n * @validvalue [\"normal\", \"overlap\", \"percent\", \"stream\"]\n * @apioption plotOptions.series.stacking\n */\n /**\n * Whether to apply steps to the line. Possible values are `left`,\n * `center` and `right`.\n *\n * @sample {highcharts} highcharts/plotoptions/line-step/\n * Different step line options\n * @sample {highcharts} highcharts/plotoptions/area-step/\n * Stepped, stacked area\n * @sample {highstock} stock/plotoptions/line-step/\n * Step line\n *\n * @type {string}\n * @since 1.2.5\n * @product highcharts highstock\n * @validvalue [\"left\", \"center\", \"right\"]\n * @apioption plotOptions.series.step\n */\n /**\n * The threshold, also called zero level or base level. For line type\n * series this is only used in conjunction with\n * [negativeColor](#plotOptions.series.negativeColor).\n *\n * @see [softThreshold](#plotOptions.series.softThreshold).\n *\n * @type {number|null}\n * @default 0\n * @since 3.0\n * @product highcharts highstock\n * @apioption plotOptions.series.threshold\n */\n /**\n * Set the initial visibility of the series.\n *\n * @sample {highcharts} highcharts/plotoptions/series-visible/\n * Two series, one hidden and one visible\n * @sample {highstock} stock/plotoptions/series-visibility/\n * Hidden series\n *\n * @type {boolean}\n * @default true\n * @apioption plotOptions.series.visible\n */\n /**\n * Defines the Axis on which the zones are applied.\n *\n * @see [zones](#plotOptions.series.zones)\n *\n * @sample {highcharts} highcharts/series/color-zones-zoneaxis-x/\n * Zones on the X-Axis\n * @sample {highstock} highcharts/series/color-zones-zoneaxis-x/\n * Zones on the X-Axis\n *\n * @type {string}\n * @default y\n * @since 4.1.0\n * @product highcharts highstock\n * @apioption plotOptions.series.zoneAxis\n */\n /**\n * General event handlers for the series items. These event hooks can\n * also be attached to the series at run time using the\n * `Highcharts.addEvent` function.\n *\n * @declare Highcharts.SeriesEventsOptionsObject\n *\n * @private\n */\n events: {},\n /**\n * Fires after the series has finished its initial animation, or in case\n * animation is disabled, immediately as the series is displayed.\n *\n * @sample {highcharts} highcharts/plotoptions/series-events-afteranimate/\n * Show label after animate\n * @sample {highstock} highcharts/plotoptions/series-events-afteranimate/\n * Show label after animate\n *\n * @type {Highcharts.SeriesAfterAnimateCallbackFunction}\n * @since 4.0\n * @product highcharts highstock gantt\n * @context Highcharts.Series\n * @apioption plotOptions.series.events.afterAnimate\n */\n /**\n * Fires when the checkbox next to the series' 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\n * found by `event.item`. Return `false` to prevent the default action\n * which is to toggle the select state of the series.\n *\n * @sample {highcharts} highcharts/plotoptions/series-events-checkboxclick/\n * Alert checkbox status\n *\n * @type {Highcharts.SeriesCheckboxClickCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Series\n * @apioption plotOptions.series.events.checkboxClick\n */\n /**\n * Fires when the series is clicked. One parameter, `event`, is passed\n * to the function, containing common event information. Additionally,\n * `event.point` holds a pointer to the nearest point on the graph.\n *\n * @sample {highcharts} highcharts/plotoptions/series-events-click/\n * Alert click info\n * @sample {highstock} stock/plotoptions/series-events-click/\n * Alert click info\n * @sample {highmaps} maps/plotoptions/series-events-click/\n * Display click info in subtitle\n *\n * @type {Highcharts.SeriesClickCallbackFunction}\n * @context Highcharts.Series\n * @apioption plotOptions.series.events.click\n */\n /**\n * Fires when the series is hidden after chart generation time, either\n * by clicking the legend item or by calling `.hide()`.\n *\n * @sample {highcharts} highcharts/plotoptions/series-events-hide/\n * Alert when the series is hidden by clicking the legend item\n *\n * @type {Highcharts.SeriesHideCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Series\n * @apioption plotOptions.series.events.hide\n */\n /**\n * Fires when the legend item belonging to the series is clicked. One\n * parameter, `event`, is passed to the function. The default action\n * is to toggle the visibility of the series. This can be prevented\n * by returning `false` or calling `event.preventDefault()`.\n *\n * @sample {highcharts} highcharts/plotoptions/series-events-legenditemclick/\n * Confirm hiding and showing\n *\n * @type {Highcharts.SeriesLegendItemClickCallbackFunction}\n * @context Highcharts.Series\n * @apioption plotOptions.series.events.legendItemClick\n */\n /**\n * Fires when the mouse leaves the graph. One parameter, `event`, is\n * passed to the function, containing common event information. If the\n * [stickyTracking](#plotOptions.series) option is true, `mouseOut`\n * doesn't happen before the mouse enters another graph or leaves the\n * plot area.\n *\n * @sample {highcharts} highcharts/plotoptions/series-events-mouseover-sticky/\n * With sticky tracking by default\n * @sample {highcharts} highcharts/plotoptions/series-events-mouseover-no-sticky/\n * Without sticky tracking\n *\n * @type {Highcharts.SeriesMouseOutCallbackFunction}\n * @context Highcharts.Series\n * @apioption plotOptions.series.events.mouseOut\n */\n /**\n * Fires when the mouse enters the graph. One parameter, `event`, is\n * passed to the function, containing common event information.\n *\n * @sample {highcharts} highcharts/plotoptions/series-events-mouseover-sticky/\n * With sticky tracking by default\n * @sample {highcharts} highcharts/plotoptions/series-events-mouseover-no-sticky/\n * Without sticky tracking\n *\n * @type {Highcharts.SeriesMouseOverCallbackFunction}\n * @context Highcharts.Series\n * @apioption plotOptions.series.events.mouseOver\n */\n /**\n * Fires when the series is shown after chart generation time, either\n * by clicking the legend item or by calling `.show()`.\n *\n * @sample {highcharts} highcharts/plotoptions/series-events-show/\n * Alert when the series is shown by clicking the legend item.\n *\n * @type {Highcharts.SeriesShowCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Series\n * @apioption plotOptions.series.events.show\n */\n /**\n * Options for the point markers of line and scatter-like series. Properties\n * like `fillColor`, `lineColor` and `lineWidth` define the visual\n * appearance of the markers. The `symbol` option defines the shape. Other\n * series types, like column series, don't have markers, but have visual\n * options on the series level instead.\n *\n * In styled mode, the markers can be styled with the `.highcharts-point`,\n * `.highcharts-point-hover` and `.highcharts-point-select` class names.\n *\n * @declare Highcharts.PointMarkerOptionsObject\n *\n * @sample {highmaps} maps/demo/mappoint-mapmarker\n * Using the mapmarker symbol for points\n *\n * @private\n */\n marker: {\n /**\n * Enable or disable the point marker. If `undefined`, the markers\n * are hidden when the data is dense, and shown for more widespread\n * data points.\n *\n * @sample {highcharts} highcharts/plotoptions/series-marker-enabled/\n * Disabled markers\n * @sample {highcharts} highcharts/plotoptions/series-marker-enabled-false/\n * Disabled in normal state but enabled on hover\n * @sample {highstock} stock/plotoptions/series-marker/\n * Enabled markers\n *\n * @type {boolean}\n * @default {highcharts} undefined\n * @default {highstock} false\n * @apioption plotOptions.series.marker.enabled\n */\n /**\n * The threshold for how dense the point markers should be before\n * they are hidden, given that `enabled` is not defined. The number\n * indicates the horizontal distance between the two closest points\n * in the series, as multiples of the `marker.radius`. In other\n * words, the default value of 2 means points are hidden if\n * overlapping horizontally.\n *\n * @sample highcharts/plotoptions/series-marker-enabledthreshold\n * A higher threshold\n *\n * @since 6.0.5\n */\n enabledThreshold: 2,\n /**\n * The fill color of the point marker. When `undefined`, the series'\n * or point's color is used.\n *\n * @sample {highcharts} highcharts/plotoptions/series-marker-fillcolor/\n * White fill\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @apioption plotOptions.series.marker.fillColor\n */\n /**\n * Image markers only. Set the image width explicitly. When using\n * this option, a `width` must also be set.\n *\n * @sample {highcharts} highcharts/plotoptions/series-marker-width-height/\n * Fixed width and height\n * @sample {highstock} highcharts/plotoptions/series-marker-width-height/\n * Fixed width and height\n *\n * @type {number}\n * @since 4.0.4\n * @apioption plotOptions.series.marker.height\n */\n /**\n * The color of the point marker's outline. When `undefined`, the\n * series' or point's color is used.\n *\n * @sample {highcharts} highcharts/plotoptions/series-marker-fillcolor/\n * Inherit from series color (undefined)\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n lineColor: \"#ffffff\" /* Palette.backgroundColor */,\n /**\n * The width of the point marker's outline.\n *\n * @sample {highcharts} highcharts/plotoptions/series-marker-fillcolor/\n * 2px blue marker\n */\n lineWidth: 0,\n /**\n * The radius of the point marker.\n *\n * @sample {highcharts} highcharts/plotoptions/series-marker-radius/\n * Bigger markers\n *\n * @default {highstock} 2\n * @default {highcharts} 4\n *\n */\n radius: 4,\n /**\n * A predefined shape or symbol for the marker. When undefined, the\n * symbol is pulled from options.symbols. Other possible values are\n * `'circle'`, `'square'`,`'diamond'`, `'triangle'` and\n * `'triangle-down'`.\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 {highcharts} highcharts/plotoptions/series-marker-symbol/\n * Predefined, graphic and custom markers\n * @sample {highstock} highcharts/plotoptions/series-marker-symbol/\n * Predefined, graphic and custom markers\n * @sample {highmaps} maps/demo/mappoint-mapmarker\n * Using the mapmarker symbol for points\n *\n * @type {string}\n * @apioption plotOptions.series.marker.symbol\n */\n /**\n * Image markers only. Set the image width explicitly. When using\n * this option, a `height` must also be set.\n *\n * @sample {highcharts} highcharts/plotoptions/series-marker-width-height/\n * Fixed width and height\n * @sample {highstock} highcharts/plotoptions/series-marker-width-height/\n * Fixed width and height\n *\n * @type {number}\n * @since 4.0.4\n * @apioption plotOptions.series.marker.width\n */\n /**\n * States for a single point marker.\n *\n * @declare Highcharts.PointStatesOptionsObject\n */\n states: {\n /**\n * The normal state of a single point marker. Currently only\n * used for setting animation when returning to normal state\n * from hover.\n *\n * @declare Highcharts.PointStatesNormalOptionsObject\n */\n normal: {\n /**\n * Animation when returning to normal state after hovering.\n *\n * @type {boolean|Partial}\n */\n animation: true\n },\n /**\n * The hover state for a single point marker.\n *\n * @declare Highcharts.PointStatesHoverOptionsObject\n */\n hover: {\n /**\n * Animation when hovering over the marker.\n *\n * @type {boolean|Partial}\n */\n animation: {\n /** @internal */\n duration: 50\n },\n /**\n * Enable or disable the point marker.\n *\n * @sample {highcharts} highcharts/plotoptions/series-marker-states-hover-enabled/\n * Disabled hover state\n */\n enabled: true,\n /**\n * The fill color of the marker in hover state. When\n * `undefined`, the series' or point's fillColor for normal\n * state is used.\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @apioption plotOptions.series.marker.states.hover.fillColor\n */\n /**\n * The color of the point marker's outline. When\n * `undefined`, the series' or point's lineColor for normal\n * state is used.\n *\n * @sample {highcharts} highcharts/plotoptions/series-marker-states-hover-linecolor/\n * White fill color, black line color\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @apioption plotOptions.series.marker.states.hover.lineColor\n */\n /**\n * The width of the point marker's outline. When\n * `undefined`, the series' or point's lineWidth for normal\n * state is used.\n *\n * @sample {highcharts} highcharts/plotoptions/series-marker-states-hover-linewidth/\n * 3px line width\n *\n * @type {number}\n * @apioption plotOptions.series.marker.states.hover.lineWidth\n */\n /**\n * The radius of the point marker. In hover state, it\n * defaults to the normal state's radius + 2 as per the\n * [radiusPlus](#plotOptions.series.marker.states.hover.radiusPlus)\n * option.\n *\n * @sample {highcharts} highcharts/plotoptions/series-marker-states-hover-radius/\n * 10px radius\n *\n * @type {number}\n * @apioption plotOptions.series.marker.states.hover.radius\n */\n /**\n * The number of pixels to increase the radius of the\n * hovered point.\n *\n * @sample {highcharts} highcharts/plotoptions/series-states-hover-linewidthplus/\n * 5 pixels greater radius on hover\n * @sample {highstock} highcharts/plotoptions/series-states-hover-linewidthplus/\n * 5 pixels greater radius on hover\n *\n * @since 4.0.3\n */\n radiusPlus: 2,\n /**\n * The additional line width for a hovered point.\n *\n * @sample {highcharts} highcharts/plotoptions/series-states-hover-linewidthplus/\n * 2 pixels wider on hover\n * @sample {highstock} highcharts/plotoptions/series-states-hover-linewidthplus/\n * 2 pixels wider on hover\n *\n * @since 4.0.3\n */\n lineWidthPlus: 1\n },\n /**\n * The appearance of the point marker when selected. In order to\n * allow a point to be selected, set the\n * `series.allowPointSelect` option to true.\n *\n * @declare Highcharts.PointStatesSelectOptionsObject\n */\n select: {\n /**\n * Enable or disable visible feedback for selection.\n *\n * @sample {highcharts} highcharts/plotoptions/series-marker-states-select-enabled/\n * Disabled select state\n *\n * @type {boolean}\n * @default true\n * @apioption plotOptions.series.marker.states.select.enabled\n */\n /**\n * The radius of the point marker. In hover state, it\n * defaults to the normal state's radius + 2.\n *\n * @sample {highcharts} highcharts/plotoptions/series-marker-states-select-radius/\n * 10px radius for selected points\n *\n * @type {number}\n * @apioption plotOptions.series.marker.states.select.radius\n */\n /**\n * The fill color of the point marker.\n *\n * @sample {highcharts} highcharts/plotoptions/series-marker-states-select-fillcolor/\n * Solid red discs for selected points\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n fillColor: \"#cccccc\" /* Palette.neutralColor20 */,\n /**\n * The color of the point marker's outline. When\n * `undefined`, the series' or point's color is used.\n *\n * @sample {highcharts} highcharts/plotoptions/series-marker-states-select-linecolor/\n * Red line color for selected points\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n lineColor: \"#000000\" /* Palette.neutralColor100 */,\n /**\n * The width of the point marker's outline.\n *\n * @sample {highcharts} highcharts/plotoptions/series-marker-states-select-linewidth/\n * 3px line width for selected points\n */\n lineWidth: 2\n }\n }\n },\n /**\n * Properties for each single point.\n *\n * @declare Highcharts.PlotSeriesPointOptions\n *\n * @private\n */\n point: {\n /**\n * Fires when a point is clicked. One parameter, `event`, is passed\n * to the function, containing common event information.\n *\n * If the `series.allowPointSelect` option is true, the default\n * action for the point's click event is to toggle the point's\n * select state. Returning `false` cancels this action.\n *\n * @sample {highcharts} highcharts/plotoptions/series-point-events-click/\n * Click marker to alert values\n * @sample {highcharts} highcharts/plotoptions/series-point-events-click-column/\n * Click column\n * @sample {highcharts} highcharts/plotoptions/series-point-events-click-url/\n * Go to URL\n * @sample {highmaps} maps/plotoptions/series-point-events-click/\n * Click marker to display values\n * @sample {highmaps} maps/plotoptions/series-point-events-click-url/\n * Go to URL\n *\n * @type {Highcharts.PointClickCallbackFunction}\n * @context Highcharts.Point\n * @apioption plotOptions.series.point.events.click\n */\n /**\n * Fires when the mouse leaves the area close to the point. One\n * parameter, `event`, is passed to the function, containing common\n * event information.\n *\n * @sample {highcharts} highcharts/plotoptions/series-point-events-mouseover/\n * Show values in the chart's corner on mouse over\n *\n * @type {Highcharts.PointMouseOutCallbackFunction}\n * @context Highcharts.Point\n * @apioption plotOptions.series.point.events.mouseOut\n */\n /**\n * Fires when the mouse enters the area close to the point. One\n * parameter, `event`, is passed to the function, containing common\n * event information.\n *\n * Returning `false` cancels the default behavior, which is to show a\n * tooltip for the point.\n *\n * @sample {highcharts} highcharts/plotoptions/series-point-events-mouseover/\n * Show values in the chart's corner on mouse over\n *\n * @type {Highcharts.PointMouseOverCallbackFunction}\n * @context Highcharts.Point\n * @apioption plotOptions.series.point.events.mouseOver\n */\n /**\n * Fires when the point is removed using the `.remove()` method. One\n * parameter, `event`, is passed to the function. Returning `false`\n * cancels the operation.\n *\n * @sample {highcharts} highcharts/plotoptions/series-point-events-remove/\n * Remove point and confirm\n *\n * @type {Highcharts.PointRemoveCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Point\n * @apioption plotOptions.series.point.events.remove\n */\n /**\n * Fires when the point is selected either programmatically or\n * following a click on the point. One parameter, `event`, is passed\n * to the function. Returning `false` cancels the operation.\n *\n * @sample {highcharts} highcharts/plotoptions/series-point-events-select/\n * Report the last selected point\n * @sample {highmaps} maps/plotoptions/series-allowpointselect/\n * Report select and unselect\n *\n * @type {Highcharts.PointSelectCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Point\n * @apioption plotOptions.series.point.events.select\n */\n /**\n * Fires when the point is unselected either programmatically or\n * following a click on the point. One parameter, `event`, is passed\n * to the function.\n * Returning `false` cancels the operation.\n *\n * @sample {highcharts} highcharts/plotoptions/series-point-events-unselect/\n * Report the last unselected point\n * @sample {highmaps} maps/plotoptions/series-allowpointselect/\n * Report select and unselect\n *\n * @type {Highcharts.PointUnselectCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Point\n * @apioption plotOptions.series.point.events.unselect\n */\n /**\n * Fires when the point is updated programmatically through the\n * `.update()` method. One parameter, `event`, is passed to the\n * function. The new point options can be accessed through\n * `event.options`. Returning `false` cancels the operation.\n *\n * @sample {highcharts} highcharts/plotoptions/series-point-events-update/\n * Confirm point updating\n *\n * @type {Highcharts.PointUpdateCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Point\n * @apioption plotOptions.series.point.events.update\n */\n /**\n * Events for each single point.\n *\n * @declare Highcharts.PointEventsOptionsObject\n */\n events: {}\n },\n /**\n * Options for the series data labels, appearing next to each data\n * point.\n *\n * Since v6.2.0, multiple data labels can be applied to each single\n * point by defining them as an array of configs.\n *\n * In styled mode, the data labels can be styled with the\n * `.highcharts-data-label-box` and `.highcharts-data-label` class names\n * ([see example](https://www.highcharts.com/samples/highcharts/css/series-datalabels)).\n *\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-enabled\n * Data labels enabled\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-multiple\n * Multiple data labels on a bar series\n * @sample {highcharts} highcharts/css/series-datalabels\n * Styled mode example\n * @sample {highmaps} maps/demo/color-axis\n * Choropleth map with data labels\n * @sample {highmaps} maps/demo/mappoint-datalabels-mapmarker\n * Using data labels as map markers\n *\n * @type {*|Array<*>}\n * @product highcharts highstock highmaps gantt\n *\n * @private\n */\n dataLabels: {\n /**\n * Enable or disable the initial animation when a series is displayed\n * for the `dataLabels`. The animation can also be set as a\n * configuration object. Please note that this option only applies to\n * the initial animation.\n *\n * For other animations, see [chart.animation](#chart.animation) and the\n * animation parameter under the API methods. The following properties\n * are supported:\n *\n * - `defer`: The animation delay time in milliseconds.\n *\n * @sample {highcharts} highcharts/plotoptions/animation-defer/\n * Animation defer settings\n *\n * @type {boolean|Partial}\n * @since 8.2.0\n * @apioption plotOptions.series.dataLabels.animation\n */\n animation: {},\n /**\n * The animation delay time in milliseconds. Set to `0` to render the\n * data labels immediately. As `undefined` inherits defer time from the\n * [series.animation.defer](#plotOptions.series.animation.defer).\n *\n * @type {number}\n * @since 8.2.0\n * @apioption plotOptions.series.dataLabels.animation.defer\n */\n /**\n * The alignment of the data label compared to the point. If `right`,\n * the right side of the label should be touching the point. For points\n * with an extent, like columns, the alignments also dictates how to\n * align it inside the box, as given with the\n * [inside](#plotOptions.column.dataLabels.inside) option. Can be one of\n * `left`, `center` or `right`.\n *\n * @sample {highcharts}\n * highcharts/plotoptions/series-datalabels-align-left/ Left\n * aligned\n * @sample {highcharts}\n * highcharts/plotoptions/bar-datalabels-align-inside-bar/ Data\n * labels inside the bar\n *\n * @type {Highcharts.AlignValue|null}\n */\n align: 'center',\n /**\n * Whether to allow data labels to overlap. To make the labels less\n * sensitive for overlapping, the\n * [dataLabels.padding](#plotOptions.series.dataLabels.padding)\n * can be set to 0.\n *\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-allowoverlap-false/\n * Don't allow overlap\n *\n * @type {boolean}\n * @default false\n * @since 4.1.0\n * @apioption plotOptions.series.dataLabels.allowOverlap\n */\n /**\n * The background color or gradient for the data label. Setting it to\n * `auto` will use the point's color.\n *\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-box/\n * Data labels box options\n * @sample {highmaps} maps/plotoptions/series-datalabels-box/\n * Data labels box options\n * @sample {highmaps} maps/demo/mappoint-datalabels-mapmarker\n * Data labels as map markers\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 2.2.1\n * @apioption plotOptions.series.dataLabels.backgroundColor\n */\n /**\n * The border color for the data label. Setting it to `auto` will use\n * the point's color. Defaults to `undefined`.\n *\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-box/\n * Data labels box options\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 2.2.1\n * @apioption plotOptions.series.dataLabels.borderColor\n */\n /**\n * The border radius in pixels for the data label.\n *\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-box/\n * Data labels box options\n * @sample {highmaps} maps/plotoptions/series-datalabels-box/\n * Data labels box options\n *\n * @type {number}\n * @default 0\n * @since 2.2.1\n * @apioption plotOptions.series.dataLabels.borderRadius\n */\n /**\n * The border width in pixels for the data label.\n *\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-box/\n * Data labels box options\n *\n * @type {number}\n * @default 0\n * @since 2.2.1\n * @apioption plotOptions.series.dataLabels.borderWidth\n */\n borderWidth: 0,\n /**\n * A class name for the data label. Particularly in styled mode,\n * this can be used to give each series' or point's data label\n * unique styling. In addition to this option, a default color class\n * name is added so that we can give the labels a contrast text\n * shadow.\n *\n * @sample {highcharts} highcharts/css/data-label-contrast/\n * Contrast text shadow\n * @sample {highcharts} highcharts/css/series-datalabels/\n * Styling by CSS\n *\n * @type {string}\n * @since 5.0.0\n * @apioption plotOptions.series.dataLabels.className\n */\n /**\n * This options is deprecated.\n * Use [style.color](#plotOptions.series.dataLabels.style) instead.\n *\n * The text color for the data labels. Defaults to `undefined`. For\n * certain series types, like column or map, the data labels can be\n * drawn inside the points. In this case the data label will be\n * drawn with maximum contrast by default. Additionally, it will be\n * given a `text-outline` style with the opposite color, to further\n * increase the contrast. This can be overridden by setting the\n * `text-outline` style to `none` in the `dataLabels.style` option.\n *\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-color/\n * Red data labels\n * @sample {highmaps} maps/demo/color-axis/\n * White data labels\n *\n * @see [style.color](#plotOptions.series.dataLabels.style)\n *\n * @type {Highcharts.ColorType}\n * @deprecated 10.3\n * @apioption plotOptions.series.dataLabels.color\n */\n /**\n * Whether to hide data labels that are outside the plot area. By\n * default, the data label is moved inside the plot area according\n * to the\n * [overflow](#plotOptions.series.dataLabels.overflow)\n * option.\n *\n * @type {boolean}\n * @default true\n * @since 2.3.3\n * @apioption plotOptions.series.dataLabels.crop\n */\n /**\n * Whether to defer displaying the data labels until the initial\n * series animation has finished. Setting to `false` renders the\n * data label immediately. If set to `true` inherits the defer\n * time set in [plotOptions.series.animation](#plotOptions.series.animation).\n * If set to a number, a defer time is specified in milliseconds.\n *\n * @sample highcharts/plotoptions/animation-defer\n * Set defer time\n *\n * @since 4.0.0\n * @type {boolean|number}\n * @product highcharts highstock gantt\n */\n defer: true,\n /**\n * Enable or disable the data labels.\n *\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-enabled/\n * Data labels enabled\n * @sample {highmaps} maps/demo/color-axis/\n * Data labels enabled\n *\n * @type {boolean}\n * @default false\n * @apioption plotOptions.series.dataLabels.enabled\n */\n /**\n * A declarative filter to control of which data labels to display.\n * The declarative filter is designed for use when callback\n * functions are not available, like when the chart options require\n * a pure JSON structure or for use with graphical editors. For\n * programmatic control, use the `formatter` instead, and return\n * `undefined` to disable a single data label.\n *\n * @example\n * filter: {\n * property: 'percentage',\n * operator: '>',\n * value: 4\n * }\n *\n * @sample {highcharts} highcharts/demo/pie-monochrome\n * Data labels filtered by percentage\n *\n * @declare Highcharts.DataLabelsFilterOptionsObject\n * @since 6.0.3\n * @apioption plotOptions.series.dataLabels.filter\n */\n /**\n * The operator to compare by. Can be one of `>`, `<`, `>=`, `<=`,\n * `==`, and `===`.\n *\n * @type {string}\n * @validvalue [\">\", \"<\", \">=\", \"<=\", \"==\", \"===\"]\n * @apioption plotOptions.series.dataLabels.filter.operator\n */\n /**\n * The point property to filter by. Point options are passed\n * directly to properties, additionally there are `y` value,\n * `percentage` and others listed under {@link Highcharts.Point}\n * members.\n *\n * @type {string}\n * @apioption plotOptions.series.dataLabels.filter.property\n */\n /**\n * The value to compare against.\n *\n * @type {number}\n * @apioption plotOptions.series.dataLabels.filter.value\n */\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 * @sample {highmaps} maps/plotoptions/series-datalabels-format/\n * Formatted value in the data label\n *\n * @type {string}\n * @default y\n * @default point.value\n * @since 3.0\n * @apioption plotOptions.series.dataLabels.format\n */\n // eslint-disable-next-line valid-jsdoc\n /**\n * Callback JavaScript function to format the data label. Note that if a\n * `format` is defined, the format takes precedence and the formatter is\n * ignored.\n *\n * @sample {highmaps} maps/plotoptions/series-datalabels-format/\n * Formatted value\n *\n * @type {Highcharts.DataLabelsFormatterCallbackFunction}\n */\n formatter: function () {\n var numberFormatter = this.series.chart.numberFormatter;\n return typeof this.y !== 'number' ?\n '' : numberFormatter(this.y, -1);\n },\n /**\n * For points with an extent, like columns or map areas, whether to\n * align the data label inside the box or to the actual value point.\n * Defaults to `false` in most cases, `true` in stacked columns.\n *\n * @type {boolean}\n * @since 3.0\n * @apioption plotOptions.series.dataLabels.inside\n */\n /**\n * Format for points with the value of null. Works analogously to\n * [format](#plotOptions.series.dataLabels.format). `nullFormat` can\n * be applied only to series which support displaying null points\n * i.e `heatmap` or `tilemap`. Does not work with series that don't\n * display null points, like `line`, `column`, `bar` or `pie`.\n *\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-nullformat/\n * Format data label for null points in heat map\n *\n * @type {boolean|string}\n * @since 7.1.0\n * @apioption plotOptions.series.dataLabels.nullFormat\n */\n /**\n * Callback JavaScript function that defines formatting for points\n * with the value of null. Works analogously to\n * [formatter](#plotOptions.series.dataLabels.formatter).\n * `nullFormatter` can be applied only to series which support\n * displaying null points i.e `heatmap` or `tilemap`. Does not work\n * with series that don't display null points, like `line`, `column`,\n * `bar` or `pie`.\n *\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-nullformat/\n * Format data label for null points in heat map\n *\n * @type {Highcharts.DataLabelsFormatterCallbackFunction}\n * @since 7.1.0\n * @apioption plotOptions.series.dataLabels.nullFormatter\n */\n /**\n * How to handle data labels that flow outside the plot area. The\n * default is `\"justify\"`, which aligns them inside the plot area.\n * For columns and bars, this means it will be moved inside the bar.\n * To display data labels outside the plot area, set `crop` to\n * `false` and `overflow` to `\"allow\"`.\n *\n * @type {Highcharts.DataLabelsOverflowValue}\n * @default justify\n * @since 3.0.6\n * @apioption plotOptions.series.dataLabels.overflow\n */\n /**\n * When either the `borderWidth` or the `backgroundColor` is set,\n * this is the padding within the box.\n *\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-box/\n * Data labels box options\n * @sample {highmaps} maps/plotoptions/series-datalabels-box/\n * Data labels box options\n *\n * @since 2.2.1\n */\n padding: 5,\n /**\n * Aligns data labels relative to points. If `center` alignment is\n * not possible, it defaults to `right`.\n *\n * @type {Highcharts.AlignValue}\n * @default center\n * @apioption plotOptions.series.dataLabels.position\n */\n /**\n * Text rotation in degrees. Note that due to a more complex\n * structure, backgrounds, borders and padding will be lost on a\n * rotated data label.\n *\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-rotation/\n * Vertical labels\n *\n * @type {number}\n * @default 0\n * @apioption plotOptions.series.dataLabels.rotation\n */\n /**\n * The shadow of the box. Works best with `borderWidth` or\n * `backgroundColor`. Since 2.3 the shadow can be an object\n * configuration containing `color`, `offsetX`, `offsetY`, `opacity`\n * and `width`.\n *\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-box/\n * Data labels box options\n *\n * @type {boolean|Highcharts.ShadowOptionsObject}\n * @default false\n * @since 2.2.1\n * @apioption plotOptions.series.dataLabels.shadow\n */\n /**\n * The name of a symbol to use for the border around the label.\n * Symbols are predefined functions on the Renderer object.\n *\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-shape/\n * A callout for annotations\n *\n * @type {string}\n * @default square\n * @since 4.1.2\n * @apioption plotOptions.series.dataLabels.shape\n */\n /**\n * Styles for the label. The default `color` setting is\n * `\"contrast\"`, which is a pseudo color that Highcharts picks up\n * and applies the maximum contrast to the underlying point item,\n * for example the bar in a bar chart.\n *\n * The `textOutline` is a pseudo property that applies an outline of\n * the given width with the given color, which by default is the\n * maximum contrast to the text. So a bright text color will result\n * in a black text outline for maximum readability on a mixed\n * background. In some cases, especially with grayscale text, the\n * text outline doesn't work well, in which cases it can be disabled\n * by setting it to `\"none\"`. When `useHTML` is true, the\n * `textOutline` will not be picked up. In this, case, the same\n * effect can be acheived through the `text-shadow` CSS property.\n *\n * For some series types, where each point has an extent, like for\n * example tree maps, the data label may overflow the point. There\n * are two strategies for handling overflow. By default, the text\n * will wrap to multiple lines. The other strategy is to set\n * `style.textOverflow` to `ellipsis`, which will keep the text on\n * one line plus it will break inside long words.\n *\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-style/\n * Bold labels\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-overflow/\n * Long labels truncated with an ellipsis in a pie\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-overflow-wrap/\n * Long labels are wrapped in a pie\n * @sample {highmaps} maps/demo/color-axis/\n * Bold labels\n *\n * @type {Highcharts.CSSObject}\n * @since 4.1.0\n * @apioption plotOptions.series.dataLabels.style\n */\n style: {\n /** @internal */\n fontSize: '11px',\n /** @internal */\n fontWeight: 'bold',\n /** @internal */\n color: 'contrast',\n /** @internal */\n textOutline: '1px contrast'\n },\n /**\n * Options for a label text which should follow marker's shape.\n * Border and background are disabled for a label that follows a\n * path.\n *\n * **Note:** Only SVG-based renderer supports this option. Setting\n * `useHTML` to true will disable this option.\n *\n * @declare Highcharts.DataLabelsTextPathOptionsObject\n * @since 7.1.0\n * @apioption plotOptions.series.dataLabels.textPath\n */\n /**\n * Presentation attributes for the text path.\n *\n * @type {Highcharts.SVGAttributes}\n * @since 7.1.0\n * @apioption plotOptions.series.dataLabels.textPath.attributes\n */\n /**\n * Enable or disable `textPath` option for link's or marker's data\n * labels.\n *\n * @type {boolean}\n * @since 7.1.0\n * @apioption plotOptions.series.dataLabels.textPath.enabled\n */\n /**\n * Whether to\n * [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 * @apioption plotOptions.series.dataLabels.useHTML\n */\n /**\n * The vertical alignment of a data label. Can be one of `top`,\n * `middle` or `bottom`. The default value depends on the data, for\n * instance in a column chart, the label is above positive values\n * and below negative values.\n *\n * @type {Highcharts.VerticalAlignValue|null}\n * @since 2.3.3\n */\n verticalAlign: 'bottom',\n /**\n * The x position offset of the label relative to the point in\n * pixels.\n *\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-rotation/\n * Vertical and positioned\n * @sample {highcharts} highcharts/plotoptions/bar-datalabels-align-inside-bar/\n * Data labels inside the bar\n */\n x: 0,\n /**\n * The z index of the data labels. Use a `zIndex` of 6 to display it above\n * the series, or use a `zIndex` of 2 to display it behind the series.\n *\n * @type {number}\n * @default 6\n * @since 2.3.5\n * @apioption plotOptions.series.dataLabels.zIndex\n */\n /**\n * The y position offset of the label relative to the point in\n * pixels.\n *\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-rotation/\n * Vertical and positioned\n */\n y: 0\n },\n /**\n * When the series contains less points than the crop threshold, all\n * points are drawn, even if the points fall outside the visible plot\n * area at the current zoom. The advantage of drawing all points\n * (including markers and columns), is that animation is performed on\n * updates. On the other hand, when the series contains more points than\n * the crop threshold, the series data is cropped to only contain points\n * that fall within the plot area. The advantage of cropping away\n * invisible points is to increase performance on large series.\n *\n * @since 2.2\n * @product highcharts highstock\n *\n * @private\n */\n cropThreshold: 300,\n /**\n * Opacity of a series parts: line, fill (e.g. area) and dataLabels.\n *\n * @see [states.inactive.opacity](#plotOptions.series.states.inactive.opacity)\n *\n * @since 7.1.0\n *\n * @private\n */\n opacity: 1,\n /**\n * The width of each point on the x axis. For example in a column chart\n * with one value each day, the pointRange would be 1 day (= 24 * 3600\n * * 1000 milliseconds). This is normally computed automatically, but\n * this option can be used to override the automatic value.\n *\n * @product highstock\n *\n * @private\n */\n pointRange: 0,\n /**\n * When this is true, the series will not cause the Y axis to cross\n * the zero plane (or [threshold](#plotOptions.series.threshold) option)\n * unless the data actually crosses the plane.\n *\n * For example, if `softThreshold` is `false`, a series of 0, 1, 2,\n * 3 will make the Y axis show negative values according to the\n * `minPadding` option. If `softThreshold` is `true`, the Y axis starts\n * at 0.\n *\n * @since 4.1.9\n * @product highcharts highstock\n *\n * @private\n */\n softThreshold: true,\n /**\n * @declare Highcharts.SeriesStatesOptionsObject\n *\n * @private\n */\n states: {\n /**\n * The normal state of a series, or for point items in column, pie\n * and similar series. Currently only used for setting animation\n * when returning to normal state from hover.\n *\n * @declare Highcharts.SeriesStatesNormalOptionsObject\n */\n normal: {\n /**\n * Animation when returning to normal state after hovering.\n *\n * @type {boolean|Partial}\n */\n animation: true\n },\n /**\n * Options for the hovered series. These settings override the\n * normal state options when a series is moused over or touched.\n *\n * @declare Highcharts.SeriesStatesHoverOptionsObject\n */\n hover: {\n /**\n * Enable separate styles for the hovered series to visualize\n * that the user hovers either the series itself or the legend.\n *\n * @sample {highcharts} highcharts/plotoptions/series-states-hover-enabled/\n * Line\n * @sample {highcharts} highcharts/plotoptions/series-states-hover-enabled-column/\n * Column\n * @sample {highcharts} highcharts/plotoptions/series-states-hover-enabled-pie/\n * Pie\n *\n * @type {boolean}\n * @default true\n * @since 1.2\n * @apioption plotOptions.series.states.hover.enabled\n */\n /**\n * Animation setting for hovering the graph in line-type series.\n *\n * @type {boolean|Partial}\n * @since 5.0.8\n * @product highcharts highstock\n */\n animation: {\n /**\n * The duration of the hover animation in milliseconds. By\n * default the hover state animates quickly in, and slowly\n * back to normal.\n *\n * @internal\n */\n duration: 50\n },\n /**\n * Pixel width of the graph line. By default this property is\n * undefined, and the `lineWidthPlus` property dictates how much\n * to increase the linewidth from normal state.\n *\n * @sample {highcharts} highcharts/plotoptions/series-states-hover-linewidth/\n * 5px line on hover\n *\n * @type {number}\n * @product highcharts highstock\n * @apioption plotOptions.series.states.hover.lineWidth\n */\n /**\n * The additional line width for the graph of a hovered series.\n *\n * @sample {highcharts} highcharts/plotoptions/series-states-hover-linewidthplus/\n * 5 pixels wider\n * @sample {highstock} highcharts/plotoptions/series-states-hover-linewidthplus/\n * 5 pixels wider\n *\n * @since 4.0.3\n * @product highcharts highstock\n */\n lineWidthPlus: 1,\n /**\n * In Highcharts 1.0, the appearance of all markers belonging\n * to the hovered series. For settings on the hover state of the\n * individual point, see\n * [marker.states.hover](#plotOptions.series.marker.states.hover).\n *\n * @deprecated\n *\n * @extends plotOptions.series.marker\n * @excluding states, symbol\n * @product highcharts highstock\n */\n marker: {\n // lineWidth: base + 1,\n // radius: base + 1\n },\n /**\n * Options for the halo appearing around the hovered point in\n * line-type series as well as outside the hovered slice in pie\n * charts. By default the halo is filled by the current point or\n * series color with an opacity of 0.25\\. The halo can be\n * disabled by setting the `halo` option to `null`.\n *\n * In styled mode, the halo is styled with the\n * `.highcharts-halo` class, with colors inherited from\n * `.highcharts-color-{n}`.\n *\n * @sample {highcharts} highcharts/plotoptions/halo/\n * Halo options\n * @sample {highstock} highcharts/plotoptions/halo/\n * Halo options\n *\n * @declare Highcharts.SeriesStatesHoverHaloOptionsObject\n * @type {null|*}\n * @since 4.0\n * @product highcharts highstock\n */\n halo: {\n /**\n * A collection of SVG attributes to override the appearance\n * of the halo, for example `fill`, `stroke` and\n * `stroke-width`.\n *\n * @type {Highcharts.SVGAttributes}\n * @since 4.0\n * @product highcharts highstock\n * @apioption plotOptions.series.states.hover.halo.attributes\n */\n /**\n * The pixel size of the halo. For point markers this is the\n * radius of the halo. For pie slices it is the width of the\n * halo outside the slice. For bubbles it defaults to 5 and\n * is the width of the halo outside the bubble.\n *\n * @since 4.0\n * @product highcharts highstock\n */\n size: 10,\n /**\n * Opacity for the halo unless a specific fill is overridden\n * using the `attributes` setting. Note that Highcharts is\n * only able to apply opacity to colors of hex or rgb(a)\n * formats.\n *\n * @since 4.0\n * @product highcharts highstock\n */\n opacity: 0.25\n }\n },\n /**\n * Specific options for point in selected states, after being\n * selected by\n * [allowPointSelect](#plotOptions.series.allowPointSelect)\n * or programmatically.\n *\n * @sample maps/plotoptions/series-allowpointselect/\n * Allow point select demo\n *\n * @declare Highcharts.SeriesStatesSelectOptionsObject\n * @extends plotOptions.series.states.hover\n * @excluding brightness\n */\n select: {\n animation: {\n /** @internal */\n duration: 0\n }\n },\n /**\n * The opposite state of a hover for series.\n *\n * @sample highcharts/plotoptions/series-states-inactive-disabled\n * Disabled inactive state\n *\n * @declare Highcharts.SeriesStatesInactiveOptionsObject\n */\n inactive: {\n /**\n * Enable or disable the inactive state for a series\n *\n * @sample highcharts/plotoptions/series-states-inactive-disabled\n * Disabled inactive state\n *\n * @type {boolean}\n * @default true\n * @apioption plotOptions.series.states.inactive.enabled\n */\n /**\n * The animation for entering the inactive state.\n *\n * @type {boolean|Partial}\n */\n animation: {\n /** @internal */\n duration: 50\n },\n /**\n * Opacity of series elements (dataLabels, line, area).\n *\n * @type {number}\n */\n opacity: 0.2\n }\n },\n /**\n * Sticky tracking of mouse events. When true, the `mouseOut` event on a\n * series isn't triggered until the mouse moves over another series, or\n * out of the plot area. When false, the `mouseOut` event on a series is\n * triggered when the mouse leaves the area around the series' graph or\n * markers. This also implies the tooltip when not shared. When\n * `stickyTracking` is false and `tooltip.shared` is false, the tooltip\n * will be hidden when moving the mouse between series. Defaults to true\n * for line and area type series, but to false for columns, pies etc.\n *\n * **Note:** The boost module will force this option because of\n * technical limitations.\n *\n * @sample {highcharts} highcharts/plotoptions/series-stickytracking-true/\n * True by default\n * @sample {highcharts} highcharts/plotoptions/series-stickytracking-false/\n * False\n *\n * @default {highcharts} true\n * @default {highstock} true\n * @default {highmaps} false\n * @since 2.0\n *\n * @private\n */\n stickyTracking: true,\n /**\n * A configuration object for the tooltip rendering of each single\n * series. Properties are inherited from [tooltip](#tooltip), but only\n * the following properties can be defined on a series level.\n *\n * @declare Highcharts.SeriesTooltipOptionsObject\n * @since 2.3\n * @extends tooltip\n * @excluding animation, backgroundColor, borderColor, borderRadius,\n * borderWidth, className, crosshairs, enabled, formatter,\n * headerShape, hideDelay, outside, padding, positioner,\n * shadow, shape, shared, snap, split, stickOnContact,\n * style, useHTML\n * @apioption plotOptions.series.tooltip\n */\n /**\n * When a series contains a data array that is longer than this, only\n * one dimensional arrays of numbers, or two dimensional arrays with\n * x and y values are allowed. Also, only the first point is tested,\n * and the rest are assumed to be the same format. This saves expensive\n * data checking and indexing in long series. Set it to `0` disable.\n *\n * Note:\n * In boost mode turbo threshold is forced. Only array of numbers or\n * two dimensional arrays are allowed.\n *\n * @since 2.2\n * @product highcharts highstock gantt\n *\n * @private\n */\n turboThreshold: 1000,\n /**\n * An array defining zones within a series. Zones can be applied to the\n * X axis, Y axis or Z axis for bubbles, according to the `zoneAxis`\n * option. The zone definitions have to be in ascending order regarding\n * to the value.\n *\n * In styled mode, the color zones are styled with the\n * `.highcharts-zone-{n}` class, or custom classed from the `className`\n * option\n * ([view live demo](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/css/color-zones/)).\n *\n * @see [zoneAxis](#plotOptions.series.zoneAxis)\n *\n * @sample {highcharts} highcharts/series/color-zones-simple/\n * Color zones\n * @sample {highstock} highcharts/series/color-zones-simple/\n * Color zones\n *\n * @declare Highcharts.SeriesZonesOptionsObject\n * @type {Array<*>}\n * @since 4.1.0\n * @product highcharts highstock\n * @apioption plotOptions.series.zones\n */\n /**\n * Styled mode only. A custom class name for the zone.\n *\n * @sample highcharts/css/color-zones/\n * Zones styled by class name\n *\n * @type {string}\n * @since 5.0.0\n * @apioption plotOptions.series.zones.className\n */\n /**\n * Defines the color of the series.\n *\n * @see [series color](#plotOptions.series.color)\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 4.1.0\n * @product highcharts highstock\n * @apioption plotOptions.series.zones.color\n */\n /**\n * A name for the dash style to use for the graph.\n *\n * @see [plotOptions.series.dashStyle](#plotOptions.series.dashStyle)\n *\n * @sample {highcharts|highstock} highcharts/series/color-zones-dashstyle-dot/\n * Dashed line indicates prognosis\n *\n * @type {Highcharts.DashStyleValue}\n * @since 4.1.0\n * @product highcharts highstock\n * @apioption plotOptions.series.zones.dashStyle\n */\n /**\n * Defines the fill color for the series (in area type series)\n *\n * @see [fillColor](#plotOptions.area.fillColor)\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 4.1.0\n * @product highcharts highstock\n * @apioption plotOptions.series.zones.fillColor\n */\n /**\n * The value up to where the zone extends, if undefined the zones\n * stretches to the last value in the series.\n *\n * @type {number}\n * @since 4.1.0\n * @product highcharts highstock\n * @apioption plotOptions.series.zones.value\n */\n /**\n * When using dual or multiple color axes, this number defines which\n * colorAxis the particular series is connected to. It refers to\n * either the\n * {@link #colorAxis.id|axis id}\n * or the index of the axis in the colorAxis array, with 0 being the\n * first. Set this option to false to prevent a series from connecting\n * to the default color axis.\n *\n * Since v7.2.0 the option can also be an axis id or an axis index\n * instead of a boolean flag.\n *\n * @sample highcharts/coloraxis/coloraxis-with-pie/\n * Color axis with pie series\n * @sample highcharts/coloraxis/multiple-coloraxis/\n * Multiple color axis\n *\n * @type {number|string|boolean}\n * @default 0\n * @product highcharts highstock highmaps\n * @apioption plotOptions.series.colorAxis\n */\n /**\n * Determines what data value should be used to calculate point color\n * if `colorAxis` is used. Requires to set `min` and `max` if some\n * custom point property is used or if approximation for data grouping\n * is set to `'sum'`.\n *\n * @sample highcharts/coloraxis/custom-color-key/\n * Custom color key\n * @sample highcharts/coloraxis/color-key-with-stops/\n * Custom colorKey with color axis stops\n * @sample highcharts/coloraxis/changed-default-color-key/\n * Changed default color key\n *\n * @type {string}\n * @default y\n * @since 7.2.0\n * @product highcharts highstock highmaps\n * @apioption plotOptions.series.colorKey\n */\n /**\n * Determines whether the series should look for the nearest point\n * in both dimensions or just the x-dimension when hovering the series.\n * Defaults to `'xy'` for scatter series and `'x'` for most other\n * series. If the data has duplicate x-values, it is recommended to\n * set this to `'xy'` to allow hovering over all points.\n *\n * Applies only to series types using nearest neighbor search (not\n * direct hover) for tooltip.\n *\n * @sample {highcharts} highcharts/series/findnearestpointby/\n * Different hover behaviors\n * @sample {highstock} highcharts/series/findnearestpointby/\n * Different hover behaviors\n * @sample {highmaps} highcharts/series/findnearestpointby/\n * Different hover behaviors\n *\n * @since 5.0.10\n * @validvalue [\"x\", \"xy\"]\n *\n * @private\n */\n findNearestPointBy: 'x'\n};\n/* *\n *\n * Default Export\n *\n * */\nexport default seriesDefaults;\n","/* *\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport A from '../Animation/AnimationUtilities.js';\nvar animObject = A.animObject, setAnimation = A.setAnimation;\nimport D from '../Defaults.js';\nvar defaultOptions = D.defaultOptions;\nimport F from '../Foundation.js';\nvar registerEventOptions = F.registerEventOptions;\nimport H from '../Globals.js';\nvar hasTouch = H.hasTouch, svg = H.svg, win = H.win;\nimport LegendSymbol from '../Legend/LegendSymbol.js';\nimport Point from './Point.js';\nimport SeriesDefaults from './SeriesDefaults.js';\nimport SeriesRegistry from './SeriesRegistry.js';\nvar seriesTypes = SeriesRegistry.seriesTypes;\nimport SVGElement from '../Renderer/SVG/SVGElement.js';\nimport U from '../Utilities.js';\nvar addEvent = U.addEvent, arrayMax = U.arrayMax, arrayMin = U.arrayMin, clamp = U.clamp, cleanRecursively = U.cleanRecursively, correctFloat = U.correctFloat, defined = U.defined, erase = U.erase, error = U.error, extend = U.extend, find = U.find, fireEvent = U.fireEvent, getNestedProperty = U.getNestedProperty, isArray = U.isArray, isNumber = U.isNumber, isString = U.isString, merge = U.merge, objectEach = U.objectEach, pick = U.pick, removeEvent = U.removeEvent, splat = U.splat, syncTimeout = U.syncTimeout;\n/* *\n *\n * Class\n *\n * */\n/**\n * This is the base series prototype that all other series types inherit from.\n * A new series is initialized either through the\n * [series](https://api.highcharts.com/highcharts/series)\n * option structure, or after the chart is initialized, through\n * {@link Highcharts.Chart#addSeries}.\n *\n * The object can be accessed in a number of ways. All series and point event\n * handlers give a reference to the `series` object. The chart object has a\n * {@link Highcharts.Chart#series|series} property that is a collection of all\n * the chart's series. The point objects and axis objects also have the same\n * reference.\n *\n * Another way to reference the series programmatically is by `id`. Add an id\n * in the series configuration options, and get the series object by\n * {@link Highcharts.Chart#get}.\n *\n * Configuration options for the series are given in three levels. Options for\n * all series in a chart are given in the\n * [plotOptions.series](https://api.highcharts.com/highcharts/plotOptions.series)\n * object. Then options for all series of a specific type\n * are given in the plotOptions of that type, for example `plotOptions.line`.\n * Next, options for one single series are given in the series array, or as\n * arguments to `chart.addSeries`.\n *\n * The data in the series is stored in various arrays.\n *\n * - First, `series.options.data` contains all the original config options for\n * each point whether added by options or methods like `series.addPoint`.\n *\n * - Next, `series.data` contains those values converted to points, but in case\n * the series data length exceeds the `cropThreshold`, or if the data is\n * grouped, `series.data` doesn't contain all the points. It only contains the\n * points that have been created on demand.\n *\n * - Then there's `series.points` that contains all currently visible point\n * objects. In case of cropping, the cropped-away points are not part of this\n * array. The `series.points` array starts at `series.cropStart` compared to\n * `series.data` and `series.options.data`. If however the series data is\n * grouped, these can't be correlated one to one.\n *\n * - `series.xData` and `series.processedXData` contain clean x values,\n * equivalent to `series.data` and `series.points`.\n *\n * - `series.yData` and `series.processedYData` contain clean y values,\n * equivalent to `series.data` and `series.points`.\n *\n * @class\n * @name Highcharts.Series\n *\n * @param {Highcharts.Chart} chart\n * The chart instance.\n *\n * @param {Highcharts.SeriesOptionsType|object} options\n * The series options.\n */\nvar Series = /** @class */ (function () {\n function Series() {\n /* *\n *\n * Static Properties\n *\n * */\n this._i = void 0;\n this.chart = void 0;\n this.data = void 0;\n this.eventOptions = void 0;\n this.eventsToUnbind = void 0;\n this.index = void 0;\n this.linkedSeries = void 0;\n this.options = void 0;\n this.points = void 0;\n this.processedXData = void 0;\n this.processedYData = void 0;\n this.tooltipOptions = void 0;\n this.userOptions = void 0;\n this.xAxis = void 0;\n this.yAxis = void 0;\n this.zones = void 0;\n /** eslint-enable valid-jsdoc */\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n Series.prototype.init = function (chart, userOptions) {\n fireEvent(this, 'init', { options: userOptions });\n var series = this, chartSeries = chart.series;\n // The 'eventsToUnbind' property moved from prototype into the\n // Series init to avoid reference to the same array between\n // the different series and charts. #12959, #13937\n this.eventsToUnbind = [];\n /**\n * Read only. The chart that the series belongs to.\n *\n * @name Highcharts.Series#chart\n * @type {Highcharts.Chart}\n */\n series.chart = chart;\n /**\n * Read only. The series' type, like \"line\", \"area\", \"column\" etc.\n * The type in the series options anc can be altered using\n * {@link Series#update}.\n *\n * @name Highcharts.Series#type\n * @type {string}\n */\n /**\n * Read only. The series' current options. To update, use\n * {@link Series#update}.\n *\n * @name Highcharts.Series#options\n * @type {Highcharts.SeriesOptionsType}\n */\n series.options = series.setOptions(userOptions);\n var options = series.options;\n series.linkedSeries = [];\n // bind the axes\n series.bindAxes();\n extend(series, {\n /**\n * The series name as given in the options. Defaults to\n * \"Series {n}\".\n *\n * @name Highcharts.Series#name\n * @type {string}\n */\n name: options.name,\n state: '',\n /**\n * Read only. The series' visibility state as set by {@link\n * Series#show}, {@link Series#hide}, or in the initial\n * configuration.\n *\n * @name Highcharts.Series#visible\n * @type {boolean}\n */\n visible: options.visible !== false,\n /**\n * Read only. The series' selected state as set by {@link\n * Highcharts.Series#select}.\n *\n * @name Highcharts.Series#selected\n * @type {boolean}\n */\n selected: options.selected === true // false by default\n });\n registerEventOptions(this, options);\n var events = options.events;\n if ((events && events.click) ||\n (options.point &&\n options.point.events &&\n options.point.events.click) ||\n options.allowPointSelect) {\n chart.runTrackerClick = true;\n }\n series.getColor();\n series.getSymbol();\n // Initialize the parallel data arrays\n series.parallelArrays.forEach(function (key) {\n if (!series[key + 'Data']) {\n series[key + 'Data'] = [];\n }\n });\n // Mark cartesian\n if (series.isCartesian) {\n chart.hasCartesianSeries = true;\n }\n // Get the index and register the series in the chart. The index is\n // one more than the current latest series index (#5960).\n var lastSeries;\n if (chartSeries.length) {\n lastSeries = chartSeries[chartSeries.length - 1];\n }\n series._i = pick(lastSeries && lastSeries._i, -1) + 1;\n series.opacity = series.options.opacity;\n // Insert the series and re-order all series above the insertion\n // point.\n chart.orderSeries(this.insert(chartSeries));\n // Set options for series with sorting and set data later.\n if (options.dataSorting && options.dataSorting.enabled) {\n series.setDataSortingOptions();\n }\n else if (!series.points && !series.data) {\n series.setData(options.data, false);\n }\n fireEvent(this, 'afterInit');\n };\n /**\n * Check whether the series item is itself or inherits from a certain\n * series type.\n *\n * @function Highcharts.Series#is\n * @param {string} type The type of series to check for, can be either\n * featured or custom series types. For example `column`, `pie`,\n * `ohlc` etc.\n *\n * @return {boolean}\n * True if this item is or inherits from the given type.\n */\n Series.prototype.is = function (type) {\n return seriesTypes[type] && this instanceof seriesTypes[type];\n };\n /**\n * Insert the series in a collection with other series, either the chart\n * series or yAxis series, in the correct order according to the index\n * option. Used internally when adding series.\n *\n * @private\n * @function Highcharts.Series#insert\n * @param {Array} collection\n * A collection of series, like `chart.series` or `xAxis.series`.\n * @return {number}\n * The index of the series in the collection.\n */\n Series.prototype.insert = function (collection) {\n var indexOption = this.options.index;\n var i;\n // Insert by index option\n if (isNumber(indexOption)) {\n i = collection.length;\n while (i--) {\n // Loop down until the interted element has higher index\n if (indexOption >=\n pick(collection[i].options.index, collection[i]._i)) {\n collection.splice(i + 1, 0, this);\n break;\n }\n }\n if (i === -1) {\n collection.unshift(this);\n }\n i = i + 1;\n // Or just push it to the end\n }\n else {\n collection.push(this);\n }\n return pick(i, collection.length - 1);\n };\n /**\n * Set the xAxis and yAxis properties of cartesian series, and register\n * the series in the `axis.series` array.\n *\n * @private\n * @function Highcharts.Series#bindAxes\n */\n Series.prototype.bindAxes = function () {\n var series = this, seriesOptions = series.options, chart = series.chart;\n var axisOptions;\n fireEvent(this, 'bindAxes', null, function () {\n // repeat for xAxis and yAxis\n (series.axisTypes || []).forEach(function (AXIS) {\n var index = 0;\n // loop through the chart's axis objects\n chart[AXIS].forEach(function (axis) {\n axisOptions = axis.options;\n // apply if the series xAxis or yAxis option mathches\n // the number of the axis, or if undefined, use the\n // first axis\n if ((seriesOptions[AXIS] === index &&\n !axisOptions.isInternal) ||\n (typeof seriesOptions[AXIS] !==\n 'undefined' &&\n seriesOptions[AXIS] === axisOptions.id) ||\n (typeof seriesOptions[AXIS] ===\n 'undefined' &&\n axisOptions.index === 0)) {\n // register this series in the axis.series lookup\n series.insert(axis.series);\n // set this series.xAxis or series.yAxis reference\n /**\n * Read only. The unique xAxis object associated\n * with the series.\n *\n * @name Highcharts.Series#xAxis\n * @type {Highcharts.Axis}\n */\n /**\n * Read only. The unique yAxis object associated\n * with the series.\n *\n * @name Highcharts.Series#yAxis\n * @type {Highcharts.Axis}\n */\n series[AXIS] = axis;\n // mark dirty for redraw\n axis.isDirty = true;\n }\n if (!axisOptions.isInternal) {\n index++;\n }\n });\n // The series needs an X and an Y axis\n if (!series[AXIS] &&\n series.optionalAxis !== AXIS) {\n error(18, true, chart);\n }\n });\n });\n fireEvent(this, 'afterBindAxes');\n };\n /**\n * For simple series types like line and column, the data values are\n * held in arrays like xData and yData for quick lookup to find extremes\n * and more. For multidimensional series like bubble and map, this can\n * be extended with arrays like zData and valueData by adding to the\n * `series.parallelArrays` array.\n *\n * @private\n * @function Highcharts.Series#updateParallelArrays\n */\n Series.prototype.updateParallelArrays = function (point, i) {\n var series = point.series, args = arguments, fn = isNumber(i) ?\n // Insert the value in the given position\n function (key) {\n var val = key === 'y' && series.toYData ?\n series.toYData(point) :\n point[key];\n series[key + 'Data'][i] = val;\n } :\n // Apply the method specified in i with the following\n // arguments as arguments\n function (key) {\n Array.prototype[i].apply(series[key + 'Data'], Array.prototype.slice.call(args, 2));\n };\n series.parallelArrays.forEach(fn);\n };\n /**\n * Define hasData functions for series. These return true if there\n * are data points on this series within the plot area.\n *\n * @private\n * @function Highcharts.Series#hasData\n */\n Series.prototype.hasData = function () {\n return ((this.visible &&\n typeof this.dataMax !== 'undefined' &&\n typeof this.dataMin !== 'undefined') || ( // #3703\n this.visible &&\n this.yData &&\n this.yData.length > 0) // #9758\n );\n };\n /**\n * Return an auto incremented x value based on the pointStart and\n * pointInterval options. This is only used if an x value is not given\n * for the point that calls autoIncrement.\n *\n * @private\n * @function Highcharts.Series#autoIncrement\n */\n Series.prototype.autoIncrement = function (x) {\n var options = this.options, pointIntervalUnit = options.pointIntervalUnit, relativeXValue = options.relativeXValue, time = this.chart.time;\n var xIncrement = this.xIncrement, date, pointInterval;\n xIncrement = pick(xIncrement, options.pointStart, 0);\n this.pointInterval = pointInterval = pick(this.pointInterval, options.pointInterval, 1);\n if (relativeXValue && isNumber(x)) {\n pointInterval *= x;\n }\n // Added code for pointInterval strings\n if (pointIntervalUnit) {\n date = new time.Date(xIncrement);\n if (pointIntervalUnit === 'day') {\n time.set('Date', date, time.get('Date', date) + pointInterval);\n }\n else if (pointIntervalUnit === 'month') {\n time.set('Month', date, time.get('Month', date) + pointInterval);\n }\n else if (pointIntervalUnit === 'year') {\n time.set('FullYear', date, time.get('FullYear', date) + pointInterval);\n }\n pointInterval = date.getTime() - xIncrement;\n }\n if (relativeXValue && isNumber(x)) {\n return xIncrement + pointInterval;\n }\n this.xIncrement = xIncrement + pointInterval;\n return xIncrement;\n };\n /**\n * Internal function to set properties for series if data sorting is\n * enabled.\n *\n * @private\n * @function Highcharts.Series#setDataSortingOptions\n */\n Series.prototype.setDataSortingOptions = function () {\n var options = this.options;\n extend(this, {\n requireSorting: false,\n sorted: false,\n enabledDataSorting: true,\n allowDG: false\n });\n // To allow unsorted data for column series.\n if (!defined(options.pointRange)) {\n options.pointRange = 1;\n }\n };\n /**\n * Set the series options by merging from the options tree. Called\n * internally on initializing and updating series. This function will\n * not redraw the series. For API usage, use {@link Series#update}.\n * @private\n * @function Highcharts.Series#setOptions\n * @param {Highcharts.SeriesOptionsType} itemOptions\n * The series options.\n * @emits Highcharts.Series#event:afterSetOptions\n */\n Series.prototype.setOptions = function (itemOptions) {\n var chart = this.chart, chartOptions = chart.options, plotOptions = chartOptions.plotOptions, userOptions = chart.userOptions || {}, seriesUserOptions = merge(itemOptions), styledMode = chart.styledMode, e = {\n plotOptions: plotOptions,\n userOptions: seriesUserOptions\n };\n var zone;\n fireEvent(this, 'setOptions', e);\n // These may be modified by the event\n var typeOptions = e.plotOptions[this.type], userPlotOptions = (userOptions.plotOptions || {});\n // use copy to prevent undetected changes (#9762)\n /**\n * Contains series options by the user without defaults.\n * @name Highcharts.Series#userOptions\n * @type {Highcharts.SeriesOptionsType}\n */\n this.userOptions = e.userOptions;\n var options = merge(typeOptions, plotOptions.series, \n // #3881, chart instance plotOptions[type] should trump\n // plotOptions.series\n userOptions.plotOptions &&\n userOptions.plotOptions[this.type], seriesUserOptions);\n // The tooltip options are merged between global and series specific\n // options. Importance order asscendingly:\n // globals: (1)tooltip, (2)plotOptions.series,\n // (3)plotOptions[this.type]\n // init userOptions with possible later updates: 4-6 like 1-3 and\n // (7)this series options\n this.tooltipOptions = merge(defaultOptions.tooltip, // 1\n defaultOptions.plotOptions.series &&\n defaultOptions.plotOptions.series.tooltip, // 2\n defaultOptions.plotOptions[this.type].tooltip, // 3\n chartOptions.tooltip.userOptions, // 4\n plotOptions.series &&\n plotOptions.series.tooltip, // 5\n plotOptions[this.type].tooltip, // 6\n seriesUserOptions.tooltip // 7\n );\n // When shared tooltip, stickyTracking is true by default,\n // unless user says otherwise.\n this.stickyTracking = pick(seriesUserOptions.stickyTracking, userPlotOptions[this.type] &&\n userPlotOptions[this.type].stickyTracking, userPlotOptions.series && userPlotOptions.series.stickyTracking, (this.tooltipOptions.shared && !this.noSharedTooltip ?\n true :\n options.stickyTracking));\n // Delete marker object if not allowed (#1125)\n if (typeOptions.marker === null) {\n delete options.marker;\n }\n // Handle color zones\n this.zoneAxis = options.zoneAxis;\n var zones = this.zones = (options.zones || []).slice();\n if ((options.negativeColor || options.negativeFillColor) &&\n !options.zones) {\n zone = {\n value: options[this.zoneAxis + 'Threshold'] ||\n options.threshold ||\n 0,\n className: 'highcharts-negative'\n };\n if (!styledMode) {\n zone.color = options.negativeColor;\n zone.fillColor = options.negativeFillColor;\n }\n zones.push(zone);\n }\n if (zones.length) { // Push one extra zone for the rest\n if (defined(zones[zones.length - 1].value)) {\n zones.push(styledMode ? {} : {\n color: this.color,\n fillColor: this.fillColor\n });\n }\n }\n fireEvent(this, 'afterSetOptions', { options: options });\n return options;\n };\n /**\n * Return series name in \"Series {Number}\" format or the one defined by\n * a user. This method can be simply overridden as series name format\n * can vary (e.g. technical indicators).\n *\n * @function Highcharts.Series#getName\n *\n * @return {string}\n * The series name.\n */\n Series.prototype.getName = function () {\n // #4119\n return pick(this.options.name, 'Series ' + (this.index + 1));\n };\n /**\n * @private\n * @function Highcharts.Series#getCyclic\n */\n Series.prototype.getCyclic = function (prop, value, defaults) {\n var chart = this.chart, userOptions = this.userOptions, indexName = prop + 'Index', counterName = prop + 'Counter', len = defaults ? defaults.length : pick(chart.options.chart[prop + 'Count'], chart[prop + 'Count']);\n var i, setting;\n if (!value) {\n // Pick up either the colorIndex option, or the _colorIndex\n // after Series.update()\n setting = pick(userOptions[indexName], userOptions['_' + indexName]);\n if (defined(setting)) { // after Series.update()\n i = setting;\n }\n else {\n // #6138\n if (!chart.series.length) {\n chart[counterName] = 0;\n }\n userOptions['_' + indexName] = i =\n chart[counterName] % len;\n chart[counterName] += 1;\n }\n if (defaults) {\n value = defaults[i];\n }\n }\n // Set the colorIndex\n if (typeof i !== 'undefined') {\n this[indexName] = i;\n }\n this[prop] = value;\n };\n /**\n * Get the series' color based on either the options or pulled from\n * global options.\n *\n * @private\n * @function Highcharts.Series#getColor\n */\n Series.prototype.getColor = function () {\n if (this.chart.styledMode) {\n this.getCyclic('color');\n }\n else if (this.options.colorByPoint) {\n this.color = \"#cccccc\" /* Palette.neutralColor20 */;\n }\n else {\n this.getCyclic('color', this.options.color ||\n defaultOptions.plotOptions[this.type].color, this.chart.options.colors);\n }\n };\n /**\n * Get all points' instances created for this series.\n *\n * @private\n * @function Highcharts.Series#getPointsCollection\n */\n Series.prototype.getPointsCollection = function () {\n return (this.hasGroupedData ? this.points : this.data) || [];\n };\n /**\n * Get the series' symbol based on either the options or pulled from\n * global options.\n *\n * @private\n * @function Highcharts.Series#getSymbol\n */\n Series.prototype.getSymbol = function () {\n var seriesMarkerOption = this.options.marker;\n this.getCyclic('symbol', seriesMarkerOption.symbol, this.chart.options.symbols);\n };\n /**\n * Finds the index of an existing point that matches the given point\n * options.\n *\n * @private\n * @function Highcharts.Series#findPointIndex\n * @param {Highcharts.PointOptionsObject} optionsObject\n * The options of the point.\n * @param {number} fromIndex\n * The index to start searching from, used for optimizing series with\n * required sorting.\n * @return {number|undefined}\n * Returns the index of a matching point, or undefined if no match is found.\n */\n Series.prototype.findPointIndex = function (optionsObject, fromIndex) {\n var id = optionsObject.id, x = optionsObject.x, oldData = this.points, dataSorting = this.options.dataSorting;\n var matchingPoint, matchedById, pointIndex;\n if (id) {\n var item = this.chart.get(id);\n if (item instanceof Point) {\n matchingPoint = item;\n }\n }\n else if (this.linkedParent ||\n this.enabledDataSorting ||\n this.options.relativeXValue) {\n var matcher = function (oldPoint) { return !oldPoint.touched &&\n oldPoint.index === optionsObject.index; };\n if (dataSorting && dataSorting.matchByName) {\n matcher = function (oldPoint) { return !oldPoint.touched &&\n oldPoint.name === optionsObject.name; };\n }\n else if (this.options.relativeXValue) {\n matcher = function (oldPoint) { return !oldPoint.touched &&\n oldPoint.options.x === optionsObject.x; };\n }\n matchingPoint = find(oldData, matcher);\n // Add unmatched point as a new point\n if (!matchingPoint) {\n return void 0;\n }\n }\n if (matchingPoint) {\n pointIndex = matchingPoint && matchingPoint.index;\n if (typeof pointIndex !== 'undefined') {\n matchedById = true;\n }\n }\n // Search for the same X in the existing data set\n if (typeof pointIndex === 'undefined' && isNumber(x)) {\n pointIndex = this.xData.indexOf(x, fromIndex);\n }\n // Reduce pointIndex if data is cropped\n if (pointIndex !== -1 &&\n typeof pointIndex !== 'undefined' &&\n this.cropped) {\n pointIndex = (pointIndex >= this.cropStart) ?\n pointIndex - this.cropStart : pointIndex;\n }\n if (!matchedById &&\n isNumber(pointIndex) &&\n oldData[pointIndex] && oldData[pointIndex].touched) {\n pointIndex = void 0;\n }\n return pointIndex;\n };\n /**\n * Internal function called from setData. If the point count is the same\n * as it was, or if there are overlapping X values, just run\n * Point.update which is cheaper, allows animation, and keeps references\n * to points. This also allows adding or removing points if the X-es\n * don't match.\n *\n * @private\n * @function Highcharts.Series#updateData\n */\n Series.prototype.updateData = function (data, animation) {\n var options = this.options, dataSorting = options.dataSorting, oldData = this.points, pointsToAdd = [], requireSorting = this.requireSorting, equalLength = data.length === oldData.length;\n var hasUpdatedByKey, i, point, lastIndex, succeeded = true;\n this.xIncrement = null;\n // Iterate the new data\n data.forEach(function (pointOptions, i) {\n var optionsObject = (defined(pointOptions) &&\n this.pointClass.prototype.optionsToObject.call({ series: this }, pointOptions)) || {};\n var pointIndex;\n // Get the x of the new data point\n var x = optionsObject.x, id = optionsObject.id;\n if (id || isNumber(x)) {\n pointIndex = this.findPointIndex(optionsObject, lastIndex);\n // Matching X not found\n // or used already due to ununique x values (#8995),\n // add point (but later)\n if (pointIndex === -1 ||\n typeof pointIndex === 'undefined') {\n pointsToAdd.push(pointOptions);\n // Matching X found, update\n }\n else if (oldData[pointIndex] &&\n pointOptions !== options.data[pointIndex]) {\n oldData[pointIndex].update(pointOptions, false, null, false);\n // Mark it touched, below we will remove all points that\n // are not touched.\n oldData[pointIndex].touched = true;\n // Speed optimize by only searching after last known\n // index. Performs ~20% bettor on large data sets.\n if (requireSorting) {\n lastIndex = pointIndex + 1;\n }\n // Point exists, no changes, don't remove it\n }\n else if (oldData[pointIndex]) {\n oldData[pointIndex].touched = true;\n }\n // If the length is equal and some of the nodes had a\n // match in the same position, we don't want to remove\n // non-matches.\n if (!equalLength ||\n i !== pointIndex ||\n (dataSorting && dataSorting.enabled) ||\n this.hasDerivedData) {\n hasUpdatedByKey = true;\n }\n }\n else {\n // Gather all points that are not matched\n pointsToAdd.push(pointOptions);\n }\n }, this);\n // Remove points that don't exist in the updated data set\n if (hasUpdatedByKey) {\n i = oldData.length;\n while (i--) {\n point = oldData[i];\n if (point && !point.touched && point.remove) {\n point.remove(false, animation);\n }\n }\n // If we did not find keys (ids or x-values), and the length is the\n // same, update one-to-one\n }\n else if (equalLength && (!dataSorting || !dataSorting.enabled)) {\n data.forEach(function (point, i) {\n // .update doesn't exist on a linked, hidden series (#3709)\n // (#10187)\n if (point !== oldData[i].y && (oldData[i].update)) {\n oldData[i].update(point, false, null, false);\n }\n });\n // Don't add new points since those configs are used above\n pointsToAdd.length = 0;\n // Did not succeed in updating data\n }\n else {\n succeeded = false;\n }\n oldData.forEach(function (point) {\n if (point) {\n point.touched = false;\n }\n });\n if (!succeeded) {\n return false;\n }\n // Add new points\n pointsToAdd.forEach(function (point) {\n this.addPoint(point, false, null, null, false);\n }, this);\n if (this.xIncrement === null &&\n this.xData &&\n this.xData.length) {\n this.xIncrement = arrayMax(this.xData);\n this.autoIncrement();\n }\n return true;\n };\n /**\n * Apply a new set of data to the series and optionally redraw it. The\n * new data array is passed by reference (except in case of\n * `updatePoints`), and may later be mutated when updating the chart\n * data.\n *\n * Note the difference in behaviour when setting the same amount of\n * points, or a different amount of points, as handled by the\n * `updatePoints` parameter.\n *\n * @sample highcharts/members/series-setdata/\n * Set new data from a button\n * @sample highcharts/members/series-setdata-pie/\n * Set data in a pie\n * @sample stock/members/series-setdata/\n * Set new data in Highcharts Stock\n * @sample maps/members/series-setdata/\n * Set new data in Highmaps\n *\n * @function Highcharts.Series#setData\n *\n * @param {Array} data\n * Takes an array of data in the same format as described under\n * `series.{type}.data` for the given series type, for example a\n * line series would take data in the form described under\n * [series.line.data](https://api.highcharts.com/highcharts/series.line.data).\n *\n * @param {boolean} [redraw=true]\n * Whether to redraw the chart after the series is altered. If\n * doing more operations on the chart, it is a good idea to set\n * redraw to false and call {@link Chart#redraw} after.\n *\n * @param {boolean|Partial} [animation]\n * When the updated data is the same length as the existing data,\n * points will be updated by default, and animation visualizes\n * how the points are changed. Set false to disable animation, or\n * a configuration object to set duration or easing.\n *\n * @param {boolean} [updatePoints=true]\n * When this is true, points will be updated instead of replaced\n * whenever possible. This occurs a) when the updated data is the\n * same length as the existing data, b) when points are matched\n * by their id's, or c) when points can be matched by X values.\n * This allows updating with animation and performs better. In\n * this case, the original array is not passed by reference. Set\n * `false` to prevent.\n */\n Series.prototype.setData = function (data, redraw, animation, updatePoints) {\n if (redraw === void 0) { redraw = true; }\n var series = this, oldData = series.points, oldDataLength = (oldData && oldData.length) || 0, options = series.options, chart = series.chart, dataSorting = options.dataSorting, xAxis = series.xAxis, turboThreshold = options.turboThreshold, xData = this.xData, yData = this.yData, pointArrayMap = series.pointArrayMap, valueCount = pointArrayMap && pointArrayMap.length, keys = options.keys;\n var i, pt, updatedData, indexOfX = 0, indexOfY = 1, firstPoint = null, copiedData;\n if (!chart.options.chart.allowMutatingData) { // #4259\n // Remove old reference\n if (options.data) {\n delete series.options.data;\n }\n if (series.userOptions.data) {\n delete series.userOptions.data;\n }\n copiedData = merge(true, data);\n }\n data = copiedData || data || [];\n var dataLength = data.length;\n if (dataSorting && dataSorting.enabled) {\n data = this.sortData(data);\n }\n // First try to run Point.update which is cheaper, allows animation,\n // and keeps references to points.\n if (chart.options.chart.allowMutatingData &&\n updatePoints !== false &&\n dataLength &&\n oldDataLength &&\n !series.cropped &&\n !series.hasGroupedData &&\n series.visible &&\n // Soft updating has no benefit in boost, and causes JS error\n // (#8355)\n !series.boosted) {\n updatedData = this.updateData(data, animation);\n }\n if (!updatedData) {\n // Reset properties\n series.xIncrement = null;\n series.colorCounter = 0; // for series with colorByPoint (#1547)\n // Update parallel arrays\n this.parallelArrays.forEach(function (key) {\n series[key + 'Data'].length = 0;\n });\n // In turbo mode, only one- or twodimensional arrays of numbers\n // are allowed. The first value is tested, and we assume that\n // all the rest are defined the same way. Although the 'for'\n // loops are similar, they are repeated inside each if-else\n // conditional for max performance.\n if (turboThreshold && dataLength > turboThreshold) {\n firstPoint = series.getFirstValidPoint(data);\n if (isNumber(firstPoint)) { // assume all points are numbers\n for (i = 0; i < dataLength; i++) {\n xData[i] = this.autoIncrement();\n yData[i] = data[i];\n }\n // Assume all points are arrays when first point is\n }\n else if (isArray(firstPoint)) {\n if (valueCount) { // [x, low, high] or [x, o, h, l, c]\n if (firstPoint.length === valueCount) {\n for (i = 0; i < dataLength; i++) {\n xData[i] = this.autoIncrement();\n yData[i] = data[i];\n }\n }\n else {\n for (i = 0; i < dataLength; i++) {\n pt = data[i];\n xData[i] = pt[0];\n yData[i] =\n pt.slice(1, valueCount + 1);\n }\n }\n }\n else { // [x, y]\n if (keys) {\n indexOfX = keys.indexOf('x');\n indexOfY = keys.indexOf('y');\n indexOfX = indexOfX >= 0 ? indexOfX : 0;\n indexOfY = indexOfY >= 0 ? indexOfY : 1;\n }\n if (firstPoint.length === 1) {\n indexOfY = 0;\n }\n if (indexOfX === indexOfY) {\n for (i = 0; i < dataLength; i++) {\n xData[i] = this.autoIncrement();\n yData[i] = data[i][indexOfY];\n }\n }\n else {\n for (i = 0; i < dataLength; i++) {\n pt = data[i];\n xData[i] = pt[indexOfX];\n yData[i] = pt[indexOfY];\n }\n }\n }\n }\n else {\n // Highcharts expects configs to be numbers or arrays in\n // turbo mode\n error(12, false, chart);\n }\n }\n else {\n for (i = 0; i < dataLength; i++) {\n // stray commas in oldIE:\n if (typeof data[i] !== 'undefined') {\n pt = { series: series };\n series.pointClass.prototype.applyOptions.apply(pt, [data[i]]);\n series.updateParallelArrays(pt, i);\n }\n }\n }\n // Forgetting to cast strings to numbers is a common caveat when\n // handling CSV or JSON\n if (yData && isString(yData[0])) {\n error(14, true, chart);\n }\n series.data = [];\n series.options.data = series.userOptions.data = data;\n // destroy old points\n i = oldDataLength;\n while (i--) {\n if (oldData[i] && (oldData[i].destroy)) {\n oldData[i].destroy();\n }\n }\n // reset minRange (#878)\n if (xAxis) {\n xAxis.minRange = xAxis.userMinRange;\n }\n // redraw\n series.isDirty = chart.isDirtyBox = true;\n series.isDirtyData = !!oldData;\n animation = false;\n }\n // Typically for pie series, points need to be processed and\n // generated prior to rendering the legend\n if (options.legendType === 'point') {\n this.processData();\n this.generatePoints();\n }\n if (redraw) {\n chart.redraw(animation);\n }\n };\n /**\n * Internal function to sort series data\n *\n * @private\n * @function Highcharts.Series#sortData\n * @param {Array} data\n * Force data grouping.\n */\n Series.prototype.sortData = function (data) {\n var series = this, options = series.options, dataSorting = options.dataSorting, sortKey = dataSorting.sortKey || 'y', getPointOptionsObject = function (series, pointOptions) {\n return (defined(pointOptions) &&\n series.pointClass.prototype.optionsToObject.call({\n series: series\n }, pointOptions)) || {};\n };\n data.forEach(function (pointOptions, i) {\n data[i] = getPointOptionsObject(series, pointOptions);\n data[i].index = i;\n }, this);\n // Sorting\n var sortedData = data.concat().sort(function (a, b) {\n var aValue = getNestedProperty(sortKey, a);\n var bValue = getNestedProperty(sortKey, b);\n return bValue < aValue ? -1 : bValue > aValue ? 1 : 0;\n });\n // Set x value depending on the position in the array\n sortedData.forEach(function (point, i) {\n point.x = i;\n }, this);\n // Set the same x for linked series points if they don't have their\n // own sorting\n if (series.linkedSeries) {\n series.linkedSeries.forEach(function (linkedSeries) {\n var options = linkedSeries.options, seriesData = options.data;\n if ((!options.dataSorting ||\n !options.dataSorting.enabled) &&\n seriesData) {\n seriesData.forEach(function (pointOptions, i) {\n seriesData[i] = getPointOptionsObject(linkedSeries, pointOptions);\n if (data[i]) {\n seriesData[i].x = data[i].x;\n seriesData[i].index = i;\n }\n });\n linkedSeries.setData(seriesData, false);\n }\n });\n }\n return data;\n };\n /**\n * Internal function to process the data by cropping away unused data\n * points if the series is longer than the crop threshold. This saves\n * computing time for large series.\n *\n * @private\n * @function Highcharts.Series#getProcessedData\n * @param {boolean} [forceExtremesFromAll]\n * Force getting extremes of a total series data range.\n */\n Series.prototype.getProcessedData = function (forceExtremesFromAll) {\n var series = this, xAxis = series.xAxis, options = series.options, cropThreshold = options.cropThreshold, getExtremesFromAll = forceExtremesFromAll ||\n series.getExtremesFromAll ||\n options.getExtremesFromAll, // #4599\n isCartesian = series.isCartesian, val2lin = xAxis && xAxis.val2lin, isLog = !!(xAxis && xAxis.logarithmic);\n var croppedData, cropped, cropStart = 0, distance, closestPointRange, i, // loop variable\n xExtremes, min, max, \n // copied during slice operation:\n processedXData = series.xData, processedYData = series.yData, throwOnUnsorted = series.requireSorting, updatingNames = false;\n var dataLength = processedXData.length;\n if (xAxis) {\n // corrected for log axis (#3053)\n xExtremes = xAxis.getExtremes();\n min = xExtremes.min;\n max = xExtremes.max;\n updatingNames = !!(xAxis.categories && !xAxis.names.length);\n }\n // optionally filter out points outside the plot area\n if (isCartesian &&\n series.sorted &&\n !getExtremesFromAll &&\n (!cropThreshold ||\n dataLength > cropThreshold ||\n series.forceCrop)) {\n // it's outside current extremes\n if (processedXData[dataLength - 1] < min ||\n processedXData[0] > max) {\n processedXData = [];\n processedYData = [];\n // only crop if it's actually spilling out\n }\n else if (series.yData && (processedXData[0] < min ||\n processedXData[dataLength - 1] > max)) {\n croppedData = this.cropData(series.xData, series.yData, min, max);\n processedXData = croppedData.xData;\n processedYData = croppedData.yData;\n cropStart = croppedData.start;\n cropped = true;\n }\n }\n // Find the closest distance between processed points\n i = processedXData.length || 1;\n while (--i) {\n distance = (isLog ?\n (val2lin(processedXData[i]) -\n val2lin(processedXData[i - 1])) :\n (processedXData[i] -\n processedXData[i - 1]));\n if (distance > 0 &&\n (typeof closestPointRange === 'undefined' ||\n distance < closestPointRange)) {\n closestPointRange = distance;\n // Unsorted data is not supported by the line tooltip, as well\n // as data grouping and navigation in Stock charts (#725) and\n // width calculation of columns (#1900).\n // Avoid warning during the premature processing pass in\n // updateNames (#16104).\n }\n else if (distance < 0 && throwOnUnsorted && !updatingNames) {\n error(15, false, series.chart);\n throwOnUnsorted = false; // Only once\n }\n }\n return {\n xData: processedXData,\n yData: processedYData,\n cropped: cropped,\n cropStart: cropStart,\n closestPointRange: closestPointRange\n };\n };\n /**\n * Internal function to apply processed data.\n * In Highcharts Stock, this function is extended to provide data grouping.\n *\n * @private\n * @function Highcharts.Series#processData\n * @param {boolean} [force]\n * Force data grouping.\n */\n Series.prototype.processData = function (force) {\n var series = this, xAxis = series.xAxis;\n // If the series data or axes haven't changed, don't go through\n // this. Return false to pass the message on to override methods\n // like in data grouping.\n if (series.isCartesian &&\n !series.isDirty &&\n !xAxis.isDirty &&\n !series.yAxis.isDirty &&\n !force) {\n return false;\n }\n var processedData = series.getProcessedData();\n // Record the properties\n series.cropped = processedData.cropped; // undefined or true\n series.cropStart = processedData.cropStart;\n series.processedXData = processedData.xData;\n series.processedYData = processedData.yData;\n series.closestPointRange = (series.basePointRange = processedData.closestPointRange);\n fireEvent(series, 'afterProcessData');\n };\n /**\n * Iterate over xData and crop values between min and max. Returns\n * object containing crop start/end cropped xData with corresponding\n * part of yData, dataMin and dataMax within the cropped range.\n *\n * @private\n * @function Highcharts.Series#cropData\n */\n Series.prototype.cropData = function (xData, yData, min, max, cropShoulder) {\n var dataLength = xData.length;\n var i, j, cropStart = 0, cropEnd = dataLength;\n // line-type series need one point outside\n cropShoulder = pick(cropShoulder, this.cropShoulder);\n // iterate up to find slice start\n for (i = 0; i < dataLength; i++) {\n if (xData[i] >= min) {\n cropStart = Math.max(0, i - cropShoulder);\n break;\n }\n }\n // proceed to find slice end\n for (j = i; j < dataLength; j++) {\n if (xData[j] > max) {\n cropEnd = j + cropShoulder;\n break;\n }\n }\n return {\n xData: xData.slice(cropStart, cropEnd),\n yData: yData.slice(cropStart, cropEnd),\n start: cropStart,\n end: cropEnd\n };\n };\n /**\n * Generate the data point after the data has been processed by cropping\n * away unused points and optionally grouped in Highcharts Stock.\n *\n * @private\n * @function Highcharts.Series#generatePoints\n */\n Series.prototype.generatePoints = function () {\n var series = this, options = series.options, dataOptions = (series.processedData || options.data), processedXData = series.processedXData, processedYData = series.processedYData, PointClass = series.pointClass, processedDataLength = processedXData.length, cropStart = series.cropStart || 0, hasGroupedData = series.hasGroupedData, keys = options.keys, points = [], groupCropStartIndex = (options.dataGrouping &&\n options.dataGrouping.groupAll ?\n cropStart :\n 0);\n var dataLength, cursor, point, i, data = series.data;\n if (!data && !hasGroupedData) {\n var arr = [];\n arr.length = dataOptions.length;\n data = series.data = arr;\n }\n if (keys && hasGroupedData) {\n // grouped data has already applied keys (#6590)\n series.options.keys = false;\n }\n for (i = 0; i < processedDataLength; i++) {\n cursor = cropStart + i;\n if (!hasGroupedData) {\n point = data[cursor];\n // #970:\n if (!point &&\n typeof dataOptions[cursor] !== 'undefined') {\n data[cursor] = point = (new PointClass()).init(series, dataOptions[cursor], processedXData[i]);\n }\n }\n else {\n // splat the y data in case of ohlc data array\n point = (new PointClass()).init(series, [processedXData[i]].concat(splat(processedYData[i])));\n point.dataGroup = series.groupMap[groupCropStartIndex + i];\n if (point.dataGroup.options) {\n point.options = point.dataGroup.options;\n extend(point, point.dataGroup.options);\n // Collision of props and options (#9770)\n delete point.dataLabels;\n }\n }\n if (point) { // #6279\n /**\n * Contains the point's index in the `Series.points` array.\n *\n * @name Highcharts.Point#index\n * @type {number}\n * @readonly\n */\n // For faster access in Point.update\n point.index = hasGroupedData ?\n (groupCropStartIndex + i) : cursor;\n points[i] = point;\n }\n }\n // restore keys options (#6590)\n series.options.keys = keys;\n // Hide cropped-away points - this only runs when the number of\n // points is above cropThreshold, or when swithching view from\n // non-grouped data to grouped data (#637)\n if (data &&\n (processedDataLength !== (dataLength = data.length) ||\n hasGroupedData)) {\n for (i = 0; i < dataLength; i++) {\n // when has grouped data, clear all points\n if (i === cropStart && !hasGroupedData) {\n i += processedDataLength;\n }\n if (data[i]) {\n data[i].destroyElements();\n data[i].plotX = void 0; // #1003\n }\n }\n }\n /**\n * Read only. An array containing those values converted to points.\n * In case the series data length exceeds the `cropThreshold`, or if\n * the data is grouped, `series.data` doesn't contain all the\n * points. Also, in case a series is hidden, the `data` array may be\n * empty. To access raw values, `series.options.data` will always be\n * up to date. `Series.data` only contains the points that have been\n * created on demand. To modify the data, use\n * {@link Highcharts.Series#setData} or\n * {@link Highcharts.Point#update}.\n *\n * @see Series.points\n *\n * @name Highcharts.Series#data\n * @type {Array}\n */\n series.data = data;\n /**\n * An array containing all currently visible point objects. In case\n * of cropping, the cropped-away points are not part of this array.\n * The `series.points` array starts at `series.cropStart` compared\n * to `series.data` and `series.options.data`. If however the series\n * data is grouped, these can't be correlated one to one. To modify\n * the data, use {@link Highcharts.Series#setData} or\n * {@link Highcharts.Point#update}.\n *\n * @name Highcharts.Series#points\n * @type {Array}\n */\n series.points = points;\n fireEvent(this, 'afterGeneratePoints');\n };\n /**\n * Get current X extremes for the visible data.\n *\n * @private\n * @function Highcharts.Series#getXExtremes\n * @param {Array} xData\n * The data to inspect. Defaults to the current data within the visible\n * range.\n */\n Series.prototype.getXExtremes = function (xData) {\n return {\n min: arrayMin(xData),\n max: arrayMax(xData)\n };\n };\n /**\n * Calculate Y extremes for the visible data. The result is returned\n * as an object with `dataMin` and `dataMax` properties.\n *\n * @private\n * @function Highcharts.Series#getExtremes\n * @param {Array} [yData]\n * The data to inspect. Defaults to the current data within the visible\n * range.\n * @param {boolean} [forceExtremesFromAll]\n * Force getting extremes of a total series data range.\n */\n Series.prototype.getExtremes = function (yData, forceExtremesFromAll) {\n var xAxis = this.xAxis, yAxis = this.yAxis, xData = this.processedXData || this.xData, activeYData = [], \n // Handle X outside the viewed area. This does not work with\n // non-sorted data like scatter (#7639).\n shoulder = this.requireSorting ? this.cropShoulder : 0, positiveValuesOnly = yAxis ? yAxis.positiveValuesOnly : false;\n // #2117, need to compensate for log X axis\n var xExtremes, validValue, withinRange, x, y, i, j, xMin = 0, xMax = 0, activeCounter = 0;\n yData = yData || this.stackedYData || this.processedYData || [];\n var yDataLength = yData.length;\n if (xAxis) {\n xExtremes = xAxis.getExtremes();\n xMin = xExtremes.min;\n xMax = xExtremes.max;\n }\n for (i = 0; i < yDataLength; i++) {\n x = xData[i];\n y = yData[i];\n // For points within the visible range, including the first\n // point outside the visible range (#7061), consider y extremes.\n validValue = ((isNumber(y) || isArray(y)) &&\n ((y.length || y > 0) || !positiveValuesOnly));\n withinRange = (forceExtremesFromAll ||\n this.getExtremesFromAll ||\n this.options.getExtremesFromAll ||\n this.cropped ||\n !xAxis || // for colorAxis support\n ((xData[i + shoulder] || x) >= xMin &&\n (xData[i - shoulder] || x) <= xMax));\n if (validValue && withinRange) {\n j = y.length;\n if (j) { // array, like ohlc or range data\n while (j--) {\n if (isNumber(y[j])) { // #7380, #11513\n activeYData[activeCounter++] = y[j];\n }\n }\n }\n else {\n activeYData[activeCounter++] = y;\n }\n }\n }\n var dataExtremes = {\n activeYData: activeYData,\n dataMin: arrayMin(activeYData),\n dataMax: arrayMax(activeYData)\n };\n fireEvent(this, 'afterGetExtremes', { dataExtremes: dataExtremes });\n return dataExtremes;\n };\n /**\n * Set the current data extremes as `dataMin` and `dataMax` on the\n * Series item. Use this only when the series properties should be\n * updated.\n *\n * @private\n * @function Highcharts.Series#applyExtremes\n */\n Series.prototype.applyExtremes = function () {\n var dataExtremes = this.getExtremes();\n /**\n * Contains the minimum value of the series' data point. Some series\n * types like `networkgraph` do not support this property as they\n * lack a `y`-value.\n * @name Highcharts.Series#dataMin\n * @type {number|undefined}\n * @readonly\n */\n this.dataMin = dataExtremes.dataMin;\n /**\n * Contains the maximum value of the series' data point. Some series\n * types like `networkgraph` do not support this property as they\n * lack a `y`-value.\n * @name Highcharts.Series#dataMax\n * @type {number|undefined}\n * @readonly\n */\n this.dataMax = dataExtremes.dataMax;\n return dataExtremes;\n };\n /**\n * Find and return the first non null point in the data\n *\n * @private\n * @function Highcharts.Series.getFirstValidPoint\n * @param {Array} data\n * Array of options for points\n */\n Series.prototype.getFirstValidPoint = function (data) {\n var dataLength = data.length;\n var i = 0, firstPoint = null;\n while (firstPoint === null && i < dataLength) {\n firstPoint = data[i];\n i++;\n }\n return firstPoint;\n };\n /**\n * Translate data points from raw data values to chart specific\n * positioning data needed later in the `drawPoints` and `drawGraph`\n * functions. This function can be overridden in plugins and custom\n * series type implementations.\n *\n * @function Highcharts.Series#translate\n *\n * @emits Highcharts.Series#events:translate\n */\n Series.prototype.translate = function () {\n if (!this.processedXData) { // hidden series\n this.processData();\n }\n this.generatePoints();\n var series = this, options = series.options, stacking = options.stacking, xAxis = series.xAxis, categories = xAxis.categories, enabledDataSorting = series.enabledDataSorting, yAxis = series.yAxis, points = series.points, dataLength = points.length, pointPlacement = series.pointPlacementToXValue(), // #7860\n dynamicallyPlaced = Boolean(pointPlacement), threshold = options.threshold, stackThreshold = options.startFromThreshold ? threshold : 0, zoneAxis = this.zoneAxis || 'y';\n var i, plotX, lastPlotX, stackIndicator, closestPointRangePx = Number.MAX_VALUE;\n /**\n * Plotted coordinates need to be within a limited range. Drawing\n * too far outside the viewport causes various rendering issues\n * (#3201, #3923, #7555).\n * @private\n */\n function limitedRange(val) {\n return clamp(val, -1e5, 1e5);\n }\n // Translate each point\n for (i = 0; i < dataLength; i++) {\n var point = points[i], xValue = point.x;\n var pointStack = void 0, stackValues = void 0, yValue = point.y, yBottom = point.low;\n var stack = stacking && yAxis.stacking && yAxis.stacking.stacks[(series.negStacks &&\n yValue <\n (stackThreshold ? 0 : threshold) ?\n '-' :\n '') + series.stackKey];\n if (yAxis.positiveValuesOnly &&\n !yAxis.validatePositiveValue(yValue) ||\n xAxis.positiveValuesOnly &&\n !xAxis.validatePositiveValue(xValue)) {\n point.isNull = true;\n }\n /**\n * The translated X value for the point in terms of pixels. Relative\n * to the X axis position if the series has one, otherwise relative\n * to the plot area. Depending on the series type this value might\n * not be defined.\n * @name Highcharts.Point#plotX\n * @type {number|undefined}\n */\n point.plotX = plotX = correctFloat(// #5236\n // Get the plotX translation\n limitedRange(xAxis.translate(// #3923\n xValue, 0, 0, 0, 1, pointPlacement, this.type === 'flags')) // #3923\n );\n // Calculate the bottom y value for stacked series\n if (stacking &&\n series.visible &&\n stack &&\n stack[xValue]) {\n stackIndicator = series.getStackIndicator(stackIndicator, xValue, series.index);\n if (!point.isNull && stackIndicator.key) {\n pointStack = stack[xValue];\n stackValues = pointStack.points[stackIndicator.key];\n }\n if (pointStack && isArray(stackValues)) {\n yBottom = stackValues[0];\n yValue = stackValues[1];\n if (yBottom === stackThreshold &&\n stackIndicator.key === stack[xValue].base) {\n yBottom = pick(isNumber(threshold) ? threshold : yAxis.min);\n }\n // #1200, #1232\n if (yAxis.positiveValuesOnly &&\n defined(yBottom) &&\n yBottom <= 0) {\n yBottom = void 0;\n }\n point.total = point.stackTotal = pick(pointStack.total);\n point.percentage = defined(point.y) && pointStack.total ?\n (point.y / pointStack.total * 100) : void 0;\n point.stackY = yValue;\n // Place the stack label\n // in case of variwide series (where widths of points are\n // different in most cases), stack labels are positioned\n // wrongly, so the call of the setOffset is omited here and\n // labels are correctly positioned later, at the end of the\n // variwide's translate function (#10962)\n if (!series.irregularWidths) {\n pointStack.setOffset(series.pointXOffset || 0, series.barW || 0, void 0, void 0, void 0, series.xAxis);\n }\n }\n }\n // Set translated yBottom or remove it\n point.yBottom = defined(yBottom) ?\n limitedRange(yAxis.translate(yBottom, 0, 1, 0, 1)) :\n void 0;\n // General hook, used for Highcharts Stock compare and cumulative\n if (series.dataModify) {\n yValue = series.dataModify.modifyValue(yValue, i);\n }\n // Set the the plotY value, reset it for redraws\n // #3201\n point.plotY = void 0;\n if (isNumber(yValue)) {\n var translated = yAxis.translate(yValue, false, true, false, true);\n if (typeof translated !== 'undefined') {\n /**\n * The translated Y value for the point in terms of pixels.\n * Relative to the Y axis position if the series has one,\n * otherwise relative to the plot area. Depending on the\n * series type this value might not be defined.\n * @name Highcharts.Point#plotY\n * @type {number|undefined}\n */\n point.plotY = limitedRange(translated);\n }\n }\n point.isInside = this.isPointInside(point);\n // Set client related positions for mouse tracking\n point.clientX = dynamicallyPlaced ?\n correctFloat(xAxis.translate(xValue, 0, 0, 0, 1, pointPlacement)) :\n plotX; // #1514, #5383, #5518\n // Negative points. For bubble charts, this means negative z\n // values (#9728)\n point.negative = point[zoneAxis] < (options[zoneAxis + 'Threshold'] ||\n threshold ||\n 0);\n // some API data\n point.category = pick(categories && categories[point.x], point.x);\n // Determine auto enabling of markers (#3635, #5099)\n if (!point.isNull && point.visible !== false) {\n if (typeof lastPlotX !== 'undefined') {\n closestPointRangePx = Math.min(closestPointRangePx, Math.abs(plotX - lastPlotX));\n }\n lastPlotX = plotX;\n }\n // Find point zone\n point.zone = this.zones.length ? point.getZone() : void 0;\n // Animate new points with data sorting\n if (!point.graphic && series.group && enabledDataSorting) {\n point.isNew = true;\n }\n }\n series.closestPointRangePx = closestPointRangePx;\n fireEvent(this, 'afterTranslate');\n };\n /**\n * Return the series points with null points filtered out.\n *\n * @function Highcharts.Series#getValidPoints\n *\n * @param {Array} [points]\n * The points to inspect, defaults to {@link Series.points}.\n *\n * @param {boolean} [insideOnly=false]\n * Whether to inspect only the points that are inside the visible view.\n *\n * @param {boolean} [allowNull=false]\n * Whether to allow null points to pass as valid points.\n *\n * @return {Array}\n * The valid points.\n */\n Series.prototype.getValidPoints = function (points, insideOnly, allowNull) {\n var chart = this.chart;\n // #3916, #5029, #5085\n return (points || this.points || []).filter(function (point) {\n if (insideOnly && !chart.isInsidePlot(point.plotX, point.plotY, { inverted: chart.inverted })) {\n return false;\n }\n return point.visible !== false &&\n (allowNull || !point.isNull);\n });\n };\n /**\n * Get the clipping for the series. Could be called for a series to\n * initiate animating the clip or to set the final clip (only width\n * and x).\n *\n * @private\n * @function Highcharts.Series#getClip\n */\n Series.prototype.getClipBox = function () {\n var _a = this, chart = _a.chart, xAxis = _a.xAxis, yAxis = _a.yAxis;\n // If no axes on the series, use global clipBox\n var seriesBox = merge(chart.clipBox);\n // Otherwise, use clipBox.width which is corrected for plotBorderWidth\n // and clipOffset\n if (xAxis && xAxis.len !== chart.plotSizeX) {\n seriesBox.width = xAxis.len;\n }\n if (yAxis && yAxis.len !== chart.plotSizeY) {\n seriesBox.height = yAxis.len;\n }\n return seriesBox;\n };\n /**\n * Get the shared clip key, creating it if it doesn't exist.\n *\n * @private\n * @function Highcharts.Series#getSharedClipKey\n */\n Series.prototype.getSharedClipKey = function () {\n this.sharedClipKey = (this.options.xAxis || 0) + ',' +\n (this.options.yAxis || 0);\n return this.sharedClipKey;\n };\n /**\n * Set the clipping for the series. For animated series the clip is later\n * modified.\n *\n * @private\n * @function Highcharts.Series#setClip\n */\n Series.prototype.setClip = function () {\n var _a = this, chart = _a.chart, group = _a.group, markerGroup = _a.markerGroup, sharedClips = chart.sharedClips, renderer = chart.renderer, clipBox = this.getClipBox(), sharedClipKey = this.getSharedClipKey(); // #4526\n var clipRect = sharedClips[sharedClipKey];\n // If a clipping rectangle for the same set of axes does not exist,\n // create it\n if (!clipRect) {\n sharedClips[sharedClipKey] = clipRect = renderer.clipRect(clipBox);\n // When setting chart size, or when the series is rendered again before\n // starting animating, in compliance to a responsive rule\n }\n else {\n clipRect.animate(clipBox);\n }\n if (group) {\n // When clip is false, reset to no clip after animation\n group.clip(this.options.clip === false ? void 0 : clipRect);\n }\n // Unclip temporary animation clip\n if (markerGroup) {\n markerGroup.clip();\n }\n };\n /**\n * Animate in the series. Called internally twice. First with the `init`\n * parameter set to true, which sets up the initial state of the\n * animation. Then when ready, it is called with the `init` parameter\n * undefined, in order to perform the actual animation.\n *\n * @function Highcharts.Series#animate\n *\n * @param {boolean} [init]\n * Initialize the animation.\n */\n Series.prototype.animate = function (init) {\n var _a = this, chart = _a.chart, group = _a.group, markerGroup = _a.markerGroup, inverted = chart.inverted, animation = animObject(this.options.animation), \n // The key for temporary animation clips\n animationClipKey = [\n this.getSharedClipKey(),\n animation.duration,\n animation.easing,\n animation.defer\n ].join(',');\n var animationClipRect = chart.sharedClips[animationClipKey], markerAnimationClipRect = chart.sharedClips[animationClipKey + 'm'];\n // Initialize the animation. Set up the clipping rectangle.\n if (init && group) {\n var clipBox = this.getClipBox();\n // Create temporary animation clips\n if (!animationClipRect) {\n clipBox.width = 0;\n if (inverted) {\n clipBox.x = chart.plotHeight;\n }\n animationClipRect = chart.renderer.clipRect(clipBox);\n chart.sharedClips[animationClipKey] = animationClipRect;\n // The marker clip box. The number 99 is a safe margin to avoid\n // markers being clipped during animation.\n var markerClipBox = {\n x: inverted ? -99 : -99,\n y: inverted ? -99 : -99,\n width: inverted ? chart.plotWidth + 199 : 99,\n height: inverted ? 99 : chart.plotHeight + 199\n };\n markerAnimationClipRect = chart.renderer.clipRect(markerClipBox);\n chart.sharedClips[animationClipKey + 'm'] = markerAnimationClipRect;\n }\n else {\n // When height changes during animation, typically due to\n // responsive settings\n animationClipRect.attr('height', clipBox.height);\n }\n group.clip(animationClipRect);\n if (markerGroup) {\n markerGroup.clip(markerAnimationClipRect);\n }\n // Run the animation\n }\n else if (animationClipRect &&\n // Only first series in this pane\n !animationClipRect.hasClass('highcharts-animating')) {\n var finalBox = this.getClipBox(), step_1 = animation.step;\n // Only do this when there are actually markers\n if (markerGroup && markerGroup.element.childNodes.length) {\n // To provide as smooth animation as possible, update the marker\n // group clipping in steps of the main group animation\n animation.step = function (val, fx) {\n if (step_1) {\n step_1.apply(fx, arguments);\n }\n if (fx.prop === 'width' &&\n markerAnimationClipRect &&\n markerAnimationClipRect.element) {\n markerAnimationClipRect.attr(inverted ? 'height' : 'width', val + 99);\n }\n };\n }\n animationClipRect\n .addClass('highcharts-animating')\n .animate(finalBox, animation);\n }\n };\n /**\n * This runs after animation to land on the final plot clipping.\n *\n * @private\n * @function Highcharts.Series#afterAnimate\n *\n * @emits Highcharts.Series#event:afterAnimate\n */\n Series.prototype.afterAnimate = function () {\n var _this = this;\n this.setClip();\n // Destroy temporary clip rectangles that are no longer in use\n objectEach(this.chart.sharedClips, function (clip, key, sharedClips) {\n if (clip && !_this.chart.container.querySelector(\"[clip-path=\\\"url(#\".concat(clip.id, \")\\\"]\"))) {\n clip.destroy();\n delete sharedClips[key];\n }\n });\n this.finishedAnimating = true;\n fireEvent(this, 'afterAnimate');\n };\n /**\n * Draw the markers for line-like series types, and columns or other\n * graphical representation for {@link Point} objects for other series\n * types. The resulting element is typically stored as\n * {@link Point.graphic}, and is created on the first call and updated\n * and moved on subsequent calls.\n *\n * @function Highcharts.Series#drawPoints\n */\n Series.prototype.drawPoints = function (points) {\n if (points === void 0) { points = this.points; }\n var series = this, chart = series.chart, styledMode = chart.styledMode, colorAxis = series.colorAxis, options = series.options, seriesMarkerOptions = options.marker, markerGroup = series[series.specialGroup || 'markerGroup'], xAxis = series.xAxis, globallyEnabled = pick(seriesMarkerOptions.enabled, !xAxis || xAxis.isRadial ? true : null, \n // Use larger or equal as radius is null in bubbles (#6321)\n series.closestPointRangePx >= (seriesMarkerOptions.enabledThreshold *\n seriesMarkerOptions.radius));\n var i, point, graphic, verb, pointMarkerOptions, hasPointMarker, markerAttribs;\n if (seriesMarkerOptions.enabled !== false ||\n series._hasPointMarkers) {\n for (i = 0; i < points.length; i++) {\n point = points[i];\n graphic = point.graphic;\n verb = graphic ? 'animate' : 'attr';\n pointMarkerOptions = point.marker || {};\n hasPointMarker = !!point.marker;\n var shouldDrawMarker = ((globallyEnabled &&\n typeof pointMarkerOptions.enabled === 'undefined') || pointMarkerOptions.enabled) && !point.isNull && point.visible !== false;\n // only draw the point if y is defined\n if (shouldDrawMarker) {\n // Shortcuts\n var symbol = pick(pointMarkerOptions.symbol, series.symbol, 'rect');\n markerAttribs = series.markerAttribs(point, (point.selected && 'select'));\n // Set starting position for point sliding animation.\n if (series.enabledDataSorting) {\n point.startXPos = xAxis.reversed ?\n -(markerAttribs.width || 0) :\n xAxis.width;\n }\n var isInside = point.isInside !== false;\n if (!graphic &&\n isInside &&\n ((markerAttribs.width || 0) > 0 || point.hasImage)) {\n /**\n * SVG graphic representing the point in the chart. In\n * some cases it may be a hidden graphic to improve\n * accessibility.\n *\n * Typically this is a simple shape, like a `rect`\n * for column charts or `path` for line markers, but\n * for some complex series types like boxplot or 3D\n * charts, the graphic may be a `g` element\n * containing other shapes. The graphic is generated\n * the first time {@link Series#drawPoints} runs,\n * and updated and moved on subsequent runs.\n *\n * @see Highcharts.Point#graphics\n *\n * @name Highcharts.Point#graphic\n * @type {Highcharts.SVGElement|undefined}\n */\n point.graphic = graphic = chart.renderer\n .symbol(symbol, markerAttribs.x, markerAttribs.y, markerAttribs.width, markerAttribs.height, hasPointMarker ?\n pointMarkerOptions :\n seriesMarkerOptions)\n .add(markerGroup);\n // Sliding animation for new points\n if (series.enabledDataSorting &&\n chart.hasRendered) {\n graphic.attr({\n x: point.startXPos\n });\n verb = 'animate';\n }\n }\n if (graphic && verb === 'animate') { // update\n // Since the marker group isn't clipped, each\n // individual marker must be toggled\n graphic[isInside ? 'show' : 'hide'](isInside)\n .animate(markerAttribs);\n }\n // Presentational attributes\n if (graphic) {\n var pointAttr = series.pointAttribs(point, ((styledMode || !point.selected) ?\n void 0 :\n 'select'));\n if (!styledMode) {\n graphic[verb](pointAttr);\n }\n else if (colorAxis) { // #14114\n graphic['css']({\n fill: pointAttr.fill\n });\n }\n }\n if (graphic) {\n graphic.addClass(point.getClassName(), true);\n }\n }\n else if (graphic) {\n point.graphic = graphic.destroy(); // #1269\n }\n }\n }\n };\n /**\n * Get non-presentational attributes for a point. Used internally for\n * both styled mode and classic. Can be overridden for different series\n * types.\n *\n * @see Series#pointAttribs\n *\n * @function Highcharts.Series#markerAttribs\n *\n * @param {Highcharts.Point} point\n * The Point to inspect.\n *\n * @param {string} [state]\n * The state, can be either `hover`, `select` or undefined.\n *\n * @return {Highcharts.SVGAttributes}\n * A hash containing those attributes that are not settable from CSS.\n */\n Series.prototype.markerAttribs = function (point, state) {\n var seriesOptions = this.options, seriesMarkerOptions = seriesOptions.marker, pointMarkerOptions = point.marker || {}, symbol = (pointMarkerOptions.symbol ||\n seriesMarkerOptions.symbol), attribs = {};\n var seriesStateOptions, pointStateOptions, radius = pick(pointMarkerOptions.radius, seriesMarkerOptions && seriesMarkerOptions.radius);\n // Handle hover and select states\n if (state) {\n seriesStateOptions = seriesMarkerOptions.states[state];\n pointStateOptions = pointMarkerOptions.states &&\n pointMarkerOptions.states[state];\n radius = pick(pointStateOptions && pointStateOptions.radius, seriesStateOptions && seriesStateOptions.radius, radius && radius + (seriesStateOptions && seriesStateOptions.radiusPlus ||\n 0));\n }\n point.hasImage = symbol && symbol.indexOf('url') === 0;\n if (point.hasImage) {\n radius = 0; // and subsequently width and height is not set\n }\n var pos = point.pos();\n if (isNumber(radius) && pos) {\n attribs.x = pos[0] - radius;\n attribs.y = pos[1] - radius;\n if (seriesOptions.crisp) {\n // Math.floor for #1843:\n attribs.x = Math.floor(attribs.x);\n }\n }\n if (radius) {\n attribs.width = attribs.height = 2 * radius;\n }\n return attribs;\n };\n /**\n * Internal function to get presentational attributes for each point.\n * Unlike {@link Series#markerAttribs}, this function should return\n * those attributes that can also be set in CSS. In styled mode,\n * `pointAttribs` won't be called.\n *\n * @private\n * @function Highcharts.Series#pointAttribs\n *\n * @param {Highcharts.Point} [point]\n * The point instance to inspect.\n *\n * @param {string} [state]\n * The point state, can be either `hover`, `select` or 'normal'. If\n * undefined, normal state is assumed.\n *\n * @return {Highcharts.SVGAttributes}\n * The presentational attributes to be set on the point.\n */\n Series.prototype.pointAttribs = function (point, state) {\n var seriesMarkerOptions = this.options.marker, pointOptions = point && point.options, pointMarkerOptions = ((pointOptions && pointOptions.marker) || {}), pointColorOption = pointOptions && pointOptions.color, pointColor = point && point.color, zoneColor = point && point.zone && point.zone.color;\n var seriesStateOptions, pointStateOptions, color = this.color, fill, stroke, strokeWidth = pick(pointMarkerOptions.lineWidth, seriesMarkerOptions.lineWidth), opacity = 1;\n color = (pointColorOption ||\n zoneColor ||\n pointColor ||\n color);\n fill = (pointMarkerOptions.fillColor ||\n seriesMarkerOptions.fillColor ||\n color);\n stroke = (pointMarkerOptions.lineColor ||\n seriesMarkerOptions.lineColor ||\n color);\n // Handle hover and select states\n state = state || 'normal';\n if (state) {\n seriesStateOptions = (seriesMarkerOptions.states[state] || {});\n pointStateOptions = (pointMarkerOptions.states &&\n pointMarkerOptions.states[state]) || {};\n strokeWidth = pick(pointStateOptions.lineWidth, seriesStateOptions.lineWidth, strokeWidth + pick(pointStateOptions.lineWidthPlus, seriesStateOptions.lineWidthPlus, 0));\n fill = (pointStateOptions.fillColor ||\n seriesStateOptions.fillColor ||\n fill);\n stroke = (pointStateOptions.lineColor ||\n seriesStateOptions.lineColor ||\n stroke);\n opacity = pick(pointStateOptions.opacity, seriesStateOptions.opacity, opacity);\n }\n return {\n 'stroke': stroke,\n 'stroke-width': strokeWidth,\n 'fill': fill,\n 'opacity': opacity\n };\n };\n /**\n * Clear DOM objects and free up memory.\n *\n * @private\n * @function Highcharts.Series#destroy\n *\n * @emits Highcharts.Series#event:destroy\n */\n Series.prototype.destroy = function (keepEventsForUpdate) {\n var series = this, chart = series.chart, issue134 = /AppleWebKit\\/533/.test(win.navigator.userAgent), data = series.data || [];\n var destroy, i, point, axis;\n // add event hook\n fireEvent(series, 'destroy', { keepEventsForUpdate: keepEventsForUpdate });\n // remove events\n this.removeEvents(keepEventsForUpdate);\n // erase from axes\n (series.axisTypes || []).forEach(function (AXIS) {\n axis = series[AXIS];\n if (axis && axis.series) {\n erase(axis.series, series);\n axis.isDirty = axis.forceRedraw = true;\n }\n });\n // remove legend items\n if (series.legendItem) {\n series.chart.legend.destroyItem(series);\n }\n // destroy all points with their elements\n i = data.length;\n while (i--) {\n point = data[i];\n if (point && point.destroy) {\n point.destroy();\n }\n }\n if (series.clips) {\n series.clips.forEach(function (clip) { return clip.destroy(); });\n }\n // Clear the animation timeout if we are destroying the series\n // during initial animation\n U.clearTimeout(series.animationTimeout);\n // Destroy all SVGElements associated to the series\n objectEach(series, function (val, prop) {\n // Survive provides a hook for not destroying\n if (val instanceof SVGElement && !val.survive) {\n // issue 134 workaround\n destroy = issue134 && prop === 'group' ?\n 'hide' :\n 'destroy';\n val[destroy]();\n }\n });\n // remove from hoverSeries\n if (chart.hoverSeries === series) {\n chart.hoverSeries = void 0;\n }\n erase(chart.series, series);\n chart.orderSeries();\n // clear all members\n objectEach(series, function (val, prop) {\n if (!keepEventsForUpdate || prop !== 'hcEvents') {\n delete series[prop];\n }\n });\n };\n /**\n * Clip the graphs into zones for colors and styling.\n *\n * @private\n * @function Highcharts.Series#applyZones\n */\n Series.prototype.applyZones = function () {\n var series = this, chart = this.chart, renderer = chart.renderer, zones = this.zones, clips = (this.clips || []), graph = this.graph, area = this.area, plotSizeMax = Math.max(chart.plotWidth, chart.plotHeight), axis = this[(this.zoneAxis || 'y') + 'Axis'], inverted = chart.inverted;\n var translatedFrom, translatedTo, clipAttr, extremes, reversed, horiz, pxRange, pxPosMin, pxPosMax, zoneArea, zoneGraph, ignoreZones = false;\n if (zones.length &&\n (graph || area) &&\n axis &&\n typeof axis.min !== 'undefined') {\n reversed = axis.reversed;\n horiz = axis.horiz;\n // The use of the Color Threshold assumes there are no gaps\n // so it is safe to hide the original graph and area\n // unless it is not waterfall series, then use showLine property\n // to set lines between columns to be visible (#7862)\n if (graph && !this.showLine) {\n graph.hide();\n }\n if (area) {\n area.hide();\n }\n // Create the clips\n extremes = axis.getExtremes();\n zones.forEach(function (threshold, i) {\n translatedFrom = reversed ?\n (horiz ? chart.plotWidth : 0) :\n (horiz ? 0 : (axis.toPixels(extremes.min) || 0));\n translatedFrom = clamp(pick(translatedTo, translatedFrom), 0, plotSizeMax);\n translatedTo = clamp(Math.round(axis.toPixels(pick(threshold.value, extremes.max), true) || 0), 0, plotSizeMax);\n if (ignoreZones) {\n translatedFrom = translatedTo =\n axis.toPixels(extremes.max);\n }\n pxRange = Math.abs(translatedFrom - translatedTo);\n pxPosMin = Math.min(translatedFrom, translatedTo);\n pxPosMax = Math.max(translatedFrom, translatedTo);\n if (axis.isXAxis) {\n clipAttr = {\n x: inverted ? pxPosMax : pxPosMin,\n y: 0,\n width: pxRange,\n height: plotSizeMax\n };\n if (!horiz) {\n clipAttr.x = chart.plotHeight - clipAttr.x;\n }\n }\n else {\n clipAttr = {\n x: 0,\n y: inverted ? pxPosMax : pxPosMin,\n width: plotSizeMax,\n height: pxRange\n };\n if (horiz) {\n clipAttr.y = chart.plotWidth - clipAttr.y;\n }\n }\n // VML SUPPPORT\n if (inverted && renderer.isVML) {\n if (axis.isXAxis) {\n clipAttr = {\n x: 0,\n y: reversed ? pxPosMin : pxPosMax,\n height: clipAttr.width,\n width: chart.chartWidth\n };\n }\n else {\n clipAttr = {\n x: (clipAttr.y -\n chart.plotLeft -\n chart.spacingBox.x),\n y: 0,\n width: clipAttr.height,\n height: chart.chartHeight\n };\n }\n }\n // END OF VML SUPPORT\n if (clips[i]) {\n clips[i].animate(clipAttr);\n }\n else {\n clips[i] = renderer.clipRect(clipAttr);\n }\n // when no data, graph zone is not applied and after setData\n // clip was ignored. As a result, it should be applied each\n // time.\n zoneArea = series['zone-area-' + i];\n zoneGraph = series['zone-graph-' + i];\n if (graph && zoneGraph) {\n zoneGraph.clip(clips[i]);\n }\n if (area && zoneArea) {\n zoneArea.clip(clips[i]);\n }\n // if this zone extends out of the axis, ignore the others\n ignoreZones = threshold.value > extremes.max;\n // Clear translatedTo for indicators\n if (series.resetZones && translatedTo === 0) {\n translatedTo = void 0;\n }\n });\n this.clips = clips;\n }\n else if (series.visible) {\n // If zones were removed, restore graph and area\n if (graph) {\n graph.show();\n }\n if (area) {\n area.show();\n }\n }\n };\n /**\n * General abstraction for creating plot groups like series.group,\n * series.dataLabelsGroup and series.markerGroup. On subsequent calls,\n * the group will only be adjusted to the updated plot size.\n *\n * @private\n * @function Highcharts.Series#plotGroup\n */\n Series.prototype.plotGroup = function (prop, name, visibility, zIndex, parent) {\n var group = this[prop];\n var isNew = !group, attrs = {\n visibility: visibility,\n zIndex: zIndex || 0.1 // IE8 and pointer logic use this\n };\n // Avoid setting undefined opacity, or in styled mode\n if (typeof this.opacity !== 'undefined' &&\n !this.chart.styledMode && this.state !== 'inactive' // #13719\n ) {\n attrs.opacity = this.opacity;\n }\n // Generate it on first call\n if (isNew) {\n this[prop] = group = this.chart.renderer\n .g()\n .add(parent);\n }\n // Add the class names, and replace existing ones as response to\n // Series.update (#6660)\n group.addClass(('highcharts-' + name +\n ' highcharts-series-' + this.index +\n ' highcharts-' + this.type + '-series ' +\n (defined(this.colorIndex) ?\n 'highcharts-color-' + this.colorIndex + ' ' :\n '') +\n (this.options.className || '') +\n (group.hasClass('highcharts-tracker') ?\n ' highcharts-tracker' :\n '')), true);\n // Place it on first and subsequent (redraw) calls\n group.attr(attrs)[isNew ? 'attr' : 'animate'](this.getPlotBox(name));\n return group;\n };\n /**\n * Get the translation and scale for the plot area of this series.\n *\n * @function Highcharts.Series#getPlotBox\n */\n Series.prototype.getPlotBox = function (name) {\n var horAxis = this.xAxis, vertAxis = this.yAxis;\n var chart = this.chart, inverted = (chart.inverted &&\n !chart.polar &&\n horAxis &&\n this.invertible !== false &&\n name === 'series');\n // Swap axes for inverted (#2339)\n if (chart.inverted) {\n horAxis = vertAxis;\n vertAxis = this.xAxis;\n }\n return {\n translateX: horAxis ? horAxis.left : chart.plotLeft,\n translateY: vertAxis ? vertAxis.top : chart.plotTop,\n rotation: inverted ? 90 : 0,\n rotationOriginX: inverted ?\n (horAxis.len - vertAxis.len) / 2 :\n 0,\n rotationOriginY: inverted ?\n (horAxis.len + vertAxis.len) / 2 :\n 0,\n scaleX: inverted ? -1 : 1,\n scaleY: 1\n };\n };\n /**\n * Removes the event handlers attached previously with addEvents.\n * @private\n * @function Highcharts.Series#removeEvents\n */\n Series.prototype.removeEvents = function (keepEventsForUpdate) {\n var series = this;\n if (!keepEventsForUpdate) {\n // remove all events\n removeEvent(series);\n }\n if (series.eventsToUnbind.length) {\n // remove only internal events for proper update\n // #12355 - solves problem with multiple destroy events\n series.eventsToUnbind.forEach(function (unbind) {\n unbind();\n });\n series.eventsToUnbind.length = 0;\n }\n };\n /**\n * Render the graph and markers. Called internally when first rendering\n * and later when redrawing the chart. This function can be extended in\n * plugins, but normally shouldn't be called directly.\n *\n * @function Highcharts.Series#render\n *\n * @emits Highcharts.Series#event:afterRender\n */\n Series.prototype.render = function () {\n var series = this, chart = series.chart, options = series.options, animOptions = animObject(options.animation), visibility = series.visible ?\n 'inherit' : 'hidden', // #2597\n zIndex = options.zIndex, hasRendered = series.hasRendered, chartSeriesGroup = chart.seriesGroup, inverted = chart.inverted;\n // Animation doesn't work in IE8 quirks when the group div is\n // hidden, and looks bad in other oldIE\n var animDuration = (!series.finishedAnimating && chart.renderer.isSVG) ?\n animOptions.duration : 0;\n fireEvent(this, 'render');\n // the group\n var group = series.plotGroup('group', 'series', visibility, zIndex, chartSeriesGroup);\n series.markerGroup = series.plotGroup('markerGroup', 'markers', visibility, zIndex, chartSeriesGroup);\n // Initial clipping, applies to columns etc. (#3839).\n if (options.clip !== false) {\n series.setClip();\n }\n // Initialize the animation\n if (series.animate && animDuration) {\n series.animate(true);\n }\n // Draw the graph if any\n if (series.drawGraph) {\n series.drawGraph();\n series.applyZones();\n }\n // Draw the points\n if (series.visible) {\n series.drawPoints();\n }\n // Draw the data labels\n if (series.drawDataLabels) {\n series.drawDataLabels();\n }\n // In pie charts, slices are added to the DOM, but actual rendering\n // is postponed until labels reserved their space\n if (series.redrawPoints) {\n series.redrawPoints();\n }\n // draw the mouse tracking area\n if (series.drawTracker &&\n series.options.enableMouseTracking !== false) {\n series.drawTracker();\n }\n // Run the animation\n if (series.animate && animDuration) {\n series.animate();\n }\n // Call the afterAnimate function on animation complete (but don't\n // overwrite the animation.complete option which should be available\n // to the user).\n if (!hasRendered) {\n // Additional time if defer is defined before afterAnimate\n // will be triggered\n if (animDuration && animOptions.defer) {\n animDuration += animOptions.defer;\n }\n series.animationTimeout = syncTimeout(function () {\n series.afterAnimate();\n }, animDuration || 0);\n }\n // Means data is in accordance with what you see\n series.isDirty = false;\n // (See #322) series.isDirty = series.isDirtyData = false; // means\n // data is in accordance with what you see\n series.hasRendered = true;\n fireEvent(series, 'afterRender');\n };\n /**\n * Redraw the series. This function is called internally from\n * `chart.redraw` and normally shouldn't be called directly.\n * @private\n * @function Highcharts.Series#redraw\n */\n Series.prototype.redraw = function () {\n // Cache it here as it is set to false in render, but used after\n var wasDirty = this.isDirty || this.isDirtyData;\n this.translate();\n this.render();\n if (wasDirty) { // #3868, #3945\n delete this.kdTree;\n }\n };\n /**\n * Find the nearest point from a pointer event. This applies to series that\n * use k-d-trees to get the nearest point. Native pointer events must be\n * normalized using `Pointer.normalize`, that adds `chartX` and `chartY`\n * properties.\n *\n * @sample highcharts/demo/synchronized-charts\n * Synchronized charts with tooltips\n *\n * @function Highcharts.Series#searchPoint\n *\n * @param {Highcharts.PointerEvent} e\n * The normalized pointer event\n * @param {boolean} [compareX=false]\n * Search only by the X value, not Y\n *\n * @return {Point|undefined}\n * The closest point to the pointer event\n */\n Series.prototype.searchPoint = function (e, compareX) {\n var series = this, xAxis = series.xAxis, yAxis = series.yAxis, inverted = series.chart.inverted;\n return this.searchKDTree({\n clientX: inverted ?\n xAxis.len - e.chartY + xAxis.pos :\n e.chartX - xAxis.pos,\n plotY: inverted ?\n yAxis.len - e.chartX + yAxis.pos :\n e.chartY - yAxis.pos\n }, compareX, e);\n };\n /**\n * Build the k-d-tree that is used by mouse and touch interaction to get\n * the closest point. Line-like series typically have a one-dimensional\n * tree where points are searched along the X axis, while scatter-like\n * series typically search in two dimensions, X and Y.\n *\n * @private\n * @function Highcharts.Series#buildKDTree\n */\n Series.prototype.buildKDTree = function (e) {\n // Prevent multiple k-d-trees from being built simultaneously\n // (#6235)\n this.buildingKdTree = true;\n var series = this, dimensions = series.options.findNearestPointBy\n .indexOf('y') > -1 ? 2 : 1;\n /**\n * Internal function\n * @private\n */\n function _kdtree(points, depth, dimensions) {\n var length = points && points.length;\n var axis, median;\n if (length) {\n // alternate between the axis\n axis = series.kdAxisArray[depth % dimensions];\n // sort point array\n points.sort(function (a, b) {\n return a[axis] - b[axis];\n });\n median = Math.floor(length / 2);\n // build and return nod\n return {\n point: points[median],\n left: _kdtree(points.slice(0, median), depth + 1, dimensions),\n right: _kdtree(points.slice(median + 1), depth + 1, dimensions)\n };\n }\n }\n /**\n * Start the recursive build process with a clone of the points\n * array and null points filtered out. (#3873)\n * @private\n */\n function startRecursive() {\n series.kdTree = _kdtree(series.getValidPoints(null, \n // For line-type series restrict to plot area, but\n // column-type series not (#3916, #4511)\n !series.directTouch), dimensions, dimensions);\n series.buildingKdTree = false;\n }\n delete series.kdTree;\n // For testing tooltips, don't build async. Also if touchstart, we\n // may be dealing with click events on mobile, so don't delay\n // (#6817).\n syncTimeout(startRecursive, series.options.kdNow || (e && e.type === 'touchstart') ? 0 : 1);\n };\n /**\n * @private\n * @function Highcharts.Series#searchKDTree\n */\n Series.prototype.searchKDTree = function (point, compareX, e) {\n var series = this, kdX = this.kdAxisArray[0], kdY = this.kdAxisArray[1], kdComparer = compareX ? 'distX' : 'dist', kdDimensions = series.options.findNearestPointBy\n .indexOf('y') > -1 ? 2 : 1;\n /**\n * Set the one and two dimensional distance on the point object.\n * @private\n */\n function setDistance(p1, p2) {\n var x = (defined(p1[kdX]) &&\n defined(p2[kdX])) ?\n Math.pow(p1[kdX] - p2[kdX], 2) :\n null, y = (defined(p1[kdY]) &&\n defined(p2[kdY])) ?\n Math.pow(p1[kdY] - p2[kdY], 2) :\n null, r = (x || 0) + (y || 0);\n p2.dist = defined(r) ? Math.sqrt(r) : Number.MAX_VALUE;\n p2.distX = defined(x) ? Math.sqrt(x) : Number.MAX_VALUE;\n }\n /**\n * @private\n */\n function _search(search, tree, depth, dimensions) {\n var point = tree.point, axis = series.kdAxisArray[depth % dimensions];\n var nPoint1, nPoint2, ret = point;\n setDistance(search, point);\n // Pick side based on distance to splitting point\n var tdist = search[axis] - point[axis], sideA = tdist < 0 ? 'left' : 'right', sideB = tdist < 0 ? 'right' : 'left';\n // End of tree\n if (tree[sideA]) {\n nPoint1 = _search(search, tree[sideA], depth + 1, dimensions);\n ret = (nPoint1[kdComparer] <\n ret[kdComparer] ?\n nPoint1 :\n point);\n }\n if (tree[sideB]) {\n // compare distance to current best to splitting point to\n // decide whether to check side B or not\n if (Math.sqrt(tdist * tdist) < ret[kdComparer]) {\n nPoint2 = _search(search, tree[sideB], depth + 1, dimensions);\n ret = (nPoint2[kdComparer] <\n ret[kdComparer] ?\n nPoint2 :\n ret);\n }\n }\n return ret;\n }\n if (!this.kdTree && !this.buildingKdTree) {\n this.buildKDTree(e);\n }\n if (this.kdTree) {\n return _search(point, this.kdTree, kdDimensions, kdDimensions);\n }\n };\n /**\n * @private\n * @function Highcharts.Series#pointPlacementToXValue\n */\n Series.prototype.pointPlacementToXValue = function () {\n var _a = this, _b = _a.options, pointPlacement = _b.pointPlacement, pointRange = _b.pointRange, axis = _a.xAxis;\n var factor = pointPlacement;\n // Point placement is relative to each series pointRange (#5889)\n if (factor === 'between') {\n factor = axis.reversed ? -0.5 : 0.5; // #11955\n }\n return isNumber(factor) ?\n factor * (pointRange || axis.pointRange) :\n 0;\n };\n /**\n * @private\n * @function Highcharts.Series#isPointInside\n */\n Series.prototype.isPointInside = function (point) {\n var _a = this, chart = _a.chart, xAxis = _a.xAxis, yAxis = _a.yAxis, isInside = (typeof point.plotY !== 'undefined' &&\n typeof point.plotX !== 'undefined' &&\n point.plotY >= 0 &&\n point.plotY <= (yAxis ? yAxis.len : chart.plotHeight) &&\n point.plotX >= 0 &&\n point.plotX <= (xAxis ? xAxis.len : chart.plotWidth));\n return isInside;\n };\n /**\n * Draw the tracker object that sits above all data labels and markers to\n * track mouse events on the graph or points. For the line type charts\n * the tracker uses the same graphPath, but with a greater stroke width\n * for better control.\n * @private\n */\n Series.prototype.drawTracker = function () {\n var series = this, options = series.options, trackByArea = options.trackByArea, trackerPath = [].concat(trackByArea ?\n series.areaPath :\n series.graphPath), \n // trackerPathLength = trackerPath.length,\n chart = series.chart, pointer = chart.pointer, renderer = chart.renderer, snap = chart.options.tooltip.snap, tracker = series.tracker, onMouseOver = function (e) {\n if (chart.hoverSeries !== series) {\n series.onMouseOver();\n }\n }, \n /*\n * Empirical lowest possible opacities for TRACKER_FILL for an\n * element to stay invisible but clickable\n * IE6: 0.002\n * IE7: 0.002\n * IE8: 0.002\n * IE9: 0.00000000001 (unlimited)\n * IE10: 0.0001 (exporting only)\n * FF: 0.00000000001 (unlimited)\n * Chrome: 0.000001\n * Safari: 0.000001\n * Opera: 0.00000000001 (unlimited)\n */\n TRACKER_FILL = 'rgba(192,192,192,' + (svg ? 0.0001 : 0.002) + ')';\n var i;\n // Draw the tracker\n if (tracker) {\n tracker.attr({ d: trackerPath });\n }\n else if (series.graph) { // create\n series.tracker = renderer.path(trackerPath)\n .attr({\n visibility: series.visible ? 'inherit' : 'hidden',\n zIndex: 2\n })\n .addClass(trackByArea ?\n 'highcharts-tracker-area' :\n 'highcharts-tracker-line')\n .add(series.group);\n if (!chart.styledMode) {\n series.tracker.attr({\n 'stroke-linecap': 'round',\n 'stroke-linejoin': 'round',\n stroke: TRACKER_FILL,\n fill: trackByArea ? TRACKER_FILL : 'none',\n 'stroke-width': series.graph.strokeWidth() +\n (trackByArea ? 0 : 2 * snap)\n });\n }\n // The tracker is added to the series group, which is clipped, but\n // is covered by the marker group. So the marker group also needs to\n // capture events.\n [\n series.tracker,\n series.markerGroup,\n series.dataLabelsGroup\n ].forEach(function (tracker) {\n if (tracker) {\n tracker.addClass('highcharts-tracker')\n .on('mouseover', onMouseOver)\n .on('mouseout', function (e) {\n pointer.onTrackerMouseOut(e);\n });\n if (options.cursor && !chart.styledMode) {\n tracker.css({ cursor: options.cursor });\n }\n if (hasTouch) {\n tracker.on('touchstart', onMouseOver);\n }\n }\n });\n }\n fireEvent(this, 'afterDrawTracker');\n };\n /**\n * Add a point to the series after render time. The point can be added at\n * the end, or by giving it an X value, to the start or in the middle of the\n * series.\n *\n * @sample highcharts/members/series-addpoint-append/\n * Append point\n * @sample highcharts/members/series-addpoint-append-and-shift/\n * Append and shift\n * @sample highcharts/members/series-addpoint-x-and-y/\n * Both X and Y values given\n * @sample highcharts/members/series-addpoint-pie/\n * Append pie slice\n * @sample stock/members/series-addpoint/\n * Append 100 points in Highcharts Stock\n * @sample stock/members/series-addpoint-shift/\n * Append and shift in Highcharts Stock\n * @sample maps/members/series-addpoint/\n * Add a point in Highmaps\n *\n * @function Highcharts.Series#addPoint\n *\n * @param {Highcharts.PointOptionsType} options\n * The point options. If options is a single number, a point with\n * that y value is appended to the series. If it is an array, it will\n * be interpreted as x and y values respectively. If it is an\n * object, advanced options as outlined under `series.data` are\n * applied.\n *\n * @param {boolean} [redraw=true]\n * Whether to redraw the chart after the point is added. When adding\n * more than one point, it is highly recommended that the redraw\n * option be set to false, and instead {@link Chart#redraw} is\n * explicitly called after the adding of points is finished.\n * Otherwise, the chart will redraw after adding each point.\n *\n * @param {boolean} [shift=false]\n * If true, a point is shifted off the start of the series as one is\n * appended to the end.\n *\n * @param {boolean|Partial} [animation]\n * Whether to apply animation, and optionally animation\n * configuration.\n *\n * @param {boolean} [withEvent=true]\n * Used internally, whether to fire the series `addPoint` event.\n *\n * @emits Highcharts.Series#event:addPoint\n */\n Series.prototype.addPoint = function (options, redraw, shift, animation, withEvent) {\n var series = this, seriesOptions = series.options, data = series.data, chart = series.chart, xAxis = series.xAxis, names = xAxis && xAxis.hasNames && xAxis.names, dataOptions = seriesOptions.data, xData = series.xData;\n var isInTheMiddle, i;\n // Optional redraw, defaults to true\n redraw = pick(redraw, true);\n // Get options and push the point to xData, yData and series.options. In\n // series.generatePoints the Point instance will be created on demand\n // and pushed to the series.data array.\n var point = { series: series };\n series.pointClass.prototype.applyOptions.apply(point, [options]);\n var x = point.x;\n // Get the insertion point\n i = xData.length;\n if (series.requireSorting && x < xData[i - 1]) {\n isInTheMiddle = true;\n while (i && xData[i - 1] > x) {\n i--;\n }\n }\n // Insert undefined item\n series.updateParallelArrays(point, 'splice', i, 0, 0);\n // Update it\n series.updateParallelArrays(point, i);\n if (names && point.name) {\n names[x] = point.name;\n }\n dataOptions.splice(i, 0, options);\n if (isInTheMiddle ||\n // When processedData is present we need to splice an empty slot\n // into series.data, otherwise generatePoints won't pick it up.\n series.processedData) {\n series.data.splice(i, 0, null);\n series.processData();\n }\n // Generate points to be added to the legend (#1329)\n if (seriesOptions.legendType === 'point') {\n series.generatePoints();\n }\n // Shift the first point off the parallel arrays\n if (shift) {\n if (data[0] && (data[0].remove)) {\n data[0].remove(false);\n }\n else {\n data.shift();\n series.updateParallelArrays(point, 'shift');\n dataOptions.shift();\n }\n }\n // Fire event\n if (withEvent !== false) {\n fireEvent(series, 'addPoint', { point: point });\n }\n // redraw\n series.isDirty = true;\n series.isDirtyData = true;\n if (redraw) {\n chart.redraw(animation); // Animation is set anyway on redraw, #5665\n }\n };\n /**\n * Remove a point from the series. Unlike the\n * {@link Highcharts.Point#remove} method, this can also be done on a point\n * that is not instanciated because it is outside the view or subject to\n * Highcharts Stock data grouping.\n *\n * @sample highcharts/members/series-removepoint/\n * Remove cropped point\n *\n * @function Highcharts.Series#removePoint\n *\n * @param {number} i\n * The index of the point in the {@link Highcharts.Series.data|data}\n * array.\n *\n * @param {boolean} [redraw=true]\n * Whether to redraw the chart after the point is added. When\n * removing more than one point, it is highly recommended that the\n * `redraw` option be set to `false`, and instead {@link\n * Highcharts.Chart#redraw} is explicitly called after the adding of\n * points is finished.\n *\n * @param {boolean|Partial} [animation]\n * Whether and optionally how the series should be animated.\n *\n * @emits Highcharts.Point#event:remove\n */\n Series.prototype.removePoint = function (i, redraw, animation) {\n var series = this, data = series.data, point = data[i], points = series.points, chart = series.chart, remove = function () {\n if (points && points.length === data.length) { // #4935\n points.splice(i, 1);\n }\n data.splice(i, 1);\n series.options.data.splice(i, 1);\n series.updateParallelArrays(point || { series: series }, 'splice', i, 1);\n if (point) {\n point.destroy();\n }\n // redraw\n series.isDirty = true;\n series.isDirtyData = true;\n if (redraw) {\n chart.redraw();\n }\n };\n setAnimation(animation, chart);\n redraw = pick(redraw, true);\n // Fire the event with a default handler of removing the point\n if (point) {\n point.firePointEvent('remove', null, remove);\n }\n else {\n remove();\n }\n };\n /**\n * Remove a series and optionally redraw the chart.\n *\n * @sample highcharts/members/series-remove/\n * Remove first series from a button\n *\n * @function Highcharts.Series#remove\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} [animation]\n * Whether to apply animation, and optionally animation\n * configuration.\n *\n * @param {boolean} [withEvent=true]\n * Used internally, whether to fire the series `remove` event.\n *\n * @emits Highcharts.Series#event:remove\n */\n Series.prototype.remove = function (redraw, animation, withEvent, keepEvents) {\n var series = this, chart = series.chart;\n /**\n * @private\n */\n function remove() {\n // Destroy elements\n series.destroy(keepEvents);\n // Redraw\n chart.isDirtyLegend = chart.isDirtyBox = true;\n chart.linkSeries();\n if (pick(redraw, true)) {\n chart.redraw(animation);\n }\n }\n // Fire the event with a default handler of removing the point\n if (withEvent !== false) {\n fireEvent(series, 'remove', null, remove);\n }\n else {\n remove();\n }\n };\n /**\n * Update the series with a new set of options. For a clean and precise\n * handling of new options, all methods and elements from the series are\n * removed, and it is initialized from scratch. Therefore, this method is\n * more performance expensive than some other utility methods like {@link\n * Series#setData} or {@link Series#setVisible}.\n *\n * Note that `Series.update` may mutate the passed `data` options.\n *\n * @sample highcharts/members/series-update/\n * Updating series options\n * @sample maps/members/series-update/\n * Update series options in Highmaps\n *\n * @function Highcharts.Series#update\n *\n * @param {Highcharts.SeriesOptionsType} options\n * New options that will be merged with the series' existing options.\n *\n * @param {boolean} [redraw=true]\n * Whether to redraw the chart after the series is altered. If doing\n * more operations on the chart, it is a good idea to set redraw to\n * false and call {@link Chart#redraw} after.\n *\n * @emits Highcharts.Series#event:update\n * @emits Highcharts.Series#event:afterUpdate\n */\n Series.prototype.update = function (options, redraw) {\n options = cleanRecursively(options, this.userOptions);\n fireEvent(this, 'update', { options: options });\n var series = this, chart = series.chart, \n // must use user options when changing type because series.options\n // is merged in with type specific plotOptions\n oldOptions = series.userOptions, initialType = series.initialType || series.type, plotOptions = chart.options.plotOptions, initialSeriesProto = seriesTypes[initialType].prototype, groups = [\n 'group',\n 'markerGroup',\n 'dataLabelsGroup',\n 'transformGroup',\n 'shadowGroup'\n ], \n // Animation must be enabled when calling update before the initial\n // animation has first run. This happens when calling update\n // directly after chart initialization, or when applying responsive\n // rules (#6912).\n animation = series.finishedAnimating && { animation: false }, kinds = {};\n var seriesOptions, n, preserve = [\n 'eventOptions',\n 'navigatorSeries',\n 'baseSeries'\n ], newType = (options.type ||\n oldOptions.type ||\n chart.options.chart.type);\n var keepPoints = !(\n // Indicators, histograms etc recalculate the data. It should be\n // possible to omit this.\n this.hasDerivedData ||\n // New type requires new point classes\n (newType && newType !== this.type) ||\n // New options affecting how the data points are built\n typeof options.pointStart !== 'undefined' ||\n typeof options.pointInterval !== 'undefined' ||\n typeof options.relativeXValue !== 'undefined' ||\n options.joinBy ||\n options.mapData || // #11636\n // Changes to data grouping requires new points in new group\n series.hasOptionChanged('dataGrouping') ||\n series.hasOptionChanged('pointStart') ||\n series.hasOptionChanged('pointInterval') ||\n series.hasOptionChanged('pointIntervalUnit') ||\n series.hasOptionChanged('keys'));\n newType = newType || initialType;\n if (keepPoints) {\n preserve.push('data', 'isDirtyData', 'points', 'processedData', // #17057\n 'processedXData', 'processedYData', 'xIncrement', 'cropped', '_hasPointMarkers', '_hasPointLabels', 'clips', // #15420\n // Networkgraph (#14397)\n 'nodes', 'layout', \n // Treemap\n 'level', \n // Map specific, consider moving it to series-specific preserve-\n // properties (#10617)\n 'mapMap', 'mapData', 'minY', 'maxY', 'minX', 'maxX');\n if (options.visible !== false) {\n preserve.push('area', 'graph');\n }\n series.parallelArrays.forEach(function (key) {\n preserve.push(key + 'Data');\n });\n if (options.data) {\n // setData uses dataSorting options so we need to update them\n // earlier\n if (options.dataSorting) {\n extend(series.options.dataSorting, options.dataSorting);\n }\n this.setData(options.data, false);\n }\n }\n // Do the merge, with some forced options\n options = merge(oldOptions, animation, {\n // When oldOptions.index is null it should't be cleared.\n // Otherwise navigator series will have wrong indexes (#10193).\n index: typeof oldOptions.index === 'undefined' ?\n series.index : oldOptions.index,\n pointStart: pick(\n // when updating from blank (#7933)\n (plotOptions &&\n plotOptions.series &&\n plotOptions.series.pointStart), oldOptions.pointStart, \n // when updating after addPoint\n series.xData[0])\n }, (!keepPoints && { data: series.options.data }), options);\n // Merge does not merge arrays, but replaces them. Since points were\n // updated, `series.options.data` has correct merged options, use it:\n if (keepPoints && options.data) {\n options.data = series.options.data;\n }\n // Make sure preserved properties are not destroyed (#3094)\n preserve = groups.concat(preserve);\n preserve.forEach(function (prop) {\n preserve[prop] = series[prop];\n delete series[prop];\n });\n var casting = false;\n if (seriesTypes[newType]) {\n casting = newType !== series.type;\n // Destroy the series and delete all properties, it will be\n // reinserted within the `init` call below\n series.remove(false, false, false, true);\n if (casting) {\n // Modern browsers including IE11\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(series, seriesTypes[newType].prototype);\n // Legacy (IE < 11)\n }\n else {\n var ownEvents = Object.hasOwnProperty.call(series, 'hcEvents') && series.hcEvents;\n for (n in initialSeriesProto) { // eslint-disable-line guard-for-in\n series[n] = void 0;\n }\n // Reinsert all methods and properties from the new type\n // prototype (#2270, #3719).\n extend(series, seriesTypes[newType].prototype);\n // The events are tied to the prototype chain, don't copy if\n // they're not the series' own\n if (ownEvents) {\n series.hcEvents = ownEvents;\n }\n else {\n delete series.hcEvents;\n }\n }\n }\n }\n else {\n error(17, true, chart, { missingModuleFor: newType });\n }\n // Re-register groups (#3094) and other preserved properties\n preserve.forEach(function (prop) {\n series[prop] = preserve[prop];\n });\n series.init(chart, options);\n // Remove particular elements of the points. Check `series.options`\n // because we need to consider the options being set on plotOptions as\n // well.\n if (keepPoints && this.points) {\n seriesOptions = series.options;\n // What kind of elements to destroy\n if (seriesOptions.visible === false) {\n kinds.graphic = 1;\n kinds.dataLabel = 1;\n }\n else if (!series._hasPointLabels) {\n var marker = seriesOptions.marker, dataLabels = seriesOptions.dataLabels, oldMarker = oldOptions.marker || {};\n // If the marker got disabled or changed its symbol, width or\n // height - destroy\n if (marker && (marker.enabled === false ||\n oldMarker.symbol !== marker.symbol || // #10870, #15946\n oldMarker.height !== marker.height || // #16274\n oldMarker.width !== marker.width // #16274\n )) {\n kinds.graphic = 1;\n }\n if (dataLabels &&\n dataLabels.enabled === false) {\n kinds.dataLabel = 1;\n }\n }\n for (var _a = 0, _b = this.points; _a < _b.length; _a++) {\n var point = _b[_a];\n if (point && point.series) {\n point.resolveColor();\n // Destroy elements in order to recreate based on updated\n // series options.\n if (Object.keys(kinds).length) {\n point.destroyElements(kinds);\n }\n if (seriesOptions.showInLegend === false &&\n point.legendItem) {\n chart.legend.destroyItem(point);\n }\n }\n }\n }\n series.initialType = initialType;\n chart.linkSeries(); // Links are lost in series.remove (#3028)\n // #15383: Fire updatedData if the type has changed to keep linked\n // series such as indicators updated\n if (casting && series.linkedSeries.length) {\n series.isDirtyData = true;\n }\n fireEvent(this, 'afterUpdate');\n if (pick(redraw, true)) {\n chart.redraw(keepPoints ? void 0 : false);\n }\n };\n /**\n * Used from within series.update\n * @private\n */\n Series.prototype.setName = function (name) {\n this.name = this.options.name = this.userOptions.name = name;\n this.chart.isDirtyLegend = true;\n };\n /**\n * Check if the option has changed.\n * @private\n */\n Series.prototype.hasOptionChanged = function (optionName) {\n var chart = this.chart, option = this.options[optionName], plotOptions = chart.options.plotOptions, oldOption = this.userOptions[optionName];\n if (oldOption) {\n return option !== oldOption;\n }\n return option !==\n pick(plotOptions &&\n plotOptions[this.type] &&\n plotOptions[this.type][optionName], plotOptions &&\n plotOptions.series &&\n plotOptions.series[optionName], option);\n };\n /**\n * Runs on mouse over the series graphical items.\n *\n * @function Highcharts.Series#onMouseOver\n * @emits Highcharts.Series#event:mouseOver\n */\n Series.prototype.onMouseOver = function () {\n var series = this, chart = series.chart, hoverSeries = chart.hoverSeries, pointer = chart.pointer;\n pointer.setHoverChartIndex();\n // set normal state to previous series\n if (hoverSeries && hoverSeries !== series) {\n hoverSeries.onMouseOut();\n }\n // trigger the event, but to save processing time,\n // only if defined\n if (series.options.events.mouseOver) {\n fireEvent(series, 'mouseOver');\n }\n // hover this\n series.setState('hover');\n /**\n * Contains the original hovered series.\n *\n * @name Highcharts.Chart#hoverSeries\n * @type {Highcharts.Series|null}\n */\n chart.hoverSeries = series;\n };\n /**\n * Runs on mouse out of the series graphical items.\n *\n * @function Highcharts.Series#onMouseOut\n *\n * @emits Highcharts.Series#event:mouseOut\n */\n Series.prototype.onMouseOut = function () {\n // trigger the event only if listeners exist\n var series = this, options = series.options, chart = series.chart, tooltip = chart.tooltip, hoverPoint = chart.hoverPoint;\n // #182, set to null before the mouseOut event fires\n chart.hoverSeries = null;\n // trigger mouse out on the point, which must be in this series\n if (hoverPoint) {\n hoverPoint.onMouseOut();\n }\n // fire the mouse out event\n if (series && options.events.mouseOut) {\n fireEvent(series, 'mouseOut');\n }\n // hide the tooltip\n if (tooltip &&\n !series.stickyTracking &&\n (!tooltip.shared || series.noSharedTooltip)) {\n tooltip.hide();\n }\n // Reset all inactive states\n chart.series.forEach(function (s) {\n s.setState('', true);\n });\n };\n /**\n * Set the state of the series. Called internally on mouse interaction\n * operations, but it can also be called directly to visually\n * highlight a series.\n *\n * @function Highcharts.Series#setState\n *\n * @param {Highcharts.SeriesStateValue|\"\"} [state]\n * The new state, can be either `'hover'`, `'inactive'`, `'select'`,\n * or `''` (an empty string), `'normal'` or `undefined` to set to\n * normal state.\n * @param {boolean} [inherit]\n * Determines if state should be inherited by points too.\n */\n Series.prototype.setState = function (state, inherit) {\n var series = this, options = series.options, graph = series.graph, inactiveOtherPoints = options.inactiveOtherPoints, stateOptions = options.states, \n // By default a quick animation to hover/inactive,\n // slower to un-hover\n stateAnimation = pick((stateOptions[state || 'normal'] &&\n stateOptions[state || 'normal'].animation), series.chart.options.chart.animation);\n var attribs, lineWidth = options.lineWidth, i = 0, opacity = options.opacity;\n state = state || '';\n if (series.state !== state) {\n // Toggle class names\n [\n series.group,\n series.markerGroup,\n series.dataLabelsGroup\n ].forEach(function (group) {\n if (group) {\n // Old state\n if (series.state) {\n group.removeClass('highcharts-series-' + series.state);\n }\n // New state\n if (state) {\n group.addClass('highcharts-series-' + state);\n }\n }\n });\n series.state = state;\n if (!series.chart.styledMode) {\n if (stateOptions[state] &&\n stateOptions[state].enabled === false) {\n return;\n }\n if (state) {\n lineWidth = (stateOptions[state].lineWidth ||\n lineWidth + (stateOptions[state].lineWidthPlus || 0)); // #4035\n opacity = pick(stateOptions[state].opacity, opacity);\n }\n if (graph && !graph.dashstyle && isNumber(lineWidth)) {\n attribs = {\n 'stroke-width': lineWidth\n };\n // Animate the graph stroke-width.\n graph.animate(attribs, stateAnimation);\n while (series['zone-graph-' + i]) {\n series['zone-graph-' + i].animate(attribs, stateAnimation);\n i = i + 1;\n }\n }\n // For some types (pie, networkgraph, sankey) opacity is\n // resolved on a point level\n if (!inactiveOtherPoints) {\n [\n series.group,\n series.markerGroup,\n series.dataLabelsGroup,\n series.labelBySeries\n ].forEach(function (group) {\n if (group) {\n group.animate({\n opacity: opacity\n }, stateAnimation);\n }\n });\n }\n }\n }\n // Don't loop over points on a series that doesn't apply inactive state\n // to siblings markers (e.g. line, column)\n if (inherit && inactiveOtherPoints && series.points) {\n series.setAllPointsToState(state || void 0);\n }\n };\n /**\n * Set the state for all points in the series.\n *\n * @function Highcharts.Series#setAllPointsToState\n *\n * @private\n *\n * @param {string} [state]\n * Can be either `hover` or undefined to set to normal state.\n */\n Series.prototype.setAllPointsToState = function (state) {\n this.points.forEach(function (point) {\n if (point.setState) {\n point.setState(state);\n }\n });\n };\n /**\n * Show or hide the series.\n *\n * @function Highcharts.Series#setVisible\n *\n * @param {boolean} [visible]\n * True to show the series, false to hide. If undefined, the visibility is\n * toggled.\n *\n * @param {boolean} [redraw=true]\n * Whether to redraw the chart after the series 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|chart.redraw()} after.\n *\n * @emits Highcharts.Series#event:hide\n * @emits Highcharts.Series#event:show\n */\n Series.prototype.setVisible = function (vis, redraw) {\n var series = this, chart = series.chart, ignoreHiddenSeries = chart.options.chart.ignoreHiddenSeries, oldVisibility = series.visible;\n // if called without an argument, toggle visibility\n series.visible =\n vis =\n series.options.visible =\n series.userOptions.visible =\n typeof vis === 'undefined' ? !oldVisibility : vis; // #5618\n var showOrHide = vis ? 'show' : 'hide';\n // show or hide elements\n [\n 'group',\n 'dataLabelsGroup',\n 'markerGroup',\n 'tracker',\n 'tt'\n ].forEach(function (key) {\n if (series[key]) {\n series[key][showOrHide]();\n }\n });\n // hide tooltip (#1361)\n if (chart.hoverSeries === series ||\n (chart.hoverPoint && chart.hoverPoint.series) === series) {\n series.onMouseOut();\n }\n if (series.legendItem) {\n chart.legend.colorizeItem(series, vis);\n }\n // rescale or adapt to resized chart\n series.isDirty = true;\n // in a stack, all other series are affected\n if (series.options.stacking) {\n chart.series.forEach(function (otherSeries) {\n if (otherSeries.options.stacking && otherSeries.visible) {\n otherSeries.isDirty = true;\n }\n });\n }\n // show or hide linked series\n series.linkedSeries.forEach(function (otherSeries) {\n otherSeries.setVisible(vis, false);\n });\n if (ignoreHiddenSeries) {\n chart.isDirtyBox = true;\n }\n fireEvent(series, showOrHide);\n if (redraw !== false) {\n chart.redraw();\n }\n };\n /**\n * Show the series if hidden.\n *\n * @sample highcharts/members/series-hide/\n * Toggle visibility from a button\n *\n * @function Highcharts.Series#show\n * @emits Highcharts.Series#event:show\n */\n Series.prototype.show = function () {\n this.setVisible(true);\n };\n /**\n * Hide the series if visible. If the\n * [chart.ignoreHiddenSeries](https://api.highcharts.com/highcharts/chart.ignoreHiddenSeries)\n * option is true, the chart is redrawn without this series.\n *\n * @sample highcharts/members/series-hide/\n * Toggle visibility from a button\n *\n * @function Highcharts.Series#hide\n * @emits Highcharts.Series#event:hide\n */\n Series.prototype.hide = function () {\n this.setVisible(false);\n };\n /**\n * Select or unselect the series. This means its\n * {@link Highcharts.Series.selected|selected}\n * property is set, the checkbox in the legend is toggled and when selected,\n * the series is returned by the {@link Highcharts.Chart#getSelectedSeries}\n * function.\n *\n * @sample highcharts/members/series-select/\n * Select a series from a button\n *\n * @function Highcharts.Series#select\n *\n * @param {boolean} [selected]\n * True to select the series, false to unselect. If undefined, the selection\n * state is toggled.\n *\n * @emits Highcharts.Series#event:select\n * @emits Highcharts.Series#event:unselect\n */\n Series.prototype.select = function (selected) {\n var series = this;\n series.selected =\n selected =\n this.options.selected = (typeof selected === 'undefined' ?\n !series.selected :\n selected);\n if (series.checkbox) {\n series.checkbox.checked = selected;\n }\n fireEvent(series, selected ? 'select' : 'unselect');\n };\n /**\n * Checks if a tooltip should be shown for a given point.\n *\n * @private\n */\n Series.prototype.shouldShowTooltip = function (plotX, plotY, options) {\n if (options === void 0) { options = {}; }\n options.series = this;\n options.visiblePlotOnly = true;\n return this.chart.isInsidePlot(plotX, plotY, options);\n };\n Series.defaultOptions = SeriesDefaults;\n /**\n * Registry of all available series types.\n *\n * @name Highcharts.Series.types\n * @type {Highcharts.Dictionary}\n */\n Series.types = SeriesRegistry.seriesTypes;\n /* *\n *\n * Static Functions\n *\n * */\n /**\n * Registers a series class to be accessible via `Series.types`.\n *\n * @function Highcharts.Series.registerType\n *\n * @param {string} seriesType\n * The series type as an identifier string in lower case.\n *\n * @param {Function} SeriesClass\n * The series class as a class pattern or a constructor function with\n * prototype.\n */\n Series.registerType = SeriesRegistry.registerSeriesType;\n return Series;\n}());\nextend(Series.prototype, {\n axisTypes: ['xAxis', 'yAxis'],\n coll: 'series',\n colorCounter: 0,\n cropShoulder: 1,\n directTouch: false,\n drawLegendSymbol: LegendSymbol.drawLineMarker,\n isCartesian: true,\n kdAxisArray: ['clientX', 'plotY'],\n // each point's x and y values are stored in this.xData and this.yData:\n parallelArrays: ['x', 'y'],\n pointClass: Point,\n requireSorting: true,\n // requires the data to be sorted:\n sorted: true\n});\n/* *\n *\n * Registry\n *\n * */\nSeriesRegistry.series = Series;\n/* *\n *\n * Default Export\n *\n * */\nexport default Series;\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * This is a placeholder type of the possible series options for\n * [Highcharts](../highcharts/series), [Highcharts Stock](../highstock/series),\n * [Highmaps](../highmaps/series), and [Gantt](../gantt/series).\n *\n * In TypeScript is this dynamically generated to reference all possible types\n * of series options.\n *\n * @ignore-declaration\n * @typedef {Highcharts.SeriesOptions|Highcharts.Dictionary<*>} Highcharts.SeriesOptionsType\n */\n/**\n * Options for `dataSorting`.\n *\n * @interface Highcharts.DataSortingOptionsObject\n * @since 8.0.0\n */ /**\n* Enable or disable data sorting for the series.\n* @name Highcharts.DataSortingOptionsObject#enabled\n* @type {boolean|undefined}\n*/ /**\n* Whether to allow matching points by name in an update.\n* @name Highcharts.DataSortingOptionsObject#matchByName\n* @type {boolean|undefined}\n*/ /**\n* Determines what data value should be used to sort by.\n* @name Highcharts.DataSortingOptionsObject#sortKey\n* @type {string|undefined}\n*/\n/**\n * Function callback when a series has been animated.\n *\n * @callback Highcharts.SeriesAfterAnimateCallbackFunction\n *\n * @param {Highcharts.Series} this\n * The series where the event occured.\n *\n * @param {Highcharts.SeriesAfterAnimateEventObject} event\n * Event arguments.\n */\n/**\n * Event information regarding completed animation of a series.\n *\n * @interface Highcharts.SeriesAfterAnimateEventObject\n */ /**\n* Animated series.\n* @name Highcharts.SeriesAfterAnimateEventObject#target\n* @type {Highcharts.Series}\n*/ /**\n* Event type.\n* @name Highcharts.SeriesAfterAnimateEventObject#type\n* @type {\"afterAnimate\"}\n*/\n/**\n * Function callback when the checkbox next to the series' name in the legend is\n * clicked.\n *\n * @callback Highcharts.SeriesCheckboxClickCallbackFunction\n *\n * @param {Highcharts.Series} this\n * The series where the event occured.\n *\n * @param {Highcharts.SeriesCheckboxClickEventObject} event\n * Event arguments.\n */\n/**\n * Event information regarding check of a series box.\n *\n * @interface Highcharts.SeriesCheckboxClickEventObject\n */ /**\n* Whether the box has been checked.\n* @name Highcharts.SeriesCheckboxClickEventObject#checked\n* @type {boolean}\n*/ /**\n* Related series.\n* @name Highcharts.SeriesCheckboxClickEventObject#item\n* @type {Highcharts.Series}\n*/ /**\n* Related series.\n* @name Highcharts.SeriesCheckboxClickEventObject#target\n* @type {Highcharts.Series}\n*/ /**\n* Event type.\n* @name Highcharts.SeriesCheckboxClickEventObject#type\n* @type {\"checkboxClick\"}\n*/\n/**\n * Function callback when a series is clicked. Return false to cancel toogle\n * actions.\n *\n * @callback Highcharts.SeriesClickCallbackFunction\n *\n * @param {Highcharts.Series} this\n * The series where the event occured.\n *\n * @param {Highcharts.SeriesClickEventObject} event\n * Event arguments.\n */\n/**\n * Common information for a click event on a series.\n *\n * @interface Highcharts.SeriesClickEventObject\n * @extends global.Event\n */ /**\n* Nearest point on the graph.\n* @name Highcharts.SeriesClickEventObject#point\n* @type {Highcharts.Point}\n*/\n/**\n * Gets fired when the series is hidden after chart generation time, either by\n * clicking the legend item or by calling `.hide()`.\n *\n * @callback Highcharts.SeriesHideCallbackFunction\n *\n * @param {Highcharts.Series} this\n * The series where the event occured.\n *\n * @param {global.Event} event\n * The event that occured.\n */\n/**\n * The SVG value used for the `stroke-linecap` and `stroke-linejoin` of a line\n * graph.\n *\n * @typedef {\"butt\"|\"round\"|\"square\"|string} Highcharts.SeriesLinecapValue\n */\n/**\n * Gets fired when the legend item belonging to the series is clicked. The\n * default action is to toggle the visibility of the series. This can be\n * prevented by returning `false` or calling `event.preventDefault()`.\n *\n * @callback Highcharts.SeriesLegendItemClickCallbackFunction\n *\n * @param {Highcharts.Series} this\n * The series where the event occured.\n *\n * @param {Highcharts.SeriesLegendItemClickEventObject} event\n * The event that occured.\n */\n/**\n * Information about the event.\n *\n * @interface Highcharts.SeriesLegendItemClickEventObject\n */ /**\n* Related browser event.\n* @name Highcharts.SeriesLegendItemClickEventObject#browserEvent\n* @type {global.PointerEvent}\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.SeriesCheckboxClickEventObject#target\n* @type {Highcharts.Series}\n*/ /**\n* Event type.\n* @name Highcharts.SeriesCheckboxClickEventObject#type\n* @type {\"checkboxClick\"}\n*/\n/**\n * Gets fired when the mouse leaves the graph.\n *\n * @callback Highcharts.SeriesMouseOutCallbackFunction\n *\n * @param {Highcharts.Series} this\n * Series where the event occured.\n *\n * @param {global.PointerEvent} event\n * Event that occured.\n */\n/**\n * Gets fired when the mouse enters the graph.\n *\n * @callback Highcharts.SeriesMouseOverCallbackFunction\n *\n * @param {Highcharts.Series} this\n * Series where the event occured.\n *\n * @param {global.PointerEvent} event\n * Event that occured.\n */\n/**\n * Translation and scale for the plot area of a series.\n *\n * @interface Highcharts.SeriesPlotBoxObject\n */ /**\n* @name Highcharts.SeriesPlotBoxObject#scaleX\n* @type {number}\n*/ /**\n* @name Highcharts.SeriesPlotBoxObject#scaleY\n* @type {number}\n*/ /**\n* @name Highcharts.SeriesPlotBoxObject#translateX\n* @type {number}\n*/ /**\n* @name Highcharts.SeriesPlotBoxObject#translateY\n* @type {number}\n*/\n/**\n * Gets fired when the series is shown after chart generation time, either by\n * clicking the legend item or by calling `.show()`.\n *\n * @callback Highcharts.SeriesShowCallbackFunction\n *\n * @param {Highcharts.Series} this\n * Series where the event occured.\n *\n * @param {global.Event} event\n * Event that occured.\n */\n/**\n * Possible key values for the series state options.\n *\n * @typedef {\"hover\"|\"inactive\"|\"normal\"|\"select\"} Highcharts.SeriesStateValue\n */\n''; // detach doclets above\n/* *\n *\n * API Options\n *\n * */\n/**\n * Series options for specific data and the data itself. In TypeScript you\n * have to cast the series options to specific series types, to get all\n * possible options for a series.\n *\n * @example\n * // TypeScript example\n * Highcharts.chart('container', {\n * series: [{\n * color: '#06C',\n * data: [[0, 1], [2, 3]]\n * } as Highcharts.SeriesLineOptions ]\n * });\n *\n * @type {Array<*>}\n * @apioption series\n */\n/**\n * An id for the series. This can be used after render time to get a pointer\n * to the series object through `chart.get()`.\n *\n * @sample {highcharts} highcharts/plotoptions/series-id/\n * Get series by id\n *\n * @type {string}\n * @since 1.2.0\n * @apioption series.id\n */\n/**\n * The index of the series in the chart, affecting the internal index in the\n * `chart.series` array, the visible Z index as well as the order in the\n * legend.\n *\n * @type {number}\n * @since 2.3.0\n * @apioption series.index\n */\n/**\n * The sequential index of the series in the legend.\n *\n * @see [legend.reversed](#legend.reversed),\n * [yAxis.reversedStacks](#yAxis.reversedStacks)\n *\n * @sample {highcharts|highstock} highcharts/series/legendindex/\n * Legend in opposite order\n *\n * @type {number}\n * @apioption series.legendIndex\n */\n/**\n * The name of the series as shown in the legend, tooltip etc.\n *\n * @sample {highcharts} highcharts/series/name/\n * Series name\n * @sample {highmaps} maps/demo/category-map/\n * Series name\n *\n * @type {string}\n * @apioption series.name\n */\n/**\n * This option allows grouping series in a stacked chart. The stack option\n * can be a string or anything else, as long as the grouped series' stack\n * options match each other after conversion into a string.\n *\n * @sample {highcharts} highcharts/series/stack/\n * Stacked and grouped columns\n *\n * @type {number|string}\n * @since 2.1\n * @product highcharts highstock\n * @apioption series.stack\n */\n/**\n * The type of series, for example `line` or `column`. By default, the\n * series type is inherited from [chart.type](#chart.type), so unless the\n * chart is a combination of series types, there is no need to set it on the\n * series level.\n *\n * @sample {highcharts} highcharts/series/type/\n * Line and column in the same chart\n * @sample highcharts/series/type-dynamic/\n * Dynamic types with button selector\n * @sample {highmaps} maps/demo/mapline-mappoint/\n * Multiple types in the same map\n *\n * @type {string}\n * @apioption series.type\n */\n/**\n * When using dual or multiple x axes, this number defines which xAxis the\n * particular series is connected to. It refers to either the\n * {@link #xAxis.id|axis id}\n * or the index of the axis in the xAxis array, with 0 being the first.\n *\n * @type {number|string}\n * @default 0\n * @product highcharts highstock\n * @apioption series.xAxis\n */\n/**\n * When using dual or multiple y axes, this number defines which yAxis the\n * particular series is connected to. It refers to either the\n * {@link #yAxis.id|axis id}\n * or the index of the axis in the yAxis array, with 0 being the first.\n *\n * @sample {highcharts} highcharts/series/yaxis/\n * Apply the column series to the secondary Y axis\n *\n * @type {number|string}\n * @default 0\n * @product highcharts highstock\n * @apioption series.yAxis\n */\n/**\n * Define the visual z index of the series.\n *\n * @sample {highcharts} highcharts/plotoptions/series-zindex-default/\n * With no z index, the series defined last are on top\n * @sample {highcharts} highcharts/plotoptions/series-zindex/\n * With a z index, the series with the highest z index is on top\n * @sample {highstock} highcharts/plotoptions/series-zindex-default/\n * With no z index, the series defined last are on top\n * @sample {highstock} highcharts/plotoptions/series-zindex/\n * With a z index, the series with the highest z index is on top\n *\n * @type {number}\n * @product highcharts highstock\n * @apioption series.zIndex\n */\n''; // include precedent doclets in transpilat\n","/* *\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport F from './FormatUtilities.js';\nvar format = F.format;\nimport H from './Globals.js';\nvar doc = H.doc;\nimport R from './Renderer/RendererUtilities.js';\nvar distribute = R.distribute;\nimport RendererRegistry from './Renderer/RendererRegistry.js';\nimport U from './Utilities.js';\nvar addEvent = U.addEvent, clamp = U.clamp, css = U.css, defined = U.defined, discardElement = U.discardElement, extend = U.extend, fireEvent = U.fireEvent, isArray = U.isArray, isNumber = U.isNumber, isString = U.isString, merge = U.merge, pick = U.pick, splat = U.splat, syncTimeout = U.syncTimeout;\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 */\nvar Tooltip = /** @class */ (function () {\n /* *\n *\n * Constructors\n *\n * */\n function Tooltip(chart, options) {\n /* *\n *\n * Properties\n *\n * */\n this.allowShared = true;\n this.container = void 0;\n this.crosshairs = [];\n this.distance = 0;\n this.isHidden = true;\n this.isSticky = false;\n this.now = {};\n this.options = {};\n this.outside = false;\n this.chart = chart;\n this.init(chart, options);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * In styled mode, apply the default filter for the tooltip drop-shadow. It\n * needs to have an id specific to the chart, otherwise there will be issues\n * when one tooltip adopts the filter of a different chart, specifically one\n * where the container is hidden.\n *\n * @private\n * @function Highcharts.Tooltip#applyFilter\n */\n Tooltip.prototype.applyFilter = function () {\n var chart = this.chart;\n chart.renderer.definition({\n tagName: 'filter',\n attributes: {\n id: 'drop-shadow-' + chart.index,\n opacity: 0.5\n },\n children: [{\n tagName: 'feGaussianBlur',\n attributes: {\n 'in': 'SourceAlpha',\n stdDeviation: 1\n }\n }, {\n tagName: 'feOffset',\n attributes: {\n dx: 1,\n dy: 1\n }\n }, {\n tagName: 'feComponentTransfer',\n children: [{\n tagName: 'feFuncA',\n attributes: {\n type: 'linear',\n slope: 0.3\n }\n }]\n }, {\n tagName: 'feMerge',\n children: [{\n tagName: 'feMergeNode'\n }, {\n tagName: 'feMergeNode',\n attributes: {\n 'in': 'SourceGraphic'\n }\n }]\n }]\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 * @private\n * @function Highcharts.Tooltip#bodyFormatter\n */\n Tooltip.prototype.bodyFormatter = function (items) {\n return items.map(function (item) {\n var tooltipOptions = item.series.tooltipOptions;\n return (tooltipOptions[(item.point.formatPrefix || 'point') + 'Formatter'] ||\n item.point.tooltipFormatter).call(item.point, tooltipOptions[(item.point.formatPrefix || 'point') + 'Format'] || '');\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 * @private\n * @function Highcharts.Tooltip#cleanSplit\n *\n * @param {boolean} [force]\n * Force destroy all tooltips.\n */\n Tooltip.prototype.cleanSplit = function (force) {\n this.chart.series.forEach(function (series) {\n var tt = series && 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\n *\n * @return {string|Array}\n * Returns a string (single tooltip and shared)\n * or an array of strings (split tooltip)\n */\n Tooltip.prototype.defaultFormatter = function (tooltip) {\n var items = this.points || splat(this);\n var s;\n // Build the header\n s = [tooltip.tooltipFooterHeaderFormatter(items[0])];\n // build the values\n s = s.concat(tooltip.bodyFormatter(items));\n // footer\n s.push(tooltip.tooltipFooterHeaderFormatter(items[0], true));\n return s;\n };\n /**\n * Removes and destroys the tooltip and its elements.\n *\n * @function Highcharts.Tooltip#destroy\n */\n Tooltip.prototype.destroy = function () {\n // Destroy and clear local variables\n if (this.label) {\n this.label = this.label.destroy();\n }\n if (this.split && this.tt) {\n this.cleanSplit(true);\n this.tt = this.tt.destroy();\n }\n if (this.renderer) {\n this.renderer = this.renderer.destroy();\n discardElement(this.container);\n }\n U.clearTimeout(this.hideTimer);\n U.clearTimeout(this.tooltipTimeout);\n };\n /**\n * Extendable method to get the anchor position of the tooltip\n * from a point or set of points\n *\n * @private\n * @function Highcharts.Tooltip#getAnchor\n */\n Tooltip.prototype.getAnchor = function (points, mouseEvent) {\n var chart = this.chart, pointer = chart.pointer, inverted = chart.inverted, plotTop = chart.plotTop, plotLeft = chart.plotLeft;\n var 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 &&\n 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 specificly 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 var chartX_1 = 0, chartY_1 = 0;\n points.forEach(function (point) {\n var pos = point.pos(true);\n if (pos) {\n chartX_1 += pos[0];\n chartY_1 += pos[1];\n }\n });\n chartX_1 /= points.length;\n chartY_1 /= 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_1 = mouseEvent.chartX;\n }\n else {\n chartY_1 = mouseEvent.chartY;\n }\n }\n // Use the average position for multiple points\n ret = [chartX_1 - plotLeft, chartY_1 - plotTop];\n }\n return 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 Tooltip.prototype.getClassName = function (point, isSplit, isHeader) {\n var 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 && 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 Tooltip.prototype.getLabel = function () {\n var tooltip = this, styledMode = this.chart.styledMode, options = this.options, doSplit = this.split && this.allowShared, pointerEvents = (options.style.pointerEvents ||\n (this.shouldStickOnContact() ? 'auto' : 'none'));\n var 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 (tooltip.label) {\n var wasSplit = !tooltip.label.hasClass('highcharts-label');\n if ((doSplit && !wasSplit) || (!doSplit && wasSplit)) {\n tooltip.destroy();\n }\n }\n if (!this.label) {\n if (this.outside) {\n var chartStyle = this.chart.options.chart.style, Renderer = RendererRegistry.getRendererType();\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-tooltip-container';\n css(container, {\n position: 'absolute',\n top: '1px',\n pointerEvents: pointerEvents,\n zIndex: Math.max(this.options.style.zIndex || 0, (chartStyle && chartStyle.zIndex || 0) + 3)\n });\n H.doc.body.appendChild(container);\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 Renderer(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('', 0, 0, options.shape, 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 })\n // #2301, #2657\n .css(options.style)\n .css({ pointerEvents: pointerEvents })\n .shadow(options.shadow);\n }\n }\n if (styledMode && options.shadow) {\n // Apply the drop-shadow filter\n this.applyFilter();\n this.label.attr({\n filter: 'url(#drop-shadow-' + this.chart.index + ')'\n });\n }\n // Split tooltip use updateTooltipContainer to position the tooltip\n // container.\n if (tooltip.outside && !tooltip.split) {\n var label_1 = this.label;\n var xSetter_1 = label_1.xSetter, ySetter_1 = label_1.ySetter;\n label_1.xSetter = function (value) {\n xSetter_1.call(label_1, tooltip.distance);\n container.style.left = value + 'px';\n };\n label_1.ySetter = function (value) {\n ySetter_1.call(label_1, tooltip.distance);\n container.style.top = value + 'px';\n };\n }\n this.label\n .attr({ zIndex: 8 })\n .add();\n }\n return this.label;\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 Tooltip.prototype.getPosition = function (boxWidth, boxHeight, point) {\n var chart = this.chart, distance = this.distance, ret = {}, \n // Don't use h if chart isn't inverted (#7242) ???\n h = (chart.inverted && point.h) || 0, // #4117 ???\n outside = this.outside, outerWidth = outside ?\n // substract distance to prevent scrollbars\n doc.documentElement.clientWidth - 2 * distance :\n chart.chartWidth, outerHeight = outside ?\n Math.max(doc.body.scrollHeight, doc.documentElement.scrollHeight, doc.body.offsetHeight, doc.documentElement.offsetHeight, doc.documentElement.clientHeight) :\n chart.chartHeight, chartPosition = chart.pointer.getChartPosition(), scaleX = function (val) { return ( // eslint-disable-line no-confusing-arrow\n val * chartPosition.scaleX); }, scaleY = function (val) { return ( // eslint-disable-line no-confusing-arrow\n val * chartPosition.scaleY); }, \n // Build parameter arrays for firstDimension()/secondDimension()\n buildDimensionArray = function (dim) {\n var isX = dim === 'x';\n return [\n dim,\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(point.plotX + chart.plotLeft) :\n chartPosition.top - distance +\n scaleY(point.plotY + chart.plotTop),\n 0,\n isX ? outerWidth : outerHeight\n ] : [\n // Not outside, no scaling is needed\n isX ? boxWidth : boxHeight,\n isX ? point.plotX + chart.plotLeft :\n point.plotY + chart.plotTop,\n isX ? chart.plotLeft : chart.plotTop,\n isX ? chart.plotLeft + chart.plotWidth :\n chart.plotTop + chart.plotHeight\n ]);\n };\n var first = buildDimensionArray('y'), second = buildDimensionArray('x'), swapped;\n // Handle negative points or reversed axis (#13780)\n var flipped = !!point.negative;\n if (!chart.polar &&\n chart.hoverSeries &&\n chart.hoverSeries.yAxis &&\n chart.hoverSeries.yAxis.reversed) {\n flipped = !flipped;\n }\n // The far side is right or bottom\n var preferFarSide = !this.followPointer &&\n pick(point.ttBelow, !chart.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 * @private\n */\n firstDimension = function (dim, outerSize, innerSize, scaledInnerSize, // #11329\n point, min, max) {\n var 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 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 * @private\n */\n secondDimension = function (dim, outerSize, innerSize, scaledInnerSize, // #11329\n point) {\n var retVal;\n // Too close to the edge, return false and swap dimensions\n if (point < distance || point > outerSize - distance) {\n retVal = false;\n // Align left/top\n }\n else 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 return retVal;\n }, \n /*\n * Swap the dimensions\n */\n swap = function (count) {\n var temp = first;\n first = second;\n second = temp;\n swapped = count;\n }, run = function () {\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 (chart.inverted || this.len > 1) {\n swap();\n }\n run();\n return ret;\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 Tooltip.prototype.hide = function (delay) {\n var tooltip = this;\n // disallow duplicate timers (#1728, #1766)\n U.clearTimeout(this.hideTimer);\n delay = pick(delay, this.options.hideDelay);\n if (!this.isHidden) {\n this.hideTimer = syncTimeout(function () {\n // If there is a delay, do fadeOut 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().fadeOut(delay ? void 0 : delay);\n tooltip.isHidden = true;\n }, delay);\n }\n };\n /**\n * @private\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 Tooltip.prototype.init = function (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 * @private\n * @readonly\n * @name Highcharts.Tooltip#crosshairs\n * @type {Array}\n */\n this.crosshairs = [];\n /**\n * Current values of x and y when animating.\n *\n * @private\n * @readonly\n * @name Highcharts.Tooltip#now\n * @type {Highcharts.PositionObject}\n */\n this.now = { x: 0, y: 0 };\n /**\n * Tooltips are initially hidden.\n *\n * @private\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 Tooltip.prototype.shouldStickOnContact = function (pointerEvent) {\n return !!(!this.followPointer &&\n this.options.stickOnContact &&\n (!pointerEvent || this.chart.pointer.inClass(pointerEvent.target, 'highcharts-tooltip')));\n };\n /**\n * Moves the tooltip with a soft animation to a new position.\n *\n * @private\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 Tooltip.prototype.move = function (x, y, anchorX, anchorY) {\n var tooltip = this, now = tooltip.now, animate = tooltip.options.animation !== false &&\n !tooltip.isHidden &&\n // When we get close to the target position, abort animation and\n // land on the right place (#3056)\n (Math.abs(x - now.x) > 1 || Math.abs(y - now.y) > 1), skipAnchor = tooltip.followPointer || tooltip.len > 1;\n // Get intermediate values for animation\n extend(now, {\n x: animate ? (2 * now.x + x) / 3 : x,\n y: animate ? (now.y + y) / 2 : y,\n anchorX: skipAnchor ?\n void 0 :\n animate ? (2 * now.anchorX + anchorX) / 3 : anchorX,\n anchorY: skipAnchor ?\n void 0 :\n animate ? (now.anchorY + anchorY) / 2 : anchorY\n });\n // Move to the intermediate value\n tooltip.getLabel().attr(now);\n tooltip.drawTracker();\n // Run on next tick of the mouse tracker\n if (animate) {\n // Never allow two timeouts\n U.clearTimeout(this.tooltipTimeout);\n // Set the fixed interval ticking for the smooth tooltip\n this.tooltipTimeout = setTimeout(function () {\n // The interval function may still be running during destroy,\n // so check that the chart is really there before calling.\n if (tooltip) {\n tooltip.move(x, y, anchorX, anchorY);\n }\n }, 32);\n }\n };\n /**\n * Refresh the tooltip's text and position.\n *\n * @function Highcharts.Tooltip#refresh\n *\n * @param {Highcharts.Point|Array} 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 Tooltip.prototype.refresh = function (pointOrPoints, mouseEvent) {\n var tooltip = this, chart = this.chart, options = tooltip.options, pointer = chart.pointer, points = splat(pointOrPoints), point = points[0], pointConfig = [], formatter = options.formatter || tooltip.defaultFormatter, shared = tooltip.shared, styledMode = chart.styledMode;\n var textConfig = {};\n if (!options.enabled || !point.series) { // #16820\n return;\n }\n U.clearTimeout(this.hideTimer);\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 // get the reference point coordinates (pie charts use tooltipPos)\n tooltip.followPointer = (!tooltip.split && point.series.tooltipOptions.followPointer);\n var 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 choosen ones:\n points.forEach(function (item) {\n item.setState('hover');\n pointConfig.push(item.getLabelConfig());\n });\n textConfig = {\n x: point.category,\n y: point.y\n };\n textConfig.points = pointConfig;\n // single point tooltip\n }\n else {\n textConfig = point.getLabelConfig();\n }\n this.len = pointConfig.length; // #6128\n var text = formatter.call(textConfig, tooltip);\n // register the current series\n var 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 // update text\n if (tooltip.split && tooltip.allowShared) { // #13868\n this.renderSplit(text, points);\n }\n else {\n var checkX_1 = x;\n var checkY_1 = y;\n if (mouseEvent && pointer.isDirectTouch) {\n checkX_1 = mouseEvent.chartX - chart.plotLeft;\n checkY_1 = mouseEvent.chartY - chart.plotTop;\n }\n // #11493, #13095\n if (chart.polar ||\n currentSeries.options.clip === false ||\n points.some(function (p) {\n return pointer.isDirectTouch || // ##17929\n p.series.shouldShowTooltip(checkX_1, checkY_1);\n })) {\n var label = tooltip.getLabel();\n // Prevent the tooltip from flowing over the chart box\n // (#6659)\n if (!options.style.width || styledMode) {\n label.css({\n width: chart.spacingBox.width + 'px'\n });\n }\n label.attr({\n text: text && text.join ?\n text.join('') :\n text\n });\n // Set the stroke color of the box to reflect the point\n label.addClass(tooltip.getClassName(point), true);\n if (!styledMode) {\n label.attr({\n stroke: (options.borderColor ||\n point.color ||\n currentSeries.color ||\n \"#666666\" /* Palette.neutralColor60 */)\n });\n }\n tooltip.updatePosition({\n plotX: x,\n plotY: y,\n negative: point.negative,\n ttBelow: point.ttBelow,\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 }\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 * @private\n * @function Highcharts.Tooltip#renderSplit\n *\n * @param {string|Array<(boolean|string)>} labels\n *\n * @param {Array} points\n */\n Tooltip.prototype.renderSplit = function (labels, points) {\n var tooltip = this;\n var chart = tooltip.chart, _a = tooltip.chart, chartWidth = _a.chartWidth, chartHeight = _a.chartHeight, plotHeight = _a.plotHeight, plotLeft = _a.plotLeft, plotTop = _a.plotTop, pointer = _a.pointer, _b = _a.scrollablePixelsY, scrollablePixelsY = _b === void 0 ? 0 : _b, scrollablePixelsX = _a.scrollablePixelsX, _c = _a.scrollingContainer, _d = _c === void 0 ? { scrollLeft: 0, scrollTop: 0 } : _c, scrollLeft = _d.scrollLeft, scrollTop = _d.scrollTop, styledMode = _a.styledMode, distance = tooltip.distance, options = tooltip.options, positioner = tooltip.options.positioner;\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 var 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 var tooltipLabel = tooltip.getLabel();\n var ren = this.renderer || chart.renderer;\n var headerTop = Boolean(chart.xAxis[0] && chart.xAxis[0].opposite);\n var _e = pointer.getChartPosition(), chartLeft = _e.left, chartTop = _e.top;\n var distributionBoxTop = plotTop + scrollTop;\n var headerHeight = 0;\n var adjustedPlotHeight = plotHeight - scrollablePixelsY;\n /**\n * Calculates the anchor position for the partial tooltip\n *\n * @private\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 var isHeader = point.isHeader, _a = point.plotX, plotX = _a === void 0 ? 0 : _a, _b = point.plotY, plotY = _b === void 0 ? 0 : _b, series = point.series;\n var anchorX;\n var anchorY;\n if (isHeader) {\n // Set anchorX to plotX\n anchorX = plotLeft + plotX;\n // Set anchorY to center of visible plot area.\n anchorY = plotTop + plotHeight / 2;\n }\n else {\n var xAxis = series.xAxis, yAxis = series.yAxis;\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: anchorX, anchorY: anchorY };\n }\n /**\n * Calculates the position of the partial tooltip\n *\n * @private\n * @param {number} anchorX\n * The partial tooltip anchor x position\n *\n * @param {number} anchorY\n * The partial tooltip anchor y position\n *\n * @param {boolean|undefined} isHeader\n * Whether the partial tooltip is a header\n *\n * @param {number} boxWidth\n * Width of the partial tooltip\n *\n * @return {Highcharts.PositionObject}\n * Returns the partial tooltip x and y position\n */\n function defaultPositioner(anchorX, anchorY, isHeader, boxWidth, alignedLeft) {\n if (alignedLeft === void 0) { alignedLeft = true; }\n var y;\n var x;\n if (isHeader) {\n y = headerTop ? 0 : adjustedPlotHeight;\n x = clamp(anchorX - (boxWidth / 2), bounds.left, bounds.right - boxWidth - (tooltip.outside ? chartLeft : 0));\n }\n else {\n y = anchorY - distributionBoxTop;\n x = alignedLeft ?\n anchorX - boxWidth - distance :\n anchorX + distance;\n x = clamp(x, alignedLeft ? x : bounds.left, bounds.right);\n }\n // NOTE: y is relative to distributionBoxTop\n return { x: x, y: 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 * @private\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 var tt = partialTooltip;\n var isHeader = point.isHeader, series = point.series;\n if (!tt) {\n var attribs = {\n padding: options.padding,\n r: options.borderRadius\n };\n if (!styledMode) {\n attribs.fill = options.backgroundColor;\n attribs['stroke-width'] = options.borderWidth;\n }\n tt = ren\n .label('', 0, 0, (options[isHeader ? 'headerShape' : 'shape']), void 0, void 0, options.useHTML)\n .addClass(tooltip.getClassName(point, true, isHeader))\n .attr(attribs)\n .add(tooltipLabel);\n }\n tt.isActive = true;\n tt.attr({\n text: str\n });\n if (!styledMode) {\n tt.css(options.style)\n .shadow(options.shadow)\n .attr({\n stroke: (options.borderColor ||\n point.color ||\n series.color ||\n \"#333333\" /* Palette.neutralColor80 */)\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 var boxes = labels.slice(0, points.length + 1).reduce(function (boxes, str, i) {\n if (str !== false && str !== '') {\n var 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 var isHeader = point.isHeader;\n // Store the tooltip label referance on the series\n var owner = isHeader ? tooltip : point.series;\n var 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 var bBox = tt.getBBox();\n var boxWidth = bBox.width + tt.strokeWidth();\n if (isHeader) {\n headerHeight = bBox.height;\n adjustedPlotHeight += headerHeight;\n if (headerTop) {\n distributionBoxTop -= headerHeight;\n }\n }\n var _a = getAnchor(point), anchorX = _a.anchorX, anchorY = _a.anchorY;\n if (typeof anchorY === 'number') {\n var size = bBox.height + 1;\n var boxPosition = (positioner ?\n positioner.call(tooltip, boxWidth, size, point) :\n defaultPositioner(anchorX, anchorY, isHeader, boxWidth));\n boxes.push({\n // 0-align to the top, 1-align to the bottom\n align: positioner ? 0 : void 0,\n anchorX: anchorX,\n anchorY: anchorY,\n boxWidth: boxWidth,\n point: point,\n rank: pick(boxPosition.rank, isHeader ? 1 : 0),\n size: size,\n target: boxPosition.y,\n tt: 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 to the right\n if (!positioner && boxes.some(function (box) {\n // Always realign if the beginning of a label is outside bounds\n var outside = tooltip.outside;\n var 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(function (box) {\n var _a = defaultPositioner(box.anchorX, box.anchorY, box.point.isHeader, box.boxWidth, false), x = _a.x, y = _a.y;\n return extend(box, {\n target: y,\n x: 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 var boxExtremes = {\n left: chartLeft,\n right: chartLeft\n };\n // Get the extremes from series tooltips\n boxes.forEach(function (box) {\n var x = box.x, boxWidth = box.boxWidth, isHeader = box.isHeader;\n if (!isHeader) {\n if (tooltip.outside && chartLeft + x < boxExtremes.left) {\n boxExtremes.left = chartLeft + x;\n }\n if (!isHeader &&\n tooltip.outside &&\n boxExtremes.left + boxWidth > boxExtremes.right) {\n boxExtremes.right = chartLeft + x;\n }\n }\n });\n boxes.forEach(function (box) {\n var x = box.x, anchorX = box.anchorX, anchorY = box.anchorY, pos = box.pos, isHeader = box.point.isHeader;\n var attributes = {\n visibility: typeof pos === 'undefined' ? 'hidden' : 'inherit',\n x: 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,\n anchorX: anchorX,\n anchorY: anchorY\n };\n // Handle left-aligned tooltips overflowing the chart area\n if (tooltip.outside && x < anchorX) {\n var offset = chartLeft - boxExtremes.left;\n // Skip this if there is no overflow\n if (offset > 0) {\n if (!isHeader) {\n attributes.x = x + offset;\n attributes.anchorX = anchorX + offset;\n }\n if (isHeader) {\n attributes.x = (boxExtremes.right - boxExtremes.left) / 2;\n attributes.anchorX = anchorX + offset;\n }\n }\n }\n // Put the label in place\n box.tt.attr(attributes);\n });\n /* If we have a seperate 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 var container = tooltip.container, outside = tooltip.outside, renderer = tooltip.renderer;\n if (outside && container && renderer) {\n // Set container size to fit the bounds\n var _f = tooltipLabel.getBBox(), width = _f.width, height = _f.height, x = _f.x, y = _f.y;\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 };\n /**\n * If the `stickOnContact` option is active, this will add a tracker shape.\n *\n * @private\n * @function Highcharts.Tooltip#drawTracker\n */\n Tooltip.prototype.drawTracker = function () {\n var tooltip = this;\n if (!this.shouldStickOnContact()) {\n if (tooltip.tracker) {\n tooltip.tracker.destroy();\n }\n return;\n }\n var chart = tooltip.chart;\n var label = tooltip.label;\n var points = tooltip.shared ? chart.hoverPoints : chart.hoverPoint;\n if (!label || !points) {\n return;\n }\n var box = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n // Combine anchor and tooltip\n var anchorPos = this.getAnchor(points);\n var labelBBox = label.getBBox();\n anchorPos[0] += chart.plotLeft - label.translateX;\n anchorPos[1] += chart.plotTop - label.translateY;\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 if (!chart.styledMode) {\n tooltip.tracker.attr({\n fill: 'rgba(0,0,0,0)'\n });\n }\n }\n };\n /**\n * @private\n */\n Tooltip.prototype.styledModeFormat = function (formatString) {\n return formatString\n .replace('style=\"font-size: 10px\"', '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 * @private\n * @function Highcharts.Tooltip#tooltipFooterHeaderFormatter\n */\n Tooltip.prototype.tooltipFooterHeaderFormatter = function (labelConfig, isFooter) {\n var series = labelConfig.series, tooltipOptions = series.tooltipOptions, xAxis = series.xAxis, dateTime = xAxis && xAxis.dateTime, e = {\n isFooter: isFooter,\n labelConfig: labelConfig\n };\n var 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(labelConfig.key)) {\n xDateFormat = dateTime.getXDateFormat(labelConfig.key, tooltipOptions.dateTimeLabelFormats);\n }\n // Insert the footer date format if any\n if (dateTime && xDateFormat) {\n ((labelConfig.point && labelConfig.point.tooltipDateKeys) ||\n ['key']).forEach(function (key) {\n formatString = formatString.replace('{point.' + key + '}', '{point.' + key + ':' + xDateFormat + '}');\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, {\n point: labelConfig,\n series: series\n }, 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 Tooltip.prototype.update = function (options) {\n this.destroy();\n // Update user options (#6218)\n merge(true, this.chart.options.tooltip.userOptions, options);\n this.init(this.chart, merge(true, this.options, options));\n };\n /**\n * Find the new position and perform the move\n *\n * @private\n * @function Highcharts.Tooltip#updatePosition\n *\n * @param {Highcharts.Point} point\n */\n Tooltip.prototype.updatePosition = function (point) {\n var _a = this, chart = _a.chart, distance = _a.distance, options = _a.options, pointer = chart.pointer, label = this.getLabel(), \n // Needed for outside: true (#11688)\n _b = pointer.getChartPosition(), left = _b.left, top = _b.top, scaleX = _b.scaleX, scaleY = _b.scaleY, pos = (options.positioner || this.getPosition).call(this, label.width, label.height, point);\n var 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 if (this.outside) {\n // Corrects positions, occurs with tooltip positioner (#16944)\n if (options.positioner) {\n pos.x += left - distance;\n pos.y += top - distance;\n }\n pad = options.borderWidth + 2 * distance;\n this.renderer.setSize(label.width + pad, label.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(this.container, {\n transform: \"scale(\".concat(scaleX, \", \").concat(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 return Tooltip;\n}());\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 be returned. In case\n * of splitted 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.TooltipFormatterContextObject} this\n * Context to format\n *\n * @param {Highcharts.Tooltip} tooltip\n * The tooltip instance\n *\n * @return {false|string|Array<(string|null|undefined)>|null|undefined}\n * Formatted text or false\n */\n/**\n * Configuration for the tooltip formatters.\n *\n * @interface Highcharts.TooltipFormatterContextObject\n * @extends Highcharts.PointLabelObject\n */ /**\n* Array of points in shared tooltips.\n* @name Highcharts.TooltipFormatterContextObject#points\n* @type {Array|undefined}\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 * @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\"|\"square\"} Highcharts.TooltipShapeValue\n */\n''; // keeps doclets above in JS file\n"],"names":["AxisDefaults","defaultXAxisOptions","alignTicks","allowDecimals","panningEnabled","zIndex","zoomEnabled","dateTimeLabelFormats","millisecond","main","range","second","minute","hour","day","week","month","year","endOnTick","gridLineDashStyle","gridZIndex","labels","autoRotation","autoRotationLimit","distance","enabled","indentation","overflow","padding","reserveSpace","rotation","staggerLines","step","useHTML","x","style","color","cursor","fontSize","maxPadding","minorGridLineDashStyle","minorTickLength","minorTickPosition","minPadding","offset","opposite","reversed","reversedStacks","showEmpty","showFirstLabel","showLastLabel","startOfWeek","startOnTick","tickLength","tickPixelInterval","tickmarkPlacement","tickPosition","title","align","y","type","uniqueNames","visible","minorGridLineColor","minorGridLineWidth","minorTickColor","lineColor","lineWidth","gridLineColor","gridLineWidth","tickColor","defaultYAxisOptions","text","stackLabels","animation","allowOverlap","crop","formatter","numberFormatter","this","axis","chart","total","fontWeight","textOutline","defaultLeftAxisOptions","defaultRightAxisOptions","defaultBottomAxisOptions","margin","defaultTopAxisOptions","animObject","A","defaultOptions","D","registerEventOptions","F","deg2rad","H","arrayMax","U","arrayMin","clamp","correctFloat","defined","destroyObjectProperties","erase","error","extend","fireEvent","isArray","isNumber","isString","merge","normalizeTickInterval","objectEach","pick","relativeLength","removeEvent","splat","syncTimeout","getNormalizedTickInterval","tickInterval","options","tickAmount","Axis","userOptions","alternateBands","bottom","closestPointRange","coll","eventOptions","hasNames","hasVisibleSeries","height","isLinked","labelEdge","labelFormatter","left","len","max","maxLabelLength","min","minorTickInterval","minorTicks","minPixelPadding","names","overlap","paddedTicks","plotLinesAndBands","plotLinesAndBandsGroups","pointRange","pointRangePadding","pos","positiveValuesOnly","right","series","side","tickmarkOffset","tickPositions","tickRotCorr","ticks","top","transA","transB","translationSlope","width","init","prototype","isXAxis","isX","horiz","inverted","isZAxis","setOptions","labelsOptions","categories","keys","logarithmic","linkedTo","minRange","userMinRange","maxZoom","crosshair","tooltip","crosshairs","axes","indexOf","splice","xAxis","length","push","labelRotation","defaultLabelFormatter","ctx","multi","ret","value","NaN","time","dateTimeLabelFormat","lang","numericSymbols","numSymMagnitude","numericSymbolMagnitude","numericSymbolDetector","Math","abs","i","concat","dateFormat","pow","getSeriesExtremes","xExtremes","dataMin","dataMax","threshold","softThreshold","forEach","ignoreHiddenSeries","seriesOptions","xData","seriesDataMin","seriesDataMax","filter","validatePositiveValue","getXExtremes","Date","dataExtremes","applyExtremes","translate","val","backwards","cvsCoord","old","handleLog","pointPlacement","linkedParent","localMin","doPostTranslate","isOrdinal","brokenAxis","hasBreaks","lin2val","sign","cvsOffset","localA","returnValue","sector","val2lin","isRadial","toPixels","paneCoordinates","toValue","pixel","getPlotLinePath","x1","y1","x2","y2","skip","axisLeft","axisTop","cHeight","oldChartHeight","chartHeight","cWidth","oldChartWidth","chartWidth","translatedValue","force","between","a","b","evt","acrossPanes","e","round","path","renderer","crispLine","getLinearTickPositions","lastPos","precision","roundedMin","floor","roundedMax","ceil","single","getMinorTickInterval","getMinorTickPositions","minorTickPositions","logarithmic_1","_pos","apply","getLogTickPositions","dateTime","getTimeTicks","normalizeTimeTickInterval","trimTicks","adjustForMinRange","zoomOffset","spaceAvailable","loopLength","minArgs","maxArgs","log","closestDataRange","ceiling","xIncrement","log2lin","getClosest","seriesClosest","noSharedTooltip","nameToX","point","explicitCategories","nameX","requireSorting","name","autoIncrement","updateNames","Object","key","points","isDirtyData","processData","generatePoints","data","setAxisTranslation","ordinalCorrection","hasCategories","axisPointRange","minPointOffset","seriesPointRange","isPointPlacementAxis","is","ordinal","slope","staticScale","minFromRange","setTickInterval","secondPass","linkedParentExtremes","thresholdMin","thresholdMax","hardMin","hardMax","tickPixelIntervalOption","tickIntervalOption","getTickAmount","userMin","userMax","getExtremes","beforePadding","stacking","usePercentage","softMin","softMax","polar","hasExtremesChanged_1","forceCrop","forceCropping","hasExtremesChanged","minTickInterval","some","s","unsquish","setTickPositions","tickPositionerResult","tickPositionsOption","tickPositioner","minorTickIntervalOption","hasVerticalPanning","isColorAxis","parseInt","slice","positions","units","startingTickInterval","adjustedTickInterval","adjustTickAmount","shift","pop","alignToOthers","hasOther","alignedAxes","alignThresholds","thresholdAlignments","thresholdAlignment","getKey_1","pane","join","thisKey_1","otherAxis","threshAlign","getThresholdAlignment","thresholdAlignment_1","reduce","sum","n","callerAxis","isDirty","finalTickAmt","thresholdTickIndex","currentTickAmount","append","prepend","unshift","hasData","adjustExtremes","setScale","isXAxisDirty","setAxisSize","isDirtyAxisLength","forceRedraw","resetStacks","buildStacks","cleanStacks","panningState","setExtremes","newMin","newMax","redraw","eventArguments","serie","kdTree","eventArgs","zoom","allowZoomOutside","displayBtn","trigger","zoomed","offsets","plotWidth","plotHeight","plotTop","plotLeft","lin2log","getThreshold","realMin","realMax","Infinity","autoLabelAlign","angle","tickSize","prefix","tickWidth","labelMetrics","index","fontMetrics","label","labelOptions","slotSize","rotationOption","getStep","spaceNeeded","newTickInterval","bestScore","Number","MAX_VALUE","score","_i","autoRotation_1","rot","h","sin","getSlotWidth","tick","slotCount","marginLeft","slotWidth","cssWidth","String","spacing","renderUnsquish","commonWidth","commonTextOverflow","labelStyleOptions","innerWidth","attr","textOverflowOption","textOverflow","movedLabel","replaceMovedLabel","textPxLength","styles","css","getBBox","f","specificTextOverflow","labelAlign","widthOption","shortenLabel","whiteSpace","element","tagName","rotCorr","addTitle","display","textAlign","axisTitleOptions","styledMode","axisTitle","low","middle","high","addClass","add","axisGroup","isNew","generateTick","addLabel","Tick","getOffset","showAxis","titleOffsetOption","labelOffsetPadded","lineHeightCorrection","_this","axisParent","invertedSide","axisOffset","clipOffset","directionFactor","className","titleOffset","titleMargin","labelOffset","createGroup","suffix","g","toLowerCase","gridGroup","labelGroup","reserveSpaceDefault","getLabelSize","destroy","renderLine","axisTitleMargin","getMaxLabelDimensions","maxLabelDimensions","clip","axisLine","strokeWidth","getLinePath","lineLeft","lineTop","stroke","getTitlePosition","axisLength","xOption","yOption","textHeightOvershoot","alongAxis","offAxis","titlePosition","renderMinorTick","slideIn","render","renderTick","grid","isColumn","from","to","stackLabelOptions","alternateGridColor","globalAnimation","isActive","slideInTicks_1","hasRendered","PlotLineOrBand","_addedPlotLB","plotLines","plotBands","plotLineOptions","addPlotBandOrLine","forDestruction","delay","duration","isPlaced","d","titleXy","renderStackTotals","plotLine","getKeepProps","keepProps","keepEvents","plotGroup","prop","drawCrosshair","categorized","crossOptions","snap","graphic","cross","crosshairPos","plotX","plotY","chartX","chartY","stackY","isCrosshair","hideCrosshair","Color","parse","setOpacity","get","dashStyle","dashstyle","show","hide","panningOptions","panning","Boolean","test","update","isDirtyBox","remove","axisSeries","setTitle","titleOptions","setCategories","noLabel","parameters","isNewLabel","isFirst","isLast","animateLabels","tickPositionInfo","info","category","resolveDTLFormat","higherRanks","unitName","getXDateFormat","call","format","str","list","moveLabel","textStr","textWidth","createLabel","xy","getPosition","tickPos","getLabelPosition","yOffset","line","labelOffsetCorrection","cos","getMarkPath","handleOverflow","rightPos","pxPos","leftBound","labelLeft","rightBound","labelRight","factor","center","labelWidth","xCorrection","modifiedSlotWidth","goRight","labelPos","xPos","yPos","moved","currentTick","opacity","reverseCrisp","labelOpacity","newOpacity","renderGridLine","renderMark","renderLabel","gridLinePath","attribs","gridLine","mark","isNewMark","animate","setAnimation","defaultTime","numberFormat","FormatUtilities","Foundation","charts","doc","marginNames","svg","win","seriesTypes","SeriesRegistry","addEvent","cleanRecursively","createElement","discardElement","find","getStyle","isObject","pInt","uniqueKey","Chart","c","bounds","clipBox","colorCounter","container","isResizing","labelCollectors","legend","plotBox","pointCount","pointer","renderTo","sharedClips","spacingBox","symbolCounter","yAxis","getArgs","nodeName","callback","userPlotOptions","plotOptions","args","arguments","optionsChart","typeOptions","forExport","v","zooming","resetButton","resetZoomButton","zoomKey","pinchType","singleTouch","zoomBySingleTouch","zoomType","Time","hasCartesianSeries","showAxes","chartCount","firstRender","initSeries","defaultSeriesType","SeriesClass","missingModuleFor","setSeriesData","getSeriesOrderByLinks","enabledDataSorting","setData","sort","linkedSeries","orderSeries","fromIndex","iEnd","getName","isInsidePlot","_a","_b","scrollablePlotBox","scrollLeft","scrollTop","visiblePlotOnly","scrollingContainer","box","ignoreX","ignoreY","hasDirtyStacks","hasStackedSeries","colorAxis","legendUserOptions","isHiddenChart","isHidden","afterRedraw","redrawLegend","isDirtyLegend","setResponsive","temporaryDisplay","layOutTitles","centerInCategory","legendType","updateTotals","labelFormat","getStacks","getMargins","extKey","drawChartBox","reset","draw","id","itemById","item","getAxes","xAxisOptions","yAxisOptions","axisOptions","getSelectedPoints","acc","getPointsCollection","selectedStaging","selected","getSelectedSeries","subtitleOptions","applyDescription","explicitOptions","isStock","elem","updateOptions","subtitle","caption","titleSize","verticalAlign","widthAdjust","floating","requiresDirtyBox","getChartSize","heightOption","containerWidth","containerHeight","revert","tempStyle","node","hcOrigStyle","hcOrigDetached","body","removeChild","parentNode","contains","appendChild","hcOricDetached","offsetWidth","setProperty","setClassName","getContainer","containerStyle","indexAttrName","containerId","getElementById","oldChartIndex","innerHTML","AST","emptyHTML","skipClone","position","lineHeight","userSelect","outline","_cursor","Renderer","RendererRegistry","getRendererType","SVGRenderer","exporting","allowHTML","defs","definition","setStyle","chartIndex","skipAxes","resetMargins","marginBottom","adjustMargins","getAxisMargins","m","setChartSize","reflow","hasUserSize","target","chartPosition","isPrinting","clearTimeout","reflowTimeout","setSize","setReflow","unbindReflow","marginRight","plotSizeX","plotSizeY","plotBorderWidth","clipX","clipY","alignElements","chartOptions","values","sideName","chartBorderWidth","mgn","bgAttr","plotBGImage","chartBackgroundColor","backgroundColor","plotBackgroundColor","plotBackgroundImage","clipRect","chartBackground","plotBackground","plotBorder","verb","rect","borderWidth","shadow","fill","borderColor","r","borderRadius","plotShadow","image","plotBorderColor","crisp","propFromSeries","klass","linkSeries","chartSeries","setDataSortingOptions","renderSeries","renderLabels","items","html","renderAxes","correction","Legend","tempWidth","tempHeight","redoHorizontal","redoVertical","seriesGroup","addCredits","credits","creds","mapCredits","on","href","location","removeAttribute","scroller","isReadyToRender","serieOptions","Pointer","MSPointer","isRequired","getChartPosition","imgCount","hasLoaded","onload","callbacks","fn","warnIfA11yModuleNotLoaded","accessibility","boxWrapper","role","textContent","replace","addSeries","addAxis","createAxis","addColorAxis","showLoading","loadingOptions","loading","setLoadingSize","loadingDiv","loadingSpan","setElementHTML","labelStyle","loadingShown","showDuration","hideLoading","hideDuration","complete","oneToOne","updateAllAxes","updateAllSeries","runSetSize","adders","isResponsiveOptions","itemsForRemoval","propsRequireUpdateSeries","propsRequireDirtyBox","propsRequireReflow","colors","collectionsWithUpdate","indexMap","isInternal","newOptions","hasId","touched","collectionsWithInit","newWidth","newHeight","setSubtitle","setCaption","showResetZoom","btnOptions","theme","alignTo","relativeTo","zoomOut","button","resetZoom","resetZoomTitle","resetSelection","event","hasZoomed","displayButton","initiated","axisData","mouseDownX","mouseDownY","pan","hoverPoints","doRedraw","originalEvent","setState","nextMousePos","spill","mousePos","mouseDown","startPos","halfPointRange","pointRangeDirection","extremes","panMin","panMax","flipped","processedData","getProcessedData","yData","startMin","startMax","paddedMin","paddedMax","match","down","isFunction","component","events","eventType","isFirefox","distribute","R","stableSort","wrap","allItems","contentGroup","group","initialItemY","itemHeight","itemMarginBottom","itemMarginTop","itemX","itemY","lastItemY","lastLineHeight","legendHeight","legendWidth","maxItemWidth","maxLegendWidth","pages","proximate","scrollGroup","symbolHeight","symbolWidth","titleHeight","totalItemWidth","positionCheckboxes","unchartrender","proximatePositions","positionItems","itemStyle","itemHiddenStyle","layout","baseline","colorizeItem","legendItem","symbol","hiddenColor","textColor","symbolColor","markerOptions","marker","symbolAttr","isMarker","pointAttribs","positionItem","_c","symbolPadding","ltr","rtl","checkbox","translateX","translateY","destroyItem","getAllItems","alignAttr","clipHeight","scrollOffset","checkboxOffset","renderTitle","bBox","setText","renderItem","horizontal","itemDistance","isSeries","drawLegendSymbol","showCheckbox","createCheckboxForItem","itemClassName","itemExtraWidth","colorIndex","squareSymbol","setItemEvents","itemWidth","fontMetricsH","labelHeight","layoutItem","alignColumns","showInLegend","getAlignment","charAt","alignment","alignments","boxes","alignLeft","lastPoint","useFirstPoint","reverse","size","allowedWidth","legendGroup","substring","legendIndex","placed","lastY","optionsY","alignTop","maxHeight","navOptions","navigation","arrowSize","clipToHeight","div","addTracker","circle","nav","spaceHeight","currentPage","fullHeight","pageIx","up","scroll","pager","scrollBy","pageCount","visibility","upTracker","downTracker","inactiveColor","activeColor","animOptions","legendLabel","isPoint","Point","activeClass","legendElements","setOtherItemsState","state","otherItem","legendElements_1","itemHoverStyle","removeClass","strLegendItemClick","fnLegendItemClick","setVisible","browserEvent","firePointEvent","checked","defaultChecked","itemCheckboxStyle","select","LegendSymbol","drawLineMarker","legendSymbol","generalRadius","legendItemGroup","verticalCenter","lineSizer","linecap","radius","context","drawRectangle","square","symbolRadius","extendStatics","__extends","setPrototypeOf","__proto__","Array","p","hasOwnProperty","TypeError","__","constructor","create","noop","touches","hasPointerEvent","PointerEvent","translateMSPointer","method","wktype","func","fake","hoverChartIndex","pointerType","MSPOINTER_TYPE_TOUCH","currentTarget","preventDefault","touch","pageX","pageY","_super","hasTouch","MSPointerEvent","batchMSEvents","onContainerPointerDown","onContainerPointerMove","onDocumentPointerUp","hasZoom","pointerId","setDOMEvents","followTouchMove","lastValidTouch","pinchDown","runChartClick","eventsToUnbind","hasDragged","applyInactiveState","activeSeries","navigatorSeries","inactiveSeries","inactiveOtherPoints","setAllPointsToState","unbind","unbindDocumentMouseUp","unbindDocumentTouchEnd","clearInterval","tooltipTimeout","_val","getSelectionMarkerAttrs","attrs","shapeType","zoomHor","zoomVert","drag","clickedInside","panKey","selectionMarker","sqrt","mapView","zoomX","zoomY","selectionMarkerFill","dragStart","mouseIsDown","cancelClick","getSelectionBox","result","drop","hasPinched","x_1","y_1","width_1","height_1","selectionData_1","runZoom_1","selectionMin","selectionMax","scaleGroups","findNearestKDPoint","shared","closest","p1","p2","isCloserX","isCloser","isAbove","compareX","findNearestPointBy","searchPoint","distX","dist","getChartCoordinatesFromPoint","shapeArgs","clientX","isNode","scaleX","scaleY","offsetHeight","getCoordinates","coordinates","getHoverData","existingHoverPoint","existingHoverSeries","isDirectTouch","searchSeries","useExisting","directTouch","enableMouseTracking","hoverSeries","stickyTracking","hoverPoint","isNull","boosted","boost","getPoint","getPointFromEvent","onTrackerMouseOut","relatedTarget","toElement","inClass","onMouseOut","elemClassName","parentElement","click","Tooltip","normalize","ePos","changedTouches","onContainerClick","pEvt","onContainerMouseDown","isPrimaryButton","buttons","onContainerMouseMove","zoomOption","onContainerMouseLeave","onContainerMouseEnter","setHoverChartIndex","touchSelect","openMenu","shouldStickOnContact","runPointActions","onDocumentTouchEnd","hoverChart","onContainerTouchMove","onContainerTouchStart","onDocumentMouseMove","onDocumentMouseUp","pinch","self","touchesLength","transform","fireClickEvent","runTrackerClick","cancelable","map","absMin","absMax","res","pinchTranslate","pinchTranslateDirection","forcedScale","selectionWH","selectionXY","clipXY","outOfBounds","XY","sChartXY","wh","plotLeftTop","touch0Start","touch1Start","touch1Now","scale","touch0Now","scaleKey","transformScale","allowMove","tooltipPoints","isCartesian","refresh","unDocMouseMove","hoverX","hoverData","followPointer","tooltipOptions","split","useSharedTooltip","onMouseOver","anchor","getAnchor","updatePosition","ownerDocument","seriesAttribs","getPlotBox","markerGroup","dataLabelsGroup","ownerDoc","onmousedown","bind","onmousemove","onclick","parent","passive","start","hasMoved","defaultRenderer","rendererTypes","rendererType","registerRendererType","rendererClass","setAsDefault","RendererUtilities","maxDistance","origBoxes","reducedLen","sortByTarget","overlapping","restBoxes","rank","targets","posInCompositeBox","stop","SVG_NS","SVGElement","onEvents","symbolCustomAttribs","_defaultGetter","getAttribute","parseFloat","_defaultSetter","setAttribute","inserted","parentGroup","buildText","added","handleZ","zIndexSetter","onAdd","currentClassName","newClassName","afterSetters","doTransform","updateTransform","alignOptions","alignByTranslate","alignFactor","vAlignFactor","alignedObjects","vAlign","alignSetter","convert","alignValue","params","deferTime","defer","hidden","msHidden","webkitHidden","applyTextOutline","getContrast","parts","fakeTS","digit","unit","removeTextOutline","outline_1","createElementNS","parentElem","querySelector","childNodes","childNode","clone","cloneNode","totalHeight_1","querySelectorAll","br","dy","insertBefore","firstChild","hash","continueAnimation","hasSetSymbolSize","skipAttr","setter","symbolName","shadows","updateShadows","url","wrapper","normalizer","complexColor","colorOptions","colorObject","gradName","gradAttr","radAttr","gradients","stops","stopColor","stopOpacity","radialReference","radialGradient","linearGradient","gradientUnits","getRadialAttr","gradientObject_1","stopObject","gradient","toString","oldStyles","newStyles","hasNew","stylesToApply_1","namespaceURI","dashstyleSetter","grandParent","ownerSVGElement","parentToClean","isSVG","onmouseout","onmouseover","clipPath","clipPath_1","el","safeRemoveChild","destroyShadows","dSetter","pathToSegments","pathArray","seg","fadeOut","elemWrapper","fillSetter","reload","toggleTextShadowShim","cacheKey","cache","cacheKeys","htmlGetBBox","rad","rad90","wCosRad","wSinRad","cosRad90","sinRad90","aX","bX","cX","dX","aY","bY","cY","dY","getComputedStyle","getPropertyValue","hasClass","handler","opacitySetter","toFixed","RegExp","trim","setRadialReference","existingGradient","setTextPath","textPathOptions","attributes","startOffset","textAnchor","textWrapper","textPath","undo","textPathId","textAttribs","dx","children","nodes","textCache","shadowOptions","cutOff","shadowElementOpacity","oldShadowOptions","parentInverted","defaultShadowOptions","offsetX","offsetY","cutHeight","inherit","dummy","symbols","textSetter","titleSetter","titleNode","getElementsByTagName","toFront","matrix","_d","rotationOriginX","rotationOriginY","visibilitySetter","xGetter","otherElement","otherZIndex","undefinedOtherZIndex","svgParent","run","strokeSetter","yGetter","matrixSetter","rotationOriginXSetter","rotationOriginYSetter","rotationSetter","scaleXSetter","scaleYSetter","translateXSetter","translateYSetter","verticalAlignSetter","SVGLabel","shape","anchorX","anchorY","hasBGImage","paddingLeftSetter","paddingSetter","paddingRightSetter","symbolKey","emptyBBox","baselineOffset","needsBox","deferredAttr","xSetting","anchorXSetter","boxAttr","getCrispAdjust","anchorYSetter","ySetting","textStyles_1","textProps","updateTextPadding","updateBoxSize","paddingLeft","heightSetter","heightSetting","rSetter","crispAdjust","widthSetting","getPaddedWidth","metrics","firstLineMetrics","textY","textX","hasBoxWidthChanged","widthSetter","paddingRight","xSetter","ySetter","TextBuilder","svgElement","textStyles","textLineHeight","ellipsis","noWrap","buildSVG","textNode","hasMarkup","tempParent","actualWidth","ast","modifyTree","addToDOM","modifyDOM","unescapeEntities","createTextNode","nextSibling","previousSibling","nodeType","getLineHeight","modifyChildren","Node","TEXT_NODE","words","hasWhiteSpace","lineNo","startAt","truncate","currentIndex","lines","precedingSiblings","t","modifyTextNode","baseVal","fontSizeStyle","modifyChild","fontStyle","nextNode","child","getString","lengths","minIndex","maxIndex","getSubStringLength","charEnd","concatenatedEnd","end","getSpanWidth","inputStr","except","escapes","hasInternalReferenceBug","isMS","isWebKit","symbolSizes","subPixelFix","version","getReferenceURL","getBoundingClientRect","unSubPixelFix","def","hitElement","elementFromPoint","fontFamily","rendererDefs","Element","cx","cy","rgba","b8","l","hoverState","selectState","disabledState","states","curState","normalStyle","hoverStyle","selectStyle","disabledStyle","normalState","filterUserAttributes","hover","disabled","css_1","pointerEvents","stopPropagation","roundingFunction","arc","innerR","_key","rx","ry","rGetter","viewBox","src","preserveAspectRatio","setSVGImageSource","setAttributeNS","onDummyLoad","Image","obj","imageSrc","centerImage","ren","imageRegex","isImage","sym","symbolFn","img_1","imgwidth","imgheight","imgSize","backgroundSize","isImg","count","tspans","parentVal","tspan","alterY","segment","commandLength","C","L","M","Q","S","T","V","toUpperCase","Symbols","w","proximity","fullCircle","PI","innerRadius","open_1","open","cosStart","sinStart","cosEnd","sinEnd","longArc","clockwise","roundedRect","callout","safeDistance","diamond","triangle","allowPointSelect","enabledThreshold","normal","radiusPlus","lineWidthPlus","fillColor","dataLabels","cropThreshold","halo","inactive","turboThreshold","getNestedProperty","Series","processedXData","processedYData","zones","bindAxes","lastSeries","getColor","getSymbol","parallelArrays","insert","dataSorting","collection","indexOption","axisTypes","AXIS","optionalAxis","updateParallelArrays","toYData","date","pointInterval","pointIntervalUnit","relativeXValue","pointStart","set","getTime","sorted","allowDG","itemOptions","zone","seriesUserOptions","zoneAxis","negativeColor","negativeFillColor","getCyclic","defaults","setting","indexName","counterName","colorByPoint","hasGroupedData","seriesMarkerOption","findPointIndex","optionsObject","matchingPoint","matchedById","pointIndex","oldData","matcher","oldPoint","matchByName","cropped","cropStart","updateData","hasUpdatedByKey","lastIndex","pointsToAdd","equalLength","succeeded","pointOptions","pointClass","optionsToObject","hasDerivedData","addPoint","updatePoints","pt","updatedData","copiedData","oldDataLength","pointArrayMap","valueCount","indexOfX","indexOfY","firstPoint","allowMutatingData","dataLength","sortData","getFirstValidPoint","applyOptions","sortKey","getPointOptionsObject","aValue","bValue","seriesData","forceExtremesFromAll","croppedData","getExtremesFromAll","isLog","throwOnUnsorted","updatingNames","cropData","basePointRange","cropShoulder","j","cropEnd","dataOptions","PointClass","processedDataLength","groupCropStartIndex","dataGrouping","groupAll","arr","dataGroup","groupMap","destroyElements","validValue","withinRange","activeYData","shoulder","xMin","xMax","activeCounter","yDataLength","stackedYData","lastPlotX","stackIndicator","pointPlacementToXValue","dynamicallyPlaced","stackThreshold","startFromThreshold","closestPointRangePx","limitedRange","xValue","pointStack","stackValues","yValue","yBottom","stack","stacks","negStacks","stackKey","getStackIndicator","base","stackTotal","percentage","irregularWidths","setOffset","pointXOffset","barW","dataModify","modifyValue","translated","isInside","isPointInside","negative","getZone","getValidPoints","insideOnly","allowNull","getClipBox","seriesBox","getSharedClipKey","sharedClipKey","setClip","animationClipKey","easing","animationClipRect","markerAnimationClipRect","markerClipBox","finalBox","step_1","fx","afterAnimate","finishedAnimating","drawPoints","pointMarkerOptions","hasPointMarker","markerAttribs","seriesMarkerOptions","specialGroup","globallyEnabled","_hasPointMarkers","startXPos","hasImage","pointAttr","getClassName","seriesStateOptions","pointStateOptions","pointColorOption","pointColor","zoneColor","keepEventsForUpdate","issue134","navigator","userAgent","removeEvents","clips","animationTimeout","survive","applyZones","translatedFrom","translatedTo","clipAttr","pxRange","pxPosMin","pxPosMax","zoneArea","zoneGraph","graph","area","plotSizeMax","ignoreZones","showLine","isVML","resetZones","horAxis","vertAxis","invertible","chartSeriesGroup","animDuration","drawGraph","drawDataLabels","redrawPoints","drawTracker","wasDirty","searchKDTree","buildKDTree","buildingKdTree","dimensions","_kdtree","depth","median","kdAxisArray","kdNow","kdX","kdY","kdComparer","kdDimensions","_search","search","tree","nPoint1","nPoint2","tdist","sideA","sideB","trackByArea","trackerPath","areaPath","graphPath","tracker","TRACKER_FILL","withEvent","isInTheMiddle","removePoint","oldOptions","initialType","initialSeriesProto","kinds","preserve","newType","keepPoints","joinBy","mapData","hasOptionChanged","casting","ownEvents","hcEvents","dataLabel","_hasPointLabels","oldMarker","resolveColor","setName","optionName","option","oldOption","mouseOver","mouseOut","stateOptions","stateAnimation","labelBySeries","vis","oldVisibility","showOrHide","otherSeries","shouldShowTooltip","SeriesDefaults","types","registerType","registerSeriesType","allowShared","isSticky","now","outside","applyFilter","stdDeviation","bodyFormatter","formatPrefix","tooltipFormatter","cleanSplit","tt","defaultFormatter","tooltipFooterHeaderFormatter","hideTimer","mouseEvent","tooltipPos","chartX_1","chartY_1","isSplit","isHeader","getLabel","doSplit","wasSplit","chartStyle","label_1","xSetter_1","ySetter_1","boxWidth","boxHeight","swapped","outerWidth","documentElement","clientWidth","outerHeight","scrollHeight","clientHeight","buildDimensionArray","dim","first","preferFarSide","ttBelow","firstDimension","outerSize","innerSize","scaledInnerSize","scaledDist","scaleDiff","roomLeft","roomRight","alignedLeft","alignedRight","secondDimension","retVal","swap","temp","hideDelay","scrollablePixelsX","scrollablePixelsY","pointerEvent","stickOnContact","move","skipAnchor","setTimeout","pointOrPoints","pointConfig","textConfig","getLabelConfig","currentSeries","renderSplit","checkX_1","checkY_1","positioner","tooltipLabel","headerTop","_e","chartLeft","chartTop","distributionBoxTop","headerHeight","adjustedPlotHeight","defaultPositioner","owner","partialTooltip","updatePartialTooltip","boxPosition","boxStart","boxExtremes","_f","anchorPos","labelBBox","styledModeFormat","formatString","labelConfig","isFooter","xDateFormat","tooltipDateKeys","pad"],"sourceRoot":""}