{ "version": 3, "sources": ["node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/highcharts.src.js", "node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/highcharts-more.src.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/namespaces.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/namespace.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/creator.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selector.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/select.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/array.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selectorAll.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectAll.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/matcher.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectChild.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectChildren.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/filter.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/sparse.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/enter.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/constant.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/data.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/exit.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/join.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/merge.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/order.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/sort.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/call.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/nodes.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/node.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/size.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/empty.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/each.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/attr.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/window.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/style.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/property.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/classed.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/text.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/html.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/raise.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/lower.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/append.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/insert.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/remove.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/clone.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/datum.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/on.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/dispatch.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/iterator.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/index.js", "node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/select.js", "node_modules/.pnpm/d3-dispatch@3.0.1/node_modules/d3-dispatch/src/dispatch.js", "node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.js", "node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timeout.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/schedule.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/interrupt.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/interrupt.js", "node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/define.js", "node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/color.js", "node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/basis.js", "node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/basisClosed.js", "node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/constant.js", "node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/color.js", "node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js", "node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/numberArray.js", "node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/array.js", "node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/date.js", "node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/number.js", "node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/object.js", "node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js", "node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/value.js", "node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/decompose.js", "node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/parse.js", "node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/index.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/tween.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/interpolate.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attr.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attrTween.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/delay.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/duration.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/ease.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/easeVarying.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/filter.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/merge.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/on.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/remove.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/select.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selectAll.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selection.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/style.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/styleTween.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/text.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/textTween.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/transition.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/end.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/index.js", "node_modules/.pnpm/d3-ease@3.0.1/node_modules/d3-ease/src/cubic.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/transition.js", "node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js", "node_modules/.pnpm/d3-dsv@3.0.1/node_modules/d3-dsv/src/dsv.js", "highcharts_theme.js", "node_modules/.pnpm/crossfilter2@1.5.4/node_modules/crossfilter2/src/array.js", "node_modules/.pnpm/crossfilter2@1.5.4/node_modules/crossfilter2/src/filter.js", "node_modules/.pnpm/crossfilter2@1.5.4/node_modules/crossfilter2/src/identity.js", "node_modules/.pnpm/crossfilter2@1.5.4/node_modules/crossfilter2/src/null.js", "node_modules/.pnpm/crossfilter2@1.5.4/node_modules/crossfilter2/src/zero.js", "node_modules/.pnpm/crossfilter2@1.5.4/node_modules/crossfilter2/src/heap.js", "node_modules/.pnpm/crossfilter2@1.5.4/node_modules/crossfilter2/src/heapselect.js", "node_modules/.pnpm/crossfilter2@1.5.4/node_modules/crossfilter2/src/bisect.js", "node_modules/.pnpm/crossfilter2@1.5.4/node_modules/crossfilter2/src/permute.js", "node_modules/.pnpm/crossfilter2@1.5.4/node_modules/crossfilter2/src/reduce.js", "node_modules/.pnpm/@ranfdev+deepobj@1.0.2/node_modules/@ranfdev/deepobj/index.js", "node_modules/.pnpm/crossfilter2@1.5.4/node_modules/crossfilter2/src/result.js", "node_modules/.pnpm/crossfilter2@1.5.4/node_modules/crossfilter2/src/index.js", "node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/ascending.js", "cf.js", "node_modules/.pnpm/redugator@0.1.0/node_modules/redugator/index.js", "node_modules/.pnpm/redugator@0.1.0/node_modules/redugator/reducers/average.js", "node_modules/.pnpm/redugator@0.1.0/node_modules/redugator/reducers/bisect.js", "node_modules/.pnpm/redugator@0.1.0/node_modules/redugator/reducers/value-list.js", "node_modules/.pnpm/redugator@0.1.0/node_modules/redugator/reducers/max.js", "node_modules/.pnpm/redugator@0.1.0/node_modules/redugator/reducers/min.js", "node_modules/.pnpm/redugator@0.1.0/node_modules/redugator/reducers/sum.js", "reducers.js", "game_averages.js", "scoreReducer.js", "avgAll.js", "chart_registry.js", "average_chart.js", "age_chart.js", "player_chart.js", "country_chart.js", "discipline_chart.js", "gender_chart.js", "hand_chart.js", "node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatDecimal.js", "node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/exponent.js", "node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatGroup.js", "node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatNumerals.js", "node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatSpecifier.js", "node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatTrim.js", "node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatPrefixAuto.js", "node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatRounded.js", "node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatTypes.js", "node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/identity.js", "node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/locale.js", "node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/defaultLocale.js", "number.js", "lane_pair_chart.js", "table.js", "stats.js"], "sourcesContent": ["/**\n * @license Highcharts JS v10.3.3 (2023-01-20)\n *\n * (c) 2009-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n */\n(function (root, factory) {\n if (typeof module === 'object' && module.exports) {\n factory['default'] = factory;\n module.exports = root.document ?\n factory(root) :\n factory;\n } else if (typeof define === 'function' && define.amd) {\n define('highcharts/highcharts', function () {\n return factory(root);\n });\n } else {\n if (root.Highcharts) {\n root.Highcharts.error(16, true);\n }\n root.Highcharts = factory(root);\n }\n}(typeof window !== 'undefined' ? window : this, function (window) {\n 'use strict';\n var _modules = {};\n function _registerModule(obj, path, args, fn) {\n if (!obj.hasOwnProperty(path)) {\n obj[path] = fn.apply(null, args);\n\n if (typeof CustomEvent === 'function') {\n window.dispatchEvent(\n new CustomEvent(\n 'HighchartsModuleLoaded',\n { detail: { path: path, module: obj[path] }\n })\n );\n }\n }\n }\n _registerModule(_modules, 'Core/Globals.js', [], function () {\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 /* *\n *\n * Namespace\n *\n * */\n /**\n * Shared Highcharts properties.\n * @private\n */\n var Globals;\n (function (Globals) {\n /* *\n *\n * Constants\n *\n * */\n Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '10.3.3', Globals.win = (typeof window !== 'undefined' ?\n window :\n {}), // eslint-disable-line node/no-unsupported-features/es-builtins\n Globals.doc = Globals.win.document, Globals.svg = (Globals.doc &&\n Globals.doc.createElementNS &&\n !!Globals.doc.createElementNS(Globals.SVG_NS, 'svg').createSVGRect), Globals.userAgent = (Globals.win.navigator && Globals.win.navigator.userAgent) || '', Globals.isChrome = Globals.userAgent.indexOf('Chrome') !== -1, Globals.isFirefox = Globals.userAgent.indexOf('Firefox') !== -1, Globals.isMS = /(edge|msie|trident)/i.test(Globals.userAgent) && !Globals.win.opera, Globals.isSafari = !Globals.isChrome && Globals.userAgent.indexOf('Safari') !== -1, Globals.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(Globals.userAgent), Globals.isWebKit = Globals.userAgent.indexOf('AppleWebKit') !== -1, Globals.deg2rad = Math.PI * 2 / 360, Globals.hasBidiBug = (Globals.isFirefox &&\n parseInt(Globals.userAgent.split('Firefox/')[1], 10) < 4 // issue #38\n ), Globals.hasTouch = !!Globals.win.TouchEvent, Globals.marginNames = [\n 'plotTop',\n 'marginRight',\n 'marginBottom',\n 'plotLeft'\n ], Globals.noop = function () { }, Globals.supportsPassiveEvents = (function () {\n // Checks whether the browser supports passive events, (#11353).\n var supportsPassive = false;\n // Object.defineProperty doesn't work on IE as well as passive\n // events - instead of using polyfill, we can exclude IE totally.\n if (!Globals.isMS) {\n var opts = Object.defineProperty({}, 'passive', {\n get: function () {\n supportsPassive = true;\n }\n });\n if (Globals.win.addEventListener && Globals.win.removeEventListener) {\n Globals.win.addEventListener('testPassive', Globals.noop, opts);\n Globals.win.removeEventListener('testPassive', Globals.noop, opts);\n }\n }\n return supportsPassive;\n }());\n /**\n * An array containing the current chart objects in the page. A chart's\n * position in the array is preserved throughout the page's lifetime. When\n * a chart is destroyed, the array item becomes `undefined`.\n *\n * @name Highcharts.charts\n * @type {Array}\n */\n Globals.charts = [];\n /**\n * A hook for defining additional date format specifiers. New\n * specifiers are defined as key-value pairs by using the\n * specifier as key, and a function which takes the timestamp as\n * value. This function returns the formatted portion of the\n * date.\n *\n * @sample highcharts/global/dateformats/\n * Adding support for week number\n *\n * @name Highcharts.dateFormats\n * @type {Record}\n */\n Globals.dateFormats = {};\n /**\n * @private\n * @deprecated\n * @todo Use only `Core/Series/SeriesRegistry.seriesTypes`\n */\n Globals.seriesTypes = {};\n /**\n * @private\n */\n Globals.symbolSizes = {};\n /* *\n *\n * Properties\n *\n * */\n // eslint-disable-next-line prefer-const\n Globals.chartCount = 0;\n })(Globals || (Globals = {}));\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * Theme options that should get applied to the chart. In module mode it\n * might not be possible to change this property because of read-only\n * restrictions, instead use {@link Highcharts.setOptions}.\n *\n * @deprecated\n * @name Highcharts.theme\n * @type {Highcharts.Options}\n */\n (''); // keeps doclets above in JS file\n\n return Globals;\n });\n _registerModule(_modules, 'Core/Utilities.js', [_modules['Core/Globals.js']], function (H) {\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 var charts = H.charts,\n doc = H.doc,\n win = H.win;\n /* *\n *\n * Functions\n *\n * */\n /**\n * Provide error messages for debugging, with links to online explanation. This\n * function can be overridden to provide custom error handling.\n *\n * @sample highcharts/chart/highcharts-error/\n * Custom error handler\n *\n * @function Highcharts.error\n *\n * @param {number|string} code\n * The error code. See\n * [errors.xml](https://github.com/highcharts/highcharts/blob/master/errors/errors.xml)\n * for available codes. If it is a string, the error message is printed\n * directly in the console.\n *\n * @param {boolean} [stop=false]\n * Whether to throw an error or just log a warning in the console.\n *\n * @param {Highcharts.Chart} [chart]\n * Reference to the chart that causes the error. Used in 'debugger'\n * module to display errors directly on the chart.\n * Important note: This argument is undefined for errors that lack\n * access to the Chart instance. In such case, the error will be\n * displayed on the last created chart.\n *\n * @param {Highcharts.Dictionary} [params]\n * Additional parameters for the generated message.\n *\n * @return {void}\n */\n function error(code, stop, chart, params) {\n var severity = stop ? 'Highcharts error' : 'Highcharts warning';\n if (code === 32) {\n code = \"\" + severity + \": Deprecated member\";\n }\n var isCode = isNumber(code);\n var message = isCode ?\n \"\" + severity + \" #\" + code + \": www.highcharts.com/errors/\" + code + \"/\" :\n code.toString();\n var defaultHandler = function () {\n if (stop) {\n throw new Error(message);\n }\n // else ...\n if (win.console &&\n error.messages.indexOf(message) === -1 // prevent console flooting\n ) {\n console.warn(message); // eslint-disable-line no-console\n }\n };\n if (typeof params !== 'undefined') {\n var additionalMessages_1 = '';\n if (isCode) {\n message += '?';\n }\n objectEach(params, function (value, key) {\n additionalMessages_1 += \"\\n - \".concat(key, \": \").concat(value);\n if (isCode) {\n message += encodeURI(key) + '=' + encodeURI(value);\n }\n });\n message += additionalMessages_1;\n }\n fireEvent(H, 'displayError', { chart: chart, code: code, message: message, params: params }, defaultHandler);\n error.messages.push(message);\n }\n (function (error) {\n error.messages = [];\n })(error || (error = {}));\n /* eslint-disable valid-jsdoc */\n /**\n * Utility function to deep merge two or more objects and return a third object.\n * If the first argument is true, the contents of the second object is copied\n * into the first object. The merge function can also be used with a single\n * object argument to create a deep copy of an object.\n *\n * @function Highcharts.merge\n *\n * @param {boolean} extend\n * Whether to extend the left-side object (a) or return a whole new\n * object.\n *\n * @param {T|undefined} a\n * The first object to extend. When only this is given, the function\n * returns a deep copy.\n *\n * @param {...Array} [n]\n * An object to merge into the previous one.\n *\n * @return {T}\n * The merged object. If the first argument is true, the return is the\n * same as the second argument.\n */ /**\n * Utility function to deep merge two or more objects and return a third object.\n * The merge function can also be used with a single object argument to create a\n * deep copy of an object.\n *\n * @function Highcharts.merge\n *\n * @param {T|undefined} a\n * The first object to extend. When only this is given, the function\n * returns a deep copy.\n *\n * @param {...Array} [n]\n * An object to merge into the previous one.\n *\n * @return {T}\n * The merged object. If the first argument is true, the return is the\n * same as the second argument.\n */\n function merge() {\n /* eslint-enable valid-jsdoc */\n var i,\n args = arguments,\n ret = {};\n var doCopy = function (copy,\n original) {\n // An object is replacing a primitive\n if (typeof copy !== 'object') {\n copy = {};\n }\n objectEach(original, function (value, key) {\n // Prototype pollution (#14883)\n if (key === '__proto__' || key === 'constructor') {\n return;\n }\n // Copy the contents of objects, but not arrays or DOM nodes\n if (isObject(value, true) &&\n !isClass(value) &&\n !isDOMElement(value)) {\n copy[key] = doCopy(copy[key] || {}, value);\n // Primitives and arrays are copied over directly\n }\n else {\n copy[key] = original[key];\n }\n });\n return copy;\n };\n // If first argument is true, copy into the existing object. Used in\n // setOptions.\n if (args[0] === true) {\n ret = args[1];\n args = Array.prototype.slice.call(args, 2);\n }\n // For each argument, extend the return\n var len = args.length;\n for (i = 0; i < len; i++) {\n ret = doCopy(ret, args[i]);\n }\n return ret;\n }\n /**\n * Constrain a value to within a lower and upper threshold.\n *\n * @private\n * @param {number} value The initial value\n * @param {number} min The lower threshold\n * @param {number} max The upper threshold\n * @return {number} Returns a number value within min and max.\n */\n function clamp(value, min, max) {\n return value > min ? value < max ? value : max : min;\n }\n // eslint-disable-next-line valid-jsdoc\n /**\n * Remove settings that have not changed, to avoid unnecessary rendering or\n * computing (#9197).\n * @private\n */\n function cleanRecursively(newer, older) {\n var result = {};\n objectEach(newer, function (_val, key) {\n var ob;\n // Dive into objects (except DOM nodes)\n if (isObject(newer[key], true) &&\n !newer.nodeType && // #10044\n older[key]) {\n ob = cleanRecursively(newer[key], older[key]);\n if (Object.keys(ob).length) {\n result[key] = ob;\n }\n // Arrays, primitives and DOM nodes are copied directly\n }\n else if (isObject(newer[key]) ||\n newer[key] !== older[key] ||\n // If the newer key is explicitly undefined, keep it (#10525)\n (key in newer && !(key in older))) {\n result[key] = newer[key];\n }\n });\n return result;\n }\n /**\n * Shortcut for parseInt\n *\n * @private\n * @function Highcharts.pInt\n *\n * @param {*} s\n * any\n *\n * @param {number} [mag]\n * Magnitude\n *\n * @return {number}\n * number\n */\n function pInt(s, mag) {\n return parseInt(s, mag || 10);\n }\n /**\n * Utility function to check for string type.\n *\n * @function Highcharts.isString\n *\n * @param {*} s\n * The item to check.\n *\n * @return {boolean}\n * True if the argument is a string.\n */\n function isString(s) {\n return typeof s === 'string';\n }\n /**\n * Utility function to check if an item is an array.\n *\n * @function Highcharts.isArray\n *\n * @param {*} obj\n * The item to check.\n *\n * @return {boolean}\n * True if the argument is an array.\n */\n function isArray(obj) {\n var str = Object.prototype.toString.call(obj);\n return str === '[object Array]' || str === '[object Array Iterator]';\n }\n /**\n * Utility function to check if an item is of type object.\n *\n * @function Highcharts.isObject\n *\n * @param {*} obj\n * The item to check.\n *\n * @param {boolean} [strict=false]\n * Also checks that the object is not an array.\n *\n * @return {boolean}\n * True if the argument is an object.\n */\n function isObject(obj, strict) {\n return (!!obj &&\n typeof obj === 'object' &&\n (!strict || !isArray(obj))); // eslint-disable-line @typescript-eslint/no-explicit-any\n }\n /**\n * Utility function to check if an Object is a HTML Element.\n *\n * @function Highcharts.isDOMElement\n *\n * @param {*} obj\n * The item to check.\n *\n * @return {boolean}\n * True if the argument is a HTML Element.\n */\n function isDOMElement(obj) {\n return isObject(obj) && typeof obj.nodeType === 'number';\n }\n /**\n * Utility function to check if an Object is a class.\n *\n * @function Highcharts.isClass\n *\n * @param {object|undefined} obj\n * The item to check.\n *\n * @return {boolean}\n * True if the argument is a class.\n */\n function isClass(obj) {\n var c = obj && obj.constructor;\n return !!(isObject(obj, true) &&\n !isDOMElement(obj) &&\n (c && c.name && c.name !== 'Object'));\n }\n /**\n * Utility function to check if an item is a number and it is finite (not NaN,\n * Infinity or -Infinity).\n *\n * @function Highcharts.isNumber\n *\n * @param {*} n\n * The item to check.\n *\n * @return {boolean}\n * True if the item is a finite number\n */\n function isNumber(n) {\n return typeof n === 'number' && !isNaN(n) && n < Infinity && n > -Infinity;\n }\n /**\n * Remove the last occurence of an item from an array.\n *\n * @function Highcharts.erase\n *\n * @param {Array<*>} arr\n * The array.\n *\n * @param {*} item\n * The item to remove.\n *\n * @return {void}\n */\n function erase(arr, item) {\n var i = arr.length;\n while (i--) {\n if (arr[i] === item) {\n arr.splice(i, 1);\n break;\n }\n }\n }\n /**\n * Check if an object is null or undefined.\n *\n * @function Highcharts.defined\n *\n * @param {*} obj\n * The object to check.\n *\n * @return {boolean}\n * False if the object is null or undefined, otherwise true.\n */\n function defined(obj) {\n return typeof obj !== 'undefined' && obj !== null;\n }\n /**\n * Set or get an attribute or an object of attributes.\n *\n * To use as a setter, pass a key and a value, or let the second argument be a\n * collection of keys and values. When using a collection, passing a value of\n * `null` or `undefined` will remove the attribute.\n *\n * To use as a getter, pass only a string as the second argument.\n *\n * @function Highcharts.attr\n *\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} elem\n * The DOM element to receive the attribute(s).\n *\n * @param {string|Highcharts.HTMLAttributes|Highcharts.SVGAttributes} [keyOrAttribs]\n * The property or an object of key-value pairs.\n *\n * @param {number|string} [value]\n * The value if a single property is set.\n *\n * @return {string|null|undefined}\n * When used as a getter, return the value.\n */\n function attr(elem, keyOrAttribs, value) {\n var isGetter = isString(keyOrAttribs) && !defined(value);\n var ret;\n var attrSingle = function (value,\n key) {\n // Set the value\n if (defined(value)) {\n elem.setAttribute(key,\n value);\n // Get the value\n }\n else if (isGetter) {\n ret = elem.getAttribute(key);\n // IE7 and below cannot get class through getAttribute (#7850)\n if (!ret && key === 'class') {\n ret = elem.getAttribute(key + 'Name');\n }\n // Remove the value\n }\n else {\n elem.removeAttribute(key);\n }\n };\n // If keyOrAttribs is a string\n if (isString(keyOrAttribs)) {\n attrSingle(value, keyOrAttribs);\n // Else if keyOrAttribs is defined, it is a hash of key/value pairs\n }\n else {\n objectEach(keyOrAttribs, attrSingle);\n }\n return ret;\n }\n /**\n * Check if an element is an array, and if not, make it into an array.\n *\n * @function Highcharts.splat\n *\n * @param {*} obj\n * The object to splat.\n *\n * @return {Array}\n * The produced or original array.\n */\n function splat(obj) {\n return isArray(obj) ? obj : [obj];\n }\n /**\n * Set a timeout if the delay is given, otherwise perform the function\n * synchronously.\n *\n * @function Highcharts.syncTimeout\n *\n * @param {Function} fn\n * The function callback.\n *\n * @param {number} delay\n * Delay in milliseconds.\n *\n * @param {*} [context]\n * An optional context to send to the function callback.\n *\n * @return {number}\n * An identifier for the timeout that can later be cleared with\n * Highcharts.clearTimeout. Returns -1 if there is no timeout.\n */\n function syncTimeout(fn, delay, context) {\n if (delay > 0) {\n return setTimeout(fn, delay, context);\n }\n fn.call(0, context);\n return -1;\n }\n /**\n * Internal clear timeout. The function checks that the `id` was not removed\n * (e.g. by `chart.destroy()`). For the details see\n * [issue #7901](https://github.com/highcharts/highcharts/issues/7901).\n *\n * @function Highcharts.clearTimeout\n *\n * @param {number|undefined} id\n * Id of a timeout.\n */\n function internalClearTimeout(id) {\n if (defined(id)) {\n clearTimeout(id);\n }\n }\n /* eslint-disable valid-jsdoc */\n /**\n * Utility function to extend an object with the members of another.\n *\n * @function Highcharts.extend\n *\n * @param {T|undefined} a\n * The object to be extended.\n *\n * @param {Partial} b\n * The object to add to the first one.\n *\n * @return {T}\n * Object a, the original object.\n */\n function extend(a, b) {\n /* eslint-enable valid-jsdoc */\n var n;\n if (!a) {\n a = {};\n }\n for (n in b) { // eslint-disable-line guard-for-in\n a[n] = b[n];\n }\n return a;\n }\n /* eslint-disable valid-jsdoc */\n /**\n * Return the first value that is not null or undefined.\n *\n * @function Highcharts.pick\n *\n * @param {...Array} items\n * Variable number of arguments to inspect.\n *\n * @return {T}\n * The value of the first argument that is not null or undefined.\n */\n function pick() {\n var args = arguments;\n var length = args.length;\n for (var i = 0; i < length; i++) {\n var arg = args[i];\n if (typeof arg !== 'undefined' && arg !== null) {\n return arg;\n }\n }\n }\n /**\n * Set CSS on a given element.\n *\n * @function Highcharts.css\n *\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} el\n * An HTML DOM element.\n *\n * @param {Highcharts.CSSObject} styles\n * Style object with camel case property names.\n *\n * @return {void}\n */\n function css(el, styles) {\n if (H.isMS && !H.svg) { // #2686\n if (styles && defined(styles.opacity)) {\n styles.filter = \"alpha(opacity=\".concat(styles.opacity * 100, \")\");\n }\n }\n extend(el.style, styles);\n }\n /**\n * Utility function to create an HTML element with attributes and styles.\n *\n * @function Highcharts.createElement\n *\n * @param {string} tag\n * The HTML tag.\n *\n * @param {Highcharts.HTMLAttributes} [attribs]\n * Attributes as an object of key-value pairs.\n *\n * @param {Highcharts.CSSObject} [styles]\n * Styles as an object of key-value pairs.\n *\n * @param {Highcharts.HTMLDOMElement} [parent]\n * The parent HTML object.\n *\n * @param {boolean} [nopad=false]\n * If true, remove all padding, border and margin.\n *\n * @return {Highcharts.HTMLDOMElement}\n * The created DOM element.\n */\n function createElement(tag, attribs, styles, parent, nopad) {\n var el = doc.createElement(tag);\n if (attribs) {\n extend(el, attribs);\n }\n if (nopad) {\n css(el, { padding: '0', border: 'none', margin: '0' });\n }\n if (styles) {\n css(el, styles);\n }\n if (parent) {\n parent.appendChild(el);\n }\n return el;\n }\n // eslint-disable-next-line valid-jsdoc\n /**\n * Extend a prototyped class by new members.\n *\n * @function Highcharts.extendClass\n *\n * @param {Highcharts.Class} parent\n * The parent prototype to inherit.\n *\n * @param {Highcharts.Dictionary<*>} members\n * A collection of prototype members to add or override compared to the\n * parent prototype.\n *\n * @return {Highcharts.Class}\n * A new prototype.\n */\n function extendClass(parent, members) {\n var obj = (function () { });\n obj.prototype = new parent(); // eslint-disable-line new-cap\n extend(obj.prototype, members);\n return obj;\n }\n /**\n * Left-pad a string to a given length by adding a character repetitively.\n *\n * @function Highcharts.pad\n *\n * @param {number} number\n * The input string or number.\n *\n * @param {number} [length]\n * The desired string length.\n *\n * @param {string} [padder=0]\n * The character to pad with.\n *\n * @return {string}\n * The padded string.\n */\n function pad(number, length, padder) {\n return new Array((length || 2) +\n 1 -\n String(number)\n .replace('-', '')\n .length).join(padder || '0') + number;\n }\n /**\n * Return a length based on either the integer value, or a percentage of a base.\n *\n * @function Highcharts.relativeLength\n *\n * @param {Highcharts.RelativeSize} value\n * A percentage string or a number.\n *\n * @param {number} base\n * The full length that represents 100%.\n *\n * @param {number} [offset=0]\n * A pixel offset to apply for percentage values. Used internally in\n * axis positioning.\n *\n * @return {number}\n * The computed length.\n */\n function relativeLength(value, base, offset) {\n return (/%$/).test(value) ?\n (base * parseFloat(value) / 100) + (offset || 0) :\n parseFloat(value);\n }\n /**\n * Wrap a method with extended functionality, preserving the original function.\n *\n * @function Highcharts.wrap\n *\n * @param {*} obj\n * The context object that the method belongs to. In real cases, this is\n * often a prototype.\n *\n * @param {string} method\n * The name of the method to extend.\n *\n * @param {Highcharts.WrapProceedFunction} func\n * A wrapper function callback. This function is called with the same\n * arguments as the original function, except that the original function\n * is unshifted and passed as the first argument.\n */\n function wrap(obj, method, func) {\n var proceed = obj[method];\n obj[method] = function () {\n var outerArgs = arguments,\n scope = this;\n return func.apply(this, [\n function () {\n return proceed.apply(scope, arguments.length ? arguments : outerArgs);\n }\n ].concat([].slice.call(arguments)));\n };\n }\n /**\n * Get the magnitude of a number.\n *\n * @function Highcharts.getMagnitude\n *\n * @param {number} num\n * The number.\n *\n * @return {number}\n * The magnitude, where 1-9 are magnitude 1, 10-99 magnitude 2 etc.\n */\n function getMagnitude(num) {\n return Math.pow(10, Math.floor(Math.log(num) / Math.LN10));\n }\n /**\n * Take an interval and normalize it to multiples of round numbers.\n *\n * @deprecated\n * @function Highcharts.normalizeTickInterval\n *\n * @param {number} interval\n * The raw, un-rounded interval.\n *\n * @param {Array<*>} [multiples]\n * Allowed multiples.\n *\n * @param {number} [magnitude]\n * The magnitude of the number.\n *\n * @param {boolean} [allowDecimals]\n * Whether to allow decimals.\n *\n * @param {boolean} [hasTickAmount]\n * If it has tickAmount, avoid landing on tick intervals lower than\n * original.\n *\n * @return {number}\n * The normalized interval.\n *\n * @todo\n * Move this function to the Axis prototype. It is here only for historical\n * reasons.\n */\n function normalizeTickInterval(interval, multiples, magnitude, allowDecimals, hasTickAmount) {\n var i,\n retInterval = interval;\n // round to a tenfold of 1, 2, 2.5 or 5\n magnitude = pick(magnitude, getMagnitude(interval));\n var normalized = interval / magnitude;\n // multiples for a linear scale\n if (!multiples) {\n multiples = hasTickAmount ?\n // Finer grained ticks when the tick amount is hard set, including\n // when alignTicks is true on multiple axes (#4580).\n [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] :\n // Else, let ticks fall on rounder numbers\n [1, 2, 2.5, 5, 10];\n // the allowDecimals option\n if (allowDecimals === false) {\n if (magnitude === 1) {\n multiples = multiples.filter(function (num) {\n return num % 1 === 0;\n });\n }\n else if (magnitude <= 0.1) {\n multiples = [1 / magnitude];\n }\n }\n }\n // normalize the interval to the nearest multiple\n for (i = 0; i < multiples.length; i++) {\n retInterval = multiples[i];\n // only allow tick amounts smaller than natural\n if ((hasTickAmount &&\n retInterval * magnitude >= interval) ||\n (!hasTickAmount &&\n (normalized <=\n (multiples[i] +\n (multiples[i + 1] || multiples[i])) / 2))) {\n break;\n }\n }\n // Multiply back to the correct magnitude. Correct floats to appropriate\n // precision (#6085).\n retInterval = correctFloat(retInterval * magnitude, -Math.round(Math.log(0.001) / Math.LN10));\n return retInterval;\n }\n /**\n * Sort an object array and keep the order of equal items. The ECMAScript\n * standard does not specify the behaviour when items are equal.\n *\n * @function Highcharts.stableSort\n *\n * @param {Array<*>} arr\n * The array to sort.\n *\n * @param {Function} sortFunction\n * The function to sort it with, like with regular Array.prototype.sort.\n */\n function stableSort(arr, sortFunction) {\n // @todo It seems like Chrome since v70 sorts in a stable way internally,\n // plus all other browsers do it, so over time we may be able to remove this\n // function\n var length = arr.length;\n var sortValue,\n i;\n // Add index to each item\n for (i = 0; i < length; i++) {\n arr[i].safeI = i; // stable sort index\n }\n arr.sort(function (a, b) {\n sortValue = sortFunction(a, b);\n return sortValue === 0 ? a.safeI - b.safeI : sortValue;\n });\n // Remove index from items\n for (i = 0; i < length; i++) {\n delete arr[i].safeI; // stable sort index\n }\n }\n /**\n * Non-recursive method to find the lowest member of an array. `Math.min` raises\n * a maximum call stack size exceeded error in Chrome when trying to apply more\n * than 150.000 points. This method is slightly slower, but safe.\n *\n * @function Highcharts.arrayMin\n *\n * @param {Array<*>} data\n * An array of numbers.\n *\n * @return {number}\n * The lowest number.\n */\n function arrayMin(data) {\n var i = data.length,\n min = data[0];\n while (i--) {\n if (data[i] < min) {\n min = data[i];\n }\n }\n return min;\n }\n /**\n * Non-recursive method to find the lowest member of an array. `Math.max` raises\n * a maximum call stack size exceeded error in Chrome when trying to apply more\n * than 150.000 points. This method is slightly slower, but safe.\n *\n * @function Highcharts.arrayMax\n *\n * @param {Array<*>} data\n * An array of numbers.\n *\n * @return {number}\n * The highest number.\n */\n function arrayMax(data) {\n var i = data.length,\n max = data[0];\n while (i--) {\n if (data[i] > max) {\n max = data[i];\n }\n }\n return max;\n }\n /**\n * Utility method that destroys any SVGElement instances that are properties on\n * the given object. It loops all properties and invokes destroy if there is a\n * destroy method. The property is then delete.\n *\n * @function Highcharts.destroyObjectProperties\n *\n * @param {*} obj\n * The object to destroy properties on.\n *\n * @param {*} [except]\n * Exception, do not destroy this property, only delete it.\n */\n function destroyObjectProperties(obj, except) {\n objectEach(obj, function (val, n) {\n // If the object is non-null and destroy is defined\n if (val && val !== except && val.destroy) {\n // Invoke the destroy\n val.destroy();\n }\n // Delete the property from the object.\n delete obj[n];\n });\n }\n /**\n * Discard a HTML element\n *\n * @function Highcharts.discardElement\n *\n * @param {Highcharts.HTMLDOMElement} element\n * The HTML node to discard.\n */\n function discardElement(element) {\n if (element && element.parentElement) {\n element.parentElement.removeChild(element);\n }\n }\n /**\n * Fix JS round off float errors.\n *\n * @function Highcharts.correctFloat\n *\n * @param {number} num\n * A float number to fix.\n *\n * @param {number} [prec=14]\n * The precision.\n *\n * @return {number}\n * The corrected float number.\n */\n function correctFloat(num, prec) {\n // When the number is higher than 1e14 use the number (#16275)\n return num > 1e14 ? num : parseFloat(num.toPrecision(prec || 14));\n }\n /**\n * The time unit lookup\n *\n * @ignore\n */\n var timeUnits = {\n millisecond: 1,\n second: 1000,\n minute: 60000,\n hour: 3600000,\n day: 24 * 3600000,\n week: 7 * 24 * 3600000,\n month: 28 * 24 * 3600000,\n year: 364 * 24 * 3600000\n };\n /**\n * Easing definition\n *\n * @private\n * @function Math.easeInOutSine\n *\n * @param {number} pos\n * Current position, ranging from 0 to 1.\n *\n * @return {number}\n * Ease result\n */\n Math.easeInOutSine = function (pos) {\n return -0.5 * (Math.cos(Math.PI * pos) - 1);\n };\n /**\n * Returns the value of a property path on a given object.\n *\n * @private\n * @function getNestedProperty\n *\n * @param {string} path\n * Path to the property, for example `custom.myValue`.\n *\n * @param {unknown} obj\n * Instance containing the property on the specific path.\n *\n * @return {unknown}\n * The unknown property value.\n */\n function getNestedProperty(path, parent) {\n var pathElements = path.split('.');\n while (pathElements.length && defined(parent)) {\n var pathElement = pathElements.shift();\n // Filter on the key\n if (typeof pathElement === 'undefined' ||\n pathElement === '__proto__') {\n return; // undefined\n }\n var child = parent[pathElement];\n // Filter on the child\n if (!defined(child) ||\n typeof child === 'function' ||\n typeof child.nodeType === 'number' ||\n child === win) {\n return; // undefined\n }\n // Else, proceed\n parent = child;\n }\n return parent;\n }\n /**\n * Get the computed CSS value for given element and property, only for numerical\n * properties. For width and height, the dimension of the inner box (excluding\n * padding) is returned. Used for fitting the chart within the container.\n *\n * @function Highcharts.getStyle\n *\n * @param {Highcharts.HTMLDOMElement} el\n * An HTML element.\n *\n * @param {string} prop\n * The property name.\n *\n * @param {boolean} [toInt=true]\n * Parse to integer.\n *\n * @return {number|string|undefined}\n * The style value.\n */\n function getStyle(el, prop, toInt) {\n var customGetStyle = (H.getStyle || // oldie getStyle\n getStyle);\n var style;\n // For width and height, return the actual inner pixel size (#4913)\n if (prop === 'width') {\n var offsetWidth = Math.min(el.offsetWidth,\n el.scrollWidth);\n // In flex boxes, we need to use getBoundingClientRect and floor it,\n // because scrollWidth doesn't support subpixel precision (#6427) ...\n var boundingClientRectWidth = el.getBoundingClientRect &&\n el.getBoundingClientRect().width;\n // ...unless if the containing div or its parents are transform-scaled\n // down, in which case the boundingClientRect can't be used as it is\n // also scaled down (#9871, #10498).\n if (boundingClientRectWidth < offsetWidth &&\n boundingClientRectWidth >= offsetWidth - 1) {\n offsetWidth = Math.floor(boundingClientRectWidth);\n }\n return Math.max(0, // #8377\n (offsetWidth -\n (customGetStyle(el, 'padding-left', true) || 0) -\n (customGetStyle(el, 'padding-right', true) || 0)));\n }\n if (prop === 'height') {\n return Math.max(0, // #8377\n (Math.min(el.offsetHeight, el.scrollHeight) -\n (customGetStyle(el, 'padding-top', true) || 0) -\n (customGetStyle(el, 'padding-bottom', true) || 0)));\n }\n if (!win.getComputedStyle) {\n // SVG not supported, forgot to load oldie.js?\n error(27, true);\n }\n // Otherwise, get the computed style\n var css = win.getComputedStyle(el,\n void 0); // eslint-disable-line no-undefined\n if (css) {\n style = css.getPropertyValue(prop);\n if (pick(toInt, prop !== 'opacity')) {\n style = pInt(style);\n }\n }\n return style;\n }\n /**\n * Search for an item in an array.\n *\n * @function Highcharts.inArray\n *\n * @deprecated\n *\n * @param {*} item\n * The item to search for.\n *\n * @param {Array<*>} arr\n * The array or node collection to search in.\n *\n * @param {number} [fromIndex=0]\n * The index to start searching from.\n *\n * @return {number}\n * The index within the array, or -1 if not found.\n */\n function inArray(item, arr, fromIndex) {\n error(32, false, void 0, { 'Highcharts.inArray': 'use Array.indexOf' });\n return arr.indexOf(item, fromIndex);\n }\n /**\n * Return the value of the first element in the array that satisfies the\n * provided testing function.\n *\n * @function Highcharts.find\n *\n * @param {Array} arr\n * The array to test.\n *\n * @param {Function} callback\n * The callback function. The function receives the item as the first\n * argument. Return `true` if this item satisfies the condition.\n *\n * @return {T|undefined}\n * The value of the element.\n */\n var find = Array.prototype.find ?\n function (arr,\n callback) {\n return arr.find(callback);\n } :\n // Legacy implementation. PhantomJS, IE <= 11 etc. #7223.\n function (arr, callback) {\n var i;\n var length = arr.length;\n for (i = 0; i < length; i++) {\n if (callback(arr[i], i)) { // eslint-disable-line node/callback-return\n return arr[i];\n }\n }\n };\n /**\n * Returns an array of a given object's own properties.\n *\n * @function Highcharts.keys\n * @deprecated\n *\n * @param {*} obj\n * The object of which the properties are to be returned.\n *\n * @return {Array}\n * An array of strings that represents all the properties.\n */\n function keys(obj) {\n error(32, false, void 0, { 'Highcharts.keys': 'use Object.keys' });\n return Object.keys(obj);\n }\n /**\n * Get the element's offset position, corrected for `overflow: auto`.\n *\n * @function Highcharts.offset\n *\n * @param {global.Element} el\n * The DOM element.\n *\n * @return {Highcharts.OffsetObject}\n * An object containing `left` and `top` properties for the position in\n * the page.\n */\n function offset(el) {\n var docElem = doc.documentElement,\n box = (el.parentElement || el.parentNode) ?\n el.getBoundingClientRect() :\n { top: 0,\n left: 0,\n width: 0,\n height: 0 };\n return {\n top: box.top + (win.pageYOffset || docElem.scrollTop) -\n (docElem.clientTop || 0),\n left: box.left + (win.pageXOffset || docElem.scrollLeft) -\n (docElem.clientLeft || 0),\n width: box.width,\n height: box.height\n };\n }\n /* eslint-disable valid-jsdoc */\n /**\n * Iterate over object key pairs in an object.\n *\n * @function Highcharts.objectEach\n *\n * @param {*} obj\n * The object to iterate over.\n *\n * @param {Highcharts.ObjectEachCallbackFunction} fn\n * The iterator callback. It passes three arguments:\n * * value - The property value.\n * * key - The property key.\n * * obj - The object that objectEach is being applied to.\n *\n * @param {T} [ctx]\n * The context.\n */\n function objectEach(obj, fn, ctx) {\n /* eslint-enable valid-jsdoc */\n for (var key in obj) {\n if (Object.hasOwnProperty.call(obj, key)) {\n fn.call(ctx || obj[key], obj[key], key, obj);\n }\n }\n }\n /**\n * Iterate over an array.\n *\n * @deprecated\n * @function Highcharts.each\n *\n * @param {Array<*>} arr\n * The array to iterate over.\n *\n * @param {Function} fn\n * The iterator callback. It passes three arguments:\n * - `item`: The array item.\n * - `index`: The item's index in the array.\n * - `arr`: The array that each is being applied to.\n *\n * @param {*} [ctx]\n * The context.\n *\n * @return {void}\n */\n /**\n * Filter an array by a callback.\n *\n * @deprecated\n * @function Highcharts.grep\n *\n * @param {Array<*>} arr\n * The array to filter.\n *\n * @param {Function} callback\n * The callback function. The function receives the item as the first\n * argument. Return `true` if the item is to be preserved.\n *\n * @return {Array<*>}\n * A new, filtered array.\n */\n /**\n * Map an array by a callback.\n *\n * @deprecated\n * @function Highcharts.map\n *\n * @param {Array<*>} arr\n * The array to map.\n *\n * @param {Function} fn\n * The callback function. Return the new value for the new array.\n *\n * @return {Array<*>}\n * A new array item with modified items.\n */\n /**\n * Reduce an array to a single value.\n *\n * @deprecated\n * @function Highcharts.reduce\n *\n * @param {Array<*>} arr\n * The array to reduce.\n *\n * @param {Function} fn\n * The callback function. Return the reduced value. Receives 4\n * arguments: Accumulated/reduced value, current value, current array\n * index, and the array.\n *\n * @param {*} initialValue\n * The initial value of the accumulator.\n *\n * @return {*}\n * The reduced value.\n */\n /**\n * Test whether at least one element in the array passes the test implemented by\n * the provided function.\n *\n * @deprecated\n * @function Highcharts.some\n *\n * @param {Array<*>} arr\n * The array to test\n *\n * @param {Function} fn\n * The function to run on each item. Return truty to pass the test.\n * Receives arguments `currentValue`, `index` and `array`.\n *\n * @param {*} ctx\n * The context.\n *\n * @return {boolean}\n */\n objectEach({\n map: 'map',\n each: 'forEach',\n grep: 'filter',\n reduce: 'reduce',\n some: 'some'\n }, function (val, key) {\n H[key] = function (arr) {\n var _a;\n error(32, false, void 0, (_a = {}, _a[\"Highcharts.\".concat(key)] = \"use Array.\".concat(val), _a));\n return Array.prototype[val].apply(arr, [].slice.call(arguments, 1));\n };\n });\n /* eslint-disable valid-jsdoc */\n /**\n * Add an event listener.\n *\n * @function Highcharts.addEvent\n *\n * @param {Highcharts.Class|T} el\n * The element or object to add a listener to. It can be a\n * {@link HTMLDOMElement}, an {@link SVGElement} or any other object.\n *\n * @param {string} type\n * The event type.\n *\n * @param {Highcharts.EventCallbackFunction|Function} fn\n * The function callback to execute when the event is fired.\n *\n * @param {Highcharts.EventOptionsObject} [options]\n * Options for adding the event.\n *\n * @return {Function}\n * A callback function to remove the added event.\n */\n function addEvent(el, type, fn, options) {\n /* eslint-enable valid-jsdoc */\n if (options === void 0) { options = {}; }\n // Add hcEvents to either the prototype (in case we're running addEvent on a\n // class) or the instance. If hasOwnProperty('hcEvents') is false, it is\n // inherited down the prototype chain, in which case we need to set the\n // property on this instance (which may itself be a prototype).\n var owner = typeof el === 'function' && el.prototype || el;\n if (!Object.hasOwnProperty.call(owner, 'hcEvents')) {\n owner.hcEvents = {};\n }\n var events = owner.hcEvents;\n // Allow click events added to points, otherwise they will be prevented by\n // the TouchPointer.pinch function after a pinch zoom operation (#7091).\n if (H.Point && // without H a dependency loop occurs\n el instanceof H.Point &&\n el.series &&\n el.series.chart) {\n el.series.chart.runTrackerClick = true;\n }\n // Handle DOM events\n // If the browser supports passive events, add it to improve performance\n // on touch events (#11353).\n var addEventListener = (el.addEventListener || H.addEventListenerPolyfill);\n if (addEventListener) {\n addEventListener.call(el, type, fn, H.supportsPassiveEvents ? {\n passive: options.passive === void 0 ?\n type.indexOf('touch') !== -1 : options.passive,\n capture: false\n } : false);\n }\n if (!events[type]) {\n events[type] = [];\n }\n var eventObject = {\n fn: fn,\n order: typeof options.order === 'number' ? options.order : Infinity\n };\n events[type].push(eventObject);\n // Order the calls\n events[type].sort(function (a, b) { return a.order - b.order; });\n // Return a function that can be called to remove this event.\n return function () {\n removeEvent(el, type, fn);\n };\n }\n /* eslint-disable valid-jsdoc */\n /**\n * Remove an event that was added with {@link Highcharts#addEvent}.\n *\n * @function Highcharts.removeEvent\n *\n * @param {Highcharts.Class|T} el\n * The element to remove events on.\n *\n * @param {string} [type]\n * The type of events to remove. If undefined, all events are removed\n * from the element.\n *\n * @param {Highcharts.EventCallbackFunction} [fn]\n * The specific callback to remove. If undefined, all events that match\n * the element and optionally the type are removed.\n *\n * @return {void}\n */\n function removeEvent(el, type, fn) {\n /* eslint-enable valid-jsdoc */\n /**\n * @private\n */\n function removeOneEvent(type, fn) {\n var removeEventListener = (el.removeEventListener || H.removeEventListenerPolyfill);\n if (removeEventListener) {\n removeEventListener.call(el, type, fn, false);\n }\n }\n /**\n * @private\n */\n function removeAllEvents(eventCollection) {\n var types,\n len;\n if (!el.nodeName) {\n return; // break on non-DOM events\n }\n if (type) {\n types = {};\n types[type] = true;\n }\n else {\n types = eventCollection;\n }\n objectEach(types, function (_val, n) {\n if (eventCollection[n]) {\n len = eventCollection[n].length;\n while (len--) {\n removeOneEvent(n, eventCollection[n][len].fn);\n }\n }\n });\n }\n var owner = typeof el === 'function' && el.prototype || el;\n if (Object.hasOwnProperty.call(owner, 'hcEvents')) {\n var events = owner.hcEvents;\n if (type) {\n var typeEvents = (events[type] || []);\n if (fn) {\n events[type] = typeEvents.filter(function (obj) {\n return fn !== obj.fn;\n });\n removeOneEvent(type, fn);\n }\n else {\n removeAllEvents(events);\n events[type] = [];\n }\n }\n else {\n removeAllEvents(events);\n delete owner.hcEvents;\n }\n }\n }\n /* eslint-disable valid-jsdoc */\n /**\n * Fire an event that was registered with {@link Highcharts#addEvent}.\n *\n * @function Highcharts.fireEvent\n *\n * @param {T} el\n * The object to fire the event on. It can be a {@link HTMLDOMElement},\n * an {@link SVGElement} or any other object.\n *\n * @param {string} type\n * The type of event.\n *\n * @param {Highcharts.Dictionary<*>|Event} [eventArguments]\n * Custom event arguments that are passed on as an argument to the event\n * handler.\n *\n * @param {Highcharts.EventCallbackFunction|Function} [defaultFunction]\n * The default function to execute if the other listeners haven't\n * returned false.\n *\n * @return {void}\n */\n function fireEvent(el, type, eventArguments, defaultFunction) {\n /* eslint-enable valid-jsdoc */\n var e,\n i;\n eventArguments = eventArguments || {};\n if (doc.createEvent &&\n (el.dispatchEvent ||\n (el.fireEvent &&\n // Enable firing events on Highcharts instance.\n el !== H))) {\n e = doc.createEvent('Events');\n e.initEvent(type, true, true);\n eventArguments = extend(e, eventArguments);\n if (el.dispatchEvent) {\n el.dispatchEvent(eventArguments);\n }\n else {\n el.fireEvent(type, eventArguments);\n }\n }\n else if (el.hcEvents) {\n if (!eventArguments.target) {\n // We're running a custom event\n extend(eventArguments, {\n // Attach a simple preventDefault function to skip\n // default handler if called. The built-in\n // defaultPrevented property is not overwritable (#5112)\n preventDefault: function () {\n eventArguments.defaultPrevented = true;\n },\n // Setting target to native events fails with clicking\n // the zoom-out button in Chrome.\n target: el,\n // If the type is not set, we're running a custom event\n // (#2297). If it is set, we're running a browser event,\n // and setting it will cause en error in IE8 (#2465).\n type: type\n });\n }\n var events = [];\n var object = el;\n var multilevel = false;\n // Recurse up the inheritance chain and collect hcEvents set as own\n // objects on the prototypes.\n while (object.hcEvents) {\n if (Object.hasOwnProperty.call(object, 'hcEvents') &&\n object.hcEvents[type]) {\n if (events.length) {\n multilevel = true;\n }\n events.unshift.apply(events, object.hcEvents[type]);\n }\n object = Object.getPrototypeOf(object);\n }\n // For performance reasons, only sort the event handlers in case we are\n // dealing with multiple levels in the prototype chain. Otherwise, the\n // events are already sorted in the addEvent function.\n if (multilevel) {\n // Order the calls\n events.sort(function (a, b) { return a.order - b.order; });\n }\n // Call the collected event handlers\n events.forEach(function (obj) {\n // If the event handler returns false, prevent the default handler\n // from executing\n if (obj.fn.call(el, eventArguments) === false) {\n eventArguments.preventDefault();\n }\n });\n }\n // Run the default if not prevented\n if (defaultFunction && !eventArguments.defaultPrevented) {\n defaultFunction.call(el, eventArguments);\n }\n }\n var serialMode;\n /**\n * Get a unique key for using in internal element id's and pointers. The key is\n * composed of a random hash specific to this Highcharts instance, and a\n * counter.\n *\n * @example\n * let id = uniqueKey(); // => 'highcharts-x45f6hp-0'\n *\n * @function Highcharts.uniqueKey\n *\n * @return {string}\n * A unique key.\n */\n var uniqueKey = (function () {\n var hash = Math.random().toString(36).substring(2, 9) + '-';\n var id = 0;\n return function () {\n return 'highcharts-' + (serialMode ? '' : hash) + id++;\n };\n }());\n /**\n * Activates a serial mode for element IDs provided by\n * {@link Highcharts.uniqueKey}. This mode can be used in automated tests, where\n * a simple comparison of two rendered SVG graphics is needed.\n *\n * **Note:** This is only for testing purposes and will break functionality in\n * webpages with multiple charts.\n *\n * @example\n * if (\n * process &&\n * process.env.NODE_ENV === 'development'\n * ) {\n * Highcharts.useSerialIds(true);\n * }\n *\n * @function Highcharts.useSerialIds\n *\n * @param {boolean} [mode]\n * Changes the state of serial mode.\n *\n * @return {boolean|undefined}\n * State of the serial mode.\n */\n function useSerialIds(mode) {\n return (serialMode = pick(mode, serialMode));\n }\n function isFunction(obj) {\n return typeof obj === 'function';\n }\n // Register Highcharts as a plugin in jQuery\n if (win.jQuery) {\n /**\n * Highcharts-extended JQuery.\n *\n * @external JQuery\n */\n /**\n * Helper function to return the chart of the current JQuery selector\n * element.\n *\n * @function external:JQuery#highcharts\n *\n * @return {Highcharts.Chart}\n * The chart that is linked to the JQuery selector element.\n */ /**\n * Factory function to create a chart in the current JQuery selector\n * element.\n *\n * @function external:JQuery#highcharts\n *\n * @param {'Chart'|'Map'|'StockChart'|string} [className]\n * Name of the factory class in the Highcharts namespace.\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\n * images are loaded. Defining a\n * [chart.events.load](https://api.highcharts.com/highcharts/chart.events.load)\n * handler is equivalent.\n *\n * @return {JQuery}\n * The current JQuery selector.\n */\n win.jQuery.fn.highcharts = function () {\n var args = [].slice.call(arguments);\n if (this[0]) { // this[0] is the renderTo div\n // Create the chart\n if (args[0]) {\n new H[ // eslint-disable-line computed-property-spacing, no-new\n // Constructor defaults to Chart\n isString(args[0]) ? args.shift() : 'Chart'](this[0], args[0], args[1]);\n return this;\n }\n // When called without parameters or with the return argument,\n // return an existing chart\n return charts[attr(this[0], 'data-highcharts-chart')];\n }\n };\n }\n /* *\n *\n * Default Export\n *\n * */\n // TODO use named exports when supported.\n var Utilities = {\n addEvent: addEvent,\n arrayMax: arrayMax,\n arrayMin: arrayMin,\n attr: attr,\n clamp: clamp,\n cleanRecursively: cleanRecursively,\n clearTimeout: internalClearTimeout,\n correctFloat: correctFloat,\n createElement: createElement,\n css: css,\n defined: defined,\n destroyObjectProperties: destroyObjectProperties,\n discardElement: discardElement,\n erase: erase,\n error: error,\n extend: extend,\n extendClass: extendClass,\n find: find,\n fireEvent: fireEvent,\n getMagnitude: getMagnitude,\n getNestedProperty: getNestedProperty,\n getStyle: getStyle,\n inArray: inArray,\n isArray: isArray,\n isClass: isClass,\n isDOMElement: isDOMElement,\n isFunction: isFunction,\n isNumber: isNumber,\n isObject: isObject,\n isString: isString,\n keys: keys,\n merge: merge,\n normalizeTickInterval: normalizeTickInterval,\n objectEach: objectEach,\n offset: offset,\n pad: pad,\n pick: pick,\n pInt: pInt,\n relativeLength: relativeLength,\n removeEvent: removeEvent,\n splat: splat,\n stableSort: stableSort,\n syncTimeout: syncTimeout,\n timeUnits: timeUnits,\n uniqueKey: uniqueKey,\n useSerialIds: useSerialIds,\n wrap: wrap\n };\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * An animation configuration. Animation configurations can also be defined as\n * booleans, where `false` turns off animation and `true` defaults to a duration\n * of 500ms and defer of 0ms.\n *\n * @interface Highcharts.AnimationOptionsObject\n */ /**\n * A callback function to exectute when the animation finishes.\n * @name Highcharts.AnimationOptionsObject#complete\n * @type {Function|undefined}\n */ /**\n * The animation defer in milliseconds.\n * @name Highcharts.AnimationOptionsObject#defer\n * @type {number|undefined}\n */ /**\n * The animation duration in milliseconds.\n * @name Highcharts.AnimationOptionsObject#duration\n * @type {number|undefined}\n */ /**\n * The name of an easing function as defined on the `Math` object.\n * @name Highcharts.AnimationOptionsObject#easing\n * @type {string|Function|undefined}\n */ /**\n * A callback function to execute on each step of each attribute or CSS property\n * that's being animated. The first argument contains information about the\n * animation and progress.\n * @name Highcharts.AnimationOptionsObject#step\n * @type {Function|undefined}\n */\n /**\n * Creates a frame for the animated SVG element.\n *\n * @callback Highcharts.AnimationStepCallbackFunction\n *\n * @param {Highcharts.SVGElement} this\n * The SVG element to animate.\n *\n * @return {void}\n */\n /**\n * Interface description for a class.\n *\n * @interface Highcharts.Class\n * @extends Function\n */ /**\n * Class costructor.\n * @function Highcharts.Class#new\n * @param {...Array<*>} args\n * Constructor arguments.\n * @return {T}\n * Class instance.\n */\n /**\n * A style object with camel case property names to define visual appearance of\n * a SVG element or HTML element. The properties can be whatever styles are\n * supported on the given SVG or HTML element.\n *\n * @example\n * {\n * fontFamily: 'monospace',\n * fontSize: '1.2em'\n * }\n *\n * @interface Highcharts.CSSObject\n */ /**\n * @name Highcharts.CSSObject#[key:string]\n * @type {boolean|number|string|undefined}\n */ /**\n * Background style for the element.\n * @name Highcharts.CSSObject#background\n * @type {string|undefined}\n */ /**\n * Background color of the element.\n * @name Highcharts.CSSObject#backgroundColor\n * @type {Highcharts.ColorString|undefined}\n */ /**\n * Border style for the element.\n * @name Highcharts.CSSObject#border\n * @type {string|undefined}\n */ /**\n * Radius of the element border.\n * @name Highcharts.CSSObject#borderRadius\n * @type {number|undefined}\n */ /**\n * Color used in the element. The 'contrast' option is a Highcharts custom\n * property that results in black or white, depending on the background of the\n * element.\n * @name Highcharts.CSSObject#color\n * @type {'contrast'|Highcharts.ColorString|undefined}\n */ /**\n * Style of the mouse cursor when resting over the element.\n * @name Highcharts.CSSObject#cursor\n * @type {Highcharts.CursorValue|undefined}\n */ /**\n * Font family of the element text. Multiple values have to be in decreasing\n * preference order and separated by comma.\n * @name Highcharts.CSSObject#fontFamily\n * @type {string|undefined}\n */ /**\n * Font size of the element text.\n * @name Highcharts.CSSObject#fontSize\n * @type {string|undefined}\n */ /**\n * Font weight of the element text.\n * @name Highcharts.CSSObject#fontWeight\n * @type {string|undefined}\n */ /**\n * Height of the element.\n * @name Highcharts.CSSObject#height\n * @type {number|undefined}\n */ /**\n * Width of the element border.\n * @name Highcharts.CSSObject#lineWidth\n * @type {number|undefined}\n */ /**\n * Opacity of the element.\n * @name Highcharts.CSSObject#opacity\n * @type {number|undefined}\n */ /**\n * Space around the element content.\n * @name Highcharts.CSSObject#padding\n * @type {string|undefined}\n */ /**\n * Behaviour of the element when the mouse cursor rests over it.\n * @name Highcharts.CSSObject#pointerEvents\n * @type {string|undefined}\n */ /**\n * Positioning of the element.\n * @name Highcharts.CSSObject#position\n * @type {string|undefined}\n */ /**\n * Alignment of the element text.\n * @name Highcharts.CSSObject#textAlign\n * @type {string|undefined}\n */ /**\n * Additional decoration of the element text.\n * @name Highcharts.CSSObject#textDecoration\n * @type {string|undefined}\n */ /**\n * Outline style of the element text.\n * @name Highcharts.CSSObject#textOutline\n * @type {string|undefined}\n */ /**\n * Line break style of the element text. Highcharts SVG elements support\n * `ellipsis` when a `width` is set.\n * @name Highcharts.CSSObject#textOverflow\n * @type {string|undefined}\n */ /**\n * Top spacing of the element relative to the parent element.\n * @name Highcharts.CSSObject#top\n * @type {string|undefined}\n */ /**\n * Animated transition of selected element properties.\n * @name Highcharts.CSSObject#transition\n * @type {string|undefined}\n */ /**\n * Line break style of the element text.\n * @name Highcharts.CSSObject#whiteSpace\n * @type {string|undefined}\n */ /**\n * Width of the element.\n * @name Highcharts.CSSObject#width\n * @type {number|undefined}\n */\n /**\n * All possible cursor styles.\n *\n * @typedef {'alias'|'all-scroll'|'auto'|'cell'|'col-resize'|'context-menu'|'copy'|'crosshair'|'default'|'e-resize'|'ew-resize'|'grab'|'grabbing'|'help'|'move'|'n-resize'|'ne-resize'|'nesw-resize'|'no-drop'|'none'|'not-allowed'|'ns-resize'|'nw-resize'|'nwse-resize'|'pointer'|'progress'|'row-resize'|'s-resize'|'se-resize'|'sw-resize'|'text'|'vertical-text'|'w-resize'|'wait'|'zoom-in'|'zoom-out'} Highcharts.CursorValue\n */\n /**\n * All possible dash styles.\n *\n * @typedef {'Dash'|'DashDot'|'Dot'|'LongDash'|'LongDashDot'|'LongDashDotDot'|'ShortDash'|'ShortDashDot'|'ShortDashDotDot'|'ShortDot'|'Solid'} Highcharts.DashStyleValue\n */\n /**\n * Generic dictionary in TypeScript notation.\n * Use the native `AnyRecord` instead.\n *\n * @deprecated\n * @interface Highcharts.Dictionary\n */ /**\n * @name Highcharts.Dictionary#[key:string]\n * @type {T}\n */\n /**\n * The function callback to execute when the event is fired. The `this` context\n * contains the instance, that fired the event.\n *\n * @callback Highcharts.EventCallbackFunction\n *\n * @param {T} this\n *\n * @param {Highcharts.Dictionary<*>|Event} [eventArguments]\n * Event arguments.\n *\n * @return {boolean|void}\n */\n /**\n * The event options for adding function callback.\n *\n * @interface Highcharts.EventOptionsObject\n */ /**\n * The order the event handler should be called. This opens for having one\n * handler be called before another, independent of in which order they were\n * added.\n * @name Highcharts.EventOptionsObject#order\n * @type {number}\n */ /**\n * Whether an event should be passive or not.\n * When set to `true`, the function specified by listener will never call\n * `preventDefault()`.\n * @name Highcharts.EventOptionsObject#passive\n * @type boolean\n */\n /**\n * Formats data as a string. Usually the data is accessible throught the `this`\n * keyword.\n *\n * @callback Highcharts.FormatterCallbackFunction\n *\n * @param {T} this\n * Context to format\n *\n * @return {string}\n * Formatted text\n */\n /**\n * An object of key-value pairs for HTML attributes.\n *\n * @typedef {Highcharts.Dictionary} Highcharts.HTMLAttributes\n */\n /**\n * An HTML DOM element. The type is a reference to the regular HTMLElement in\n * the global scope.\n *\n * @typedef {global.HTMLElement} Highcharts.HTMLDOMElement\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement\n */\n /**\n * The iterator callback.\n *\n * @callback Highcharts.ObjectEachCallbackFunction\n *\n * @param {T} this\n * The context.\n *\n * @param {*} value\n * The property value.\n *\n * @param {string} key\n * The property key.\n *\n * @param {*} obj\n * The object that objectEach is being applied to.\n */\n /**\n * An object containing `left` and `top` properties for the position in the\n * page.\n *\n * @interface Highcharts.OffsetObject\n */ /**\n * Left distance to the page border.\n * @name Highcharts.OffsetObject#left\n * @type {number}\n */ /**\n * Top distance to the page border.\n * @name Highcharts.OffsetObject#top\n * @type {number}\n */\n /**\n * Describes a range.\n *\n * @interface Highcharts.RangeObject\n */ /**\n * Maximum number of the range.\n * @name Highcharts.RangeObject#max\n * @type {number}\n */ /**\n * Minimum number of the range.\n * @name Highcharts.RangeObject#min\n * @type {number}\n */\n /**\n * If a number is given, it defines the pixel length. If a percentage string is\n * given, like for example `'50%'`, the setting defines a length relative to a\n * base size, for example the size of a container.\n *\n * @typedef {number|string} Highcharts.RelativeSize\n */\n /**\n * Proceed function to call original (wrapped) function.\n *\n * @callback Highcharts.WrapProceedFunction\n *\n * @param {*} [arg1]\n * Optional argument. Without any arguments defaults to first argument of\n * the wrapping function.\n *\n * @param {*} [arg2]\n * Optional argument. Without any arguments defaults to second argument\n * of the wrapping function.\n *\n * @param {*} [arg3]\n * Optional argument. Without any arguments defaults to third argument of\n * the wrapping function.\n *\n * @return {*}\n * Return value of the original function.\n */\n /**\n * The Highcharts object is the placeholder for all other members, and various\n * utility functions. The most important member of the namespace would be the\n * chart constructor.\n *\n * @example\n * let chart = Highcharts.chart('container', { ... });\n *\n * @namespace Highcharts\n */\n ''; // detach doclets above\n\n return Utilities;\n });\n _registerModule(_modules, 'Core/Chart/ChartDefaults.js', [], function () {\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 /* *\n *\n * API Options\n *\n * */\n /**\n * General options for the chart.\n *\n * @optionparent chart\n */\n var ChartDefaults = {\n /**\n * Default `mapData` for all series,\n in terms of a GeoJSON or TopoJSON\n * object. If set to a string,\n it functions as an index into the\n * `Highcharts.maps` array.\n *\n * For picking out individual shapes and geometries to use for each series\n * of the map,\n see [series.mapData](#series.map.mapData).\n *\n * @sample maps/demo/geojson\n * Loading GeoJSON data\n * @sample maps/chart/topojson\n * Loading TopoJSON data\n *\n * @type {string|Array<*>|Highcharts.GeoJSON|Highcharts.TopoJSON}\n * @since 5.0.0\n * @product highmaps\n * @apioption chart.map\n */\n /**\n * Set lat/lon transformation definitions for the chart. If not defined,\n * these are extracted from the map data.\n *\n * @type {*}\n * @since 5.0.0\n * @product highmaps\n * @apioption chart.mapTransforms\n */\n /**\n * When using multiple axes,\n 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,\n as if `tickAmount` were specified.\n *\n * This can be prevented by setting `alignTicks` to false. If the grid\n * lines look messy,\n 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 the axis options are set to false,\n * then the `alignTicks ` will be disabled for the axis.\n *\n * Disabled for logarithmic axes.\n *\n * @sample {highcharts} highcharts/chart/alignticks-true/\n * True by default\n * @sample {highcharts} highcharts/chart/alignticks-false/\n * False\n * @sample {highstock} stock/chart/alignticks-true/\n * True by default\n * @sample {highstock} stock/chart/alignticks-false/\n * False\n *\n * @type {boolean}\n * @default true\n * @product highcharts highstock gantt\n * @apioption chart.alignTicks\n */\n /**\n * When using multiple axes,\n align the thresholds. When this is true,\n other\n * ticks will also be aligned.\n *\n * Note that for line series and some other series types,\n the `threshold`\n * option is set to `null` by default. This will in turn cause their y-axis\n * to not have a threshold. In order to avoid that,\n set the series\n * `threshold` to 0 or another number.\n *\n * If `startOnTick` or `endOnTick` in the axis options are set to false,\n or\n * if the axis is logarithmic,\n the threshold will not be aligned.\n *\n * @sample {highcharts} highcharts/chart/alignthresholds/ Set to true\n *\n * @since 10.0.0\n * @product highcharts highstock gantt\n * @apioption chart.alignThresholds\n */\n alignThresholds: false,\n /**\n * Set the overall animation for all chart updating. Animation can be\n * disabled throughout the chart by setting it to false here. It can\n * be overridden for each individual API method as a function parameter.\n * The only animation not affected by this option is the initial series\n * animation,\n see [plotOptions.series.animation](\n * #plotOptions.series.animation).\n *\n * The animation can either be set as a boolean or a configuration\n * object. If `true`,\n it will use the 'swing' jQuery easing and a\n * duration of 500 ms. If used as a configuration object,\n the following\n * properties are supported:\n *\n * - `defer`: The animation delay time in milliseconds.\n *\n * - `duration`: The duration of the animation in milliseconds.\n *\n * - `easing`: A string reference to an easing function set on the\n * `Math` object. See\n * [the easing demo](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-animation-easing/).\n *\n * When zooming on a series with less than 100 points,\n the chart redraw\n * will be done with animation,\n but in case of more data points,\n it is\n * necessary to set this option to ensure animation on zoom.\n *\n * @sample {highcharts} highcharts/chart/animation-none/\n * Updating with no animation\n * @sample {highcharts} highcharts/chart/animation-duration/\n * With a longer duration\n * @sample {highcharts} highcharts/chart/animation-easing/\n * With a jQuery UI easing\n * @sample {highmaps} maps/chart/animation-none/\n * Updating with no animation\n * @sample {highmaps} maps/chart/animation-duration/\n * With a longer duration\n *\n * @type {boolean|Partial}\n * @default undefined\n * @apioption chart.animation\n */\n /**\n * A CSS class name to apply to the charts container `div`,\n allowing\n * unique CSS styling for each chart.\n *\n * @type {string}\n * @apioption chart.className\n */\n /**\n * Event listeners for the chart.\n *\n * @apioption chart.events\n */\n /**\n * Fires when a series is added to the chart after load time,\n using the\n * `addSeries` method. One parameter,\n `event`,\n is passed to the\n * function,\n containing common event information. Through\n * `event.options` you can access the series options that were passed to\n * the `addSeries` method. Returning false prevents the series from\n * being added.\n *\n * @sample {highcharts} highcharts/chart/events-addseries/\n * Alert on add series\n * @sample {highstock} stock/chart/events-addseries/\n * Alert on add series\n *\n * @type {Highcharts.ChartAddSeriesCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Chart\n * @apioption chart.events.addSeries\n */\n /**\n * Fires when clicking on the plot background. One parameter,\n `event`,\n * is passed to the function,\n containing common event information.\n *\n * Information on the clicked spot can be found through `event.xAxis`\n * and `event.yAxis`,\n which are arrays containing the axes of each\n * dimension and each axis' value at the clicked spot. The primary axes\n * are `event.xAxis[0]` and `event.yAxis[0]`. Remember the unit of a\n * datetime axis is milliseconds since 1970-01-01 00:00:00.\n *\n * ```js\n * click: function(e) {\n * console.log(\n * Highcharts.dateFormat('%Y-%m-%d %H:%M:%S',\n e.xAxis[0].value),\n * e.yAxis[0].value\n * )\n * }\n * ```\n *\n * @sample {highcharts} highcharts/chart/events-click/\n * Alert coordinates on click\n * @sample {highcharts} highcharts/chart/events-container/\n * Alternatively,\n attach event to container\n * @sample {highstock} stock/chart/events-click/\n * Alert coordinates on click\n * @sample {highstock} highcharts/chart/events-container/\n * Alternatively,\n attach event to container\n * @sample {highmaps} maps/chart/events-click/\n * Record coordinates on click\n * @sample {highmaps} highcharts/chart/events-container/\n * Alternatively,\n attach event to container\n *\n * @type {Highcharts.ChartClickCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Chart\n * @apioption chart.events.click\n */\n /**\n * Fires when the chart is finished loading. Since v4.2.2,\n it also waits\n * for images to be loaded,\n for example from point markers. One\n * parameter,\n `event`,\n is passed to the function,\n containing common\n * event information.\n *\n * There is also a second parameter to the chart constructor where a\n * callback function can be passed to be executed on chart.load.\n *\n * @sample {highcharts} highcharts/chart/events-load/\n * Alert on chart load\n * @sample {highstock} stock/chart/events-load/\n * Alert on chart load\n * @sample {highmaps} maps/chart/events-load/\n * Add series on chart load\n *\n * @type {Highcharts.ChartLoadCallbackFunction}\n * @context Highcharts.Chart\n * @apioption chart.events.load\n */\n /**\n * Fires when the chart is redrawn,\n either after a call to\n * `chart.redraw()` or after an axis,\n series or point is modified with\n * the `redraw` option set to `true`. One parameter,\n `event`,\n is passed\n * to the function,\n containing common event information.\n *\n * @sample {highcharts} highcharts/chart/events-redraw/\n * Alert on chart redraw\n * @sample {highstock} stock/chart/events-redraw/\n * Alert on chart redraw when adding a series or moving the\n * zoomed range\n * @sample {highmaps} maps/chart/events-redraw/\n * Set subtitle on chart redraw\n *\n * @type {Highcharts.ChartRedrawCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Chart\n * @apioption chart.events.redraw\n */\n /**\n * Fires after initial load of the chart (directly after the `load`\n * event),\n and after each redraw (directly after the `redraw` event).\n *\n * @type {Highcharts.ChartRenderCallbackFunction}\n * @since 5.0.7\n * @context Highcharts.Chart\n * @apioption chart.events.render\n */\n /**\n * Fires when an area of the chart has been selected. Selection is\n * enabled by setting the chart's zoomType. One parameter,\n `event`,\n is\n * passed to the function,\n containing common event information. The\n * default action for the selection event is to zoom the chart to the\n * selected area. It can be prevented by calling\n * `event.preventDefault()` or return false.\n *\n * Information on the selected area can be found through `event.xAxis`\n * and `event.yAxis`,\n which are arrays containing the axes of each\n * dimension and each axis' min and max values. The primary axes are\n * `event.xAxis[0]` and `event.yAxis[0]`. Remember the unit of a\n * datetime axis is milliseconds since 1970-01-01 00:00:00.\n *\n * ```js\n * selection: function(event) {\n * // log the min and max of the primary, datetime x-axis\n * console.log(\n * Highcharts.dateFormat(\n * '%Y-%m-%d %H:%M:%S',\n * event.xAxis[0].min\n * ),\n * Highcharts.dateFormat(\n * '%Y-%m-%d %H:%M:%S',\n * event.xAxis[0].max\n * )\n * );\n * // log the min and max of the y axis\n * console.log(event.yAxis[0].min, event.yAxis[0].max);\n * }\n * ```\n *\n * @sample {highcharts} highcharts/chart/events-selection/\n * Report on selection and reset\n * @sample {highcharts} highcharts/chart/events-selection-points/\n * Select a range of points through a drag selection\n * @sample {highstock} stock/chart/events-selection/\n * Report on selection and reset\n * @sample {highstock} highcharts/chart/events-selection-points/\n * Select a range of points through a drag selection\n * (Highcharts)\n *\n * @type {Highcharts.ChartSelectionCallbackFunction}\n * @apioption chart.events.selection\n */\n /**\n * The margin between the outer edge of the chart and the plot area.\n * The numbers in the array designate top, right, bottom and left\n * respectively. Use the options `marginTop`, `marginRight`,\n * `marginBottom` and `marginLeft` for shorthand setting of one option.\n *\n * By default there is no margin. The actual space is dynamically\n * calculated from the offset of axis labels, axis title, title,\n * subtitle and legend in addition to the `spacingTop`, `spacingRight`,\n * `spacingBottom` and `spacingLeft` options.\n *\n * @sample {highcharts} highcharts/chart/margins-zero/\n * Zero margins\n * @sample {highstock} stock/chart/margin-zero/\n * Zero margins\n *\n * @type {number|Array}\n * @apioption chart.margin\n */\n /**\n * The margin between the bottom outer edge of the chart and the plot\n * area. Use this to set a fixed pixel value for the margin as opposed\n * to the default dynamic margin. See also `spacingBottom`.\n *\n * @sample {highcharts} highcharts/chart/marginbottom/\n * 100px bottom margin\n * @sample {highstock} stock/chart/marginbottom/\n * 100px bottom margin\n * @sample {highmaps} maps/chart/margin/\n * 100px margins\n *\n * @type {number}\n * @since 2.0\n * @apioption chart.marginBottom\n */\n /**\n * The margin between the left outer edge of the chart and the plot\n * area. Use this to set a fixed pixel value for the margin as opposed\n * to the default dynamic margin. See also `spacingLeft`.\n *\n * @sample {highcharts} highcharts/chart/marginleft/\n * 150px left margin\n * @sample {highstock} stock/chart/marginleft/\n * 150px left margin\n * @sample {highmaps} maps/chart/margin/\n * 100px margins\n *\n * @type {number}\n * @since 2.0\n * @apioption chart.marginLeft\n */\n /**\n * The margin between the right outer edge of the chart and the plot\n * area. Use this to set a fixed pixel value for the margin as opposed\n * to the default dynamic margin. See also `spacingRight`.\n *\n * @sample {highcharts} highcharts/chart/marginright/\n * 100px right margin\n * @sample {highstock} stock/chart/marginright/\n * 100px right margin\n * @sample {highmaps} maps/chart/margin/\n * 100px margins\n *\n * @type {number}\n * @since 2.0\n * @apioption chart.marginRight\n */\n /**\n * The margin between the top outer edge of the chart and the plot area.\n * Use this to set a fixed pixel value for the margin as opposed to\n * the default dynamic margin. See also `spacingTop`.\n *\n * @sample {highcharts} highcharts/chart/margintop/ 100px top margin\n * @sample {highstock} stock/chart/margintop/\n * 100px top margin\n * @sample {highmaps} maps/chart/margin/\n * 100px margins\n *\n * @type {number}\n * @since 2.0\n * @apioption chart.marginTop\n */\n /**\n * Callback function to override the default function that formats all\n * the numbers in the chart. Returns a string with the formatted number.\n *\n * @sample highcharts/members/highcharts-numberformat\n * Arabic digits in Highcharts\n * @type {Highcharts.NumberFormatterCallbackFunction}\n * @since 8.0.0\n * @apioption chart.numberFormatter\n */\n /**\n * Allows setting a key to switch between zooming and panning. Can be\n * one of `alt`, `ctrl`, `meta` (the command key on Mac and Windows\n * key on Windows) or `shift`. The keys are mapped directly to the key\n * properties of the click event argument (`event.altKey`,\n * `event.ctrlKey`, `event.metaKey` and `event.shiftKey`).\n *\n * @type {string}\n * @since 4.0.3\n * @product highcharts gantt\n * @validvalue [\"alt\", \"ctrl\", \"meta\", \"shift\"]\n * @apioption chart.panKey\n */\n /**\n * Allow panning in a chart. Best used with [panKey](#chart.panKey)\n * to combine zooming and panning.\n *\n * On touch devices, when the [tooltip.followTouchMove](\n * #tooltip.followTouchMove) option is `true` (default), panning\n * requires two fingers. To allow panning with one finger, set\n * `followTouchMove` to `false`.\n *\n * @sample {highcharts} highcharts/chart/pankey/ Zooming and panning\n * @sample {highstock} stock/chart/panning/ Zooming and xy panning\n */\n panning: {\n /**\n * Enable or disable chart panning.\n *\n * @type {boolean}\n * @default {highcharts} false\n * @default {highstock|highmaps} true\n */\n enabled: false,\n /**\n * Decides in what dimensions the user can pan the chart. Can be\n * one of `x`, `y`, or `xy`.\n *\n * @sample {highcharts} highcharts/chart/panning-type\n * Zooming and xy panning\n *\n * @declare Highcharts.OptionsChartPanningTypeValue\n * @type {string}\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @default {highcharts|highstock} x\n * @product highcharts highstock gantt\n */\n type: 'x'\n },\n /**\n * Equivalent to [zoomType](#chart.zoomType), but for multitouch\n * gestures only. By default, the `pinchType` is the same as the\n * `zoomType` setting. However, pinching can be enabled separately in\n * some cases, for example in stock charts where a mouse drag pans the\n * chart, while pinching is enabled. When [tooltip.followTouchMove](\n * #tooltip.followTouchMove) is true, pinchType only applies to\n * two-finger touches.\n *\n * @type {string}\n * @default {highcharts} undefined\n * @default {highstock} x\n * @since 3.0\n * @product highcharts highstock gantt\n * @deprecated\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @apioption chart.pinchType\n */\n /**\n * Whether to apply styled mode. When in styled mode, no presentational\n * attributes or CSS are applied to the chart SVG. Instead, CSS rules\n * are required to style the chart. The default style sheet is\n * available from `https://code.highcharts.com/css/highcharts.css`.\n *\n * @type {boolean}\n * @default false\n * @since 7.0\n * @apioption chart.styledMode\n */\n styledMode: false,\n /**\n * The corner radius of the outer chart border.\n *\n * @sample {highcharts} highcharts/chart/borderradius/\n * 20px radius\n * @sample {highstock} stock/chart/border/\n * 10px radius\n * @sample {highmaps} maps/chart/border/\n * Border options\n *\n */\n borderRadius: 0,\n /**\n * In styled mode, this sets how many colors the class names\n * should rotate between. With ten colors, series (or points) are\n * given class names like `highcharts-color-0`, `highcharts-color-1`\n * [...] `highcharts-color-9`. The equivalent in non-styled mode\n * is to set colors using the [colors](#colors) setting.\n *\n * @since 5.0.0\n */\n colorCount: 10,\n /**\n * By default, (because of memory and performance reasons) the chart does\n * not copy the data but keeps it as a reference. In some cases, this might\n * result in mutating the original data source. In order to prevent that,\n * set that property to false. Please note that changing that might decrease\n * performance, especially with bigger sets of data.\n *\n * @type {boolean}\n * @since 10.1.0\n */\n allowMutatingData: true,\n /**\n * Alias of `type`.\n *\n * @sample {highcharts} highcharts/chart/defaultseriestype/\n * Bar\n *\n * @deprecated\n *\n * @product highcharts\n */\n defaultSeriesType: 'line',\n /**\n * If true, the axes will scale to the remaining visible series once\n * one series is hidden. If false, hiding and showing a series will\n * not affect the axes or the other series. For stacks, once one series\n * within the stack is hidden, the rest of the stack will close in\n * around it even if the axis is not affected.\n *\n * @sample {highcharts} highcharts/chart/ignorehiddenseries-true/\n * True by default\n * @sample {highcharts} highcharts/chart/ignorehiddenseries-false/\n * False\n * @sample {highcharts} highcharts/chart/ignorehiddenseries-true-stacked/\n * True with stack\n * @sample {highstock} stock/chart/ignorehiddenseries-true/\n * True by default\n * @sample {highstock} stock/chart/ignorehiddenseries-false/\n * False\n *\n * @since 1.2.0\n * @product highcharts highstock gantt\n */\n ignoreHiddenSeries: true,\n /**\n * Whether to invert the axes so that the x axis is vertical and y axis\n * is horizontal. When `true`, the x axis is [reversed](#xAxis.reversed)\n * by default.\n *\n * @productdesc {highcharts}\n * If a bar series is present in the chart, it will be inverted\n * automatically. Inverting the chart doesn't have an effect if there\n * are no cartesian series in the chart, or if the chart is\n * [polar](#chart.polar).\n *\n * @sample {highcharts} highcharts/chart/inverted/\n * Inverted line\n * @sample {highstock} stock/navigator/inverted/\n * Inverted stock chart\n *\n * @type {boolean}\n * @default false\n * @product highcharts highstock gantt\n * @apioption chart.inverted\n */\n /**\n * The distance between the outer edge of the chart and the content,\n * like title or legend, or axis title and labels if present. The\n * numbers in the array designate top, right, bottom and left\n * respectively. Use the options spacingTop, spacingRight, spacingBottom\n * and spacingLeft options for shorthand setting of one option.\n *\n * @type {Array}\n * @see [chart.margin](#chart.margin)\n * @default [10, 10, 15, 10]\n * @since 3.0.6\n */\n spacing: [10, 10, 15, 10],\n /**\n * The button that appears after a selection zoom, allowing the user\n * to reset zoom.\n *\n * @since 2.2\n * @deprecated 10.2.1\n */\n resetZoomButton: {\n /**\n * What frame the button placement should be related to. Can be\n * either `plotBox` or `spacingBox`.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-relativeto/\n * Relative to the chart\n * @sample {highstock} highcharts/chart/resetzoombutton-relativeto/\n * Relative to the chart\n *\n * @type {Highcharts.ButtonRelativeToValue}\n * @default plot\n * @apioption chart.resetZoomButton.relativeTo\n */\n /**\n * A collection of attributes for the button. The object takes SVG\n * attributes like `fill`, `stroke`, `stroke-width` or `r`, the\n * border radius. The theme also supports `style`, a collection of\n * CSS properties for the text. Equivalent attributes for the hover\n * state are given in `theme.states.hover`.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-theme/\n * Theming the button\n * @sample {highstock} highcharts/chart/resetzoombutton-theme/\n * Theming the button\n *\n * @type {Highcharts.SVGAttributes}\n */\n theme: {\n /**\n * @internal\n */\n zIndex: 6\n },\n /**\n * The position of the button.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n * @sample {highstock} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n * @sample {highmaps} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n *\n * @type {Highcharts.AlignObject}\n */\n position: {\n /**\n * The horizontal alignment of the button.\n */\n align: 'right',\n /**\n * The horizontal offset of the button.\n */\n x: -10,\n /**\n * The vertical alignment of the button.\n *\n * @type {Highcharts.VerticalAlignValue}\n * @default top\n * @apioption chart.resetZoomButton.position.verticalAlign\n */\n /**\n * The vertical offset of the button.\n */\n y: 10\n }\n },\n /**\n * The pixel width of the plot area border.\n *\n * @sample {highcharts} highcharts/chart/plotborderwidth/\n * 1px border\n * @sample {highstock} stock/chart/plotborder/\n * 2px border\n * @sample {highmaps} maps/chart/plotborder/\n * Plot border options\n *\n * @type {number}\n * @default 0\n * @apioption chart.plotBorderWidth\n */\n /**\n * Whether to apply a drop shadow to the plot area. Requires that\n * plotBackgroundColor be set. The shadow can be an object configuration\n * containing `color`, `offsetX`, `offsetY`, `opacity` and `width`.\n *\n * @sample {highcharts} highcharts/chart/plotshadow/\n * Plot shadow\n * @sample {highstock} stock/chart/plotshadow/\n * Plot shadow\n * @sample {highmaps} maps/chart/plotborder/\n * Plot border options\n *\n * @type {boolean|Highcharts.CSSObject}\n * @default false\n * @apioption chart.plotShadow\n */\n /**\n * When true, cartesian charts like line, spline, area and column are\n * transformed into the polar coordinate system. This produces _polar\n * charts_, also known as _radar charts_.\n *\n * @sample {highcharts} highcharts/demo/polar/\n * Polar chart\n * @sample {highcharts} highcharts/demo/polar-wind-rose/\n * Wind rose, stacked polar column chart\n * @sample {highcharts} highcharts/demo/polar-spider/\n * Spider web chart\n * @sample {highcharts} highcharts/parallel-coordinates/polar/\n * Star plot, multivariate data in a polar chart\n *\n * @type {boolean}\n * @default false\n * @since 2.3.0\n * @product highcharts\n * @requires highcharts-more\n * @apioption chart.polar\n */\n /**\n * Whether to reflow the chart to fit the width of the container div\n * on resizing the window.\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * True by default\n * @sample {highcharts} highcharts/chart/reflow-false/\n * False\n * @sample {highstock} stock/chart/reflow-true/\n * True by default\n * @sample {highstock} stock/chart/reflow-false/\n * False\n * @sample {highmaps} maps/chart/reflow-true/\n * True by default\n * @sample {highmaps} maps/chart/reflow-false/\n * False\n *\n * @type {boolean}\n * @default true\n * @since 2.1\n * @apioption chart.reflow\n */\n /**\n * The HTML element where the chart will be rendered. If it is a string,\n * the element by that id is used. The HTML element can also be passed\n * by direct reference, or as the first argument of the chart\n * constructor, in which case the option is not needed.\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * String\n * @sample {highcharts} highcharts/chart/renderto-object/\n * Object reference\n * @sample {highstock} stock/chart/renderto-string/\n * String\n * @sample {highstock} stock/chart/renderto-object/\n * Object reference\n *\n * @type {string|Highcharts.HTMLDOMElement}\n * @apioption chart.renderTo\n */\n /**\n * The background color of the marker square when selecting (zooming\n * in on) an area of the chart.\n *\n * @see In styled mode, the selection marker fill is set with the\n * `.highcharts-selection-marker` class.\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @default rgba(51,92,173,0.25)\n * @since 2.1.7\n * @apioption chart.selectionMarkerFill\n */\n /**\n * Whether to apply a drop shadow to the outer chart area. Requires\n * that backgroundColor be set. The shadow can be an object\n * configuration containing `color`, `offsetX`, `offsetY`, `opacity` and\n * `width`.\n *\n * @sample {highcharts} highcharts/chart/shadow/\n * Shadow\n * @sample {highstock} stock/chart/shadow/\n * Shadow\n * @sample {highmaps} maps/chart/border/\n * Chart border and shadow\n *\n * @type {boolean|Highcharts.CSSObject}\n * @default false\n * @apioption chart.shadow\n */\n /**\n * Whether to show the axes initially. This only applies to empty charts\n * where series are added dynamically, as axes are automatically added\n * to cartesian series.\n *\n * @sample {highcharts} highcharts/chart/showaxes-false/\n * False by default\n * @sample {highcharts} highcharts/chart/showaxes-true/\n * True\n *\n * @type {boolean}\n * @since 1.2.5\n * @product highcharts gantt\n * @apioption chart.showAxes\n */\n /**\n * The space between the bottom edge of the chart and the content (plot\n * area, axis title and labels, title, subtitle or legend in top\n * position).\n *\n * @sample {highcharts} highcharts/chart/spacingbottom/\n * Spacing bottom set to 100\n * @sample {highstock} stock/chart/spacingbottom/\n * Spacing bottom set to 100\n * @sample {highmaps} maps/chart/spacing/\n * Spacing 100 all around\n *\n * @type {number}\n * @default 15\n * @since 2.1\n * @apioption chart.spacingBottom\n */\n /**\n * The space between the left edge of the chart and the content (plot\n * area, axis title and labels, title, subtitle or legend in top\n * position).\n *\n * @sample {highcharts} highcharts/chart/spacingleft/\n * Spacing left set to 100\n * @sample {highstock} stock/chart/spacingleft/\n * Spacing left set to 100\n * @sample {highmaps} maps/chart/spacing/\n * Spacing 100 all around\n *\n * @type {number}\n * @default 10\n * @since 2.1\n * @apioption chart.spacingLeft\n */\n /**\n * The space between the right edge of the chart and the content (plot\n * area, axis title and labels, title, subtitle or legend in top\n * position).\n *\n * @sample {highcharts} highcharts/chart/spacingright-100/\n * Spacing set to 100\n * @sample {highcharts} highcharts/chart/spacingright-legend/\n * Legend in right position with default spacing\n * @sample {highstock} stock/chart/spacingright/\n * Spacing set to 100\n * @sample {highmaps} maps/chart/spacing/\n * Spacing 100 all around\n *\n * @type {number}\n * @default 10\n * @since 2.1\n * @apioption chart.spacingRight\n */\n /**\n * The space between the top edge of the chart and the content (plot\n * area, axis title and labels, title, subtitle or legend in top\n * position).\n *\n * @sample {highcharts} highcharts/chart/spacingtop-100/\n * A top spacing of 100\n * @sample {highcharts} highcharts/chart/spacingtop-10/\n * Floating chart title makes the plot area align to the default\n * spacingTop of 10.\n * @sample {highstock} stock/chart/spacingtop/\n * A top spacing of 100\n * @sample {highmaps} maps/chart/spacing/\n * Spacing 100 all around\n *\n * @type {number}\n * @default 10\n * @since 2.1\n * @apioption chart.spacingTop\n */\n /**\n * Additional CSS styles to apply inline to the container `div`. Note\n * that since the default font styles are applied in the renderer, it\n * is ignorant of the individual chart options and must be set globally.\n * Also note that changing the font size in the `chart.style` options only\n * applies to those elements that do not have a specific `fontSize` setting.\n *\n * @see In styled mode, general chart styles can be set with the\n * `.highcharts-root` class.\n * @sample {highcharts} highcharts/chart/style-serif-font/\n * Using a serif type font\n * @sample {highcharts} highcharts/css/em/\n * Styled mode with relative font sizes\n * @sample {highstock} stock/chart/style/\n * Using a serif type font\n * @sample {highmaps} maps/chart/style-serif-font/\n * Using a serif type font\n *\n * @type {Highcharts.CSSObject}\n * @default {\"fontFamily\": \"\\\"Lucida Grande\\\", \\\"Lucida Sans Unicode\\\", Verdana, Arial, Helvetica, sans-serif\",\"fontSize\":\"12px\"}\n * @apioption chart.style\n */\n /**\n * The default series type for the chart. Can be any of the chart types\n * listed under [plotOptions](#plotOptions) and [series](#series) or can\n * be a series provided by an additional module.\n *\n * In TypeScript this option has no effect in sense of typing and\n * instead the `type` option must always be set in the series.\n *\n * @sample {highcharts} highcharts/chart/type-bar/\n * Bar\n * @sample {highstock} stock/chart/type/\n * Areaspline\n * @sample {highmaps} maps/chart/type-mapline/\n * Mapline\n *\n * @type {string}\n * @default {highcharts} line\n * @default {highstock} line\n * @default {highmaps} map\n * @since 2.1.0\n * @apioption chart.type\n */\n /**\n * Decides in what dimensions the user can zoom by dragging the mouse.\n * Can be one of `x`, `y` or `xy`.\n *\n * @see [panKey](#chart.panKey)\n *\n * @sample {highcharts} highcharts/chart/zoomtype-none/\n * None by default\n * @sample {highcharts} highcharts/chart/zoomtype-x/\n * X\n * @sample {highcharts} highcharts/chart/zoomtype-y/\n * Y\n * @sample {highcharts} highcharts/chart/zoomtype-xy/\n * Xy\n * @sample {highcharts} highcharts/chart/zoomtype-polar/\n * Zoom on polar chart\n * @sample {highstock} stock/demo/basic-line/\n * None by default\n * @sample {highstock} stock/chart/zoomtype-x/\n * X\n * @sample {highstock} stock/chart/zoomtype-y/\n * Y\n * @sample {highstock} stock/chart/zoomtype-xy/\n * Xy\n * @sample {highmaps} maps/chart/zoomtype-xy/\n * Map with selection zoom\n *\n * @type {string}\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @deprecated\n * @apioption chart.zoomType\n */\n /**\n * Enables zooming by a single touch, in combination with\n * [chart.zoomType](#chart.zoomType). When enabled, two-finger pinch\n * will still work as set up by [chart.pinchType](#chart.pinchType).\n * However, `zoomBySingleTouch` will interfere with touch-dragging the\n * chart to read the tooltip. And especially when vertical zooming is\n * enabled, it will make it hard to scroll vertically on the page.\n * @since 9.0.0\n * @sample highcharts/chart/zoombysingletouch\n * Zoom by single touch enabled, with buttons to toggle\n * @product highcharts highstock gantt\n * @deprecated\n */\n zoomBySingleTouch: false,\n /**\n * Chart zooming options.\n * @since 10.2.1\n */\n zooming: {\n /**\n * Equivalent to [type](#chart.zooming.type), but for multitouch\n * gestures only. By default, the `pinchType` is the same as the\n * `type` setting. However, pinching can be enabled separately in\n * some cases, for example in stock charts where a mouse drag pans the\n * chart, while pinching is enabled. When [tooltip.followTouchMove](\n * #tooltip.followTouchMove) is true, pinchType only applies to\n * two-finger touches.\n *\n * @type {string}\n * @default {highcharts} undefined\n * @default {highstock} x\n * @product highcharts highstock gantt\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @apioption chart.zooming.pinchType\n */\n /**\n * Decides in what dimensions the user can zoom by dragging the mouse.\n * Can be one of `x`, `y` or `xy`.\n *\n * @declare Highcharts.OptionsChartZoomingTypeValue\n * @type {string}\n * @default {highcharts} undefined\n * @product highcharts highstock gantt\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @apioption chart.zooming.type\n */\n /**\n * Set a key to hold when dragging to zoom the chart. This is useful to\n * avoid zooming while moving points. Should be set different than\n * [chart.panKey](#chart.panKey).\n *\n * @type {string}\n * @default {highcharts} undefined\n * @validvalue [\"alt\", \"ctrl\", \"meta\", \"shift\"]\n * @requires modules/draggable-points\n * @apioption chart.zooming.key\n */\n /**\n * Enables zooming by a single touch, in combination with\n * [chart.zooming.type](#chart.zooming.type). When enabled, two-finger\n * pinch will still work as set up by [chart.zooming.pinchType]\n * (#chart.zooming.pinchType). However, `singleTouch` will interfere\n * with touch-dragging the chart to read the tooltip. And especially\n * when vertical zooming is enabled, it will make it hard to scroll\n * vertically on the page.\n *\n * @sample highcharts/chart/zoombysingletouch\n * Zoom by single touch enabled, with buttons to toggle\n *\n * @product highcharts highstock gantt\n */\n singleTouch: false,\n /**\n * The button that appears after a selection zoom, allowing the user\n * to reset zoom.\n */\n resetButton: {\n /**\n * What frame the button placement should be related to. Can be\n * either `plotBox` or `spacingBox`.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-relativeto/\n * Relative to the chart\n * @sample {highstock} highcharts/chart/resetzoombutton-relativeto/\n * Relative to the chart\n *\n * @type {Highcharts.ButtonRelativeToValue}\n * @default plot\n * @apioption chart.zooming.resetButton.relativeTo\n */\n /**\n * A collection of attributes for the button. The object takes SVG\n * attributes like `fill`, `stroke`, `stroke-width` or `r`, the\n * border radius. The theme also supports `style`, a collection of\n * CSS properties for the text. Equivalent attributes for the hover\n * state are given in `theme.states.hover`.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-theme/\n * Theming the button\n * @sample {highstock} highcharts/chart/resetzoombutton-theme/\n * Theming the button\n *\n * @type {Highcharts.SVGAttributes}\n * @since 10.2.1\n */\n theme: {\n /** @internal */\n zIndex: 6\n },\n /**\n * The position of the button.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n * @sample {highstock} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n * @sample {highmaps} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n *\n * @type {Highcharts.AlignObject}\n * @since 10.2.1\n */\n position: {\n /**\n * The horizontal alignment of the button.\n */\n align: 'right',\n /**\n * The horizontal offset of the button.\n */\n x: -10,\n /**\n * The vertical alignment of the button.\n *\n * @type {Highcharts.VerticalAlignValue}\n * @default top\n * @apioption chart.zooming.resetButton.position.verticalAlign\n */\n /**\n * The vertical offset of the button.\n */\n y: 10\n }\n }\n },\n /**\n * An explicit width for the chart. By default (when `null`) the width\n * is calculated from the offset width of the containing element.\n *\n * @sample {highcharts} highcharts/chart/width/\n * 800px wide\n * @sample {highstock} stock/chart/width/\n * 800px wide\n * @sample {highmaps} maps/chart/size/\n * Chart with explicit size\n *\n * @type {null|number|string}\n */\n width: null,\n /**\n * An explicit height for the chart. If a _number_, the height is\n * given in pixels. If given a _percentage string_ (for example\n * `'56%'`), the height is given as the percentage of the actual chart\n * width. This allows for preserving the aspect ratio across responsive\n * sizes.\n *\n * By default (when `null`) the height is calculated from the offset\n * height of the containing element, or 400 pixels if the containing\n * element's height is 0.\n *\n * @sample {highcharts} highcharts/chart/height/\n * 500px height\n * @sample {highstock} stock/chart/height/\n * 300px height\n * @sample {highmaps} maps/chart/size/\n * Chart with explicit size\n * @sample highcharts/chart/height-percent/\n * Highcharts with percentage height\n *\n * @type {null|number|string}\n */\n height: null,\n /**\n * The color of the outer chart border.\n *\n * @see In styled mode, the stroke is set with the\n * `.highcharts-background` class.\n *\n * @sample {highcharts} highcharts/chart/bordercolor/\n * Brown border\n * @sample {highstock} stock/chart/border/\n * Brown border\n * @sample {highmaps} maps/chart/border/\n * Border options\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n borderColor: \"#335cad\" /* Palette.highlightColor80 */,\n /**\n * The pixel width of the outer chart border.\n *\n * @see In styled mode, the stroke is set with the\n * `.highcharts-background` class.\n *\n * @sample {highcharts} highcharts/chart/borderwidth/\n * 5px border\n * @sample {highstock} stock/chart/border/\n * 2px border\n * @sample {highmaps} maps/chart/border/\n * Border options\n *\n * @type {number}\n * @default 0\n * @apioption chart.borderWidth\n */\n /**\n * The background color or gradient for the outer chart area.\n *\n * @see In styled mode, the background is set with the\n * `.highcharts-background` class.\n *\n * @sample {highcharts} highcharts/chart/backgroundcolor-color/\n * Color\n * @sample {highcharts} highcharts/chart/backgroundcolor-gradient/\n * Gradient\n * @sample {highstock} stock/chart/backgroundcolor-color/\n * Color\n * @sample {highstock} stock/chart/backgroundcolor-gradient/\n * Gradient\n * @sample {highmaps} maps/chart/backgroundcolor-color/\n * Color\n * @sample {highmaps} maps/chart/backgroundcolor-gradient/\n * Gradient\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n backgroundColor: \"#ffffff\" /* Palette.backgroundColor */,\n /**\n * The background color or gradient for the plot area.\n *\n * @see In styled mode, the plot background is set with the\n * `.highcharts-plot-background` class.\n *\n * @sample {highcharts} highcharts/chart/plotbackgroundcolor-color/\n * Color\n * @sample {highcharts} highcharts/chart/plotbackgroundcolor-gradient/\n * Gradient\n * @sample {highstock} stock/chart/plotbackgroundcolor-color/\n * Color\n * @sample {highstock} stock/chart/plotbackgroundcolor-gradient/\n * Gradient\n * @sample {highmaps} maps/chart/plotbackgroundcolor-color/\n * Color\n * @sample {highmaps} maps/chart/plotbackgroundcolor-gradient/\n * Gradient\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @apioption chart.plotBackgroundColor\n */\n /**\n * The URL for an image to use as the plot background. To set an image\n * as the background for the entire chart, set a CSS background image\n * to the container element. Note that for the image to be applied to\n * exported charts, its URL needs to be accessible by the export server.\n *\n * @see In styled mode, a plot background image can be set with the\n * `.highcharts-plot-background` class and a [custom pattern](\n * https://www.highcharts.com/docs/chart-design-and-style/gradients-shadows-and-patterns).\n *\n * @sample {highcharts} highcharts/chart/plotbackgroundimage/\n * Skies\n * @sample {highstock} stock/chart/plotbackgroundimage/\n * Skies\n *\n * @type {string}\n * @apioption chart.plotBackgroundImage\n */\n /**\n * The color of the inner chart or plot area border.\n *\n * @see In styled mode, a plot border stroke can be set with the\n * `.highcharts-plot-border` class.\n *\n * @sample {highcharts} highcharts/chart/plotbordercolor/\n * Blue border\n * @sample {highstock} stock/chart/plotborder/\n * Blue border\n * @sample {highmaps} maps/chart/plotborder/\n * Plot border options\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n plotBorderColor: \"#cccccc\" /* Palette.neutralColor20 */\n };\n /* *\n *\n * Default Export\n *\n * */\n\n return ChartDefaults;\n });\n _registerModule(_modules, 'Core/Color/Color.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (H, U) {\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 var isNumber = U.isNumber,\n merge = U.merge,\n pInt = U.pInt;\n /* *\n *\n * Class\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Handle color operations. Some object methods are chainable.\n *\n * @class\n * @name Highcharts.Color\n *\n * @param {Highcharts.ColorType} input\n * The input color in either rbga or hex format\n */\n var Color = /** @class */ (function () {\n /* *\n *\n * Constructor\n *\n * */\n function Color(input) {\n this.rgba = [NaN, NaN, NaN, NaN];\n this.input = input;\n var GlobalColor = H.Color;\n // Backwards compatibility, allow class overwrite\n if (GlobalColor && GlobalColor !== Color) {\n return new GlobalColor(input);\n }\n // Backwards compatibility, allow instanciation without new (#13053)\n if (!(this instanceof Color)) {\n return new Color(input);\n }\n this.init(input);\n }\n /* *\n *\n * Static Functions\n *\n * */\n /**\n * Creates a color instance out of a color string or object.\n *\n * @function Highcharts.Color.parse\n *\n * @param {Highcharts.ColorType} [input]\n * The input color in either rbga or hex format.\n *\n * @return {Highcharts.Color}\n * Color instance.\n */\n Color.parse = function (input) {\n return input ? new Color(input) : Color.None;\n };\n /* *\n *\n * Functions\n *\n * */\n /**\n * Parse the input color to rgba array\n *\n * @private\n * @function Highcharts.Color#init\n *\n * @param {Highcharts.ColorType} input\n * The input color in either rbga or hex format\n */\n Color.prototype.init = function (input) {\n var result,\n rgba,\n i,\n parser;\n // Gradients\n if (typeof input === 'object' &&\n typeof input.stops !== 'undefined') {\n this.stops = input.stops.map(function (stop) { return new Color(stop[1]); });\n // Solid colors\n }\n else if (typeof input === 'string') {\n this.input = input = (Color.names[input.toLowerCase()] || input);\n // Bitmasking as input[0] is not working for legacy IE.\n if (input.charAt(0) === '#') {\n var len = input.length,\n col = parseInt(input.substr(1), 16);\n // Handle long-form, e.g. #AABBCC\n if (len === 7) {\n rgba = [\n (col & 0xFF0000) >> 16,\n (col & 0xFF00) >> 8,\n (col & 0xFF),\n 1\n ];\n // Handle short-form, e.g. #ABC\n // In short form, the value is assumed to be the same\n // for both nibbles for each component. e.g. #ABC = #AABBCC\n }\n else if (len === 4) {\n rgba = [\n (((col & 0xF00) >> 4) |\n (col & 0xF00) >> 8),\n (((col & 0xF0) >> 4) |\n (col & 0xF0)),\n ((col & 0xF) << 4) | (col & 0xF),\n 1\n ];\n }\n }\n // Otherwise, check regex parsers\n if (!rgba) {\n i = Color.parsers.length;\n while (i-- && !rgba) {\n parser = Color.parsers[i];\n result = parser.regex.exec(input);\n if (result) {\n rgba = parser.parse(result);\n }\n }\n }\n }\n if (rgba) {\n this.rgba = rgba;\n }\n };\n /**\n * Return the color or gradient stops in the specified format\n *\n * @function Highcharts.Color#get\n *\n * @param {string} [format]\n * Possible values are 'a', 'rgb', 'rgba' (default).\n *\n * @return {Highcharts.ColorType}\n * This color as a string or gradient stops.\n */\n Color.prototype.get = function (format) {\n var input = this.input,\n rgba = this.rgba;\n if (typeof input === 'object' &&\n typeof this.stops !== 'undefined') {\n var ret_1 = merge(input);\n ret_1.stops = [].slice.call(ret_1.stops);\n this.stops.forEach(function (stop, i) {\n ret_1.stops[i] = [\n ret_1.stops[i][0],\n stop.get(format)\n ];\n });\n return ret_1;\n }\n // it's NaN if gradient colors on a column chart\n if (rgba && isNumber(rgba[0])) {\n if (format === 'rgb' || (!format && rgba[3] === 1)) {\n return 'rgb(' + rgba[0] + ',' + rgba[1] + ',' + rgba[2] + ')';\n }\n if (format === 'a') {\n return \"\".concat(rgba[3]);\n }\n return 'rgba(' + rgba.join(',') + ')';\n }\n return input;\n };\n /**\n * Brighten the color instance.\n *\n * @function Highcharts.Color#brighten\n *\n * @param {number} alpha\n * The alpha value.\n *\n * @return {Highcharts.Color}\n * This color with modifications.\n */\n Color.prototype.brighten = function (alpha) {\n var rgba = this.rgba;\n if (this.stops) {\n this.stops.forEach(function (stop) {\n stop.brighten(alpha);\n });\n }\n else if (isNumber(alpha) && alpha !== 0) {\n for (var i = 0; i < 3; i++) {\n rgba[i] += pInt(alpha * 255);\n if (rgba[i] < 0) {\n rgba[i] = 0;\n }\n if (rgba[i] > 255) {\n rgba[i] = 255;\n }\n }\n }\n return this;\n };\n /**\n * Set the color's opacity to a given alpha value.\n *\n * @function Highcharts.Color#setOpacity\n *\n * @param {number} alpha\n * Opacity between 0 and 1.\n *\n * @return {Highcharts.Color}\n * Color with modifications.\n */\n Color.prototype.setOpacity = function (alpha) {\n this.rgba[3] = alpha;\n return this;\n };\n /**\n * Return an intermediate color between two colors.\n *\n * @function Highcharts.Color#tweenTo\n *\n * @param {Highcharts.Color} to\n * The color object to tween to.\n *\n * @param {number} pos\n * The intermediate position, where 0 is the from color (current color\n * item), and 1 is the `to` color.\n *\n * @return {Highcharts.ColorType}\n * The intermediate color in rgba notation, or unsupported type.\n */\n Color.prototype.tweenTo = function (to, pos) {\n var fromRgba = this.rgba,\n toRgba = to.rgba;\n // Unsupported color, return to-color (#3920, #7034)\n if (!isNumber(fromRgba[0]) || !isNumber(toRgba[0])) {\n return to.input || 'none';\n }\n // Check for has alpha, because rgba colors perform worse due to\n // lack of support in WebKit.\n var hasAlpha = (toRgba[3] !== 1 || fromRgba[3] !== 1);\n return (hasAlpha ? 'rgba(' : 'rgb(') +\n Math.round(toRgba[0] + (fromRgba[0] - toRgba[0]) * (1 - pos)) +\n ',' +\n Math.round(toRgba[1] + (fromRgba[1] - toRgba[1]) * (1 - pos)) +\n ',' +\n Math.round(toRgba[2] + (fromRgba[2] - toRgba[2]) * (1 - pos)) +\n (hasAlpha ?\n (',' +\n (toRgba[3] + (fromRgba[3] - toRgba[3]) * (1 - pos))) :\n '') +\n ')';\n };\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * Collection of named colors. Can be extended from the outside by adding\n * colors to Highcharts.Color.names.\n * @private\n */\n Color.names = {\n white: '#ffffff',\n black: '#000000'\n };\n /**\n * Collection of parsers. This can be extended from the outside by pushing\n * parsers to `Color.parsers`.\n */\n Color.parsers = [{\n // RGBA color\n // eslint-disable-next-line max-len\n regex: /rgba\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]?(?:\\.[0-9]+)?)\\s*\\)/,\n parse: function (result) {\n return [\n pInt(result[1]),\n pInt(result[2]),\n pInt(result[3]),\n parseFloat(result[4], 10)\n ];\n }\n }, {\n // RGB color\n regex: /rgb\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)/,\n parse: function (result) {\n return [pInt(result[1]), pInt(result[2]), pInt(result[3]), 1];\n }\n }];\n // Must be last static member for init cycle\n Color.None = new Color('');\n return Color;\n }());\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * A valid color to be parsed and handled by Highcharts. Highcharts internally\n * supports hex colors like `#ffffff`, rgb colors like `rgb(255,255,255)` and\n * rgba colors like `rgba(255,255,255,1)`. Other colors may be supported by the\n * browsers and displayed correctly, but Highcharts is not able to process them\n * and apply concepts like opacity and brightening.\n *\n * @typedef {string} Highcharts.ColorString\n */\n /**\n * A valid color type than can be parsed and handled by Highcharts. It can be a\n * color string, a gradient object, or a pattern object.\n *\n * @typedef {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject} Highcharts.ColorType\n */\n /**\n * Gradient options instead of a solid color.\n *\n * @example\n * // Linear gradient used as a color option\n * color: {\n * linearGradient: { x1: 0, x2: 0, y1: 0, y2: 1 },\n * stops: [\n * [0, '#003399'], // start\n * [0.5, '#ffffff'], // middle\n * [1, '#3366AA'] // end\n * ]\n * }\n *\n * @interface Highcharts.GradientColorObject\n */ /**\n * Holds an object that defines the start position and the end position relative\n * to the shape.\n * @name Highcharts.GradientColorObject#linearGradient\n * @type {Highcharts.LinearGradientColorObject|undefined}\n */ /**\n * Holds an object that defines the center position and the radius.\n * @name Highcharts.GradientColorObject#radialGradient\n * @type {Highcharts.RadialGradientColorObject|undefined}\n */ /**\n * The first item in each tuple is the position in the gradient, where 0 is the\n * start of the gradient and 1 is the end of the gradient. Multiple stops can be\n * applied. The second item is the color for each stop. This color can also be\n * given in the rgba format.\n * @name Highcharts.GradientColorObject#stops\n * @type {Array}\n */\n /**\n * Color stop tuple.\n *\n * @see Highcharts.GradientColorObject\n *\n * @interface Highcharts.GradientColorStopObject\n */ /**\n * @name Highcharts.GradientColorStopObject#0\n * @type {number}\n */ /**\n * @name Highcharts.GradientColorStopObject#1\n * @type {Highcharts.ColorString}\n */ /**\n * @name Highcharts.GradientColorStopObject#color\n * @type {Highcharts.Color|undefined}\n */\n /**\n * Defines the start position and the end position for a gradient relative\n * to the shape. Start position (x1, y1) and end position (x2, y2) are relative\n * to the shape, where 0 means top/left and 1 is bottom/right.\n *\n * @interface Highcharts.LinearGradientColorObject\n */ /**\n * Start horizontal position of the gradient. Float ranges 0-1.\n * @name Highcharts.LinearGradientColorObject#x1\n * @type {number}\n */ /**\n * End horizontal position of the gradient. Float ranges 0-1.\n * @name Highcharts.LinearGradientColorObject#x2\n * @type {number}\n */ /**\n * Start vertical position of the gradient. Float ranges 0-1.\n * @name Highcharts.LinearGradientColorObject#y1\n * @type {number}\n */ /**\n * End vertical position of the gradient. Float ranges 0-1.\n * @name Highcharts.LinearGradientColorObject#y2\n * @type {number}\n */\n /**\n * Defines the center position and the radius for a gradient.\n *\n * @interface Highcharts.RadialGradientColorObject\n */ /**\n * Center horizontal position relative to the shape. Float ranges 0-1.\n * @name Highcharts.RadialGradientColorObject#cx\n * @type {number}\n */ /**\n * Center vertical position relative to the shape. Float ranges 0-1.\n * @name Highcharts.RadialGradientColorObject#cy\n * @type {number}\n */ /**\n * Radius relative to the shape. Float ranges 0-1.\n * @name Highcharts.RadialGradientColorObject#r\n * @type {number}\n */\n /**\n * Creates a color instance out of a color string.\n *\n * @function Highcharts.color\n *\n * @param {Highcharts.ColorType} input\n * The input color in either rbga or hex format\n *\n * @return {Highcharts.Color}\n * Color instance\n */\n (''); // detach doclets above\n\n return Color;\n });\n _registerModule(_modules, 'Core/Color/Palettes.js', [], function () {\n /**\n * Series palettes for Highcharts. Series colors are defined in highcharts.scss.\n * **Do not edit this file!** This file is generated using the 'gulp palette' task.\n */\n var SeriesPalettes = {\n /**\n * Colors for data series and points.\n */\n colors: [\n '#7cb5ec',\n '#434348',\n '#90ed7d',\n '#f7a35c',\n '#8085e9',\n '#f15c80',\n '#e4d354',\n '#2b908f',\n '#f45b5b',\n '#91e8e1'\n ]\n };\n\n return SeriesPalettes;\n });\n _registerModule(_modules, 'Core/Time.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (H, U) {\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 var win = H.win;\n var defined = U.defined,\n error = U.error,\n extend = U.extend,\n isObject = U.isObject,\n merge = U.merge,\n objectEach = U.objectEach,\n pad = U.pad,\n pick = U.pick,\n splat = U.splat,\n timeUnits = U.timeUnits;\n /* *\n *\n * Constants\n *\n * */\n var hasNewSafariBug = H.isSafari &&\n win.Intl &&\n win.Intl.DateTimeFormat.prototype.formatRange;\n // To do: Remove this when we no longer need support for Safari < v14.1\n var hasOldSafariBug = H.isSafari &&\n win.Intl &&\n !win.Intl.DateTimeFormat.prototype.formatRange;\n /* *\n *\n * Class\n *\n * */\n /* eslint-disable no-invalid-this, valid-jsdoc */\n /**\n * The Time class. Time settings are applied in general for each page using\n * `Highcharts.setOptions`, or individually for each Chart item through the\n * [time](https://api.highcharts.com/highcharts/time) options set.\n *\n * The Time object is available from {@link Highcharts.Chart#time},\n * which refers to `Highcharts.time` if no individual time settings are\n * applied.\n *\n * @example\n * // Apply time settings globally\n * Highcharts.setOptions({\n * time: {\n * timezone: 'Europe/London'\n * }\n * });\n *\n * // Apply time settings by instance\n * let chart = Highcharts.chart('container', {\n * time: {\n * timezone: 'America/New_York'\n * },\n * series: [{\n * data: [1, 4, 3, 5]\n * }]\n * });\n *\n * // Use the Time object\n * console.log(\n * 'Current time in New York',\n * chart.time.dateFormat('%Y-%m-%d %H:%M:%S', Date.now())\n * );\n *\n * @since 6.0.5\n *\n * @class\n * @name Highcharts.Time\n *\n * @param {Highcharts.TimeOptions} [options]\n * Time options as defined in [chart.options.time](/highcharts/time).\n */\n var Time = /** @class */ (function () {\n /* *\n *\n * Constructors\n *\n * */\n function Time(options) {\n /* *\n *\n * Properties\n *\n * */\n this.options = {};\n this.useUTC = false;\n this.variableTimezone = false;\n this.Date = win.Date;\n /**\n * Get the time zone offset based on the current timezone information as\n * set in the global options.\n *\n * @function Highcharts.Time#getTimezoneOffset\n *\n * @param {number} timestamp\n * The JavaScript timestamp to inspect.\n *\n * @return {number}\n * The timezone offset in minutes compared to UTC.\n */\n this.getTimezoneOffset = this.timezoneOffsetFunction();\n this.update(options);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Time units used in `Time.get` and `Time.set`\n *\n * @typedef {\"Date\"|\"Day\"|\"FullYear\"|\"Hours\"|\"Milliseconds\"|\"Minutes\"|\"Month\"|\"Seconds\"} Highcharts.TimeUnitValue\n */\n /**\n * Get the value of a date object in given units, and subject to the Time\n * object's current timezone settings. This function corresponds directly to\n * JavaScripts `Date.getXXX / Date.getUTCXXX`, so instead of calling\n * `date.getHours()` or `date.getUTCHours()` we will call\n * `time.get('Hours')`.\n *\n * @function Highcharts.Time#get\n *\n * @param {Highcharts.TimeUnitValue} unit\n * @param {Date} date\n *\n * @return {number}\n * The given time unit\n */\n Time.prototype.get = function (unit, date) {\n if (this.variableTimezone || this.timezoneOffset) {\n var realMs = date.getTime();\n var ms = realMs - this.getTimezoneOffset(date);\n date.setTime(ms); // Temporary adjust to timezone\n var ret = date['getUTC' + unit]();\n date.setTime(realMs); // Reset\n return ret;\n }\n // UTC time with no timezone handling\n if (this.useUTC) {\n return date['getUTC' + unit]();\n }\n // Else, local time\n return date['get' + unit]();\n };\n /**\n * Set the value of a date object in given units, and subject to the Time\n * object's current timezone settings. This function corresponds directly to\n * JavaScripts `Date.setXXX / Date.setUTCXXX`, so instead of calling\n * `date.setHours(0)` or `date.setUTCHours(0)` we will call\n * `time.set('Hours', 0)`.\n *\n * @function Highcharts.Time#set\n *\n * @param {Highcharts.TimeUnitValue} unit\n * @param {Date} date\n * @param {number} value\n *\n * @return {number}\n * The epoch milliseconds of the updated date\n */\n Time.prototype.set = function (unit, date, value) {\n // UTC time with timezone handling\n if (this.variableTimezone || this.timezoneOffset) {\n // For lower order time units, just set it directly using UTC\n // time\n if (unit === 'Milliseconds' ||\n unit === 'Seconds' ||\n (unit === 'Minutes' &&\n this.getTimezoneOffset(date) % 3600000 === 0) // #13961\n ) {\n return date['setUTC' + unit](value);\n }\n // Higher order time units need to take the time zone into\n // account\n // Adjust by timezone\n var offset = this.getTimezoneOffset(date);\n var ms = date.getTime() - offset;\n date.setTime(ms);\n date['setUTC' + unit](value);\n var newOffset = this.getTimezoneOffset(date);\n ms = date.getTime() + newOffset;\n return date.setTime(ms);\n }\n // UTC time with no timezone handling\n if (this.useUTC ||\n // leap calculation in UTC only\n (hasNewSafariBug && unit === 'FullYear')) {\n return date['setUTC' + unit](value);\n }\n // Else, local time\n return date['set' + unit](value);\n };\n /**\n * Update the Time object with current options. It is called internally on\n * initializing Highcharts, after running `Highcharts.setOptions` and on\n * `Chart.update`.\n *\n * @private\n * @function Highcharts.Time#update\n *\n * @param {Highcharts.TimeOptions} [options]\n *\n */\n Time.prototype.update = function (options) {\n if (options === void 0) { options = {}; }\n var useUTC = pick(options.useUTC,\n true);\n this.options = options = merge(true, this.options, options);\n // Allow using a different Date class\n this.Date = options.Date || win.Date || Date;\n this.useUTC = useUTC;\n this.timezoneOffset = (useUTC && options.timezoneOffset) || void 0;\n this.getTimezoneOffset = this.timezoneOffsetFunction();\n /*\n * The time object has options allowing for variable time zones, meaning\n * the axis ticks or series data needs to consider this.\n */\n this.variableTimezone = useUTC && !!(options.getTimezoneOffset ||\n options.timezone);\n };\n /**\n * Make a time and returns milliseconds. Interprets the inputs as UTC time,\n * local time or a specific timezone time depending on the current time\n * settings.\n *\n * @function Highcharts.Time#makeTime\n *\n * @param {number} year\n * The year\n *\n * @param {number} month\n * The month. Zero-based, so January is 0.\n *\n * @param {number} [date=1]\n * The day of the month\n *\n * @param {number} [hours=0]\n * The hour of the day, 0-23.\n *\n * @param {number} [minutes=0]\n * The minutes\n *\n * @param {number} [seconds=0]\n * The seconds\n *\n * @return {number}\n * The time in milliseconds since January 1st 1970.\n */\n Time.prototype.makeTime = function (year, month, date, hours, minutes, seconds) {\n var d,\n offset,\n newOffset;\n if (this.useUTC) {\n d = this.Date.UTC.apply(0, arguments);\n offset = this.getTimezoneOffset(d);\n d += offset;\n newOffset = this.getTimezoneOffset(d);\n if (offset !== newOffset) {\n d += newOffset - offset;\n // A special case for transitioning from summer time to winter time.\n // When the clock is set back, the same time is repeated twice, i.e.\n // 02:30 am is repeated since the clock is set back from 3 am to\n // 2 am. We need to make the same time as local Date does.\n }\n else if (offset - 36e5 === this.getTimezoneOffset(d - 36e5) &&\n !hasOldSafariBug) {\n d -= 36e5;\n }\n }\n else {\n d = new this.Date(year, month, pick(date, 1), pick(hours, 0), pick(minutes, 0), pick(seconds, 0)).getTime();\n }\n return d;\n };\n /**\n * Sets the getTimezoneOffset function. If the `timezone` option is set, a\n * default getTimezoneOffset function with that timezone is returned. If\n * a `getTimezoneOffset` option is defined, it is returned. If neither are\n * specified, the function using the `timezoneOffset` option or 0 offset is\n * returned.\n *\n * @private\n * @function Highcharts.Time#timezoneOffsetFunction\n *\n * @return {Function}\n * A getTimezoneOffset function\n */\n Time.prototype.timezoneOffsetFunction = function () {\n var time = this,\n options = this.options,\n getTimezoneOffset = options.getTimezoneOffset,\n moment = options.moment || win.moment;\n if (!this.useUTC) {\n return function (timestamp) {\n return new Date(timestamp.toString()).getTimezoneOffset() * 60000;\n };\n }\n if (options.timezone) {\n if (!moment) {\n // getTimezoneOffset-function stays undefined because it depends\n // on Moment.js\n error(25);\n }\n else {\n return function (timestamp) {\n return -moment.tz(timestamp, options.timezone).utcOffset() * 60000;\n };\n }\n }\n // If not timezone is set, look for the getTimezoneOffset callback\n if (this.useUTC && getTimezoneOffset) {\n return function (timestamp) {\n return getTimezoneOffset(timestamp.valueOf()) * 60000;\n };\n }\n // Last, use the `timezoneOffset` option if set\n return function () {\n return (time.timezoneOffset || 0) * 60000;\n };\n };\n /**\n * Formats a JavaScript date timestamp (milliseconds since Jan 1st 1970)\n * into a human readable date string. The available format keys are listed\n * below. Additional formats can be given in the\n * {@link Highcharts.dateFormats} hook.\n *\n * Supported format keys:\n * - `%a`: Short weekday, like 'Mon'\n * - `%A`: Long weekday, like 'Monday'\n * - `%d`: Two digit day of the month, 01 to 31\n * - `%e`: Day of the month, 1 through 31\n * - `%w`: Day of the week, 0 through 6\n * - `%b`: Short month, like 'Jan'\n * - `%B`: Long month, like 'January'\n * - `%m`: Two digit month number, 01 through 12\n * - `%y`: Two digits year, like 09 for 2009\n * - `%Y`: Four digits year, like 2009\n * - `%H`: Two digits hours in 24h format, 00 through 23\n * - `%k`: Hours in 24h format, 0 through 23\n * - `%I`: Two digits hours in 12h format, 00 through 11\n * - `%l`: Hours in 12h format, 1 through 12\n * - `%M`: Two digits minutes, 00 through 59\n * - `%p`: Upper case AM or PM\n * - `%P`: Lower case AM or PM\n * - `%S`: Two digits seconds, 00 through 59\n * - `%L`: Milliseconds (naming from Ruby)\n *\n * @example\n * const time = new Highcharts.Time();\n * const s = time.dateFormat('%Y-%m-%d %H:%M:%S', Date.UTC(2020, 0, 1));\n * console.log(s); // => 2020-01-01 00:00:00\n *\n * @function Highcharts.Time#dateFormat\n *\n * @param {string} format\n * The desired format where various time representations are\n * prefixed with %.\n *\n * @param {number} [timestamp]\n * The JavaScript timestamp.\n *\n * @param {boolean} [capitalize=false]\n * Upper case first letter in the return.\n *\n * @return {string}\n * The formatted date.\n */\n Time.prototype.dateFormat = function (format, timestamp, capitalize) {\n if (!defined(timestamp) || isNaN(timestamp)) {\n return (H.defaultOptions.lang &&\n H.defaultOptions.lang.invalidDate ||\n '');\n }\n format = pick(format, '%Y-%m-%d %H:%M:%S');\n var time = this, date = new this.Date(timestamp), \n // get the basic time values\n hours = this.get('Hours', date), day = this.get('Day', date), dayOfMonth = this.get('Date', date), month = this.get('Month', date), fullYear = this.get('FullYear', date), lang = H.defaultOptions.lang, langWeekdays = (lang && lang.weekdays), shortWeekdays = (lang && lang.shortWeekdays), \n // List all format keys. Custom formats can be added from the\n // outside.\n replacements = extend({\n // Day\n // Short weekday, like 'Mon'\n a: shortWeekdays ?\n shortWeekdays[day] :\n langWeekdays[day].substr(0, 3),\n // Long weekday, like 'Monday'\n A: langWeekdays[day],\n // Two digit day of the month, 01 to 31\n d: pad(dayOfMonth),\n // Day of the month, 1 through 31\n e: pad(dayOfMonth, 2, ' '),\n // Day of the week, 0 through 6\n w: day,\n // Week (none implemented)\n // 'W': weekNumber(),\n // Month\n // Short month, like 'Jan'\n b: lang.shortMonths[month],\n // Long month, like 'January'\n B: lang.months[month],\n // Two digit month number, 01 through 12\n m: pad(month + 1),\n // Month number, 1 through 12 (#8150)\n o: month + 1,\n // Year\n // Two digits year, like 09 for 2009\n y: fullYear.toString().substr(2, 2),\n // Four digits year, like 2009\n Y: fullYear,\n // Time\n // Two digits hours in 24h format, 00 through 23\n H: pad(hours),\n // Hours in 24h format, 0 through 23\n k: hours,\n // Two digits hours in 12h format, 00 through 11\n I: pad((hours % 12) || 12),\n // Hours in 12h format, 1 through 12\n l: (hours % 12) || 12,\n // Two digits minutes, 00 through 59\n M: pad(this.get('Minutes', date)),\n // Upper case AM or PM\n p: hours < 12 ? 'AM' : 'PM',\n // Lower case AM or PM\n P: hours < 12 ? 'am' : 'pm',\n // Two digits seconds, 00 through 59\n S: pad(date.getSeconds()),\n // Milliseconds (naming from Ruby)\n L: pad(Math.floor(timestamp % 1000), 3)\n }, H.dateFormats);\n // Do the replaces\n objectEach(replacements, function (val, key) {\n // Regex would do it in one line, but this is faster\n while (format.indexOf('%' + key) !== -1) {\n format = format.replace('%' + key, typeof val === 'function' ? val.call(time, timestamp) : val);\n }\n });\n // Optionally capitalize the string and return\n return capitalize ?\n (format.substr(0, 1).toUpperCase() +\n format.substr(1)) :\n format;\n };\n /**\n * Resolve legacy formats of dateTimeLabelFormats (strings and arrays) into\n * an object.\n * @private\n * @param {string|Array|Highcharts.Dictionary} f\n * General format description\n * @return {Highcharts.Dictionary}\n * The object definition\n */\n Time.prototype.resolveDTLFormat = function (f) {\n if (!isObject(f, true)) { // check for string or array\n f = splat(f);\n return {\n main: f[0],\n from: f[1],\n to: f[2]\n };\n }\n return f;\n };\n /**\n * Return an array with time positions distributed on round time values\n * right and right after min and max. Used in datetime axes as well as for\n * grouping data on a datetime axis.\n *\n * @function Highcharts.Time#getTimeTicks\n *\n * @param {Highcharts.TimeNormalizedObject} normalizedInterval\n * The interval in axis values (ms) and the count\n *\n * @param {number} [min]\n * The minimum in axis values\n *\n * @param {number} [max]\n * The maximum in axis values\n *\n * @param {number} [startOfWeek=1]\n *\n * @return {Highcharts.AxisTickPositionsArray}\n * Time positions\n */\n Time.prototype.getTimeTicks = function (normalizedInterval, min, max, startOfWeek) {\n var time = this,\n Date = time.Date,\n tickPositions = [],\n higherRanks = {}, \n // When crossing DST, use the max. Resolves #6278.\n minDate = new Date(min),\n interval = normalizedInterval.unitRange,\n count = normalizedInterval.count || 1;\n var i,\n minYear, // used in months and years as a basis for Date.UTC()\n variableDayLength,\n minDay;\n startOfWeek = pick(startOfWeek, 1);\n if (defined(min)) { // #1300\n time.set('Milliseconds', minDate, interval >= timeUnits.second ?\n 0 : // #3935\n count * Math.floor(time.get('Milliseconds', minDate) / count)); // #3652, #3654\n if (interval >= timeUnits.second) { // second\n time.set('Seconds', minDate, interval >= timeUnits.minute ?\n 0 : // #3935\n count * Math.floor(time.get('Seconds', minDate) / count));\n }\n if (interval >= timeUnits.minute) { // minute\n time.set('Minutes', minDate, interval >= timeUnits.hour ?\n 0 :\n count * Math.floor(time.get('Minutes', minDate) / count));\n }\n if (interval >= timeUnits.hour) { // hour\n time.set('Hours', minDate, interval >= timeUnits.day ?\n 0 :\n count * Math.floor(time.get('Hours', minDate) / count));\n }\n if (interval >= timeUnits.day) { // day\n time.set('Date', minDate, interval >= timeUnits.month ?\n 1 :\n Math.max(1, count * Math.floor(time.get('Date', minDate) / count)));\n }\n if (interval >= timeUnits.month) { // month\n time.set('Month', minDate, interval >= timeUnits.year ? 0 :\n count * Math.floor(time.get('Month', minDate) / count));\n minYear = time.get('FullYear', minDate);\n }\n if (interval >= timeUnits.year) { // year\n minYear -= minYear % count;\n time.set('FullYear', minDate, minYear);\n }\n // week is a special case that runs outside the hierarchy\n if (interval === timeUnits.week) {\n // get start of current week, independent of count\n minDay = time.get('Day', minDate);\n time.set('Date', minDate, (time.get('Date', minDate) -\n minDay + startOfWeek +\n // We don't want to skip days that are before\n // startOfWeek (#7051)\n (minDay < startOfWeek ? -7 : 0)));\n }\n // Get basics for variable time spans\n minYear = time.get('FullYear', minDate);\n var minMonth = time.get('Month', minDate), minDateDate = time.get('Date', minDate), minHours = time.get('Hours', minDate);\n // Redefine min to the floored/rounded minimum time (#7432)\n min = minDate.getTime();\n // Handle local timezone offset\n if ((time.variableTimezone || !time.useUTC) && defined(max)) {\n // Detect whether we need to take the DST crossover into\n // consideration. If we're crossing over DST, the day length may\n // be 23h or 25h and we need to compute the exact clock time for\n // each tick instead of just adding hours. This comes at a cost,\n // so first we find out if it is needed (#4951).\n variableDayLength = (\n // Long range, assume we're crossing over.\n max - min > 4 * timeUnits.month ||\n // Short range, check if min and max are in different time\n // zones.\n time.getTimezoneOffset(min) !==\n time.getTimezoneOffset(max));\n }\n // Iterate and add tick positions at appropriate values\n var t = minDate.getTime();\n i = 1;\n while (t < max) {\n tickPositions.push(t);\n // if the interval is years, use Date.UTC to increase years\n if (interval === timeUnits.year) {\n t = time.makeTime(minYear + i * count, 0);\n // if the interval is months, use Date.UTC to increase months\n }\n else if (interval === timeUnits.month) {\n t = time.makeTime(minYear, minMonth + i * count);\n // if we're using global time, the interval is not fixed as it\n // jumps one hour at the DST crossover\n }\n else if (variableDayLength &&\n (interval === timeUnits.day || interval === timeUnits.week)) {\n t = time.makeTime(minYear, minMonth, minDateDate +\n i * count * (interval === timeUnits.day ? 1 : 7));\n }\n else if (variableDayLength &&\n interval === timeUnits.hour &&\n count > 1) {\n // make sure higher ranks are preserved across DST (#6797,\n // #7621)\n t = time.makeTime(minYear, minMonth, minDateDate, minHours + i * count);\n // else, the interval is fixed and we use simple addition\n }\n else {\n t += interval * count;\n }\n i++;\n }\n // push the last time\n tickPositions.push(t);\n // Handle higher ranks. Mark new days if the time is on midnight\n // (#950, #1649, #1760, #3349). Use a reasonable dropout threshold\n // to prevent looping over dense data grouping (#6156).\n if (interval <= timeUnits.hour && tickPositions.length < 10000) {\n tickPositions.forEach(function (t) {\n if (\n // Speed optimization, no need to run dateFormat unless\n // we're on a full or half hour\n t % 1800000 === 0 &&\n // Check for local or global midnight\n time.dateFormat('%H%M%S%L', t) === '000000000') {\n higherRanks[t] = 'day';\n }\n });\n }\n }\n // record information on the chosen unit - for dynamic label formatter\n tickPositions.info = extend(normalizedInterval, {\n higherRanks: higherRanks,\n totalRange: interval * count\n });\n return tickPositions;\n };\n /**\n * Get the optimal date format for a point, based on a range.\n *\n * @private\n * @function Highcharts.Time#getDateFormat\n *\n * @param {number} range\n * The time range\n *\n * @param {number} timestamp\n * The timestamp of the date\n *\n * @param {number} startOfWeek\n * An integer representing the first day of the week, where 0 is\n * Sunday.\n *\n * @param {Highcharts.Dictionary} dateTimeLabelFormats\n * A map of time units to formats.\n *\n * @return {string}\n * The optimal date format for a point.\n */\n Time.prototype.getDateFormat = function (range, timestamp, startOfWeek, dateTimeLabelFormats) {\n var dateStr = this.dateFormat('%m-%d %H:%M:%S.%L', timestamp), blank = '01-01 00:00:00.000', strpos = {\n millisecond: 15,\n second: 12,\n minute: 9,\n hour: 6,\n day: 3\n };\n var n = 'millisecond', \n // for sub-millisecond data, #4223\n lastN = n;\n for (n in timeUnits) { // eslint-disable-line guard-for-in\n // If the range is exactly one week and we're looking at a\n // Sunday/Monday, go for the week format\n if (range === timeUnits.week &&\n +this.dateFormat('%w', timestamp) === startOfWeek &&\n dateStr.substr(6) === blank.substr(6)) {\n n = 'week';\n break;\n }\n // The first format that is too great for the range\n if (timeUnits[n] > range) {\n n = lastN;\n break;\n }\n // If the point is placed every day at 23:59, we need to show\n // the minutes as well. #2637.\n if (strpos[n] &&\n dateStr.substr(strpos[n]) !== blank.substr(strpos[n])) {\n break;\n }\n // Weeks are outside the hierarchy, only apply them on\n // Mondays/Sundays like in the first condition\n if (n !== 'week') {\n lastN = n;\n }\n }\n return this.resolveDTLFormat(dateTimeLabelFormats[n]).main;\n };\n return Time;\n }());\n /* *\n *\n * Default export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * Normalized interval.\n *\n * @interface Highcharts.TimeNormalizedObject\n */ /**\n * The count.\n *\n * @name Highcharts.TimeNormalizedObject#count\n * @type {number|undefined}\n */ /**\n * The interval in axis values (ms).\n *\n * @name Highcharts.TimeNormalizedObject#unitRange\n * @type {number}\n */\n /**\n * Function of an additional date format specifier.\n *\n * @callback Highcharts.TimeFormatCallbackFunction\n *\n * @param {number} timestamp\n * The time to format.\n *\n * @return {string}\n * The formatted portion of the date.\n */\n /**\n * Time ticks.\n *\n * @interface Highcharts.AxisTickPositionsArray\n * @extends global.Array\n */ /**\n * @name Highcharts.AxisTickPositionsArray#info\n * @type {Highcharts.TimeTicksInfoObject|undefined}\n */\n /**\n * A callback to return the time zone offset for a given datetime. It\n * takes the timestamp in terms of milliseconds since January 1 1970,\n * and returns the timezone offset in minutes. This provides a hook\n * for drawing time based charts in specific time zones using their\n * local DST crossover dates, with the help of external libraries.\n *\n * @callback Highcharts.TimezoneOffsetCallbackFunction\n *\n * @param {number} timestamp\n * Timestamp in terms of milliseconds since January 1 1970.\n *\n * @return {number}\n * Timezone offset in minutes.\n */\n /**\n * Allows to manually load the `moment.js` library from Highcharts options\n * instead of the `window`.\n * In case of loading the library from a `script` tag,\n * this option is not needed, it will be loaded from there by default.\n *\n * @type {Function}\n * @since 8.2.0\n * @apioption time.moment\n */\n ''; // keeps doclets above in JS file\n\n return Time;\n });\n _registerModule(_modules, 'Core/Defaults.js', [_modules['Core/Chart/ChartDefaults.js'], _modules['Core/Color/Color.js'], _modules['Core/Globals.js'], _modules['Core/Color/Palettes.js'], _modules['Core/Time.js'], _modules['Core/Utilities.js']], function (ChartDefaults, Color, H, Palettes, Time, U) {\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 var color = Color.parse;\n var isTouchDevice = H.isTouchDevice,\n svg = H.svg;\n var merge = U.merge;\n /* *\n *\n * API Options\n *\n * */\n /**\n * Global default settings.\n *\n * @name Highcharts.defaultOptions\n * @type {Highcharts.Options}\n */ /**\n * @optionparent\n * @private\n */\n var defaultOptions = {\n /**\n * An array containing the default colors for the chart's series. When\n * all colors are used, new colors are pulled from the start again.\n *\n * Default colors can also be set on a series or series.type basis,\n * see [column.colors](#plotOptions.column.colors),\n * [pie.colors](#plotOptions.pie.colors).\n *\n * In styled mode, the colors option doesn't exist. Instead, colors\n * are defined in CSS and applied either through series or point class\n * names, or through the [chart.colorCount](#chart.colorCount) option.\n *\n *\n * ### Legacy\n *\n * In Highcharts 3.x, the default colors were:\n * ```js\n * colors: ['#2f7ed8', '#0d233a', '#8bbc21', '#910000', '#1aadce',\n * '#492970', '#f28f43', '#77a1e5', '#c42525', '#a6c96a']\n * ```\n *\n * In Highcharts 2.x, the default colors were:\n * ```js\n * colors: ['#4572A7', '#AA4643', '#89A54E', '#80699B', '#3D96AE',\n * '#DB843D', '#92A8CD', '#A47D7C', '#B5CA92']\n * ```\n *\n * @sample {highcharts} highcharts/chart/colors/\n * Assign a global color theme\n *\n * @type {Array<(Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject)>}\n * @default [\"#7cb5ec\", \"#434348\", \"#90ed7d\", \"#f7a35c\", \"#8085e9\",\n * \"#f15c80\", \"#e4d354\", \"#2b908f\", \"#f45b5b\", \"#91e8e1\"]\n */\n colors: Palettes.colors,\n /**\n * Styled mode only. Configuration object for adding SVG definitions for\n * reusable elements. See [gradients, shadows and\n * patterns](https://www.highcharts.com/docs/chart-design-and-style/gradients-shadows-and-patterns)\n * for more information and code examples.\n *\n * @type {*}\n * @since 5.0.0\n * @apioption defs\n */\n /**\n * @ignore-option\n */\n symbols: ['circle', 'diamond', 'square', 'triangle', 'triangle-down'],\n /**\n * The language object is global and it can't be set on each chart\n * initialization. Instead, use `Highcharts.setOptions` to set it before any\n * chart is initialized.\n *\n * ```js\n * Highcharts.setOptions({\n * lang: {\n * months: [\n * 'Janvier', 'F\u00E9vrier', 'Mars', 'Avril',\n * 'Mai', 'Juin', 'Juillet', 'Ao\u00FBt',\n * 'Septembre', 'Octobre', 'Novembre', 'D\u00E9cembre'\n * ],\n * weekdays: [\n * 'Dimanche', 'Lundi', 'Mardi', 'Mercredi',\n * 'Jeudi', 'Vendredi', 'Samedi'\n * ]\n * }\n * });\n * ```\n */\n lang: {\n /**\n * The loading text that appears when the chart is set into the loading\n * state following a call to `chart.showLoading`.\n */\n loading: 'Loading...',\n /**\n * An array containing the months names. Corresponds to the `%B` format\n * in `Highcharts.dateFormat()`.\n *\n * @type {Array}\n * @default [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\",\n * \"July\", \"August\", \"September\", \"October\", \"November\",\n * \"December\"]\n */\n months: [\n 'January', 'February', 'March', 'April', 'May', 'June', 'July',\n 'August', 'September', 'October', 'November', 'December'\n ],\n /**\n * An array containing the months names in abbreviated form. Corresponds\n * to the `%b` format in `Highcharts.dateFormat()`.\n *\n * @type {Array}\n * @default [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\",\n * \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n */\n shortMonths: [\n 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul',\n 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'\n ],\n /**\n * An array containing the weekday names.\n *\n * @type {Array}\n * @default [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\",\n * \"Friday\", \"Saturday\"]\n */\n weekdays: [\n 'Sunday', 'Monday', 'Tuesday', 'Wednesday',\n 'Thursday', 'Friday', 'Saturday'\n ],\n /**\n * Short week days, starting Sunday. If not specified, Highcharts uses\n * the first three letters of the `lang.weekdays` option.\n *\n * @sample highcharts/lang/shortweekdays/\n * Finnish two-letter abbreviations\n *\n * @type {Array}\n * @since 4.2.4\n * @apioption lang.shortWeekdays\n */\n /**\n * What to show in a date field for invalid dates. Defaults to an empty\n * string.\n *\n * @type {string}\n * @since 4.1.8\n * @product highcharts highstock\n * @apioption lang.invalidDate\n */\n /**\n * The title appearing on hovering the zoom in button. The text itself\n * defaults to \"+\" and can be changed in the button options.\n *\n * @type {string}\n * @default Zoom in\n * @product highmaps\n * @apioption lang.zoomIn\n */\n /**\n * The title appearing on hovering the zoom out button. The text itself\n * defaults to \"-\" and can be changed in the button options.\n *\n * @type {string}\n * @default Zoom out\n * @product highmaps\n * @apioption lang.zoomOut\n */\n /**\n * The default decimal point used in the `Highcharts.numberFormat`\n * method unless otherwise specified in the function arguments.\n *\n * @since 1.2.2\n */\n decimalPoint: '.',\n /**\n * [Metric prefixes](https://en.wikipedia.org/wiki/Metric_prefix) used\n * to shorten high numbers in axis labels. Replacing any of the\n * positions with `null` causes the full number to be written. Setting\n * `numericSymbols` to `null` disables shortening altogether.\n *\n * @sample {highcharts} highcharts/lang/numericsymbols/\n * Replacing the symbols with text\n * @sample {highstock} highcharts/lang/numericsymbols/\n * Replacing the symbols with text\n *\n * @type {Array}\n * @default [\"k\", \"M\", \"G\", \"T\", \"P\", \"E\"]\n * @since 2.3.0\n */\n numericSymbols: ['k', 'M', 'G', 'T', 'P', 'E'],\n /**\n * The magnitude of [numericSymbols](#lang.numericSymbol) replacements.\n * Use 10000 for Japanese, Korean and various Chinese locales, which\n * use symbols for 10^4, 10^8 and 10^12.\n *\n * @sample highcharts/lang/numericsymbolmagnitude/\n * 10000 magnitude for Japanese\n *\n * @type {number}\n * @default 1000\n * @since 5.0.3\n * @apioption lang.numericSymbolMagnitude\n */\n /**\n * The text for the label appearing when a chart is zoomed.\n *\n * @since 1.2.4\n */\n resetZoom: 'Reset zoom',\n /**\n * The tooltip title for the label appearing when a chart is zoomed.\n *\n * @since 1.2.4\n */\n resetZoomTitle: 'Reset zoom level 1:1',\n /**\n * The default thousands separator used in the `Highcharts.numberFormat`\n * method unless otherwise specified in the function arguments. Defaults\n * to a single space character, which is recommended in\n * [ISO 31-0](https://en.wikipedia.org/wiki/ISO_31-0#Numbers) and works\n * across Anglo-American and continental European languages.\n *\n * @default \\u0020\n * @since 1.2.2\n */\n thousandsSep: ' '\n },\n /**\n * Global options that don't apply to each chart. These options, like\n * the `lang` options, must be set using the `Highcharts.setOptions`\n * method.\n *\n * ```js\n * Highcharts.setOptions({\n * global: {\n * useUTC: false\n * }\n * });\n * ```\n */\n /**\n * _Canvg rendering for Android 2.x is removed as of Highcharts 5.0\\.\n * Use the [libURL](#exporting.libURL) option to configure exporting._\n *\n * The URL to the additional file to lazy load for Android 2.x devices.\n * These devices don't support SVG, so we download a helper file that\n * contains [canvg](https://github.com/canvg/canvg), its dependency\n * rbcolor, and our own CanVG Renderer class. To avoid hotlinking to\n * our site, you can install canvas-tools.js on your own server and\n * change this option accordingly.\n *\n * @deprecated\n *\n * @type {string}\n * @default https://code.highcharts.com/{version}/modules/canvas-tools.js\n * @product highcharts highmaps\n * @apioption global.canvasToolsURL\n */\n /**\n * This option is deprecated since v6.0.5. Instead, use\n * [time.useUTC](#time.useUTC) that supports individual time settings\n * per chart.\n *\n * @deprecated\n *\n * @type {boolean}\n * @apioption global.useUTC\n */\n /**\n * This option is deprecated since v6.0.5. Instead, use\n * [time.Date](#time.Date) that supports individual time settings\n * per chart.\n *\n * @deprecated\n *\n * @type {Function}\n * @product highcharts highstock\n * @apioption global.Date\n */\n /**\n * This option is deprecated since v6.0.5. Instead, use\n * [time.getTimezoneOffset](#time.getTimezoneOffset) that supports\n * individual time settings per chart.\n *\n * @deprecated\n *\n * @type {Function}\n * @product highcharts highstock\n * @apioption global.getTimezoneOffset\n */\n /**\n * This option is deprecated since v6.0.5. Instead, use\n * [time.timezone](#time.timezone) that supports individual time\n * settings per chart.\n *\n * @deprecated\n *\n * @type {string}\n * @product highcharts highstock\n * @apioption global.timezone\n */\n /**\n * This option is deprecated since v6.0.5. Instead, use\n * [time.timezoneOffset](#time.timezoneOffset) that supports individual\n * time settings per chart.\n *\n * @deprecated\n *\n * @type {number}\n * @product highcharts highstock\n * @apioption global.timezoneOffset\n */\n global: {},\n /**\n * Time options that can apply globally or to individual charts. These\n * settings affect how `datetime` axes are laid out, how tooltips are\n * formatted, how series\n * [pointIntervalUnit](#plotOptions.series.pointIntervalUnit) works and how\n * the Highcharts Stock range selector handles time.\n *\n * The common use case is that all charts in the same Highcharts object\n * share the same time settings, in which case the global settings are set\n * using `setOptions`.\n *\n * ```js\n * // Apply time settings globally\n * Highcharts.setOptions({\n * time: {\n * timezone: 'Europe/London'\n * }\n * });\n * // Apply time settings by instance\n * let chart = Highcharts.chart('container', {\n * time: {\n * timezone: 'America/New_York'\n * },\n * series: [{\n * data: [1, 4, 3, 5]\n * }]\n * });\n *\n * // Use the Time object\n * console.log(\n * 'Current time in New York',\n * chart.time.dateFormat('%Y-%m-%d %H:%M:%S', Date.now())\n * );\n * ```\n *\n * Since v6.0.5, the time options were moved from the `global` obect to the\n * `time` object, and time options can be set on each individual chart.\n *\n * @sample {highcharts|highstock}\n * highcharts/time/timezone/\n * Set the timezone globally\n * @sample {highcharts}\n * highcharts/time/individual/\n * Set the timezone per chart instance\n * @sample {highstock}\n * stock/time/individual/\n * Set the timezone per chart instance\n *\n * @since 6.0.5\n * @optionparent time\n */\n time: {\n /**\n * A custom `Date` class for advanced date handling. For example,\n * [JDate](https://github.com/tahajahangir/jdate) can be hooked in to\n * handle Jalali dates.\n *\n * @type {*}\n * @since 4.0.4\n * @product highcharts highstock gantt\n */\n Date: void 0,\n /**\n * A callback to return the time zone offset for a given datetime. It\n * takes the timestamp in terms of milliseconds since January 1 1970,\n * and returns the timezone offset in minutes. This provides a hook\n * for drawing time based charts in specific time zones using their\n * local DST crossover dates, with the help of external libraries.\n *\n * @see [global.timezoneOffset](#global.timezoneOffset)\n *\n * @sample {highcharts|highstock} highcharts/time/gettimezoneoffset/\n * Use moment.js to draw Oslo time regardless of browser locale\n *\n * @type {Highcharts.TimezoneOffsetCallbackFunction}\n * @since 4.1.0\n * @product highcharts highstock gantt\n */\n getTimezoneOffset: void 0,\n /**\n * Requires [moment.js](https://momentjs.com/). If the timezone option\n * is specified, it creates a default\n * [getTimezoneOffset](#time.getTimezoneOffset) function that looks\n * up the specified timezone in moment.js. If moment.js is not included,\n * this throws a Highcharts error in the console, but does not crash the\n * chart.\n *\n * @see [getTimezoneOffset](#time.getTimezoneOffset)\n *\n * @sample {highcharts|highstock} highcharts/time/timezone/\n * Europe/Oslo\n *\n * @type {string}\n * @since 5.0.7\n * @product highcharts highstock gantt\n */\n timezone: void 0,\n /**\n * The timezone offset in minutes. Positive values are west, negative\n * values are east of UTC, as in the ECMAScript\n * [getTimezoneOffset](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset)\n * method. Use this to display UTC based data in a predefined time zone.\n *\n * @see [time.getTimezoneOffset](#time.getTimezoneOffset)\n *\n * @sample {highcharts|highstock} highcharts/time/timezoneoffset/\n * Timezone offset\n *\n * @since 3.0.8\n * @product highcharts highstock gantt\n */\n timezoneOffset: 0,\n /**\n * Whether to use UTC time for axis scaling, tickmark placement and\n * time display in `Highcharts.dateFormat`. Advantages of using UTC\n * is that the time displays equally regardless of the user agent's\n * time zone settings. Local time can be used when the data is loaded\n * in real time or when correct Daylight Saving Time transitions are\n * required.\n *\n * @sample {highcharts} highcharts/time/useutc-true/\n * True by default\n * @sample {highcharts} highcharts/time/useutc-false/\n * False\n */\n useUTC: true\n },\n chart: ChartDefaults,\n /**\n * The chart's main title.\n *\n * @sample {highmaps} maps/title/title/\n * Title options demonstrated\n */\n title: {\n /**\n * When the title is floating, the plot area will not move to make space\n * for it.\n *\n * @sample {highcharts} highcharts/chart/zoomtype-none/\n * False by default\n * @sample {highcharts} highcharts/title/floating/\n * True - title on top of the plot area\n * @sample {highstock} stock/chart/title-floating/\n * True - title on top of the plot area\n *\n * @type {boolean}\n * @default false\n * @since 2.1\n * @apioption title.floating\n */\n /**\n * CSS styles for the title. Use this for font styling, but use `align`,\n * `x` and `y` for text alignment.\n *\n * In styled mode, the title style is given in the `.highcharts-title`\n * class.\n *\n * @sample {highcharts} highcharts/title/style/\n * Custom color and weight\n * @sample {highstock} stock/chart/title-style/\n * Custom color and weight\n * @sample highcharts/css/titles/\n * Styled mode\n *\n * @type {Highcharts.CSSObject}\n * @default {highcharts|highmaps} { \"color\": \"#333333\", \"fontSize\": \"18px\" }\n * @default {highstock} { \"color\": \"#333333\", \"fontSize\": \"16px\" }\n * @apioption title.style\n */\n /**\n * Whether to\n * [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the text.\n *\n * @type {boolean}\n * @default false\n * @apioption title.useHTML\n */\n /**\n * The vertical alignment of the title. Can be one of `\"top\"`,\n * `\"middle\"` and `\"bottom\"`. When a value is given, the title behaves\n * as if [floating](#title.floating) were `true`.\n *\n * @sample {highcharts} highcharts/title/verticalalign/\n * Chart title in bottom right corner\n * @sample {highstock} stock/chart/title-verticalalign/\n * Chart title in bottom right corner\n *\n * @type {Highcharts.VerticalAlignValue}\n * @since 2.1\n * @apioption title.verticalAlign\n */\n /**\n * The x position of the title relative to the alignment within\n * `chart.spacingLeft` and `chart.spacingRight`.\n *\n * @sample {highcharts} highcharts/title/align/\n * Aligned to the plot area (x = 70px = margin left - spacing\n * left)\n * @sample {highstock} stock/chart/title-align/\n * Aligned to the plot area (x = 50px = margin left - spacing\n * left)\n *\n * @type {number}\n * @default 0\n * @since 2.0\n * @apioption title.x\n */\n /**\n * The y position of the title relative to the alignment within\n * [chart.spacingTop](#chart.spacingTop) and [chart.spacingBottom](\n * #chart.spacingBottom). By default it depends on the font size.\n *\n * @sample {highcharts} highcharts/title/y/\n * Title inside the plot area\n * @sample {highstock} stock/chart/title-verticalalign/\n * Chart title in bottom right corner\n *\n * @type {number}\n * @since 2.0\n * @apioption title.y\n */\n /**\n * The title of the chart. To disable the title, set the `text` to\n * `undefined`.\n *\n * @sample {highcharts} highcharts/title/text/\n * Custom title\n * @sample {highstock} stock/chart/title-text/\n * Custom title\n *\n * @default {highcharts|highmaps} Chart title\n * @default {highstock} undefined\n */\n text: 'Chart title',\n /**\n * The horizontal alignment of the title. Can be one of \"left\", \"center\"\n * and \"right\".\n *\n * @sample {highcharts} highcharts/title/align/\n * Aligned to the plot area (x = 70px = margin left - spacing\n * left)\n * @sample {highstock} stock/chart/title-align/\n * Aligned to the plot area (x = 50px = margin left - spacing\n * left)\n *\n * @type {Highcharts.AlignValue}\n * @since 2.0\n */\n align: 'center',\n /**\n * The margin between the title and the plot area, or if a subtitle\n * is present, the margin between the subtitle and the plot area.\n *\n * @sample {highcharts} highcharts/title/margin-50/\n * A chart title margin of 50\n * @sample {highcharts} highcharts/title/margin-subtitle/\n * The same margin applied with a subtitle\n * @sample {highstock} stock/chart/title-margin/\n * A chart title margin of 50\n *\n * @since 2.1\n */\n margin: 15,\n /**\n * Adjustment made to the title width, normally to reserve space for\n * the exporting burger menu.\n *\n * @sample highcharts/title/widthadjust/\n * Wider menu, greater padding\n *\n * @since 4.2.5\n */\n widthAdjust: -44\n },\n /**\n * The chart's subtitle. This can be used both to display a subtitle below\n * the main title, and to display random text anywhere in the chart. The\n * subtitle can be updated after chart initialization through the\n * `Chart.setTitle` method.\n *\n * @sample {highmaps} maps/title/subtitle/\n * Subtitle options demonstrated\n */\n subtitle: {\n /**\n * When the subtitle is floating, the plot area will not move to make\n * space for it.\n *\n * @sample {highcharts} highcharts/subtitle/floating/\n * Floating title and subtitle\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote floating at bottom right of plot area\n *\n * @type {boolean}\n * @default false\n * @since 2.1\n * @apioption subtitle.floating\n */\n /**\n * CSS styles for the title.\n *\n * In styled mode, the subtitle style is given in the\n * `.highcharts-subtitle` class.\n *\n * @sample {highcharts} highcharts/subtitle/style/\n * Custom color and weight\n * @sample {highcharts} highcharts/css/titles/\n * Styled mode\n * @sample {highstock} stock/chart/subtitle-style\n * Custom color and weight\n * @sample {highstock} highcharts/css/titles/\n * Styled mode\n * @sample {highmaps} highcharts/css/titles/\n * Styled mode\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#666666\"}\n * @apioption subtitle.style\n */\n /**\n * Whether to\n * [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the text.\n *\n * @type {boolean}\n * @default false\n * @apioption subtitle.useHTML\n */\n /**\n * The vertical alignment of the title. Can be one of `\"top\"`,\n * `\"middle\"` and `\"bottom\"`. When middle, the subtitle behaves as\n * floating.\n *\n * @sample {highcharts} highcharts/subtitle/verticalalign/\n * Footnote at the bottom right of plot area\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote at the bottom right of plot area\n *\n * @type {Highcharts.VerticalAlignValue}\n * @since 2.1\n * @apioption subtitle.verticalAlign\n */\n /**\n * The x position of the subtitle relative to the alignment within\n * `chart.spacingLeft` and `chart.spacingRight`.\n *\n * @sample {highcharts} highcharts/subtitle/align/\n * Footnote at right of plot area\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote at the bottom right of plot area\n *\n * @type {number}\n * @default 0\n * @since 2.0\n * @apioption subtitle.x\n */\n /**\n * The y position of the subtitle relative to the alignment within\n * `chart.spacingTop` and `chart.spacingBottom`. By default the subtitle\n * is laid out below the title unless the title is floating.\n *\n * @sample {highcharts} highcharts/subtitle/verticalalign/\n * Footnote at the bottom right of plot area\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote at the bottom right of plot area\n *\n * @type {number}\n * @since 2.0\n * @apioption subtitle.y\n */\n /**\n * The subtitle of the chart.\n *\n * @sample {highcharts|highstock} highcharts/subtitle/text/\n * Custom subtitle\n * @sample {highcharts|highstock} highcharts/subtitle/text-formatted/\n * Formatted and linked text.\n */\n text: '',\n /**\n * The horizontal alignment of the subtitle. Can be one of \"left\",\n * \"center\" and \"right\".\n *\n * @sample {highcharts} highcharts/subtitle/align/\n * Footnote at right of plot area\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote at bottom right of plot area\n *\n * @type {Highcharts.AlignValue}\n * @since 2.0\n */\n align: 'center',\n /**\n * Adjustment made to the subtitle width, normally to reserve space\n * for the exporting burger menu.\n *\n * @see [title.widthAdjust](#title.widthAdjust)\n *\n * @sample highcharts/title/widthadjust/\n * Wider menu, greater padding\n *\n * @since 4.2.5\n */\n widthAdjust: -44\n },\n /**\n * The chart's caption, which will render below the chart and will be part\n * of exported charts. The caption can be updated after chart initialization\n * through the `Chart.update` or `Chart.caption.update` methods.\n *\n * @sample highcharts/caption/text/\n * A chart with a caption\n * @since 7.2.0\n */\n caption: {\n /**\n * When the caption is floating, the plot area will not move to make\n * space for it.\n *\n * @type {boolean}\n * @default false\n * @apioption caption.floating\n */\n /**\n * The margin between the caption and the plot area.\n */\n margin: 15,\n /**\n * CSS styles for the caption.\n *\n * In styled mode, the caption style is given in the\n * `.highcharts-caption` class.\n *\n * @sample {highcharts} highcharts/css/titles/\n * Styled mode\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#666666\"}\n * @apioption caption.style\n */\n /**\n * Whether to\n * [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the text.\n *\n * @type {boolean}\n * @default false\n * @apioption caption.useHTML\n */\n /**\n * The x position of the caption relative to the alignment within\n * `chart.spacingLeft` and `chart.spacingRight`.\n *\n * @type {number}\n * @default 0\n * @apioption caption.x\n */\n /**\n * The y position of the caption relative to the alignment within\n * `chart.spacingTop` and `chart.spacingBottom`.\n *\n * @type {number}\n * @apioption caption.y\n */\n /**\n * The caption text of the chart.\n *\n * @sample {highcharts} highcharts/caption/text/\n * Custom caption\n */\n text: '',\n /**\n * The horizontal alignment of the caption. Can be one of \"left\",\n * \"center\" and \"right\".\n *\n * @type {Highcharts.AlignValue}\n */\n align: 'left',\n /**\n * The vertical alignment of the caption. Can be one of `\"top\"`,\n * `\"middle\"` and `\"bottom\"`. When middle, the caption behaves as\n * floating.\n *\n * @type {Highcharts.VerticalAlignValue}\n */\n verticalAlign: 'bottom'\n },\n /**\n * The plotOptions is a wrapper object for config objects for each series\n * type. The config objects for each series can also be overridden for\n * each series item as given in the series array.\n *\n * Configuration options for the series are given in three levels. Options\n * for all series in a chart are given in the [plotOptions.series](\n * #plotOptions.series) object. Then options for all series of a specific\n * type are given in the plotOptions of that type, for example\n * `plotOptions.line`. Next, options for one single series are given in\n * [the series array](#series).\n */\n plotOptions: {},\n /**\n * HTML labels that can be positioned anywhere in the chart area.\n *\n * This option is deprecated since v7.1.2. Instead, use\n * [annotations](#annotations) that support labels.\n *\n * @deprecated\n * @product highcharts highstock\n */\n labels: {\n /**\n * An HTML label that can be positioned anywhere in the chart area.\n *\n * @deprecated\n * @type {Array<*>}\n * @apioption labels.items\n */\n /**\n * Inner HTML or text for the label.\n *\n * @deprecated\n * @type {string}\n * @apioption labels.items.html\n */\n /**\n * CSS styles for each label. To position the label, use left and top\n * like this:\n * ```js\n * style: {\n * left: '100px',\n * top: '100px'\n * }\n * ```\n *\n * @deprecated\n * @type {Highcharts.CSSObject}\n * @apioption labels.items.style\n */\n /**\n * Shared CSS styles for all labels.\n *\n * @deprecated\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#333333\", \"position\": \"absolute\"}\n */\n style: {\n /**\n * @ignore-option\n */\n position: 'absolute',\n /**\n * @ignore-option\n */\n color: \"#333333\" /* Palette.neutralColor80 */\n }\n },\n /**\n * The legend is a box containing a symbol and name for each series\n * item or point item in the chart. Each series (or points in case\n * of pie charts) is represented by a symbol and its name in the legend.\n *\n * It is possible to override the symbol creator function and create\n * [custom legend symbols](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/studies/legend-custom-symbol/).\n *\n * @productdesc {highmaps}\n * A Highmaps legend by default contains one legend item per series, but if\n * a `colorAxis` is defined, the axis will be displayed in the legend.\n * Either as a gradient, or as multiple legend items for `dataClasses`.\n */\n legend: {\n /**\n * The background color of the legend.\n *\n * @see In styled mode, the legend background fill can be applied with\n * the `.highcharts-legend-box` class.\n *\n * @sample {highcharts} highcharts/legend/backgroundcolor/\n * Yellowish background\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @apioption legend.backgroundColor\n */\n /**\n * The width of the drawn border around the legend.\n *\n * @see In styled mode, the legend border stroke width can be applied\n * with the `.highcharts-legend-box` class.\n *\n * @sample {highcharts} highcharts/legend/borderwidth/\n * 2px border width\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n *\n * @type {number}\n * @default 0\n * @apioption legend.borderWidth\n */\n /**\n * Enable or disable the legend. There is also a series-specific option,\n * [showInLegend](#plotOptions.series.showInLegend), that can hide the\n * series from the legend. In some series types this is `false` by\n * default, so it must set to `true` in order to show the legend for the\n * series.\n *\n * @sample {highcharts} highcharts/legend/enabled-false/ Legend disabled\n * @sample {highstock} stock/legend/align/ Various legend options\n * @sample {highmaps} maps/legend/enabled-false/ Legend disabled\n *\n * @default {highstock} false\n * @default {highmaps} true\n * @default {gantt} false\n */\n enabled: true,\n /**\n * The horizontal alignment of the legend box within the chart area.\n * Valid values are `left`, `center` and `right`.\n *\n * In the case that the legend is aligned in a corner position, the\n * `layout` option will determine whether to place it above/below\n * or on the side of the plot area.\n *\n * @sample {highcharts} highcharts/legend/align/\n * Legend at the right of the chart\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/alignment/\n * Legend alignment\n *\n * @type {Highcharts.AlignValue}\n * @since 2.0\n */\n align: 'center',\n /**\n * If the [layout](legend.layout) is `horizontal` and the legend items\n * span over two lines or more, whether to align the items into vertical\n * columns. Setting this to `false` makes room for more items, but will\n * look more messy.\n *\n * @since 6.1.0\n */\n alignColumns: true,\n /**\n * A CSS class name to apply to the legend group.\n */\n className: 'highcharts-no-tooltip',\n /**\n * When the legend is floating, the plot area ignores it and is allowed\n * to be placed below it.\n *\n * @sample {highcharts} highcharts/legend/floating-false/\n * False by default\n * @sample {highcharts} highcharts/legend/floating-true/\n * True\n * @sample {highmaps} maps/legend/alignment/\n * Floating legend\n *\n * @type {boolean}\n * @default false\n * @since 2.1\n * @apioption legend.floating\n */\n /**\n * The layout of the legend items. Can be one of `horizontal` or\n * `vertical` or `proximate`. When `proximate`, the legend items will be\n * placed as close as possible to the graphs they're representing,\n * except in inverted charts or when the legend position doesn't allow\n * it.\n *\n * @sample {highcharts} highcharts/legend/layout-horizontal/\n * Horizontal by default\n * @sample {highcharts} highcharts/legend/layout-vertical/\n * Vertical\n * @sample highcharts/legend/layout-proximate\n * Labels proximate to the data\n * @sample {highstock} stock/legend/layout-horizontal/\n * Horizontal by default\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Vertical with data classes\n * @sample {highmaps} maps/legend/layout-vertical/\n * Vertical with color axis gradient\n *\n * @validvalue [\"horizontal\", \"vertical\", \"proximate\"]\n */\n layout: 'horizontal',\n /**\n * In a legend with horizontal layout, the itemDistance defines the\n * pixel distance between each item.\n *\n * @sample {highcharts} highcharts/legend/layout-horizontal/\n * 50px item distance\n * @sample {highstock} highcharts/legend/layout-horizontal/\n * 50px item distance\n *\n * @type {number}\n * @default {highcharts} 20\n * @default {highstock} 20\n * @default {highmaps} 8\n * @since 3.0.3\n * @apioption legend.itemDistance\n */\n /**\n * The pixel bottom margin for each legend item.\n *\n * @sample {highcharts|highstock} highcharts/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n *\n * @type {number}\n * @default 0\n * @since 2.2.0\n * @apioption legend.itemMarginBottom\n */\n /**\n * The pixel top margin for each legend item.\n *\n * @sample {highcharts|highstock} highcharts/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n *\n * @type {number}\n * @default 0\n * @since 2.2.0\n * @apioption legend.itemMarginTop\n */\n /**\n * The width for each legend item. By default the items are laid out\n * successively. In a [horizontal layout](legend.layout), if the items\n * are laid out across two rows or more, they will be vertically aligned\n * depending on the [legend.alignColumns](legend.alignColumns) option.\n *\n * @sample {highcharts} highcharts/legend/itemwidth-default/\n * Undefined by default\n * @sample {highcharts} highcharts/legend/itemwidth-80/\n * 80 for aligned legend items\n *\n * @type {number}\n * @since 2.0\n * @apioption legend.itemWidth\n */\n /**\n * A [format string](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)\n * for each legend label. Available variables relates to properties on\n * the series, or the point in case of pies.\n *\n * @type {string}\n * @default {name}\n * @since 1.3\n * @apioption legend.labelFormat\n */\n /* eslint-disable valid-jsdoc */\n /**\n * Callback function to format each of the series' labels. The `this`\n * keyword refers to the series object, or the point object in case of\n * pie charts. By default the series or point name is printed.\n *\n * @productdesc {highmaps}\n * In Highmaps the context can also be a data class in case of a\n * `colorAxis`.\n *\n * @sample {highcharts} highcharts/legend/labelformatter/\n * Add text\n * @sample {highmaps} maps/legend/labelformatter/\n * Data classes with label formatter\n *\n * @type {Highcharts.FormatterCallbackFunction}\n */\n labelFormatter: function () {\n /** eslint-enable valid-jsdoc */\n return this.name;\n },\n /**\n * Line height for the legend items. Deprecated as of 2.1\\. Instead,\n * the line height for each item can be set using\n * `itemStyle.lineHeight`, and the padding between items using\n * `itemMarginTop` and `itemMarginBottom`.\n *\n * @sample {highcharts} highcharts/legend/lineheight/\n * Setting padding\n *\n * @deprecated\n *\n * @type {number}\n * @default 16\n * @since 2.0\n * @product highcharts gantt\n * @apioption legend.lineHeight\n */\n /**\n * If the plot area sized is calculated automatically and the legend is\n * not floating, the legend margin is the space between the legend and\n * the axis labels or plot area.\n *\n * @sample {highcharts} highcharts/legend/margin-default/\n * 12 pixels by default\n * @sample {highcharts} highcharts/legend/margin-30/\n * 30 pixels\n *\n * @type {number}\n * @default 12\n * @since 2.1\n * @apioption legend.margin\n */\n /**\n * Maximum pixel height for the legend. When the maximum height is\n * extended, navigation will show.\n *\n * @type {number}\n * @since 2.3.0\n * @apioption legend.maxHeight\n */\n /**\n * The color of the drawn border around the legend.\n *\n * @see In styled mode, the legend border stroke can be applied with the\n * `.highcharts-legend-box` class.\n *\n * @sample {highcharts} highcharts/legend/bordercolor/\n * Brown border\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n borderColor: \"#999999\" /* Palette.neutralColor40 */,\n /**\n * The border corner radius of the legend.\n *\n * @sample {highcharts} highcharts/legend/borderradius-default/\n * Square by default\n * @sample {highcharts} highcharts/legend/borderradius-round/\n * 5px rounded\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n */\n borderRadius: 0,\n /**\n * Options for the paging or navigation appearing when the legend is\n * overflown. Navigation works well on screen, but not in static\n * exported images. One way of working around that is to\n * [increase the chart height in\n * export](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/legend/navigation-enabled-false/).\n */\n navigation: {\n /**\n * How to animate the pages when navigating up or down. A value of\n * `true` applies the default navigation given in the\n * `chart.animation` option. Additional options can be given as an\n * object containing values for easing and duration.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {boolean|Partial}\n * @default true\n * @since 2.2.4\n * @apioption legend.navigation.animation\n */\n /**\n * The pixel size of the up and down arrows in the legend paging\n * navigation.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {number}\n * @default 12\n * @since 2.2.4\n * @apioption legend.navigation.arrowSize\n */\n /**\n * Whether to enable the legend navigation. In most cases, disabling\n * the navigation results in an unwanted overflow.\n *\n * See also the\n * [adapt chart to legend](https://github.com/highcharts/adapt-chart-to-legend)\n * plugin for a solution to extend the chart height to make room for\n * the legend, optionally in exported charts only.\n *\n * @type {boolean}\n * @default true\n * @since 4.2.4\n * @apioption legend.navigation.enabled\n */\n /**\n * Text styles for the legend page navigation.\n *\n * @see In styled mode, the navigation items are styled with the\n * `.highcharts-legend-navigation` class.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {Highcharts.CSSObject}\n * @since 2.2.4\n * @apioption legend.navigation.style\n */\n /**\n * The color for the active up or down arrow in the legend page\n * navigation.\n *\n * @see In styled mode, the active arrow be styled with the\n * `.highcharts-legend-nav-active` class.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 2.2.4\n */\n activeColor: \"#003399\" /* Palette.highlightColor100 */,\n /**\n * The color of the inactive up or down arrow in the legend page\n * navigation. .\n *\n * @see In styled mode, the inactive arrow be styled with the\n * `.highcharts-legend-nav-inactive` class.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 2.2.4\n */\n inactiveColor: \"#cccccc\" /* Palette.neutralColor20 */\n },\n /**\n * The inner padding of the legend box.\n *\n * @sample {highcharts|highstock} highcharts/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n *\n * @type {number}\n * @default 8\n * @since 2.2.0\n * @apioption legend.padding\n */\n /**\n * Whether to reverse the order of the legend items compared to the\n * order of the series or points as defined in the configuration object.\n *\n * @see [yAxis.reversedStacks](#yAxis.reversedStacks),\n * [series.legendIndex](#series.legendIndex)\n *\n * @sample {highcharts} highcharts/legend/reversed/\n * Stacked bar with reversed legend\n *\n * @type {boolean}\n * @default false\n * @since 1.2.5\n * @apioption legend.reversed\n */\n /**\n * Whether to show the symbol on the right side of the text rather than\n * the left side. This is common in Arabic and Hebrew.\n *\n * @sample {highcharts} highcharts/legend/rtl/\n * Symbol to the right\n *\n * @type {boolean}\n * @default false\n * @since 2.2\n * @apioption legend.rtl\n */\n /**\n * CSS styles for the legend area. In the 1.x versions the position\n * of the legend area was determined by CSS. In 2.x, the position is\n * determined by properties like `align`, `verticalAlign`, `x` and `y`,\n * but the styles are still parsed for backwards compatibility.\n *\n * @deprecated\n *\n * @type {Highcharts.CSSObject}\n * @product highcharts highstock\n * @apioption legend.style\n */\n /**\n * CSS styles for each legend item. Only a subset of CSS is supported,\n * notably those options related to text. The default `textOverflow`\n * property makes long texts truncate. Set it to `undefined` to wrap\n * text instead. A `width` property can be added to control the text\n * width.\n *\n * @see In styled mode, the legend items can be styled with the\n * `.highcharts-legend-item` class.\n *\n * @sample {highcharts} highcharts/legend/itemstyle/\n * Bold black text\n * @sample {highmaps} maps/legend/itemstyle/\n * Item text styles\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#333333\", \"cursor\": \"pointer\", \"fontSize\": \"12px\", \"fontWeight\": \"bold\", \"textOverflow\": \"ellipsis\"}\n */\n itemStyle: {\n /**\n * @ignore\n */\n color: \"#333333\" /* Palette.neutralColor80 */,\n /**\n * @ignore\n */\n cursor: 'pointer',\n /**\n * @ignore\n */\n fontSize: '12px',\n /**\n * @ignore\n */\n fontWeight: 'bold',\n /**\n * @ignore\n */\n textOverflow: 'ellipsis'\n },\n /**\n * CSS styles for each legend item in hover mode. Only a subset of\n * CSS is supported, notably those options related to text. Properties\n * are inherited from `style` unless overridden here.\n *\n * @see In styled mode, the hovered legend items can be styled with\n * the `.highcharts-legend-item:hover` pesudo-class.\n *\n * @sample {highcharts} highcharts/legend/itemhoverstyle/\n * Red on hover\n * @sample {highmaps} maps/legend/itemstyle/\n * Item text styles\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#000000\"}\n */\n itemHoverStyle: {\n /**\n * @ignore\n */\n color: \"#000000\" /* Palette.neutralColor100 */\n },\n /**\n * CSS styles for each legend item when the corresponding series or\n * point is hidden. Only a subset of CSS is supported, notably those\n * options related to text. Properties are inherited from `style`\n * unless overridden here.\n *\n * @see In styled mode, the hidden legend items can be styled with\n * the `.highcharts-legend-item-hidden` class.\n *\n * @sample {highcharts} highcharts/legend/itemhiddenstyle/\n * Darker gray color\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#cccccc\"}\n */\n itemHiddenStyle: {\n /**\n * @ignore\n */\n color: \"#cccccc\" /* Palette.neutralColor20 */\n },\n /**\n * Whether to apply a drop shadow to the legend. A `backgroundColor`\n * also needs to be applied for this to take effect. The shadow can be\n * an object configuration containing `color`, `offsetX`, `offsetY`,\n * `opacity` and `width`.\n *\n * @sample {highcharts} highcharts/legend/shadow/\n * White background and drop shadow\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n *\n * @type {boolean|Highcharts.CSSObject}\n */\n shadow: false,\n /**\n * Default styling for the checkbox next to a legend item when\n * `showCheckbox` is true.\n *\n * @type {Highcharts.CSSObject}\n * @default {\"width\": \"13px\", \"height\": \"13px\", \"position\":\"absolute\"}\n */\n itemCheckboxStyle: {\n /**\n * @ignore\n */\n position: 'absolute',\n /**\n * @ignore\n */\n width: '13px',\n /**\n * @ignore\n */\n height: '13px'\n },\n // itemWidth: undefined,\n /**\n * When this is true, the legend symbol width will be the same as\n * the symbol height, which in turn defaults to the font size of the\n * legend items.\n *\n * @since 5.0.0\n */\n squareSymbol: true,\n /**\n * The pixel height of the symbol for series types that use a rectangle\n * in the legend. Defaults to the font size of legend items.\n *\n * @productdesc {highmaps}\n * In Highmaps, when the symbol is the gradient of a vertical color\n * axis, the height defaults to 200.\n *\n * @sample {highmaps} maps/legend/layout-vertical-sized/\n * Sized vertical gradient\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * No distance between data classes\n *\n * @type {number}\n * @since 3.0.8\n * @apioption legend.symbolHeight\n */\n /**\n * The border radius of the symbol for series types that use a rectangle\n * in the legend. Defaults to half the `symbolHeight`.\n *\n * @sample {highcharts} highcharts/legend/symbolradius/\n * Round symbols\n * @sample {highstock} highcharts/legend/symbolradius/\n * Round symbols\n * @sample {highmaps} highcharts/legend/symbolradius/\n * Round symbols\n *\n * @type {number}\n * @since 3.0.8\n * @apioption legend.symbolRadius\n */\n /**\n * The pixel width of the legend item symbol. When the `squareSymbol`\n * option is set, this defaults to the `symbolHeight`, otherwise 16.\n *\n * @productdesc {highmaps}\n * In Highmaps, when the symbol is the gradient of a horizontal color\n * axis, the width defaults to 200.\n *\n * @sample {highcharts} highcharts/legend/symbolwidth/\n * Greater symbol width and padding\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n * @sample {highmaps} maps/legend/layout-vertical-sized/\n * Sized vertical gradient\n *\n * @type {number}\n * @apioption legend.symbolWidth\n */\n /**\n * Whether to [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the legend item texts.\n *\n * Prior to 4.1.7, when using HTML, [legend.navigation](\n * #legend.navigation) was disabled.\n *\n * @type {boolean}\n * @default false\n * @apioption legend.useHTML\n */\n /**\n * For a color axis with data classes, how many decimals to render in\n * the legend. The default preserves the decimals of the range numbers.\n *\n * @type {number}\n * @default -1\n * @product highcharts highmaps\n * @apioption legend.valueDecimals\n */\n /**\n * For a color axis with data classes, a suffix for the range numbers in\n * the legend.\n *\n * @type {string}\n * @default ''\n * @product highcharts highmaps\n * @apioption legend.valueSuffix\n */\n /**\n * The width of the legend box. If a number is set, it translates to\n * pixels. Since v7.0.2 it allows setting a percent string of the full\n * chart width, for example `40%`.\n *\n * Defaults to the full chart width for legends below or above the\n * chart, half the chart width for legends to the left and right.\n *\n * @sample {highcharts} highcharts/legend/width/\n * Aligned to the plot area\n * @sample {highcharts} highcharts/legend/width-percent/\n * A percent of the chart width\n *\n * @type {number|string}\n * @since 2.0\n * @apioption legend.width\n */\n /**\n * The pixel padding between the legend item symbol and the legend\n * item text.\n *\n * @sample {highcharts} highcharts/legend/symbolpadding/\n * Greater symbol width and padding\n */\n symbolPadding: 5,\n /**\n * The vertical alignment of the legend box. Can be one of `top`,\n * `middle` or `bottom`. Vertical position can be further determined\n * by the `y` option.\n *\n * In the case that the legend is aligned in a corner position, the\n * `layout` option will determine whether to place it above/below\n * or on the side of the plot area.\n *\n * When the [layout](#legend.layout) option is `proximate`, the\n * `verticalAlign` option doesn't apply.\n *\n * @sample {highcharts} highcharts/legend/verticalalign/\n * Legend 100px from the top of the chart\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/alignment/\n * Legend alignment\n *\n * @type {Highcharts.VerticalAlignValue}\n * @since 2.0\n */\n verticalAlign: 'bottom',\n // width: undefined,\n /**\n * The x offset of the legend relative to its horizontal alignment\n * `align` within chart.spacingLeft and chart.spacingRight. Negative\n * x moves it to the left, positive x moves it to the right.\n *\n * @sample {highcharts} highcharts/legend/width/\n * Aligned to the plot area\n *\n * @since 2.0\n */\n x: 0,\n /**\n * The vertical offset of the legend relative to it's vertical alignment\n * `verticalAlign` within chart.spacingTop and chart.spacingBottom.\n * Negative y moves it up, positive y moves it down.\n *\n * @sample {highcharts} highcharts/legend/verticalalign/\n * Legend 100px from the top of the chart\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/alignment/\n * Legend alignment\n *\n * @since 2.0\n */\n y: 0,\n /**\n * A title to be added on top of the legend.\n *\n * @sample {highcharts} highcharts/legend/title/\n * Legend title\n * @sample {highmaps} maps/legend/alignment/\n * Legend with title\n *\n * @since 3.0\n */\n title: {\n /**\n * A text or HTML string for the title.\n *\n * @type {string}\n * @since 3.0\n * @apioption legend.title.text\n */\n /**\n * Generic CSS styles for the legend title.\n *\n * @see In styled mode, the legend title is styled with the\n * `.highcharts-legend-title` class.\n *\n * @type {Highcharts.CSSObject}\n * @default {\"fontWeight\": \"bold\"}\n * @since 3.0\n */\n style: {\n /**\n * @ignore\n */\n fontWeight: 'bold'\n }\n }\n },\n /**\n * The loading options control the appearance of the loading screen\n * that covers the plot area on chart operations. This screen only\n * appears after an explicit call to `chart.showLoading()`. It is a\n * utility for developers to communicate to the end user that something\n * is going on, for example while retrieving new data via an XHR connection.\n * The \"Loading...\" text itself is not part of this configuration\n * object, but part of the `lang` object.\n */\n loading: {\n /**\n * The duration in milliseconds of the fade out effect.\n *\n * @sample highcharts/loading/hideduration/\n * Fade in and out over a second\n *\n * @type {number}\n * @default 100\n * @since 1.2.0\n * @apioption loading.hideDuration\n */\n /**\n * The duration in milliseconds of the fade in effect.\n *\n * @sample highcharts/loading/hideduration/\n * Fade in and out over a second\n *\n * @type {number}\n * @default 100\n * @since 1.2.0\n * @apioption loading.showDuration\n */\n /**\n * CSS styles for the loading label `span`.\n *\n * @see In styled mode, the loading label is styled with the\n * `.highcharts-loading-inner` class.\n *\n * @sample {highcharts|highmaps} highcharts/loading/labelstyle/\n * Vertically centered\n * @sample {highstock} stock/loading/general/\n * Label styles\n *\n * @type {Highcharts.CSSObject}\n * @default {\"fontWeight\": \"bold\", \"position\": \"relative\", \"top\": \"45%\"}\n * @since 1.2.0\n */\n labelStyle: {\n /**\n * @ignore\n */\n fontWeight: 'bold',\n /**\n * @ignore\n */\n position: 'relative',\n /**\n * @ignore\n */\n top: '45%'\n },\n /**\n * CSS styles for the loading screen that covers the plot area.\n *\n * In styled mode, the loading label is styled with the\n * `.highcharts-loading` class.\n *\n * @sample {highcharts|highmaps} highcharts/loading/style/\n * Gray plot area, white text\n * @sample {highstock} stock/loading/general/\n * Gray plot area, white text\n *\n * @type {Highcharts.CSSObject}\n * @default {\"position\": \"absolute\", \"backgroundColor\": \"#ffffff\", \"opacity\": 0.5, \"textAlign\": \"center\"}\n * @since 1.2.0\n */\n style: {\n /**\n * @ignore\n */\n position: 'absolute',\n /**\n * @ignore\n */\n backgroundColor: \"#ffffff\" /* Palette.backgroundColor */,\n /**\n * @ignore\n */\n opacity: 0.5,\n /**\n * @ignore\n */\n textAlign: 'center'\n }\n },\n /**\n * Options for the tooltip that appears when the user hovers over a\n * series or point.\n *\n * @declare Highcharts.TooltipOptions\n */\n tooltip: {\n /**\n * The color of the tooltip border. When `undefined`, the border takes\n * the color of the corresponding series or point.\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/\n * Follow series by default\n * @sample {highcharts} highcharts/tooltip/bordercolor-black/\n * Black border\n * @sample {highstock} stock/tooltip/general/\n * Styled tooltip\n * @sample {highmaps} maps/tooltip/background-border/\n * Background and border demo\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @apioption tooltip.borderColor\n */\n /**\n * A CSS class name to apply to the tooltip's container div,\n * allowing unique CSS styling for each chart.\n *\n * @type {string}\n * @apioption tooltip.className\n */\n /**\n * Since 4.1, the crosshair definitions are moved to the Axis object\n * in order for a better separation from the tooltip. See\n * [xAxis.crosshair](#xAxis.crosshair).\n *\n * @sample {highcharts} highcharts/tooltip/crosshairs-x/\n * Enable a crosshair for the x value\n *\n * @deprecated\n *\n * @type {*}\n * @default true\n * @apioption tooltip.crosshairs\n */\n /**\n * Distance from point to tooltip in pixels.\n *\n * @type {number}\n * @default 16\n * @apioption tooltip.distance\n */\n /**\n * Whether the tooltip should follow the mouse as it moves across\n * columns, pie slices and other point types with an extent.\n * By default it behaves this way for pie, polygon, map, sankey\n * and wordcloud series by override in the `plotOptions`\n * for those series types.\n *\n * Does not apply if [split](#tooltip.split) is `true`.\n *\n * For touch moves to behave the same way, [followTouchMove](\n * #tooltip.followTouchMove) must be `true` also.\n *\n * @type {boolean}\n * @default {highcharts} false\n * @default {highstock} false\n * @default {highmaps} true\n * @since 3.0\n * @apioption tooltip.followPointer\n */\n /**\n * Whether the tooltip should update as the finger moves on a touch\n * device. If this is `true` and [chart.panning](#chart.panning) is\n * set,`followTouchMove` will take over one-finger touches, so the user\n * needs to use two fingers for zooming and panning.\n *\n * Note the difference to [followPointer](#tooltip.followPointer) that\n * only defines the _position_ of the tooltip. If `followPointer` is\n * false in for example a column series, the tooltip will show above or\n * below the column, but as `followTouchMove` is true, the tooltip will\n * jump from column to column as the user swipes across the plot area.\n *\n * @type {boolean}\n * @default {highcharts} true\n * @default {highstock} true\n * @default {highmaps} false\n * @since 3.0.1\n * @apioption tooltip.followTouchMove\n */\n /**\n * Callback function to format the text of the tooltip from scratch. In\n * case of single or [shared](#tooltip.shared) tooltips, a string should\n * be returned. In case of [split](#tooltip.split) tooltips, it should\n * return an array where the first item is the header, and subsequent\n * items are mapped to the points. Return `false` to disable tooltip for\n * a specific point on series.\n *\n * A subset of HTML is supported. Unless `useHTML` is true, the HTML of\n * the tooltip is parsed and converted to SVG, therefore this isn't a\n * complete HTML renderer. The following HTML tags are supported: `b`,\n * `br`, `em`, `i`, `span`, `strong`. Spans can be styled with a `style`\n * attribute, but only text-related CSS, that is shared with SVG, is\n * handled.\n *\n * The available data in the formatter differ a bit depending on whether\n * the tooltip is shared or split, or belongs to a single point. In a\n * shared/split tooltip, all properties except `x`, which is common for\n * all points, are kept in an array, `this.points`.\n *\n * Available data are:\n *\n * - **this.percentage (not shared) /**\n * **this.points[i].percentage (shared)**:\n * Stacked series and pies only. The point's percentage of the total.\n *\n * - **this.point (not shared) / this.points[i].point (shared)**:\n * The point object. The point name, if defined, is available through\n * `this.point.name`.\n *\n * - **this.points**:\n * In a shared tooltip, this is an array containing all other\n * properties for each point.\n *\n * - **this.series (not shared) / this.points[i].series (shared)**:\n * The series object. The series name is available through\n * `this.series.name`.\n *\n * - **this.total (not shared) / this.points[i].total (shared)**:\n * Stacked series only. The total value at this point's x value.\n *\n * - **this.x**:\n * The x value. This property is the same regardless of the tooltip\n * being shared or not.\n *\n * - **this.y (not shared) / this.points[i].y (shared)**:\n * The y value.\n *\n * @sample {highcharts} highcharts/tooltip/formatter-simple/\n * Simple string formatting\n * @sample {highcharts} highcharts/tooltip/formatter-shared/\n * Formatting with shared tooltip\n * @sample {highcharts|highstock} highcharts/tooltip/formatter-split/\n * Formatting with split tooltip\n * @sample highcharts/tooltip/formatter-conditional-default/\n * Extending default formatter\n * @sample {highstock} stock/tooltip/formatter/\n * Formatting with shared tooltip\n * @sample {highmaps} maps/tooltip/formatter/\n * String formatting\n *\n * @type {Highcharts.TooltipFormatterCallbackFunction}\n * @apioption tooltip.formatter\n */\n /**\n * Callback function to format the text of the tooltip for\n * visible null points.\n * Works analogously to [formatter](#tooltip.formatter).\n *\n * @sample highcharts/plotoptions/series-nullformat\n * Format data label and tooltip for null point.\n *\n * @type {Highcharts.TooltipFormatterCallbackFunction}\n * @apioption tooltip.nullFormatter\n */\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. For small charts, this may result in clipping\n * or overlapping. When `true`, a separate SVG element is created and\n * overlaid on the page, allowing the tooltip to be aligned inside the\n * page itself.\n *\n * Defaults to `true` if `chart.scrollablePlotArea` is activated,\n * otherwise `false`.\n *\n * @sample highcharts/tooltip/outside\n * Small charts with tooltips outside\n *\n * @type {boolean|undefined}\n * @default undefined\n * @since 6.1.1\n * @apioption tooltip.outside\n */\n /**\n * A callback function for formatting the HTML output for a single point\n * in the tooltip. Like the `pointFormat` string, but with more\n * flexibility.\n *\n * @type {Highcharts.FormatterCallbackFunction}\n * @since 4.1.0\n * @context Highcharts.Point\n * @apioption tooltip.pointFormatter\n */\n /**\n * A callback function to place the tooltip in a custom position. The\n * callback receives three parameters: `labelWidth`, `labelHeight` and\n * `point`, where point contains values for `plotX` and `plotY` telling\n * where the reference point is in the plot area. Add `chart.plotLeft`\n * and `chart.plotTop` to get the full coordinates.\n *\n * To find the actual hovered `Point` instance, use\n * `this.chart.hoverPoint`. For shared or split tooltips, all the hover\n * points are available in `this.chart.hoverPoints`.\n *\n * Since v7, when [tooltip.split](#tooltip.split) option is enabled,\n * positioner is called for each of the boxes separately, including\n * xAxis header. xAxis header is not a point, instead `point` argument\n * contains info: `{ plotX: Number, plotY: Number, isHeader: Boolean }`\n *\n * The return should be an object containing x and y values, for example\n * `{ x: 100, y: 100 }`.\n *\n * @sample {highcharts} highcharts/tooltip/positioner/\n * A fixed tooltip position\n * @sample {highstock} stock/tooltip/positioner/\n * A fixed tooltip position on top of the chart\n * @sample {highmaps} maps/tooltip/positioner/\n * A fixed tooltip position\n * @sample {highstock} stock/tooltip/split-positioner/\n * Split tooltip with fixed positions\n * @sample {highstock} stock/tooltip/positioner-scrollable-plotarea/\n * Scrollable plot area combined with tooltip positioner\n *\n * @type {Highcharts.TooltipPositionerCallbackFunction}\n * @since 2.2.4\n * @apioption tooltip.positioner\n */\n /**\n * Split the tooltip into one label per series, with the header close\n * to the axis. This is recommended over [shared](#tooltip.shared)\n * tooltips for charts with multiple line series, generally making them\n * easier to read. This option takes precedence over `tooltip.shared`.\n *\n * @productdesc {highstock} In Highcharts Stock, tooltips are split\n * by default since v6.0.0. Stock charts typically contain\n * multi-dimension points and multiple panes, making split tooltips\n * the preferred layout over\n * the previous `shared` tooltip.\n *\n * @sample highcharts/tooltip/split/\n * Split tooltip\n * @sample {highcharts|highstock} highcharts/tooltip/formatter-split/\n * Split tooltip and custom formatter callback\n *\n * @type {boolean}\n * @default {highcharts} false\n * @default {highstock} true\n * @since 5.0.0\n * @product highcharts highstock\n * @apioption tooltip.split\n */\n /**\n * Prevents the tooltip from switching or closing, when touched or\n * pointed.\n *\n * @sample highcharts/tooltip/stickoncontact/\n * Tooltip sticks on pointer contact\n *\n * @type {boolean}\n * @since 8.0.1\n * @apioption tooltip.stickOnContact\n */\n /**\n * Use HTML to render the contents of the tooltip instead of SVG. Using\n * HTML allows advanced formatting like tables and images in the\n * tooltip. It is also recommended for rtl languages as it works around\n * rtl bugs in early Firefox.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/footerformat/\n * A table for value alignment\n * @sample {highcharts|highstock} highcharts/tooltip/fullhtml/\n * Full HTML tooltip\n * @sample {highmaps} maps/tooltip/usehtml/\n * Pure HTML tooltip\n *\n * @type {boolean}\n * @default false\n * @since 2.2\n * @apioption tooltip.useHTML\n */\n /**\n * How many decimals to show in each series' y value. This is\n * overridable in each series' tooltip options object. The default is to\n * preserve all decimals.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n * @sample {highmaps} maps/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n *\n * @type {number|undefined}\n * @since 2.2\n * @apioption tooltip.valueDecimals\n */\n /**\n * A string to prepend to each series' y value. Overridable in each\n * series' tooltip options object.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n * @sample {highmaps} maps/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n *\n * @type {string}\n * @since 2.2\n * @apioption tooltip.valuePrefix\n */\n /**\n * A string to append to each series' y value. Overridable in each\n * series' tooltip options object.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n * @sample {highmaps} maps/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n *\n * @type {string}\n * @since 2.2\n * @apioption tooltip.valueSuffix\n */\n /**\n * The format for the date in the tooltip header if the X axis is a\n * datetime axis. The default is a best guess based on the smallest\n * distance between points in the chart.\n *\n * @sample {highcharts} highcharts/tooltip/xdateformat/\n * A different format\n *\n * @type {string}\n * @product highcharts highstock gantt\n * @apioption tooltip.xDateFormat\n */\n /**\n * How many decimals to show for the `point.change`\n * or the `point.cumulativeSum` value when the `series.compare`\n * or the `series.cumulative` option is set.\n * This is overridable in each series' tooltip options object.\n *\n * @type {number}\n * @default 2\n * @since 1.0.1\n * @product highstock\n * @apioption tooltip.changeDecimals\n */\n /**\n * Enable or disable the tooltip.\n *\n * @sample {highcharts} highcharts/tooltip/enabled/\n * Disabled\n * @sample {highcharts} highcharts/plotoptions/series-point-events-mouseover/\n * Disable tooltip and show values on chart instead\n */\n enabled: true,\n /**\n * Enable or disable animation of the tooltip.\n *\n * @type {boolean}\n * @default true\n * @since 2.3.0\n */\n animation: svg,\n /**\n * The radius of the rounded border corners.\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/\n * 5px by default\n * @sample {highcharts} highcharts/tooltip/borderradius-0/\n * Square borders\n * @sample {highmaps} maps/tooltip/background-border/\n * Background and border demo\n */\n borderRadius: 3,\n /**\n * For series on datetime axes, the date format in the tooltip's\n * header will by default be guessed based on the closest data points.\n * This member gives the default string representations used for\n * each unit. For an overview of the replacement codes, see\n * [dateFormat](/class-reference/Highcharts.Time#dateFormat).\n *\n * @see [xAxis.dateTimeLabelFormats](#xAxis.dateTimeLabelFormats)\n *\n * @type {Highcharts.Dictionary}\n * @product highcharts highstock gantt\n */\n dateTimeLabelFormats: {\n /** @internal */\n millisecond: '%A, %b %e, %H:%M:%S.%L',\n /** @internal */\n second: '%A, %b %e, %H:%M:%S',\n /** @internal */\n minute: '%A, %b %e, %H:%M',\n /** @internal */\n hour: '%A, %b %e, %H:%M',\n /** @internal */\n day: '%A, %b %e, %Y',\n /** @internal */\n week: 'Week from %A, %b %e, %Y',\n /** @internal */\n month: '%B %Y',\n /** @internal */\n year: '%Y'\n },\n /**\n * A string to append to the tooltip format.\n *\n * @sample {highcharts} highcharts/tooltip/footerformat/\n * A table for value alignment\n * @sample {highmaps} maps/tooltip/format/\n * Format demo\n *\n * @since 2.2\n */\n footerFormat: '',\n /**\n * The name of a symbol to use for the border around the tooltip\n * header. Applies only when [tooltip.split](#tooltip.split) is\n * enabled.\n *\n * Custom callbacks for symbol path generation can also be added to\n * `Highcharts.SVGRenderer.prototype.symbols` the same way as for\n * [series.marker.symbol](plotOptions.line.marker.symbol).\n *\n * @see [tooltip.shape](#tooltip.shape)\n *\n * @sample {highstock} stock/tooltip/split-positioner/\n * Different shapes for header and split boxes\n *\n * @type {Highcharts.TooltipShapeValue}\n * @validvalue [\"callout\", \"square\"]\n * @since 7.0\n */\n headerShape: 'callout',\n /**\n * The number of milliseconds to wait until the tooltip is hidden when\n * mouse out from a point or chart.\n *\n * @since 3.0\n */\n hideDelay: 500,\n /**\n * Padding inside the tooltip, in pixels.\n *\n * @since 5.0.0\n */\n padding: 8,\n /**\n * The name of a symbol to use for the border around the tooltip. Can\n * be one of: `\"callout\"`, `\"circle\"` or `\"rect\"`. When\n * [tooltip.split](#tooltip.split)\n * option is enabled, shape is applied to all boxes except header, which\n * is controlled by\n * [tooltip.headerShape](#tooltip.headerShape).\n *\n * Custom callbacks for symbol path generation can also be added to\n * `Highcharts.SVGRenderer.prototype.symbols` the same way as for\n * [series.marker.symbol](plotOptions.line.marker.symbol).\n *\n * @type {Highcharts.TooltipShapeValue}\n * @since 4.0\n */\n shape: 'callout',\n /**\n * When the tooltip is shared, the entire plot area will capture mouse\n * movement or touch events. Tooltip texts for series types with ordered\n * data (not pie, scatter, flags etc) will be shown in a single bubble.\n * This is recommended for single series charts and for tablet/mobile\n * optimized charts.\n *\n * See also [tooltip.split](#tooltip.split), that is better suited for\n * charts with many series, especially line-type series. The\n * `tooltip.split` option takes precedence over `tooltip.shared`.\n *\n * @sample {highcharts} highcharts/tooltip/shared-false/\n * False by default\n * @sample {highcharts} highcharts/tooltip/shared-true/\n * True\n * @sample {highcharts} highcharts/tooltip/shared-x-crosshair/\n * True with x axis crosshair\n * @sample {highcharts} highcharts/tooltip/shared-true-mixed-types/\n * True with mixed series types\n *\n * @since 2.1\n * @product highcharts highstock\n */\n shared: false,\n /**\n * Proximity snap for graphs or single points. It defaults to 10 for\n * mouse-powered devices and 25 for touch devices.\n *\n * Note that in most cases the whole plot area captures the mouse\n * movement, and in these cases `tooltip.snap` doesn't make sense. This\n * applies when [stickyTracking](#plotOptions.series.stickyTracking)\n * is `true` (default) and when the tooltip is [shared](#tooltip.shared)\n * or [split](#tooltip.split).\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/\n * 10 px by default\n * @sample {highcharts} highcharts/tooltip/snap-50/\n * 50 px on graph\n *\n * @type {number}\n * @default 10/25\n * @since 1.2.0\n * @product highcharts highstock\n */\n snap: isTouchDevice ? 25 : 10,\n /**\n * The HTML of the tooltip header line. Variables are enclosed by\n * curly brackets. Available variables are `point.key`, `series.name`,\n * `series.color` and other members from the `point` and `series`\n * objects. The `point.key` variable contains the category name, x\n * value or datetime string depending on the type of axis. For datetime\n * axes, the `point.key` date format can be set using\n * `tooltip.xDateFormat`.\n *\n * @sample {highcharts} highcharts/tooltip/footerformat/\n * An HTML table in the tooltip\n * @sample {highstock} highcharts/tooltip/footerformat/\n * An HTML table in the tooltip\n * @sample {highmaps} maps/tooltip/format/\n * Format demo\n *\n * @type {string}\n * @apioption tooltip.headerFormat\n */\n headerFormat: '{point.key}
',\n /**\n * The HTML of the null point's line in the tooltip. Works analogously\n * to [pointFormat](#tooltip.pointFormat).\n *\n * @sample {highcharts} highcharts/plotoptions/series-nullformat\n * Format data label and tooltip for null point.\n *\n * @type {string}\n * @apioption tooltip.nullFormat\n */\n /**\n * The HTML of the point's line in the tooltip. Variables are enclosed\n * by curly brackets. Available variables are `point.x`, `point.y`,\n * `series.name` and `series.color` and other properties on the same\n * form. Furthermore, `point.y` can be extended by the\n * `tooltip.valuePrefix` and `tooltip.valueSuffix` variables. This can\n * also be overridden for each series, which makes it a good hook for\n * displaying units.\n *\n * In styled mode, the dot is colored by a class name rather\n * than the point color.\n *\n * @sample {highcharts} highcharts/tooltip/pointformat/\n * A different point format with value suffix\n * @sample {highcharts|highstock} highcharts/tooltip/pointformat-extra-information/\n * Show extra information about points in the tooltip\n * @sample {highmaps} maps/tooltip/format/\n * Format demo\n *\n * @type {string}\n * @since 2.2\n * @apioption tooltip.pointFormat\n */\n pointFormat: '\\u25CF {series.name}: {point.y}
',\n /**\n * The background color or gradient for the tooltip.\n *\n * In styled mode, the stroke width is set in the\n * `.highcharts-tooltip-box` class.\n *\n * @sample {highcharts} highcharts/tooltip/backgroundcolor-solid/\n * Yellowish background\n * @sample {highcharts} highcharts/tooltip/backgroundcolor-gradient/\n * Gradient\n * @sample {highcharts} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n * @sample {highstock} stock/tooltip/general/\n * Custom tooltip\n * @sample {highstock} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n * @sample {highmaps} maps/tooltip/background-border/\n * Background and border demo\n * @sample {highmaps} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n backgroundColor: color(\"#f7f7f7\" /* Palette.neutralColor3 */)\n // @todo: Disallow undefined as input for colors\n .setOpacity(0.85).get(),\n /**\n * The pixel width of the tooltip border.\n *\n * In styled mode, the stroke width is set in the\n * `.highcharts-tooltip-box` class.\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/\n * 2px by default\n * @sample {highcharts} highcharts/tooltip/borderwidth/\n * No border (shadow only)\n * @sample {highcharts} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n * @sample {highstock} stock/tooltip/general/\n * Custom tooltip\n * @sample {highstock} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n * @sample {highmaps} maps/tooltip/background-border/\n * Background and border demo\n * @sample {highmaps} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n */\n borderWidth: 1,\n /**\n * Whether to apply a drop shadow to the tooltip.\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/\n * True by default\n * @sample {highcharts} highcharts/tooltip/shadow/\n * False\n * @sample {highmaps} maps/tooltip/positioner/\n * Fixed tooltip position, border and shadow disabled\n *\n * @type {boolean|Highcharts.ShadowOptionsObject}\n */\n shadow: true,\n /**\n * Prevents the tooltip from switching or closing when touched or\n * pointed.\n *\n * @sample highcharts/tooltip/stickoncontact/\n * Tooltip sticks on pointer contact\n *\n * @since 8.0.1\n */\n stickOnContact: false,\n /**\n * CSS styles for the tooltip. The tooltip can also be styled through\n * the CSS class `.highcharts-tooltip`.\n *\n * Note that the default `pointerEvents` style makes the tooltip ignore\n * mouse events, so in order to use clickable tooltips, this value must\n * be set to `auto`.\n *\n * @sample {highcharts} highcharts/tooltip/style/\n * Greater padding, bold text\n *\n * @type {Highcharts.CSSObject}\n */\n style: {\n /** @internal */\n color: \"#333333\" /* Palette.neutralColor80 */,\n /** @internal */\n cursor: 'default',\n /** @internal */\n fontSize: '12px',\n /** @internal */\n whiteSpace: 'nowrap'\n },\n /**\n * Use HTML to render the contents of the tooltip instead of SVG. Using\n * HTML allows advanced formatting like tables and images in the\n * tooltip. It is also recommended for rtl languages as it works around\n * rtl bugs in early Firefox.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/footerformat/\n * A table for value alignment\n * @sample {highcharts|highstock} highcharts/tooltip/fullhtml/\n * Full HTML tooltip\n * @sample {highmaps} maps/tooltip/usehtml/\n * Pure HTML tooltip\n *\n * @since 2.2\n */\n useHTML: false\n },\n /**\n * Highchart by default puts a credits label in the lower right corner\n * of the chart. This can be changed using these options.\n */\n credits: {\n /**\n * Credits for map source to be concatenated with conventional credit\n * text. By default this is a format string that collects copyright\n * information from the map if available.\n *\n * @see [mapTextFull](#credits.mapTextFull)\n * @see [text](#credits.text)\n *\n * @type {string}\n * @default \\u00a9 {geojson.copyrightShort}\n * @since 4.2.2\n * @product highmaps\n * @apioption credits.mapText\n */\n /**\n * Detailed credits for map source to be displayed on hover of credits\n * text. By default this is a format string that collects copyright\n * information from the map if available.\n *\n * @see [mapText](#credits.mapText)\n * @see [text](#credits.text)\n *\n * @type {string}\n * @default {geojson.copyright}\n * @since 4.2.2\n * @product highmaps\n * @apioption credits.mapTextFull\n */\n /**\n * Whether to show the credits text.\n *\n * @sample {highcharts} highcharts/credits/enabled-false/\n * Credits disabled\n * @sample {highstock} stock/credits/enabled/\n * Credits disabled\n * @sample {highmaps} maps/credits/enabled-false/\n * Credits disabled\n */\n enabled: true,\n /**\n * The URL for the credits label.\n *\n * @sample {highcharts} highcharts/credits/href/\n * Custom URL and text\n * @sample {highmaps} maps/credits/customized/\n * Custom URL and text\n */\n href: 'https://www.highcharts.com?credits',\n /**\n * Position configuration for the credits label.\n *\n * @sample {highcharts} highcharts/credits/position-left/\n * Left aligned\n * @sample {highcharts} highcharts/credits/position-left/\n * Left aligned\n * @sample {highmaps} maps/credits/customized/\n * Left aligned\n * @sample {highmaps} maps/credits/customized/\n * Left aligned\n *\n * @type {Highcharts.AlignObject}\n * @since 2.1\n */\n position: {\n /** @internal */\n align: 'right',\n /** @internal */\n x: -10,\n /** @internal */\n verticalAlign: 'bottom',\n /** @internal */\n y: -5\n },\n /**\n * CSS styles for the credits label.\n *\n * @see In styled mode, credits styles can be set with the\n * `.highcharts-credits` class.\n *\n * @type {Highcharts.CSSObject}\n */\n style: {\n /** @internal */\n cursor: 'pointer',\n /** @internal */\n color: \"#999999\" /* Palette.neutralColor40 */,\n /** @internal */\n fontSize: '9px'\n },\n /**\n * The text for the credits label.\n *\n * @productdesc {highmaps}\n * If a map is loaded as GeoJSON, the text defaults to\n * `Highcharts @ {map-credits}`. Otherwise, it defaults to\n * `Highcharts.com`.\n *\n * @sample {highcharts} highcharts/credits/href/\n * Custom URL and text\n * @sample {highmaps} maps/credits/customized/\n * Custom URL and text\n */\n text: 'Highcharts.com'\n }\n };\n /* eslint-disable spaced-comment */\n\n defaultOptions.chart.styledMode = false;\n\n '';\n var defaultTime = new Time(merge(defaultOptions.global,\n defaultOptions.time));\n /**\n * Get the updated default options. Until 3.0.7, merely exposing defaultOptions\n * for outside modules wasn't enough because the setOptions method created a new\n * object.\n *\n * @function Highcharts.getOptions\n *\n * @return {Highcharts.Options}\n * Default options.\n */\n function getOptions() {\n return defaultOptions;\n }\n /**\n * Merge the default options with custom options and return the new options\n * structure. Commonly used for defining reusable templates.\n *\n * @sample highcharts/global/useutc-false Setting a global option\n * @sample highcharts/members/setoptions Applying a global theme\n *\n * @function Highcharts.setOptions\n *\n * @param {Highcharts.Options} options\n * The new custom chart options.\n *\n * @return {Highcharts.Options}\n * Updated options.\n */\n function setOptions(options) {\n // Copy in the default options\n merge(true, defaultOptions, options);\n // Update the time object\n if (options.time || options.global) {\n if (H.time) {\n H.time.update(merge(defaultOptions.global, defaultOptions.time, options.global, options.time));\n }\n else {\n /**\n * Global `Time` object with default options. Since v6.0.5, time\n * settings can be applied individually for each chart. If no\n * individual settings apply, this `Time` object is shared by all\n * instances.\n *\n * @name Highcharts.time\n * @type {Highcharts.Time}\n */\n H.time = defaultTime;\n }\n }\n return defaultOptions;\n }\n /* *\n *\n * Default Export\n *\n * */\n var DefaultOptions = {\n defaultOptions: defaultOptions,\n defaultTime: defaultTime,\n getOptions: getOptions,\n setOptions: setOptions\n };\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * @typedef {\"plotBox\"|\"spacingBox\"} Highcharts.ButtonRelativeToValue\n */\n /**\n * Gets fired when a series is added to the chart after load time, using the\n * `addSeries` method. Returning `false` prevents the series from being added.\n *\n * @callback Highcharts.ChartAddSeriesCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occured.\n *\n * @param {Highcharts.ChartAddSeriesEventObject} event\n * The event that occured.\n */\n /**\n * Contains common event information. Through the `options` property you can\n * access the series options that were passed to the `addSeries` method.\n *\n * @interface Highcharts.ChartAddSeriesEventObject\n */ /**\n * The series options that were passed to the `addSeries` method.\n * @name Highcharts.ChartAddSeriesEventObject#options\n * @type {Highcharts.SeriesOptionsType}\n */ /**\n * Prevents the default behaviour of the event.\n * @name Highcharts.ChartAddSeriesEventObject#preventDefault\n * @type {Function}\n */ /**\n * The event target.\n * @name Highcharts.ChartAddSeriesEventObject#target\n * @type {Highcharts.Chart}\n */ /**\n * The event type.\n * @name Highcharts.ChartAddSeriesEventObject#type\n * @type {\"addSeries\"}\n */\n /**\n * Gets fired when clicking on the plot background.\n *\n * @callback Highcharts.ChartClickCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occured.\n *\n * @param {Highcharts.PointerEventObject} event\n * The event that occured.\n */\n /**\n * Contains an axes of the clicked spot.\n *\n * @interface Highcharts.ChartClickEventAxisObject\n */ /**\n * Axis at the clicked spot.\n * @name Highcharts.ChartClickEventAxisObject#axis\n * @type {Highcharts.Axis}\n */ /**\n * Axis value at the clicked spot.\n * @name Highcharts.ChartClickEventAxisObject#value\n * @type {number}\n */\n /**\n * Contains information about the clicked spot on the chart. Remember the unit\n * of a datetime axis is milliseconds since 1970-01-01 00:00:00.\n *\n * @interface Highcharts.ChartClickEventObject\n * @extends Highcharts.PointerEventObject\n */ /**\n * Information about the x-axis on the clicked spot.\n * @name Highcharts.ChartClickEventObject#xAxis\n * @type {Array}\n */ /**\n * Information about the y-axis on the clicked spot.\n * @name Highcharts.ChartClickEventObject#yAxis\n * @type {Array}\n */ /**\n * Information about the z-axis on the clicked spot.\n * @name Highcharts.ChartClickEventObject#zAxis\n * @type {Array|undefined}\n */\n /**\n * Gets fired when the chart is finished loading.\n *\n * @callback Highcharts.ChartLoadCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occured.\n *\n * @param {global.Event} event\n * The event that occured.\n */\n /**\n * Fires when the chart is redrawn, either after a call to `chart.redraw()` or\n * after an axis, series or point is modified with the `redraw` option set to\n * `true`.\n *\n * @callback Highcharts.ChartRedrawCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occured.\n *\n * @param {global.Event} event\n * The event that occured.\n */\n /**\n * Gets fired after initial load of the chart (directly after the `load` event),\n * and after each redraw (directly after the `redraw` event).\n *\n * @callback Highcharts.ChartRenderCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occured.\n *\n * @param {global.Event} event\n * The event that occured.\n */\n /**\n * Gets fired when an area of the chart has been selected. The default action\n * for the selection event is to zoom the chart to the selected area. It can be\n * prevented by calling `event.preventDefault()` or return false.\n *\n * @callback Highcharts.ChartSelectionCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occured.\n *\n * @param {Highcharts.SelectEventObject} event\n * Event informations\n *\n * @return {boolean|undefined}\n * Return false to prevent the default action, usually zoom.\n */\n (''); // detach doclets above\n\n return DefaultOptions;\n });\n _registerModule(_modules, 'Core/Animation/Fx.js', [_modules['Core/Color/Color.js'], _modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (Color, H, U) {\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 var color = Color.parse;\n var win = H.win;\n var isNumber = U.isNumber,\n objectEach = U.objectEach;\n /* eslint-disable no-invalid-this, valid-jsdoc */\n /* *\n *\n * Class\n *\n * */\n /**\n * An animator object used internally. One instance applies to one property\n * (attribute or style prop) on one element. Animation is always initiated\n * through {@link SVGElement#animate}.\n *\n * @example\n * let rect = renderer.rect(0, 0, 10, 10).add();\n * rect.animate({ width: 100 });\n *\n * @private\n * @class\n * @name Highcharts.Fx\n *\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGElement} elem\n * The element to animate.\n *\n * @param {Partial} options\n * Animation options.\n *\n * @param {string} prop\n * The single attribute or CSS property to animate.\n */\n var Fx = /** @class */ (function () {\n /* *\n *\n * Constructors\n *\n * */\n function Fx(elem, options, prop) {\n this.pos = NaN;\n this.options = options;\n this.elem = elem;\n this.prop = prop;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Set the current step of a path definition on SVGElement.\n *\n * @function Highcharts.Fx#dSetter\n *\n */\n Fx.prototype.dSetter = function () {\n var paths = this.paths,\n start = paths && paths[0],\n end = paths && paths[1],\n now = this.now || 0;\n var path = [];\n // Land on the final path without adjustment points appended in the ends\n if (now === 1 || !start || !end) {\n path = this.toD || [];\n }\n else if (start.length === end.length && now < 1) {\n for (var i = 0; i < end.length; i++) {\n // Tween between the start segment and the end segment. Start\n // with a copy of the end segment and tween the appropriate\n // numerics\n var startSeg = start[i];\n var endSeg = end[i];\n var tweenSeg = [];\n for (var j = 0; j < endSeg.length; j++) {\n var startItem = startSeg[j];\n var endItem = endSeg[j];\n // Tween numbers\n if (isNumber(startItem) &&\n isNumber(endItem) &&\n // Arc boolean flags\n !(endSeg[0] === 'A' && (j === 4 || j === 5))) {\n tweenSeg[j] = startItem + now * (endItem - startItem);\n // Strings, take directly from the end segment\n }\n else {\n tweenSeg[j] = endItem;\n }\n }\n path.push(tweenSeg);\n }\n // If animation is finished or length not matching, land on right value\n }\n else {\n path = end;\n }\n this.elem.attr('d', path, void 0, true);\n };\n /**\n * Update the element with the current animation step.\n *\n * @function Highcharts.Fx#update\n *\n */\n Fx.prototype.update = function () {\n var elem = this.elem,\n prop = this.prop, // if destroyed, it is null\n now = this.now,\n step = this.options.step;\n // Animation setter defined from outside\n if (this[prop + 'Setter']) {\n this[prop + 'Setter']();\n // Other animations on SVGElement\n }\n else if (elem.attr) {\n if (elem.element) {\n elem.attr(prop, now, null, true);\n }\n // HTML styles, raw HTML content like container size\n }\n else {\n elem.style[prop] = now + this.unit;\n }\n if (step) {\n step.call(elem, now, this);\n }\n };\n /**\n * Run an animation.\n *\n * @function Highcharts.Fx#run\n *\n * @param {number} from\n * The current value, value to start from.\n *\n * @param {number} to\n * The end value, value to land on.\n *\n * @param {string} unit\n * The property unit, for example `px`.\n *\n */\n Fx.prototype.run = function (from, to, unit) {\n var self = this,\n options = self.options,\n timer = function (gotoEnd) {\n return timer.stopped ? false : self.step(gotoEnd);\n }, requestAnimationFrame = win.requestAnimationFrame ||\n function (step) {\n setTimeout(step, 13);\n }, step = function () {\n for (var i = 0; i < Fx.timers.length; i++) {\n if (!Fx.timers[i]()) {\n Fx.timers.splice(i--, 1);\n }\n }\n if (Fx.timers.length) {\n requestAnimationFrame(step);\n }\n };\n if (from === to && !this.elem['forceAnimate:' + this.prop]) {\n delete options.curAnim[this.prop];\n if (options.complete &&\n Object.keys(options.curAnim).length === 0) {\n options.complete.call(this.elem);\n }\n }\n else { // #7166\n this.startTime = +new Date();\n this.start = from;\n this.end = to;\n this.unit = unit;\n this.now = this.start;\n this.pos = 0;\n timer.elem = this.elem;\n timer.prop = this.prop;\n if (timer() && Fx.timers.push(timer) === 1) {\n requestAnimationFrame(step);\n }\n }\n };\n /**\n * Run a single step in the animation.\n *\n * @function Highcharts.Fx#step\n *\n * @param {boolean} [gotoEnd]\n * Whether to go to the endpoint of the animation after abort.\n *\n * @return {boolean}\n * Returns `true` if animation continues.\n */\n Fx.prototype.step = function (gotoEnd) {\n var t = +new Date(),\n options = this.options,\n elem = this.elem,\n complete = options.complete,\n duration = options.duration,\n curAnim = options.curAnim;\n var ret,\n done;\n if ((elem.attr) && !elem.element) { // #2616, element is destroyed\n ret = false;\n }\n else if (gotoEnd || t >= duration + this.startTime) {\n this.now = this.end;\n this.pos = 1;\n this.update();\n curAnim[this.prop] = true;\n done = true;\n objectEach(curAnim, function (val) {\n if (val !== true) {\n done = false;\n }\n });\n if (done && complete) {\n complete.call(elem);\n }\n ret = false;\n }\n else {\n this.pos = options.easing((t - this.startTime) / duration);\n this.now = this.start + ((this.end -\n this.start) * this.pos);\n this.update();\n ret = true;\n }\n return ret;\n };\n /**\n * Prepare start and end values so that the path can be animated one to one.\n *\n * @function Highcharts.Fx#initPath\n *\n * @param {Highcharts.SVGElement} elem\n * The SVGElement item.\n *\n * @param {Highcharts.SVGPathArray|undefined} fromD\n * Starting path definition.\n *\n * @param {Highcharts.SVGPathArray} toD\n * Ending path definition.\n *\n * @return {Array}\n * An array containing start and end paths in array form so that\n * they can be animated in parallel.\n */\n Fx.prototype.initPath = function (elem, fromD, toD) {\n var startX = elem.startX,\n endX = elem.endX,\n end = toD.slice(), // copy\n isArea = elem.isArea,\n positionFactor = isArea ? 2 : 1;\n var shift,\n fullLength,\n i,\n reverse,\n start = fromD && fromD.slice(); // copy\n if (!start) {\n return [end,\n end];\n }\n /**\n * If shifting points, prepend a dummy point to the end path.\n * @private\n */\n function prepend(arr, other) {\n while (arr.length < fullLength) {\n // Move to, line to or curve to?\n var moveSegment = arr[0],\n otherSegment = other[fullLength - arr.length];\n if (otherSegment && moveSegment[0] === 'M') {\n if (otherSegment[0] === 'C') {\n arr[0] = [\n 'C',\n moveSegment[1],\n moveSegment[2],\n moveSegment[1],\n moveSegment[2],\n moveSegment[1],\n moveSegment[2]\n ];\n }\n else {\n arr[0] = ['L', moveSegment[1], moveSegment[2]];\n }\n }\n // Prepend a copy of the first point\n arr.unshift(moveSegment);\n // For areas, the bottom path goes back again to the left, so we\n // need to append a copy of the last point.\n if (isArea) {\n var z = arr.pop();\n arr.push(arr[arr.length - 1], z); // append point and the Z\n }\n }\n }\n /**\n * Copy and append last point until the length matches the end length.\n * @private\n */\n function append(arr, other) {\n while (arr.length < fullLength) {\n // Pull out the slice that is going to be appended or inserted.\n // In a line graph, the positionFactor is 1, and the last point\n // is sliced out. In an area graph, the positionFactor is 2,\n // causing the middle two points to be sliced out, since an area\n // path starts at left, follows the upper path then turns and\n // follows the bottom back.\n var segmentToAdd = arr[Math.floor(arr.length / positionFactor) - 1].slice();\n // Disable the first control point of curve segments\n if (segmentToAdd[0] === 'C') {\n segmentToAdd[1] = segmentToAdd[5];\n segmentToAdd[2] = segmentToAdd[6];\n }\n if (!isArea) {\n arr.push(segmentToAdd);\n }\n else {\n var lowerSegmentToAdd = arr[Math.floor(arr.length / positionFactor)].slice();\n arr.splice(arr.length / 2, 0, segmentToAdd, lowerSegmentToAdd);\n }\n }\n }\n // For sideways animation, find out how much we need to shift to get the\n // start path Xs to match the end path Xs.\n if (startX && endX && endX.length) {\n for (i = 0; i < startX.length; i++) {\n // Moving left, new points coming in on right\n if (startX[i] === endX[0]) {\n shift = i;\n break;\n // Moving right\n }\n else if (startX[0] ===\n endX[endX.length - startX.length + i]) {\n shift = i;\n reverse = true;\n break;\n // Fixed from the right side, \"scaling\" left\n }\n else if (startX[startX.length - 1] ===\n endX[endX.length - startX.length + i]) {\n shift = startX.length - i;\n break;\n }\n }\n if (typeof shift === 'undefined') {\n start = [];\n }\n }\n if (start.length && isNumber(shift)) {\n // The common target length for the start and end array, where both\n // arrays are padded in opposite ends\n fullLength = end.length + shift * positionFactor;\n if (!reverse) {\n prepend(end, start);\n append(start, end);\n }\n else {\n prepend(start, end);\n append(end, start);\n }\n }\n return [start, end];\n };\n /**\n * Handle animation of the color attributes directly.\n *\n * @function Highcharts.Fx#fillSetter\n *\n */\n Fx.prototype.fillSetter = function () {\n Fx.prototype.strokeSetter.apply(this, arguments);\n };\n /**\n * Handle animation of the color attributes directly.\n *\n * @function Highcharts.Fx#strokeSetter\n *\n */\n Fx.prototype.strokeSetter = function () {\n this.elem.attr(this.prop, color(this.start).tweenTo(color(this.end), this.pos), void 0, true);\n };\n /* *\n *\n * Static Properties\n *\n * */\n Fx.timers = [];\n return Fx;\n }());\n /* *\n *\n * Default Export\n *\n * */\n\n return Fx;\n });\n _registerModule(_modules, 'Core/Animation/AnimationUtilities.js', [_modules['Core/Animation/Fx.js'], _modules['Core/Utilities.js']], function (Fx, U) {\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 var defined = U.defined,\n getStyle = U.getStyle,\n isArray = U.isArray,\n isNumber = U.isNumber,\n isObject = U.isObject,\n merge = U.merge,\n objectEach = U.objectEach,\n pick = U.pick;\n /* *\n *\n * Functions\n *\n * */\n /**\n * Set the global animation to either a given value, or fall back to the given\n * chart's animation option.\n *\n * @function Highcharts.setAnimation\n *\n * @param {boolean|Partial|undefined} animation\n * The animation object.\n *\n * @param {Highcharts.Chart} chart\n * The chart instance.\n *\n * @todo\n * This function always relates to a chart, and sets a property on the renderer,\n * so it should be moved to the SVGRenderer.\n */\n function setAnimation(animation, chart) {\n chart.renderer.globalAnimation = pick(animation, chart.options.chart.animation, true);\n }\n /**\n * Get the animation in object form, where a disabled animation is always\n * returned as `{ duration: 0 }`.\n *\n * @function Highcharts.animObject\n *\n * @param {boolean|Highcharts.AnimationOptionsObject} [animation=0]\n * An animation setting. Can be an object with duration, complete and\n * easing properties, or a boolean to enable or disable.\n *\n * @return {Highcharts.AnimationOptionsObject}\n * An object with at least a duration property.\n */\n function animObject(animation) {\n return isObject(animation) ?\n merge({ duration: 500, defer: 0 }, animation) :\n { duration: animation ? 500 : 0, defer: 0 };\n }\n /**\n * Get the defer as a number value from series animation options.\n *\n * @function Highcharts.getDeferredAnimation\n *\n * @param {Highcharts.Chart} chart\n * The chart instance.\n *\n * @param {boolean|Highcharts.AnimationOptionsObject} animation\n * An animation setting. Can be an object with duration, complete and\n * easing properties, or a boolean to enable or disable.\n *\n * @param {Highcharts.Series} [series]\n * Series to defer animation.\n *\n * @return {number}\n * The numeric value.\n */\n function getDeferredAnimation(chart, animation, series) {\n var labelAnimation = animObject(animation),\n s = series ? [series] : chart.series;\n var defer = 0,\n duration = 0;\n s.forEach(function (series) {\n var seriesAnim = animObject(series.options.animation);\n defer = animation && defined(animation.defer) ?\n labelAnimation.defer :\n Math.max(defer, seriesAnim.duration + seriesAnim.defer);\n duration = Math.min(labelAnimation.duration, seriesAnim.duration);\n });\n // Disable defer for exporting\n if (chart.renderer.forExport) {\n defer = 0;\n }\n var anim = {\n defer: Math.max(0,\n defer - duration),\n duration: Math.min(defer,\n duration)\n };\n return anim;\n }\n /**\n * The global animate method, which uses Fx to create individual animators.\n *\n * @function Highcharts.animate\n *\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGElement} el\n * The element to animate.\n *\n * @param {Highcharts.CSSObject|Highcharts.SVGAttributes} params\n * An object containing key-value pairs of the properties to animate.\n * Supports numeric as pixel-based CSS properties for HTML objects and\n * attributes for SVGElements.\n *\n * @param {Partial} [opt]\n * Animation options.\n *\n * @return {void}\n */\n function animate(el, params, opt) {\n var start,\n unit = '',\n end,\n fx,\n args;\n if (!isObject(opt)) { // Number or undefined/null\n args = arguments;\n opt = {\n duration: args[2],\n easing: args[3],\n complete: args[4]\n };\n }\n if (!isNumber(opt.duration)) {\n opt.duration = 400;\n }\n opt.easing = typeof opt.easing === 'function' ?\n opt.easing :\n (Math[opt.easing] || Math.easeInOutSine);\n opt.curAnim = merge(params);\n objectEach(params, function (val, prop) {\n // Stop current running animation of this property\n stop(el, prop);\n fx = new Fx(el, opt, prop);\n end = void 0;\n if (prop === 'd' && isArray(params.d)) {\n fx.paths = fx.initPath(el, el.pathArray, params.d);\n fx.toD = params.d;\n start = 0;\n end = 1;\n }\n else if (el.attr) {\n start = el.attr(prop);\n }\n else {\n start = parseFloat(getStyle(el, prop)) || 0;\n if (prop !== 'opacity') {\n unit = 'px';\n }\n }\n if (!end) {\n end = val;\n }\n if (typeof end === 'string' && end.match('px')) {\n end = end.replace(/px/g, ''); // #4351\n }\n fx.run(start, end, unit);\n });\n }\n /**\n * Stop running animation.\n *\n * @function Highcharts.stop\n *\n * @param {Highcharts.SVGElement} el\n * The SVGElement to stop animation on.\n *\n * @param {string} [prop]\n * The property to stop animating. If given, the stop method will stop a\n * single property from animating, while others continue.\n *\n * @return {void}\n *\n * @todo\n * A possible extension to this would be to stop a single property, when\n * we want to continue animating others. Then assign the prop to the timer\n * in the Fx.run method, and check for the prop here. This would be an\n * improvement in all cases where we stop the animation from .attr. Instead of\n * stopping everything, we can just stop the actual attributes we're setting.\n */\n function stop(el, prop) {\n var i = Fx.timers.length;\n // Remove timers related to this element (#4519)\n while (i--) {\n if (Fx.timers[i].elem === el && (!prop || prop === Fx.timers[i].prop)) {\n Fx.timers[i].stopped = true; // #4667\n }\n }\n }\n var animationExports = {\n animate: animate,\n animObject: animObject,\n getDeferredAnimation: getDeferredAnimation,\n setAnimation: setAnimation,\n stop: stop\n };\n /* *\n *\n * Default Export\n *\n * */\n\n return animationExports;\n });\n _registerModule(_modules, 'Core/Renderer/HTML/AST.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (H, U) {\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 var SVG_NS = H.SVG_NS,\n win = H.win;\n var attr = U.attr,\n createElement = U.createElement,\n css = U.css,\n error = U.error,\n isFunction = U.isFunction,\n isString = U.isString,\n objectEach = U.objectEach,\n splat = U.splat;\n var trustedTypes = win.trustedTypes;\n /* *\n *\n * Constants\n *\n * */\n // Create the trusted type policy. This should not be exposed.\n var trustedTypesPolicy = (trustedTypes &&\n isFunction(trustedTypes.createPolicy) &&\n trustedTypes.createPolicy('highcharts', {\n createHTML: function (s) { return s; }\n }));\n var emptyHTML = trustedTypesPolicy ?\n trustedTypesPolicy.createHTML('') :\n '';\n // In IE8, DOMParser is undefined. IE9 and PhantomJS are only able to parse XML.\n var hasValidDOMParser = (function () {\n try {\n return Boolean(new DOMParser().parseFromString(emptyHTML, 'text/html'));\n }\n catch (e) {\n return false;\n }\n }());\n /* *\n *\n * Class\n *\n * */\n /**\n * The AST class represents an abstract syntax tree of HTML or SVG content. It\n * can take HTML as an argument, parse it, optionally transform it to SVG, then\n * perform sanitation before inserting it into the DOM.\n *\n * @class\n * @name Highcharts.AST\n *\n * @param {string|Array} source\n * Either an HTML string or an ASTNode list to populate the tree.\n */\n var AST = /** @class */ (function () {\n /* *\n *\n * Constructor\n *\n * */\n // Construct an AST from HTML markup, or wrap an array of existing AST nodes\n function AST(source) {\n this.nodes = typeof source === 'string' ?\n this.parseMarkup(source) : source;\n }\n /* *\n *\n * Static Functions\n *\n * */\n /**\n * Filter an object of SVG or HTML attributes against the allow list.\n *\n * @static\n *\n * @function Highcharts.AST#filterUserAttributes\n *\n * @param {Highcharts.SVGAttributes} attributes The attributes to filter\n *\n * @return {Highcharts.SVGAttributes}\n * The filtered attributes\n */\n AST.filterUserAttributes = function (attributes) {\n objectEach(attributes, function (val, key) {\n var valid = true;\n if (AST.allowedAttributes.indexOf(key) === -1) {\n valid = false;\n }\n if (['background', 'dynsrc', 'href', 'lowsrc', 'src']\n .indexOf(key) !== -1) {\n valid = isString(val) && AST.allowedReferences.some(function (ref) { return val.indexOf(ref) === 0; });\n }\n if (!valid) {\n error(33, false, void 0, {\n 'Invalid attribute in config': \"\".concat(key)\n });\n delete attributes[key];\n }\n // #17753, < is not allowed in SVG attributes\n if (isString(val) && attributes[key]) {\n attributes[key] = val.replace(/} The parsed nodes.\n */\n AST.prototype.parseMarkup = function (markup) {\n var nodes = [];\n markup = markup\n .trim()\n // The style attribute throws a warning when parsing when CSP is\n // enabled (#6884), so use an alias and pick it up below\n // Make all quotation marks parse correctly to DOM (#17627)\n .replace(/ style=([\"'])/g, ' data-style=$1');\n var doc;\n if (hasValidDOMParser) {\n doc = new DOMParser().parseFromString(trustedTypesPolicy ?\n trustedTypesPolicy.createHTML(markup) :\n markup, 'text/html');\n }\n else {\n var body = createElement('div');\n body.innerHTML = markup;\n doc = { body: body };\n }\n var appendChildNodes = function (node,\n addTo) {\n var tagName = node.nodeName.toLowerCase();\n // Add allowed tags\n var astNode = {\n tagName: tagName\n };\n if (tagName === '#text') {\n astNode.textContent = node.textContent || '';\n }\n var parsedAttributes = node.attributes;\n // Add attributes\n if (parsedAttributes) {\n var attributes_2 = {};\n [].forEach.call(parsedAttributes, function (attrib) {\n if (attrib.name === 'data-style') {\n astNode.style = AST.parseStyle(attrib.value);\n }\n else {\n attributes_2[attrib.name] = attrib.value;\n }\n });\n astNode.attributes = attributes_2;\n }\n // Handle children\n if (node.childNodes.length) {\n var children_1 = [];\n [].forEach.call(node.childNodes, function (childNode) {\n appendChildNodes(childNode, children_1);\n });\n if (children_1.length) {\n astNode.children = children_1;\n }\n }\n addTo.push(astNode);\n };\n [].forEach.call(doc.body.childNodes, function (childNode) { return appendChildNodes(childNode, nodes); });\n return nodes;\n };\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * The list of allowed SVG or HTML attributes, used for sanitizing\n * potentially harmful content from the chart configuration before adding to\n * the DOM.\n *\n * @see [Source code with default values](\n * https://github.com/highcharts/highcharts/blob/master/ts/Core/Renderer/HTML/AST.ts#:~:text=public%20static%20allowedAttributes)\n *\n * @example\n * // Allow a custom, trusted attribute\n * Highcharts.AST.allowedAttributes.push('data-value');\n *\n * @name Highcharts.AST.allowedAttributes\n * @type {Array}\n */\n AST.allowedAttributes = [\n 'aria-controls',\n 'aria-describedby',\n 'aria-expanded',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-label',\n 'aria-labelledby',\n 'aria-live',\n 'aria-pressed',\n 'aria-readonly',\n 'aria-roledescription',\n 'aria-selected',\n 'class',\n 'clip-path',\n 'color',\n 'colspan',\n 'cx',\n 'cy',\n 'd',\n 'dx',\n 'dy',\n 'disabled',\n 'fill',\n 'height',\n 'href',\n 'id',\n 'in',\n 'markerHeight',\n 'markerWidth',\n 'offset',\n 'opacity',\n 'orient',\n 'padding',\n 'paddingLeft',\n 'paddingRight',\n 'patternUnits',\n 'r',\n 'refX',\n 'refY',\n 'role',\n 'scope',\n 'slope',\n 'src',\n 'startOffset',\n 'stdDeviation',\n 'stroke',\n 'stroke-linecap',\n 'stroke-width',\n 'style',\n 'tableValues',\n 'result',\n 'rowspan',\n 'summary',\n 'target',\n 'tabindex',\n 'text-align',\n 'text-anchor',\n 'textAnchor',\n 'textLength',\n 'title',\n 'type',\n 'valign',\n 'width',\n 'x',\n 'x1',\n 'x2',\n 'xlink:href',\n 'y',\n 'y1',\n 'y2',\n 'zIndex'\n ];\n /**\n * The list of allowed references for referring attributes like `href` and\n * `src`. Attribute values will only be allowed if they start with one of\n * these strings.\n *\n * @see [Source code with default values](\n * https://github.com/highcharts/highcharts/blob/master/ts/Core/Renderer/HTML/AST.ts#:~:text=public%20static%20allowedReferences)\n *\n * @example\n * // Allow tel:\n * Highcharts.AST.allowedReferences.push('tel:');\n *\n * @name Highcharts.AST.allowedReferences\n * @type {Array}\n */\n AST.allowedReferences = [\n 'https://',\n 'http://',\n 'mailto:',\n '/',\n '../',\n './',\n '#'\n ];\n /**\n * The list of allowed SVG or HTML tags, used for sanitizing potentially\n * harmful content from the chart configuration before adding to the DOM.\n *\n * @see [Source code with default values](\n * https://github.com/highcharts/highcharts/blob/master/ts/Core/Renderer/HTML/AST.ts#:~:text=public%20static%20allowedTags)\n *\n * @example\n * // Allow a custom, trusted tag\n * Highcharts.AST.allowedTags.push('blink'); // ;)\n *\n * @name Highcharts.AST.allowedTags\n * @type {Array}\n */\n AST.allowedTags = [\n 'a',\n 'abbr',\n 'b',\n 'br',\n 'button',\n 'caption',\n 'circle',\n 'clipPath',\n 'code',\n 'dd',\n 'defs',\n 'div',\n 'dl',\n 'dt',\n 'em',\n 'feComponentTransfer',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feOffset',\n 'feMerge',\n 'feMergeNode',\n 'filter',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'hr',\n 'i',\n 'img',\n 'li',\n 'linearGradient',\n 'marker',\n 'ol',\n 'p',\n 'path',\n 'pattern',\n 'pre',\n 'rect',\n 'small',\n 'span',\n 'stop',\n 'strong',\n 'style',\n 'sub',\n 'sup',\n 'svg',\n 'table',\n 'text',\n 'textPath',\n 'thead',\n 'title',\n 'tbody',\n 'tspan',\n 'td',\n 'th',\n 'tr',\n 'u',\n 'ul',\n '#text'\n ];\n AST.emptyHTML = emptyHTML;\n /**\n * Allow all custom SVG and HTML attributes, references and tags (together\n * with potentially harmful ones) to be added to the DOM from the chart\n * configuration. In other words, disable the the allow-listing which is the\n * primary functionality of the AST.\n *\n * WARNING: Setting this property to `true` while allowing untrusted user\n * data in the chart configuration will expose your application to XSS\n * security risks!\n *\n * Note that in case you want to allow a known set of tags or attributes,\n * you should allow-list them instead of disabling the filtering totally.\n * See [allowedAttributes](Highcharts.AST#.allowedAttributes),\n * [allowedReferences](Highcharts.AST#.allowedReferences) and\n * [allowedTags](Highcharts.AST#.allowedTags). The `bypassHTMLFiltering`\n * setting is intended only for those cases where allow-listing is not\n * practical, and the chart configuration already comes from a secure\n * source.\n *\n * @example\n * // Allow all custom attributes, references and tags (disable DOM XSS\n * // filtering)\n * Highcharts.AST.bypassHTMLFiltering = true;\n *\n * @name Highcharts.AST.bypassHTMLFiltering\n * @static\n */\n AST.bypassHTMLFiltering = false;\n return AST;\n }());\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * Serialized form of an SVG/HTML definition, including children.\n *\n * @interface Highcharts.ASTNode\n */ /**\n * @name Highcharts.ASTNode#attributes\n * @type {Highcharts.SVGAttributes|undefined}\n */ /**\n * @name Highcharts.ASTNode#children\n * @type {Array|undefined}\n */ /**\n * @name Highcharts.ASTNode#tagName\n * @type {string|undefined}\n */ /**\n * @name Highcharts.ASTNode#textContent\n * @type {string|undefined}\n */\n (''); // keeps doclets above in file\n\n return AST;\n });\n _registerModule(_modules, 'Core/FormatUtilities.js', [_modules['Core/Defaults.js'], _modules['Core/Utilities.js']], function (D, U) {\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 var defaultOptions = D.defaultOptions,\n defaultTime = D.defaultTime;\n var getNestedProperty = U.getNestedProperty,\n isNumber = U.isNumber,\n pick = U.pick,\n pInt = U.pInt;\n /* *\n *\n * Functions\n *\n * */\n /**\n * Formats a JavaScript date timestamp (milliseconds since Jan 1st 1970) into a\n * human readable date string. The format is a subset of the formats for PHP's\n * [strftime](https://www.php.net/manual/en/function.strftime.php) function.\n * Additional formats can be given in the {@link Highcharts.dateFormats} hook.\n *\n * Since v6.0.5, all internal dates are formatted through the\n * {@link Highcharts.Chart#time} instance to respect chart-level time settings.\n * The `Highcharts.dateFormat` function only reflects global time settings set\n * with `setOptions`.\n *\n * Supported format keys:\n * - `%a`: Short weekday, like 'Mon'\n * - `%A`: Long weekday, like 'Monday'\n * - `%d`: Two digit day of the month, 01 to 31\n * - `%e`: Day of the month, 1 through 31\n * - `%w`: Day of the week, 0 through 6\n * - `%b`: Short month, like 'Jan'\n * - `%B`: Long month, like 'January'\n * - `%m`: Two digit month number, 01 through 12\n * - `%y`: Two digits year, like 09 for 2009\n * - `%Y`: Four digits year, like 2009\n * - `%H`: Two digits hours in 24h format, 00 through 23\n * - `%k`: Hours in 24h format, 0 through 23\n * - `%I`: Two digits hours in 12h format, 00 through 11\n * - `%l`: Hours in 12h format, 1 through 12\n * - `%M`: Two digits minutes, 00 through 59\n * - `%p`: Upper case AM or PM\n * - `%P`: Lower case AM or PM\n * - `%S`: Two digits seconds, 00 through 59\n * - `%L`: Milliseconds (naming from Ruby)\n *\n * @function Highcharts.dateFormat\n *\n * @param {string} format\n * The desired format where various time representations are prefixed\n * with `%`.\n *\n * @param {number} timestamp\n * The JavaScript timestamp.\n *\n * @param {boolean} [capitalize=false]\n * Upper case first letter in the return.\n *\n * @return {string}\n * The formatted date.\n */\n function dateFormat(format, timestamp, capitalize) {\n return defaultTime.dateFormat(format, timestamp, capitalize);\n }\n /**\n * Format a string according to a subset of the rules of Python's String.format\n * method.\n *\n * @example\n * let s = Highcharts.format(\n * 'The {color} fox was {len:.2f} feet long',\n * { color: 'red', len: Math.PI }\n * );\n * // => The red fox was 3.14 feet long\n *\n * @function Highcharts.format\n *\n * @param {string} str\n * The string to format.\n *\n * @param {Record} ctx\n * The context, a collection of key-value pairs where each key is\n * replaced by its value.\n *\n * @param {Highcharts.Chart} [chart]\n * A `Chart` instance used to get numberFormatter and time.\n *\n * @return {string}\n * The formatted string.\n */\n function format(str, ctx, chart) {\n var splitter = '{',\n isInside = false,\n segment,\n valueAndFormat,\n val,\n index;\n var floatRegex = /f$/;\n var decRegex = /\\.([0-9])/;\n var lang = defaultOptions.lang;\n var time = chart && chart.time || defaultTime;\n var numberFormatter = chart && chart.numberFormatter || numberFormat;\n var ret = [];\n while (str) {\n index = str.indexOf(splitter);\n if (index === -1) {\n break;\n }\n segment = str.slice(0, index);\n if (isInside) { // we're on the closing bracket looking back\n valueAndFormat = segment.split(':');\n val = getNestedProperty(valueAndFormat.shift() || '', ctx);\n // Format the replacement\n if (valueAndFormat.length && typeof val === 'number') {\n segment = valueAndFormat.join(':');\n if (floatRegex.test(segment)) { // float\n var decimals = parseInt((segment.match(decRegex) || ['', '-1'])[1], 10);\n if (val !== null) {\n val = numberFormatter(val, decimals, lang.decimalPoint, segment.indexOf(',') > -1 ? lang.thousandsSep : '');\n }\n }\n else {\n val = time.dateFormat(segment, val);\n }\n }\n // Push the result and advance the cursor\n ret.push(val);\n }\n else {\n ret.push(segment);\n }\n str = str.slice(index + 1); // the rest\n isInside = !isInside; // toggle\n splitter = isInside ? '}' : '{'; // now look for next matching bracket\n }\n ret.push(str);\n return ret.join('');\n }\n /**\n * Format a number and return a string based on input settings.\n *\n * @sample highcharts/members/highcharts-numberformat/\n * Custom number format\n *\n * @function Highcharts.numberFormat\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}\n * The formatted number.\n */\n function numberFormat(number, decimals, decimalPoint, thousandsSep) {\n number = +number || 0;\n decimals = +decimals;\n var ret,\n fractionDigits;\n var lang = defaultOptions.lang, origDec = (number.toString().split('.')[1] || '').split('e')[0].length, exponent = number.toString().split('e'), firstDecimals = decimals;\n if (decimals === -1) {\n // Preserve decimals. Not huge numbers (#3793).\n decimals = Math.min(origDec, 20);\n }\n else if (!isNumber(decimals)) {\n decimals = 2;\n }\n else if (decimals && exponent[1] && exponent[1] < 0) {\n // Expose decimals from exponential notation (#7042)\n fractionDigits = decimals + +exponent[1];\n if (fractionDigits >= 0) {\n // remove too small part of the number while keeping the notation\n exponent[0] = (+exponent[0]).toExponential(fractionDigits)\n .split('e')[0];\n decimals = fractionDigits;\n }\n else {\n // fractionDigits < 0\n exponent[0] = exponent[0].split('.')[0] || 0;\n if (decimals < 20) {\n // use number instead of exponential notation (#7405)\n number = (exponent[0] * Math.pow(10, exponent[1]))\n .toFixed(decimals);\n }\n else {\n // or zero\n number = 0;\n }\n exponent[1] = 0;\n }\n }\n // Add another decimal to avoid rounding errors of float numbers. (#4573)\n // Then use toFixed to handle rounding.\n var roundedNumber = (Math.abs(exponent[1] ? exponent[0] : number) +\n Math.pow(10, -Math.max(decimals,\n origDec) - 1)).toFixed(decimals);\n // A string containing the positive integer component of the number\n var strinteger = String(pInt(roundedNumber));\n // Leftover after grouping into thousands. Can be 0, 1 or 2.\n var thousands = strinteger.length > 3 ? strinteger.length % 3 : 0;\n // Language\n decimalPoint = pick(decimalPoint, lang.decimalPoint);\n thousandsSep = pick(thousandsSep, lang.thousandsSep);\n // Start building the return\n ret = number < 0 ? '-' : '';\n // Add the leftover after grouping into thousands. For example, in the\n // number 42 000 000, this line adds 42.\n ret += thousands ? strinteger.substr(0, thousands) + thousandsSep : '';\n if (+exponent[1] < 0 && !firstDecimals) {\n ret = '0';\n }\n else {\n // Add the remaining thousands groups, joined by the thousands separator\n ret += strinteger\n .substr(thousands)\n .replace(/(\\d{3})(?=\\d)/g, '$1' + thousandsSep);\n }\n // Add the decimal point and the decimal component\n if (decimals) {\n // Get the decimal component\n ret += decimalPoint + roundedNumber.slice(-decimals);\n }\n if (exponent[1] && +ret !== 0) {\n ret += 'e' + exponent[1];\n }\n return ret;\n }\n /* *\n *\n * Default Export\n *\n * */\n var FormatUtilities = {\n dateFormat: dateFormat,\n format: format,\n numberFormat: numberFormat\n };\n\n return FormatUtilities;\n });\n _registerModule(_modules, 'Core/Renderer/RendererUtilities.js', [_modules['Core/Utilities.js']], function (U) {\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 /* *\n *\n * Imports\n *\n * */\n var clamp = U.clamp,\n pick = U.pick,\n stableSort = U.stableSort;\n /* *\n *\n * Namespace\n *\n * */\n var 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,\n reducedLen = origBoxes.reducedLen || len,\n sortByRank = function (a,\n b) {\n return (b.rank || 0) - (a.rank || 0);\n }, sortByTarget = function (a, b) {\n return a.target - b.target;\n };\n var i,\n overlapping = true,\n restBoxes = [], // The outranked overshoot\n box,\n target,\n 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 * */\n\n return RendererUtilities;\n });\n _registerModule(_modules, 'Core/Renderer/SVG/SVGElement.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Color/Color.js'], _modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (A, Color, H, U) {\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 var animate = A.animate,\n animObject = A.animObject,\n stop = A.stop;\n var deg2rad = H.deg2rad,\n doc = H.doc,\n noop = H.noop,\n svg = H.svg,\n SVG_NS = H.SVG_NS,\n win = H.win;\n var addEvent = U.addEvent,\n attr = U.attr,\n createElement = U.createElement,\n css = U.css,\n defined = U.defined,\n erase = U.erase,\n extend = U.extend,\n fireEvent = U.fireEvent,\n isArray = U.isArray,\n isFunction = U.isFunction,\n isNumber = U.isNumber,\n isString = U.isString,\n merge = U.merge,\n objectEach = U.objectEach,\n pick = U.pick,\n pInt = U.pInt,\n removeEvent = U.removeEvent,\n syncTimeout = U.syncTimeout,\n 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 */\n var 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],\n 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,\n 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 = {},\n renderer = this.renderer,\n alignedObjects = renderer.alignedObjects;\n var x,\n y,\n alignTo,\n alignFactor,\n 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,\n 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,\n this.renderer.globalAnimation,\n true)),\n 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,\n hasContrast = textOutline.indexOf('contrast') !== -1,\n 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,\n symbolCustomAttribs = this.symbolCustomAttribs;\n var key,\n hasSetSymbolSize,\n ret = this,\n skipAttr,\n 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,\n gradName,\n gradAttr,\n radAttr,\n gradients,\n stops,\n stopColor,\n stopOpacity,\n radialReference,\n id,\n key = [],\n 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,\n newStyles = {},\n elem = this.element;\n var textWidth,\n 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,\n 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,\n element = wrapper.element || {},\n renderer = wrapper.renderer,\n ownerSVGElement = element.ownerSVGElement;\n var parentToClean = (renderer.isSVG &&\n element.nodeName === 'SPAN' &&\n wrapper.parentGroup ||\n void 0),\n grandParent,\n 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,\n alignValue = wrapper.alignValue,\n element = wrapper.element,\n renderer = wrapper.renderer,\n styles = wrapper.styles,\n textStr = wrapper.textStr,\n cache = renderer.cache,\n cacheKeys = renderer.cacheKeys,\n isSVG = element.namespaceURI === wrapper.SVG_NS,\n rotation = pick(rot,\n wrapper.rotation, 0),\n fontSize = renderer.styledMode ? (element &&\n SVGElement.prototype.getStyle.call(element, 'font-size')) : (styles && styles.fontSize);\n var bBox,\n width,\n height,\n toggleTextShadowShim,\n 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 }[\"\" + (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,\n alignFactor = {\n 'right': 1,\n 'center': 0.5\n }[alignValue || 0] || 0,\n rad = rotation * deg2rad,\n rad90 = (rotation - 90) * deg2rad,\n wCosRad = width * Math.cos(rad),\n wSinRad = width * Math.sin(rad),\n cosRad90 = Math.cos(rad90),\n 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),\n pY = bBox.y + baseline - alignFactor * wSinRad, \n // Find all corners\n aX = pX + baseline * cosRad90,\n bX = aX + wCosRad,\n cX = bX - height * cosRad90,\n dX = cX - wCosRad,\n aY = pY + baseline * sinRad90,\n bY = aY + wSinRad,\n cY = bY - height * sinRad90,\n 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,\n textWrapper = this.text || this,\n textPath = textWrapper.textPath,\n attributes = textPathOptions.attributes,\n 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',\n 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: \"\" + 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 = [],\n _a = this,\n element = _a.element,\n oldShadowOptions = _a.oldShadowOptions,\n parentGroup = _a.parentGroup,\n parentInverted = parentGroup && parentGroup.rotation === 90,\n 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,\n shadow,\n strokeWidth,\n shadowElementOpacity,\n update = false, \n // compensate for inverted plot area\n transform,\n 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,\n 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,\n element = _a.element,\n matrix = _a.matrix,\n _b = _a.rotation,\n rotation = _b === void 0 ? 0 : _b,\n scaleX = _a.scaleX,\n scaleY = _a.scaleY,\n _c = _a.translateX,\n translateX = _c === void 0 ? 0 : _c,\n _d = _a.translateY,\n 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,\n parentGroup = this.parentGroup,\n parentWrapper = parentGroup || renderer,\n parentNode = parentWrapper.element || renderer.box,\n element = this.element,\n svgParent = parentNode === renderer.box;\n var childNodes,\n otherElement,\n otherZIndex,\n inserted = false,\n undefinedOtherZIndex,\n run = this.added,\n 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\n SVGElement.prototype.strokeSetter = SVGElement.prototype.fillSetter;\n SVGElement.prototype.yGetter = SVGElement.prototype.xGetter;\n SVGElement.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 * */\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 return SVGElement;\n });\n _registerModule(_modules, 'Core/Renderer/RendererRegistry.js', [_modules['Core/Globals.js']], function (H) {\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 /* *\n *\n * Namespace\n *\n * */\n var 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 * */\n\n return RendererRegistry;\n });\n _registerModule(_modules, 'Core/Renderer/SVG/SVGLabel.js', [_modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Utilities.js']], function (SVGElement, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var defined = U.defined,\n extend = U.extend,\n isNumber = U.isNumber,\n merge = U.merge,\n pick = U.pick,\n 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 */\n var 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,\n 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,\n style = text.element.style,\n attribs = {},\n 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,\n 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,\n 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,\n padding);\n var paddingRight = pick(this.paddingRight,\n 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 * */\n\n return SVGLabel;\n });\n _registerModule(_modules, 'Core/Renderer/SVG/Symbols.js', [_modules['Core/Utilities.js']], function (U) {\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 var defined = U.defined,\n isNumber = U.isNumber,\n pick = U.pick;\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable require-jsdoc, valid-jsdoc */\n function arc(x, y, w, h, options) {\n var arc = [];\n if (options) {\n var start = options.start || 0,\n rx = pick(options.r,\n w),\n ry = pick(options.r,\n h || w),\n proximity = 0.001,\n 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,\n innerRadius = options.innerR,\n open_1 = pick(options.open,\n fullCircle),\n cosStart = Math.cos(start),\n sinStart = Math.sin(start),\n cosEnd = Math.cos(end),\n sinEnd = Math.sin(end), \n // Proximity takes care of rounding errors around PI (#6971)\n longArc = pick(options.longArc,\n 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 */\n function callout(x, y, w, h, options) {\n var arrowLength = 6,\n halfDistance = 6,\n r = Math.min((options && options.r) || 0,\n w,\n h),\n safeDistance = r + halfDistance,\n anchorX = options && options.anchorX,\n anchorY = options && options.anchorY || 0;\n var path = roundedRect(x,\n y,\n w,\n 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 }\n function circle(x, y, w, h) {\n // Return a full arc\n return arc(x + w / 2, y + h / 2, w / 2, h / 2, {\n start: Math.PI * 0.5,\n end: Math.PI * 2.5,\n open: false\n });\n }\n function diamond(x, y, w, h) {\n return [\n ['M', x + w / 2, y],\n ['L', x + w, y + h / 2],\n ['L', x + w / 2, y + h],\n ['L', x, y + h / 2],\n ['Z']\n ];\n }\n // #15291\n function 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 }\n function 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 }\n function triangle(x, y, w, h) {\n return [\n ['M', x + w / 2, y],\n ['L', x + w, y + h],\n ['L', x, y + h],\n ['Z']\n ];\n }\n function 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 }\n var 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 * */\n\n return Symbols;\n });\n _registerModule(_modules, 'Core/Renderer/SVG/TextBuilder.js', [_modules['Core/Renderer/HTML/AST.js'], _modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (AST, H, U) {\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 var doc = H.doc,\n SVG_NS = H.SVG_NS,\n win = H.win;\n var attr = U.attr,\n extend = U.extend,\n fireEvent = U.fireEvent,\n isString = U.isString,\n objectEach = U.objectEach,\n pick = U.pick;\n /* *\n *\n * Class\n *\n * */\n /**\n * SVG Text Builder\n * @private\n * @class\n * @name Highcharts.TextBuilder\n */\n var 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,\n 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,\n i) {\n var _a = node.attributes,\n attributes = _a === void 0 ? {} : _a,\n children = node.children,\n _b = node.style,\n style = _b === void 0 ? {} : _b,\n tagName = node.tagName,\n 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,\n 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,\n 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 }());\n\n return TextBuilder;\n });\n _registerModule(_modules, 'Core/Renderer/SVG/SVGRenderer.js', [_modules['Core/Renderer/HTML/AST.js'], _modules['Core/Color/Color.js'], _modules['Core/Globals.js'], _modules['Core/Renderer/RendererRegistry.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Renderer/SVG/SVGLabel.js'], _modules['Core/Renderer/SVG/Symbols.js'], _modules['Core/Renderer/SVG/TextBuilder.js'], _modules['Core/Utilities.js']], function (AST, Color, H, RendererRegistry, SVGElement, SVGLabel, Symbols, TextBuilder, U) {\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 var charts = H.charts,\n deg2rad = H.deg2rad,\n doc = H.doc,\n isFirefox = H.isFirefox,\n isMS = H.isMS,\n isWebKit = H.isWebKit,\n noop = H.noop,\n SVG_NS = H.SVG_NS,\n symbolSizes = H.symbolSizes,\n win = H.win;\n var addEvent = U.addEvent,\n attr = U.attr,\n createElement = U.createElement,\n css = U.css,\n defined = U.defined,\n destroyObjectProperties = U.destroyObjectProperties,\n extend = U.extend,\n isArray = U.isArray,\n isNumber = U.isNumber,\n isObject = U.isObject,\n isString = U.isString,\n merge = U.merge,\n pick = U.pick,\n pInt = U.pInt,\n uniqueKey = U.uniqueKey;\n /* *\n *\n * Variables\n *\n * */\n var 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 */\n var 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,\n boxWrapper = renderer\n .createElement('svg')\n .attr({\n version: '1.1',\n 'class': 'highcharts-root'\n }),\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,\n 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,\n 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,\n x,\n y,\n shape,\n void 0,\n void 0,\n useHTML,\n void 0, 'button'),\n styledMode = this.styledMode,\n 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 },\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,\n selectStyle,\n 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',\n x,\n y,\n r,\n r,\n 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),\n onDummyLoad = function (e) {\n setSVGImageSource(elemWrapper.element,\n 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,\n imageRegex = /^url\\((.*?)\\)$/,\n isImage = imageRegex.test(symbol),\n sym = (!isImage && (this.symbols[symbol] ? symbol : 'circle')), \n // get the symbol definition function\n symbolFn = (sym && this.symbols[sym]);\n var obj,\n path,\n imageSrc,\n 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,\n alignByTranslate = _a.alignByTranslate,\n element = _a.element,\n width = _a.width,\n height = _a.height,\n imgwidth = _a.imgwidth,\n 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,\n 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'),\n 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)),\n 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 }());\n extend(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 * */\n RendererRegistry.registerRendererType('svg', SVGRenderer, true);\n /* *\n *\n * Export Default\n *\n * */\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 return SVGRenderer;\n });\n _registerModule(_modules, 'Core/Renderer/HTML/HTMLElement.js', [_modules['Core/Globals.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Utilities.js']], function (H, SVGElement, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var isFirefox = H.isFirefox,\n isMS = H.isMS,\n isWebKit = H.isWebKit,\n win = H.win;\n var css = U.css,\n defined = U.defined,\n extend = U.extend,\n pick = U.pick,\n pInt = U.pInt;\n /* *\n *\n * Class\n *\n * */\n /* eslint-disable valid-jsdoc */\n var HTMLElement = /** @class */ (function (_super) {\n __extends(HTMLElement, _super);\n function HTMLElement() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /* *\n *\n * Static Functions\n *\n * */\n /**\n * Modifies SVGElement to support HTML elements.\n * @private\n */\n HTMLElement.compose = function (SVGElementClass) {\n if (HTMLElement.composedClasses.indexOf(SVGElementClass) === -1) {\n HTMLElement.composedClasses.push(SVGElementClass);\n var htmlElementProto = HTMLElement.prototype,\n svgElementProto = SVGElementClass.prototype;\n svgElementProto.getSpanCorrection = htmlElementProto\n .getSpanCorrection;\n svgElementProto.htmlCss = htmlElementProto.htmlCss;\n svgElementProto.htmlGetBBox = htmlElementProto.htmlGetBBox;\n svgElementProto.htmlUpdateTransform = htmlElementProto\n .htmlUpdateTransform;\n svgElementProto.setSpanRotation = htmlElementProto.setSpanRotation;\n }\n return SVGElementClass;\n };\n /* *\n *\n * Functions\n *\n * */\n /**\n * Get the correction in X and Y positioning as the element is rotated.\n * @private\n */\n HTMLElement.prototype.getSpanCorrection = function (width, baseline, alignCorrection) {\n this.xCorr = -width * alignCorrection;\n this.yCorr = -baseline;\n };\n /**\n * Apply CSS to HTML elements. This is used in text within SVG rendering and\n * by the VML renderer\n * @private\n */\n HTMLElement.prototype.htmlCss = function (styles) {\n var wrapper = this,\n element = wrapper.element, \n // When setting or unsetting the width style, we need to update\n // transform (#8809)\n isSettingWidth = (element.tagName === 'SPAN' &&\n styles &&\n 'width' in styles),\n textWidth = pick(isSettingWidth && styles.width,\n void 0);\n var doTransform;\n if (isSettingWidth) {\n delete styles.width;\n wrapper.textWidth = textWidth;\n doTransform = true;\n }\n if (styles && styles.textOverflow === 'ellipsis') {\n styles.whiteSpace = 'nowrap';\n styles.overflow = 'hidden';\n }\n wrapper.styles = extend(wrapper.styles, styles);\n css(wrapper.element, styles);\n // Now that all styles are applied, to the transform\n if (doTransform) {\n wrapper.htmlUpdateTransform();\n }\n return wrapper;\n };\n /**\n * VML and useHTML method for calculating the bounding box based on offsets.\n */\n HTMLElement.prototype.htmlGetBBox = function () {\n var wrapper = this,\n element = wrapper.element;\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n };\n /**\n * VML override private method to update elements based on internal\n * properties based on SVG transform.\n * @private\n */\n HTMLElement.prototype.htmlUpdateTransform = function () {\n // aligning non added elements is expensive\n if (!this.added) {\n this.alignOnAdd = true;\n return;\n }\n var wrapper = this,\n renderer = wrapper.renderer,\n elem = wrapper.element,\n translateX = wrapper.translateX || 0,\n translateY = wrapper.translateY || 0,\n x = wrapper.x || 0,\n y = wrapper.y || 0,\n align = wrapper.textAlign || 'left',\n alignCorrection = {\n left: 0,\n center: 0.5,\n right: 1\n }[align],\n styles = wrapper.styles,\n whiteSpace = styles && styles.whiteSpace;\n /** @private */\n function getTextPxLength() {\n if (wrapper.textPxLength) {\n return wrapper.textPxLength;\n }\n // Reset multiline/ellipsis in order to read width (#4928,\n // #5417)\n css(elem, {\n width: '',\n whiteSpace: whiteSpace || 'nowrap'\n });\n return elem.offsetWidth;\n }\n // apply translate\n css(elem, {\n marginLeft: translateX,\n marginTop: translateY\n });\n if (!renderer.styledMode && wrapper.shadows) { // used in labels/tooltip\n wrapper.shadows.forEach(function (shadow) {\n css(shadow, {\n marginLeft: translateX + 1,\n marginTop: translateY + 1\n });\n });\n }\n // apply inversion\n if (wrapper.inverted) { // wrapper is a group\n [].forEach.call(elem.childNodes, function (child) {\n renderer.invertChild(child, elem);\n });\n }\n if (elem.tagName === 'SPAN') {\n var rotation = wrapper.rotation, textWidth = wrapper.textWidth && pInt(wrapper.textWidth), currentTextTransform = [\n rotation,\n align,\n elem.innerHTML,\n wrapper.textWidth,\n wrapper.textAlign\n ].join(',');\n var baseline = void 0,\n hasBoxWidthChanged = false;\n // Update textWidth. Use the memoized textPxLength if possible, to\n // avoid the getTextPxLength function using elem.offsetWidth.\n // Calling offsetWidth affects rendering time as it forces layout\n // (#7656).\n if (textWidth !== wrapper.oldTextWidth) { // #983, #1254\n var textPxLength = getTextPxLength();\n if (((textWidth > wrapper.oldTextWidth) ||\n textPxLength > textWidth) && (\n // Only set the width if the text is able to word-wrap,\n // or text-overflow is ellipsis (#9537)\n /[ \\-]/.test(elem.textContent || elem.innerText) ||\n elem.style.textOverflow === 'ellipsis')) {\n css(elem, {\n width: (textPxLength > textWidth) || rotation ?\n textWidth + 'px' :\n 'auto',\n display: 'block',\n whiteSpace: whiteSpace || 'normal' // #3331\n });\n wrapper.oldTextWidth = textWidth;\n hasBoxWidthChanged = true; // #8159\n }\n }\n wrapper.hasBoxWidthChanged = hasBoxWidthChanged; // #8159\n // Do the calculations and DOM access only if properties changed\n if (currentTextTransform !== wrapper.cTT) {\n baseline = renderer.fontMetrics(elem.style.fontSize, elem).b;\n // Renderer specific handling of span rotation, but only if we\n // have something to update.\n if (defined(rotation) &&\n ((rotation !== (wrapper.oldRotation || 0)) ||\n (align !== wrapper.oldAlign))) {\n wrapper.setSpanRotation(rotation, alignCorrection, baseline);\n }\n wrapper.getSpanCorrection(\n // Avoid elem.offsetWidth if we can, it affects rendering\n // time heavily (#7656)\n ((!defined(rotation) && wrapper.textPxLength) || // #7920\n elem.offsetWidth), baseline, alignCorrection, rotation, align);\n }\n // apply position with correction\n css(elem, {\n left: (x + (wrapper.xCorr || 0)) + 'px',\n top: (y + (wrapper.yCorr || 0)) + 'px'\n });\n // record current text transform\n wrapper.cTT = currentTextTransform;\n wrapper.oldRotation = rotation;\n wrapper.oldAlign = align;\n }\n };\n /**\n * Set the rotation of an individual HTML span.\n * @private\n */\n HTMLElement.prototype.setSpanRotation = function (rotation, alignCorrection, baseline) {\n var getTransformKey = function () { return (isMS &&\n !/Edge/.test(win.navigator.userAgent) ?\n '-ms-transform' :\n isWebKit ?\n '-webkit-transform' :\n isFirefox ?\n 'MozTransform' :\n win.opera ?\n '-o-transform' :\n void 0); };\n var rotationStyle = {},\n cssTransformKey = getTransformKey();\n if (cssTransformKey) {\n rotationStyle[cssTransformKey] = rotationStyle.transform =\n 'rotate(' + rotation + 'deg)';\n rotationStyle[cssTransformKey + (isFirefox ? 'Origin' : '-origin')] = rotationStyle.transformOrigin =\n (alignCorrection * 100) + '% ' + baseline + 'px';\n css(this.element, rotationStyle);\n }\n };\n /* *\n *\n * Static Properties\n *\n * */\n HTMLElement.composedClasses = [];\n return HTMLElement;\n }(SVGElement));\n /* *\n *\n * Default Export\n *\n * */\n\n return HTMLElement;\n });\n _registerModule(_modules, 'Core/Renderer/HTML/HTMLRenderer.js', [_modules['Core/Renderer/HTML/AST.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Utilities.js']], function (AST, SVGElement, SVGRenderer, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var attr = U.attr,\n createElement = U.createElement,\n extend = U.extend,\n pick = U.pick;\n /* *\n *\n * Class\n *\n * */\n /* eslint-disable valid-jsdoc */\n // Extend SvgRenderer for useHTML option.\n var HTMLRenderer = /** @class */ (function (_super) {\n __extends(HTMLRenderer, _super);\n function HTMLRenderer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /* *\n *\n * Static Functions\n *\n * */\n /** @private */\n HTMLRenderer.compose = function (SVGRendererClass) {\n if (HTMLRenderer.composedClasses.indexOf(SVGRendererClass) === -1) {\n HTMLRenderer.composedClasses.push(SVGRendererClass);\n var htmlRendererProto = HTMLRenderer.prototype,\n svgRendererProto = SVGRendererClass.prototype;\n svgRendererProto.html = htmlRendererProto.html;\n }\n return SVGRendererClass;\n };\n /* *\n *\n * Functions\n *\n * */\n /**\n * Create HTML text node. This is used by the VML renderer as well as the\n * SVG renderer through the useHTML option.\n *\n * @private\n * @function Highcharts.SVGRenderer#html\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 * @return {Highcharts.HTMLDOMElement}\n * HTML element.\n */\n HTMLRenderer.prototype.html = function (str, x, y) {\n var wrapper = this.createElement('span'), element = wrapper.element, renderer = wrapper.renderer, isSVG = renderer.isSVG, addSetters = function (gWrapper, style) {\n // These properties are set as attributes on the SVG group, and\n // as identical CSS properties on the div. (#3542)\n ['opacity', 'visibility'].forEach(function (prop) {\n gWrapper[prop + 'Setter'] = function (value, key, elem) {\n var styleObject = gWrapper.div ?\n gWrapper.div.style :\n style;\n SVGElement.prototype[prop + 'Setter']\n .call(this, value, key, elem);\n if (styleObject) {\n styleObject[key] = value;\n }\n };\n });\n gWrapper.addedSetters = true;\n };\n // Text setter\n wrapper.textSetter = function (value) {\n if (value !== this.textStr) {\n delete this.bBox;\n delete this.oldTextWidth;\n AST.setElementHTML(this.element, pick(value, ''));\n this.textStr = value;\n wrapper.doTransform = true;\n }\n };\n // Add setters for the element itself (#4938)\n if (isSVG) { // #4938, only for HTML within SVG\n addSetters(wrapper, wrapper.element.style);\n }\n // Various setters which rely on update transform\n wrapper.xSetter =\n wrapper.ySetter =\n wrapper.alignSetter =\n wrapper.rotationSetter =\n function (value, key) {\n if (key === 'align') {\n // Do not overwrite the SVGElement.align method. Same as VML.\n wrapper.alignValue = wrapper.textAlign = value;\n }\n else {\n wrapper[key] = value;\n }\n wrapper.doTransform = true;\n };\n // Runs at the end of .attr()\n wrapper.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.htmlUpdateTransform();\n this.doTransform = false;\n }\n };\n // Set the default attributes\n wrapper\n .attr({\n text: str,\n x: Math.round(x),\n y: Math.round(y)\n })\n .css({\n position: 'absolute'\n });\n if (!renderer.styledMode) {\n wrapper.css({\n fontFamily: this.style.fontFamily,\n fontSize: this.style.fontSize\n });\n }\n // Keep the whiteSpace style outside the wrapper.styles collection\n element.style.whiteSpace = 'nowrap';\n // Use the HTML specific .css method\n wrapper.css = wrapper.htmlCss;\n // This is specific for HTML within SVG\n if (isSVG) {\n wrapper.add = function (svgGroupWrapper) {\n var container = renderer.box.parentNode,\n parents = [];\n var htmlGroup,\n parentGroup;\n this.parentGroup = svgGroupWrapper;\n // Create a mock group to hold the HTML elements\n if (svgGroupWrapper) {\n htmlGroup = svgGroupWrapper.div;\n if (!htmlGroup) {\n // Read the parent chain into an array and read from top\n // down\n parentGroup = svgGroupWrapper;\n while (parentGroup) {\n parents.push(parentGroup);\n // Move up to the next parent group\n parentGroup = parentGroup.parentGroup;\n }\n // Ensure dynamically updating position when any parent\n // is translated\n parents.reverse().forEach(function (parentGroup) {\n var cls = attr(parentGroup.element, 'class');\n /**\n * Common translate setter for X and Y on the HTML\n * group. Reverted the fix for #6957 du to\n * positioning problems and offline export (#7254,\n * #7280, #7529)\n * @private\n * @param {*} value\n * @param {string} key\n */\n function translateSetter(value, key) {\n parentGroup[key] = value;\n if (key === 'translateX') {\n htmlGroupStyle.left = value + 'px';\n }\n else {\n htmlGroupStyle.top = value + 'px';\n }\n parentGroup.doTransform = true;\n }\n // Create a HTML div and append it to the parent div\n // to emulate the SVG group structure\n var parentGroupStyles = parentGroup.styles || {};\n htmlGroup =\n parentGroup.div =\n parentGroup.div || createElement('div', cls ? { className: cls } : void 0, {\n position: 'absolute',\n left: (parentGroup.translateX || 0) + 'px',\n top: (parentGroup.translateY || 0) + 'px',\n display: parentGroup.display,\n opacity: parentGroup.opacity,\n cursor: parentGroupStyles.cursor,\n pointerEvents: (\n // #5595\n parentGroupStyles.pointerEvents),\n visibility: parentGroup.visibility\n // the top group is appended to container\n }, htmlGroup || container);\n // Shortcut\n var htmlGroupStyle = htmlGroup.style;\n // Set listeners to update the HTML div's position\n // whenever the SVG group position is changed.\n extend(parentGroup, {\n // (#7287) Pass htmlGroup to use\n // the related group\n classSetter: (function (htmlGroup) {\n return function (value) {\n this.element.setAttribute('class', value);\n htmlGroup.className = value;\n };\n }(htmlGroup)),\n on: function () {\n if (parents[0].div) { // #6418\n wrapper.on.apply({\n element: parents[0].div,\n onEvents: parentGroup.onEvents\n }, arguments);\n }\n return parentGroup;\n },\n translateXSetter: translateSetter,\n translateYSetter: translateSetter\n });\n if (!parentGroup.addedSetters) {\n addSetters(parentGroup);\n }\n });\n }\n }\n else {\n htmlGroup = container;\n }\n htmlGroup.appendChild(element);\n // Shared with VML:\n wrapper.added = true;\n if (wrapper.alignOnAdd) {\n wrapper.htmlUpdateTransform();\n }\n return wrapper;\n };\n }\n return wrapper;\n };\n /* *\n *\n * Static Properties\n *\n * */\n HTMLRenderer.composedClasses = [];\n return HTMLRenderer;\n }(SVGRenderer));\n /* *\n *\n * Default Export\n *\n * */\n\n return HTMLRenderer;\n });\n _registerModule(_modules, 'Core/Axis/AxisDefaults.js', [], function () {\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 /* *\n *\n * Namespace\n *\n * */\n var 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\u00B0\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\u00B0\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 * */\n\n return AxisDefaults;\n });\n _registerModule(_modules, 'Core/Foundation.js', [_modules['Core/Utilities.js']], function (U) {\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 var addEvent = U.addEvent,\n isFunction = U.isFunction,\n objectEach = U.objectEach,\n removeEvent = U.removeEvent;\n /* *\n *\n * Class Namespace\n *\n * */\n var 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 * */\n\n return Foundation;\n });\n _registerModule(_modules, 'Core/Axis/Tick.js', [_modules['Core/FormatUtilities.js'], _modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (F, H, U) {\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 var deg2rad = H.deg2rad;\n var clamp = U.clamp,\n correctFloat = U.correctFloat,\n defined = U.defined,\n destroyObjectProperties = U.destroyObjectProperties,\n extend = U.extend,\n fireEvent = U.fireEvent,\n isNumber = U.isNumber,\n merge = U.merge,\n objectEach = U.objectEach,\n 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 */\n var 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,\n axis = tick.axis,\n options = axis.options,\n chart = axis.chart,\n categories = axis.categories,\n log = axis.logarithmic,\n names = axis.names,\n pos = tick.pos,\n labelOptions = pick(tick.options && tick.options.labels,\n options.labels),\n tickPositions = axis.tickPositions,\n isFirst = pos === tickPositions[0],\n isLast = pos === tickPositions[tickPositions.length - 1],\n animateLabels = (!labelOptions.step || labelOptions.step === 1) &&\n axis.tickInterval === 1,\n tickPositionInfo = tickPositions.info;\n var label = tick.label,\n dateTimeLabelFormat,\n dateTimeLabelFormats,\n i;\n // The context value\n var value = this.parameters.category || (categories ?\n pick(categories[pos],\n names[pos],\n 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,\n 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,\n 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,\n chart = axis.chart,\n label = defined(str) && labelOptions.enabled ?\n chart.renderer\n .text(str,\n xy.x,\n xy.y,\n 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,\n chart = axis.chart,\n cHeight = (old && chart.oldChartHeight) || chart.chartHeight,\n pos = {\n x: horiz ?\n correctFloat(axis.translate(tickPos + tickmarkOffset,\n void 0,\n void 0,\n 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,\n void 0,\n void 0,\n 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,\n transA = axis.transA,\n reversed = ( // #7911\n axis.isLinked && axis.linkedParent ?\n axis.linkedParent.reversed :\n axis.reversed),\n staggerLines = axis.staggerLines,\n rotCorr = axis.tickRotCorr || { x: 0,\n 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),\n pos = {};\n var yOffset,\n 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,\n axis = this.axis,\n labelOptions = axis.options.labels,\n pxPos = xy.x,\n chartWidth = axis.chart.chartWidth,\n spacing = axis.chart.spacing,\n leftBound = pick(axis.labelLeft,\n Math.min(axis.pos,\n spacing[3])),\n rightBound = pick(axis.labelRight,\n Math.max(!axis.isRadial ? axis.pos + axis.len : 0,\n chartWidth - spacing[1])),\n label = this.label,\n rotation = this.rotation,\n factor = {\n left: 0,\n center: 0.5,\n right: 1\n }[axis.labelAlign || label.attr('align')],\n labelWidth = label.getBBox().width,\n slotWidth = axis.getSlotWidth(tick),\n xCorrection = factor,\n css = {};\n var modifiedSlotWidth = slotWidth,\n goRight = 1,\n leftPos,\n rightPos,\n 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,\n label = tick.label,\n axis = tick.axis,\n reversed = axis.reversed;\n var moved = false,\n labelPos,\n xPos,\n 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,\n axis = tick.axis,\n horiz = axis.horiz,\n pos = tick.pos,\n tickmarkOffset = pick(tick.tickmarkOffset,\n axis.tickmarkOffset),\n xy = tick.getPosition(horiz,\n pos,\n tickmarkOffset,\n old),\n x = xy.x,\n y = xy.y,\n reverseCrisp = ((horiz && x === axis.pos + axis.len) ||\n (!horiz && y === axis.pos)) ? -1 : 1; // #1480, #1687\n var labelOpacity = pick(opacity,\n 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,\n axis = tick.axis,\n options = axis.options,\n attribs = {},\n pos = tick.pos,\n type = tick.type,\n tickmarkOffset = pick(tick.tickmarkOffset,\n axis.tickmarkOffset),\n renderer = axis.chart.renderer;\n var gridLine = tick.gridLine,\n gridLinePath,\n gridLineWidth = options.gridLineWidth,\n gridLineColor = options.gridLineColor,\n 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,\n axis = tick.axis,\n horiz = axis.horiz,\n options = axis.options,\n label = tick.label,\n labelOptions = options.labels,\n step = labelOptions.step,\n tickmarkOffset = pick(tick.tickmarkOffset,\n axis.tickmarkOffset),\n x = xy.x,\n 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,\n label = tick.label,\n axis = tick.axis,\n reversed = axis.reversed;\n var x,\n 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 * */\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 return Tick;\n });\n _registerModule(_modules, 'Core/Axis/Axis.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Axis/AxisDefaults.js'], _modules['Core/Color/Color.js'], _modules['Core/Defaults.js'], _modules['Core/Foundation.js'], _modules['Core/Globals.js'], _modules['Core/Axis/Tick.js'], _modules['Core/Utilities.js']], function (A, AxisDefaults, Color, D, F, H, Tick, U) {\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 var animObject = A.animObject;\n var defaultOptions = D.defaultOptions;\n var registerEventOptions = F.registerEventOptions;\n var deg2rad = H.deg2rad;\n var arrayMax = U.arrayMax,\n arrayMin = U.arrayMin,\n clamp = U.clamp,\n correctFloat = U.correctFloat,\n defined = U.defined,\n destroyObjectProperties = U.destroyObjectProperties,\n erase = U.erase,\n error = U.error,\n extend = U.extend,\n fireEvent = U.fireEvent,\n isArray = U.isArray,\n isNumber = U.isNumber,\n isString = U.isString,\n merge = U.merge,\n normalizeTickInterval = U.normalizeTickInterval,\n objectEach = U.objectEach,\n pick = U.pick,\n relativeLength = U.relativeLength,\n removeEvent = U.removeEvent,\n splat = U.splat,\n syncTimeout = U.syncTimeout;\n var getNormalizedTickInterval = function (axis,\n tickInterval) { return normalizeTickInterval(tickInterval,\n void 0,\n void 0,\n 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.\n tickInterval < 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 */\n var 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,\n 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,\n labelsOptions = options.labels,\n 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,\n 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,\n chart = this.chart,\n numberFormatter = chart.numberFormatter,\n value = isNumber(this.value) ? this.value : NaN,\n time = axis.chart.time,\n categories = axis.categories,\n dateTimeLabelFormat = this.dateTimeLabelFormat,\n lang = defaultOptions.lang,\n numericSymbols = lang.numericSymbols,\n 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,\n multi,\n 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,\n 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,\n threshold = seriesOptions.threshold,\n seriesDataMin = void 0,\n 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,\n doPostTranslate = (axis.isOrdinal ||\n axis.brokenAxis && axis.brokenAxis.hasBreaks ||\n (axis.logarithmic && handleLog)) && axis.lin2val;\n var sign = 1,\n cvsOffset = 0,\n localA = old && axis.old ? axis.old.transA : axis.transA,\n 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,\n chart = axis.chart,\n axisLeft = axis.left,\n axisTop = axis.top,\n old = options.old,\n value = options.value,\n lineWidth = options.lineWidth,\n cHeight = (old && chart.oldChartHeight) || chart.chartHeight,\n cWidth = (old && chart.oldChartWidth) || chart.chartWidth,\n transB = axis.transB;\n var translatedValue = options.translatedValue,\n force = options.force,\n x1,\n y1,\n x2,\n y2,\n 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),\n roundedMax = correctFloat(Math.ceil(max / tickInterval) * tickInterval),\n tickPositions = [];\n var pos,\n lastPos,\n 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,\n options = axis.options,\n tickPositions = axis.tickPositions,\n minorTickInterval = axis.minorTickInterval,\n pointRangePadding = axis.pointRangePadding || 0,\n min = axis.min - pointRangePadding, // #1498\n max = axis.max + pointRangePadding, // #1498\n range = max - min;\n var minorTickPositions = [],\n 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,\n options = axis.options,\n log = axis.logarithmic;\n var min = axis.min,\n max = axis.max,\n zoomOffset,\n spaceAvailable,\n closestDataRange = 0,\n i,\n distance,\n xData,\n loopLength,\n minArgs,\n maxArgs,\n 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,\n 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),\n names = explicitCategories ? this.categories : this.names;\n var nameX = point.options.x,\n 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,\n names = this.names,\n 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,\n range = axis.max - axis.min,\n linkedParent = axis.linkedParent,\n hasCategories = !!axis.categories,\n isXAxis = axis.isXAxis;\n var pointRange = axis.axisPointRange || 0,\n closestPointRange,\n minPointOffset = 0,\n pointRangePadding = 0,\n ordinalCorrection,\n 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,\n 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,\n chart = axis.chart,\n log = axis.logarithmic,\n options = axis.options,\n isXAxis = axis.isXAxis,\n isLinked = axis.isLinked,\n tickPixelIntervalOption = options.tickPixelInterval,\n categories = axis.categories,\n softThreshold = axis.softThreshold;\n var maxPadding = options.maxPadding,\n minPadding = options.minPadding,\n length,\n linkedParentExtremes, \n // Only non-negative tickInterval is valid, #12961\n tickIntervalOption = isNumber(options.tickInterval) && options.tickInterval >= 0 ?\n options.tickInterval : void 0,\n threshold = isNumber(axis.threshold) ? axis.threshold : null,\n thresholdMin,\n thresholdMax,\n hardMin,\n 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,\n options = this.options,\n tickPositionsOption = options.tickPositions,\n tickPositioner = options.tickPositioner,\n minorTickIntervalOption = this.getMinorTickInterval(),\n hasVerticalPanning = this.hasVerticalPanning(),\n isColorAxis = this.coll === 'colorAxis',\n startOnTick = ((isColorAxis || !hasVerticalPanning) && options.startOnTick),\n endOnTick = ((isColorAxis || !hasVerticalPanning) && options.endOnTick);\n var tickPositions = [],\n 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],\n roundedMax = tickPositions[tickPositions.length - 1],\n 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,\n alignedAxes = [this],\n options = axis.options,\n alignThresholds = (this.coll === 'yAxis' &&\n this.chart.options.chart.alignThresholds),\n 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,\n 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 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,\n options = this.options,\n 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,\n finalTickAmt = axis.finalTickAmt,\n max = axis.max,\n min = axis.min,\n options = axis.options,\n tickPositions = axis.tickPositions,\n tickAmount = axis.tickAmount,\n thresholdAlignment = axis.thresholdAlignment,\n currentTickAmount = tickPositions && tickPositions.length,\n threshold = pick(axis.threshold,\n axis.softThreshold ? 0 : null);\n var len,\n i,\n tickInterval = axis.tickInterval,\n 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,\n 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,\n 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,\n dataMin = this.dataMin,\n dataMax = this.dataMax,\n options = this.options,\n min = Math.min(dataMin,\n pick(options.min,\n dataMin)),\n max = Math.max(dataMax,\n pick(options.max,\n dataMax)),\n 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,\n 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,\n options = this.options, \n // [top, right, bottom, left]\n offsets = options.offsets || [0, 0, 0, 0],\n 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,\n chart.plotWidth - offsets[3] + offsets[1]),\n chart.plotWidth)),\n height = this.height = Math.round(relativeLength(pick(options.height,\n chart.plotHeight - offsets[0] + offsets[2]),\n chart.plotHeight)),\n top = this.top = Math.round(relativeLength(pick(options.top,\n chart.plotTop + offsets[0]),\n chart.plotHeight,\n chart.plotTop)),\n left = this.left = Math.round(relativeLength(pick(options.left,\n chart.plotLeft + offsets[3]),\n chart.plotWidth,\n 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,\n 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,\n log = axis.logarithmic,\n realMin = log ? log.lin2log(axis.min) : axis.min,\n 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,\n 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,\n 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'],\n 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,\n horiz = this.horiz,\n tickInterval = this.tickInterval,\n slotSize = this.len / (((this.categories ? 1 : 0) +\n this.max -\n this.min) /\n tickInterval),\n rotationOption = labelOptions.rotation,\n labelMetrics = this.labelMetrics(),\n 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,\n rotation,\n bestScore = Number.MAX_VALUE,\n 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,\n 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,\n horiz = this.horiz,\n labelOptions = this.options.labels,\n slotCount = Math.max(this.tickPositions.length - (this.categories ? 0 : 1), 1),\n 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,\n renderer = chart.renderer,\n tickPositions = this.tickPositions,\n ticks = this.ticks,\n labelOptions = this.options.labels,\n labelStyleOptions = labelOptions.style,\n horiz = this.horiz,\n slotWidth = this.getSlotWidth(),\n innerWidth = Math.max(1,\n Math.round(slotWidth - 2 * labelOptions.padding)),\n attr = {},\n labelMetrics = this.labelMetrics(),\n textOverflowOption = labelStyleOptions.textOverflow;\n var commonWidth,\n commonTextOverflow,\n maxLabelLength = 0,\n label,\n i,\n 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],\n label = tick && tick.label,\n widthOption = labelStyleOptions.width,\n 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,\n renderer = axis.chart.renderer,\n horiz = axis.horiz,\n opposite = axis.opposite,\n options = axis.options,\n axisTitleOptions = options.title,\n 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,\n 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,\n chart = axis.chart,\n horiz = axis.horiz,\n options = axis.options,\n side = axis.side,\n ticks = axis.ticks,\n tickPositions = axis.tickPositions,\n coll = axis.coll,\n axisParent = axis.axisParent // Used in color axis\n ,\n renderer = chart.renderer,\n invertedSide = (chart.inverted && !axis.isZAxis ?\n [1, 0, 3, 2][side] :\n side),\n hasData = axis.hasData(),\n axisTitleOptions = options.title,\n labelOptions = options.labels,\n axisOffset = chart.axisOffset,\n clipOffset = chart.clipOffset,\n directionFactor = [-1, 1, 1, -1][side],\n className = options.className;\n var showAxis,\n titleOffset = 0,\n titleOffsetOption,\n titleMargin = 0,\n labelOffset = 0, // reset\n labelOffsetPadded,\n 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,\n opposite = this.opposite,\n offset = this.offset,\n horiz = this.horiz,\n lineLeft = this.left + (opposite ? this.width : 0) + offset,\n 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,\n axisLeft = this.left,\n axisTop = this.top,\n axisLength = this.len,\n axisTitleOptions = this.options.title,\n margin = horiz ? axisLeft : axisTop,\n opposite = this.opposite,\n offset = this.offset,\n xOption = axisTitleOptions.x,\n yOption = axisTitleOptions.y,\n axisTitle = this.axisTitle,\n fontMetrics = this.chart.renderer.fontMetrics(axisTitleOptions.style.fontSize,\n 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],\n 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,\n isLinked = axis.isLinked,\n 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,\n chart = axis.chart,\n log = axis.logarithmic,\n renderer = chart.renderer,\n options = axis.options,\n isLinked = axis.isLinked,\n tickPositions = axis.tickPositions,\n axisTitle = axis.axisTitle,\n ticks = axis.ticks,\n minorTicks = axis.minorTicks,\n alternateBands = axis.alternateBands,\n stackLabelOptions = options.stackLabels,\n alternateGridColor = options.alternateGridColor,\n tickmarkOffset = axis.tickmarkOffset,\n axisLine = axis.axisLine,\n showAxis = axis.showAxis,\n animation = animObject(renderer.globalAnimation);\n var from,\n 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 = [],\n delay = animation.duration,\n 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,\n plotLinesAndBands = axis.plotLinesAndBands,\n 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,\n snap = pick(options && options.snap,\n true),\n chart = this.chart;\n var path,\n pos,\n categorized,\n graphic = this.cross,\n 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,\n 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 * */\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 return Axis;\n });\n _registerModule(_modules, 'Core/Axis/DateTimeAxis.js', [_modules['Core/Utilities.js']], function (U) {\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 var addEvent = U.addEvent,\n getMagnitude = U.getMagnitude,\n normalizeTickInterval = U.normalizeTickInterval,\n timeUnits = U.timeUnits;\n /* *\n *\n * Composition\n *\n * */\n /* eslint-disable valid-jsdoc */\n var DateTimeAxis;\n (function (DateTimeAxis) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n /* *\n *\n * Functions\n *\n * */\n /**\n * Extends axis class with date and time support.\n * @private\n */\n function compose(AxisClass) {\n if (composedClasses.indexOf(AxisClass) === -1) {\n composedClasses.push(AxisClass);\n AxisClass.keepProps.push('dateTime');\n var axisProto = AxisClass.prototype;\n axisProto.getTimeTicks = getTimeTicks;\n addEvent(AxisClass, 'init', onInit);\n }\n return AxisClass;\n }\n DateTimeAxis.compose = compose;\n /**\n * Set the tick positions to a time unit that makes sense, for example\n * on the first of each month or on every Monday. Return an array with\n * the time positions. Used in datetime axes as well as for grouping\n * data on a datetime axis.\n *\n * @private\n * @function Highcharts.Axis#getTimeTicks\n * @param {Highcharts.TimeNormalizeObject} normalizedInterval\n * The interval in axis values (ms) and thecount.\n * @param {number} min\n * The minimum in axis values.\n * @param {number} max\n * The maximum in axis values.\n */\n function getTimeTicks() {\n return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);\n }\n /**\n * @private\n */\n function onInit(e) {\n var axis = this;\n var options = e.userOptions;\n if (options.type !== 'datetime') {\n axis.dateTime = void 0;\n return;\n }\n if (!axis.dateTime) {\n axis.dateTime = new Additions(axis);\n }\n }\n /* *\n *\n * Classes\n *\n * */\n var Additions = /** @class */ (function () {\n /* *\n *\n * Constructors\n *\n * */\n function Additions(axis) {\n this.axis = axis;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Get a normalized tick interval for dates. Returns a configuration\n * object with unit range (interval), count and name. Used to prepare\n * data for `getTimeTicks`. Previously this logic was part of\n * getTimeTicks, but as `getTimeTicks` now runs of segments in stock\n * charts, the normalizing logic was extracted in order to prevent it\n * for running over again for each segment having the same interval.\n * #662, #697.\n * @private\n */\n Additions.prototype.normalizeTimeTickInterval = function (tickInterval, unitsOption) {\n var units = (unitsOption || [[\n // unit name\n 'millisecond',\n // allowed multiples\n [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]\n ],\n [\n 'second',\n [1, 2, 5, 10, 15, 30]\n ],\n [\n 'minute',\n [1, 2, 5, 10, 15, 30]\n ],\n [\n 'hour',\n [1, 2, 3, 4, 6, 8, 12]\n ],\n [\n 'day',\n [1, 2]\n ],\n [\n 'week',\n [1, 2]\n ],\n [\n 'month',\n [1, 2, 3, 4, 6]\n ],\n [\n 'year',\n null\n ]]);\n var unit = units[units.length - 1], // default unit is years\n interval = timeUnits[unit[0]],\n multiples = unit[1],\n i;\n // loop through the units to find the one that best fits the\n // tickInterval\n for (i = 0; i < units.length; i++) {\n unit = units[i];\n interval = timeUnits[unit[0]];\n multiples = unit[1];\n if (units[i + 1]) {\n // lessThan is in the middle between the highest multiple\n // and the next unit.\n var lessThan = (interval *\n multiples[multiples.length - 1] +\n timeUnits[units[i + 1][0]]) / 2;\n // break and keep the current unit\n if (tickInterval <= lessThan) {\n break;\n }\n }\n }\n // prevent 2.5 years intervals, though 25, 250 etc. are allowed\n if (interval === timeUnits.year && tickInterval < 5 * interval) {\n multiples = [1, 2, 5];\n }\n // get the count\n var count = normalizeTickInterval(tickInterval / interval,\n multiples,\n unit[0] === 'year' ? // #1913, #2360\n Math.max(getMagnitude(tickInterval / interval), 1) :\n 1);\n return {\n unitRange: interval,\n count: count,\n unitName: unit[0]\n };\n };\n /**\n * Get the best date format for a specific X value based on the closest\n * point range on the axis.\n *\n * @private\n */\n Additions.prototype.getXDateFormat = function (x, dateTimeLabelFormats) {\n var axis = this.axis,\n time = axis.chart.time;\n return axis.closestPointRange ?\n time.getDateFormat(axis.closestPointRange, x, axis.options.startOfWeek, dateTimeLabelFormats) ||\n // #2546, 2581\n time.resolveDTLFormat(dateTimeLabelFormats.year).main :\n time.resolveDTLFormat(dateTimeLabelFormats.day).main;\n };\n return Additions;\n }());\n DateTimeAxis.Additions = Additions;\n })(DateTimeAxis || (DateTimeAxis = {}));\n /* *\n *\n * Default Export\n *\n * */\n\n return DateTimeAxis;\n });\n _registerModule(_modules, 'Core/Axis/LogarithmicAxis.js', [_modules['Core/Utilities.js']], function (U) {\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 var addEvent = U.addEvent,\n getMagnitude = U.getMagnitude,\n normalizeTickInterval = U.normalizeTickInterval,\n pick = U.pick;\n /* *\n *\n * Class\n *\n * */\n /**\n * @private\n */\n var LogarithmicAxis;\n (function (LogarithmicAxis) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Provides logarithmic support for axes.\n * @private\n */\n function compose(AxisClass) {\n if (composedClasses.indexOf(AxisClass) === -1) {\n composedClasses.push(AxisClass);\n AxisClass.keepProps.push('logarithmic');\n addEvent(AxisClass, 'init', onInit);\n addEvent(AxisClass, 'afterInit', onAfterInit);\n }\n return AxisClass;\n }\n LogarithmicAxis.compose = compose;\n /**\n * @private\n */\n function onInit(e) {\n var axis = this;\n var options = e.userOptions;\n var logarithmic = axis.logarithmic;\n if (options.type !== 'logarithmic') {\n axis.logarithmic = void 0;\n }\n else {\n if (!logarithmic) {\n logarithmic = axis.logarithmic = new Additions(axis);\n }\n }\n }\n /**\n * @private\n */\n function onAfterInit() {\n var axis = this;\n var log = axis.logarithmic;\n // extend logarithmic axis\n if (log) {\n axis.lin2val = function (num) {\n return log.lin2log(num);\n };\n axis.val2lin = function (num) {\n return log.log2lin(num);\n };\n }\n }\n /* *\n *\n * Class\n *\n * */\n /**\n * Provides logarithmic support for axes.\n * @private\n * @class\n */\n var Additions = /** @class */ (function () {\n /* *\n *\n * Constructors\n *\n * */\n function Additions(axis) {\n this.axis = axis;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Set the tick positions of a logarithmic axis.\n */\n Additions.prototype.getLogTickPositions = function (interval, min, max, minor) {\n var log = this;\n var axis = log.axis;\n var axisLength = axis.len;\n var options = axis.options;\n // Since we use this method for both major and minor ticks,\n // use a local variable and return the result\n var positions = [];\n // Reset\n if (!minor) {\n log.minorAutoInterval = void 0;\n }\n // First case: All ticks fall on whole logarithms: 1, 10, 100 etc.\n if (interval >= 0.5) {\n interval = Math.round(interval);\n positions = axis.getLinearTickPositions(interval, min, max);\n // Second case: We need intermediary ticks. For example\n // 1, 2, 4, 6, 8, 10, 20, 40 etc.\n }\n else if (interval >= 0.08) {\n var roundedMin = Math.floor(min);\n var intermediate = void 0,\n i = void 0,\n j = void 0,\n len = void 0,\n pos = void 0,\n lastPos = void 0,\n break2 = void 0;\n if (interval > 0.3) {\n intermediate = [1, 2, 4];\n // 0.2 equals five minor ticks per 1, 10, 100 etc\n }\n else if (interval > 0.15) {\n intermediate = [1, 2, 4, 6, 8];\n }\n else { // 0.1 equals ten minor ticks per 1, 10, 100 etc\n intermediate = [1, 2, 3, 4, 5, 6, 7, 8, 9];\n }\n for (i = roundedMin; i < max + 1 && !break2; i++) {\n len = intermediate.length;\n for (j = 0; j < len && !break2; j++) {\n pos = log.log2lin(log.lin2log(i) * intermediate[j]);\n // #1670, lastPos is #3113\n if (pos > min &&\n (!minor || lastPos <= max) &&\n typeof lastPos !== 'undefined') {\n positions.push(lastPos);\n }\n if (lastPos > max) {\n break2 = true;\n }\n lastPos = pos;\n }\n }\n // Third case: We are so deep in between whole logarithmic values,\n // that we might as well handle the tick positions like a linear\n // axis. For example 1.01, 1.02, 1.03, 1.04.\n }\n else {\n var realMin = log.lin2log(min),\n realMax = log.lin2log(max),\n tickIntervalOption = minor ?\n axis.getMinorTickInterval() :\n options.tickInterval,\n filteredTickIntervalOption = tickIntervalOption === 'auto' ?\n null :\n tickIntervalOption,\n tickPixelIntervalOption = options.tickPixelInterval / (minor ? 5 : 1),\n totalPixelLength = minor ?\n axisLength / axis.tickPositions.length :\n axisLength;\n interval = pick(filteredTickIntervalOption, log.minorAutoInterval, (realMax - realMin) *\n tickPixelIntervalOption / (totalPixelLength || 1));\n interval = normalizeTickInterval(interval);\n positions = axis.getLinearTickPositions(interval, realMin, realMax).map(log.log2lin);\n if (!minor) {\n log.minorAutoInterval = interval / 5;\n }\n }\n // Set the axis-level tickInterval variable\n if (!minor) {\n axis.tickInterval = interval;\n }\n return positions;\n };\n Additions.prototype.lin2log = function (num) {\n return Math.pow(10, num);\n };\n Additions.prototype.log2lin = function (num) {\n return Math.log(num) / Math.LN10;\n };\n return Additions;\n }());\n LogarithmicAxis.Additions = Additions;\n })(LogarithmicAxis || (LogarithmicAxis = {}));\n /* *\n *\n * Default Export\n *\n * */\n\n return LogarithmicAxis;\n });\n _registerModule(_modules, 'Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js', [_modules['Core/Utilities.js']], function (U) {\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 var erase = U.erase,\n extend = U.extend,\n isNumber = U.isNumber;\n /* *\n *\n * Composition\n *\n * */\n var PlotLineOrBandAxis;\n (function (PlotLineOrBandAxis) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n /* *\n *\n * Variables\n *\n * */\n var PlotLineOrBandClass;\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * @private\n */\n function compose(PlotLineOrBandType, AxisClass) {\n if (!PlotLineOrBandClass) {\n PlotLineOrBandClass = PlotLineOrBandType;\n }\n if (composedClasses.indexOf(AxisClass) === -1) {\n composedClasses.push(AxisClass);\n extend(AxisClass.prototype, Additions.prototype);\n }\n return AxisClass;\n }\n PlotLineOrBandAxis.compose = compose;\n /* *\n *\n * Classes\n *\n * */\n /**\n * Object with members for extending the Axis prototype.\n * @private\n */\n var Additions = /** @class */ (function () {\n function Additions() {\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable no-invalid-this, valid-jsdoc */\n /**\n * Internal function to create the SVG path definition for a plot band.\n *\n * @function Highcharts.Axis#getPlotBandPath\n *\n * @param {number} from\n * The axis value to start from.\n *\n * @param {number} to\n * The axis value to end on.\n *\n * @param {Highcharts.AxisPlotBandsOptions|Highcharts.AxisPlotLinesOptions} options\n * The plotBand or plotLine configuration object.\n *\n * @return {Highcharts.SVGPathArray}\n * The SVG path definition in array form.\n */\n Additions.prototype.getPlotBandPath = function (from, to, options) {\n if (options === void 0) { options = this.options; }\n var toPath = this.getPlotLinePath({\n value: to,\n force: true,\n acrossPanes: options.acrossPanes\n }), result = [], horiz = this.horiz, outside = !isNumber(this.min) ||\n !isNumber(this.max) ||\n (from < this.min && to < this.min) ||\n (from > this.max && to > this.max);\n var path = this.getPlotLinePath({\n value: from,\n force: true,\n acrossPanes: options.acrossPanes\n }),\n i, \n // #4964 check if chart is inverted or plotband is on yAxis\n plus = 1,\n isFlat;\n if (path && toPath) {\n // Flat paths don't need labels (#3836)\n if (outside) {\n isFlat = path.toString() === toPath.toString();\n plus = 0;\n }\n // Go over each subpath - for panes in Highcharts Stock\n for (i = 0; i < path.length; i += 2) {\n var pathStart = path[i],\n pathEnd = path[i + 1],\n toPathStart = toPath[i],\n toPathEnd = toPath[i + 1];\n // Type checking all affected path segments. Consider\n // something smarter.\n if ((pathStart[0] === 'M' || pathStart[0] === 'L') &&\n (pathEnd[0] === 'M' || pathEnd[0] === 'L') &&\n (toPathStart[0] === 'M' || toPathStart[0] === 'L') &&\n (toPathEnd[0] === 'M' || toPathEnd[0] === 'L')) {\n // Add 1 pixel when coordinates are the same\n if (horiz && toPathStart[1] === pathStart[1]) {\n toPathStart[1] += plus;\n toPathEnd[1] += plus;\n }\n else if (!horiz && toPathStart[2] === pathStart[2]) {\n toPathStart[2] += plus;\n toPathEnd[2] += plus;\n }\n result.push(['M', pathStart[1], pathStart[2]], ['L', pathEnd[1], pathEnd[2]], ['L', toPathEnd[1], toPathEnd[2]], ['L', toPathStart[1], toPathStart[2]], ['Z']);\n }\n result.isFlat = isFlat;\n }\n }\n else { // outside the axis area\n path = null;\n }\n return result;\n };\n /**\n * Add a plot band after render time.\n *\n * @sample highcharts/members/axis-addplotband/\n * Toggle the plot band from a button\n *\n * @function Highcharts.Axis#addPlotBand\n *\n * @param {Highcharts.AxisPlotBandsOptions} options\n * A configuration object for the plot band, as defined in\n * [xAxis.plotBands](https://api.highcharts.com/highcharts/xAxis.plotBands).\n *\n * @return {Highcharts.PlotLineOrBand|undefined}\n * The added plot band.\n */\n Additions.prototype.addPlotBand = function (options) {\n return this.addPlotBandOrLine(options, 'plotBands');\n };\n /**\n * Add a plot line after render time.\n *\n * @sample highcharts/members/axis-addplotline/\n * Toggle the plot line from a button\n *\n * @function Highcharts.Axis#addPlotLine\n *\n * @param {Highcharts.AxisPlotLinesOptions} options\n * A configuration object for the plot line, as defined in\n * [xAxis.plotLines](https://api.highcharts.com/highcharts/xAxis.plotLines).\n *\n * @return {Highcharts.PlotLineOrBand|undefined}\n * The added plot line.\n */\n Additions.prototype.addPlotLine = function (options) {\n return this.addPlotBandOrLine(options, 'plotLines');\n };\n /**\n * Add a plot band or plot line after render time. Called from\n * addPlotBand and addPlotLine internally.\n *\n * @private\n * @function Highcharts.Axis#addPlotBandOrLine\n * @param {Highcharts.AxisPlotBandsOptions|Highcharts.AxisPlotLinesOptions} options\n * The plotBand or plotLine configuration object.\n */\n Additions.prototype.addPlotBandOrLine = function (options, coll) {\n var _this = this;\n var userOptions = this.userOptions;\n var obj = new PlotLineOrBandClass(this,\n options);\n if (this.visible) {\n obj = obj.render();\n }\n if (obj) { // #2189\n if (!this._addedPlotLB) {\n this._addedPlotLB = true;\n (userOptions.plotLines || [])\n .concat(userOptions.plotBands || [])\n .forEach(function (plotLineOptions) {\n _this.addPlotBandOrLine(plotLineOptions);\n });\n }\n // Add it to the user options for exporting and Axis.update\n if (coll) {\n // Workaround Microsoft/TypeScript issue #32693\n var updatedOptions = (userOptions[coll] || []);\n updatedOptions.push(options);\n userOptions[coll] = updatedOptions;\n }\n this.plotLinesAndBands.push(obj);\n }\n return obj;\n };\n /**\n * Remove a plot band or plot line from the chart by id. Called\n * internally from `removePlotBand` and `removePlotLine`.\n * @private\n * @function Highcharts.Axis#removePlotBandOrLine\n */\n Additions.prototype.removePlotBandOrLine = function (id) {\n var plotLinesAndBands = this.plotLinesAndBands,\n options = this.options,\n userOptions = this.userOptions;\n if (plotLinesAndBands) { // #15639\n var i_1 = plotLinesAndBands.length;\n while (i_1--) {\n if (plotLinesAndBands[i_1].id === id) {\n plotLinesAndBands[i_1].destroy();\n }\n }\n ([\n options.plotLines || [],\n userOptions.plotLines || [],\n options.plotBands || [],\n userOptions.plotBands || []\n ]).forEach(function (arr) {\n i_1 = arr.length;\n while (i_1--) {\n if ((arr[i_1] || {}).id === id) {\n erase(arr, arr[i_1]);\n }\n }\n });\n }\n };\n /**\n * Remove a plot band by its id.\n *\n * @sample highcharts/members/axis-removeplotband/\n * Remove plot band by id\n * @sample highcharts/members/axis-addplotband/\n * Toggle the plot band from a button\n *\n * @function Highcharts.Axis#removePlotBand\n *\n * @param {string} id\n * The plot band's `id` as given in the original configuration\n * object or in the `addPlotBand` option.\n */\n Additions.prototype.removePlotBand = function (id) {\n this.removePlotBandOrLine(id);\n };\n /**\n * Remove a plot line by its id.\n *\n * @sample highcharts/xaxis/plotlines-id/\n * Remove plot line by id\n * @sample highcharts/members/axis-addplotline/\n * Toggle the plot line from a button\n *\n * @function Highcharts.Axis#removePlotLine\n *\n * @param {string} id\n * The plot line's `id` as given in the original configuration\n * object or in the `addPlotLine` option.\n */\n Additions.prototype.removePlotLine = function (id) {\n this.removePlotBandOrLine(id);\n };\n return Additions;\n }());\n })(PlotLineOrBandAxis || (PlotLineOrBandAxis = {}));\n /* *\n *\n * Default Export\n *\n * */\n\n return PlotLineOrBandAxis;\n });\n _registerModule(_modules, 'Core/Axis/PlotLineOrBand/PlotLineOrBand.js', [_modules['Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js'], _modules['Core/Utilities.js']], function (PlotLineOrBandAxis, U) {\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 var arrayMax = U.arrayMax,\n arrayMin = U.arrayMin,\n defined = U.defined,\n destroyObjectProperties = U.destroyObjectProperties,\n erase = U.erase,\n fireEvent = U.fireEvent,\n merge = U.merge,\n objectEach = U.objectEach,\n pick = U.pick;\n /* *\n *\n * Class\n *\n * */\n /**\n * The object wrapper for plot lines and plot bands\n *\n * @class\n * @name Highcharts.PlotLineOrBand\n *\n * @param {Highcharts.Axis} axis\n * Related axis.\n *\n * @param {Highcharts.AxisPlotLinesOptions|Highcharts.AxisPlotBandsOptions} [options]\n * Options to use.\n */\n var PlotLineOrBand = /** @class */ (function () {\n /* *\n *\n * Constructor\n *\n * */\n function PlotLineOrBand(axis, options) {\n this.axis = axis;\n if (options) {\n this.options = options;\n this.id = options.id;\n }\n }\n /* *\n *\n * Static Functions\n *\n * */\n PlotLineOrBand.compose = function (AxisClass) {\n return PlotLineOrBandAxis.compose(PlotLineOrBand, AxisClass);\n };\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable no-invalid-this, valid-jsdoc */\n /**\n * Render the plot line or plot band. If it is already existing,\n * move it.\n * @private\n * @function Highcharts.PlotLineOrBand#render\n */\n PlotLineOrBand.prototype.render = function () {\n fireEvent(this, 'render');\n var plotLine = this,\n axis = plotLine.axis,\n horiz = axis.horiz,\n log = axis.logarithmic,\n options = plotLine.options,\n color = options.color,\n zIndex = pick(options.zIndex, 0),\n events = options.events,\n groupAttribs = {},\n renderer = axis.chart.renderer;\n var optionsLabel = options.label,\n label = plotLine.label,\n to = options.to,\n from = options.from,\n value = options.value,\n svgElem = plotLine.svgElem,\n path = [],\n group;\n var isBand = defined(from) && defined(to),\n isLine = defined(value),\n isNew = !svgElem,\n attribs = {\n 'class': 'highcharts-plot-' + (isBand ? 'band ' : 'line ') +\n (options.className || '')\n };\n var groupName = isBand ? 'bands' : 'lines';\n // logarithmic conversion\n if (log) {\n from = log.log2lin(from);\n to = log.log2lin(to);\n value = log.log2lin(value);\n }\n // Set the presentational attributes\n if (!axis.chart.styledMode) {\n if (isLine) {\n attribs.stroke = color || \"#999999\" /* Palette.neutralColor40 */;\n attribs['stroke-width'] = pick(options.width, 1);\n if (options.dashStyle) {\n attribs.dashstyle =\n options.dashStyle;\n }\n }\n else if (isBand) { // plot band\n attribs.fill = color || \"#e6ebf5\" /* Palette.highlightColor10 */;\n if (options.borderWidth) {\n attribs.stroke = options.borderColor;\n attribs['stroke-width'] = options.borderWidth;\n }\n }\n }\n // Grouping and zIndex\n groupAttribs.zIndex = zIndex;\n groupName += '-' + zIndex;\n group = axis.plotLinesAndBandsGroups[groupName];\n if (!group) {\n axis.plotLinesAndBandsGroups[groupName] = group =\n renderer.g('plot-' + groupName)\n .attr(groupAttribs).add();\n }\n // Create the path\n if (isNew) {\n /**\n * SVG element of the plot line or band.\n *\n * @name Highcharts.PlotLineOrBand#svgElem\n * @type {Highcharts.SVGElement}\n */\n plotLine.svgElem = svgElem = renderer\n .path()\n .attr(attribs)\n .add(group);\n }\n // Set the path or return\n if (isLine) {\n path = axis.getPlotLinePath({\n value: value,\n lineWidth: svgElem.strokeWidth(),\n acrossPanes: options.acrossPanes\n });\n }\n else if (isBand) { // plot band\n path = axis.getPlotBandPath(from, to, options);\n }\n else {\n return;\n }\n // common for lines and bands\n // Add events only if they were not added before.\n if (!plotLine.eventsAdded && events) {\n objectEach(events, function (event, eventType) {\n svgElem.on(eventType, function (e) {\n events[eventType].apply(plotLine, [e]);\n });\n });\n plotLine.eventsAdded = true;\n }\n if ((isNew || !svgElem.d) && path && path.length) {\n svgElem.attr({ d: path });\n }\n else if (svgElem) {\n if (path) {\n svgElem.show();\n svgElem.animate({ d: path });\n }\n else if (svgElem.d) {\n svgElem.hide();\n if (label) {\n plotLine.label = label = label.destroy();\n }\n }\n }\n // the plot band/line label\n if (optionsLabel &&\n (defined(optionsLabel.text) || defined(optionsLabel.formatter)) &&\n path &&\n path.length &&\n axis.width > 0 &&\n axis.height > 0 &&\n !path.isFlat) {\n // apply defaults\n optionsLabel = merge({\n align: horiz && isBand && 'center',\n x: horiz ? !isBand && 4 : 10,\n verticalAlign: !horiz && isBand && 'middle',\n y: horiz ? isBand ? 16 : 10 : isBand ? 6 : -4,\n rotation: horiz && !isBand && 90\n }, optionsLabel);\n this.renderLabel(optionsLabel, path, isBand, zIndex);\n }\n else if (label) { // move out of sight\n label.hide();\n }\n // chainable\n return plotLine;\n };\n /**\n * Render and align label for plot line or band.\n * @private\n * @function Highcharts.PlotLineOrBand#renderLabel\n */\n PlotLineOrBand.prototype.renderLabel = function (optionsLabel, path, isBand, zIndex) {\n var plotLine = this,\n axis = plotLine.axis,\n renderer = axis.chart.renderer;\n var label = plotLine.label;\n // add the SVG element\n if (!label) {\n /**\n * SVG element of the label.\n *\n * @name Highcharts.PlotLineOrBand#label\n * @type {Highcharts.SVGElement}\n */\n plotLine.label = label = renderer\n .text(this.getLabelText(optionsLabel), 0, 0, optionsLabel.useHTML)\n .attr({\n align: optionsLabel.textAlign || optionsLabel.align,\n rotation: optionsLabel.rotation,\n 'class': 'highcharts-plot-' + (isBand ? 'band' : 'line') +\n '-label ' + (optionsLabel.className || ''),\n zIndex: zIndex\n })\n .add();\n if (!axis.chart.styledMode) {\n label.css(merge({\n textOverflow: 'ellipsis'\n }, optionsLabel.style));\n }\n }\n // get the bounding box and align the label\n // #3000 changed to better handle choice between plotband or plotline\n var xBounds = path.xBounds ||\n [path[0][1],\n path[1][1], (isBand ? path[2][1] : path[0][1])];\n var yBounds = path.yBounds ||\n [path[0][2],\n path[1][2], (isBand ? path[2][2] : path[0][2])];\n var x = arrayMin(xBounds);\n var y = arrayMin(yBounds);\n label.align(optionsLabel, false, {\n x: x,\n y: y,\n width: arrayMax(xBounds) - x,\n height: arrayMax(yBounds) - y\n });\n if (!label.alignValue || label.alignValue === 'left') {\n var width = optionsLabel.clip ?\n axis.width : axis.chart.chartWidth;\n label.css({\n width: (label.rotation === 90 ?\n axis.height - (label.alignAttr.y - axis.top) :\n width - (label.alignAttr.x - axis.left)) + 'px'\n });\n }\n label.show(true);\n };\n /**\n * Get label's text content.\n * @private\n * @function Highcharts.PlotLineOrBand#getLabelText\n */\n PlotLineOrBand.prototype.getLabelText = function (optionsLabel) {\n return defined(optionsLabel.formatter) ?\n optionsLabel.formatter\n .call(this) :\n optionsLabel.text;\n };\n /**\n * Remove the plot line or band.\n *\n * @function Highcharts.PlotLineOrBand#destroy\n */\n PlotLineOrBand.prototype.destroy = function () {\n // remove it from the lookup\n erase(this.axis.plotLinesAndBands, this);\n delete this.axis;\n destroyObjectProperties(this);\n };\n return PlotLineOrBand;\n }());\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Options\n *\n * */\n /**\n * Options for plot bands on axes.\n *\n * @typedef {Highcharts.XAxisPlotBandsOptions|Highcharts.YAxisPlotBandsOptions|Highcharts.ZAxisPlotBandsOptions} Highcharts.AxisPlotBandsOptions\n */\n /**\n * Options for plot band labels on axes.\n *\n * @typedef {Highcharts.XAxisPlotBandsLabelOptions|Highcharts.YAxisPlotBandsLabelOptions|Highcharts.ZAxisPlotBandsLabelOptions} Highcharts.AxisPlotBandsLabelOptions\n */\n /**\n * Options for plot lines on axes.\n *\n * @typedef {Highcharts.XAxisPlotLinesOptions|Highcharts.YAxisPlotLinesOptions|Highcharts.ZAxisPlotLinesOptions} Highcharts.AxisPlotLinesOptions\n */\n /**\n * Options for plot line labels on axes.\n *\n * @typedef {Highcharts.XAxisPlotLinesLabelOptions|Highcharts.YAxisPlotLinesLabelOptions|Highcharts.ZAxisPlotLinesLabelOptions} Highcharts.AxisPlotLinesLabelOptions\n */\n ('');\n /* *\n *\n * API Options\n *\n * */\n /**\n * An array of colored bands stretching across the plot area marking an\n * interval on the axis.\n *\n * In styled mode, the plot bands are styled by the `.highcharts-plot-band`\n * class in addition to the `className` option.\n *\n * @productdesc {highcharts}\n * In a gauge, a plot band on the Y axis (value axis) will stretch along the\n * perimeter of the gauge.\n *\n * @type {Array<*>}\n * @product highcharts highstock gantt\n * @apioption xAxis.plotBands\n */\n /**\n * Flag to decide if plotBand should be rendered across all panes.\n *\n * @since 7.1.2\n * @product highstock\n * @type {boolean}\n * @default true\n * @apioption xAxis.plotBands.acrossPanes\n */\n /**\n * Border color for the plot band. Also requires `borderWidth` to be set.\n *\n * @type {Highcharts.ColorString}\n * @apioption xAxis.plotBands.borderColor\n */\n /**\n * Border width for the plot band. Also requires `borderColor` to be set.\n *\n * @type {number}\n * @default 0\n * @apioption xAxis.plotBands.borderWidth\n */\n /**\n * A custom class name, in addition to the default `highcharts-plot-band`,\n * to apply to each individual band.\n *\n * @type {string}\n * @since 5.0.0\n * @apioption xAxis.plotBands.className\n */\n /**\n * The color of the plot band.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-color/\n * Color band\n * @sample {highstock} stock/xaxis/plotbands/\n * Plot band on Y axis\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @default #e6ebf5\n * @apioption xAxis.plotBands.color\n */\n /**\n * An object defining mouse events for the plot band. Supported properties\n * are `click`, `mouseover`, `mouseout`, `mousemove`.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-events/\n * Mouse events demonstrated\n *\n * @since 1.2\n * @apioption xAxis.plotBands.events\n */\n /**\n * Click event on a plot band.\n *\n * @type {Highcharts.EventCallbackFunction}\n * @apioption xAxis.plotBands.events.click\n */\n /**\n * Mouse move event on a plot band.\n *\n * @type {Highcharts.EventCallbackFunction}\n * @apioption xAxis.plotBands.events.mousemove\n */\n /**\n * Mouse out event on the corner of a plot band.\n *\n * @type {Highcharts.EventCallbackFunction}\n * @apioption xAxis.plotBands.events.mouseout\n */\n /**\n * Mouse over event on a plot band.\n *\n * @type {Highcharts.EventCallbackFunction}\n * @apioption xAxis.plotBands.events.mouseover\n */\n /**\n * The start position of the plot band in axis units.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-color/\n * Datetime axis\n * @sample {highcharts} highcharts/xaxis/plotbands-from/\n * Categorized axis\n * @sample {highstock} stock/xaxis/plotbands/\n * Plot band on Y axis\n *\n * @type {number}\n * @apioption xAxis.plotBands.from\n */\n /**\n * An id used for identifying the plot band in Axis.removePlotBand.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-id/\n * Remove plot band by id\n * @sample {highstock} highcharts/xaxis/plotbands-id/\n * Remove plot band by id\n *\n * @type {string}\n * @apioption xAxis.plotBands.id\n */\n /**\n * The end position of the plot band in axis units.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-color/\n * Datetime axis\n * @sample {highcharts} highcharts/xaxis/plotbands-from/\n * Categorized axis\n * @sample {highstock} stock/xaxis/plotbands/\n * Plot band on Y axis\n *\n * @type {number}\n * @apioption xAxis.plotBands.to\n */\n /**\n * The z index of the plot band within the chart, relative to other\n * elements. Using the same z index as another element may give\n * unpredictable results, as the last rendered element will be on top.\n * Values from 0 to 20 make sense.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-color/\n * Behind plot lines by default\n * @sample {highcharts} highcharts/xaxis/plotbands-zindex/\n * Above plot lines\n * @sample {highcharts} highcharts/xaxis/plotbands-zindex-above-series/\n * Above plot lines and series\n *\n * @type {number}\n * @since 1.2\n * @apioption xAxis.plotBands.zIndex\n */\n /**\n * Text labels for the plot bands\n *\n * @product highcharts highstock gantt\n * @apioption xAxis.plotBands.label\n */\n /**\n * Horizontal alignment of the label. Can be one of \"left\", \"center\" or\n * \"right\".\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-label-align/\n * Aligned to the right\n * @sample {highstock} stock/xaxis/plotbands-label/\n * Plot band with labels\n *\n * @type {Highcharts.AlignValue}\n * @default center\n * @since 2.1\n * @apioption xAxis.plotBands.label.align\n */\n /**\n * Rotation of the text label in degrees .\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-label-rotation/\n * Vertical text\n *\n * @type {number}\n * @default 0\n * @since 2.1\n * @apioption xAxis.plotBands.label.rotation\n */\n /**\n * CSS styles for the text label.\n *\n * In styled mode, the labels are styled by the\n * `.highcharts-plot-band-label` class.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-label-style/\n * Blue and bold label\n *\n * @type {Highcharts.CSSObject}\n * @since 2.1\n * @apioption xAxis.plotBands.label.style\n */\n /**\n * The string text itself. A subset of HTML is supported.\n *\n * @type {string}\n * @since 2.1\n * @apioption xAxis.plotBands.label.text\n */\n /**\n * The text alignment for the label. While `align` determines where the\n * texts anchor point is placed within the plot band, `textAlign` determines\n * how the text is aligned against its anchor point. Possible values are\n * \"left\", \"center\" and \"right\". Defaults to the same as the `align` option.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-label-rotation/\n * Vertical text in center position but text-aligned left\n *\n * @type {Highcharts.AlignValue}\n * @since 2.1\n * @apioption xAxis.plotBands.label.textAlign\n */\n /**\n * Whether to [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the labels.\n *\n * @type {boolean}\n * @default false\n * @since 3.0.3\n * @apioption xAxis.plotBands.label.useHTML\n */\n /**\n * Vertical alignment of the label relative to the plot band. Can be one of\n * \"top\", \"middle\" or \"bottom\".\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-label-verticalalign/\n * Vertically centered label\n * @sample {highstock} stock/xaxis/plotbands-label/\n * Plot band with labels\n *\n * @type {Highcharts.VerticalAlignValue}\n * @default top\n * @since 2.1\n * @apioption xAxis.plotBands.label.verticalAlign\n */\n /**\n * Horizontal position relative the alignment. Default varies by\n * orientation.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-label-align/\n * Aligned 10px from the right edge\n * @sample {highstock} stock/xaxis/plotbands-label/\n * Plot band with labels\n *\n * @type {number}\n * @since 2.1\n * @apioption xAxis.plotBands.label.x\n */\n /**\n * Vertical position of the text baseline relative to the alignment. Default\n * varies by orientation.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-label-y/\n * Label on x axis\n * @sample {highstock} stock/xaxis/plotbands-label/\n * Plot band with labels\n *\n * @type {number}\n * @since 2.1\n * @apioption xAxis.plotBands.label.y\n */\n /**\n * An array of lines stretching across the plot area, marking a specific\n * value on one of the axes.\n *\n * In styled mode, the plot lines are styled by the\n * `.highcharts-plot-line` class in addition to the `className` option.\n *\n * @type {Array<*>}\n * @product highcharts highstock gantt\n * @sample {highcharts} highcharts/xaxis/plotlines-color/\n * Basic plot line\n * @sample {highcharts} highcharts/series-solidgauge/labels-auto-aligned/\n * Solid gauge plot line\n * @apioption xAxis.plotLines\n */\n /**\n * Flag to decide if plotLine should be rendered across all panes.\n *\n * @sample {highstock} stock/xaxis/plotlines-acrosspanes/\n * Plot lines on different panes\n *\n * @since 7.1.2\n * @product highstock\n * @type {boolean}\n * @default true\n * @apioption xAxis.plotLines.acrossPanes\n */\n /**\n * A custom class name, in addition to the default `highcharts-plot-line`,\n * to apply to each individual line.\n *\n * @type {string}\n * @since 5.0.0\n * @apioption xAxis.plotLines.className\n */\n /**\n * The color of the line.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-color/\n * A red line from X axis\n * @sample {highstock} stock/xaxis/plotlines/\n * Plot line on Y axis\n *\n * @type {Highcharts.ColorString}\n * @default #999999\n * @apioption xAxis.plotLines.color\n */\n /**\n * The dashing or dot style for the plot line. For possible values see\n * [this overview](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-dashstyle-all/).\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-dashstyle/\n * Dash and dot pattern\n * @sample {highstock} stock/xaxis/plotlines/\n * Plot line on Y axis\n *\n * @type {Highcharts.DashStyleValue}\n * @default Solid\n * @since 1.2\n * @apioption xAxis.plotLines.dashStyle\n */\n /**\n * An object defining mouse events for the plot line. Supported\n * properties are `click`, `mouseover`, `mouseout`, `mousemove`.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-events/\n * Mouse events demonstrated\n *\n * @since 1.2\n * @apioption xAxis.plotLines.events\n */\n /**\n * Click event on a plot band.\n *\n * @type {Highcharts.EventCallbackFunction}\n * @apioption xAxis.plotLines.events.click\n */\n /**\n * Mouse move event on a plot band.\n *\n * @type {Highcharts.EventCallbackFunction}\n * @apioption xAxis.plotLines.events.mousemove\n */\n /**\n * Mouse out event on the corner of a plot band.\n *\n * @type {Highcharts.EventCallbackFunction}\n * @apioption xAxis.plotLines.events.mouseout\n */\n /**\n * Mouse over event on a plot band.\n *\n * @type {Highcharts.EventCallbackFunction}\n * @apioption xAxis.plotLines.events.mouseover\n */\n /**\n * An id used for identifying the plot line in Axis.removePlotLine.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-id/\n * Remove plot line by id\n *\n * @type {string}\n * @apioption xAxis.plotLines.id\n */\n /**\n * The position of the line in axis units.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-color/\n * Between two categories on X axis\n * @sample {highstock} stock/xaxis/plotlines/\n * Plot line on Y axis\n *\n * @type {number}\n * @apioption xAxis.plotLines.value\n */\n /**\n * The width or thickness of the plot line.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-color/\n * 2px wide line from X axis\n * @sample {highstock} stock/xaxis/plotlines/\n * Plot line on Y axis\n *\n * @type {number}\n * @default 2\n * @apioption xAxis.plotLines.width\n */\n /**\n * The z index of the plot line within the chart.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-zindex-behind/\n * Behind plot lines by default\n * @sample {highcharts} highcharts/xaxis/plotlines-zindex-above/\n * Above plot lines\n * @sample {highcharts} highcharts/xaxis/plotlines-zindex-above-all/\n * Above plot lines and series\n *\n * @type {number}\n * @since 1.2\n * @apioption xAxis.plotLines.zIndex\n */\n /**\n * Text labels for the plot bands\n *\n * @apioption xAxis.plotLines.label\n */\n /**\n * Horizontal alignment of the label. Can be one of \"left\", \"center\" or\n * \"right\".\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-label-align-right/\n * Aligned to the right\n * @sample {highstock} stock/xaxis/plotlines/\n * Plot line on Y axis\n *\n * @type {Highcharts.AlignValue}\n * @default left\n * @since 2.1\n * @apioption xAxis.plotLines.label.align\n */\n /**\n * Whether to hide labels that are outside the plot area.\n *\n * @type {boolean}\n * @default false\n * @since 10.3.3\n * @apioption xAxis.plotLines.labels.clip\n */\n /**\n * Callback JavaScript function to format the label. Useful properties like\n * the value of plot line or the range of plot band (`from` & `to`\n * properties) can be found in `this.options` object.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-plotbands-label-formatter\n * Label formatters for plot line and plot band.\n * @type {Highcharts.FormatterCallbackFunction}\n * @apioption xAxis.plotLines.label.formatter\n */\n /**\n * Rotation of the text label in degrees. Defaults to 0 for horizontal plot\n * lines and 90 for vertical lines.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-label-verticalalign-middle/\n * Slanted text\n *\n * @type {number}\n * @since 2.1\n * @apioption xAxis.plotLines.label.rotation\n */\n /**\n * CSS styles for the text label.\n *\n * In styled mode, the labels are styled by the\n * `.highcharts-plot-line-label` class.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-label-style/\n * Blue and bold label\n *\n * @type {Highcharts.CSSObject}\n * @since 2.1\n * @apioption xAxis.plotLines.label.style\n */\n /**\n * The text itself. A subset of HTML is supported.\n *\n * @type {string}\n * @since 2.1\n * @apioption xAxis.plotLines.label.text\n */\n /**\n * The text alignment for the label. While `align` determines where the\n * texts anchor point is placed within the plot band, `textAlign` determines\n * how the text is aligned against its anchor point. Possible values are\n * \"left\", \"center\" and \"right\". Defaults to the same as the `align` option.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-label-textalign/\n * Text label in bottom position\n *\n * @type {Highcharts.AlignValue}\n * @since 2.1\n * @apioption xAxis.plotLines.label.textAlign\n */\n /**\n * Whether to [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the labels.\n *\n * @type {boolean}\n * @default false\n * @since 3.0.3\n * @apioption xAxis.plotLines.label.useHTML\n */\n /**\n * Vertical alignment of the label relative to the plot line. Can be\n * one of \"top\", \"middle\" or \"bottom\".\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-label-verticalalign-middle/\n * Vertically centered label\n *\n * @type {Highcharts.VerticalAlignValue}\n * @default {highcharts} top\n * @default {highstock} top\n * @since 2.1\n * @apioption xAxis.plotLines.label.verticalAlign\n */\n /**\n * Horizontal position relative the alignment. Default varies by\n * orientation.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-label-align-right/\n * Aligned 10px from the right edge\n * @sample {highstock} stock/xaxis/plotlines/\n * Plot line on Y axis\n *\n * @type {number}\n * @since 2.1\n * @apioption xAxis.plotLines.label.x\n */\n /**\n * Vertical position of the text baseline relative to the alignment. Default\n * varies by orientation.\n *\n * @sample {highcharts} highcharts/xaxis/plotlines-label-y/\n * Label below the plot line\n * @sample {highstock} stock/xaxis/plotlines/\n * Plot line on Y axis\n *\n * @type {number}\n * @since 2.1\n * @apioption xAxis.plotLines.label.y\n */\n /**\n * @type {Array<*>}\n * @extends xAxis.plotBands\n * @apioption yAxis.plotBands\n */\n /**\n * In a gauge chart, this option determines the inner radius of the\n * plot band that stretches along the perimeter. It can be given as\n * a percentage string, like `\"100%\"`, or as a pixel number, like `100`.\n * By default, the inner radius is controlled by the [thickness](\n * #yAxis.plotBands.thickness) option.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-gauge\n * Gauge plot band\n *\n * @type {number|string}\n * @since 2.3\n * @product highcharts\n * @apioption yAxis.plotBands.innerRadius\n */\n /**\n * In a gauge chart, this option determines the outer radius of the\n * plot band that stretches along the perimeter. It can be given as\n * a percentage string, like `\"100%\"`, or as a pixel number, like `100`.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-gauge\n * Gauge plot band\n *\n * @type {number|string}\n * @default 100%\n * @since 2.3\n * @product highcharts\n * @apioption yAxis.plotBands.outerRadius\n */\n /**\n * In a gauge chart, this option sets the width of the plot band\n * stretching along the perimeter. It can be given as a percentage\n * string, like `\"10%\"`, or as a pixel number, like `10`. The default\n * value 10 is the same as the default [tickLength](#yAxis.tickLength),\n * thus making the plot band act as a background for the tick markers.\n *\n * @sample {highcharts} highcharts/xaxis/plotbands-gauge\n * Gauge plot band\n *\n * @type {number|string}\n * @default 10\n * @since 2.3\n * @product highcharts\n * @apioption yAxis.plotBands.thickness\n */\n /**\n * @type {Array<*>}\n * @extends xAxis.plotLines\n * @apioption yAxis.plotLines\n */\n (''); // keeps doclets above in JS file\n\n return PlotLineOrBand;\n });\n _registerModule(_modules, 'Core/Tooltip.js', [_modules['Core/FormatUtilities.js'], _modules['Core/Globals.js'], _modules['Core/Renderer/RendererUtilities.js'], _modules['Core/Renderer/RendererRegistry.js'], _modules['Core/Utilities.js']], function (F, H, R, RendererRegistry, U) {\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 var format = F.format;\n var doc = H.doc;\n var distribute = R.distribute;\n var addEvent = U.addEvent,\n clamp = U.clamp,\n css = U.css,\n defined = U.defined,\n discardElement = U.discardElement,\n extend = U.extend,\n fireEvent = U.fireEvent,\n isArray = U.isArray,\n isNumber = U.isNumber,\n isString = U.isString,\n merge = U.merge,\n pick = U.pick,\n splat = U.splat,\n 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 */\n var 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,\n pointer = chart.pointer,\n inverted = chart.inverted,\n plotTop = chart.plotTop,\n 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,\n 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,\n series = point.series,\n 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,\n styledMode = this.chart.styledMode,\n options = this.options,\n doSplit = this.split && this.allowShared,\n pointerEvents = (options.style.pointerEvents ||\n (this.shouldStickOnContact() ? 'auto' : 'none'));\n var container,\n 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,\n 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,\n 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,\n distance = this.distance,\n ret = {}, \n // Don't use h if chart isn't inverted (#7242) ???\n h = (chart.inverted && point.h) || 0, // #4117 ???\n outside = this.outside,\n outerWidth = outside ?\n // substract distance to prevent scrollbars\n doc.documentElement.clientWidth - 2 * distance :\n chart.chartWidth,\n outerHeight = outside ?\n Math.max(doc.body.scrollHeight,\n doc.documentElement.scrollHeight,\n doc.body.offsetHeight,\n doc.documentElement.offsetHeight,\n doc.documentElement.clientHeight) :\n chart.chartHeight,\n chartPosition = chart.pointer.getChartPosition(),\n scaleX = function (val) { return ( // eslint-disable-line no-confusing-arrow\n val * chartPosition.scaleX); },\n 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,\n it will look for space\n * there.\n *\n * @private\n */\n firstDimension = function (dim,\n outerSize,\n innerSize,\n scaledInnerSize, // #11329\n point,\n min,\n max) {\n var scaledDist = outside ?\n (dim === 'y' ? scaleY(distance) : scaleX(distance)) :\n distance,\n scaleDiff = (innerSize - scaledInnerSize) / 2,\n roomLeft = scaledInnerSize < point - distance,\n roomRight = point + distance + scaledInnerSize < outerSize,\n alignedLeft = point - scaledDist - innerSize + scaleDiff,\n 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,\n now = tooltip.now,\n 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),\n 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,\n chart = this.chart,\n options = tooltip.options,\n pointer = chart.pointer,\n points = splat(pointOrPoints),\n point = points[0],\n pointConfig = [],\n formatter = options.formatter || tooltip.defaultFormatter,\n shared = tooltip.shared,\n 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,\n mouseEvent),\n x = anchor[0],\n 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,\n 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,\n _a = tooltip.chart,\n chartWidth = _a.chartWidth,\n chartHeight = _a.chartHeight,\n plotHeight = _a.plotHeight,\n plotLeft = _a.plotLeft,\n plotTop = _a.plotTop,\n pointer = _a.pointer,\n _b = _a.scrollablePixelsY,\n scrollablePixelsY = _b === void 0 ? 0 : _b,\n scrollablePixelsX = _a.scrollablePixelsX,\n _c = _a.scrollingContainer,\n _d = _c === void 0 ? { scrollLeft: 0,\n scrollTop: 0 } : _c,\n scrollLeft = _d.scrollLeft,\n scrollTop = _d.scrollTop,\n styledMode = _a.styledMode,\n distance = tooltip.distance,\n options = tooltip.options,\n 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(),\n chartLeft = _e.left,\n 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,\n _a = point.plotX,\n plotX = _a === void 0 ? 0 : _a,\n _b = point.plotY,\n plotY = _b === void 0 ? 0 : _b,\n 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,\n 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,\n 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,\n points.length + 1).reduce(function (boxes,\n str,\n 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,\n point,\n 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),\n anchorX = _a.anchorX,\n anchorY = _a.anchorY;\n if (typeof anchorY === 'number') {\n var size = bBox.height + 1;\n var boxPosition = (positioner ?\n positioner.call(tooltip,\n boxWidth,\n size,\n point) :\n defaultPositioner(anchorX,\n anchorY,\n isHeader,\n 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,\n box.anchorY,\n box.point.isHeader,\n box.boxWidth,\n false),\n x = _a.x,\n 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,\n boxWidth = box.boxWidth,\n 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,\n anchorX = box.anchorX,\n anchorY = box.anchorY,\n pos = box.pos,\n 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,\n 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,\n outside = tooltip.outside,\n renderer = tooltip.renderer;\n if (outside && container && renderer) {\n // Set container size to fit the bounds\n var _f = tooltipLabel.getBBox(),\n width = _f.width,\n height = _f.height,\n x = _f.x,\n 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,\n tooltipOptions = series.tooltipOptions,\n xAxis = series.xAxis,\n dateTime = xAxis && xAxis.dateTime,\n e = {\n isFooter: isFooter,\n labelConfig: labelConfig\n };\n var xDateFormat = tooltipOptions.xDateFormat,\n 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,\n chart = _a.chart,\n distance = _a.distance,\n options = _a.options,\n pointer = chart.pointer,\n label = this.getLabel(), \n // Needed for outside: true (#11688)\n _b = pointer.getChartPosition(),\n left = _b.left,\n top = _b.top,\n scaleX = _b.scaleX,\n scaleY = _b.scaleY,\n pos = (options.positioner || this.getPosition).call(this,\n label.width,\n label.height,\n point);\n var anchorX = (point.plotX || 0) + chart.plotLeft,\n anchorY = (point.plotY || 0) + chart.plotTop,\n 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 * */\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\n return Tooltip;\n });\n _registerModule(_modules, 'Core/Series/Point.js', [_modules['Core/Renderer/HTML/AST.js'], _modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Defaults.js'], _modules['Core/FormatUtilities.js'], _modules['Core/Utilities.js']], function (AST, A, D, F, U) {\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 var animObject = A.animObject;\n var defaultOptions = D.defaultOptions;\n var format = F.format;\n var addEvent = U.addEvent,\n defined = U.defined,\n erase = U.erase,\n extend = U.extend,\n fireEvent = U.fireEvent,\n getNestedProperty = U.getNestedProperty,\n isArray = U.isArray,\n isFunction = U.isFunction,\n isNumber = U.isNumber,\n isObject = U.isObject,\n merge = U.merge,\n objectEach = U.objectEach,\n pick = U.pick,\n syncTimeout = U.syncTimeout,\n removeEvent = U.removeEvent,\n uniqueKey = U.uniqueKey;\n /* eslint-disable no-invalid-this, valid-jsdoc */\n /* *\n *\n * Class\n *\n * */\n /**\n * The Point object. The point objects are generated from the `series.data`\n * configuration objects or raw numbers. They can be accessed from the\n * `Series.points` array. Other ways to instantiate points are through {@link\n * Highcharts.Series#addPoint} or {@link Highcharts.Series#setData}.\n *\n * @class\n * @name Highcharts.Point\n */\n var Point = /** @class */ (function () {\n function Point() {\n /* *\n *\n * Properties\n *\n * */\n /**\n * For categorized axes this property holds the category name for the\n * point. For other axes it holds the X value.\n *\n * @name Highcharts.Point#category\n * @type {number|string}\n */\n this.category = void 0;\n this.formatPrefix = 'point';\n this.id = void 0;\n this.isNull = false;\n /**\n * The name of the point. The name can be given as the first position of the\n * point configuration array, or as a `name` property in the configuration:\n *\n * @example\n * // Array config\n * data: [\n * ['John', 1],\n * ['Jane', 2]\n * ]\n *\n * // Object config\n * data: [{\n * name: 'John',\n * y: 1\n * }, {\n * name: 'Jane',\n * y: 2\n * }]\n *\n * @name Highcharts.Point#name\n * @type {string}\n */\n this.name = void 0;\n /**\n * The point's options as applied in the initial configuration, or\n * extended through `Point.update`.\n *\n * In TypeScript you have to extend `PointOptionsObject` via an\n * additional interface to allow custom data options:\n *\n * ```\n * declare interface PointOptionsObject {\n * customProperty: string;\n * }\n * ```\n *\n * @name Highcharts.Point#options\n * @type {Highcharts.PointOptionsObject}\n */\n this.options = void 0;\n /**\n * The percentage for points in a stacked series or pies.\n *\n * @name Highcharts.Point#percentage\n * @type {number|undefined}\n */\n this.percentage = void 0;\n this.selected = false;\n /**\n * The series object associated with the point.\n *\n * @name Highcharts.Point#series\n * @type {Highcharts.Series}\n */\n this.series = void 0;\n /**\n * The attributes of the rendered SVG shape like in `column` or `pie`\n * series.\n *\n * @readonly\n * @name Highcharts.Point#shapeArgs\n * @type {Readonly|undefined}\n */\n this.shapeArgs = void 0;\n /**\n * The total of values in either a stack for stacked series, or a pie in a\n * pie series.\n *\n * @name Highcharts.Point#total\n * @type {number|undefined}\n */\n this.total = void 0;\n /**\n * For certain series types, like pie charts, where individual points can\n * be shown or hidden.\n *\n * @name Highcharts.Point#visible\n * @type {boolean}\n * @default true\n */\n this.visible = true;\n this.x = void 0;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Animate SVG elements associated with the point.\n *\n * @private\n * @function Highcharts.Point#animateBeforeDestroy\n */\n Point.prototype.animateBeforeDestroy = function () {\n var point = this,\n animateParams = { x: point.startXPos,\n opacity: 0 },\n graphicalProps = point.getGraphicalProps();\n graphicalProps.singular.forEach(function (prop) {\n var isDataLabel = prop === 'dataLabel';\n point[prop] = point[prop].animate(isDataLabel ? {\n x: point[prop].startXPos,\n y: point[prop].startYPos,\n opacity: 0\n } : animateParams);\n });\n graphicalProps.plural.forEach(function (plural) {\n point[plural].forEach(function (item) {\n if (item.element) {\n item.animate(extend({ x: point.startXPos }, (item.startYPos ? {\n x: item.startXPos,\n y: item.startYPos\n } : {})));\n }\n });\n });\n };\n /**\n * Apply the options containing the x and y data and possible some extra\n * properties. Called on point init or from point.update.\n *\n * @private\n * @function Highcharts.Point#applyOptions\n *\n * @param {Highcharts.PointOptionsType} options\n * The point options as defined in series.data.\n *\n * @param {number} [x]\n * Optionally, the x value.\n *\n * @return {Highcharts.Point}\n * The Point instance.\n */\n Point.prototype.applyOptions = function (options, x) {\n var point = this,\n series = point.series,\n pointValKey = series.options.pointValKey || series.pointValKey;\n options = Point.prototype.optionsToObject.call(this, options);\n // copy options directly to point\n extend(point, options);\n point.options = point.options ?\n extend(point.options, options) :\n options;\n // Since options are copied into the Point instance, some accidental\n // options must be shielded (#5681)\n if (options.group) {\n delete point.group;\n }\n if (options.dataLabels) {\n delete point.dataLabels;\n }\n /**\n * The y value of the point.\n * @name Highcharts.Point#y\n * @type {number|undefined}\n */\n // For higher dimension series types. For instance, for ranges, point.y\n // is mapped to point.low.\n if (pointValKey) {\n point.y = Point.prototype.getNestedProperty.call(point, pointValKey);\n }\n point.isNull = this.isValid && !this.isValid();\n point.formatPrefix = point.isNull ? 'null' : 'point'; // #9233, #10874\n // The point is initially selected by options (#5777)\n if (point.selected) {\n point.state = 'select';\n }\n /**\n * The x value of the point.\n * @name Highcharts.Point#x\n * @type {number}\n */\n // If no x is set by now, get auto incremented value. All points must\n // have an x value, however the y value can be null to create a gap in\n // the series\n if ('name' in point &&\n typeof x === 'undefined' &&\n series.xAxis &&\n series.xAxis.hasNames) {\n point.x = series.xAxis.nameToX(point);\n }\n if (typeof point.x === 'undefined' && series) {\n if (typeof x === 'undefined') {\n point.x = series.autoIncrement();\n }\n else {\n point.x = x;\n }\n }\n else if (isNumber(options.x) && series.options.relativeXValue) {\n point.x = series.autoIncrement(options.x);\n }\n return point;\n };\n /**\n * Destroy a point to clear memory. Its reference still stays in\n * `series.data`.\n *\n * @private\n * @function Highcharts.Point#destroy\n */\n Point.prototype.destroy = function () {\n var point = this,\n series = point.series,\n chart = series.chart,\n dataSorting = series.options.dataSorting,\n hoverPoints = chart.hoverPoints,\n globalAnimation = point.series.chart.renderer.globalAnimation,\n animation = animObject(globalAnimation);\n var prop;\n /**\n * Allow to call after animation.\n * @private\n */\n function destroyPoint() {\n // Remove all events and elements\n if (point.graphic ||\n point.graphics ||\n point.dataLabel ||\n point.dataLabels) {\n removeEvent(point);\n point.destroyElements();\n }\n for (prop in point) { // eslint-disable-line guard-for-in\n point[prop] = null;\n }\n }\n if (point.legendItem) {\n // pies have legend items\n chart.legend.destroyItem(point);\n }\n if (hoverPoints) {\n point.setState();\n erase(hoverPoints, point);\n if (!hoverPoints.length) {\n chart.hoverPoints = null;\n }\n }\n if (point === chart.hoverPoint) {\n point.onMouseOut();\n }\n // Remove properties after animation\n if (!dataSorting || !dataSorting.enabled) {\n destroyPoint();\n }\n else {\n this.animateBeforeDestroy();\n syncTimeout(destroyPoint, animation.duration);\n }\n chart.pointCount--;\n };\n /**\n * Destroy SVG elements associated with the point.\n *\n * @private\n * @function Highcharts.Point#destroyElements\n * @param {Highcharts.Dictionary} [kinds]\n */\n Point.prototype.destroyElements = function (kinds) {\n var point = this,\n props = point.getGraphicalProps(kinds);\n props.singular.forEach(function (prop) {\n point[prop] = point[prop].destroy();\n });\n props.plural.forEach(function (plural) {\n point[plural].forEach(function (item) {\n if (item && item.element) {\n item.destroy();\n }\n });\n delete point[plural];\n });\n };\n /**\n * Fire an event on the Point object.\n *\n * @private\n * @function Highcharts.Point#firePointEvent\n *\n * @param {string} eventType\n * Type of the event.\n *\n * @param {Highcharts.Dictionary|Event} [eventArgs]\n * Additional event arguments.\n *\n * @param {Highcharts.EventCallbackFunction|Function} [defaultFunction]\n * Default event handler.\n *\n * @emits Highcharts.Point#event:*\n */\n Point.prototype.firePointEvent = function (eventType, eventArgs, defaultFunction) {\n var point = this,\n series = this.series,\n seriesOptions = series.options;\n // load event handlers on demand to save time on mouseover/out\n if (seriesOptions.point.events[eventType] ||\n (point.options &&\n point.options.events &&\n point.options.events[eventType])) {\n point.importEvents();\n }\n // add default handler if in selection mode\n if (eventType === 'click' && seriesOptions.allowPointSelect) {\n defaultFunction = function (event) {\n // Control key is for Windows, meta (= Cmd key) for Mac, Shift\n // for Opera.\n if (point.select) { // #2911\n point.select(null, event.ctrlKey || event.metaKey || event.shiftKey);\n }\n };\n }\n fireEvent(point, eventType, eventArgs, defaultFunction);\n };\n /**\n * Get the CSS class names for individual points. Used internally where the\n * returned value is set on every point.\n *\n * @function Highcharts.Point#getClassName\n *\n * @return {string}\n * The class names.\n */\n Point.prototype.getClassName = function () {\n var point = this;\n return 'highcharts-point' +\n (point.selected ? ' highcharts-point-select' : '') +\n (point.negative ? ' highcharts-negative' : '') +\n (point.isNull ? ' highcharts-null-point' : '') +\n (typeof point.colorIndex !== 'undefined' ?\n ' highcharts-color-' + point.colorIndex : '') +\n (point.options.className ? ' ' + point.options.className : '') +\n (point.zone && point.zone.className ? ' ' +\n point.zone.className.replace('highcharts-negative', '') : '');\n };\n /**\n * Get props of all existing graphical point elements.\n *\n * @private\n * @function Highcharts.Point#getGraphicalProps\n */\n Point.prototype.getGraphicalProps = function (kinds) {\n var point = this,\n props = [],\n graphicalProps = { singular: [],\n plural: [] };\n var prop,\n i;\n kinds = kinds || { graphic: 1, dataLabel: 1 };\n if (kinds.graphic) {\n props.push('graphic', 'shadowGroup');\n }\n if (kinds.dataLabel) {\n props.push('dataLabel', 'dataLabelPath', 'dataLabelUpper', 'connector');\n }\n i = props.length;\n while (i--) {\n prop = props[i];\n if (point[prop]) {\n graphicalProps.singular.push(prop);\n }\n }\n [\n 'graphic',\n 'dataLabel',\n 'connector'\n ].forEach(function (prop) {\n var plural = prop + 's';\n if (kinds[prop] && point[plural]) {\n graphicalProps.plural.push(plural);\n }\n });\n return graphicalProps;\n };\n /**\n * Return the configuration hash needed for the data label and tooltip\n * formatters.\n *\n * @function Highcharts.Point#getLabelConfig\n *\n * @return {Highcharts.PointLabelObject}\n * Abstract object used in formatters and formats.\n */\n Point.prototype.getLabelConfig = function () {\n return {\n x: this.category,\n y: this.y,\n color: this.color,\n colorIndex: this.colorIndex,\n key: this.name || this.category,\n series: this.series,\n point: this,\n percentage: this.percentage,\n total: this.total || this.stackTotal\n };\n };\n /**\n * Returns the value of the point property for a given value.\n * @private\n */\n Point.prototype.getNestedProperty = function (key) {\n if (!key) {\n return;\n }\n if (key.indexOf('custom.') === 0) {\n return getNestedProperty(key, this.options);\n }\n return this[key];\n };\n /**\n * In a series with `zones`, return the zone that the point belongs to.\n *\n * @function Highcharts.Point#getZone\n *\n * @return {Highcharts.SeriesZonesOptionsObject}\n * The zone item.\n */\n Point.prototype.getZone = function () {\n var series = this.series,\n zones = series.zones,\n zoneAxis = series.zoneAxis || 'y';\n var zone,\n i = 0;\n zone = zones[i];\n while (this[zoneAxis] >= zone.value) {\n zone = zones[++i];\n }\n // For resetting or reusing the point (#8100)\n if (!this.nonZonedColor) {\n this.nonZonedColor = this.color;\n }\n if (zone && zone.color && !this.options.color) {\n this.color = zone.color;\n }\n else {\n this.color = this.nonZonedColor;\n }\n return zone;\n };\n /**\n * Utility to check if point has new shape type. Used in column series and\n * all others that are based on column series.\n * @private\n */\n Point.prototype.hasNewShapeType = function () {\n var point = this;\n var oldShapeType = point.graphic &&\n (point.graphic.symbolName || point.graphic.element.nodeName);\n return oldShapeType !== this.shapeType;\n };\n /**\n * Initialize the point. Called internally based on the `series.data`\n * option.\n *\n * @function Highcharts.Point#init\n *\n * @param {Highcharts.Series} series\n * The series object containing this point.\n *\n * @param {Highcharts.PointOptionsType} options\n * The data in either number, array or object format.\n *\n * @param {number} [x]\n * Optionally, the X value of the point.\n *\n * @return {Highcharts.Point}\n * The Point instance.\n *\n * @emits Highcharts.Point#event:afterInit\n */\n Point.prototype.init = function (series, options, x) {\n this.series = series;\n this.applyOptions(options, x);\n // Add a unique ID to the point if none is assigned\n this.id = defined(this.id) ? this.id : uniqueKey();\n this.resolveColor();\n series.chart.pointCount++;\n fireEvent(this, 'afterInit');\n return this;\n };\n /**\n * Determine if point is valid.\n * @private\n * @function Highcharts.Point#isValid\n */\n Point.prototype.isValid = function () {\n return this.x !== null && isNumber(this.y);\n };\n /**\n * Transform number or array configs into objects. Also called for object\n * configs. Used internally to unify the different configuration formats for\n * points. For example, a simple number `10` in a line series will be\n * transformed to `{ y: 10 }`, and an array config like `[1, 10]` in a\n * scatter series will be transformed to `{ x: 1, y: 10 }`.\n *\n * @deprecated\n * @function Highcharts.Point#optionsToObject\n *\n * @param {Highcharts.PointOptionsType} options\n * Series data options.\n *\n * @return {Highcharts.Dictionary<*>}\n * Transformed point options.\n */\n Point.prototype.optionsToObject = function (options) {\n var series = this.series,\n keys = series.options.keys,\n pointArrayMap = keys || series.pointArrayMap || ['y'],\n valueCount = pointArrayMap.length;\n var ret = {},\n firstItemType,\n i = 0,\n j = 0;\n if (isNumber(options) || options === null) {\n ret[pointArrayMap[0]] = options;\n }\n else if (isArray(options)) {\n // with leading x value\n if (!keys && options.length > valueCount) {\n firstItemType = typeof options[0];\n if (firstItemType === 'string') {\n ret.name = options[0];\n }\n else if (firstItemType === 'number') {\n ret.x = options[0];\n }\n i++;\n }\n while (j < valueCount) {\n // Skip undefined positions for keys\n if (!keys || typeof options[i] !== 'undefined') {\n if (pointArrayMap[j].indexOf('.') > 0) {\n // Handle nested keys, e.g. ['color.pattern.image']\n // Avoid function call unless necessary.\n Point.prototype.setNestedProperty(ret, options[i], pointArrayMap[j]);\n }\n else {\n ret[pointArrayMap[j]] = options[i];\n }\n }\n i++;\n j++;\n }\n }\n else if (typeof options === 'object') {\n ret = options;\n // This is the fastest way to detect if there are individual point\n // dataLabels that need to be considered in drawDataLabels. These\n // can only occur in object configs.\n if (options.dataLabels) {\n series._hasPointLabels = true;\n }\n // Same approach as above for markers\n if (options.marker) {\n series._hasPointMarkers = true;\n }\n }\n return ret;\n };\n /**\n * Get the pixel position of the point relative to the plot area.\n * @private\n * @function Highcharts.Point#pos\n */\n Point.prototype.pos = function (chartCoordinates, plotY) {\n if (plotY === void 0) { plotY = this.plotY; }\n var _a = this,\n plotX = _a.plotX,\n series = _a.series,\n chart = series.chart,\n xAxis = series.xAxis,\n yAxis = series.yAxis;\n var posX = 0,\n posY = 0;\n if (isNumber(plotX) && isNumber(plotY)) {\n if (chartCoordinates) {\n posX = xAxis ? xAxis.pos : chart.plotLeft;\n posY = yAxis ? yAxis.pos : chart.plotTop;\n }\n return chart.inverted && xAxis && yAxis ?\n [yAxis.len - plotY + posY, xAxis.len - plotX + posX] :\n [plotX + posX, plotY + posY];\n }\n };\n /**\n * @private\n * @function Highcharts.Point#resolveColor\n */\n Point.prototype.resolveColor = function () {\n var series = this.series,\n optionsChart = series.chart.options.chart,\n styledMode = series.chart.styledMode;\n var color,\n colors,\n colorCount = optionsChart.colorCount,\n colorIndex;\n // remove points nonZonedColor for later recalculation\n delete this.nonZonedColor;\n if (series.options.colorByPoint) {\n if (!styledMode) {\n colors = series.options.colors || series.chart.options.colors;\n color = colors[series.colorCounter];\n colorCount = colors.length;\n }\n colorIndex = series.colorCounter;\n series.colorCounter++;\n // loop back to zero\n if (series.colorCounter === colorCount) {\n series.colorCounter = 0;\n }\n }\n else {\n if (!styledMode) {\n color = series.color;\n }\n colorIndex = series.colorIndex;\n }\n /**\n * The point's current color index, used in styled mode instead of\n * `color`. The color index is inserted in class names used for styling.\n *\n * @name Highcharts.Point#colorIndex\n * @type {number|undefined}\n */\n this.colorIndex = pick(this.options.colorIndex, colorIndex);\n /**\n * The point's current color.\n *\n * @name Highcharts.Point#color\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject|undefined}\n */\n this.color = pick(this.options.color, color);\n };\n /**\n * Set a value in an object, on the property defined by key. The key\n * supports nested properties using dot notation. The function modifies the\n * input object and does not make a copy.\n *\n * @function Highcharts.Point#setNestedProperty\n *\n * @param {T} object\n * The object to set the value on.\n *\n * @param {*} value\n * The value to set.\n *\n * @param {string} key\n * Key to the property to set.\n *\n * @return {T}\n * The modified object.\n */\n Point.prototype.setNestedProperty = function (object, value, key) {\n var nestedKeys = key.split('.');\n nestedKeys.reduce(function (result, key, i, arr) {\n var isLastKey = arr.length - 1 === i;\n result[key] = (isLastKey ?\n value :\n isObject(result[key], true) ?\n result[key] :\n {});\n return result[key];\n }, object);\n return object;\n };\n Point.prototype.shouldDraw = function () {\n return !this.isNull;\n };\n /**\n * Extendable method for formatting each point's tooltip line.\n *\n * @function Highcharts.Point#tooltipFormatter\n *\n * @param {string} pointFormat\n * The point format.\n *\n * @return {string}\n * A string to be concatenated in to the common tooltip text.\n */\n Point.prototype.tooltipFormatter = function (pointFormat) {\n // Insert options for valueDecimals, valuePrefix, and valueSuffix\n var series = this.series, seriesTooltipOptions = series.tooltipOptions, valueDecimals = pick(seriesTooltipOptions.valueDecimals, ''), valuePrefix = seriesTooltipOptions.valuePrefix || '', valueSuffix = seriesTooltipOptions.valueSuffix || '';\n // Replace default point style with class name\n if (series.chart.styledMode) {\n pointFormat =\n series.chart.tooltip.styledModeFormat(pointFormat);\n }\n // Loop over the point array map and replace unformatted values with\n // sprintf formatting markup\n (series.pointArrayMap || ['y']).forEach(function (key) {\n key = '{point.' + key; // without the closing bracket\n if (valuePrefix || valueSuffix) {\n pointFormat = pointFormat.replace(RegExp(key + '}', 'g'), valuePrefix + key + '}' + valueSuffix);\n }\n pointFormat = pointFormat.replace(RegExp(key + '}', 'g'), key + ':,.' + valueDecimals + 'f}');\n });\n return format(pointFormat, {\n point: this,\n series: this.series\n }, series.chart);\n };\n /**\n * Update point with new options (typically x/y data) and optionally redraw\n * the series.\n *\n * @sample highcharts/members/point-update-column/\n * Update column value\n * @sample highcharts/members/point-update-pie/\n * Update pie slice\n * @sample maps/members/point-update/\n * Update map area value in Highmaps\n *\n * @function Highcharts.Point#update\n *\n * @param {Highcharts.PointOptionsType} options\n * The point options. Point options are handled as described under\n * the `series.type.data` item for each series type. For example\n * for a line series, if options is a single number, the point will\n * be given that number as the marin y value. If it is an array, it\n * will be interpreted as x and y values respectively. If it is an\n * object, advanced options are applied.\n *\n * @param {boolean} [redraw=true]\n * Whether to redraw the chart after the point is updated. If doing\n * more operations on the chart, it is best practice to set\n * `redraw` to false and call `chart.redraw()` after.\n *\n * @param {boolean|Partial} [animation=true]\n * Whether to apply animation, and optionally animation\n * configuration.\n *\n * @emits Highcharts.Point#event:update\n */\n Point.prototype.update = function (options, redraw, animation, runEvent) {\n var point = this,\n series = point.series,\n graphic = point.graphic,\n chart = series.chart,\n seriesOptions = series.options;\n var i;\n redraw = pick(redraw, true);\n /**\n * @private\n */\n function update() {\n point.applyOptions(options);\n // Update visuals, #4146\n // Handle mock graphic elements for a11y, #12718\n var hasMockGraphic = graphic && point.hasMockGraphic;\n var shouldDestroyGraphic = point.y === null ?\n !hasMockGraphic :\n hasMockGraphic;\n if (graphic && shouldDestroyGraphic) {\n point.graphic = graphic.destroy();\n delete point.hasMockGraphic;\n }\n if (isObject(options, true)) {\n // Destroy so we can get new elements\n if (graphic && graphic.element) {\n // \"null\" is also a valid symbol\n if (options &&\n options.marker &&\n typeof options.marker.symbol !== 'undefined') {\n point.graphic = graphic.destroy();\n }\n }\n if (options && options.dataLabels && point.dataLabel) {\n point.dataLabel = point.dataLabel.destroy(); // #2468\n }\n if (point.connector) {\n point.connector = point.connector.destroy(); // #7243\n }\n }\n // record changes in the parallel arrays\n i = point.index;\n series.updateParallelArrays(point, i);\n // Record the options to options.data. If the old or the new config\n // is an object, use point options, otherwise use raw options\n // (#4701, #4916).\n seriesOptions.data[i] = (isObject(seriesOptions.data[i], true) ||\n isObject(options, true)) ?\n point.options :\n pick(options, seriesOptions.data[i]);\n // redraw\n series.isDirty = series.isDirtyData = true;\n if (!series.fixedBox && series.hasCartesianSeries) { // #1906, #2320\n chart.isDirtyBox = true;\n }\n if (seriesOptions.legendType === 'point') { // #1831, #1885\n chart.isDirtyLegend = true;\n }\n if (redraw) {\n chart.redraw(animation);\n }\n }\n // Fire the event with a default handler of doing the update\n if (runEvent === false) { // When called from setData\n update();\n }\n else {\n point.firePointEvent('update', { options: options }, update);\n }\n };\n /**\n * Remove a point and optionally redraw the series and if necessary the axes\n *\n * @sample highcharts/plotoptions/series-point-events-remove/\n * Remove point and confirm\n * @sample highcharts/members/point-remove/\n * Remove pie slice\n * @sample maps/members/point-remove/\n * Remove selected points in Highmaps\n *\n * @function Highcharts.Point#remove\n *\n * @param {boolean} [redraw=true]\n * Whether to redraw the chart or wait for an explicit call. When\n * doing more operations on the chart, for example running\n * `point.remove()` in a loop, it is best practice to set `redraw`\n * to false and call `chart.redraw()` after.\n *\n * @param {boolean|Partial} [animation=false]\n * Whether to apply animation, and optionally animation\n * configuration.\n */\n Point.prototype.remove = function (redraw, animation) {\n this.series.removePoint(this.series.data.indexOf(this), redraw, animation);\n };\n /**\n * Toggle the selection status of a point.\n *\n * @see Highcharts.Chart#getSelectedPoints\n *\n * @sample highcharts/members/point-select/\n * Select a point from a button\n * @sample highcharts/chart/events-selection-points/\n * Select a range of points through a drag selection\n * @sample maps/series/data-id/\n * Select a point in Highmaps\n *\n * @function Highcharts.Point#select\n *\n * @param {boolean} [selected]\n * When `true`, the point is selected. When `false`, the point is\n * unselected. When `null` or `undefined`, the selection state is toggled.\n *\n * @param {boolean} [accumulate=false]\n * When `true`, the selection is added to other selected points.\n * When `false`, other selected points are deselected. Internally in\n * Highcharts, when\n * [allowPointSelect](https://api.highcharts.com/highcharts/plotOptions.series.allowPointSelect)\n * is `true`, selected points are accumulated on Control, Shift or Cmd\n * clicking the point.\n *\n * @emits Highcharts.Point#event:select\n * @emits Highcharts.Point#event:unselect\n */\n Point.prototype.select = function (selected, accumulate) {\n var point = this,\n series = point.series,\n chart = series.chart;\n selected = pick(selected, !point.selected);\n this.selectedStaging = selected;\n // fire the event with the default handler\n point.firePointEvent(selected ? 'select' : 'unselect', { accumulate: accumulate }, function () {\n /**\n * Whether the point is selected or not.\n *\n * @see Point#select\n * @see Chart#getSelectedPoints\n *\n * @name Highcharts.Point#selected\n * @type {boolean}\n */\n point.selected = point.options.selected = selected;\n series.options.data[series.data.indexOf(point)] =\n point.options;\n point.setState(selected && 'select');\n // unselect all other points unless Ctrl or Cmd + click\n if (!accumulate) {\n chart.getSelectedPoints().forEach(function (loopPoint) {\n var loopSeries = loopPoint.series;\n if (loopPoint.selected && loopPoint !== point) {\n loopPoint.selected = loopPoint.options.selected =\n false;\n loopSeries.options.data[loopSeries.data.indexOf(loopPoint)] = loopPoint.options;\n // Programatically selecting a point should restore\n // normal state, but when click happened on other\n // point, set inactive state to match other points\n loopPoint.setState(chart.hoverPoints &&\n loopSeries.options.inactiveOtherPoints ?\n 'inactive' : '');\n loopPoint.firePointEvent('unselect');\n }\n });\n }\n });\n delete this.selectedStaging;\n };\n /**\n * Runs on mouse over the point. Called internally from mouse and touch\n * events.\n *\n * @function Highcharts.Point#onMouseOver\n *\n * @param {Highcharts.PointerEventObject} [e]\n * The event arguments.\n */\n Point.prototype.onMouseOver = function (e) {\n var point = this,\n series = point.series,\n chart = series.chart,\n pointer = chart.pointer;\n e = e ?\n pointer.normalize(e) :\n // In cases where onMouseOver is called directly without an event\n pointer.getChartCoordinatesFromPoint(point, chart.inverted);\n pointer.runPointActions(e, point);\n };\n /**\n * Runs on mouse out from the point. Called internally from mouse and touch\n * events.\n *\n * @function Highcharts.Point#onMouseOut\n * @emits Highcharts.Point#event:mouseOut\n */\n Point.prototype.onMouseOut = function () {\n var point = this,\n chart = point.series.chart;\n point.firePointEvent('mouseOut');\n if (!point.series.options.inactiveOtherPoints) {\n (chart.hoverPoints || []).forEach(function (p) {\n p.setState();\n });\n }\n chart.hoverPoints = chart.hoverPoint = null;\n };\n /**\n * Import events from the series' and point's options. Only do it on\n * demand, to save processing time on hovering.\n *\n * @private\n * @function Highcharts.Point#importEvents\n */\n Point.prototype.importEvents = function () {\n if (!this.hasImportedEvents) {\n var point_1 = this,\n options = merge(point_1.series.options.point,\n point_1.options),\n events = options.events;\n point_1.events = events;\n objectEach(events, function (event, eventType) {\n if (isFunction(event)) {\n addEvent(point_1, eventType, event);\n }\n });\n this.hasImportedEvents = true;\n }\n };\n /**\n * Set the point's state.\n *\n * @function Highcharts.Point#setState\n *\n * @param {Highcharts.PointStateValue|\"\"} [state]\n * The new state, can be one of `'hover'`, `'select'`, `'inactive'`,\n * or `''` (an empty string), `'normal'` or `undefined` to set to\n * normal state.\n * @param {boolean} [move]\n * State for animation.\n *\n * @emits Highcharts.Point#event:afterSetState\n */\n Point.prototype.setState = function (state, move) {\n var point = this,\n series = point.series,\n previousState = point.state,\n stateOptions = (series.options.states[state || 'normal'] ||\n {}),\n markerOptions = (defaultOptions.plotOptions[series.type].marker &&\n series.options.marker),\n normalDisabled = (markerOptions && markerOptions.enabled === false),\n markerStateOptions = ((markerOptions &&\n markerOptions.states &&\n markerOptions.states[state || 'normal']) || {}),\n stateDisabled = markerStateOptions.enabled === false,\n pointMarker = point.marker || {},\n chart = series.chart,\n hasMarkers = (markerOptions && series.markerAttribs);\n var halo = series.halo,\n markerAttribs,\n pointAttribs,\n pointAttribsAnimation,\n stateMarkerGraphic = series.stateMarkerGraphic,\n newSymbol;\n state = state || ''; // empty string\n if (\n // already has this state\n (state === point.state && !move) ||\n // selected points don't respond to hover\n (point.selected && state !== 'select') ||\n // series' state options is disabled\n (stateOptions.enabled === false) ||\n // general point marker's state options is disabled\n (state && (stateDisabled ||\n (normalDisabled &&\n markerStateOptions.enabled === false))) ||\n // individual point marker's state options is disabled\n (state &&\n pointMarker.states &&\n pointMarker.states[state] &&\n pointMarker.states[state].enabled === false) // #1610\n ) {\n return;\n }\n point.state = state;\n if (hasMarkers) {\n markerAttribs = series.markerAttribs(point, state);\n }\n // Apply hover styles to the existing point\n // Prevent from mocked null points (#14966)\n if (point.graphic && !point.hasMockGraphic) {\n if (previousState) {\n point.graphic.removeClass('highcharts-point-' + previousState);\n }\n if (state) {\n point.graphic.addClass('highcharts-point-' + state);\n }\n if (!chart.styledMode) {\n pointAttribs = series.pointAttribs(point, state);\n pointAttribsAnimation = pick(chart.options.chart.animation, stateOptions.animation);\n var opacity_1 = pointAttribs.opacity;\n // Some inactive points (e.g. slices in pie) should apply\n // opacity also for their labels\n if (series.options.inactiveOtherPoints && isNumber(opacity_1)) {\n (point.dataLabels || []).forEach(function (label) {\n if (label &&\n !label.hasClass('highcharts-data-label-hidden')) {\n label.animate({ opacity: opacity_1 }, pointAttribsAnimation);\n }\n });\n if (point.connector) {\n point.connector.animate({ opacity: opacity_1 }, pointAttribsAnimation);\n }\n }\n point.graphic.animate(pointAttribs, pointAttribsAnimation);\n }\n if (markerAttribs) {\n point.graphic.animate(markerAttribs, pick(\n // Turn off globally:\n chart.options.chart.animation, markerStateOptions.animation, markerOptions.animation));\n }\n // Zooming in from a range with no markers to a range with markers\n if (stateMarkerGraphic) {\n stateMarkerGraphic.hide();\n }\n }\n else {\n // if a graphic is not applied to each point in the normal state,\n // create a shared graphic for the hover state\n if (state && markerStateOptions) {\n newSymbol = pointMarker.symbol || series.symbol;\n // If the point has another symbol than the previous one, throw\n // away the state marker graphic and force a new one (#1459)\n if (stateMarkerGraphic &&\n stateMarkerGraphic.currentSymbol !== newSymbol) {\n stateMarkerGraphic = stateMarkerGraphic.destroy();\n }\n // Add a new state marker graphic\n if (markerAttribs) {\n if (!stateMarkerGraphic) {\n if (newSymbol) {\n series.stateMarkerGraphic = stateMarkerGraphic =\n chart.renderer\n .symbol(newSymbol, markerAttribs.x, markerAttribs.y, markerAttribs.width, markerAttribs.height)\n .add(series.markerGroup);\n stateMarkerGraphic.currentSymbol = newSymbol;\n }\n // Move the existing graphic\n }\n else {\n stateMarkerGraphic[move ? 'animate' : 'attr']({\n x: markerAttribs.x,\n y: markerAttribs.y\n });\n }\n }\n if (!chart.styledMode && stateMarkerGraphic &&\n point.state !== 'inactive') {\n stateMarkerGraphic.attr(series.pointAttribs(point, state));\n }\n }\n if (stateMarkerGraphic) {\n stateMarkerGraphic[state && point.isInside ? 'show' : 'hide'](); // #2450\n stateMarkerGraphic.element.point = point; // #4310\n stateMarkerGraphic.addClass(point.getClassName(), true);\n }\n }\n // Show me your halo\n var haloOptions = stateOptions.halo;\n var markerGraphic = (point.graphic || stateMarkerGraphic);\n var markerVisibility = (markerGraphic && markerGraphic.visibility || 'inherit');\n if (haloOptions &&\n haloOptions.size &&\n markerGraphic &&\n markerVisibility !== 'hidden' &&\n !point.isCluster) {\n if (!halo) {\n series.halo = halo = chart.renderer.path()\n // #5818, #5903, #6705\n .add(markerGraphic.parentGroup);\n }\n halo.show()[move ? 'animate' : 'attr']({\n d: point.haloPath(haloOptions.size)\n });\n halo.attr({\n 'class': 'highcharts-halo highcharts-color-' +\n pick(point.colorIndex, series.colorIndex) +\n (point.className ? ' ' + point.className : ''),\n 'visibility': markerVisibility,\n 'zIndex': -1 // #4929, #8276\n });\n halo.point = point; // #6055\n if (!chart.styledMode) {\n halo.attr(extend({\n 'fill': point.color || series.color,\n 'fill-opacity': haloOptions.opacity\n }, AST.filterUserAttributes(haloOptions.attributes || {})));\n }\n }\n else if (halo && halo.point && halo.point.haloPath) {\n // Animate back to 0 on the current halo point (#6055)\n halo.animate({ d: halo.point.haloPath(0) }, null, \n // Hide after unhovering. The `complete` callback runs in the\n // halo's context (#7681).\n halo.hide);\n }\n fireEvent(point, 'afterSetState', { state: state });\n };\n /**\n * Get the path definition for the halo, which is usually a shadow-like\n * circle around the currently hovered point.\n *\n * @function Highcharts.Point#haloPath\n *\n * @param {number} size\n * The radius of the circular halo.\n *\n * @return {Highcharts.SVGPathArray}\n * The path definition.\n */\n Point.prototype.haloPath = function (size) {\n var pos = this.pos();\n return pos ? this.series.chart.renderer.symbols.circle(Math.floor(pos[0]) - size, pos[1] - size, size * 2, size * 2) : [];\n };\n return Point;\n }());\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * Function callback when a series point is clicked. Return false to cancel the\n * action.\n *\n * @callback Highcharts.PointClickCallbackFunction\n *\n * @param {Highcharts.Point} this\n * The point where the event occured.\n *\n * @param {Highcharts.PointClickEventObject} event\n * Event arguments.\n */\n /**\n * Common information for a click event on a series point.\n *\n * @interface Highcharts.PointClickEventObject\n * @extends Highcharts.PointerEventObject\n */ /**\n * Clicked point.\n * @name Highcharts.PointClickEventObject#point\n * @type {Highcharts.Point}\n */\n /**\n * Configuration for the data label and tooltip formatters.\n *\n * @interface Highcharts.PointLabelObject\n */ /**\n * The point's current color.\n * @name Highcharts.PointLabelObject#color\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject|undefined}\n */ /**\n * The point's current color index, used in styled mode instead of `color`. The\n * color index is inserted in class names used for styling.\n * @name Highcharts.PointLabelObject#colorIndex\n * @type {number}\n */ /**\n * The name of the related point.\n * @name Highcharts.PointLabelObject#key\n * @type {string|undefined}\n */ /**\n * The percentage for related points in a stacked series or pies.\n * @name Highcharts.PointLabelObject#percentage\n * @type {number}\n */ /**\n * The related point. The point name, if defined, is available through\n * `this.point.name`.\n * @name Highcharts.PointLabelObject#point\n * @type {Highcharts.Point}\n */ /**\n * The related series. The series name is available through `this.series.name`.\n * @name Highcharts.PointLabelObject#series\n * @type {Highcharts.Series}\n */ /**\n * The total of values in either a stack for stacked series, or a pie in a pie\n * series.\n * @name Highcharts.PointLabelObject#total\n * @type {number|undefined}\n */ /**\n * For categorized axes this property holds the category name for the point. For\n * other axes it holds the X value.\n * @name Highcharts.PointLabelObject#x\n * @type {number|string|undefined}\n */ /**\n * The y value of the point.\n * @name Highcharts.PointLabelObject#y\n * @type {number|null|undefined}\n */\n /**\n * Gets fired when the mouse leaves the area close to the point.\n *\n * @callback Highcharts.PointMouseOutCallbackFunction\n *\n * @param {Highcharts.Point} this\n * Point where the event occured.\n *\n * @param {global.PointerEvent} event\n * Event that occured.\n */\n /**\n * Gets fired when the mouse enters the area close to the point.\n *\n * @callback Highcharts.PointMouseOverCallbackFunction\n *\n * @param {Highcharts.Point} this\n * Point where the event occured.\n *\n * @param {global.Event} event\n * Event that occured.\n */\n /**\n * The generic point options for all series.\n *\n * In TypeScript you have to extend `PointOptionsObject` with an additional\n * declaration to allow custom data options:\n *\n * ```\n * declare interface PointOptionsObject {\n * customProperty: string;\n * }\n * ```\n *\n * @interface Highcharts.PointOptionsObject\n */\n /**\n * Possible option types for a data point. Use `null` to indicate a gap.\n *\n * @typedef {number|string|Highcharts.PointOptionsObject|Array<(number|string|null)>|null} Highcharts.PointOptionsType\n */\n /**\n * Gets fired when the point is removed using the `.remove()` method.\n *\n * @callback Highcharts.PointRemoveCallbackFunction\n *\n * @param {Highcharts.Point} this\n * Point where the event occured.\n *\n * @param {global.Event} event\n * Event that occured.\n */\n /**\n * Possible key values for the point state options.\n *\n * @typedef {\"hover\"|\"inactive\"|\"normal\"|\"select\"} Highcharts.PointStateValue\n */\n /**\n * Gets fired when the point is updated programmatically through the `.update()`\n * method.\n *\n * @callback Highcharts.PointUpdateCallbackFunction\n *\n * @param {Highcharts.Point} this\n * Point where the event occured.\n *\n * @param {Highcharts.PointUpdateEventObject} event\n * Event that occured.\n */\n /**\n * Information about the update event.\n *\n * @interface Highcharts.PointUpdateEventObject\n * @extends global.Event\n */ /**\n * Options data of the update event.\n * @name Highcharts.PointUpdateEventObject#options\n * @type {Highcharts.PointOptionsType}\n */\n /**\n * @interface Highcharts.PointEventsOptionsObject\n */ /**\n * Fires when the point is selected either programmatically or following a click\n * on the point. One parameter, `event`, is passed to the function. Returning\n * `false` cancels the operation.\n * @name Highcharts.PointEventsOptionsObject#select\n * @type {Highcharts.PointSelectCallbackFunction|undefined}\n */ /**\n * Fires when the point is unselected either programmatically or following a\n * click on the point. One parameter, `event`, is passed to the function.\n * Returning `false` cancels the operation.\n * @name Highcharts.PointEventsOptionsObject#unselect\n * @type {Highcharts.PointUnselectCallbackFunction|undefined}\n */\n /**\n * Information about the select/unselect event.\n *\n * @interface Highcharts.PointInteractionEventObject\n * @extends global.Event\n */ /**\n * @name Highcharts.PointInteractionEventObject#accumulate\n * @type {boolean}\n */\n /**\n * Gets fired when the point is selected either programmatically or following a\n * click on the point.\n *\n * @callback Highcharts.PointSelectCallbackFunction\n *\n * @param {Highcharts.Point} this\n * Point where the event occured.\n *\n * @param {Highcharts.PointInteractionEventObject} event\n * Event that occured.\n */\n /**\n * Fires when the point is unselected either programmatically or following a\n * click on the point.\n *\n * @callback Highcharts.PointUnselectCallbackFunction\n *\n * @param {Highcharts.Point} this\n * Point where the event occured.\n *\n * @param {Highcharts.PointInteractionEventObject} event\n * Event that occured.\n */\n ''; // keeps doclets above in JS file.\n\n return Point;\n });\n _registerModule(_modules, 'Core/Pointer.js', [_modules['Core/Color/Color.js'], _modules['Core/Globals.js'], _modules['Core/Tooltip.js'], _modules['Core/Utilities.js']], function (Color, H, Tooltip, U) {\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 var color = Color.parse;\n var charts = H.charts,\n noop = H.noop;\n var addEvent = U.addEvent,\n attr = U.attr,\n css = U.css,\n defined = U.defined,\n extend = U.extend,\n find = U.find,\n fireEvent = U.fireEvent,\n isNumber = U.isNumber,\n isObject = U.isObject,\n objectEach = U.objectEach,\n offset = U.offset,\n pick = U.pick,\n 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 */\n var 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 = [],\n 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,\n chartY: chartY },\n attrs: {},\n shapeType: 'rect'\n };\n fireEvent(this, 'getSelectionMarkerAttrs', e, function (e) {\n var _a = _this,\n chart = _a.chart,\n _b = _a.mouseDownX,\n mouseDownX = _b === void 0 ? 0 : _b,\n _c = _a.mouseDownY,\n mouseDownY = _c === void 0 ? 0 : _c,\n zoomHor = _a.zoomHor,\n zoomVert = _a.zoomVert,\n 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,\n chartOptions = chart.options.chart,\n plotLeft = chart.plotLeft,\n plotTop = chart.plotTop,\n plotWidth = chart.plotWidth,\n plotHeight = chart.plotHeight,\n mouseDownX = (this.mouseDownX || 0),\n mouseDownY = (this.mouseDownY || 0),\n panningEnabled = isObject(chartOptions.panning) ?\n chartOptions.panning && chartOptions.panning.enabled :\n chartOptions.panning,\n panKey = (chartOptions.panKey && e[chartOptions.panKey + 'Key']);\n var chartX = e.chartX,\n chartY = e.chartY,\n clickedInside,\n 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,\n chartY),\n shapeType = _a.shapeType,\n 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,\n chart = this.chart,\n hasPinched = this.hasPinched;\n if (this.selectionMarker) {\n var _a = this.getSelectionBox(this.selectionMarker),\n x_1 = _a.x,\n y_1 = _a.y,\n width_1 = _a.width,\n 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,\n minPixelPadding = e.type === 'touchend' ?\n axis.minPixelPadding :\n 0, // #1207, #3075\n selectionMin = axis.toValue((horiz ? x_1 : y_1) + minPixelPadding),\n 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,\n isCloser = p1.dist - p2.dist,\n 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,\n compareX = (!noSharedTooltip &&\n s.options.findNearestPointBy.indexOf('y') < 0),\n point = s.searchPoint(e,\n 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,\n xAxis = series.xAxis,\n yAxis = series.yAxis,\n shapeArgs = point.shapeArgs;\n if (xAxis && yAxis) {\n var x = pick(point.clientX,\n 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 = [],\n useExisting = !!(isDirectTouch && existingHoverPoint),\n filter = function (s) {\n return (s.visible &&\n !(!shared && s.directTouch) && // #3821\n pick(s.options.enableMouseTracking,\n 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,\n shared,\n 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,\n 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,\n 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,\n 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,\n e.changedTouches))[0] :\n e);\n // Get mouse position\n if (!chartPosition) {\n chartPosition = this.getChartPosition();\n }\n var chartX = ePos.pageX - chartPosition.left,\n 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,\n tooltip = chart.tooltip,\n 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,\n 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,\n chart = self.chart,\n pinchDown = self.pinchDown,\n touches = (e.touches || []),\n touchesLength = touches.length,\n lastValidTouch = self.lastValidTouch,\n hasZoom = self.hasZoom,\n transform = {},\n fireClickEvent = touchesLength === 1 && ((self.inClass(e.target, 'highcharts-tracker') &&\n chart.runTrackerClick) ||\n self.runChartClick),\n clip = {},\n tooltip = self.chart.tooltip,\n followTouchMove = touchesLength === 1 &&\n pick((tooltip && tooltip.options.followTouchMove),\n 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'],\n minPixelPadding = axis.minPixelPadding,\n min = axis.toPixels(Math.min(pick(axis.options.min,\n axis.dataMin),\n axis.dataMin)),\n max = axis.toPixels(Math.max(pick(axis.options.max,\n axis.dataMax),\n axis.dataMax)),\n absMin = Math.min(min,\n max),\n absMax = Math.max(min,\n 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,\n selectionXY,\n clipXY,\n scale = forcedScale || 1,\n touch0Now = touches[0][sChartXY],\n touch1Now = !singleTouch && touches[1][sChartXY],\n 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,\n chart = pointer.chart,\n hoverSeries = chart.hoverSeries,\n hoverPoint = chart.hoverPoint,\n hoverPoints = chart.hoverPoints,\n tooltip = chart.tooltip,\n 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,\n chart = pointer.chart,\n series = chart.series,\n tooltip = (chart.tooltip && chart.tooltip.options.enabled ?\n chart.tooltip :\n void 0),\n shared = (tooltip ?\n tooltip.shared :\n false);\n var hoverPoint = p || chart.hoverPoint,\n 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)),\n hoverData = this.getHoverData(hoverPoint,\n hoverSeries,\n series,\n isDirectTouch,\n shared,\n e);\n // Update variables from hoverData.\n hoverPoint = hoverData.hoverPoint;\n hoverSeries = hoverData.hoverSeries;\n var points = hoverData.hoverPoints,\n followPointer = hoverSeries &&\n hoverSeries.tooltipOptions.followPointer &&\n !hoverSeries.tooltipOptions.split,\n 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([{}],\n 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,\n 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,\n 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,\n pinchDown,\n 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,\n options = chart.options.chart,\n inverted = chart.inverted;\n var zoomType = options.zooming.type || '',\n zoomX,\n 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 * */\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 return Pointer;\n });\n _registerModule(_modules, 'Core/MSPointer.js', [_modules['Core/Globals.js'], _modules['Core/Pointer.js'], _modules['Core/Utilities.js']], function (H, Pointer, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var charts = H.charts,\n doc = H.doc,\n noop = H.noop,\n win = H.win;\n var addEvent = U.addEvent,\n css = U.css,\n objectEach = U.objectEach,\n pick = U.pick,\n removeEvent = U.removeEvent;\n /* *\n *\n * Constants\n *\n * */\n // The touches object keeps track of the points being touched at all times\n var touches = {};\n var hasPointerEvent = !!win.PointerEvent;\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /** @private */\n function 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 */\n function 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 */\n var 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 * */\n\n return MSPointer;\n });\n _registerModule(_modules, 'Core/Legend/Legend.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/FormatUtilities.js'], _modules['Core/Globals.js'], _modules['Core/Series/Point.js'], _modules['Core/Renderer/RendererUtilities.js'], _modules['Core/Utilities.js']], function (A, F, H, Point, R, U) {\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 var animObject = A.animObject,\n setAnimation = A.setAnimation;\n var format = F.format;\n var isFirefox = H.isFirefox,\n marginNames = H.marginNames,\n win = H.win;\n var distribute = R.distribute;\n var addEvent = U.addEvent,\n createElement = U.createElement,\n css = U.css,\n defined = U.defined,\n discardElement = U.discardElement,\n find = U.find,\n fireEvent = U.fireEvent,\n isNumber = U.isNumber,\n merge = U.merge,\n pick = U.pick,\n relativeLength = U.relativeLength,\n stableSort = U.stableSort,\n syncTimeout = U.syncTimeout,\n 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 */\n var 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 || {},\n group = _a.group,\n label = _a.label,\n line = _a.line,\n 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,\n options = legend.options,\n hiddenColor = legend.itemHiddenStyle.color,\n textColor = visible ?\n options.itemStyle.color :\n hiddenColor,\n symbolColor = visible ?\n (item.color || hiddenColor) :\n hiddenColor,\n 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,\n _a = item.legendItem || {},\n group = _a.group,\n _b = _a.x,\n x = _b === void 0 ? 0 : _b,\n _c = _a.y,\n y = _c === void 0 ? 0 : _c,\n options = legend.options,\n symbolPadding = options.symbolPadding,\n ltr = !options.rtl,\n 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,\n 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,\n clipHeight = this.clipHeight || this.legendHeight,\n 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,\n padding = this.padding,\n titleOptions = options.title;\n var bBox,\n 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,\n legendItem = item.legendItem = item.legendItem || {},\n chart = legend.chart,\n renderer = chart.renderer,\n options = legend.options,\n horizontal = options.layout === 'horizontal',\n symbolWidth = legend.symbolWidth,\n symbolPadding = options.symbolPadding || 0,\n itemStyle = legend.itemStyle,\n itemHiddenStyle = legend.itemHiddenStyle,\n itemDistance = horizontal ? pick(options.itemDistance, 20) : 0,\n ltr = !options.rtl,\n isSeries = !item.series,\n series = !isSeries && item.series.drawLegendSymbol ?\n item.series :\n item,\n seriesOptions = series.options,\n showCheckbox = (legend.createCheckboxForItem) &&\n seriesOptions &&\n seriesOptions.showCheckbox,\n useHTML = options.useHTML,\n 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,\n padding = this.padding,\n horizontal = options.layout === 'horizontal',\n itemHeight = item.itemHeight,\n itemMarginBottom = this.itemMarginBottom,\n itemMarginTop = this.itemMarginTop,\n itemDistance = horizontal ? pick(options.itemDistance, 20) : 0,\n maxLegendWidth = this.maxLegendWidth,\n itemWidth = (options.alignColumns &&\n this.totalItemWidth > maxLegendWidth) ?\n this.maxItemWidth :\n item.itemWidth,\n 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,\n options = this.options,\n 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,\n boxes = [],\n alignLeft = this.options.align === 'left';\n this.allItems.forEach(function (item) {\n var lastPoint,\n height,\n useFirstPoint = alignLeft,\n target,\n 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,\n chart = legend.chart,\n renderer = chart.renderer,\n options = legend.options,\n padding = legend.padding, \n // add each series or point\n allItems = legend.getAllItems();\n var display,\n legendWidth,\n legendHeight,\n legendGroup = legend.group,\n allowedWidth,\n 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,\n 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,\n chart = this.chart,\n renderer = chart.renderer,\n options = this.options,\n optionsY = options.y,\n alignTop = options.verticalAlign === 'top',\n padding = this.padding,\n maxHeight = options.maxHeight,\n navOptions = options.navigation,\n animation = pick(navOptions.animation,\n true),\n arrowSize = navOptions.arrowSize || 12,\n pages = this.pages,\n allItems = this.allItems,\n 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,\n lastY,\n legendItem,\n spaceHeight = (chart.spacingBox.height +\n (alignTop ? -optionsY : optionsY) - padding),\n nav = this.nav,\n 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,\n 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,\n pages = this.pages,\n pageCount = pages.length,\n clipHeight = this.clipHeight,\n navOptions = this.options.navigation,\n pager = this.pager,\n 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,\n chart.renderer.globalAnimation,\n 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,\n legendItem = item.legendItem || {},\n boxWrapper = legend.chart.renderer.boxWrapper,\n isPoint = item instanceof Point,\n activeClass = 'highcharts-legend-' +\n (isPoint ? 'point' : 'series') + '-active',\n 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,\n 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',\n 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 * */\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 return Legend;\n });\n _registerModule(_modules, 'Core/Series/SeriesRegistry.js', [_modules['Core/Globals.js'], _modules['Core/Defaults.js'], _modules['Core/Series/Point.js'], _modules['Core/Utilities.js']], function (H, D, Point, U) {\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 var defaultOptions = D.defaultOptions;\n var extendClass = U.extendClass,\n merge = U.merge;\n /* *\n *\n * Namespace\n *\n * */\n var SeriesRegistry;\n (function (SeriesRegistry) {\n /* *\n *\n * Properties\n *\n * */\n /**\n * @internal\n * @todo Move `Globals.seriesTypes` code to her.\n */\n SeriesRegistry.seriesTypes = H.seriesTypes;\n /* *\n *\n * Functions\n *\n * */\n /**\n * Registers class pattern of a series.\n *\n * @private\n */\n function registerSeriesType(seriesType, SeriesClass) {\n var defaultPlotOptions = defaultOptions.plotOptions || {},\n seriesOptions = SeriesClass.defaultOptions,\n seriesProto = SeriesClass.prototype;\n seriesProto.type = seriesType;\n if (!seriesProto.pointClass) {\n seriesProto.pointClass = Point;\n }\n if (seriesOptions) {\n defaultPlotOptions[seriesType] = seriesOptions;\n }\n SeriesRegistry.seriesTypes[seriesType] = SeriesClass;\n }\n SeriesRegistry.registerSeriesType = registerSeriesType;\n /**\n * Old factory to create new series prototypes.\n *\n * @deprecated\n * @function Highcharts.seriesType\n *\n * @param {string} type\n * The series type name.\n *\n * @param {string} parent\n * The parent series type name. Use `line` to inherit from the basic\n * {@link Series} object.\n *\n * @param {Highcharts.SeriesOptionsType|Highcharts.Dictionary<*>} options\n * The additional default options that are merged with the parent's options.\n *\n * @param {Highcharts.Dictionary<*>} [props]\n * The properties (functions and primitives) to set on the new prototype.\n *\n * @param {Highcharts.Dictionary<*>} [pointProps]\n * Members for a series-specific extension of the {@link Point} prototype if\n * needed.\n *\n * @return {Highcharts.Series}\n * The newly created prototype as extended from {@link Series} or its\n * derivatives.\n */\n function seriesType(type, parent, options, seriesProto, pointProto) {\n var defaultPlotOptions = defaultOptions.plotOptions || {};\n parent = parent || '';\n // Merge the options\n defaultPlotOptions[type] = merge(defaultPlotOptions[parent], options);\n // Create the class\n registerSeriesType(type, extendClass(SeriesRegistry.seriesTypes[parent] || function () { }, seriesProto));\n SeriesRegistry.seriesTypes[type].prototype.type = type;\n // Create the point class if needed\n if (pointProto) {\n SeriesRegistry.seriesTypes[type].prototype.pointClass = extendClass(Point, pointProto);\n }\n return SeriesRegistry.seriesTypes[type];\n }\n SeriesRegistry.seriesType = seriesType;\n })(SeriesRegistry || (SeriesRegistry = {}));\n /* *\n *\n * Default Export\n *\n * */\n\n return SeriesRegistry;\n });\n _registerModule(_modules, 'Core/Chart/Chart.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Axis/Axis.js'], _modules['Core/Defaults.js'], _modules['Core/FormatUtilities.js'], _modules['Core/Foundation.js'], _modules['Core/Globals.js'], _modules['Core/Legend/Legend.js'], _modules['Core/MSPointer.js'], _modules['Core/Pointer.js'], _modules['Core/Renderer/RendererRegistry.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Time.js'], _modules['Core/Utilities.js'], _modules['Core/Renderer/HTML/AST.js']], function (A, Axis, D, FormatUtilities, Foundation, H, Legend, MSPointer, Pointer, RendererRegistry, SeriesRegistry, SVGRenderer, Time, U, AST) {\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 var animate = A.animate,\n animObject = A.animObject,\n setAnimation = A.setAnimation;\n var defaultOptions = D.defaultOptions,\n defaultTime = D.defaultTime;\n var numberFormat = FormatUtilities.numberFormat;\n var registerEventOptions = Foundation.registerEventOptions;\n var charts = H.charts,\n doc = H.doc,\n marginNames = H.marginNames,\n svg = H.svg,\n win = H.win;\n var seriesTypes = SeriesRegistry.seriesTypes;\n var addEvent = U.addEvent,\n attr = U.attr,\n cleanRecursively = U.cleanRecursively,\n createElement = U.createElement,\n css = U.css,\n defined = U.defined,\n discardElement = U.discardElement,\n erase = U.erase,\n error = U.error,\n extend = U.extend,\n find = U.find,\n fireEvent = U.fireEvent,\n getStyle = U.getStyle,\n isArray = U.isArray,\n isNumber = U.isNumber,\n isObject = U.isObject,\n isString = U.isString,\n merge = U.merge,\n objectEach = U.objectEach,\n pick = U.pick,\n pInt = U.pInt,\n relativeLength = U.relativeLength,\n removeEvent = U.removeEvent,\n splat = U.splat,\n syncTimeout = U.syncTimeout,\n 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 */\n var 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,\n 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,\n optionsChart = chart.options.chart,\n type = (options.type ||\n optionsChart.type ||\n optionsChart.defaultSeriesType),\n 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,\n inverted = _b.inverted,\n plotBox = _b.plotBox,\n plotLeft = _b.plotLeft,\n plotTop = _b.plotTop,\n scrollablePlotBox = _b.scrollablePlotBox;\n var scrollLeft = 0,\n scrollTop = 0;\n if (options.visiblePlotOnly && this.scrollingContainer) {\n (_a = this.scrollingContainer, scrollLeft = _a.scrollLeft, scrollTop = _a.scrollTop);\n }\n var series = options.series,\n box = (options.visiblePlotOnly && scrollablePlotBox) || plotBox,\n x = options.inverted ? plotY : plotX,\n y = options.inverted ? plotX : plotY,\n 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,\n axes = chart.hasCartesianSeries ? chart.axes : chart.colorAxis || [],\n series = chart.series,\n pointer = chart.pointer,\n legend = chart.legend,\n legendUserOptions = chart.userOptions.legend,\n renderer = chart.renderer,\n isHiddenChart = renderer.isHidden(),\n afterRedraw = [];\n var hasDirtyStacks,\n hasStackedSeries,\n i,\n isDirtyBox = chart.isDirtyBox,\n redrawLegend = chart.isDirtyLegend,\n 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,\n itemById) ||\n // Search series\n find(this.series,\n 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,\n options = this.options,\n xAxisOptions = options.xAxis = splat(options.xAxis || {}),\n 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 }),\n this.options[name],\n 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],\n renderer = this.renderer,\n 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,\n 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,\n optionsChart = chart.options.chart,\n widthOption = optionsChart.width,\n heightOption = optionsChart.height,\n 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,\n 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,\n options = chart.options,\n optionsChart = options.chart,\n indexAttrName = 'data-highcharts-chart',\n containerId = uniqueKey();\n var containerStyle,\n 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,\n 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 },\n containerStyle,\n 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,\n spacing = _a.spacing,\n margin = _a.margin,\n 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],\n colorAxis = chart.colorAxis,\n margin = chart.margin,\n 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,\n 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,\n inverted = chart.inverted,\n renderer = chart.renderer,\n chartWidth = chart.chartWidth,\n chartHeight = chart.chartHeight,\n optionsChart = chart.options.chart,\n spacing = chart.spacing,\n clipOffset = chart.clipOffset;\n var plotLeft,\n plotTop,\n plotWidth,\n 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),\n clipX = Math.ceil(Math.max(plotBorderWidth,\n clipOffset[3]) / 2),\n clipY = Math.ceil(Math.max(plotBorderWidth,\n 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,\n chartOptions = chart.options.chart;\n // Create margin and spacing array\n ['margin', 'spacing'].forEach(function splashArrays(target) {\n var value = chartOptions[target],\n values = isObject(value) ? value : [value,\n value,\n value,\n 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,\n optionsChart = chart.options.chart,\n renderer = chart.renderer,\n chartWidth = chart.chartWidth,\n chartHeight = chart.chartHeight,\n styledMode = chart.styledMode,\n plotBGImage = chart.plotBGImage,\n chartBackgroundColor = optionsChart.backgroundColor,\n plotBackgroundColor = optionsChart.plotBackgroundColor,\n plotBackgroundImage = optionsChart.plotBackgroundImage,\n plotLeft = chart.plotLeft,\n plotTop = chart.plotTop,\n plotWidth = chart.plotWidth,\n plotHeight = chart.plotHeight,\n plotBox = chart.plotBox,\n clipRect = chart.clipRect,\n clipBox = chart.clipBox;\n var chartBackground = chart.chartBackground,\n plotBackground = chart.plotBackground,\n plotBorder = chart.plotBorder,\n chartBorderWidth,\n mgn,\n bgAttr,\n 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,\n optionsChart = chart.options.chart,\n seriesOptions = chart.options.series;\n var i,\n klass,\n 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,\n 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,\n labels = chart.options.labels;\n if (labels.items) {\n labels.items.forEach(function (label) {\n var style = extend(labels.style,\n label.style),\n x = pInt(style.left) + chart.plotLeft,\n 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,\n axes = chart.axes,\n colorAxis = chart.colorAxis,\n renderer = chart.renderer,\n options = chart.options,\n 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,\n creds = merge(true,\n this.options.credits,\n 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,\n axes = chart.axes,\n series = chart.series,\n container = chart.container,\n 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,\n 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,\n options = _a.options,\n 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,\n 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,\n options = chart.options,\n loadingOptions = options.loading,\n 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,\n 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,\n 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,\n adders = {\n credits: 'addCredits',\n title: 'setTitle',\n subtitle: 'setSubtitle',\n caption: 'setCaption'\n },\n isResponsiveOptions = options.isResponsiveOptions,\n itemsForRemoval = [];\n var updateAllAxes,\n updateAllSeries,\n 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,\n 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,\n lang = defaultOptions.lang,\n btnOptions = chart.options.chart.zooming.resetButton,\n theme = btnOptions.theme,\n 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,\n pointer = chart.pointer;\n var displayButton = false,\n 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,\n 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,\n hoverPoints = chart.hoverPoints,\n panningOptions = (typeof panning === 'object' ?\n panning :\n {\n enabled: panning,\n type: 'x'\n }),\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,\n newMax = flipped ? panMin : panMax,\n panningState = axis.panningState,\n 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),\n dataExtremes = series.getExtremes(processedData.yData,\n 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,\n extremes.dataMin),\n halfPointRange ?\n extremes.min :\n axis.toValue(axis.toPixels(extremes.min) -\n axis.minPixelPadding));\n var paddedMax = Math.max(pick(panningState && panningState.startMax,\n extremes.dataMax),\n 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 }());\n extend(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 * */\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 return Chart;\n });\n _registerModule(_modules, 'Core/Legend/LegendSymbol.js', [_modules['Core/Utilities.js']], function (U) {\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 var extend = U.extend,\n merge = U.merge,\n pick = U.pick;\n /* *\n *\n * Namespace\n *\n * */\n var 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 || {},\n options = this.options,\n symbolWidth = legend.symbolWidth,\n symbolHeight = legend.symbolHeight,\n generalRadius = symbolHeight / 2,\n renderer = this.chart.renderer,\n legendItemGroup = legendItem.group,\n verticalCenter = legend.baseline -\n Math.round(legend.fontMetrics.b * 0.3);\n var attr = {},\n legendSymbol,\n markerOptions = options.marker,\n 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,\n generalRadius),\n 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 || {},\n options = legend.options,\n symbolHeight = legend.symbolHeight,\n square = options.squareSymbol,\n 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 * */\n\n return LegendSymbol;\n });\n _registerModule(_modules, 'Core/Series/SeriesDefaults.js', [], function () {\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 /* *\n *\n * API Options\n *\n * */\n /**\n * General options for all series types.\n *\n * @optionparent plotOptions.series\n */\n var 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 * */\n\n return seriesDefaults;\n });\n _registerModule(_modules, 'Core/Series/Series.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Defaults.js'], _modules['Core/Foundation.js'], _modules['Core/Globals.js'], _modules['Core/Legend/LegendSymbol.js'], _modules['Core/Series/Point.js'], _modules['Core/Series/SeriesDefaults.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Utilities.js']], function (A, D, F, H, LegendSymbol, Point, SeriesDefaults, SeriesRegistry, SVGElement, U) {\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 var animObject = A.animObject,\n setAnimation = A.setAnimation;\n var defaultOptions = D.defaultOptions;\n var registerEventOptions = F.registerEventOptions;\n var hasTouch = H.hasTouch,\n svg = H.svg,\n win = H.win;\n var seriesTypes = SeriesRegistry.seriesTypes;\n var addEvent = U.addEvent,\n arrayMax = U.arrayMax,\n arrayMin = U.arrayMin,\n clamp = U.clamp,\n cleanRecursively = U.cleanRecursively,\n correctFloat = U.correctFloat,\n defined = U.defined,\n erase = U.erase,\n error = U.error,\n extend = U.extend,\n find = U.find,\n fireEvent = U.fireEvent,\n getNestedProperty = U.getNestedProperty,\n isArray = U.isArray,\n isNumber = U.isNumber,\n isString = U.isString,\n merge = U.merge,\n objectEach = U.objectEach,\n pick = U.pick,\n removeEvent = U.removeEvent,\n splat = U.splat,\n 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 */\n var 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,\n 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,\n seriesOptions = series.options,\n 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,\n args = arguments,\n 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,\n pointIntervalUnit = options.pointIntervalUnit,\n relativeXValue = options.relativeXValue,\n time = this.chart.time;\n var xIncrement = this.xIncrement,\n date,\n 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,\n chartOptions = chart.options,\n plotOptions = chartOptions.plotOptions,\n userOptions = chart.userOptions || {},\n seriesUserOptions = merge(itemOptions),\n styledMode = chart.styledMode,\n 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],\n 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,\n plotOptions.series, \n // #3881, chart instance plotOptions[type] should trump\n // plotOptions.series\n userOptions.plotOptions &&\n userOptions.plotOptions[this.type],\n 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,\n 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,\n x = optionsObject.x,\n oldData = this.points,\n dataSorting = this.options.dataSorting;\n var matchingPoint,\n matchedById,\n 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,\n dataSorting = options.dataSorting,\n oldData = this.points,\n pointsToAdd = [],\n requireSorting = this.requireSorting,\n equalLength = data.length === oldData.length;\n var hasUpdatedByKey,\n i,\n point,\n lastIndex,\n 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 },\n pointOptions)) || {};\n var pointIndex;\n // Get the x of the new data point\n var x = optionsObject.x,\n 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,\n oldData = series.points,\n oldDataLength = (oldData && oldData.length) || 0,\n options = series.options,\n chart = series.chart,\n dataSorting = options.dataSorting,\n xAxis = series.xAxis,\n turboThreshold = options.turboThreshold,\n xData = this.xData,\n yData = this.yData,\n pointArrayMap = series.pointArrayMap,\n valueCount = pointArrayMap && pointArrayMap.length,\n keys = options.keys;\n var i,\n pt,\n updatedData,\n indexOfX = 0,\n indexOfY = 1,\n firstPoint = null,\n 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,\n options = series.options,\n dataSorting = options.dataSorting,\n sortKey = dataSorting.sortKey || 'y',\n getPointOptionsObject = function (series,\n pointOptions) {\n return (defined(pointOptions) &&\n series.pointClass.prototype.optionsToObject.call({\n series: series\n },\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,\n b) {\n var aValue = getNestedProperty(sortKey,\n a);\n var bValue = getNestedProperty(sortKey,\n 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,\n 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,\n xAxis = series.xAxis,\n options = series.options,\n cropThreshold = options.cropThreshold,\n getExtremesFromAll = forceExtremesFromAll ||\n series.getExtremesFromAll ||\n options.getExtremesFromAll, // #4599\n isCartesian = series.isCartesian,\n val2lin = xAxis && xAxis.val2lin,\n isLog = !!(xAxis && xAxis.logarithmic);\n var croppedData,\n cropped,\n cropStart = 0,\n distance,\n closestPointRange,\n i, // loop variable\n xExtremes,\n min,\n max, \n // copied during slice operation:\n processedXData = series.xData,\n processedYData = series.yData,\n throwOnUnsorted = series.requireSorting,\n 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,\n 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,\n j,\n cropStart = 0,\n 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,\n options = series.options,\n dataOptions = (series.processedData || options.data),\n processedXData = series.processedXData,\n processedYData = series.processedYData,\n PointClass = series.pointClass,\n processedDataLength = processedXData.length,\n cropStart = series.cropStart || 0,\n hasGroupedData = series.hasGroupedData,\n keys = options.keys,\n points = [],\n groupCropStartIndex = (options.dataGrouping &&\n options.dataGrouping.groupAll ?\n cropStart :\n 0);\n var dataLength,\n cursor,\n point,\n i,\n 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,\n yAxis = this.yAxis,\n xData = this.processedXData || this.xData,\n 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,\n positiveValuesOnly = yAxis ? yAxis.positiveValuesOnly : false;\n // #2117, need to compensate for log X axis\n var xExtremes,\n validValue,\n withinRange,\n x,\n y,\n i,\n j,\n xMin = 0,\n xMax = 0,\n 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,\n 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,\n options = series.options,\n stacking = options.stacking,\n xAxis = series.xAxis,\n categories = xAxis.categories,\n enabledDataSorting = series.enabledDataSorting,\n yAxis = series.yAxis,\n points = series.points,\n dataLength = points.length,\n pointPlacement = series.pointPlacementToXValue(), // #7860\n dynamicallyPlaced = Boolean(pointPlacement),\n threshold = options.threshold,\n stackThreshold = options.startFromThreshold ? threshold : 0,\n zoneAxis = this.zoneAxis || 'y';\n var i,\n plotX,\n lastPlotX,\n stackIndicator,\n 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],\n xValue = point.x;\n var pointStack = void 0,\n stackValues = void 0,\n yValue = point.y,\n 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,\n false,\n true,\n false,\n 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,\n chart = _a.chart,\n xAxis = _a.xAxis,\n 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,\n chart = _a.chart,\n group = _a.group,\n markerGroup = _a.markerGroup,\n sharedClips = chart.sharedClips,\n renderer = chart.renderer,\n clipBox = this.getClipBox(),\n 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],\n 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(),\n 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,\n chart = series.chart,\n styledMode = chart.styledMode,\n colorAxis = series.colorAxis,\n options = series.options,\n seriesMarkerOptions = options.marker,\n markerGroup = series[series.specialGroup || 'markerGroup'],\n xAxis = series.xAxis,\n 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,\n point,\n graphic,\n verb,\n pointMarkerOptions,\n hasPointMarker,\n 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,\n 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,\n seriesMarkerOptions = seriesOptions.marker,\n pointMarkerOptions = point.marker || {},\n symbol = (pointMarkerOptions.symbol ||\n seriesMarkerOptions.symbol),\n attribs = {};\n var seriesStateOptions,\n pointStateOptions,\n radius = pick(pointMarkerOptions.radius,\n 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,\n pointOptions = point && point.options,\n pointMarkerOptions = ((pointOptions && pointOptions.marker) || {}),\n pointColorOption = pointOptions && pointOptions.color,\n pointColor = point && point.color,\n zoneColor = point && point.zone && point.zone.color;\n var seriesStateOptions,\n pointStateOptions,\n color = this.color,\n fill,\n stroke,\n strokeWidth = pick(pointMarkerOptions.lineWidth,\n seriesMarkerOptions.lineWidth),\n 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,\n chart = series.chart,\n issue134 = /AppleWebKit\\/533/.test(win.navigator.userAgent),\n data = series.data || [];\n var destroy,\n i,\n point,\n 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,\n chart = this.chart,\n renderer = chart.renderer,\n zones = this.zones,\n clips = (this.clips || []),\n graph = this.graph,\n area = this.area,\n plotSizeMax = Math.max(chart.plotWidth,\n chart.plotHeight),\n axis = this[(this.zoneAxis || 'y') + 'Axis'],\n inverted = chart.inverted;\n var translatedFrom,\n translatedTo,\n clipAttr,\n extremes,\n reversed,\n horiz,\n pxRange,\n pxPosMin,\n pxPosMax,\n zoneArea,\n zoneGraph,\n 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,\n 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,\n vertAxis = this.yAxis;\n var chart = this.chart,\n 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,\n chart = series.chart,\n options = series.options,\n animOptions = animObject(options.animation),\n visibility = series.visible ?\n 'inherit' : 'hidden', // #2597\n zIndex = options.zIndex,\n hasRendered = series.hasRendered,\n chartSeriesGroup = chart.seriesGroup,\n 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,\n xAxis = series.xAxis,\n yAxis = series.yAxis,\n 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,\n 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,\n 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,\n kdX = this.kdAxisArray[0],\n kdY = this.kdAxisArray[1],\n kdComparer = compareX ? 'distX' : 'dist',\n 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,\n y = (defined(p1[kdY]) &&\n defined(p2[kdY])) ?\n Math.pow(p1[kdY] - p2[kdY], 2) :\n null,\n 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,\n axis = series.kdAxisArray[depth % dimensions];\n var nPoint1,\n nPoint2,\n 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,\n _b = _a.options,\n pointPlacement = _b.pointPlacement,\n pointRange = _b.pointRange,\n 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,\n chart = _a.chart,\n xAxis = _a.xAxis,\n yAxis = _a.yAxis,\n 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,\n options = series.options,\n trackByArea = options.trackByArea,\n trackerPath = [].concat(trackByArea ?\n series.areaPath :\n series.graphPath), \n // trackerPathLength = trackerPath.length,\n chart = series.chart,\n pointer = chart.pointer,\n renderer = chart.renderer,\n snap = chart.options.tooltip.snap,\n tracker = series.tracker,\n 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,\n seriesOptions = series.options,\n data = series.data,\n chart = series.chart,\n xAxis = series.xAxis,\n names = xAxis && xAxis.hasNames && xAxis.names,\n dataOptions = seriesOptions.data,\n xData = series.xData;\n var isInTheMiddle,\n 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,\n data = series.data,\n point = data[i],\n points = series.points,\n chart = series.chart,\n 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,\n 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,\n 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,\n initialType = series.initialType || series.type,\n plotOptions = chart.options.plotOptions,\n initialSeriesProto = seriesTypes[initialType].prototype,\n 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 },\n kinds = {};\n var seriesOptions,\n n,\n preserve = [\n 'eventOptions',\n 'navigatorSeries',\n 'baseSeries'\n ],\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,\n dataLabels = seriesOptions.dataLabels,\n 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,\n option = this.options[optionName],\n plotOptions = chart.options.plotOptions,\n 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,\n chart = series.chart,\n hoverSeries = chart.hoverSeries,\n 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,\n options = series.options,\n chart = series.chart,\n tooltip = chart.tooltip,\n 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,\n options = series.options,\n graph = series.graph,\n inactiveOtherPoints = options.inactiveOtherPoints,\n 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),\n series.chart.options.chart.animation);\n var attribs,\n lineWidth = options.lineWidth,\n i = 0,\n 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,\n chart = series.chart,\n ignoreHiddenSeries = chart.options.chart.ignoreHiddenSeries,\n 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 }());\n extend(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 * */\n SeriesRegistry.series = Series;\n /* *\n *\n * Default Export\n *\n * */\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 return Series;\n });\n _registerModule(_modules, 'Extensions/ScrollablePlotArea.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Series/Series.js'], _modules['Core/Renderer/RendererRegistry.js'], _modules['Core/Utilities.js']], function (A, Axis, Chart, Series, RendererRegistry, U) {\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 * Highcharts feature to make the Y axis stay fixed when scrolling the chart\n * horizontally on mobile devices. Supports left and right side axes.\n */\n /*\n WIP on vertical scrollable plot area (#9378). To do:\n - Bottom axis positioning\n - Test with Gantt\n - Look for size optimizing the code\n - API and demos\n */\n var stop = A.stop;\n var addEvent = U.addEvent,\n createElement = U.createElement,\n defined = U.defined,\n merge = U.merge,\n pick = U.pick;\n /* eslint-disable no-invalid-this, valid-jsdoc */\n addEvent(Chart, 'afterSetChartSize', function (e) {\n var scrollablePlotArea = this.options.chart.scrollablePlotArea,\n scrollableMinWidth = scrollablePlotArea && scrollablePlotArea.minWidth,\n scrollableMinHeight = scrollablePlotArea && scrollablePlotArea.minHeight,\n scrollablePixelsX,\n scrollablePixelsY,\n corrections;\n if (!this.renderer.forExport) {\n // The amount of pixels to scroll, the difference between chart\n // width and scrollable width\n if (scrollableMinWidth) {\n this.scrollablePixelsX = scrollablePixelsX = Math.max(0, scrollableMinWidth - this.chartWidth);\n if (scrollablePixelsX) {\n this.scrollablePlotBox = (this.renderer.scrollablePlotBox = merge(this.plotBox));\n this.plotBox.width = this.plotWidth += scrollablePixelsX;\n if (this.inverted) {\n this.clipBox.height += scrollablePixelsX;\n }\n else {\n this.clipBox.width += scrollablePixelsX;\n }\n corrections = {\n // Corrections for right side\n 1: { name: 'right', value: scrollablePixelsX }\n };\n }\n // Currently we can only do either X or Y\n }\n else if (scrollableMinHeight) {\n this.scrollablePixelsY = scrollablePixelsY = Math.max(0, scrollableMinHeight - this.chartHeight);\n if (defined(scrollablePixelsY)) {\n this.scrollablePlotBox = (this.renderer.scrollablePlotBox = merge(this.plotBox));\n this.plotBox.height = this.plotHeight += scrollablePixelsY;\n if (this.inverted) {\n this.clipBox.width += scrollablePixelsY;\n }\n else {\n this.clipBox.height += scrollablePixelsY;\n }\n corrections = {\n 2: { name: 'bottom', value: scrollablePixelsY }\n };\n }\n }\n if (corrections && !e.skipAxes) {\n this.axes.forEach(function (axis) {\n // For right and bottom axes, only fix the plot line length\n if (corrections[axis.side]) {\n // Get the plot lines right in getPlotLinePath,\n // temporarily set it to the adjusted plot width.\n axis.getPlotLinePath = function () {\n var marginName = corrections[axis.side].name,\n correctionValue = corrections[axis.side].value, \n // axis.right or axis.bottom\n margin = this[marginName],\n path;\n // Temporarily adjust\n this[marginName] = margin - correctionValue;\n path = Axis.prototype.getPlotLinePath.apply(this, arguments);\n // Reset\n this[marginName] = margin;\n return path;\n };\n }\n else {\n // Apply the corrected plotWidth\n axis.setAxisSize();\n axis.setAxisTranslation();\n }\n });\n }\n }\n });\n addEvent(Chart, 'render', function () {\n if (this.scrollablePixelsX || this.scrollablePixelsY) {\n if (this.setUpScrolling) {\n this.setUpScrolling();\n }\n this.applyFixed();\n }\n else if (this.fixedDiv) { // Has been in scrollable mode\n this.applyFixed();\n }\n });\n /**\n * @private\n * @function Highcharts.Chart#setUpScrolling\n * @return {void}\n */\n Chart.prototype.setUpScrolling = function () {\n var _this = this;\n var css = {\n WebkitOverflowScrolling: 'touch',\n overflowX: 'hidden',\n overflowY: 'hidden'\n };\n if (this.scrollablePixelsX) {\n css.overflowX = 'auto';\n }\n if (this.scrollablePixelsY) {\n css.overflowY = 'auto';\n }\n // Insert a container with position relative\n // that scrolling and fixed container renders to (#10555)\n this.scrollingParent = createElement('div', {\n className: 'highcharts-scrolling-parent'\n }, {\n position: 'relative'\n }, this.renderTo);\n // Add the necessary divs to provide scrolling\n this.scrollingContainer = createElement('div', {\n 'className': 'highcharts-scrolling'\n }, css, this.scrollingParent);\n // On scroll, reset the chart position because it applies to the scrolled\n // container\n var lastHoverPoint;\n addEvent(this.scrollingContainer, 'scroll', function () {\n if (_this.pointer) {\n delete _this.pointer.chartPosition;\n if (_this.hoverPoint) {\n lastHoverPoint = _this.hoverPoint;\n }\n _this.pointer.runPointActions(void 0, lastHoverPoint, true);\n }\n });\n this.innerContainer = createElement('div', {\n 'className': 'highcharts-inner-container'\n }, null, this.scrollingContainer);\n // Now move the container inside\n this.innerContainer.appendChild(this.container);\n // Don't run again\n this.setUpScrolling = null;\n };\n /**\n * These elements are moved over to the fixed renderer and stay fixed when the\n * user scrolls the chart\n * @private\n */\n Chart.prototype.moveFixedElements = function () {\n var container = this.container,\n fixedRenderer = this.fixedRenderer,\n fixedSelectors = [\n '.highcharts-breadcrumbs-group',\n '.highcharts-contextbutton',\n '.highcharts-credits',\n '.highcharts-legend',\n '.highcharts-legend-checkbox',\n '.highcharts-navigator-series',\n '.highcharts-navigator-xaxis',\n '.highcharts-navigator-yaxis',\n '.highcharts-navigator',\n '.highcharts-reset-zoom',\n '.highcharts-drillup-button',\n '.highcharts-scrollbar',\n '.highcharts-subtitle',\n '.highcharts-title'\n ],\n axisClass;\n if (this.scrollablePixelsX && !this.inverted) {\n axisClass = '.highcharts-yaxis';\n }\n else if (this.scrollablePixelsX && this.inverted) {\n axisClass = '.highcharts-xaxis';\n }\n else if (this.scrollablePixelsY && !this.inverted) {\n axisClass = '.highcharts-xaxis';\n }\n else if (this.scrollablePixelsY && this.inverted) {\n axisClass = '.highcharts-yaxis';\n }\n if (axisClass) {\n fixedSelectors.push(\"\" + axisClass + \":not(.highcharts-radial-axis)\", \"\" + axisClass + \"-labels:not(.highcharts-radial-axis-labels)\");\n }\n fixedSelectors.forEach(function (className) {\n [].forEach.call(container.querySelectorAll(className), function (elem) {\n (elem.namespaceURI === fixedRenderer.SVG_NS ?\n fixedRenderer.box :\n fixedRenderer.box.parentNode).appendChild(elem);\n elem.style.pointerEvents = 'auto';\n });\n });\n };\n /**\n * @private\n * @function Highcharts.Chart#applyFixed\n * @return {void}\n */\n Chart.prototype.applyFixed = function () {\n var firstTime = !this.fixedDiv,\n chartOptions = this.options.chart,\n scrollableOptions = chartOptions.scrollablePlotArea,\n Renderer = RendererRegistry.getRendererType();\n var fixedRenderer,\n scrollableWidth,\n scrollableHeight;\n // First render\n if (firstTime) {\n this.fixedDiv = createElement('div', {\n className: 'highcharts-fixed'\n }, {\n position: 'absolute',\n overflow: 'hidden',\n pointerEvents: 'none',\n zIndex: (chartOptions.style && chartOptions.style.zIndex || 0) + 2,\n top: 0\n }, null, true);\n if (this.scrollingContainer) {\n this.scrollingContainer.parentNode.insertBefore(this.fixedDiv, this.scrollingContainer);\n }\n this.renderTo.style.overflow = 'visible';\n this.fixedRenderer = fixedRenderer = new Renderer(this.fixedDiv, this.chartWidth, this.chartHeight, this.options.chart.style);\n // Mask\n this.scrollableMask = fixedRenderer\n .path()\n .attr({\n fill: this.options.chart.backgroundColor || '#fff',\n 'fill-opacity': pick(scrollableOptions.opacity, 0.85),\n zIndex: -1\n })\n .addClass('highcharts-scrollable-mask')\n .add();\n addEvent(this, 'afterShowResetZoom', this.moveFixedElements);\n addEvent(this, 'afterApplyDrilldown', this.moveFixedElements);\n addEvent(this, 'afterLayOutTitles', this.moveFixedElements);\n }\n else {\n // Set the size of the fixed renderer to the visible width\n this.fixedRenderer.setSize(this.chartWidth, this.chartHeight);\n }\n if (this.scrollableDirty || firstTime) {\n this.scrollableDirty = false;\n this.moveFixedElements();\n }\n // Increase the size of the scrollable renderer and background\n scrollableWidth = this.chartWidth + (this.scrollablePixelsX || 0);\n scrollableHeight = this.chartHeight + (this.scrollablePixelsY || 0);\n stop(this.container);\n this.container.style.width = scrollableWidth + 'px';\n this.container.style.height = scrollableHeight + 'px';\n this.renderer.boxWrapper.attr({\n width: scrollableWidth,\n height: scrollableHeight,\n viewBox: [0, 0, scrollableWidth, scrollableHeight].join(' ')\n });\n this.chartBackground.attr({\n width: scrollableWidth,\n height: scrollableHeight\n });\n this.scrollingContainer.style.height = this.chartHeight + 'px';\n // Set scroll position\n if (firstTime) {\n if (scrollableOptions.scrollPositionX) {\n this.scrollingContainer.scrollLeft =\n this.scrollablePixelsX *\n scrollableOptions.scrollPositionX;\n }\n if (scrollableOptions.scrollPositionY) {\n this.scrollingContainer.scrollTop =\n this.scrollablePixelsY *\n scrollableOptions.scrollPositionY;\n }\n }\n // Mask behind the left and right side\n var axisOffset = this.axisOffset,\n maskTop = this.plotTop - axisOffset[0] - 1,\n maskLeft = this.plotLeft - axisOffset[3] - 1,\n maskBottom = this.plotTop + this.plotHeight + axisOffset[2] + 1,\n maskRight = this.plotLeft + this.plotWidth + axisOffset[1] + 1,\n maskPlotRight = this.plotLeft + this.plotWidth -\n (this.scrollablePixelsX || 0),\n maskPlotBottom = this.plotTop + this.plotHeight -\n (this.scrollablePixelsY || 0),\n d;\n if (this.scrollablePixelsX) {\n d = [\n // Left side\n ['M', 0, maskTop],\n ['L', this.plotLeft - 1, maskTop],\n ['L', this.plotLeft - 1, maskBottom],\n ['L', 0, maskBottom],\n ['Z'],\n // Right side\n ['M', maskPlotRight, maskTop],\n ['L', this.chartWidth, maskTop],\n ['L', this.chartWidth, maskBottom],\n ['L', maskPlotRight, maskBottom],\n ['Z']\n ];\n }\n else if (this.scrollablePixelsY) {\n d = [\n // Top side\n ['M', maskLeft, 0],\n ['L', maskLeft, this.plotTop - 1],\n ['L', maskRight, this.plotTop - 1],\n ['L', maskRight, 0],\n ['Z'],\n // Bottom side\n ['M', maskLeft, maskPlotBottom],\n ['L', maskLeft, this.chartHeight],\n ['L', maskRight, this.chartHeight],\n ['L', maskRight, maskPlotBottom],\n ['Z']\n ];\n }\n else {\n d = [['M', 0, 0]];\n }\n if (this.redrawTrigger !== 'adjustHeight') {\n this.scrollableMask.attr({ d: d });\n }\n };\n addEvent(Axis, 'afterInit', function () {\n this.chart.scrollableDirty = true;\n });\n addEvent(Series, 'show', function () {\n this.chart.scrollableDirty = true;\n });\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * Options for a scrollable plot area. This feature provides a minimum size for\n * the plot area of the chart. If the size gets smaller than this, typically\n * on mobile devices, a native browser scrollbar is presented. This scrollbar\n * provides smooth scrolling for the contents of the plot area, whereas the\n * title, legend and unaffected axes are fixed.\n *\n * Since v7.1.2, a scrollable plot area can be defined for either horizontal or\n * vertical scrolling, depending on whether the `minWidth` or `minHeight`\n * option is set.\n *\n * @sample highcharts/chart/scrollable-plotarea\n * Scrollable plot area\n * @sample highcharts/chart/scrollable-plotarea-vertical\n * Vertically scrollable plot area\n * @sample {gantt} gantt/chart/scrollable-plotarea-vertical\n * Gantt chart with vertically scrollable plot area\n *\n * @since 6.1.0\n * @product highcharts gantt\n * @apioption chart.scrollablePlotArea\n */\n /**\n * The minimum height for the plot area. If it gets smaller than this, the plot\n * area will become scrollable.\n *\n * @type {number}\n * @since 7.1.2\n * @apioption chart.scrollablePlotArea.minHeight\n */\n /**\n * The minimum width for the plot area. If it gets smaller than this, the plot\n * area will become scrollable.\n *\n * @type {number}\n * @since 6.1.0\n * @apioption chart.scrollablePlotArea.minWidth\n */\n /**\n * The initial scrolling position of the scrollable plot area. Ranges from 0 to\n * 1, where 0 aligns the plot area to the left and 1 aligns it to the right.\n * Typically we would use 1 if the chart has right aligned Y axes.\n *\n * @type {number}\n * @since 6.1.0\n * @apioption chart.scrollablePlotArea.scrollPositionX\n */\n /**\n * The initial scrolling position of the scrollable plot area. Ranges from 0 to\n * 1, where 0 aligns the plot area to the top and 1 aligns it to the bottom.\n *\n * @type {number}\n * @since 7.1.2\n * @apioption chart.scrollablePlotArea.scrollPositionY\n */\n /**\n * The opacity of mask applied on one of the sides of the plot\n * area.\n *\n * @sample {highcharts} highcharts/chart/scrollable-plotarea-opacity\n * Disabled opacity for the mask\n *\n * @type {number}\n * @default 0.85\n * @since 7.1.1\n * @apioption chart.scrollablePlotArea.opacity\n */\n (''); // keep doclets above in transpiled file\n\n });\n _registerModule(_modules, 'Core/Axis/Stacking/StackItem.js', [_modules['Core/FormatUtilities.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (FU, SeriesRegistry, U) {\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 var format = FU.format;\n var Series = SeriesRegistry.series;\n var destroyObjectProperties = U.destroyObjectProperties,\n pick = U.pick,\n isNumber = U.isNumber;\n /* *\n *\n * Class\n *\n * */\n /**\n * The class for stacks. Each stack, on a specific X value and either negative\n * or positive, has its own stack item.\n * @private\n */\n var StackItem = /** @class */ (function () {\n /* *\n *\n * Constructor\n *\n * */\n function StackItem(axis, options, negativeValue, x, stackOption) {\n var inverted = axis.chart.inverted, reversed = axis.reversed;\n this.axis = axis;\n // The stack goes to the left either if the stack has negative value\n // or when axis is reversed. XOR operator.\n var isNegative = (this.isNegative = !!negativeValue !== !!reversed);\n // Save the options to be able to style the label\n this.options = options = options || {};\n // Save the x value to be able to position the label later\n this.x = x;\n // Initialize total value\n this.total = null;\n this.cumulative = null;\n // This will keep each points' extremes stored by series.index and point\n // index\n this.points = {};\n this.hasValidPoints = false;\n // Save the stack option on the series configuration object,\n // and whether to treat it as percent\n this.stack = stackOption;\n this.leftCliff = 0;\n this.rightCliff = 0;\n // The align options and text align varies on whether the stack is\n // negative and if the chart is inverted or not.\n // First test the user supplied value, then use the dynamic.\n this.alignOptions = {\n align: options.align ||\n (inverted ? (isNegative ? 'left' : 'right') : 'center'),\n verticalAlign: options.verticalAlign ||\n (inverted ? 'middle' : isNegative ? 'bottom' : 'top'),\n y: options.y,\n x: options.x\n };\n this.textAlign =\n options.textAlign ||\n (inverted ? (!isNegative ? 'left' : 'right') : 'center');\n }\n /**\n * @private\n */\n StackItem.prototype.destroy = function () {\n destroyObjectProperties(this, this.axis);\n };\n /**\n * Renders the stack total label and adds it to the stack label group.\n * @private\n */\n StackItem.prototype.render = function (group) {\n var chart = this.axis.chart,\n options = this.options,\n formatOption = options.format, \n // Format the text in the label.\n str = formatOption ?\n format(formatOption,\n this,\n chart) :\n options.formatter.call(this);\n // Change the text to reflect the new total and set visibility to hidden\n // in case the serie is hidden\n if (this.label) {\n this.label.attr({ text: str, visibility: 'hidden' });\n }\n else {\n // Create new label\n this.label = chart.renderer.label(str, null, void 0, options.shape, void 0, void 0, options.useHTML, false, 'stack-labels');\n var attr = {\n r: options.borderRadius || 0,\n text: str,\n // set default padding to 5 as it is in datalabels #12308\n padding: pick(options.padding, 5),\n visibility: 'hidden' // hidden until setOffset is called\n };\n if (!chart.styledMode) {\n attr.fill = options.backgroundColor;\n attr.stroke = options.borderColor;\n attr['stroke-width'] = options.borderWidth;\n this.label.css(options.style || {});\n }\n this.label.attr(attr);\n if (!this.label.added) {\n this.label.add(group); // add to the labels-group\n }\n }\n // Rank it higher than data labels (#8742)\n this.label.labelrank = chart.plotSizeY;\n };\n /**\n * Sets the offset that the stack has from the x value and repositions the\n * label.\n * @private\n */\n StackItem.prototype.setOffset = function (xOffset, xWidth, boxBottom, boxTop, defaultX, xAxis) {\n var _a = this,\n alignOptions = _a.alignOptions,\n axis = _a.axis,\n label = _a.label,\n options = _a.options,\n textAlign = _a.textAlign,\n chart = axis.chart,\n stackBox = this.getStackBox({\n xOffset: xOffset,\n width: xWidth,\n boxBottom: boxBottom,\n boxTop: boxTop,\n defaultX: defaultX,\n xAxis: xAxis\n }),\n verticalAlign = alignOptions.verticalAlign;\n if (label && stackBox) {\n var labelBox = label.getBBox(),\n padding = label.padding;\n var isJustify = pick(options.overflow, 'justify') === 'justify',\n visible = void 0;\n // Reset alignOptions property after justify #12337\n alignOptions.x = options.x || 0;\n alignOptions.y = options.y || 0;\n // Calculate the adjusted Stack position, to take into consideration\n // The size if the labelBox and vertical alignment as\n // well as the text alignment. It's need to be done to work with\n // default SVGLabel.align/justify methods.\n var _b = this.adjustStackPosition({\n labelBox: labelBox,\n verticalAlign: verticalAlign,\n textAlign: textAlign\n }),\n x = _b.x,\n y = _b.y;\n stackBox.x -= x;\n stackBox.y -= y;\n // Align the label to the adjusted box.\n label.align(alignOptions, false, stackBox);\n // Check if label is inside the plotArea #12294\n visible = chart.isInsidePlot(label.alignAttr.x + alignOptions.x + x, label.alignAttr.y + alignOptions.y + y);\n if (!visible) {\n isJustify = false;\n }\n if (isJustify) {\n // Justify stackLabel into the stackBox\n Series.prototype.justifyDataLabel.call(axis, label, alignOptions, label.alignAttr, labelBox, stackBox);\n }\n // Add attr to aviod the default animation of justifyDataLabel.\n // Also add correct rotation with its rotation origin. #15129\n label.attr({\n x: label.alignAttr.x,\n y: label.alignAttr.y,\n rotation: options.rotation,\n rotationOriginX: labelBox.width / 2,\n rotationOriginY: labelBox.height / 2\n });\n // Check if the dataLabel should be visible.\n if (pick(!isJustify && options.crop, true)) {\n visible =\n isNumber(label.x) &&\n isNumber(label.y) &&\n chart.isInsidePlot(label.x - padding + label.width, label.y) &&\n chart.isInsidePlot(label.x + padding, label.y);\n }\n label[visible ? 'show' : 'hide']();\n }\n };\n /**\n * Adjust the stack BBox position, to take into consideration the alignment\n * of the dataLabel. This is necessary to make the stackDataLabel work with\n * core methods like `SVGLabel.adjust` and `Series.justifyDataLabel`.\n * @param AdjustStackPositionProps\n * @return {{x: number, y: number}} Adjusted BBox position of the stack.\n */\n StackItem.prototype.adjustStackPosition = function (_a) {\n var labelBox = _a.labelBox,\n verticalAlign = _a.verticalAlign,\n textAlign = _a.textAlign;\n var factorMap = {\n bottom: 0,\n middle: 1,\n top: 2,\n right: 1,\n center: 0,\n left: -1\n },\n verticalAlignFactor = factorMap[verticalAlign],\n textAlignFactor = factorMap[textAlign];\n return {\n x: labelBox.width / 2 + (labelBox.width / 2) * textAlignFactor,\n y: (labelBox.height / 2) * verticalAlignFactor\n };\n };\n /**\n * Get the bbox of the stack.\n * @private\n * @function Highcharts.StackItem#getStackBox\n * @return {BBoxObject} The x, y, height, width of the stack.\n */\n StackItem.prototype.getStackBox = function (stackBoxProps) {\n var stackItem = this,\n axis = this.axis,\n chart = axis.chart,\n boxTop = stackBoxProps.boxTop,\n defaultX = stackBoxProps.defaultX,\n xOffset = stackBoxProps.xOffset,\n width = stackBoxProps.width,\n boxBottom = stackBoxProps.boxBottom,\n totalStackValue = axis.stacking.usePercentage ?\n 100 :\n pick(boxTop,\n this.total, 0),\n y = axis.toPixels(totalStackValue),\n xAxis = stackBoxProps.xAxis || chart.xAxis[0],\n x = pick(defaultX,\n xAxis.toPixels(this.x)) + xOffset,\n yZero = axis.toPixels(boxBottom ? boxBottom : 0),\n height = Math.abs(y - yZero),\n inverted = chart.inverted,\n neg = stackItem.isNegative;\n return inverted ?\n {\n x: (neg ? y : y - height) - chart.plotLeft,\n y: x - chart.plotTop,\n width: height,\n height: width\n } : {\n x: x - chart.plotLeft,\n y: (neg ? y - height : y) - chart.plotTop,\n width: width,\n height: height\n };\n };\n return StackItem;\n }());\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * Stack of data points\n *\n * @product highcharts\n *\n * @interface Highcharts.StackItemObject\n */ /**\n * Alignment settings\n * @name Highcharts.StackItemObject#alignOptions\n * @type {Highcharts.AlignObject}\n */ /**\n * Related axis\n * @name Highcharts.StackItemObject#axis\n * @type {Highcharts.Axis}\n */ /**\n * Cumulative value of the stacked data points\n * @name Highcharts.StackItemObject#cumulative\n * @type {number}\n */ /**\n * True if on the negative side\n * @name Highcharts.StackItemObject#isNegative\n * @type {boolean}\n */ /**\n * Related SVG element\n * @name Highcharts.StackItemObject#label\n * @type {Highcharts.SVGElement}\n */ /**\n * Related stack options\n * @name Highcharts.StackItemObject#options\n * @type {Highcharts.YAxisStackLabelsOptions}\n */ /**\n * Total value of the stacked data points\n * @name Highcharts.StackItemObject#total\n * @type {number}\n */ /**\n * Shared x value of the stack\n * @name Highcharts.StackItemObject#x\n * @type {number}\n */\n ''; // keeps doclets above in JS file\n\n return StackItem;\n });\n _registerModule(_modules, 'Core/Axis/Stacking/StackingAxis.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Axis/Axis.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Axis/Stacking/StackItem.js'], _modules['Core/Utilities.js']], function (A, Axis, SeriesRegistry, StackItem, U) {\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 var getDeferredAnimation = A.getDeferredAnimation;\n var seriesProto = SeriesRegistry.series.prototype;\n var addEvent = U.addEvent,\n correctFloat = U.correctFloat,\n defined = U.defined,\n destroyObjectProperties = U.destroyObjectProperties,\n fireEvent = U.fireEvent,\n isArray = U.isArray,\n isNumber = U.isNumber,\n objectEach = U.objectEach,\n pick = U.pick;\n /* *\n *\n * Functions\n *\n * */\n /**\n * Generate stacks for each series and calculate stacks total values\n *\n * @private\n * @function Highcharts.Chart#getStacks\n */\n function chartGetStacks() {\n var chart = this,\n inverted = chart.inverted;\n // reset stacks for each yAxis\n chart.yAxis.forEach(function (axis) {\n if (axis.stacking && axis.stacking.stacks && axis.hasVisibleSeries) {\n axis.stacking.oldStacks = axis.stacking.stacks;\n }\n });\n chart.series.forEach(function (series) {\n var xAxisOptions = series.xAxis && series.xAxis.options || {};\n if (series.options.stacking &&\n (series.visible === true ||\n chart.options.chart.ignoreHiddenSeries === false)) {\n series.stackKey = [\n series.type,\n pick(series.options.stack, ''),\n inverted ? xAxisOptions.top : xAxisOptions.left,\n inverted ? xAxisOptions.height : xAxisOptions.width\n ].join(',');\n }\n });\n }\n /**\n * @private\n */\n function onAxisDestroy() {\n var stacking = this.stacking;\n if (!stacking) {\n return;\n }\n var stacks = stacking.stacks;\n // Destroy each stack total\n objectEach(stacks, function (stack, stackKey) {\n destroyObjectProperties(stack);\n stacks[stackKey] = null;\n });\n if (stacking &&\n stacking.stackTotalGroup) {\n stacking.stackTotalGroup.destroy();\n }\n }\n /**\n * @private\n */\n function onAxisInit() {\n if (this.coll === 'yAxis' && !this.stacking) {\n this.stacking = new AxisAdditions(this);\n }\n }\n /**\n * Get stack indicator, according to it's x-value, to determine points with the\n * same x-value\n *\n * @private\n * @function Highcharts.Series#getStackIndicator\n */\n function seriesGetStackIndicator(stackIndicator, x, index, key) {\n // Update stack indicator, when:\n // first point in a stack || x changed || stack type (negative vs positive)\n // changed:\n if (!defined(stackIndicator) ||\n stackIndicator.x !== x ||\n (key && stackIndicator.stackKey !== key)) {\n stackIndicator = {\n x: x,\n index: 0,\n key: key,\n stackKey: key\n };\n }\n else {\n (stackIndicator).index++;\n }\n stackIndicator.key =\n [index, x, stackIndicator.index].join(',');\n return stackIndicator;\n }\n /**\n * Iterate over all stacks and compute the absolute values to percent\n *\n * @private\n * @function Highcharts.Series#modifyStacks\n */\n function seriesModifyStacks() {\n var series = this,\n yAxis = series.yAxis,\n stackKey = series.stackKey,\n stacks = yAxis.stacking.stacks,\n processedXData = series.processedXData,\n stacking = series.options.stacking,\n stacker = series[stacking + 'Stacker'];\n var stackIndicator;\n if (stacker) { // Modifier function exists (Series.percentStacker etc.)\n [stackKey, '-' + stackKey].forEach(function (key) {\n var i = processedXData.length,\n x,\n stack,\n pointExtremes;\n while (i--) {\n x = processedXData[i];\n stackIndicator = series.getStackIndicator(stackIndicator, x, series.index, key);\n stack = stacks[key] && stacks[key][x];\n pointExtremes =\n stack && stack.points[stackIndicator.key];\n if (pointExtremes) {\n stacker.call(series, pointExtremes, stack, i);\n }\n }\n });\n }\n }\n /**\n * Modifier function for percent stacks. Blows up the stack to 100%.\n *\n * @private\n * @function Highcharts.Series#percentStacker\n */\n function seriesPercentStacker(pointExtremes, stack, i) {\n var totalFactor = stack.total ? 100 / stack.total : 0;\n // Y bottom value\n pointExtremes[0] = correctFloat(pointExtremes[0] * totalFactor);\n // Y value\n pointExtremes[1] = correctFloat(pointExtremes[1] * totalFactor);\n this.stackedYData[i] = pointExtremes[1];\n }\n /**\n * Set grouped points in a stack-like object. When `centerInCategory` is true,\n * and `stacking` is not enabled, we need a pseudo (horizontal) stack in order\n * to handle grouping of points within the same category.\n *\n * @private\n * @function Highcharts.Series#setStackedPoints\n * @return {void}\n */\n function seriesSetGroupedPoints() {\n var stacking = this.yAxis.stacking;\n if (this.options.centerInCategory &&\n (this.is('column') || this.is('columnrange')) &&\n // With stacking enabled, we already have stacks that we can compute\n // from\n !this.options.stacking &&\n // With only one series, we don't need to consider centerInCategory\n this.chart.series.length > 1) {\n seriesProto.setStackedPoints.call(this, 'group');\n // After updating, if we now have proper stacks, we must delete the group\n // pseudo stacks (#14986)\n }\n else if (stacking) {\n objectEach(stacking.stacks, function (type, key) {\n if (key.slice(-5) === 'group') {\n objectEach(type, function (stack) { return stack.destroy(); });\n delete stacking.stacks[key];\n }\n });\n }\n }\n /**\n * Adds series' points value to corresponding stack\n *\n * @private\n * @function Highcharts.Series#setStackedPoints\n */\n function seriesSetStackedPoints(stackingParam) {\n var chart = this.chart,\n stacking = stackingParam || this.options.stacking;\n if (!stacking || (this.visible !== true &&\n chart.options.chart.ignoreHiddenSeries !== false)) {\n return;\n }\n var series = this, xData = series.processedXData, yData = series.processedYData, stackedYData = [], yDataLength = yData.length, seriesOptions = series.options, threshold = seriesOptions.threshold, stackThreshold = pick(seriesOptions.startFromThreshold && threshold, 0), stackOption = seriesOptions.stack, stackKey = stackingParam ? \"\" + series.type + \",\".concat(stacking) : series.stackKey, negKey = '-' + stackKey, negStacks = series.negStacks, yAxis = stacking === 'group' ?\n chart.yAxis[0] :\n series.yAxis, stacks = yAxis.stacking.stacks, oldStacks = yAxis.stacking.oldStacks;\n var stackIndicator,\n isNegative,\n stack,\n other,\n key,\n pointKey,\n i,\n x,\n y;\n yAxis.stacking.stacksTouched += 1;\n // loop over the non-null y values and read them into a local array\n for (i = 0; i < yDataLength; i++) {\n x = xData[i];\n y = yData[i];\n stackIndicator = series.getStackIndicator(stackIndicator, x, series.index);\n pointKey = stackIndicator.key;\n // Read stacked values into a stack based on the x value,\n // the sign of y and the stack key. Stacking is also handled for null\n // values (#739)\n isNegative = negStacks && y < (stackThreshold ? 0 : threshold);\n key = isNegative ? negKey : stackKey;\n // Create empty object for this stack if it doesn't exist yet\n if (!stacks[key]) {\n stacks[key] = {};\n }\n // Initialize StackItem for this x\n if (!stacks[key][x]) {\n if (oldStacks[key] &&\n oldStacks[key][x]) {\n stacks[key][x] = oldStacks[key][x];\n stacks[key][x].total = null;\n }\n else {\n stacks[key][x] = new StackItem(yAxis, yAxis.options.stackLabels, !!isNegative, x, stackOption);\n }\n }\n // If the StackItem doesn't exist, create it first\n stack = stacks[key][x];\n if (y !== null) {\n stack.points[pointKey] = stack.points[series.index] =\n [pick(stack.cumulative, stackThreshold)];\n // Record the base of the stack\n if (!defined(stack.cumulative)) {\n stack.base = pointKey;\n }\n stack.touched = yAxis.stacking.stacksTouched;\n // In area charts, if there are multiple points on the same X value,\n // let the area fill the full span of those points\n if (stackIndicator.index > 0 && series.singleStacks === false) {\n stack.points[pointKey][0] =\n stack.points[series.index + ',' + x + ',0'][0];\n }\n // When updating to null, reset the point stack (#7493)\n }\n else {\n stack.points[pointKey] = stack.points[series.index] =\n null;\n }\n // Add value to the stack total\n if (stacking === 'percent') {\n // Percent stacked column, totals are the same for the positive and\n // negative stacks\n other = isNegative ? stackKey : negKey;\n if (negStacks && stacks[other] && stacks[other][x]) {\n other = stacks[other][x];\n stack.total = other.total =\n Math.max(other.total, stack.total) +\n Math.abs(y) ||\n 0;\n // Percent stacked areas\n }\n else {\n stack.total =\n correctFloat(stack.total + (Math.abs(y) || 0));\n }\n }\n else if (stacking === 'group') {\n if (isArray(y)) {\n y = y[0];\n }\n // In this stack, the total is the number of valid points\n if (y !== null) {\n stack.total = (stack.total || 0) + 1;\n }\n }\n else {\n stack.total = correctFloat(stack.total + (y || 0));\n }\n if (stacking === 'group') {\n // This point's index within the stack, pushed to stack.points[1]\n stack.cumulative = (stack.total || 1) - 1;\n }\n else {\n stack.cumulative =\n pick(stack.cumulative, stackThreshold) + (y || 0);\n }\n if (y !== null) {\n stack.points[pointKey].push(stack.cumulative);\n stackedYData[i] = stack.cumulative;\n stack.hasValidPoints = true;\n }\n }\n if (stacking === 'percent') {\n yAxis.stacking.usePercentage = true;\n }\n if (stacking !== 'group') {\n this.stackedYData = stackedYData; // To be used in getExtremes\n }\n // Reset old stacks\n yAxis.stacking.oldStacks = {};\n }\n /* *\n *\n * Classes\n *\n * */\n /**\n * Adds stacking support to axes.\n * @private\n * @class\n */\n var AxisAdditions = /** @class */ (function () {\n /* *\n *\n * Constructors\n *\n * */\n function AxisAdditions(axis) {\n this.oldStacks = {};\n this.stacks = {};\n this.stacksTouched = 0;\n this.axis = axis;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Build the stacks from top down\n * @private\n */\n AxisAdditions.prototype.buildStacks = function () {\n var stacking = this;\n var axis = stacking.axis;\n var axisSeries = axis.series;\n var reversedStacks = axis.options.reversedStacks;\n var len = axisSeries.length;\n var actualSeries,\n i;\n stacking.usePercentage = false;\n i = len;\n while (i--) {\n actualSeries = axisSeries[reversedStacks ? i : len - i - 1];\n actualSeries.setStackedPoints();\n actualSeries.setGroupedPoints();\n }\n // Loop up again to compute percent and stream stack\n for (i = 0; i < len; i++) {\n axisSeries[i].modifyStacks();\n }\n fireEvent(axis, 'afterBuildStacks');\n };\n /**\n * @private\n */\n AxisAdditions.prototype.cleanStacks = function () {\n var stacking = this;\n var stacks;\n if (stacking.oldStacks) {\n stacks = stacking.stacks = stacking.oldStacks;\n }\n // reset stacks\n objectEach(stacks, function (type) {\n objectEach(type, function (stack) {\n stack.cumulative = stack.total;\n });\n });\n };\n /**\n * Set all the stacks to initial states and destroy unused ones.\n * @private\n */\n AxisAdditions.prototype.resetStacks = function () {\n var _this = this;\n objectEach(this.stacks, function (type) {\n objectEach(type, function (stack, x) {\n // Clean up memory after point deletion (#1044, #4320)\n if (isNumber(stack.touched) &&\n stack.touched < _this.stacksTouched) {\n stack.destroy();\n delete type[x];\n // Reset stacks\n }\n else {\n stack.total = null;\n stack.cumulative = null;\n }\n });\n });\n };\n /**\n * @private\n */\n AxisAdditions.prototype.renderStackTotals = function () {\n var stacking = this,\n axis = stacking.axis,\n chart = axis.chart,\n renderer = chart.renderer,\n stacks = stacking.stacks,\n stackLabelsAnim = axis.options.stackLabels &&\n axis.options.stackLabels.animation,\n animationConfig = getDeferredAnimation(chart,\n stackLabelsAnim || false),\n stackTotalGroup = stacking.stackTotalGroup = (stacking.stackTotalGroup ||\n renderer\n .g('stack-labels')\n .attr({\n zIndex: 6,\n opacity: 0\n })\n .add());\n // plotLeft/Top will change when y axis gets wider so we need to\n // translate the stackTotalGroup at every render call. See bug #506\n // and #516\n stackTotalGroup.translate(chart.plotLeft, chart.plotTop);\n // Render each stack total\n objectEach(stacks, function (type) {\n objectEach(type, function (stack) {\n stack.render(stackTotalGroup);\n });\n });\n stackTotalGroup.animate({\n opacity: 1\n }, animationConfig);\n };\n return AxisAdditions;\n }());\n /* *\n *\n * Composition\n *\n * */\n var StackingAxis;\n (function (StackingAxis) {\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n /* *\n *\n * Functions\n *\n * */\n /**\n * Extends axis with stacking support.\n * @private\n */\n function compose(AxisClass, ChartClass, SeriesClass) {\n if (composedClasses.indexOf(AxisClass) === -1) {\n composedClasses.push(AxisClass);\n addEvent(AxisClass, 'init', onAxisInit);\n addEvent(AxisClass, 'destroy', onAxisDestroy);\n }\n if (composedClasses.indexOf(ChartClass) === -1) {\n composedClasses.push(ChartClass);\n var chartProto = ChartClass.prototype;\n chartProto.getStacks = chartGetStacks;\n }\n if (composedClasses.indexOf(SeriesClass) === -1) {\n composedClasses.push(SeriesClass);\n var seriesProto_1 = SeriesClass.prototype;\n seriesProto_1.getStackIndicator = seriesGetStackIndicator;\n seriesProto_1.modifyStacks = seriesModifyStacks;\n seriesProto_1.percentStacker = seriesPercentStacker;\n seriesProto_1.setGroupedPoints = seriesSetGroupedPoints;\n seriesProto_1.setStackedPoints = seriesSetStackedPoints;\n }\n }\n StackingAxis.compose = compose;\n })(StackingAxis || (StackingAxis = {}));\n /* *\n *\n * Default Export\n *\n * */\n\n return StackingAxis;\n });\n _registerModule(_modules, 'Series/Line/LineSeries.js', [_modules['Core/Series/Series.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (Series, SeriesRegistry, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var defined = U.defined,\n merge = U.merge;\n /* *\n *\n * Class\n *\n * */\n /**\n * The line series is the base type and is therefor the series base prototype.\n *\n * @private\n */\n var LineSeries = /** @class */ (function (_super) {\n __extends(LineSeries, _super);\n function LineSeries() {\n /* *\n *\n * Static Functions\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n /* *\n *\n * Properties\n *\n * */\n _this.data = void 0;\n _this.options = void 0;\n _this.points = void 0;\n return _this;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Draw the graph. Called internally when rendering line-like series\n * types. The first time it generates the `series.graph` item and\n * optionally other series-wide items like `series.area` for area\n * charts. On subsequent calls these items are updated with new\n * positions and attributes.\n *\n * @function Highcharts.Series#drawGraph\n */\n LineSeries.prototype.drawGraph = function () {\n var series = this,\n options = this.options,\n graphPath = (this.gappedPath || this.getGraphPath).call(this),\n styledMode = this.chart.styledMode;\n var props = [[\n 'graph',\n 'highcharts-graph'\n ]];\n // Presentational properties\n if (!styledMode) {\n props[0].push((options.lineColor ||\n this.color ||\n \"#cccccc\" /* Palette.neutralColor20 */ // when colorByPoint = true\n ), options.dashStyle);\n }\n props = series.getZonesGraphs(props);\n // Draw the graph\n props.forEach(function (prop, i) {\n var graphKey = prop[0];\n var attribs,\n graph = series[graphKey];\n var verb = graph ? 'animate' : 'attr';\n if (graph) {\n graph.endX = series.preventGraphAnimation ?\n null :\n graphPath.xMap;\n graph.animate({ d: graphPath });\n }\n else if (graphPath.length) { // #1487\n /**\n * SVG element of area-based charts. Can be used for styling\n * purposes. If zones are configured, this element will be\n * hidden and replaced by multiple zone areas, accessible\n * via `series['zone-area-x']` (where x is a number,\n * starting with 0).\n *\n * @name Highcharts.Series#area\n * @type {Highcharts.SVGElement|undefined}\n */\n /**\n * SVG element of line-based charts. Can be used for styling\n * purposes. If zones are configured, this element will be\n * hidden and replaced by multiple zone lines, accessible\n * via `series['zone-graph-x']` (where x is a number,\n * starting with 0).\n *\n * @name Highcharts.Series#graph\n * @type {Highcharts.SVGElement|undefined}\n */\n series[graphKey] = graph = series.chart.renderer\n .path(graphPath)\n .addClass(prop[1])\n .attr({ zIndex: 1 }) // #1069\n .add(series.group);\n }\n if (graph && !styledMode) {\n attribs = {\n 'stroke': prop[2],\n 'stroke-width': options.lineWidth || 0,\n // Polygon series use filled graph\n 'fill': (series.fillGraph && series.color) || 'none'\n };\n // Apply dash style\n if (prop[3]) {\n attribs.dashstyle = prop[3];\n // The reason for the `else if` is that linecaps don't mix well\n // with dashstyle. The gaps get partially filled by the\n // linecap.\n }\n else if (options.linecap !== 'square') {\n attribs['stroke-linecap'] =\n attribs['stroke-linejoin'] = 'round';\n }\n graph[verb](attribs)\n // Add shadow to normal series (0) or to first\n // zone (1) #3932\n .shadow((i < 2) && options.shadow);\n }\n // Helpers for animation\n if (graph) {\n graph.startX = graphPath.xMap;\n graph.isArea = graphPath.isArea; // For arearange animation\n }\n });\n };\n // eslint-disable-next-line valid-jsdoc\n /**\n * Get the graph path.\n *\n * @private\n */\n LineSeries.prototype.getGraphPath = function (points, nullsAsZeroes, connectCliffs) {\n var series = this,\n options = series.options,\n graphPath = [],\n xMap = [];\n var gap,\n step = options.step;\n points = points || series.points;\n // Bottom of a stack is reversed\n var reversed = points.reversed;\n if (reversed) {\n points.reverse();\n }\n // Reverse the steps (#5004)\n step = {\n right: 1,\n center: 2\n }[step] || (step && 3);\n if (step && reversed) {\n step = 4 - step;\n }\n // Remove invalid points, especially in spline (#5015)\n points = this.getValidPoints(points, false, !(options.connectNulls && !nullsAsZeroes && !connectCliffs));\n // Build the line\n points.forEach(function (point, i) {\n var plotX = point.plotX,\n plotY = point.plotY,\n lastPoint = points[i - 1];\n // the path to this point from the previous\n var pathToPoint;\n if ((point.leftCliff || (lastPoint && lastPoint.rightCliff)) &&\n !connectCliffs) {\n gap = true; // ... and continue\n }\n // Line series, nullsAsZeroes is not handled\n if (point.isNull && !defined(nullsAsZeroes) && i > 0) {\n gap = !options.connectNulls;\n // Area series, nullsAsZeroes is set\n }\n else if (point.isNull && !nullsAsZeroes) {\n gap = true;\n }\n else {\n if (i === 0 || gap) {\n pathToPoint = [[\n 'M',\n point.plotX,\n point.plotY\n ]];\n // Generate the spline as defined in the SplineSeries object\n }\n else if (series.getPointSpline) {\n pathToPoint = [series.getPointSpline(points, point, i)];\n }\n else if (step) {\n if (step === 1) { // right\n pathToPoint = [[\n 'L',\n lastPoint.plotX,\n plotY\n ]];\n }\n else if (step === 2) { // center\n pathToPoint = [[\n 'L',\n (lastPoint.plotX + plotX) / 2,\n lastPoint.plotY\n ], [\n 'L',\n (lastPoint.plotX + plotX) / 2,\n plotY\n ]];\n }\n else {\n pathToPoint = [[\n 'L',\n plotX,\n lastPoint.plotY\n ]];\n }\n pathToPoint.push([\n 'L',\n plotX,\n plotY\n ]);\n }\n else {\n // normal line to next point\n pathToPoint = [[\n 'L',\n plotX,\n plotY\n ]];\n }\n // Prepare for animation. When step is enabled, there are\n // two path nodes for each x value.\n xMap.push(point.x);\n if (step) {\n xMap.push(point.x);\n if (step === 2) { // step = center (#8073)\n xMap.push(point.x);\n }\n }\n graphPath.push.apply(graphPath, pathToPoint);\n gap = false;\n }\n });\n graphPath.xMap = xMap;\n series.graphPath = graphPath;\n return graphPath;\n };\n // eslint-disable-next-line valid-jsdoc\n /**\n * Get zones properties for building graphs. Extendable by series with\n * multiple lines within one series.\n *\n * @private\n */\n LineSeries.prototype.getZonesGraphs = function (props) {\n // Add the zone properties if any\n this.zones.forEach(function (zone, i) {\n var propset = [\n 'zone-graph-' + i,\n 'highcharts-graph highcharts-zone-graph-' + i + ' ' +\n (zone.className || '')\n ];\n if (!this.chart.styledMode) {\n propset.push((zone.color || this.color), (zone.dashStyle || this.options.dashStyle));\n }\n props.push(propset);\n }, this);\n return props;\n };\n LineSeries.defaultOptions = merge(Series.defaultOptions, \n /**\n * General options for all series types.\n *\n * @optionparent plotOptions.series\n */\n {\n // nothing here yet\n });\n return LineSeries;\n }(Series));\n SeriesRegistry.registerSeriesType('line', LineSeries);\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Options\n *\n * */\n /**\n * A line series displays information as a series of data points connected by\n * straight line segments.\n *\n * @sample {highcharts} highcharts/demo/line-basic/\n * Line chart\n * @sample {highstock} stock/demo/basic-line/\n * Line chart\n *\n * @extends plotOptions.series\n * @product highcharts highstock\n * @apioption plotOptions.line\n */\n /**\n * 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 * A `line` series. If the [type](#series.line.type) option is not\n * specified, it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.line\n * @excluding dataParser,dataURL\n * @product highcharts highstock\n * @apioption series.line\n */\n /**\n * An array of data points for the series. For the `line` series type,\n * points can be given in the following ways:\n *\n * 1. An array of numerical values. In this case, the numerical values will be\n * interpreted as `y` options. The `x` values will be automatically\n * calculated, either starting at 0 and incremented by 1, or from\n * `pointStart` and `pointInterval` given in the series options. If the axis\n * has categories, these will be used. Example:\n * ```js\n * data: [0, 5, 3, 5]\n * ```\n *\n * 2. An array of arrays with 2 values. In this case, the values correspond to\n * `x,y`. If the first value is a string, it is applied as the name of the\n * point, and the `x` value is inferred.\n * ```js\n * data: [\n * [0, 1],\n * [1, 2],\n * [2, 8]\n * ]\n * ```\n *\n * 3. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.line.turboThreshold),\n * this option is not available.\n * ```js\n * data: [{\n * x: 1,\n * y: 9,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * y: 6,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * **Note:** In TypeScript you have to extend `PointOptionsObject` with an\n * additional declaration to allow custom data types:\n * ```ts\n * declare module `highcharts` {\n * interface PointOptionsObject {\n * custom: Record;\n * }\n * }\n * ```\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * Numerical values\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @declare Highcharts.PointOptionsObject\n * @type {Array|null|*>}\n * @apioption series.line.data\n */\n /**\n * An additional, individual class name for the data point's graphic\n * representation. Changes to a point's color will also be reflected in a\n * chart's legend and tooltip.\n *\n * @sample {highcharts} highcharts/css/point-series-classname\n *\n * @type {string}\n * @since 5.0.0\n * @product highcharts gantt\n * @apioption series.line.data.className\n */\n /**\n * Individual color for the point. By default the color is pulled from\n * the global `colors` array.\n *\n * In styled mode, the `color` option doesn't take effect. Instead, use\n * `colorIndex`.\n *\n * @sample {highcharts} highcharts/point/color/\n * Mark the highest point\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @product highcharts highstock gantt\n * @apioption series.line.data.color\n */\n /**\n * A specific color index to use for the point, so its graphic representations\n * are given the class name `highcharts-color-{n}`. In styled mode this will\n * change the color of the graphic. In non-styled mode, the color is set by the\n * `fill` attribute, so the change in class name won't have a visual effect by\n * default.\n *\n * @sample {highcharts} highcharts/css/colorindex/\n * Series and point color index\n *\n * @type {number}\n * @since 5.0.0\n * @product highcharts gantt\n * @apioption series.line.data.colorIndex\n */\n /**\n * A reserved subspace to store options and values for customized functionality.\n * Here you can add additional data for your own event callbacks and formatter\n * callbacks.\n *\n * @sample {highcharts} highcharts/point/custom/\n * Point and series with custom data\n *\n * @type {Highcharts.Dictionary<*>}\n * @apioption series.line.data.custom\n */\n /**\n * Individual data label for each point. The options are the same as\n * the ones for [plotOptions.series.dataLabels](\n * #plotOptions.series.dataLabels).\n *\n * @sample highcharts/point/datalabels/\n * Show a label for the last value\n *\n * @declare Highcharts.DataLabelsOptions\n * @extends plotOptions.line.dataLabels\n * @product highcharts highstock gantt\n * @apioption series.line.data.dataLabels\n */\n /**\n * A description of the point to add to the screen reader information\n * about the point.\n *\n * @type {string}\n * @since 5.0.0\n * @requires modules/accessibility\n * @apioption series.line.data.description\n */\n /**\n * An id for the point. This can be used after render time to get a\n * pointer to the point object through `chart.get()`.\n *\n * @sample {highcharts} highcharts/point/id/\n * Remove an id'd point\n *\n * @type {string}\n * @since 1.2.0\n * @product highcharts highstock gantt\n * @apioption series.line.data.id\n */\n /**\n * The rank for this point's data label in case of collision. If two\n * data labels are about to overlap, only the one with the highest `labelrank`\n * will be drawn.\n *\n * @type {number}\n * @apioption series.line.data.labelrank\n */\n /**\n * The name of the point as shown in the legend, tooltip, dataLabels, etc.\n *\n * @see [xAxis.uniqueNames](#xAxis.uniqueNames)\n *\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Point names\n *\n * @type {string}\n * @apioption series.line.data.name\n */\n /**\n * Whether the data point is selected initially.\n *\n * @type {boolean}\n * @default false\n * @product highcharts highstock gantt\n * @apioption series.line.data.selected\n */\n /**\n * The x value of the point. For datetime axes, the X value is the timestamp\n * in milliseconds since 1970.\n *\n * @type {number}\n * @product highcharts highstock\n * @apioption series.line.data.x\n */\n /**\n * The y value of the point.\n *\n * @type {number|null}\n * @product highcharts highstock\n * @apioption series.line.data.y\n */\n /**\n * The individual point events.\n *\n * @extends plotOptions.series.point.events\n * @product highcharts highstock gantt\n * @apioption series.line.data.events\n */\n /**\n * Options for the point markers of line-like series.\n *\n * @declare Highcharts.PointMarkerOptionsObject\n * @extends plotOptions.series.marker\n * @product highcharts highstock\n * @apioption series.line.data.marker\n */\n ''; // include precedent doclets in transpilat\n\n return LineSeries;\n });\n _registerModule(_modules, 'Series/Area/AreaSeries.js', [_modules['Core/Color/Color.js'], _modules['Core/Legend/LegendSymbol.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (Color, LegendSymbol, SeriesRegistry, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var color = Color.parse;\n var LineSeries = SeriesRegistry.seriesTypes.line;\n var extend = U.extend,\n merge = U.merge,\n objectEach = U.objectEach,\n pick = U.pick;\n /* *\n *\n * Class\n *\n * */\n /**\n * Area series type.\n *\n * @private\n * @class\n * @name AreaSeries\n *\n * @augments LineSeries\n */\n var AreaSeries = /** @class */ (function (_super) {\n __extends(AreaSeries, _super);\n function AreaSeries() {\n /* *\n *\n * Static Properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n _this.data = void 0;\n _this.options = void 0;\n _this.points = void 0;\n return _this;\n /* eslint-enable valid-jsdoc */\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Draw the graph and the underlying area. This method calls the Series\n * base function and adds the area. The areaPath is calculated in the\n * getSegmentPath method called from Series.prototype.drawGraph.\n * @private\n */\n AreaSeries.prototype.drawGraph = function () {\n // Define or reset areaPath\n this.areaPath = [];\n // Call the base method\n _super.prototype.drawGraph.apply(this);\n // Define local variables\n var series = this,\n areaPath = this.areaPath,\n options = this.options,\n zones = this.zones,\n props = [[\n 'area',\n 'highcharts-area',\n this.color,\n options.fillColor\n ]]; // area name, main color, fill color\n zones.forEach(function (zone,\n i) {\n props.push([\n 'zone-area-' + i,\n 'highcharts-area highcharts-zone-area-' + i + ' ' +\n zone.className,\n zone.color || series.color,\n zone.fillColor || options.fillColor\n ]);\n });\n props.forEach(function (prop) {\n var areaKey = prop[0],\n attribs = {};\n var area = series[areaKey];\n var verb = area ? 'animate' : 'attr';\n // Create or update the area\n if (area) { // update\n area.endX = series.preventGraphAnimation ?\n null :\n areaPath.xMap;\n area.animate({ d: areaPath });\n }\n else { // create\n attribs.zIndex = 0; // #1069\n area = series[areaKey] = series.chart.renderer\n .path(areaPath)\n .addClass(prop[1])\n .add(series.group);\n area.isArea = true;\n }\n if (!series.chart.styledMode) {\n attribs.fill = pick(prop[3], color(prop[2])\n .setOpacity(pick(options.fillOpacity, 0.75))\n .get());\n }\n area[verb](attribs);\n area.startX = areaPath.xMap;\n area.shiftUnit = options.step ? 2 : 1;\n });\n };\n /**\n * @private\n */\n AreaSeries.prototype.getGraphPath = function (points) {\n var getGraphPath = LineSeries.prototype.getGraphPath, options = this.options, stacking = options.stacking, yAxis = this.yAxis, bottomPoints = [], graphPoints = [], seriesIndex = this.index, stacks = yAxis.stacking.stacks[this.stackKey], threshold = options.threshold, translatedThreshold = Math.round(// #10909\n yAxis.getThreshold(options.threshold)), connectNulls = pick(// #10574\n options.connectNulls, stacking === 'percent'), \n // To display null points in underlying stacked series, this\n // series graph must be broken, and the area also fall down to\n // fill the gap left by the null point. #2069\n addDummyPoints = function (i, otherI, side) {\n var point = points[i], stackedValues = stacking &&\n stacks[point.x].points[seriesIndex], nullVal = point[side + 'Null'] || 0, cliffVal = point[side + 'Cliff'] || 0;\n var top,\n bottom,\n isNull = true;\n if (cliffVal || nullVal) {\n top = (nullVal ?\n stackedValues[0] :\n stackedValues[1]) + cliffVal;\n bottom = stackedValues[0] + cliffVal;\n isNull = !!nullVal;\n }\n else if (!stacking &&\n points[otherI] &&\n points[otherI].isNull) {\n top = bottom = threshold;\n }\n // Add to the top and bottom line of the area\n if (typeof top !== 'undefined') {\n graphPoints.push({\n plotX: plotX,\n plotY: top === null ?\n translatedThreshold :\n yAxis.getThreshold(top),\n isNull: isNull,\n isCliff: true\n });\n bottomPoints.push({\n plotX: plotX,\n plotY: bottom === null ?\n translatedThreshold :\n yAxis.getThreshold(bottom),\n doCurve: false // #1041, gaps in areaspline areas\n });\n }\n };\n var plotX,\n isNull,\n yBottom;\n // Find what points to use\n points = points || this.points;\n // Fill in missing points\n if (stacking) {\n points = this.getStackPoints(points);\n }\n for (var i = 0, iEnd = points.length; i < iEnd; ++i) {\n // Reset after series.update of stacking property (#12033)\n if (!stacking) {\n points[i].leftCliff = points[i].rightCliff =\n points[i].leftNull = points[i].rightNull = void 0;\n }\n isNull = points[i].isNull;\n plotX = pick(points[i].rectPlotX, points[i].plotX);\n yBottom = stacking ?\n pick(points[i].yBottom, translatedThreshold) :\n translatedThreshold;\n if (!isNull || connectNulls) {\n if (!connectNulls) {\n addDummyPoints(i, i - 1, 'left');\n }\n // Skip null point when stacking is false and connectNulls\n // true\n if (!(isNull && !stacking && connectNulls)) {\n graphPoints.push(points[i]);\n bottomPoints.push({\n x: i,\n plotX: plotX,\n plotY: yBottom\n });\n }\n if (!connectNulls) {\n addDummyPoints(i, i + 1, 'right');\n }\n }\n }\n var topPath = getGraphPath.call(this,\n graphPoints,\n true,\n true);\n bottomPoints.reversed = true;\n var bottomPath = getGraphPath.call(this,\n bottomPoints,\n true,\n true);\n var firstBottomPoint = bottomPath[0];\n if (firstBottomPoint && firstBottomPoint[0] === 'M') {\n bottomPath[0] = ['L', firstBottomPoint[1], firstBottomPoint[2]];\n }\n var areaPath = topPath.concat(bottomPath);\n if (areaPath.length) {\n areaPath.push(['Z']);\n }\n // TODO: don't set leftCliff and rightCliff when connectNulls?\n var graphPath = getGraphPath\n .call(this,\n graphPoints,\n false,\n connectNulls);\n areaPath.xMap = topPath.xMap;\n this.areaPath = areaPath;\n return graphPath;\n };\n /**\n * Return an array of stacked points, where null and missing points are\n * replaced by dummy points in order for gaps to be drawn correctly in\n * stacks.\n * @private\n */\n AreaSeries.prototype.getStackPoints = function (points) {\n var series = this,\n segment = [],\n keys = [],\n xAxis = this.xAxis,\n yAxis = this.yAxis,\n stack = yAxis.stacking.stacks[this.stackKey],\n pointMap = {},\n yAxisSeries = yAxis.series,\n seriesLength = yAxisSeries.length,\n upOrDown = yAxis.options.reversedStacks ? 1 : -1,\n seriesIndex = yAxisSeries.indexOf(series);\n points = points || this.points;\n if (this.options.stacking) {\n for (var i = 0; i < points.length; i++) {\n // Reset after point update (#7326)\n points[i].leftNull = points[i].rightNull = void 0;\n // Create a map where we can quickly look up the points by\n // their X values.\n pointMap[points[i].x] = points[i];\n }\n // Sort the keys (#1651)\n objectEach(stack, function (stackX, x) {\n // nulled after switching between\n // grouping and not (#1651, #2336)\n if (stackX.total !== null) {\n keys.push(x);\n }\n });\n keys.sort(function (a, b) {\n return a - b;\n });\n var visibleSeries_1 = yAxisSeries.map(function (s) { return s.visible; });\n keys.forEach(function (x, idx) {\n var y = 0,\n stackPoint,\n stackedValues;\n if (pointMap[x] && !pointMap[x].isNull) {\n segment.push(pointMap[x]);\n // Find left and right cliff. -1 goes left, 1 goes\n // right.\n [-1, 1].forEach(function (direction) {\n var nullName = direction === 1 ?\n 'rightNull' :\n 'leftNull',\n cliffName = direction === 1 ?\n 'rightCliff' :\n 'leftCliff',\n otherStack = stack[keys[idx + direction]];\n var cliff = 0;\n // If there is a stack next to this one,\n // to the left or to the right...\n if (otherStack) {\n var i = seriesIndex;\n // Can go either up or down,\n // depending on reversedStacks\n while (i >= 0 && i < seriesLength) {\n var si = yAxisSeries[i].index;\n stackPoint = otherStack.points[si];\n if (!stackPoint) {\n // If the next point in this series is\n // missing, mark the point with\n // point.leftNull or point.rightNull = true.\n if (si === series.index) {\n pointMap[x][nullName] = true;\n // If there are missing points in the next\n // stack in any of the series below this\n // one, we need to substract the missing\n // values and add a hiatus to the left or\n // right.\n }\n else if (visibleSeries_1[i]) {\n stackedValues = stack[x].points[si];\n if (stackedValues) {\n cliff -= (stackedValues[1] -\n stackedValues[0]);\n }\n }\n }\n // When reversedStacks is true, loop up,\n // else loop down\n i += upOrDown;\n }\n }\n pointMap[x][cliffName] = cliff;\n });\n // There is no point for this X value in this series, so we\n // insert a dummy point in order for the areas to be drawn\n // correctly.\n }\n else {\n // Loop down the stack to find the series below this\n // one that has a value (#1991)\n var i = seriesIndex;\n while (i >= 0 && i < seriesLength) {\n var si = yAxisSeries[i].index;\n stackPoint = stack[x].points[si];\n if (stackPoint) {\n y = stackPoint[1];\n break;\n }\n // When reversedStacks is true, loop up, else loop\n // down\n i += upOrDown;\n }\n y = pick(y, 0);\n y = yAxis.translate(// #6272\n y, 0, 1, 0, 1);\n segment.push({\n isNull: true,\n plotX: xAxis.translate(// #6272\n x, 0, 0, 0, 1),\n x: x,\n plotY: y,\n yBottom: y\n });\n }\n });\n }\n return segment;\n };\n /**\n * The area series type.\n *\n * @sample {highcharts} highcharts/demo/area-basic/\n * Area chart\n * @sample {highstock} stock/demo/area/\n * Area chart\n *\n * @extends plotOptions.line\n * @excluding useOhlcData\n * @product highcharts highstock\n * @optionparent plotOptions.area\n */\n AreaSeries.defaultOptions = merge(LineSeries.defaultOptions, {\n /**\n * @see [fillColor](#plotOptions.area.fillColor)\n * @see [fillOpacity](#plotOptions.area.fillOpacity)\n *\n * @apioption plotOptions.area.color\n */\n /**\n * Fill color or gradient for the area. When `null`, the series' `color`\n * is used with the series' `fillOpacity`.\n *\n * In styled mode, the fill color can be set with the `.highcharts-area`\n * class name.\n *\n * @see [color](#plotOptions.area.color)\n * @see [fillOpacity](#plotOptions.area.fillOpacity)\n *\n * @sample {highcharts} highcharts/plotoptions/area-fillcolor-default/\n * Null by default\n * @sample {highcharts} highcharts/plotoptions/area-fillcolor-gradient/\n * Gradient\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @product highcharts highstock\n * @apioption plotOptions.area.fillColor\n */\n /**\n * Fill opacity for the area. When you set an explicit `fillColor`,\n * the `fillOpacity` is not applied. Instead, you should define the\n * opacity in the `fillColor` with an rgba color definition. The\n * `fillOpacity` setting, also the default setting, overrides the alpha\n * component of the `color` setting.\n *\n * In styled mode, the fill opacity can be set with the\n * `.highcharts-area` class name.\n *\n * @see [color](#plotOptions.area.color)\n * @see [fillColor](#plotOptions.area.fillColor)\n *\n * @sample {highcharts} highcharts/plotoptions/area-fillopacity/\n * Automatic fill color and fill opacity of 0.1\n *\n * @type {number}\n * @default {highcharts} 0.75\n * @default {highstock} 0.75\n * @product highcharts highstock\n * @apioption plotOptions.area.fillOpacity\n */\n /**\n * A separate color for the graph line. By default the line takes the\n * `color` of the series, but the lineColor setting allows setting a\n * separate color for the line without altering the `fillColor`.\n *\n * In styled mode, the line stroke can be set with the\n * `.highcharts-graph` class name.\n *\n * @sample {highcharts} highcharts/plotoptions/area-linecolor/\n * Dark gray line\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @product highcharts highstock\n * @apioption plotOptions.area.lineColor\n */\n /**\n * A separate color for the negative part of the area.\n *\n * In styled mode, a negative color is set with the\n * `.highcharts-negative` class name.\n *\n * @see [negativeColor](#plotOptions.area.negativeColor)\n *\n * @sample {highcharts} highcharts/css/series-negative-color/\n * Negative color in styled mode\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 3.0\n * @product highcharts\n * @apioption plotOptions.area.negativeFillColor\n */\n /**\n * Whether the whole area or just the line should respond to mouseover\n * tooltips and other mouse or touch events.\n *\n * @sample {highcharts|highstock} highcharts/plotoptions/area-trackbyarea/\n * Display the tooltip when the area is hovered\n *\n * @type {boolean}\n * @default false\n * @since 1.1.6\n * @product highcharts highstock\n * @apioption plotOptions.area.trackByArea\n */\n /**\n * The Y axis value to serve as the base for the area, for\n * distinguishing between values above and below a threshold. The area\n * between the graph and the threshold is filled.\n *\n * * If a number is given, the Y axis will scale to the threshold.\n * * If `null`, the scaling behaves like a line series with fill between\n * the graph and the Y axis minimum.\n * * If `Infinity` or `-Infinity`, the area between the graph and the\n * corresponding Y axis extreme is filled (since v6.1.0).\n *\n * @sample {highcharts} highcharts/plotoptions/area-threshold/\n * A threshold of 100\n * @sample {highcharts} highcharts/plotoptions/area-threshold-infinity/\n * A threshold of Infinity\n *\n * @type {number|null}\n * @since 2.0\n * @product highcharts highstock\n */\n threshold: 0\n });\n return AreaSeries;\n }(LineSeries));\n extend(AreaSeries.prototype, {\n singleStacks: false,\n drawLegendSymbol: LegendSymbol.drawRectangle\n });\n SeriesRegistry.registerSeriesType('area', AreaSeries);\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Options\n *\n * */\n /**\n * A `area` series. If the [type](#series.area.type) option is not\n * specified, it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.area\n * @excluding dataParser, dataURL, useOhlcData\n * @product highcharts highstock\n * @apioption series.area\n */\n /**\n * @see [fillColor](#series.area.fillColor)\n * @see [fillOpacity](#series.area.fillOpacity)\n *\n * @apioption series.area.color\n */\n /**\n * An array of data points for the series. For the `area` series type,\n * points can be given in the following ways:\n *\n * 1. An array of numerical values. In this case, the numerical values will be\n * interpreted as `y` options. The `x` values will be automatically\n * calculated, either starting at 0 and incremented by 1, or from\n * `pointStart` * and `pointInterval` given in the series options. If the\n * axis has categories, these will be used. Example:\n * ```js\n * data: [0, 5, 3, 5]\n * ```\n *\n * 2. An array of arrays with 2 values. In this case, the values correspond to\n * `x,y`. If the first value is a string, it is applied as the name of the\n * point, and the `x` value is inferred.\n * ```js\n * data: [\n * [0, 9],\n * [1, 7],\n * [2, 6]\n * ]\n * ```\n *\n * 3. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.area.turboThreshold), this option is not\n * available.\n * ```js\n * data: [{\n * x: 1,\n * y: 9,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * y: 6,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * Numerical values\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @type {Array|null|*>}\n * @extends series.line.data\n * @product highcharts highstock\n * @apioption series.area.data\n */\n /**\n * @see [color](#series.area.color)\n * @see [fillOpacity](#series.area.fillOpacity)\n *\n * @apioption series.area.fillColor\n */\n /**\n * @see [color](#series.area.color)\n * @see [fillColor](#series.area.fillColor)\n *\n * @default {highcharts} 0.75\n * @default {highstock} 0.75\n * @apioption series.area.fillOpacity\n */\n ''; // adds doclets above to transpilat\n\n return AreaSeries;\n });\n _registerModule(_modules, 'Series/Spline/SplineSeries.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var LineSeries = SeriesRegistry.seriesTypes.line;\n var merge = U.merge,\n pick = U.pick;\n /* *\n *\n * Class\n *\n * */\n /**\n * Spline series type.\n *\n * @private\n */\n var SplineSeries = /** @class */ (function (_super) {\n __extends(SplineSeries, _super);\n function SplineSeries() {\n /* *\n *\n * Static Properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n /* *\n *\n * Properties\n *\n * */\n _this.data = void 0;\n _this.options = void 0;\n _this.points = void 0;\n return _this;\n /* eslint-enable valid-jsdoc */\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Get the spline segment from a given point's previous neighbour to the\n * given point.\n *\n * @private\n * @function Highcharts.seriesTypes.spline#getPointSpline\n */\n SplineSeries.prototype.getPointSpline = function (points, point, i) {\n var \n // 1 means control points midway between points, 2 means 1/3\n // from the point, 3 is 1/4 etc\n smoothing = 1.5,\n denom = smoothing + 1,\n plotX = point.plotX || 0,\n plotY = point.plotY || 0,\n lastPoint = points[i - 1],\n nextPoint = points[i + 1];\n var leftContX,\n leftContY,\n rightContX,\n rightContY;\n /**\n * @private\n */\n function doCurve(otherPoint) {\n return otherPoint &&\n !otherPoint.isNull &&\n otherPoint.doCurve !== false &&\n // #6387, area splines next to null:\n !point.isCliff;\n }\n // Find control points\n if (doCurve(lastPoint) && doCurve(nextPoint)) {\n var lastX = lastPoint.plotX || 0,\n lastY = lastPoint.plotY || 0,\n nextX = nextPoint.plotX || 0,\n nextY = nextPoint.plotY || 0;\n var correction = 0;\n leftContX = (smoothing * plotX + lastX) / denom;\n leftContY = (smoothing * plotY + lastY) / denom;\n rightContX = (smoothing * plotX + nextX) / denom;\n rightContY = (smoothing * plotY + nextY) / denom;\n // Have the two control points make a straight line through main\n // point\n if (rightContX !== leftContX) { // #5016, division by zero\n correction = (((rightContY - leftContY) *\n (rightContX - plotX)) /\n (rightContX - leftContX) + plotY - rightContY);\n }\n leftContY += correction;\n rightContY += correction;\n // to prevent false extremes, check that control points are\n // between neighbouring points' y values\n if (leftContY > lastY && leftContY > plotY) {\n leftContY = Math.max(lastY, plotY);\n // mirror of left control point\n rightContY = 2 * plotY - leftContY;\n }\n else if (leftContY < lastY && leftContY < plotY) {\n leftContY = Math.min(lastY, plotY);\n rightContY = 2 * plotY - leftContY;\n }\n if (rightContY > nextY && rightContY > plotY) {\n rightContY = Math.max(nextY, plotY);\n leftContY = 2 * plotY - rightContY;\n }\n else if (rightContY < nextY && rightContY < plotY) {\n rightContY = Math.min(nextY, plotY);\n leftContY = 2 * plotY - rightContY;\n }\n // record for drawing in next point\n point.rightContX = rightContX;\n point.rightContY = rightContY;\n }\n // Visualize control points for debugging\n /*\n if (leftContX) {\n this.chart.renderer.circle(\n leftContX + this.chart.plotLeft,\n leftContY + this.chart.plotTop,\n 2\n )\n .attr({\n stroke: 'red',\n 'stroke-width': 2,\n fill: 'none',\n zIndex: 9\n })\n .add();\n this.chart.renderer.path(['M', leftContX + this.chart.plotLeft,\n leftContY + this.chart.plotTop,\n 'L', plotX + this.chart.plotLeft, plotY + this.chart.plotTop])\n .attr({\n stroke: 'red',\n 'stroke-width': 2,\n zIndex: 9\n })\n .add();\n }\n if (rightContX) {\n this.chart.renderer.circle(\n rightContX + this.chart.plotLeft,\n rightContY + this.chart.plotTop,\n 2\n )\n .attr({\n stroke: 'green',\n 'stroke-width': 2,\n fill: 'none',\n zIndex: 9\n })\n .add();\n this.chart.renderer.path(['M', rightContX + this.chart.plotLeft,\n rightContY + this.chart.plotTop,\n 'L', plotX + this.chart.plotLeft, plotY + this.chart.plotTop])\n .attr({\n stroke: 'green',\n 'stroke-width': 2,\n zIndex: 9\n })\n .add();\n }\n // */\n var ret = [\n 'C',\n pick(lastPoint.rightContX,\n lastPoint.plotX, 0),\n pick(lastPoint.rightContY,\n lastPoint.plotY, 0),\n pick(leftContX,\n plotX, 0),\n pick(leftContY,\n plotY, 0),\n plotX,\n plotY\n ];\n // reset for updating series later\n lastPoint.rightContX = lastPoint.rightContY = void 0;\n return ret;\n };\n /**\n * A spline series is a special type of line series, where the segments\n * between the data points are smoothed.\n *\n * @sample {highcharts} highcharts/demo/spline-irregular-time/\n * Spline chart\n * @sample {highstock} stock/demo/spline/\n * Spline chart\n *\n * @extends plotOptions.series\n * @excluding step, boostThreshold, boostBlending\n * @product highcharts highstock\n * @optionparent plotOptions.spline\n */\n SplineSeries.defaultOptions = merge(LineSeries.defaultOptions);\n return SplineSeries;\n }(LineSeries));\n SeriesRegistry.registerSeriesType('spline', SplineSeries);\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Options\n *\n * */\n /**\n * A `spline` series. If the [type](#series.spline.type) option is\n * not specified, it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.spline\n * @excluding dataParser, dataURL, step, boostThreshold, boostBlending\n * @product highcharts highstock\n * @apioption series.spline\n */\n /**\n * An array of data points for the series. For the `spline` series type,\n * points can be given in the following ways:\n *\n * 1. An array of numerical values. In this case, the numerical values will be\n * interpreted as `y` options. The `x` values will be automatically\n * calculated, either starting at 0 and incremented by 1, or from\n * `pointStart` and `pointInterval` given in the series options. If the axis\n * has categories, these will be used. Example:\n * ```js\n * data: [0, 5, 3, 5]\n * ```\n *\n * 2. An array of arrays with 2 values. In this case, the values correspond to\n * `x,y`. If the first value is a string, it is applied as the name of the\n * point, and the `x` value is inferred.\n * ```js\n * data: [\n * [0, 9],\n * [1, 2],\n * [2, 8]\n * ]\n * ```\n *\n * 3. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.spline.turboThreshold),\n * this option is not available.\n * ```js\n * data: [{\n * x: 1,\n * y: 9,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * y: 0,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * Numerical values\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @type {Array|null|*>}\n * @extends series.line.data\n * @product highcharts highstock\n * @apioption series.spline.data\n */\n ''; // adds doclets above intro transpilat\n\n return SplineSeries;\n });\n _registerModule(_modules, 'Series/AreaSpline/AreaSplineSeries.js', [_modules['Series/Spline/SplineSeries.js'], _modules['Core/Legend/LegendSymbol.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SplineSeries, LegendSymbol, SeriesRegistry, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var _a = SeriesRegistry.seriesTypes,\n AreaSeries = _a.area,\n areaProto = _a.area.prototype;\n var extend = U.extend,\n merge = U.merge;\n /* *\n *\n * Class\n *\n * */\n /**\n * AreaSpline series type.\n *\n * @private\n * @class\n * @name Highcharts.seriesTypes.areaspline\n *\n * @augments Highcharts.Series\n */\n var AreaSplineSeries = /** @class */ (function (_super) {\n __extends(AreaSplineSeries, _super);\n function AreaSplineSeries() {\n /* *\n *\n * Static Properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n /* *\n *\n * Properties\n *\n * */\n _this.data = void 0;\n _this.points = void 0;\n _this.options = void 0;\n return _this;\n }\n AreaSplineSeries.defaultOptions = merge(SplineSeries.defaultOptions, AreaSeries.defaultOptions);\n return AreaSplineSeries;\n }(SplineSeries));\n extend(AreaSplineSeries.prototype, {\n getGraphPath: areaProto.getGraphPath,\n getStackPoints: areaProto.getStackPoints,\n drawGraph: areaProto.drawGraph,\n drawLegendSymbol: LegendSymbol.drawRectangle\n });\n SeriesRegistry.registerSeriesType('areaspline', AreaSplineSeries);\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Options\n *\n * */\n /**\n * The area spline series is an area series where the graph between the\n * points is smoothed into a spline.\n *\n * @sample {highcharts} highcharts/demo/areaspline/\n * Area spline chart\n * @sample {highstock} stock/demo/areaspline/\n * Area spline chart\n *\n * @extends plotOptions.area\n * @excluding step, boostThreshold, boostBlending\n * @product highcharts highstock\n * @apioption plotOptions.areaspline\n */\n /**\n * @see [fillColor](#plotOptions.areaspline.fillColor)\n * @see [fillOpacity](#plotOptions.areaspline.fillOpacity)\n *\n * @apioption plotOptions.areaspline.color\n */\n /**\n * @see [color](#plotOptions.areaspline.color)\n * @see [fillOpacity](#plotOptions.areaspline.fillOpacity)\n *\n * @apioption plotOptions.areaspline.fillColor\n */\n /**\n * @see [color](#plotOptions.areaspline.color)\n * @see [fillColor](#plotOptions.areaspline.fillColor)\n *\n * @default 0.75\n * @apioption plotOptions.areaspline.fillOpacity\n */\n /**\n * A `areaspline` series. If the [type](#series.areaspline.type) option\n * is not specified, it is inherited from [chart.type](#chart.type).\n *\n *\n * @extends series,plotOptions.areaspline\n * @excluding dataParser, dataURL, step, boostThreshold, boostBlending\n * @product highcharts highstock\n * @apioption series.areaspline\n */\n /**\n * @see [fillColor](#series.areaspline.fillColor)\n * @see [fillOpacity](#series.areaspline.fillOpacity)\n *\n * @apioption series.areaspline.color\n */\n /**\n * An array of data points for the series. For the `areaspline` series\n * type, points can be given in the following ways:\n *\n * 1. An array of numerical values. In this case, the numerical values will be\n * interpreted as `y` options. The `x` values will be automatically\n * calculated, either starting at 0 and incremented by 1, or from\n * `pointStart` and `pointInterval` given in the series options. If the axis\n * has categories, these will be used. Example:\n * ```js\n * data: [0, 5, 3, 5]\n * ```\n *\n * 2. An array of arrays with 2 values. In this case, the values correspond to\n * `x,y`. If the first value is a string, it is applied as the name of the\n * point, and the `x` value is inferred.\n * ```js\n * data: [\n * [0, 10],\n * [1, 9],\n * [2, 3]\n * ]\n * ```\n *\n * 3. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.areaspline.turboThreshold), this option is not\n * available.\n * ```js\n * data: [{\n * x: 1,\n * y: 4,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * y: 4,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * Numerical values\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @type {Array|null|*>}\n * @extends series.line.data\n * @product highcharts highstock\n * @apioption series.areaspline.data\n */\n /**\n * @see [color](#series.areaspline.color)\n * @see [fillOpacity](#series.areaspline.fillOpacity)\n *\n * @apioption series.areaspline.fillColor\n */\n /**\n * @see [color](#series.areaspline.color)\n * @see [fillColor](#series.areaspline.fillColor)\n *\n * @default 0.75\n * @apioption series.areaspline.fillOpacity\n */\n ''; // adds doclets above into transpilat\n\n return AreaSplineSeries;\n });\n _registerModule(_modules, 'Series/Column/ColumnSeriesDefaults.js', [], function () {\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 /* *\n *\n * API Options\n *\n * */\n /**\n * Column series display one column per value along an X axis.\n *\n * @sample {highcharts} highcharts/demo/column-basic/\n * Column chart\n * @sample {highstock} stock/demo/column/\n * Column chart\n *\n * @extends plotOptions.line\n * @excluding connectEnds, connectNulls, gapSize, gapUnit, linecap,\n * lineWidth, marker, step, useOhlcData\n * @product highcharts highstock\n * @optionparent plotOptions.column\n */\n var ColumnSeriesDefaults = {\n /**\n * The corner radius of the border surrounding each column or bar.\n *\n * @sample {highcharts} highcharts/plotoptions/column-borderradius/\n * Rounded columns\n *\n * @product highcharts highstock gantt\n */\n borderRadius: 0,\n /**\n * When using automatic point colors pulled from the global\n * [colors](colors) or series-specific\n * [plotOptions.column.colors](series.colors) collections,\n this option\n * determines whether the chart should receive one color per series or\n * one color per point.\n *\n * In styled mode,\n the `colors` or `series.colors` arrays are not\n * supported,\n and instead this option gives the points individual color\n * class names on the form `highcharts-color-{n}`.\n *\n * @see [series colors](#plotOptions.column.colors)\n *\n * @sample {highcharts} highcharts/plotoptions/column-colorbypoint-false/\n * False by default\n * @sample {highcharts} highcharts/plotoptions/column-colorbypoint-true/\n * True\n *\n * @type {boolean}\n * @default false\n * @since 2.0\n * @product highcharts highstock gantt\n * @apioption plotOptions.column.colorByPoint\n */\n /**\n * A series specific or series type specific color set to apply instead\n * of the global [colors](#colors) when [colorByPoint](\n * #plotOptions.column.colorByPoint) is true.\n *\n * @type {Array}\n * @since 3.0\n * @product highcharts highstock gantt\n * @apioption plotOptions.column.colors\n */\n /**\n * When `true`,\n the columns will center in the category,\n ignoring null\n * or missing points. When `false`,\n space will be reserved for null or\n * missing points.\n *\n * @sample {highcharts} highcharts/series-column/centerincategory/\n * Center in category\n *\n * @since 8.0.1\n * @product highcharts highstock gantt\n */\n centerInCategory: false,\n /**\n * Padding between each value groups,\n in x axis units.\n *\n * @sample {highcharts} highcharts/plotoptions/column-grouppadding-default/\n * 0.2 by default\n * @sample {highcharts} highcharts/plotoptions/column-grouppadding-none/\n * No group padding - all columns are evenly spaced\n *\n * @product highcharts highstock gantt\n */\n groupPadding: 0.2,\n /**\n * Whether to group non-stacked columns or to let them render\n * independent of each other. Non-grouped columns will be laid out\n * individually and overlap each other.\n *\n * @sample {highcharts} highcharts/plotoptions/column-grouping-false/\n * Grouping disabled\n * @sample {highstock} highcharts/plotoptions/column-grouping-false/\n * Grouping disabled\n *\n * @type {boolean}\n * @default true\n * @since 2.3.0\n * @product highcharts highstock gantt\n * @apioption plotOptions.column.grouping\n */\n /** @ignore-option */\n marker: null,\n /**\n * The maximum allowed pixel width for a column,\n translated to the\n * height of a bar in a bar chart. This prevents the columns from\n * becoming too wide when there is a small number of points in the\n * chart.\n *\n * @see [pointWidth](#plotOptions.column.pointWidth)\n *\n * @sample {highcharts} highcharts/plotoptions/column-maxpointwidth-20/\n * Limited to 50\n * @sample {highstock} highcharts/plotoptions/column-maxpointwidth-20/\n * Limited to 50\n *\n * @type {number}\n * @since 4.1.8\n * @product highcharts highstock gantt\n * @apioption plotOptions.column.maxPointWidth\n */\n /**\n * Padding between each column or bar,\n in x axis units.\n *\n * @sample {highcharts} highcharts/plotoptions/column-pointpadding-default/\n * 0.1 by default\n * @sample {highcharts} highcharts/plotoptions/column-pointpadding-025/\n * 0.25\n * @sample {highcharts} highcharts/plotoptions/column-pointpadding-none/\n * 0 for tightly packed columns\n *\n * @product highcharts highstock gantt\n */\n pointPadding: 0.1,\n /**\n * A pixel value specifying a fixed width for each column or bar point.\n * When set to `undefined`,\n the width is calculated from the\n * `pointPadding` and `groupPadding`. The width effects the dimension\n * that is not based on the point value. For column series it is the\n * hoizontal length and for bar series it is the vertical length.\n *\n * @see [maxPointWidth](#plotOptions.column.maxPointWidth)\n *\n * @sample {highcharts} highcharts/plotoptions/column-pointwidth-20/\n * 20px wide columns regardless of chart width or the amount of\n * data points\n *\n * @type {number}\n * @since 1.2.5\n * @product highcharts highstock gantt\n * @apioption plotOptions.column.pointWidth\n */\n /**\n * A pixel value specifying a fixed width for the column or bar.\n * Overrides pointWidth on the series.\n *\n * @see [series.pointWidth](#plotOptions.column.pointWidth)\n *\n * @type {number}\n * @default undefined\n * @since 7.0.0\n * @product highcharts highstock gantt\n * @apioption series.column.data.pointWidth\n */\n /**\n * The minimal height for a column or width for a bar. By default,\n * 0 values are not shown. To visualize a 0 (or close to zero) point,\n * set the minimal point length to a pixel value like 3\\. In stacked\n * column charts,\n minPointLength might not be respected for tightly\n * packed values.\n *\n * @sample {highcharts} highcharts/plotoptions/column-minpointlength/\n * Zero base value\n * @sample {highcharts} highcharts/plotoptions/column-minpointlength-pos-and-neg/\n * Positive and negative close to zero values\n *\n * @product highcharts highstock gantt\n */\n minPointLength: 0,\n /**\n * When the series contains less points than the crop threshold,\n all\n * points are drawn,\n event 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),\n is that animation is performed on\n * updates. On the other hand,\n when the series contains more points than\n * the crop threshold,\n 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 * @product highcharts highstock gantt\n */\n cropThreshold: 50,\n /**\n * The X axis range that each point is valid for. This determines the\n * width of the column. On a categorized axis,\n the range will be 1\n * by default (one category unit). On linear and datetime axes,\n the\n * range will be computed as the distance between the two closest data\n * points.\n *\n * The default `null` means it is computed automatically,\n but this\n * option can be used to override the automatic value.\n *\n * This option is set by default to 1 if data sorting is enabled.\n *\n * @sample {highcharts} highcharts/plotoptions/column-pointrange/\n * Set the point range to one day on a data set with one week\n * between the points\n *\n * @type {number|null}\n * @since 2.3\n * @product highcharts highstock gantt\n */\n pointRange: null,\n states: {\n /**\n * Options for the hovered point. These settings override the normal\n * state options when a point is moused over or touched.\n *\n * @extends plotOptions.series.states.hover\n * @excluding halo,\n lineWidth,\n lineWidthPlus,\n marker\n * @product highcharts highstock gantt\n */\n hover: {\n /** @ignore-option */\n halo: false,\n /**\n * A specific border color for the hovered point. Defaults to\n * inherit the normal state border color.\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @product highcharts gantt\n * @apioption plotOptions.column.states.hover.borderColor\n */\n /**\n * A specific color for the hovered point.\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @product highcharts gantt\n * @apioption plotOptions.column.states.hover.color\n */\n /**\n * How much to brighten the point on interaction. Requires the\n * main color to be defined in hex or rgb(a) format.\n *\n * In styled mode,\n the hover brightening is by default replaced\n * with a fill-opacity set in the `.highcharts-point:hover`\n * rule.\n *\n * @sample {highcharts} highcharts/plotoptions/column-states-hover-brightness/\n * Brighten by 0.5\n *\n * @product highcharts highstock gantt\n */\n brightness: 0.1\n },\n /**\n * Options for the selected point. These settings override the\n * normal state options when a point is selected.\n *\n * @extends plotOptions.series.states.select\n * @excluding halo,\n lineWidth,\n lineWidthPlus,\n marker\n * @product highcharts highstock gantt\n */\n select: {\n /**\n * A specific color for the selected point.\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @default #cccccc\n * @product highcharts highstock gantt\n */\n color: \"#cccccc\" /* Palette.neutralColor20 */,\n /**\n * A specific border color for the selected point.\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @default #000000\n * @product highcharts highstock gantt\n */\n borderColor: \"#000000\" /* Palette.neutralColor100 */\n }\n },\n dataLabels: {\n align: void 0,\n verticalAlign: void 0,\n /**\n * The y position offset of the label relative to the point in\n * pixels.\n *\n * @type {number}\n */\n y: void 0\n },\n // false doesn't work well: https://jsfiddle.net/highcharts/hz8fopan/14/\n /** @ignore-option */\n startFromThreshold: true,\n stickyTracking: false,\n tooltip: {\n distance: 6\n },\n /**\n * The Y axis value to serve as the base for the columns,\n for\n * distinguishing between values above and below a threshold. If `null`,\n * the columns extend from the padding Y axis minimum.\n *\n * @type {number|null}\n * @since 2.0\n * @product highcharts\n */\n threshold: 0,\n /**\n * The width of the border surrounding each column or bar. Defaults to\n * `1` when there is room for a border,\n but to `0` when the columns are\n * so dense that a border would cover the next column.\n *\n * In styled mode,\n the stroke width can be set with the\n * `.highcharts-point` rule.\n *\n * @sample {highcharts} highcharts/plotoptions/column-borderwidth/\n * 2px black border\n *\n * @type {number}\n * @default undefined\n * @product highcharts highstock gantt\n * @apioption plotOptions.column.borderWidth\n */\n /**\n * The color of the border surrounding each column or bar.\n *\n * In styled mode,\n the border stroke can be set with the\n * `.highcharts-point` rule.\n *\n * @sample {highcharts} highcharts/plotoptions/column-bordercolor/\n * Dark gray border\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @default #ffffff\n * @product highcharts highstock gantt\n */\n borderColor: \"#ffffff\" /* Palette.backgroundColor */\n };\n /**\n * A `column` series. If the [type](#series.column.type) option is\n * not specified, it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.column\n * @excluding connectNulls, dataParser, dataURL, gapSize, gapUnit, linecap,\n * lineWidth, marker, connectEnds, step\n * @product highcharts highstock\n * @apioption series.column\n */\n /**\n * An array of data points for the series. For the `column` series type,\n * points can be given in the following ways:\n *\n * 1. An array of numerical values. In this case, the numerical values will be\n * interpreted as `y` options. The `x` values will be automatically\n * calculated, either starting at 0 and incremented by 1, or from\n * `pointStart` and `pointInterval` given in the series options. If the axis\n * has categories, these will be used. Example:\n * ```js\n * data: [0, 5, 3, 5]\n * ```\n *\n * 2. An array of arrays with 2 values. In this case, the values correspond to\n * `x,y`. If the first value is a string, it is applied as the name of the\n * point, and the `x` value is inferred.\n * ```js\n * data: [\n * [0, 6],\n * [1, 2],\n * [2, 6]\n * ]\n * ```\n *\n * 3. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.column.turboThreshold), this option is not\n * available.\n * ```js\n * data: [{\n * x: 1,\n * y: 9,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * y: 6,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * Numerical values\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @type {Array|null|*>}\n * @extends series.line.data\n * @excluding marker\n * @product highcharts highstock\n * @apioption series.column.data\n */\n /**\n * The color of the border surrounding the column or bar.\n *\n * In styled mode, the border stroke can be set with the `.highcharts-point`\n * rule.\n *\n * @sample {highcharts} highcharts/plotoptions/column-bordercolor/\n * Dark gray border\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @product highcharts highstock\n * @apioption series.column.data.borderColor\n */\n /**\n * The width of the border surrounding the column or bar.\n *\n * In styled mode, the stroke width can be set with the `.highcharts-point`\n * rule.\n *\n * @sample {highcharts} highcharts/plotoptions/column-borderwidth/\n * 2px black border\n *\n * @type {number}\n * @product highcharts highstock\n * @apioption series.column.data.borderWidth\n */\n /**\n * A name for the dash style to use for the column or bar. Overrides\n * dashStyle on the series.\n *\n * In styled mode, the stroke dash-array can be set with the same classes as\n * listed under [data.color](#series.column.data.color).\n *\n * @see [series.pointWidth](#plotOptions.column.dashStyle)\n *\n * @type {Highcharts.DashStyleValue}\n * @apioption series.column.data.dashStyle\n */\n /**\n * A pixel value specifying a fixed width for the column or bar. Overrides\n * pointWidth on the series. The width effects the dimension that is not based\n * on the point value.\n *\n * @see [series.pointWidth](#plotOptions.column.pointWidth)\n *\n * @type {number}\n * @apioption series.column.data.pointWidth\n */\n /**\n * @excluding halo, lineWidth, lineWidthPlus, marker\n * @product highcharts highstock\n * @apioption series.column.states.hover\n */\n /**\n * @excluding halo, lineWidth, lineWidthPlus, marker\n * @product highcharts highstock\n * @apioption series.column.states.select\n */\n ''; // keeps doclets above in JS file\n /* *\n *\n * Default Export\n *\n * */\n\n return ColumnSeriesDefaults;\n });\n _registerModule(_modules, 'Series/Column/ColumnSeries.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Color/Color.js'], _modules['Series/Column/ColumnSeriesDefaults.js'], _modules['Core/Globals.js'], _modules['Core/Legend/LegendSymbol.js'], _modules['Core/Series/Series.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (A, Color, ColumnSeriesDefaults, H, LegendSymbol, Series, SeriesRegistry, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var animObject = A.animObject;\n var color = Color.parse;\n var hasTouch = H.hasTouch,\n noop = H.noop;\n var clamp = U.clamp,\n css = U.css,\n defined = U.defined,\n extend = U.extend,\n fireEvent = U.fireEvent,\n isArray = U.isArray,\n isNumber = U.isNumber,\n merge = U.merge,\n pick = U.pick,\n objectEach = U.objectEach;\n /* *\n *\n * Class\n *\n * */\n /**\n * The column series type.\n *\n * @private\n * @class\n * @name Highcharts.seriesTypes.column\n *\n * @augments Highcharts.Series\n */\n var ColumnSeries = /** @class */ (function (_super) {\n __extends(ColumnSeries, _super);\n function ColumnSeries() {\n /* *\n *\n * Static Properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n /* *\n *\n * Properties\n *\n * */\n _this.borderWidth = void 0;\n _this.data = void 0;\n _this.group = void 0;\n _this.options = void 0;\n _this.points = void 0;\n return _this;\n /* eslint-enable valid-jsdoc */\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Animate the column heights one by one from zero.\n *\n * @private\n * @function Highcharts.seriesTypes.column#animate\n *\n * @param {boolean} init\n * Whether to initialize the animation or run it\n */\n ColumnSeries.prototype.animate = function (init) {\n var series = this,\n yAxis = this.yAxis,\n options = series.options,\n inverted = this.chart.inverted,\n attr = {},\n translateProp = inverted ?\n 'translateX' :\n 'translateY';\n var translateStart,\n translatedThreshold;\n if (init) {\n attr.scaleY = 0.001;\n translatedThreshold = clamp(yAxis.toPixels(options.threshold), yAxis.pos, yAxis.pos + yAxis.len);\n if (inverted) {\n attr.translateX = translatedThreshold - yAxis.len;\n }\n else {\n attr.translateY = translatedThreshold;\n }\n // apply finnal clipping (used in Highcharts Stock) (#7083)\n // animation is done by scaleY, so cliping is for panes\n if (series.clipBox) {\n series.setClip();\n }\n series.group.attr(attr);\n }\n else { // run the animation\n translateStart = Number(series.group.attr(translateProp));\n series.group.animate({ scaleY: 1 }, extend(animObject(series.options.animation), {\n // Do the scale synchronously to ensure smooth\n // updating (#5030, #7228)\n step: function (val, fx) {\n if (series.group) {\n attr[translateProp] = translateStart +\n fx.pos * (yAxis.pos - translateStart);\n series.group.attr(attr);\n }\n }\n }));\n }\n };\n /**\n * Initialize the series. Extends the basic Series.init method by\n * marking other series of the same type as dirty.\n *\n * @private\n * @function Highcharts.seriesTypes.column#init\n */\n ColumnSeries.prototype.init = function (chart, options) {\n _super.prototype.init.apply(this, arguments);\n var series = this;\n chart = series.chart;\n // if the series is added dynamically, force redraw of other\n // series affected by a new column\n if (chart.hasRendered) {\n chart.series.forEach(function (otherSeries) {\n if (otherSeries.type === series.type) {\n otherSeries.isDirty = true;\n }\n });\n }\n };\n /**\n * Return the width and x offset of the columns adjusted for grouping,\n * groupPadding, pointPadding, pointWidth etc.\n *\n * @private\n * @function Highcharts.seriesTypes.column#getColumnMetrics\n */\n ColumnSeries.prototype.getColumnMetrics = function () {\n var series = this,\n options = series.options,\n xAxis = series.xAxis,\n yAxis = series.yAxis,\n reversedStacks = xAxis.options.reversedStacks, \n // Keep backward compatibility: reversed xAxis had reversed\n // stacks\n reverseStacks = (xAxis.reversed && !reversedStacks) ||\n (!xAxis.reversed && reversedStacks),\n stackGroups = {};\n var stackKey,\n columnCount = 0;\n // Get the total number of column type series. This is called on\n // every series. Consider moving this logic to a chart.orderStacks()\n // function and call it on init, addSeries and removeSeries\n if (options.grouping === false) {\n columnCount = 1;\n }\n else {\n series.chart.series.forEach(function (otherSeries) {\n var otherYAxis = otherSeries.yAxis,\n otherOptions = otherSeries.options;\n var columnIndex;\n if (otherSeries.type === series.type &&\n (otherSeries.visible ||\n !series.chart.options.chart.ignoreHiddenSeries) &&\n yAxis.len === otherYAxis.len &&\n yAxis.pos === otherYAxis.pos) { // #642, #2086\n if (otherOptions.stacking &&\n otherOptions.stacking !== 'group') {\n stackKey = otherSeries.stackKey;\n if (typeof stackGroups[stackKey] ===\n 'undefined') {\n stackGroups[stackKey] = columnCount++;\n }\n columnIndex = stackGroups[stackKey];\n }\n else if (otherOptions.grouping !== false) { // #1162\n columnIndex = columnCount++;\n }\n otherSeries.columnIndex = columnIndex;\n }\n });\n }\n var categoryWidth = Math.min(Math.abs(xAxis.transA) * ((xAxis.ordinal && xAxis.ordinal.slope) ||\n options.pointRange ||\n xAxis.closestPointRange ||\n xAxis.tickInterval ||\n 1), // #2610\n xAxis.len // #1535\n ),\n groupPadding = categoryWidth * options.groupPadding,\n groupWidth = categoryWidth - 2 * groupPadding,\n pointOffsetWidth = groupWidth / (columnCount || 1),\n pointWidth = Math.min(options.maxPointWidth || xAxis.len,\n pick(options.pointWidth,\n pointOffsetWidth * (1 - 2 * options.pointPadding))),\n pointPadding = (pointOffsetWidth - pointWidth) / 2, \n // #1251, #3737\n colIndex = (series.columnIndex || 0) + (reverseStacks ? 1 : 0),\n pointXOffset = pointPadding +\n (groupPadding +\n colIndex * pointOffsetWidth -\n (categoryWidth / 2)) * (reverseStacks ? -1 : 1);\n // Save it for reading in linked series (Error bars particularly)\n series.columnMetrics = {\n width: pointWidth,\n offset: pointXOffset,\n paddedWidth: pointOffsetWidth,\n columnCount: columnCount\n };\n return series.columnMetrics;\n };\n /**\n * Make the columns crisp. The edges are rounded to the nearest full\n * pixel.\n *\n * @private\n * @function Highcharts.seriesTypes.column#crispCol\n */\n ColumnSeries.prototype.crispCol = function (x, y, w, h) {\n var chart = this.chart,\n borderWidth = this.borderWidth,\n xCrisp = -(borderWidth % 2 ? 0.5 : 0);\n var right,\n yCrisp = borderWidth % 2 ? 0.5 : 1;\n if (chart.inverted && chart.renderer.isVML) {\n yCrisp += 1;\n }\n // Horizontal. We need to first compute the exact right edge, then\n // round it and compute the width from there.\n if (this.options.crisp) {\n right = Math.round(x + w) + xCrisp;\n x = Math.round(x) + xCrisp;\n w = right - x;\n }\n // Vertical\n var bottom = Math.round(y + h) + yCrisp,\n fromTop = Math.abs(y) <= 0.5 && bottom > 0.5; // #4504, #4656\n y = Math.round(y) + yCrisp;\n h = bottom - y;\n // Top edges are exceptions\n if (fromTop && h) { // #5146\n y -= 1;\n h += 1;\n }\n return {\n x: x,\n y: y,\n width: w,\n height: h\n };\n };\n /**\n * Adjust for missing columns, according to the `centerInCategory`\n * option. Missing columns are either single points or stacks where the\n * point or points are either missing or null.\n *\n * @private\n * @function Highcharts.seriesTypes.column#adjustForMissingColumns\n * @param {number} x\n * The x coordinate of the column, left side\n *\n * @param {number} pointWidth\n * The pointWidth, already computed upstream\n *\n * @param {Highcharts.ColumnPoint} point\n * The point instance\n *\n * @param {Highcharts.ColumnMetricsObject} metrics\n * The series-wide column metrics\n *\n * @return {number}\n * The adjusted x position, or the original if not adjusted\n */\n ColumnSeries.prototype.adjustForMissingColumns = function (x, pointWidth, point, metrics) {\n var _this = this;\n var stacking = this.options.stacking;\n if (!point.isNull && metrics.columnCount > 1) {\n var reversedStacks_1 = this.yAxis.options.reversedStacks;\n var indexInCategory_1 = 0,\n totalInCategory_1 = reversedStacks_1 ? 0 : -metrics.columnCount;\n // Loop over all the stacks on the Y axis. When stacking is enabled,\n // these are real point stacks. When stacking is not enabled, but\n // `centerInCategory` is true, there is one stack handling the\n // grouping of points in each category. This is done in the\n // `setGroupedPoints` function.\n objectEach(this.yAxis.stacking && this.yAxis.stacking.stacks, function (stack) {\n if (typeof point.x === 'number') {\n var stackItem_1 = stack[point.x.toString()];\n if (stackItem_1) {\n var pointValues = stackItem_1.points[_this.index];\n // If true `stacking` is enabled, count the total\n // number of non-null stacks in the category, and\n // note which index this point is within those\n // stacks.\n if (stacking) {\n if (pointValues) {\n indexInCategory_1 = totalInCategory_1;\n }\n if (stackItem_1.hasValidPoints) {\n reversedStacks_1 ? // #16169\n totalInCategory_1++ : totalInCategory_1--;\n }\n // If `stacking` is not enabled, look for the index\n }\n else if (isArray(pointValues)) {\n // If there are multiple points with the same X\n // then gather all series in category, and\n // assign index\n var seriesIndexes = Object\n .keys(stackItem_1.points)\n .filter(function (pointKey) {\n // Filter out duplicate X's\n return !pointKey.match(',') &&\n // Filter out null points\n stackItem_1.points[pointKey] &&\n stackItem_1.points[pointKey].length > 1;\n })\n .map(parseFloat)\n .sort(function (a, b) { return b - a; });\n indexInCategory_1 = seriesIndexes.indexOf(_this.index);\n totalInCategory_1 = seriesIndexes.length;\n }\n }\n }\n });\n // Compute the adjusted x position\n var boxWidth = (totalInCategory_1 - 1) * metrics.paddedWidth +\n pointWidth;\n x = (point.plotX || 0) + boxWidth / 2 - pointWidth -\n indexInCategory_1 * metrics.paddedWidth;\n }\n return x;\n };\n /**\n * Translate each point to the plot area coordinate system and find\n * shape positions\n *\n * @private\n * @function Highcharts.seriesTypes.column#translate\n */\n ColumnSeries.prototype.translate = function () {\n var series = this,\n chart = series.chart,\n options = series.options,\n dense = series.dense =\n series.closestPointRange * series.xAxis.transA < 2,\n borderWidth = series.borderWidth = pick(options.borderWidth,\n dense ? 0 : 1 // #3635\n ),\n xAxis = series.xAxis,\n yAxis = series.yAxis,\n threshold = options.threshold,\n translatedThreshold = series.translatedThreshold =\n yAxis.getThreshold(threshold),\n minPointLength = pick(options.minPointLength, 5),\n metrics = series.getColumnMetrics(),\n seriesPointWidth = metrics.width,\n seriesXOffset = series.pointXOffset = metrics.offset,\n dataMin = series.dataMin,\n dataMax = series.dataMax;\n // postprocessed for border width\n var seriesBarW = series.barW =\n Math.max(seriesPointWidth, 1 + 2 * borderWidth);\n if (chart.inverted) {\n translatedThreshold -= 0.5; // #3355\n }\n // When the pointPadding is 0, we want the columns to be packed\n // tightly, so we allow individual columns to have individual sizes.\n // When pointPadding is greater, we strive for equal-width columns\n // (#2694).\n if (options.pointPadding) {\n seriesBarW = Math.ceil(seriesBarW);\n }\n Series.prototype.translate.apply(series);\n // Record the new values\n series.points.forEach(function (point) {\n var yBottom = pick(point.yBottom,\n translatedThreshold),\n safeDistance = 999 + Math.abs(yBottom),\n plotX = point.plotX || 0, \n // Don't draw too far outside plot area (#1303, #2241,\n // #4264)\n plotY = clamp(point.plotY, -safeDistance,\n yAxis.len + safeDistance);\n var up,\n barY = Math.min(plotY,\n yBottom),\n barH = Math.max(plotY,\n yBottom) - barY,\n pointWidth = seriesPointWidth,\n barX = plotX + seriesXOffset,\n barW = seriesBarW;\n // Handle options.minPointLength\n if (minPointLength && Math.abs(barH) < minPointLength) {\n barH = minPointLength;\n up = (!yAxis.reversed && !point.negative) ||\n (yAxis.reversed && point.negative);\n // Reverse zeros if there's no positive value in the series\n // in visible range (#7046)\n if (isNumber(threshold) &&\n isNumber(dataMax) &&\n point.y === threshold &&\n dataMax <= threshold &&\n // and if there's room for it (#7311)\n (yAxis.min || 0) < threshold &&\n // if all points are the same value (i.e zero) not draw\n // as negative points (#10646), but only if there's room\n // for it (#14876)\n (dataMin !== dataMax || (yAxis.max || 0) <= threshold)) {\n up = !up;\n }\n // If stacked...\n barY = (Math.abs(barY - translatedThreshold) > minPointLength ?\n // ...keep position\n yBottom - minPointLength :\n // #1485, #4051\n translatedThreshold -\n (up ? minPointLength : 0));\n }\n // Handle point.options.pointWidth\n // @todo Handle grouping/stacking too. Calculate offset properly\n if (defined(point.options.pointWidth)) {\n pointWidth = barW =\n Math.ceil(point.options.pointWidth);\n barX -= Math.round((pointWidth - seriesPointWidth) / 2);\n }\n // Adjust for null or missing points\n if (options.centerInCategory) {\n barX = series.adjustForMissingColumns(barX, pointWidth, point, metrics);\n }\n // Cache for access in polar\n point.barX = barX;\n point.pointWidth = pointWidth;\n // Fix the tooltip on center of grouped columns (#1216, #424,\n // #3648)\n point.tooltipPos = chart.inverted ?\n [\n clamp(yAxis.len + yAxis.pos - chart.plotLeft - plotY, yAxis.pos - chart.plotLeft, yAxis.len + yAxis.pos - chart.plotLeft),\n xAxis.len + xAxis.pos - chart.plotTop - barX - barW / 2,\n barH\n ] :\n [\n xAxis.left - chart.plotLeft + barX + barW / 2,\n clamp(plotY + yAxis.pos -\n chart.plotTop, yAxis.pos - chart.plotTop, yAxis.len + yAxis.pos - chart.plotTop),\n barH\n ];\n // Register shape type and arguments to be used in drawPoints\n // Allow shapeType defined on pointClass level\n point.shapeType = series.pointClass.prototype.shapeType || 'rect';\n point.shapeArgs = series.crispCol.apply(series, point.isNull ?\n // #3169, drilldown from null must have a position to work\n // from #6585, dataLabel should be placed on xAxis, not\n // floating in the middle of the chart\n [barX, translatedThreshold, barW, 0] :\n [barX, barY, barW, barH]);\n });\n };\n /**\n * Columns have no graph\n *\n * @private\n * @function Highcharts.seriesTypes.column#drawGraph\n */\n ColumnSeries.prototype.drawGraph = function () {\n this.group[this.dense ? 'addClass' : 'removeClass']('highcharts-dense-data');\n };\n /**\n * Get presentational attributes\n *\n * @private\n * @function Highcharts.seriesTypes.column#pointAttribs\n */\n ColumnSeries.prototype.pointAttribs = function (point, state) {\n var options = this.options, p2o = this.pointAttrToOptions || {}, strokeOption = p2o.stroke || 'borderColor', strokeWidthOption = p2o['stroke-width'] || 'borderWidth';\n var stateOptions,\n zone,\n brightness,\n fill = (point && point.color) || this.color, \n // set to fill when borderColor null:\n stroke = ((point && point[strokeOption]) ||\n options[strokeOption] ||\n fill),\n dashstyle = (point && point.options.dashStyle) || options.dashStyle,\n strokeWidth = (point && point[strokeWidthOption]) ||\n options[strokeWidthOption] ||\n this[strokeWidthOption] || 0,\n opacity = pick(point && point.opacity,\n options.opacity, 1);\n // Handle zone colors\n if (point && this.zones.length) {\n zone = point.getZone();\n // When zones are present, don't use point.color (#4267).\n // Changed order (#6527), added support for colorAxis (#10670)\n fill = (point.options.color ||\n (zone && (zone.color || point.nonZonedColor)) ||\n this.color);\n if (zone) {\n stroke = zone.borderColor || stroke;\n dashstyle = zone.dashStyle || dashstyle;\n strokeWidth = zone.borderWidth || strokeWidth;\n }\n }\n // Select or hover states\n if (state && point) {\n stateOptions = merge(options.states[state], \n // #6401\n point.options.states &&\n point.options.states[state] ||\n {});\n brightness = stateOptions.brightness;\n fill =\n stateOptions.color || (typeof brightness !== 'undefined' &&\n color(fill)\n .brighten(stateOptions.brightness)\n .get()) || fill;\n stroke = stateOptions[strokeOption] || stroke;\n strokeWidth =\n stateOptions[strokeWidthOption] || strokeWidth;\n dashstyle = stateOptions.dashStyle || dashstyle;\n opacity = pick(stateOptions.opacity, opacity);\n }\n var ret = {\n fill: fill,\n stroke: stroke,\n 'stroke-width': strokeWidth,\n opacity: opacity\n };\n if (dashstyle) {\n ret.dashstyle = dashstyle;\n }\n return ret;\n };\n /**\n * Draw the columns. For bars, the series.group is rotated, so the same\n * coordinates apply for columns and bars. This method is inherited by\n * scatter series.\n *\n * @private\n * @function Highcharts.seriesTypes.column#drawPoints\n */\n ColumnSeries.prototype.drawPoints = function (points) {\n if (points === void 0) { points = this.points; }\n var series = this,\n chart = this.chart,\n options = series.options,\n renderer = chart.renderer,\n animationLimit = options.animationLimit || 250;\n var shapeArgs;\n // draw the columns\n points.forEach(function (point) {\n var plotY = point.plotY;\n var graphic = point.graphic,\n hasGraphic = !!graphic,\n verb = graphic && chart.pointCount < animationLimit ?\n 'animate' : 'attr';\n if (isNumber(plotY) && point.y !== null) {\n shapeArgs = point.shapeArgs;\n // When updating a series between 2d and 3d or cartesian and\n // polar, the shape type changes.\n if (graphic && point.hasNewShapeType()) {\n graphic = graphic.destroy();\n }\n // Set starting position for point sliding animation.\n if (series.enabledDataSorting) {\n point.startXPos = series.xAxis.reversed ?\n -(shapeArgs ? (shapeArgs.width || 0) : 0) :\n series.xAxis.width;\n }\n if (!graphic) {\n point.graphic = graphic =\n renderer[point.shapeType](shapeArgs)\n .add(point.group || series.group);\n if (graphic &&\n series.enabledDataSorting &&\n chart.hasRendered &&\n chart.pointCount < animationLimit) {\n graphic.attr({\n x: point.startXPos\n });\n hasGraphic = true;\n verb = 'animate';\n }\n }\n if (graphic && hasGraphic) { // update\n graphic[verb](merge(shapeArgs));\n }\n // Border radius is not stylable (#6900)\n if (options.borderRadius) {\n graphic[verb]({\n r: options.borderRadius\n });\n }\n // Presentational\n if (!chart.styledMode) {\n graphic[verb](series.pointAttribs(point, (point.selected && 'select')))\n .shadow(point.allowShadow !== false && options.shadow, null, options.stacking && !options.borderRadius);\n }\n if (graphic) {\n graphic.addClass(point.getClassName(), true);\n graphic.attr({\n visibility: point.visible ? 'inherit' : 'hidden'\n });\n }\n }\n else if (graphic) {\n point.graphic = graphic.destroy(); // #1269\n }\n });\n };\n /**\n * Draw the tracker for a point.\n * @private\n */\n ColumnSeries.prototype.drawTracker = function (points) {\n if (points === void 0) { points = this.points; }\n var series = this,\n chart = series.chart,\n pointer = chart.pointer,\n onMouseOver = function (e) {\n var point = pointer.getPointFromEvent(e);\n // undefined on graph in scatterchart\n if (typeof point !== 'undefined') {\n pointer.isDirectTouch = true;\n point.onMouseOver(e);\n }\n };\n var dataLabels;\n // Add reference to the point\n points.forEach(function (point) {\n dataLabels = (isArray(point.dataLabels) ?\n point.dataLabels :\n (point.dataLabel ? [point.dataLabel] : []));\n if (point.graphic) {\n point.graphic.element.point = point;\n }\n dataLabels.forEach(function (dataLabel) {\n if (dataLabel.div) {\n dataLabel.div.point = point;\n }\n else {\n dataLabel.element.point = point;\n }\n });\n });\n // Add the event listeners, we need to do this only once\n if (!series._hasTracking) {\n series.trackerGroups.forEach(function (key) {\n if (series[key]) {\n // we don't always have dataLabelsGroup\n series[key]\n .addClass('highcharts-tracker')\n .on('mouseover', onMouseOver)\n .on('mouseout', function (e) {\n pointer.onTrackerMouseOut(e);\n });\n if (hasTouch) {\n series[key].on('touchstart', onMouseOver);\n }\n if (!chart.styledMode && series.options.cursor) {\n series[key]\n .css({ cursor: series.options.cursor });\n }\n }\n });\n series._hasTracking = true;\n }\n fireEvent(this, 'afterDrawTracker');\n };\n /**\n * Remove this series from the chart\n *\n * @private\n * @function Highcharts.seriesTypes.column#remove\n */\n ColumnSeries.prototype.remove = function () {\n var series = this,\n chart = series.chart;\n // column and bar series affects other series of the same type\n // as they are either stacked or grouped\n if (chart.hasRendered) {\n chart.series.forEach(function (otherSeries) {\n if (otherSeries.type === series.type) {\n otherSeries.isDirty = true;\n }\n });\n }\n Series.prototype.remove.apply(series, arguments);\n };\n ColumnSeries.defaultOptions = merge(Series.defaultOptions, ColumnSeriesDefaults);\n return ColumnSeries;\n }(Series));\n extend(ColumnSeries.prototype, {\n cropShoulder: 0,\n // When tooltip is not shared, this series (and derivatives) requires\n // direct touch/hover. KD-tree does not apply.\n directTouch: true,\n /**\n * Use a solid rectangle like the area series types\n *\n * @private\n * @function Highcharts.seriesTypes.column#drawLegendSymbol\n *\n * @param {Highcharts.Legend} legend\n * The legend object\n *\n * @param {Highcharts.Series|Highcharts.Point} item\n * The series (this) or point\n */\n drawLegendSymbol: LegendSymbol.drawRectangle,\n getSymbol: noop,\n // use separate negative stacks, unlike area stacks where a negative\n // point is substracted from previous (#1910)\n negStacks: true,\n trackerGroups: ['group', 'dataLabelsGroup']\n });\n SeriesRegistry.registerSeriesType('column', ColumnSeries);\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * Adjusted width and x offset of the columns for grouping.\n *\n * @private\n * @interface Highcharts.ColumnMetricsObject\n */ /**\n * Width of the columns.\n * @name Highcharts.ColumnMetricsObject#width\n * @type {number}\n */ /**\n * Offset of the columns.\n * @name Highcharts.ColumnMetricsObject#offset\n * @type {number}\n */\n ''; // detach doclets above\n\n return ColumnSeries;\n });\n _registerModule(_modules, 'Core/Series/DataLabel.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/FormatUtilities.js'], _modules['Core/Utilities.js']], function (A, F, U) {\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 var getDeferredAnimation = A.getDeferredAnimation;\n var format = F.format;\n var defined = U.defined,\n extend = U.extend,\n fireEvent = U.fireEvent,\n isArray = U.isArray,\n isString = U.isString,\n merge = U.merge,\n objectEach = U.objectEach,\n pick = U.pick,\n splat = U.splat;\n /* *\n *\n * Composition\n *\n * */\n /* eslint-disable valid-jsdoc */\n var DataLabel;\n (function (DataLabel) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Align each individual data label.\n * @private\n */\n function alignDataLabel(point, dataLabel, options, alignTo, isNew) {\n var series = this,\n chart = this.chart,\n inverted = this.isCartesian && chart.inverted,\n enabledDataSorting = this.enabledDataSorting,\n plotX = point.plotX,\n plotY = point.plotY,\n rotation = options.rotation,\n align = options.align,\n isInsidePlot = defined(plotX) &&\n defined(plotY) &&\n chart.isInsidePlot(plotX,\n Math.round(plotY), {\n inverted: inverted,\n paneCoordinates: true,\n series: series\n }),\n setStartPos = function (alignOptions) {\n if (enabledDataSorting && series.xAxis && !justify) {\n series.setDataLabelStartPos(point,\n dataLabel,\n isNew,\n isInsidePlot,\n alignOptions);\n }\n };\n var baseline,\n rotCorr, // rotation correction\n // Math.round for rounding errors (#2683), alignTo to allow column\n // labels (#2700)\n alignAttr, // the final position;\n justify = pick(options.overflow, (enabledDataSorting ? 'none' : 'justify')) === 'justify', visible = this.visible &&\n point.visible !== false &&\n defined(plotX) &&\n (point.series.forceDL ||\n (enabledDataSorting && !justify) ||\n isInsidePlot ||\n (\n // If the data label is inside the align box, it is\n // enough that parts of the align box is inside the\n // plot area (#12370). When stacking, it is always\n // inside regardless of the option (#15148).\n pick(options.inside, !!this.options.stacking) &&\n alignTo &&\n chart.isInsidePlot(plotX, inverted ?\n alignTo.x + 1 :\n alignTo.y + alignTo.height - 1, {\n inverted: inverted,\n paneCoordinates: true,\n series: series\n })));\n var pos = point.pos();\n if (visible && pos) {\n if (rotation) {\n dataLabel.attr({ align: align });\n }\n var bBox = dataLabel.getBBox(true),\n bBoxCorrection = [0, 0];\n baseline = chart.renderer.fontMetrics(chart.styledMode ? void 0 : options.style.fontSize, dataLabel).b;\n // The alignment box is a singular point\n alignTo = extend({\n x: pos[0],\n y: Math.round(pos[1]),\n width: 0,\n height: 0\n }, alignTo);\n // Add the text size for alignment calculation\n extend(options, {\n width: bBox.width,\n height: bBox.height\n });\n // Allow a hook for changing alignment in the last moment, then do\n // the alignment\n if (rotation) {\n justify = false; // Not supported for rotated text\n rotCorr = chart.renderer.rotCorr(baseline, rotation); // #3723\n alignAttr = {\n x: (alignTo.x +\n (options.x || 0) +\n alignTo.width / 2 +\n rotCorr.x),\n y: (alignTo.y +\n (options.y || 0) +\n { top: 0, middle: 0.5, bottom: 1 }[options.verticalAlign] *\n alignTo.height)\n };\n bBoxCorrection = [\n bBox.x - Number(dataLabel.attr('x')),\n bBox.y - Number(dataLabel.attr('y'))\n ];\n setStartPos(alignAttr); // data sorting\n dataLabel[isNew ? 'attr' : 'animate'](alignAttr);\n }\n else {\n setStartPos(alignTo); // data sorting\n dataLabel.align(options, void 0, alignTo);\n alignAttr = dataLabel.alignAttr;\n }\n // Handle justify or crop\n if (justify && alignTo.height >= 0) { // #8830\n this.justifyDataLabel(dataLabel, options, alignAttr, bBox, alignTo, isNew);\n // Now check that the data label is within the plot area\n }\n else if (pick(options.crop, true)) {\n var x = alignAttr.x,\n y = alignAttr.y;\n x += bBoxCorrection[0];\n y += bBoxCorrection[1];\n // Uncomment this block to visualize the bounding boxes used for\n // determining visibility\n /*\n chart.renderer.rect(\n chart.plotLeft + alignAttr.x + bBox.x,\n chart.plotTop + alignAttr.y + bBox.y + 9999,\n bBox.width,\n bBox.height\n ).attr({\n stroke: 'rgba(0, 0, 0, 0.3)',\n 'stroke-width': 0.5\n }).add();\n chart.renderer.circle(\n chart.plotLeft + alignAttr.x,\n chart.plotTop + alignAttr.y,\n 2\n ).attr({\n fill: 'red',\n zIndex: 20\n }).add();\n // */\n visible =\n chart.isInsidePlot(x, y, {\n paneCoordinates: true,\n series: series\n }) &&\n chart.isInsidePlot(x + bBox.width, y + bBox.height, {\n paneCoordinates: true,\n series: series\n });\n }\n // When we're using a shape, make it possible with a connector or an\n // arrow pointing to thie point\n if (options.shape && !rotation) {\n dataLabel[isNew ? 'attr' : 'animate']({\n anchorX: pos[0],\n anchorY: pos[1]\n });\n }\n }\n // To use alignAttr property in hideOverlappingLabels\n if (isNew && enabledDataSorting) {\n dataLabel.placed = false;\n }\n // Show or hide based on the final aligned position\n if (!visible && (!enabledDataSorting || justify)) {\n dataLabel.hide();\n dataLabel.placed = false; // don't animate back in\n }\n else {\n dataLabel.show();\n }\n }\n /**\n * Handle the dataLabels.filter option.\n * @private\n */\n function applyFilter(point, options) {\n var filter = options.filter;\n if (filter) {\n var op = filter.operator;\n var prop = point[filter.property];\n var val = filter.value;\n if ((op === '>' && prop > val) ||\n (op === '<' && prop < val) ||\n (op === '>=' && prop >= val) ||\n (op === '<=' && prop <= val) ||\n (op === '==' && prop == val) || // eslint-disable-line eqeqeq\n (op === '===' && prop === val)) {\n return true;\n }\n return false;\n }\n return true;\n }\n /**\n * @private\n */\n function compose(SeriesClass) {\n if (composedClasses.indexOf(SeriesClass) === -1) {\n var seriesProto = SeriesClass.prototype;\n composedClasses.push(SeriesClass);\n seriesProto.alignDataLabel = alignDataLabel;\n seriesProto.drawDataLabels = drawDataLabels;\n seriesProto.justifyDataLabel = justifyDataLabel;\n seriesProto.setDataLabelStartPos = setDataLabelStartPos;\n }\n }\n DataLabel.compose = compose;\n /**\n * Draw the data labels\n * @private\n */\n function drawDataLabels(points) {\n if (points === void 0) { points = this.points; }\n var series = this,\n chart = series.chart,\n seriesOptions = series.options,\n hasRendered = series.hasRendered || 0,\n renderer = chart.renderer,\n _a = chart.options.chart,\n backgroundColor = _a.backgroundColor,\n plotBackgroundColor = _a.plotBackgroundColor,\n contrastColor = renderer.getContrast((isString(plotBackgroundColor) && plotBackgroundColor) ||\n (isString(backgroundColor) && backgroundColor) ||\n \"#000000\" /* Palette.neutralColor100 */);\n var seriesDlOptions = seriesOptions.dataLabels,\n pointOptions,\n dataLabelsGroup;\n var dataLabelAnim = seriesDlOptions.animation,\n animationConfig = seriesDlOptions.defer ?\n getDeferredAnimation(chart,\n dataLabelAnim,\n series) :\n { defer: 0,\n duration: 0 };\n // Merge in plotOptions.dataLabels for series\n seriesDlOptions = mergeArrays(mergeArrays(chart.options.plotOptions &&\n chart.options.plotOptions.series &&\n chart.options.plotOptions.series.dataLabels, chart.options.plotOptions &&\n chart.options.plotOptions[series.type] &&\n chart.options.plotOptions[series.type].dataLabels), seriesDlOptions);\n fireEvent(this, 'drawDataLabels');\n if (isArray(seriesDlOptions) ||\n seriesDlOptions.enabled ||\n series._hasPointLabels) {\n // Create a separate group for the data labels to avoid rotation\n dataLabelsGroup = series.plotGroup('dataLabelsGroup', 'data-labels', !hasRendered ? 'hidden' : 'inherit', // #5133, #10220\n seriesDlOptions.zIndex || 6);\n dataLabelsGroup.attr({ opacity: +hasRendered }); // #3300\n if (!hasRendered) {\n var group = series.dataLabelsGroup;\n if (group) {\n if (series.visible) { // #2597, #3023, #3024\n dataLabelsGroup.show();\n }\n group[seriesOptions.animation ? 'animate' : 'attr']({ opacity: 1 }, animationConfig);\n }\n }\n // Make the labels for each point\n points.forEach(function (point) {\n // Merge in series options for the point.\n // @note dataLabelAttribs (like pointAttribs) would eradicate\n // the need for dlOptions, and simplify the section below.\n pointOptions = splat(mergeArrays(seriesDlOptions, \n // dlOptions is used in treemaps\n (point.dlOptions ||\n (point.options && point.options.dataLabels))));\n // Handle each individual data label for this point\n pointOptions.forEach(function (labelOptions, i) {\n // Options for one datalabel\n var labelEnabled = (labelOptions.enabled &&\n // #2282, #4641, #7112, #10049\n (!point.isNull || point.dataLabelOnNull) &&\n applyFilter(point,\n labelOptions)),\n connector = point.connectors ?\n point.connectors[i] :\n point.connector;\n var labelConfig,\n formatString,\n labelText,\n style,\n rotation,\n attr,\n dataLabel = point.dataLabels ?\n point.dataLabels[i] : point.dataLabel,\n isNew = !dataLabel;\n var labelDistance = pick(labelOptions.distance,\n point.labelDistance);\n if (labelEnabled) {\n // Create individual options structure that can be\n // extended without affecting others\n labelConfig = point.getLabelConfig();\n formatString = pick(labelOptions[point.formatPrefix + 'Format'], labelOptions.format);\n labelText = defined(formatString) ?\n format(formatString, labelConfig, chart) :\n (labelOptions[point.formatPrefix + 'Formatter'] ||\n labelOptions.formatter).call(labelConfig, labelOptions);\n style = labelOptions.style;\n rotation = labelOptions.rotation;\n if (!chart.styledMode) {\n // Determine the color\n style.color = pick(labelOptions.color, style.color, series.color, \"#000000\" /* Palette.neutralColor100 */);\n // Get automated contrast color\n if (style.color === 'contrast') {\n point.contrastColor = renderer.getContrast((point.color || series.color));\n style.color = (!defined(labelDistance) &&\n labelOptions.inside) ||\n labelDistance < 0 ||\n !!seriesOptions.stacking ?\n point.contrastColor :\n contrastColor;\n }\n else {\n delete point.contrastColor;\n }\n if (seriesOptions.cursor) {\n style.cursor = seriesOptions.cursor;\n }\n }\n attr = {\n r: labelOptions.borderRadius || 0,\n rotation: rotation,\n padding: labelOptions.padding,\n zIndex: 1\n };\n if (!chart.styledMode) {\n var backgroundColor_1 = labelOptions.backgroundColor,\n borderColor = labelOptions.borderColor;\n attr.fill = backgroundColor_1 === 'auto' ?\n point.color :\n backgroundColor_1;\n attr.stroke = borderColor === 'auto' ?\n point.color :\n borderColor;\n attr['stroke-width'] = labelOptions.borderWidth;\n }\n // Remove unused attributes (#947)\n objectEach(attr, function (val, name) {\n if (typeof val === 'undefined') {\n delete attr[name];\n }\n });\n }\n // If the point is outside the plot area, destroy it. #678,\n // #820\n if (dataLabel && (!labelEnabled ||\n !defined(labelText) ||\n !!dataLabel.div !== !!labelOptions.useHTML ||\n (\n // Change from no rotation to rotation and\n // vice versa. Don't use defined() because\n // rotation = 0 means also rotation = undefined\n (!dataLabel.rotation ||\n !labelOptions.rotation) &&\n dataLabel.rotation !== labelOptions.rotation))) {\n isNew = true;\n point.dataLabel = dataLabel =\n point.dataLabel && point.dataLabel.destroy();\n if (point.dataLabels) {\n // Remove point.dataLabels if this was the last one\n if (point.dataLabels.length === 1) {\n delete point.dataLabels;\n }\n else {\n delete point.dataLabels[i];\n }\n }\n if (!i) {\n delete point.dataLabel;\n }\n if (connector) {\n point.connector = point.connector.destroy();\n if (point.connectors) {\n // Remove point.connectors if this was the last\n // one\n if (point.connectors.length === 1) {\n delete point.connectors;\n }\n else {\n delete point.connectors[i];\n }\n }\n }\n }\n // Individual labels are disabled if the are explicitly\n // disabled in the point options, or if they fall outside\n // the plot area.\n if (labelEnabled && defined(labelText)) {\n if (!dataLabel) {\n // Create new label element\n point.dataLabels = point.dataLabels || [];\n dataLabel = point.dataLabels[i] = rotation ?\n // Labels don't rotate, use text element\n renderer.text(labelText, 0, 0, labelOptions.useHTML)\n .addClass('highcharts-data-label') :\n // We can use label\n renderer.label(labelText, 0, 0, labelOptions.shape, null, null, labelOptions.useHTML, null, 'data-label');\n // Store for backwards compatibility\n if (!i) {\n point.dataLabel = dataLabel;\n }\n dataLabel.addClass(' highcharts-data-label-color-' +\n point.colorIndex +\n ' ' + (labelOptions.className || '') +\n ( // #3398\n labelOptions.useHTML ?\n ' highcharts-tracker' :\n ''));\n }\n else {\n // Use old element and just update text\n attr.text = labelText;\n }\n // Store data label options for later access\n dataLabel.options = labelOptions;\n dataLabel.attr(attr);\n if (!chart.styledMode) {\n // Styles must be applied before add in order to\n // read text bounding box\n dataLabel.css(style).shadow(labelOptions.shadow);\n }\n var textPathOptions = labelOptions[point.formatPrefix + 'TextPath'] ||\n labelOptions.textPath;\n if (textPathOptions && !labelOptions.useHTML) {\n dataLabel.setTextPath((point.getDataLabelPath &&\n point.getDataLabelPath(dataLabel)) || point.graphic, textPathOptions);\n if (point.dataLabelPath &&\n !textPathOptions.enabled) {\n // clean the DOM\n point.dataLabelPath = (point.dataLabelPath.destroy());\n }\n }\n if (!dataLabel.added) {\n dataLabel.add(dataLabelsGroup);\n }\n // Now the data label is created and placed at 0,0, so\n // we need to align it\n series.alignDataLabel(point, dataLabel, labelOptions, null, isNew);\n }\n else if (dataLabel) {\n dataLabel.hide();\n }\n });\n });\n }\n fireEvent(this, 'afterDrawDataLabels');\n }\n /**\n * If data labels fall partly outside the plot area, align them back in, in\n * a way that doesn't hide the point.\n * @private\n */\n function justifyDataLabel(dataLabel, options, alignAttr, bBox, alignTo, isNew) {\n var chart = this.chart,\n align = options.align,\n verticalAlign = options.verticalAlign,\n padding = dataLabel.box ? 0 : (dataLabel.padding || 0);\n var _a = options.x,\n x = _a === void 0 ? 0 : _a,\n _b = options.y,\n y = _b === void 0 ? 0 : _b,\n off,\n justified;\n // Off left\n off = (alignAttr.x || 0) + padding;\n if (off < 0) {\n if (align === 'right' && x >= 0) {\n options.align = 'left';\n options.inside = true;\n }\n else {\n x -= off;\n }\n justified = true;\n }\n // Off right\n off = (alignAttr.x || 0) + bBox.width - padding;\n if (off > chart.plotWidth) {\n if (align === 'left' && x <= 0) {\n options.align = 'right';\n options.inside = true;\n }\n else {\n x += chart.plotWidth - off;\n }\n justified = true;\n }\n // Off top\n off = alignAttr.y + padding;\n if (off < 0) {\n if (verticalAlign === 'bottom' && y >= 0) {\n options.verticalAlign = 'top';\n options.inside = true;\n }\n else {\n y -= off;\n }\n justified = true;\n }\n // Off bottom\n off = (alignAttr.y || 0) + bBox.height - padding;\n if (off > chart.plotHeight) {\n if (verticalAlign === 'top' && y <= 0) {\n options.verticalAlign = 'bottom';\n options.inside = true;\n }\n else {\n y += chart.plotHeight - off;\n }\n justified = true;\n }\n if (justified) {\n options.x = x;\n options.y = y;\n dataLabel.placed = !isNew;\n dataLabel.align(options, void 0, alignTo);\n }\n return justified;\n }\n /**\n * Merge two objects that can be arrays. If one of them is an array, the\n * other is merged into each element. If both are arrays, each element is\n * merged by index. If neither are arrays, we use normal merge.\n * @private\n */\n function mergeArrays(one, two) {\n var res = [],\n i;\n if (isArray(one) && !isArray(two)) {\n res = one.map(function (el) {\n return merge(el, two);\n });\n }\n else if (isArray(two) && !isArray(one)) {\n res = two.map(function (el) {\n return merge(one, el);\n });\n }\n else if (!isArray(one) && !isArray(two)) {\n res = merge(one, two);\n }\n else {\n i = Math.max(one.length, two.length);\n while (i--) {\n res[i] = merge(one[i], two[i]);\n }\n }\n return res;\n }\n /**\n * Set starting position for data label sorting animation.\n * @private\n */\n function setDataLabelStartPos(point, dataLabel, isNew, isInside, alignOptions) {\n var chart = this.chart,\n inverted = chart.inverted,\n xAxis = this.xAxis,\n reversed = xAxis.reversed,\n labelCenter = inverted ? dataLabel.height / 2 : dataLabel.width / 2,\n pointWidth = point.pointWidth,\n halfWidth = pointWidth ? pointWidth / 2 : 0;\n dataLabel.startXPos = inverted ?\n alignOptions.x :\n (reversed ?\n -labelCenter - halfWidth :\n xAxis.width - labelCenter + halfWidth);\n dataLabel.startYPos = inverted ?\n (reversed ?\n this.yAxis.height - labelCenter + halfWidth :\n -labelCenter - halfWidth) : alignOptions.y;\n // We need to handle visibility in case of sorting point outside plot\n // area\n if (!isInside) {\n dataLabel\n .attr({ opacity: 1 })\n .animate({ opacity: 0 }, void 0, dataLabel.hide);\n }\n else if (dataLabel.visibility === 'hidden') {\n dataLabel.show();\n dataLabel\n .attr({ opacity: 0 })\n .animate({ opacity: 1 });\n }\n // Save start position on first render, but do not change position\n if (!chart.hasRendered) {\n return;\n }\n // Set start position\n if (isNew) {\n dataLabel.attr({ x: dataLabel.startXPos, y: dataLabel.startYPos });\n }\n dataLabel.placed = true;\n }\n })(DataLabel || (DataLabel = {}));\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * Callback JavaScript function to format the data label as a string. Note that\n * if a `format` is defined, the format takes precedence and the formatter is\n * ignored.\n *\n * @callback Highcharts.DataLabelsFormatterCallbackFunction\n *\n * @param {Highcharts.PointLabelObject} this\n * Data label context to format\n *\n * @param {Highcharts.DataLabelsOptions} options\n * [API options](/highcharts/plotOptions.series.dataLabels) of the data label\n *\n * @return {number|string|null|undefined}\n * Formatted data label text\n */\n /**\n * Values for handling data labels that flow outside the plot area.\n *\n * @typedef {\"allow\"|\"justify\"} Highcharts.DataLabelsOverflowValue\n */\n ''; // keeps doclets above in JS file\n\n return DataLabel;\n });\n _registerModule(_modules, 'Series/Column/ColumnDataLabel.js', [_modules['Core/Series/DataLabel.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (DataLabel, SeriesRegistry, U) {\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 var Series = SeriesRegistry.series;\n var merge = U.merge,\n pick = U.pick;\n /* *\n *\n * Composition\n *\n * */\n var ColumnDataLabel;\n (function (ColumnDataLabel) {\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Override the basic data label alignment by adjusting for the position of\n * the column.\n * @private\n */\n function alignDataLabel(point, dataLabel, options, alignTo, isNew) {\n var inverted = this.chart.inverted,\n series = point.series,\n xLen = (series.xAxis ? series.xAxis.len : this.chart.plotSizeX) || 0,\n yLen = (series.yAxis ? series.yAxis.len : this.chart.plotSizeY) || 0, \n // data label box for alignment\n dlBox = point.dlBox || point.shapeArgs,\n below = pick(point.below, // range series\n point.plotY >\n pick(this.translatedThreshold,\n yLen)), \n // draw it inside the box?\n inside = pick(options.inside, !!this.options.stacking),\n overshoot;\n // Align to the column itself, or the top of it\n if (dlBox) { // Area range uses this method but not alignTo\n alignTo = merge(dlBox);\n if (alignTo.y < 0) {\n alignTo.height += alignTo.y;\n alignTo.y = 0;\n }\n // If parts of the box overshoots outside the plot area, modify the\n // box to center the label inside\n overshoot = alignTo.y + alignTo.height - yLen;\n if (overshoot > 0 && overshoot < alignTo.height) {\n alignTo.height -= overshoot;\n }\n if (inverted) {\n alignTo = {\n x: yLen - alignTo.y - alignTo.height,\n y: xLen - alignTo.x - alignTo.width,\n width: alignTo.height,\n height: alignTo.width\n };\n }\n // Compute the alignment box\n if (!inside) {\n if (inverted) {\n alignTo.x += below ? 0 : alignTo.width;\n alignTo.width = 0;\n }\n else {\n alignTo.y += below ? alignTo.height : 0;\n alignTo.height = 0;\n }\n }\n }\n // When alignment is undefined (typically columns and bars), display the\n // individual point below or above the point depending on the threshold\n options.align = pick(options.align, !inverted || inside ? 'center' : below ? 'right' : 'left');\n options.verticalAlign = pick(options.verticalAlign, inverted || inside ? 'middle' : below ? 'top' : 'bottom');\n // Call the parent method\n Series.prototype.alignDataLabel.call(this, point, dataLabel, options, alignTo, isNew);\n // If label was justified and we have contrast, set it:\n if (options.inside && point.contrastColor) {\n dataLabel.css({\n color: point.contrastColor\n });\n }\n }\n /** @private */\n function compose(ColumnSeriesClass) {\n DataLabel.compose(Series);\n if (composedClasses.indexOf(ColumnSeriesClass) === -1) {\n composedClasses.push(ColumnSeriesClass);\n ColumnSeriesClass.prototype.alignDataLabel = alignDataLabel;\n }\n }\n ColumnDataLabel.compose = compose;\n })(ColumnDataLabel || (ColumnDataLabel = {}));\n /* *\n *\n * Default Export\n *\n * */\n\n return ColumnDataLabel;\n });\n _registerModule(_modules, 'Series/Bar/BarSeries.js', [_modules['Series/Column/ColumnSeries.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (ColumnSeries, SeriesRegistry, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var extend = U.extend,\n merge = U.merge;\n /* *\n *\n * Class\n *\n * */\n /**\n * Bar series type.\n *\n * @private\n * @class\n * @name Highcharts.seriesTypes.bar\n *\n * @augments Highcharts.Series\n */\n var BarSeries = /** @class */ (function (_super) {\n __extends(BarSeries, _super);\n function BarSeries() {\n /* *\n *\n * Static Properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n /* *\n *\n * Properties\n *\n * */\n _this.data = void 0;\n _this.options = void 0;\n _this.points = void 0;\n return _this;\n }\n /**\n * A bar series is a special type of column series where the columns are\n * horizontal.\n *\n * @sample highcharts/demo/bar-basic/\n * Bar chart\n *\n * @extends plotOptions.column\n * @product highcharts\n * @optionparent plotOptions.bar\n */\n BarSeries.defaultOptions = merge(ColumnSeries.defaultOptions, {\n // nothing here yet\n });\n return BarSeries;\n }(ColumnSeries));\n extend(BarSeries.prototype, {\n inverted: true\n });\n SeriesRegistry.registerSeriesType('bar', BarSeries);\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Options\n *\n * */\n /**\n * A `bar` series. If the [type](#series.bar.type) option is not specified,\n * it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.bar\n * @excluding connectNulls, dashStyle, dataParser, dataURL, gapSize, gapUnit,\n * linecap, lineWidth, marker, connectEnds, step\n * @product highcharts\n * @apioption series.bar\n */\n /**\n * An array of data points for the series. For the `bar` series type,\n * points can be given in the following ways:\n *\n * 1. An array of numerical values. In this case, the numerical values will be\n * interpreted as `y` options. The `x` values will be automatically\n * calculated, either starting at 0 and incremented by 1, or from\n * `pointStart` and `pointInterval` given in the series options. If the axis\n * has categories, these will be used. Example:\n * ```js\n * data: [0, 5, 3, 5]\n * ```\n *\n * 2. An array of arrays with 2 values. In this case, the values correspond to\n * `x,y`. If the first value is a string, it is applied as the name of the\n * point, and the `x` value is inferred.\n * ```js\n * data: [\n * [0, 5],\n * [1, 10],\n * [2, 3]\n * ]\n * ```\n *\n * 3. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.bar.turboThreshold), this option is not\n * available.\n * ```js\n * data: [{\n * x: 1,\n * y: 1,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * y: 10,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * Numerical values\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @type {Array|null|*>}\n * @extends series.column.data\n * @product highcharts\n * @apioption series.bar.data\n */\n /**\n * @excluding halo,lineWidth,lineWidthPlus,marker\n * @product highcharts highstock\n * @apioption series.bar.states.hover\n */\n /**\n * @excluding halo,lineWidth,lineWidthPlus,marker\n * @product highcharts highstock\n * @apioption series.bar.states.select\n */\n ''; // gets doclets above into transpilat\n\n return BarSeries;\n });\n _registerModule(_modules, 'Series/Scatter/ScatterSeriesDefaults.js', [], function () {\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 /* *\n *\n * API Options\n *\n * */\n /**\n * A scatter plot uses cartesian coordinates to display values for two\n * variables for a set of data.\n *\n * @sample {highcharts} highcharts/demo/scatter/\n * Scatter plot\n *\n * @extends plotOptions.line\n * @excluding cropThreshold, pointPlacement, shadow, useOhlcData\n * @product highcharts highstock\n * @optionparent plotOptions.scatter\n */\n var ScatterSeriesDefaults = {\n /**\n * The width of the line connecting the data points.\n *\n * @sample {highcharts} highcharts/plotoptions/scatter-linewidth-none/\n * 0 by default\n * @sample {highcharts} highcharts/plotoptions/scatter-linewidth-1/\n * 1px\n *\n * @product highcharts highstock\n */\n lineWidth: 0,\n findNearestPointBy: 'xy',\n /**\n * Apply a jitter effect for the rendered markers. When plotting\n * discrete values,\n a little random noise may help telling the points\n * apart. The jitter setting applies a random displacement of up to `n`\n * axis units in either direction. So for example on a horizontal X\n * axis,\n setting the `jitter.x` to 0.24 will render the point in a\n * random position between 0.24 units to the left and 0.24 units to the\n * right of the true axis position. On a category axis,\n setting it to\n * 0.5 will fill up the bin and make the data appear continuous.\n *\n * When rendered on top of a box plot or a column series,\n a jitter value\n * of 0.24 will correspond to the underlying series' default\n * [groupPadding](\n * https://api.highcharts.com/highcharts/plotOptions.column.groupPadding)\n * and [pointPadding](\n * https://api.highcharts.com/highcharts/plotOptions.column.pointPadding)\n * settings.\n *\n * @sample {highcharts} highcharts/demo/scatter-jitter\n * Jitter on a scatter plot\n *\n * @sample {highcharts} highcharts/series-scatter/jitter-boxplot\n * Jittered scatter plot on top of a box plot\n *\n * @product highcharts highstock\n * @since 7.0.2\n */\n jitter: {\n /**\n * The maximal X offset for the random jitter effect.\n */\n x: 0,\n /**\n * The maximal Y offset for the random jitter effect.\n */\n y: 0\n },\n marker: {\n enabled: true // Overrides auto-enabling in line series (#3647)\n },\n /**\n * Sticky tracking of mouse events. When true,\n the `mouseOut` event\n * on a series isn't triggered until the mouse moves over another\n * series,\n or out of the plot area. When false,\n the `mouseOut` event on\n * a series is triggered when the mouse leaves the area around the\n * series' graph or markers. This also implies the tooltip. When\n * `stickyTracking` is false and `tooltip.shared` is false,\n the tooltip\n * will be hidden when moving the mouse between series.\n *\n * @type {boolean}\n * @default false\n * @product highcharts highstock highmaps\n * @apioption plotOptions.scatter.stickyTracking\n */\n /**\n * A configuration object for the tooltip rendering of each single\n * series. Properties are inherited from [tooltip](#tooltip).\n * Overridable properties are `headerFormat`,\n `pointFormat`,\n * `yDecimals`,\n `xDateFormat`,\n `yPrefix` and `ySuffix`. Unlike other\n * series,\n in a scatter plot the series.name by default shows in the\n * headerFormat and point.x and point.y in the pointFormat.\n *\n * @product highcharts highstock highmaps\n */\n tooltip: {\n /**\n * @product highcharts highstock\n */\n headerFormat: '\\u25CF ' +\n ' {series.name}
',\n pointFormat: 'x: {point.x}
y: {point.y}
'\n }\n };\n /**\n * A `scatter` series. If the [type](#series.scatter.type) option is\n * not specified, it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.scatter\n * @excluding cropThreshold, dataParser, dataURL, useOhlcData\n * @product highcharts highstock\n * @apioption series.scatter\n */\n /**\n * An array of data points for the series. For the `scatter` series\n * type, points can be given in the following ways:\n *\n * 1. An array of numerical values. In this case, the numerical values will be\n * interpreted as `y` options. The `x` values will be automatically\n * calculated, either starting at 0 and incremented by 1, or from\n * `pointStart` and `pointInterval` given in the series options. If the axis\n * has categories, these will be used. Example:\n * ```js\n * data: [0, 5, 3, 5]\n * ```\n *\n * 2. An array of arrays with 2 values. In this case, the values correspond to\n * `x,y`. If the first value is a string, it is applied as the name of the\n * point, and the `x` value is inferred.\n * ```js\n * data: [\n * [0, 0],\n * [1, 8],\n * [2, 9]\n * ]\n * ```\n *\n * 3. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.scatter.turboThreshold), this option is not\n * available.\n * ```js\n * data: [{\n * x: 1,\n * y: 2,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * y: 4,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * Numerical values\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @type {Array|null|*>}\n * @extends series.line.data\n * @product highcharts highstock\n * @apioption series.scatter.data\n */\n ''; // keeps doclets above in JS file\n /* *\n *\n * Default Export\n *\n * */\n\n return ScatterSeriesDefaults;\n });\n _registerModule(_modules, 'Series/Scatter/ScatterSeries.js', [_modules['Series/Scatter/ScatterSeriesDefaults.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (ScatterSeriesDefaults, SeriesRegistry, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var _a = SeriesRegistry.seriesTypes,\n ColumnSeries = _a.column,\n LineSeries = _a.line;\n var addEvent = U.addEvent,\n extend = U.extend,\n merge = U.merge;\n /* *\n *\n * Class\n *\n * */\n /**\n * Scatter series type.\n *\n * @private\n */\n var ScatterSeries = /** @class */ (function (_super) {\n __extends(ScatterSeries, _super);\n function ScatterSeries() {\n /* *\n *\n * Static Properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n /* *\n *\n * Properties\n *\n * */\n _this.data = void 0;\n _this.options = void 0;\n _this.points = void 0;\n return _this;\n /* eslint-enable valid-jsdoc */\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Optionally add the jitter effect.\n * @private\n */\n ScatterSeries.prototype.applyJitter = function () {\n var series = this,\n jitter = this.options.jitter,\n len = this.points.length;\n /**\n * Return a repeatable, pseudo-random number based on an integer\n * seed.\n * @private\n */\n function unrandom(seed) {\n var rand = Math.sin(seed) * 10000;\n return rand - Math.floor(rand);\n }\n if (jitter) {\n this.points.forEach(function (point, i) {\n ['x', 'y'].forEach(function (dim, j) {\n var axis,\n plotProp = 'plot' + dim.toUpperCase(),\n min,\n max,\n translatedJitter;\n if (jitter[dim] && !point.isNull) {\n axis = series[dim + 'Axis'];\n translatedJitter =\n jitter[dim] * axis.transA;\n if (axis && !axis.isLog) {\n // Identify the outer bounds of the jitter range\n min = Math.max(0, point[plotProp] - translatedJitter);\n max = Math.min(axis.len, point[plotProp] + translatedJitter);\n // Find a random position within this range\n point[plotProp] = min +\n (max - min) * unrandom(i + j * len);\n // Update clientX for the tooltip k-d-tree\n if (dim === 'x') {\n point.clientX = point.plotX;\n }\n }\n }\n });\n });\n }\n };\n /**\n * @private\n */\n ScatterSeries.prototype.drawGraph = function () {\n if (this.options.lineWidth) {\n _super.prototype.drawGraph.call(this);\n }\n else if (this.graph) {\n this.graph = this.graph.destroy();\n }\n };\n ScatterSeries.defaultOptions = merge(LineSeries.defaultOptions, ScatterSeriesDefaults);\n return ScatterSeries;\n }(LineSeries));\n extend(ScatterSeries.prototype, {\n drawTracker: ColumnSeries.prototype.drawTracker,\n sorted: false,\n requireSorting: false,\n noSharedTooltip: true,\n trackerGroups: ['group', 'markerGroup', 'dataLabelsGroup'],\n takeOrdinalPosition: false // #2342\n });\n /* *\n *\n * Events\n *\n * */\n /* eslint-disable no-invalid-this */\n addEvent(ScatterSeries, 'afterTranslate', function () {\n this.applyJitter();\n });\n SeriesRegistry.registerSeriesType('scatter', ScatterSeries);\n /* *\n *\n * Default Export\n *\n * */\n\n return ScatterSeries;\n });\n _registerModule(_modules, 'Series/CenteredUtilities.js', [_modules['Core/Globals.js'], _modules['Core/Series/Series.js'], _modules['Core/Utilities.js']], function (H, Series, U) {\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 var deg2rad = H.deg2rad;\n var fireEvent = U.fireEvent,\n isNumber = U.isNumber,\n pick = U.pick,\n relativeLength = U.relativeLength;\n /**\n * @private\n */\n var CenteredUtilities;\n (function (CenteredUtilities) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Get the center of the pie based on the size and center options relative\n * to the plot area. Borrowed by the polar and gauge series types.\n *\n * @private\n * @function Highcharts.CenteredSeriesMixin.getCenter\n */\n function getCenter() {\n var options = this.options,\n chart = this.chart,\n slicingRoom = 2 * (options.slicedOffset || 0),\n plotWidth = chart.plotWidth - 2 * slicingRoom,\n plotHeight = chart.plotHeight - 2 * slicingRoom,\n centerOption = options.center,\n smallestSize = Math.min(plotWidth,\n plotHeight),\n thickness = options.thickness;\n var handleSlicingRoom,\n size = options.size,\n innerSize = options.innerSize || 0,\n i,\n value;\n if (typeof size === 'string') {\n size = parseFloat(size);\n }\n if (typeof innerSize === 'string') {\n innerSize = parseFloat(innerSize);\n }\n var positions = [\n pick(centerOption[0], '50%'),\n pick(centerOption[1], '50%'),\n // Prevent from negative values\n pick(size && size < 0 ? void 0 : options.size, '100%'),\n pick(innerSize && innerSize < 0 ? void 0 : options.innerSize || 0, '0%')\n ];\n // No need for inner size in angular (gauges) series but still required\n // for pie series\n if (chart.angular && !(this instanceof Series)) {\n positions[3] = 0;\n }\n for (i = 0; i < 4; ++i) {\n value = positions[i];\n handleSlicingRoom = i < 2 || (i === 2 && /%$/.test(value));\n // i == 0: centerX, relative to width\n // i == 1: centerY, relative to height\n // i == 2: size, relative to smallestSize\n // i == 3: innerSize, relative to size\n positions[i] = relativeLength(value, [plotWidth, plotHeight, smallestSize, positions[2]][i]) + (handleSlicingRoom ? slicingRoom : 0);\n }\n // innerSize cannot be larger than size (#3632)\n if (positions[3] > positions[2]) {\n positions[3] = positions[2];\n }\n // thickness overrides innerSize, need to be less than pie size (#6647)\n if (isNumber(thickness) &&\n thickness * 2 < positions[2] && thickness > 0) {\n positions[3] = positions[2] - thickness * 2;\n }\n fireEvent(this, 'afterGetCenter', { positions: positions });\n return positions;\n }\n CenteredUtilities.getCenter = getCenter;\n /**\n * getStartAndEndRadians - Calculates start and end angles in radians.\n * Used in series types such as pie and sunburst.\n *\n * @private\n * @function Highcharts.CenteredSeriesMixin.getStartAndEndRadians\n *\n * @param {number} [start]\n * Start angle in degrees.\n *\n * @param {number} [end]\n * Start angle in degrees.\n *\n * @return {Highcharts.RadianAngles}\n * Returns an object containing start and end angles as radians.\n */\n function getStartAndEndRadians(start, end) {\n var startAngle = isNumber(start) ? start : 0, // must be a number\n endAngle = ((isNumber(end) && // must be a number\n end > startAngle && // must be larger than the start angle\n // difference must be less than 360 degrees\n (end - startAngle) < 360) ?\n end :\n startAngle + 360),\n correction = -90;\n return {\n start: deg2rad * (startAngle + correction),\n end: deg2rad * (endAngle + correction)\n };\n }\n CenteredUtilities.getStartAndEndRadians = getStartAndEndRadians;\n })(CenteredUtilities || (CenteredUtilities = {}));\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * @private\n * @interface Highcharts.RadianAngles\n */ /**\n * @name Highcharts.RadianAngles#end\n * @type {number}\n */ /**\n * @name Highcharts.RadianAngles#start\n * @type {number}\n */\n ''; // keeps doclets above in JS file\n\n return CenteredUtilities;\n });\n _registerModule(_modules, 'Series/Pie/PiePoint.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Series/Point.js'], _modules['Core/Utilities.js']], function (A, Point, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var setAnimation = A.setAnimation;\n var addEvent = U.addEvent,\n defined = U.defined,\n extend = U.extend,\n isNumber = U.isNumber,\n pick = U.pick,\n relativeLength = U.relativeLength;\n /* *\n *\n * Class\n *\n * */\n var PiePoint = /** @class */ (function (_super) {\n __extends(PiePoint, _super);\n function PiePoint() {\n /* *\n *\n * Properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n _this.labelDistance = void 0;\n _this.options = void 0;\n _this.series = void 0;\n return _this;\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Extendable method for getting the path of the connector between the\n * data label and the pie slice.\n * @private\n */\n PiePoint.prototype.getConnectorPath = function () {\n var labelPosition = this.labelPosition,\n options = this.series.options.dataLabels,\n predefinedShapes = this.connectorShapes;\n var connectorShape = options.connectorShape;\n // find out whether to use the predefined shape\n if (predefinedShapes[connectorShape]) {\n connectorShape = predefinedShapes[connectorShape];\n }\n return connectorShape.call(this, {\n // pass simplified label position object for user's convenience\n x: labelPosition.final.x,\n y: labelPosition.final.y,\n alignment: labelPosition.alignment\n }, labelPosition.connectorPosition, options);\n };\n /**\n * @private\n */\n PiePoint.prototype.getTranslate = function () {\n return this.sliced ? this.slicedTranslation : {\n translateX: 0,\n translateY: 0\n };\n };\n /**\n * @private\n */\n PiePoint.prototype.haloPath = function (size) {\n var shapeArgs = this.shapeArgs;\n return this.sliced || !this.visible ?\n [] :\n this.series.chart.renderer.symbols.arc(shapeArgs.x, shapeArgs.y, shapeArgs.r + size, shapeArgs.r + size, {\n // Substract 1px to ensure the background is not bleeding\n // through between the halo and the slice (#7495).\n innerR: shapeArgs.r - 1,\n start: shapeArgs.start,\n end: shapeArgs.end\n });\n };\n /**\n * Initialize the pie slice.\n * @private\n */\n PiePoint.prototype.init = function () {\n var _this = this;\n _super.prototype.init.apply(this, arguments);\n this.name = pick(this.name, 'Slice');\n // add event listener for select\n var toggleSlice = function (e) {\n _this.slice(e.type === 'select');\n };\n addEvent(this, 'select', toggleSlice);\n addEvent(this, 'unselect', toggleSlice);\n return this;\n };\n /**\n * Negative points are not valid (#1530, #3623, #5322)\n * @private\n */\n PiePoint.prototype.isValid = function () {\n return isNumber(this.y) && this.y >= 0;\n };\n /**\n * Toggle the visibility of a pie slice or other data point. Note that this\n * method is available only for some series, like pie, treemap and sunburst.\n *\n * @function Highcharts.Point#setVisible\n *\n * @param {boolean} [vis]\n * True to show the pie slice or other data point, false to hide. If\n * undefined, the visibility is toggled.\n *\n * @param {boolean} [redraw] Whether to redraw the chart after the point is\n * altered. If doing more operations on the chart, it is a good idea to set\n * redraw to false and call {@link Chart#redraw|chart.redraw()} after.\n *\n */\n PiePoint.prototype.setVisible = function (vis, redraw) {\n var _this = this;\n var series = this.series,\n chart = series.chart,\n ignoreHiddenPoint = series.options.ignoreHiddenPoint;\n redraw = pick(redraw, ignoreHiddenPoint);\n if (vis !== this.visible) {\n // If called without an argument, toggle visibility\n this.visible = this.options.visible = vis =\n typeof vis === 'undefined' ? !this.visible : vis;\n // update userOptions.data\n series.options.data[series.data.indexOf(this)] =\n this.options;\n // Show and hide associated elements. This is performed\n // regardless of redraw or not, because chart.redraw only\n // handles full series.\n ['graphic', 'dataLabel', 'connector', 'shadowGroup'].forEach(function (key) {\n if (_this[key]) {\n _this[key][vis ? 'show' : 'hide'](vis);\n }\n });\n if (this.legendItem) {\n chart.legend.colorizeItem(this, vis);\n }\n // #4170, hide halo after hiding point\n if (!vis && this.state === 'hover') {\n this.setState('');\n }\n // Handle ignore hidden slices\n if (ignoreHiddenPoint) {\n series.isDirty = true;\n }\n if (redraw) {\n chart.redraw();\n }\n }\n };\n /**\n * Set or toggle whether the slice is cut out from the pie.\n * @private\n *\n * @param {boolean} sliced\n * When undefined, the slice state is toggled.\n *\n * @param {boolean} [redraw]\n * Whether to redraw the chart. True by default.\n *\n * @param {boolean|Partial} [animation]\n * Animation options.\n */\n PiePoint.prototype.slice = function (sliced, redraw, animation) {\n var series = this.series,\n chart = series.chart;\n setAnimation(animation, chart);\n // redraw is true by default\n redraw = pick(redraw, true);\n /**\n * Pie series only. Whether to display a slice offset from the\n * center.\n * @name Highcharts.Point#sliced\n * @type {boolean|undefined}\n */\n // if called without an argument, toggle\n this.sliced = this.options.sliced = sliced =\n defined(sliced) ? sliced : !this.sliced;\n // update userOptions.data\n series.options.data[series.data.indexOf(this)] =\n this.options;\n if (this.graphic) {\n this.graphic.animate(this.getTranslate());\n }\n if (this.shadowGroup) {\n this.shadowGroup.animate(this.getTranslate());\n }\n };\n return PiePoint;\n }(Point));\n extend(PiePoint.prototype, {\n connectorShapes: {\n // only one available before v7.0.0\n fixedOffset: function (labelPosition, connectorPosition, options) {\n var breakAt = connectorPosition.breakAt,\n touchingSliceAt = connectorPosition.touchingSliceAt,\n lineSegment = options.softConnector ? [\n 'C',\n // 1st control point (of the curve)\n labelPosition.x +\n // 5 gives the connector a little horizontal bend\n (labelPosition.alignment === 'left' ? -5 : 5),\n labelPosition.y,\n 2 * breakAt.x - touchingSliceAt.x,\n 2 * breakAt.y - touchingSliceAt.y,\n breakAt.x,\n breakAt.y //\n ] : [\n 'L',\n breakAt.x,\n breakAt.y\n ];\n // assemble the path\n return ([\n ['M', labelPosition.x, labelPosition.y],\n lineSegment,\n ['L', touchingSliceAt.x, touchingSliceAt.y]\n ]);\n },\n straight: function (labelPosition, connectorPosition) {\n var touchingSliceAt = connectorPosition.touchingSliceAt;\n // direct line to the slice\n return [\n ['M', labelPosition.x, labelPosition.y],\n ['L', touchingSliceAt.x, touchingSliceAt.y]\n ];\n },\n crookedLine: function (labelPosition, connectorPosition, options) {\n var touchingSliceAt = connectorPosition.touchingSliceAt,\n series = this.series,\n pieCenterX = series.center[0],\n plotWidth = series.chart.plotWidth,\n plotLeft = series.chart.plotLeft,\n alignment = labelPosition.alignment,\n radius = this.shapeArgs.r,\n crookDistance = relativeLength(// % to fraction\n options.crookDistance, 1),\n crookX = alignment === 'left' ?\n pieCenterX + radius + (plotWidth + plotLeft -\n pieCenterX - radius) * (1 - crookDistance) :\n plotLeft + (pieCenterX - radius) * crookDistance,\n segmentWithCrook = [\n 'L',\n crookX,\n labelPosition.y\n ];\n var useCrook = true;\n // crookedLine formula doesn't make sense if the path overlaps\n // the label - use straight line instead in that case\n if (alignment === 'left' ?\n (crookX > labelPosition.x || crookX < touchingSliceAt.x) :\n (crookX < labelPosition.x || crookX > touchingSliceAt.x)) {\n useCrook = false;\n }\n // assemble the path\n var path = [['M',\n labelPosition.x,\n labelPosition.y]];\n if (useCrook) {\n path.push(segmentWithCrook);\n }\n path.push(['L', touchingSliceAt.x, touchingSliceAt.y]);\n return path;\n }\n }\n });\n /* *\n *\n * Default Export\n *\n * */\n\n return PiePoint;\n });\n _registerModule(_modules, 'Series/Pie/PieSeriesDefaults.js', [], function () {\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 /* *\n *\n * API Options\n *\n * */\n /**\n * A pie chart is a circular graphic which is divided into slices to\n * illustrate numerical proportion.\n *\n * @sample highcharts/demo/pie-basic/\n * Pie chart\n *\n * @extends plotOptions.line\n * @excluding animationLimit, boostThreshold, connectEnds, connectNulls,\n * cropThreshold, dashStyle, dataSorting, dragDrop,\n * findNearestPointBy, getExtremesFromAll, label, lineWidth,\n * linkedTo, marker, negativeColor, pointInterval,\n * pointIntervalUnit, pointPlacement, pointStart,\n * softThreshold, stacking, step, threshold, turboThreshold,\n * zoneAxis, zones, dataSorting, boostBlending\n * @product highcharts highmaps\n * @optionparent plotOptions.pie\n *\n * @private\n */\n var PieSeriesDefaults = {\n /**\n * @excluding legendItemClick\n * @apioption plotOptions.pie.events\n */\n /**\n * Fires when the checkbox next to the point name in the legend is\n * clicked. One parameter, event, is passed to the function. The state\n * of the checkbox is found by event.checked. The checked item is found\n * by event.item. Return false to prevent the default action which is to\n * toggle the select state of the series.\n *\n * @sample {highcharts} highcharts/plotoptions/series-events-checkboxclick/\n * Alert checkbox status\n *\n * @type {Function}\n * @since 1.2.0\n * @product highcharts highmaps\n * @context Highcharts.Point\n * @apioption plotOptions.pie.events.checkboxClick\n */\n /**\n * Fires when the legend item belonging to the pie point (slice) is\n * clicked. The `this` keyword refers to the point itself. One\n * parameter, `event`, is passed to the function, containing common\n * event information. The default action is to toggle the visibility of\n * the point. This can be prevented by calling `event.preventDefault()`.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-point-events-legenditemclick/\n * Confirm toggle visibility\n *\n * @type {Highcharts.PointLegendItemClickCallbackFunction}\n * @since 1.2.0\n * @product highcharts highmaps\n * @apioption plotOptions.pie.point.events.legendItemClick\n */\n /**\n * The center of the pie chart relative to the plot area. Can be\n * percentages or pixel values. The default behaviour (as of 3.0) is to\n * center the pie so that all slices and data labels are within the plot\n * area. As a consequence, the pie may actually jump around in a chart\n * with dynamic values, as the data labels move. In that case, the\n * center should be explicitly set, for example to `[\"50%\", \"50%\"]`.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-center/\n * Centered at 100, 100\n *\n * @type {Array<(number|string|null),(number|string|null)>}\n * @default [null, null]\n * @product highcharts highmaps\n *\n * @private\n */\n center: [null, null],\n /**\n * The color of the pie series. A pie series is represented as an empty\n * circle if the total sum of its values is 0. Use this property to\n * define the color of its border.\n *\n * In styled mode, the color can be defined by the\n * [colorIndex](#plotOptions.series.colorIndex) option. Also, the series\n * color can be set with the `.highcharts-series`,\n * `.highcharts-color-{n}`, `.highcharts-{type}-series` or\n * `.highcharts-series-{n}` class, or individual classes given by the\n * `className` option.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-emptyseries/\n * Empty pie series\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @default #cccccc\n * @apioption plotOptions.pie.color\n */\n /**\n * @product highcharts\n *\n * @private\n */\n clip: false,\n /**\n * @ignore-option\n *\n * @private\n */\n colorByPoint: true,\n /**\n * A series specific or series type specific color set to use instead\n * of the global [colors](#colors).\n *\n * @sample {highcharts} highcharts/demo/pie-monochrome/\n * Set default colors for all pies\n *\n * @type {Array}\n * @since 3.0\n * @product highcharts highmaps\n * @apioption plotOptions.pie.colors\n */\n /**\n * @declare Highcharts.SeriesPieDataLabelsOptionsObject\n * @extends plotOptions.series.dataLabels\n * @excluding align, allowOverlap, inside, staggerLines, step\n * @private\n */\n dataLabels: {\n /**\n * Alignment method for data labels. Possible values are:\n *\n * - `plotEdges`: Each label touches the nearest vertical edge of\n * the plot area.\n *\n * - `connectors`: Connectors have the same x position and the\n * widest label of each half (left & right) touches the nearest\n * vertical edge of the plot area.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-alignto-connectors/\n * alignTo: connectors\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-alignto-plotedges/\n * alignTo: plotEdges\n *\n * @type {string}\n * @since 7.0.0\n * @product highcharts highmaps\n * @apioption plotOptions.pie.dataLabels.alignTo\n */\n allowOverlap: true,\n /**\n * The color of the line connecting the data label to the pie slice.\n * The default color is the same as the point's color.\n *\n * In styled mode, the connector stroke is given in the\n * `.highcharts-data-label-connector` class.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-connectorcolor/\n * Blue connectors\n * @sample {highcharts} highcharts/css/pie-point/\n * Styled connectors\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 2.1\n * @product highcharts highmaps\n * @apioption plotOptions.pie.dataLabels.connectorColor\n */\n /**\n * The distance from the data label to the connector. Note that\n * data labels also have a default `padding`, so in order for the\n * connector to touch the text, the `padding` must also be 0.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-connectorpadding/\n * No padding\n *\n * @since 2.1\n * @product highcharts highmaps\n */\n connectorPadding: 5,\n /**\n * Specifies the method that is used to generate the connector path.\n * Highcharts provides 3 built-in connector shapes: `'fixedOffset'`\n * (default), `'straight'` and `'crookedLine'`. Using\n * `'crookedLine'` has the most sense (in most of the cases) when\n * `'alignTo'` is set.\n *\n * Users can provide their own method by passing a function instead\n * of a String. 3 arguments are passed to the callback:\n *\n * - Object that holds the information about the coordinates of the\n * label (`x` & `y` properties) and how the label is located in\n * relation to the pie (`alignment` property). `alignment` can by\n * one of the following:\n * `'left'` (pie on the left side of the data label),\n * `'right'` (pie on the right side of the data label) or\n * `'center'` (data label overlaps the pie).\n *\n * - Object that holds the information about the position of the\n * connector. Its `touchingSliceAt` porperty tells the position\n * of the place where the connector touches the slice.\n *\n * - Data label options\n *\n * The function has to return an SVG path definition in array form\n * (see the example).\n *\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-connectorshape-string/\n * connectorShape is a String\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-connectorshape-function/\n * connectorShape is a function\n *\n * @type {string|Function}\n * @since 7.0.0\n * @product highcharts highmaps\n */\n connectorShape: 'fixedOffset',\n /**\n * The width of the line connecting the data label to the pie slice.\n *\n * In styled mode, the connector stroke width is given in the\n * `.highcharts-data-label-connector` class.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-connectorwidth-disabled/\n * Disable the connector\n * @sample {highcharts} highcharts/css/pie-point/\n * Styled connectors\n *\n * @type {number}\n * @default 1\n * @since 2.1\n * @product highcharts highmaps\n * @apioption plotOptions.pie.dataLabels.connectorWidth\n */\n /**\n * Works only if `connectorShape` is `'crookedLine'`. It defines how\n * far from the vertical plot edge the coonnector path should be\n * crooked.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-crookdistance/\n * crookDistance set to 90%\n *\n * @since 7.0.0\n * @product highcharts highmaps\n */\n crookDistance: '70%',\n /**\n * The distance of the data label from the pie's edge. Negative\n * numbers put the data label on top of the pie slices. Can also be\n * defined as a percentage of pie's radius. Connectors are only\n * shown for data labels outside the pie.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-distance/\n * Data labels on top of the pie\n *\n * @type {number|string}\n * @since 2.1\n * @product highcharts highmaps\n */\n distance: 30,\n enabled: true,\n /**\n * A\n * [format string](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)\n * for the data label. Available variables are the same as for\n * `formatter`.\n *\n * @sample {highcharts} highcharts/plotoptions/series-datalabels-format/\n * Add a unit\n *\n * @type {string}\n * @default undefined\n * @since 3.0\n * @apioption plotOptions.pie.dataLabels.format\n */\n // eslint-disable-next-line valid-jsdoc\n /**\n * Callback JavaScript function to format the data label. Note that\n * if a `format` is defined, the format takes precedence and the\n * formatter is ignored.\n *\n * @type {Highcharts.DataLabelsFormatterCallbackFunction}\n * @default function () { return this.point.isNull ? void 0 : this.point.name; }\n */\n formatter: function () {\n return this.point.isNull ? void 0 : this.point.name;\n },\n /**\n * Whether to render the connector as a soft arc or a line with\n * sharp break. Works only if `connectorShape` equals to\n * `fixedOffset`.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-softconnector-true/\n * Soft\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-softconnector-false/\n * Non soft\n *\n * @since 2.1.7\n * @product highcharts highmaps\n */\n softConnector: true,\n /**\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-overflow\n * Long labels truncated with an ellipsis\n * @sample {highcharts} highcharts/plotoptions/pie-datalabels-overflow-wrap\n * Long labels are wrapped\n *\n * @type {Highcharts.CSSObject}\n * @apioption plotOptions.pie.dataLabels.style\n */\n x: 0\n },\n /**\n * If the total sum of the pie's values is 0, the series is represented\n * as an empty circle . The `fillColor` option defines the color of that\n * circle. Use [pie.borderWidth](#plotOptions.pie.borderWidth) to set\n * the border thickness.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-emptyseries/\n * Empty pie series\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @private\n */\n fillColor: void 0,\n /**\n * The end angle of the pie in degrees where 0 is top and 90 is right.\n * Defaults to `startAngle` plus 360.\n *\n * @sample {highcharts} highcharts/demo/pie-semi-circle/\n * Semi-circle donut\n *\n * @type {number}\n * @since 1.3.6\n * @product highcharts highmaps\n * @apioption plotOptions.pie.endAngle\n */\n /**\n * Thickness describing the ring size for a donut type chart,\n * overriding [innerSize](#plotOptions.pie.innerSize).\n *\n * @type {number}\n * @default undefined\n * @product highcharts\n * @since 10.1.0\n * @apioption plotOptions.pie.thickness\n * @private\n */\n /**\n * Equivalent to [chart.ignoreHiddenSeries](#chart.ignoreHiddenSeries),\n * this option tells whether the series shall be redrawn as if the\n * hidden point were `null`.\n *\n * The default value changed from `false` to `true` with Highcharts\n * 3.0.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-ignorehiddenpoint/\n * True, the hiddden point is ignored\n *\n * @since 2.3.0\n * @product highcharts highmaps\n *\n * @private\n */\n ignoreHiddenPoint: true,\n /**\n * @ignore-option\n *\n * @private\n */\n inactiveOtherPoints: true,\n /**\n * The size of the inner diameter for the pie. A size greater than 0\n * renders a donut chart. Can be a percentage or pixel value.\n * Percentages are relative to the pie size. Pixel values are given as\n * integers. Setting overridden by thickness.\n *\n *\n * Note: in Highcharts < 4.1.2, the percentage was relative to the plot\n * area, not the pie size.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-innersize-80px/\n * 80px inner size\n * @sample {highcharts} highcharts/plotoptions/pie-innersize-50percent/\n * 50% of the plot area\n * @sample {highcharts} highcharts/demo/3d-pie-donut/\n * 3D donut\n *\n * @type {number|string}\n * @default 0\n * @since 2.0\n * @product highcharts highmaps\n * @apioption plotOptions.pie.innerSize\n */\n /**\n * @ignore-option\n *\n * @private\n */\n legendType: 'point',\n /**\n * @ignore-option\n *\n * @private\n */\n marker: null,\n /**\n * The minimum size for a pie in response to auto margins. The pie will\n * try to shrink to make room for data labels in side the plot area,\n * but only to this size.\n *\n * @type {number|string}\n * @default 80\n * @since 3.0\n * @product highcharts highmaps\n * @apioption plotOptions.pie.minSize\n */\n /**\n * The diameter of the pie relative to the plot area. Can be a\n * percentage or pixel value. Pixel values are given as integers. The\n * default behaviour (as of 3.0) is to scale to the plot area and give\n * room for data labels within the plot area.\n * [slicedOffset](#plotOptions.pie.slicedOffset) is also included in the\n * default size calculation. As a consequence, the size of the pie may\n * vary when points are updated and data labels more around. In that\n * case it is best to set a fixed value, for example `\"75%\"`.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-size/\n * Smaller pie\n *\n * @type {number|string|null}\n * @product highcharts highmaps\n *\n * @private\n */\n size: null,\n /**\n * Whether to display this particular series or series type in the\n * legend. Since 2.1, pies are not shown in the legend by default.\n *\n * @sample {highcharts} highcharts/plotoptions/series-showinlegend/\n * One series in the legend, one hidden\n *\n * @product highcharts highmaps\n *\n * @private\n */\n showInLegend: false,\n /**\n * If a point is sliced, moved out from the center, how many pixels\n * should it be moved?.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-slicedoffset-20/\n * 20px offset\n *\n * @product highcharts highmaps\n *\n * @private\n */\n slicedOffset: 10,\n /**\n * The start angle of the pie slices in degrees where 0 is top and 90\n * right.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-startangle-90/\n * Start from right\n *\n * @type {number}\n * @default 0\n * @since 2.3.4\n * @product highcharts highmaps\n * @apioption plotOptions.pie.startAngle\n */\n /**\n * Sticky tracking of mouse events. When true, the `mouseOut` event\n * on a series isn't triggered until the mouse moves over another\n * series, or out of the plot area. When false, the `mouseOut` event on\n * a series is triggered when the mouse leaves the area around the\n * series' graph or markers. This also implies the tooltip. When\n * `stickyTracking` is false and `tooltip.shared` is false, the tooltip\n * will be hidden when moving the mouse between series.\n *\n * @product highcharts highmaps\n *\n * @private\n */\n stickyTracking: false,\n tooltip: {\n followPointer: true\n },\n /**\n * The color of the border surrounding each slice. When `null`, the\n * border takes the same color as the slice fill. This can be used\n * together with a `borderWidth` to fill drawing gaps created by\n * antialiazing artefacts in borderless pies.\n *\n * In styled mode, the border stroke is given in the `.highcharts-point`\n * class.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-bordercolor-black/\n * Black border\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @default #ffffff\n * @product highcharts highmaps\n *\n * @private\n */\n borderColor: \"#ffffff\" /* Palette.backgroundColor */,\n /**\n * The width of the border surrounding each slice.\n *\n * When setting the border width to 0, there may be small gaps between\n * the slices due to SVG antialiasing artefacts. To work around this,\n * keep the border width at 0.5 or 1, but set the `borderColor` to\n * `null` instead.\n *\n * In styled mode, the border stroke width is given in the\n * `.highcharts-point` class.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-borderwidth/\n * 3px border\n *\n * @product highcharts highmaps\n *\n * @private\n */\n borderWidth: 1,\n /**\n * @ignore-option\n * @private\n */\n lineWidth: void 0,\n states: {\n /**\n * @extends plotOptions.series.states.hover\n * @excluding marker, lineWidth, lineWidthPlus\n * @product highcharts highmaps\n */\n hover: {\n /**\n * How much to brighten the point on interaction. Requires the\n * main color to be defined in hex or rgb(a) format.\n *\n * In styled mode, the hover brightness is by default replaced\n * by a fill-opacity given in the `.highcharts-point-hover`\n * class.\n *\n * @sample {highcharts} highcharts/plotoptions/pie-states-hover-brightness/\n * Brightened by 0.5\n *\n * @product highcharts highmaps\n */\n brightness: 0.1\n }\n }\n };\n /**\n * A `pie` series. If the [type](#series.pie.type) option is not specified,\n * it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.pie\n * @excluding cropThreshold, dataParser, dataURL, linkedTo, stack, xAxis, yAxis,\n * dataSorting, step, boostThreshold, boostBlending\n * @product highcharts highmaps\n * @apioption series.pie\n */\n /**\n * An array of data points for the series. For the `pie` series type,\n * points can be given in the following ways:\n *\n * 1. An array of numerical values. In this case, the numerical values will be\n * interpreted as `y` options. Example:\n * ```js\n * data: [0, 5, 3, 5]\n * ```\n *\n * 2. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.pie.turboThreshold),\n * this option is not available.\n * ```js\n * data: [{\n * y: 1,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * y: 7,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * Numerical values\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @type {Array|null|*>}\n * @extends series.line.data\n * @excluding marker, x\n * @product highcharts highmaps\n * @apioption series.pie.data\n */\n /**\n * @type {Highcharts.SeriesPieDataLabelsOptionsObject}\n * @product highcharts highmaps\n * @apioption series.pie.data.dataLabels\n */\n /**\n * The sequential index of the data point in the legend.\n *\n * @type {number}\n * @product highcharts highmaps\n * @apioption series.pie.data.legendIndex\n */\n /**\n * Whether to display a slice offset from the center.\n *\n * @sample {highcharts} highcharts/point/sliced/\n * One sliced point\n *\n * @type {boolean}\n * @product highcharts highmaps\n * @apioption series.pie.data.sliced\n */\n /**\n * @extends plotOptions.pie.dataLabels\n * @excluding align, allowOverlap, inside, staggerLines, step\n * @product highcharts highmaps\n * @apioption series.pie.dataLabels\n */\n /**\n * @excluding legendItemClick\n * @product highcharts highmaps\n * @apioption series.pie.events\n */\n ''; // placeholder for transpiled doclets above\n /* *\n *\n * Default Export\n *\n * */\n\n return PieSeriesDefaults;\n });\n _registerModule(_modules, 'Series/Pie/PieSeries.js', [_modules['Series/CenteredUtilities.js'], _modules['Series/Column/ColumnSeries.js'], _modules['Core/Globals.js'], _modules['Core/Legend/LegendSymbol.js'], _modules['Series/Pie/PiePoint.js'], _modules['Series/Pie/PieSeriesDefaults.js'], _modules['Core/Series/Series.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Renderer/SVG/Symbols.js'], _modules['Core/Utilities.js']], function (CU, ColumnSeries, H, LegendSymbol, PiePoint, PieSeriesDefaults, Series, SeriesRegistry, Symbols, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var getStartAndEndRadians = CU.getStartAndEndRadians;\n var noop = H.noop;\n var clamp = U.clamp,\n extend = U.extend,\n fireEvent = U.fireEvent,\n merge = U.merge,\n pick = U.pick,\n relativeLength = U.relativeLength;\n /* *\n *\n * Class\n *\n * */\n /**\n * Pie series type.\n *\n * @private\n * @class\n * @name Highcharts.seriesTypes.pie\n *\n * @augments Highcharts.Series\n */\n var PieSeries = /** @class */ (function (_super) {\n __extends(PieSeries, _super);\n function PieSeries() {\n /* *\n *\n * Static Properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n /* *\n *\n * Properties\n *\n * */\n _this.center = void 0;\n _this.data = void 0;\n _this.maxLabelDistance = void 0;\n _this.options = void 0;\n _this.points = void 0;\n return _this;\n /* eslint-enable valid-jsdoc */\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Animates the pies in.\n * @private\n */\n PieSeries.prototype.animate = function (init) {\n var series = this,\n points = series.points,\n startAngleRad = series.startAngleRad;\n if (!init) {\n points.forEach(function (point) {\n var graphic = point.graphic,\n args = point.shapeArgs;\n if (graphic && args) {\n // start values\n graphic.attr({\n // animate from inner radius (#779)\n r: pick(point.startR, (series.center && series.center[3] / 2)),\n start: startAngleRad,\n end: startAngleRad\n });\n // animate\n graphic.animate({\n r: args.r,\n start: args.start,\n end: args.end\n }, series.options.animation);\n }\n });\n }\n };\n /**\n * Called internally to draw auxiliary graph in pie-like series in\n * situtation when the default graph is not sufficient enough to present\n * the data well. Auxiliary graph is saved in the same object as\n * regular graph.\n * @private\n */\n PieSeries.prototype.drawEmpty = function () {\n var start = this.startAngleRad,\n end = this.endAngleRad,\n options = this.options;\n var centerX,\n centerY;\n // Draw auxiliary graph if there're no visible points.\n if (this.total === 0 && this.center) {\n centerX = this.center[0];\n centerY = this.center[1];\n if (!this.graph) {\n this.graph = this.chart.renderer\n .arc(centerX, centerY, this.center[1] / 2, 0, start, end)\n .addClass('highcharts-empty-series')\n .add(this.group);\n }\n this.graph.attr({\n d: Symbols.arc(centerX, centerY, this.center[2] / 2, 0, {\n start: start,\n end: end,\n innerR: this.center[3] / 2\n })\n });\n if (!this.chart.styledMode) {\n this.graph.attr({\n 'stroke-width': options.borderWidth,\n fill: options.fillColor || 'none',\n stroke: options.color || \"#cccccc\" /* Palette.neutralColor20 */\n });\n }\n }\n else if (this.graph) { // Destroy the graph object.\n this.graph = this.graph.destroy();\n }\n };\n /**\n * Slices in pie chart are initialized in DOM, but it's shapes and\n * animations are normally run in `drawPoints()`.\n * @private\n */\n PieSeries.prototype.drawPoints = function () {\n var renderer = this.chart.renderer;\n this.points.forEach(function (point) {\n // When updating a series between 2d and 3d or cartesian and\n // polar, the shape type changes.\n if (point.graphic && point.hasNewShapeType()) {\n point.graphic = point.graphic.destroy();\n }\n if (!point.graphic) {\n point.graphic = renderer[point.shapeType](point.shapeArgs)\n .add(point.series.group);\n point.delayedRendering = true;\n }\n });\n };\n /**\n * Extend the generatePoints method by adding total and percentage\n * properties to each point\n * @private\n */\n PieSeries.prototype.generatePoints = function () {\n _super.prototype.generatePoints.call(this);\n this.updateTotals();\n };\n /**\n * Utility for getting the x value from a given y, used for\n * anticollision logic in data labels. Added point for using specific\n * points' label distance.\n * @private\n */\n PieSeries.prototype.getX = function (y, left, point) {\n var center = this.center, \n // Variable pie has individual radius\n radius = this.radii ?\n this.radii[point.index] || 0 :\n center[2] / 2;\n var angle = Math.asin(clamp((y - center[1]) / (radius + point.labelDistance), -1, 1));\n var x = center[0] +\n (left ? -1 : 1) *\n (Math.cos(angle) * (radius + point.labelDistance)) +\n (point.labelDistance > 0 ?\n (left ? -1 : 1) * this.options.dataLabels.padding :\n 0);\n return x;\n };\n /**\n * Define hasData function for non-cartesian series. Returns true if the\n * series has points at all.\n * @private\n */\n PieSeries.prototype.hasData = function () {\n return !!this.processedXData.length; // != 0\n };\n /**\n * Draw the data points\n * @private\n */\n PieSeries.prototype.redrawPoints = function () {\n var series = this,\n chart = series.chart,\n renderer = chart.renderer,\n shadow = series.options.shadow;\n var groupTranslation,\n graphic,\n pointAttr,\n shapeArgs;\n this.drawEmpty();\n if (shadow && !series.shadowGroup && !chart.styledMode) {\n series.shadowGroup = renderer\n .g('shadow')\n .attr({ zIndex: -1 })\n .add(series.group);\n }\n // draw the slices\n series.points.forEach(function (point) {\n var animateTo = {};\n graphic = point.graphic;\n if (!point.isNull && graphic) {\n var shadowGroup = void 0;\n shapeArgs = point.shapeArgs;\n // If the point is sliced, use special translation, else use\n // plot area translation\n groupTranslation = point.getTranslate();\n if (!chart.styledMode) {\n // Put the shadow behind all points\n shadowGroup = point.shadowGroup;\n if (shadow && !shadowGroup) {\n shadowGroup = point.shadowGroup = renderer\n .g('shadow')\n .add(series.shadowGroup);\n }\n if (shadowGroup) {\n shadowGroup.attr(groupTranslation);\n }\n pointAttr = series.pointAttribs(point, (point.selected && 'select'));\n }\n // Draw the slice\n if (!point.delayedRendering) {\n graphic\n .setRadialReference(series.center);\n if (!chart.styledMode) {\n merge(true, animateTo, pointAttr);\n }\n merge(true, animateTo, shapeArgs, groupTranslation);\n graphic.animate(animateTo);\n }\n else {\n graphic\n .setRadialReference(series.center)\n .attr(shapeArgs)\n .attr(groupTranslation);\n if (!chart.styledMode) {\n graphic\n .attr(pointAttr)\n .attr({ 'stroke-linejoin': 'round' })\n .shadow(shadow, shadowGroup);\n }\n point.delayedRendering = false;\n }\n graphic.attr({\n visibility: point.visible ? 'inherit' : 'hidden'\n });\n graphic.addClass(point.getClassName(), true);\n }\n else if (graphic) {\n point.graphic = graphic.destroy();\n }\n });\n };\n /**\n * Utility for sorting data labels.\n * @private\n */\n PieSeries.prototype.sortByAngle = function (points, sign) {\n points.sort(function (a, b) {\n return ((typeof a.angle !== 'undefined') &&\n (b.angle - a.angle) * sign);\n });\n };\n /**\n * Do translation for pie slices\n * @private\n */\n PieSeries.prototype.translate = function (positions) {\n fireEvent(this, 'translate');\n this.generatePoints();\n var series = this,\n precision = 1000, // issue #172\n options = series.options,\n slicedOffset = options.slicedOffset,\n connectorOffset = slicedOffset + (options.borderWidth || 0),\n radians = getStartAndEndRadians(options.startAngle,\n options.endAngle),\n startAngleRad = series.startAngleRad = radians.start,\n endAngleRad = series.endAngleRad = radians.end,\n circ = endAngleRad - startAngleRad, // 2 * Math.PI,\n points = series.points,\n labelDistance = options.dataLabels.distance,\n ignoreHiddenPoint = options.ignoreHiddenPoint,\n len = points.length;\n var finalConnectorOffset,\n start,\n end,\n angle, \n // the x component of the radius vector for a given point\n radiusX,\n radiusY,\n i,\n point,\n cumulative = 0;\n // Get positions - either an integer or a percentage string must be\n // given. If positions are passed as a parameter, we're in a\n // recursive loop for adjusting space for data labels.\n if (!positions) {\n series.center = positions = series.getCenter();\n }\n // Calculate the geometry for each point\n for (i = 0; i < len; i++) {\n point = points[i];\n // set start and end angle\n start = startAngleRad + (cumulative * circ);\n if (point.isValid() &&\n (!ignoreHiddenPoint || point.visible)) {\n cumulative += point.percentage / 100;\n }\n end = startAngleRad + (cumulative * circ);\n // set the shape\n var shapeArgs = {\n x: positions[0],\n y: positions[1],\n r: positions[2] / 2,\n innerR: positions[3] / 2,\n start: Math.round(start * precision) / precision,\n end: Math.round(end * precision) / precision\n };\n point.shapeType = 'arc';\n point.shapeArgs = shapeArgs;\n // Used for distance calculation for specific point.\n point.labelDistance = pick((point.options.dataLabels &&\n point.options.dataLabels.distance), labelDistance);\n // Compute point.labelDistance if it's defined as percentage\n // of slice radius (#8854)\n point.labelDistance = relativeLength(point.labelDistance, shapeArgs.r);\n // Saved for later dataLabels distance calculation.\n series.maxLabelDistance = Math.max(series.maxLabelDistance || 0, point.labelDistance);\n // The angle must stay within -90 and 270 (#2645)\n angle = (end + start) / 2;\n if (angle > 1.5 * Math.PI) {\n angle -= 2 * Math.PI;\n }\n else if (angle < -Math.PI / 2) {\n angle += 2 * Math.PI;\n }\n // Center for the sliced out slice\n point.slicedTranslation = {\n translateX: Math.round(Math.cos(angle) * slicedOffset),\n translateY: Math.round(Math.sin(angle) * slicedOffset)\n };\n // set the anchor point for tooltips\n radiusX = Math.cos(angle) * positions[2] / 2;\n radiusY = Math.sin(angle) * positions[2] / 2;\n point.tooltipPos = [\n positions[0] + radiusX * 0.7,\n positions[1] + radiusY * 0.7\n ];\n point.half = angle < -Math.PI / 2 || angle > Math.PI / 2 ?\n 1 :\n 0;\n point.angle = angle;\n // Set the anchor point for data labels. Use point.labelDistance\n // instead of labelDistance // #1174\n // finalConnectorOffset - not override connectorOffset value.\n finalConnectorOffset = Math.min(connectorOffset, point.labelDistance / 5); // #1678\n point.labelPosition = {\n natural: {\n // initial position of the data label - it's utilized for\n // finding the final position for the label\n x: positions[0] + radiusX + Math.cos(angle) *\n point.labelDistance,\n y: positions[1] + radiusY + Math.sin(angle) *\n point.labelDistance\n },\n 'final': {\n // used for generating connector path -\n // initialized later in drawDataLabels function\n // x: undefined,\n // y: undefined\n },\n // left - pie on the left side of the data label\n // right - pie on the right side of the data label\n // center - data label overlaps the pie\n alignment: point.labelDistance < 0 ?\n 'center' : point.half ? 'right' : 'left',\n connectorPosition: {\n breakAt: {\n x: positions[0] + radiusX + Math.cos(angle) *\n finalConnectorOffset,\n y: positions[1] + radiusY + Math.sin(angle) *\n finalConnectorOffset\n },\n touchingSliceAt: {\n x: positions[0] + radiusX,\n y: positions[1] + radiusY\n }\n }\n };\n }\n fireEvent(series, 'afterTranslate');\n };\n /**\n * Recompute total chart sum and update percentages of points.\n * @private\n */\n PieSeries.prototype.updateTotals = function () {\n var points = this.points,\n len = points.length,\n ignoreHiddenPoint = this.options.ignoreHiddenPoint;\n var i,\n point,\n total = 0;\n // Get the total sum\n for (i = 0; i < len; i++) {\n point = points[i];\n if (point.isValid() &&\n (!ignoreHiddenPoint || point.visible)) {\n total += point.y;\n }\n }\n this.total = total;\n // Set each point's properties\n for (i = 0; i < len; i++) {\n point = points[i];\n point.percentage =\n (total > 0 && (point.visible || !ignoreHiddenPoint)) ?\n point.y / total * 100 :\n 0;\n point.total = total;\n }\n };\n PieSeries.defaultOptions = merge(Series.defaultOptions, PieSeriesDefaults);\n return PieSeries;\n }(Series));\n extend(PieSeries.prototype, {\n axisTypes: [],\n directTouch: true,\n drawGraph: void 0,\n drawLegendSymbol: LegendSymbol.drawRectangle,\n drawTracker: ColumnSeries.prototype.drawTracker,\n getCenter: CU.getCenter,\n getSymbol: noop,\n isCartesian: false,\n noSharedTooltip: true,\n pointAttribs: ColumnSeries.prototype.pointAttribs,\n pointClass: PiePoint,\n requireSorting: false,\n searchPoint: noop,\n trackerGroups: ['group', 'dataLabelsGroup']\n });\n SeriesRegistry.registerSeriesType('pie', PieSeries);\n /* *\n *\n * Default Export\n *\n * */\n\n return PieSeries;\n });\n _registerModule(_modules, 'Series/Pie/PieDataLabel.js', [_modules['Core/Series/DataLabel.js'], _modules['Core/Globals.js'], _modules['Core/Renderer/RendererUtilities.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (DataLabel, H, R, SeriesRegistry, U) {\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 var noop = H.noop;\n var distribute = R.distribute;\n var Series = SeriesRegistry.series;\n var arrayMax = U.arrayMax,\n clamp = U.clamp,\n defined = U.defined,\n merge = U.merge,\n pick = U.pick,\n relativeLength = U.relativeLength;\n /* *\n *\n * Composition\n *\n * */\n var ColumnDataLabel;\n (function (ColumnDataLabel) {\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n var dataLabelPositioners = {\n // Based on the value computed in Highcharts' distribute algorithm.\n radialDistributionY: function (point) {\n return point.top + point.distributeBox.pos;\n },\n // get the x - use the natural x position for labels near the\n // top and bottom, to prevent the top and botton slice\n // connectors from touching each other on either side\n // Based on the value computed in Highcharts' distribute algorithm.\n radialDistributionX: function (series, point, y, naturalY) {\n return series.getX(y < point.top + 2 || y > point.bottom - 2 ?\n naturalY :\n y, point.half, point);\n },\n // dataLabels.distance determines the x position of the label\n justify: function (point, radius, seriesCenter) {\n return seriesCenter[0] + (point.half ? -1 : 1) *\n (radius + point.labelDistance);\n },\n // Left edges of the left-half labels touch the left edge of the plot\n // area. Right edges of the right-half labels touch the right edge of\n // the plot area.\n alignToPlotEdges: function (dataLabel, half, plotWidth, plotLeft) {\n var dataLabelWidth = dataLabel.getBBox().width;\n return half ? dataLabelWidth + plotLeft :\n plotWidth - dataLabelWidth - plotLeft;\n },\n // Connectors of each side end in the same x position. Labels are\n // aligned to them. Left edge of the widest left-half label touches the\n // left edge of the plot area. Right edge of the widest right-half label\n // touches the right edge of the plot area.\n alignToConnectors: function (points, half, plotWidth, plotLeft) {\n var maxDataLabelWidth = 0,\n dataLabelWidth;\n // find widest data label\n points.forEach(function (point) {\n dataLabelWidth = point.dataLabel.getBBox().width;\n if (dataLabelWidth > maxDataLabelWidth) {\n maxDataLabelWidth = dataLabelWidth;\n }\n });\n return half ? maxDataLabelWidth + plotLeft :\n plotWidth - maxDataLabelWidth - plotLeft;\n }\n };\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /** @private */\n function compose(PieSeriesClass) {\n DataLabel.compose(Series);\n if (composedClasses.indexOf(PieSeriesClass) === -1) {\n composedClasses.push(PieSeriesClass);\n var pieProto = PieSeriesClass.prototype;\n pieProto.dataLabelPositioners = dataLabelPositioners;\n pieProto.alignDataLabel = noop;\n pieProto.drawDataLabels = drawDataLabels;\n pieProto.placeDataLabels = placeDataLabels;\n pieProto.verifyDataLabelOverflow = verifyDataLabelOverflow;\n }\n }\n ColumnDataLabel.compose = compose;\n /**\n * Override the base drawDataLabels method by pie specific functionality\n * @private\n */\n function drawDataLabels() {\n var series = this,\n data = series.data,\n chart = series.chart,\n options = series.options.dataLabels || {},\n connectorPadding = options.connectorPadding,\n plotWidth = chart.plotWidth,\n plotHeight = chart.plotHeight,\n plotLeft = chart.plotLeft,\n maxWidth = Math.round(chart.chartWidth / 3),\n seriesCenter = series.center,\n radius = seriesCenter[2] / 2,\n centerY = seriesCenter[1],\n halves = [\n [],\n [] // left\n ],\n overflow = [0, 0, 0, 0], // top, right, bottom, left\n dataLabelPositioners = series.dataLabelPositioners;\n var point,\n connectorWidth,\n connector,\n dataLabel,\n dataLabelWidth, \n // labelPos,\n labelPosition,\n labelHeight, \n // divide the points into right and left halves for anti collision\n x,\n y,\n visibility,\n j,\n pointDataLabelsOptions;\n // get out if not enabled\n if (!series.visible ||\n (!options.enabled &&\n !series._hasPointLabels)) {\n return;\n }\n // Reset all labels that have been shortened\n data.forEach(function (point) {\n if (point.dataLabel && point.visible && point.dataLabel.shortened) {\n point.dataLabel\n .attr({\n width: 'auto'\n }).css({\n width: 'auto',\n textOverflow: 'clip'\n });\n point.dataLabel.shortened = false;\n }\n });\n // run parent method\n Series.prototype.drawDataLabels.apply(series);\n data.forEach(function (point) {\n if (point.dataLabel) {\n if (point.visible) { // #407, #2510\n // Arrange points for detection collision\n halves[point.half].push(point);\n // Reset positions (#4905)\n point.dataLabel._pos = null;\n // Avoid long labels squeezing the pie size too far down\n if (!defined(options.style.width) &&\n !defined(point.options.dataLabels &&\n point.options.dataLabels.style &&\n point.options.dataLabels.style.width)) {\n if (point.dataLabel.getBBox().width > maxWidth) {\n point.dataLabel.css({\n // Use a fraction of the maxWidth to avoid\n // wrapping close to the end of the string.\n width: Math.round(maxWidth * 0.7) + 'px'\n });\n point.dataLabel.shortened = true;\n }\n }\n }\n else {\n point.dataLabel = point.dataLabel.destroy();\n // Workaround to make pies destroy multiple datalabels\n // correctly. This logic needs rewriting to support multiple\n // datalabels fully.\n if (point.dataLabels && point.dataLabels.length === 1) {\n delete point.dataLabels;\n }\n }\n }\n });\n /* Loop over the points in each half, starting from the top and bottom\n * of the pie to detect overlapping labels.\n */\n halves.forEach(function (points, i) {\n var length = points.length,\n positions = [];\n var top,\n bottom,\n naturalY,\n sideOverflow,\n size,\n distributionLength;\n if (!length) {\n return;\n }\n // Sort by angle\n series.sortByAngle(points, i - 0.5);\n // Only do anti-collision when we have dataLabels outside the pie\n // and have connectors. (#856)\n if (series.maxLabelDistance > 0) {\n top = Math.max(0, centerY - radius - series.maxLabelDistance);\n bottom = Math.min(centerY + radius + series.maxLabelDistance, chart.plotHeight);\n points.forEach(function (point) {\n // check if specific points' label is outside the pie\n if (point.labelDistance > 0 && point.dataLabel) {\n // point.top depends on point.labelDistance value\n // Used for calculation of y value in getX method\n point.top = Math.max(0, centerY - radius - point.labelDistance);\n point.bottom = Math.min(centerY + radius + point.labelDistance, chart.plotHeight);\n size = point.dataLabel.getBBox().height || 21;\n // point.positionsIndex is needed for getting index of\n // parameter related to specific point inside positions\n // array - not every point is in positions array.\n point.distributeBox = {\n target: point.labelPosition.natural.y -\n point.top + size / 2,\n size: size,\n rank: point.y\n };\n positions.push(point.distributeBox);\n }\n });\n distributionLength = bottom + size - top;\n distribute(positions, distributionLength, distributionLength / 5);\n }\n // Now the used slots are sorted, fill them up sequentially\n for (j = 0; j < length; j++) {\n point = points[j];\n // labelPos = point.labelPos;\n labelPosition = point.labelPosition;\n dataLabel = point.dataLabel;\n visibility = point.visible === false ? 'hidden' : 'inherit';\n naturalY = labelPosition.natural.y;\n y = naturalY;\n if (positions && defined(point.distributeBox)) {\n if (typeof point.distributeBox.pos === 'undefined') {\n visibility = 'hidden';\n }\n else {\n labelHeight = point.distributeBox.size;\n // Find label's y position\n y = dataLabelPositioners\n .radialDistributionY(point);\n }\n }\n // It is needed to delete point.positionIndex for\n // dynamically added points etc.\n delete point.positionIndex; // @todo unused\n // Find label's x position\n // justify is undocumented in the API - preserve support for it\n if (options.justify) {\n x = dataLabelPositioners.justify(point, radius, seriesCenter);\n }\n else {\n switch (options.alignTo) {\n case 'connectors':\n x = dataLabelPositioners.alignToConnectors(points, i, plotWidth, plotLeft);\n break;\n case 'plotEdges':\n x = dataLabelPositioners.alignToPlotEdges(dataLabel, i, plotWidth, plotLeft);\n break;\n default:\n x = dataLabelPositioners.radialDistributionX(series, point, y, naturalY);\n }\n }\n // Record the placement and visibility\n dataLabel._attr = {\n visibility: visibility,\n align: labelPosition.alignment\n };\n pointDataLabelsOptions = point.options.dataLabels || {};\n dataLabel._pos = {\n x: (x +\n pick(pointDataLabelsOptions.x, options.x) + // (#12985)\n ({\n left: connectorPadding,\n right: -connectorPadding\n }[labelPosition.alignment] || 0)),\n // 10 is for the baseline (label vs text)\n y: (y +\n pick(pointDataLabelsOptions.y, options.y) - // (#12985)\n 10)\n };\n // labelPos.x = x;\n // labelPos.y = y;\n labelPosition.final.x = x;\n labelPosition.final.y = y;\n // Detect overflowing data labels\n if (pick(options.crop, true)) {\n dataLabelWidth = dataLabel.getBBox().width;\n sideOverflow = null;\n // Overflow left\n if (x - dataLabelWidth < connectorPadding &&\n i === 1 // left half\n ) {\n sideOverflow = Math.round(dataLabelWidth - x + connectorPadding);\n overflow[3] = Math.max(sideOverflow, overflow[3]);\n // Overflow right\n }\n else if (x + dataLabelWidth > plotWidth - connectorPadding &&\n i === 0 // right half\n ) {\n sideOverflow = Math.round(x + dataLabelWidth - plotWidth + connectorPadding);\n overflow[1] = Math.max(sideOverflow, overflow[1]);\n }\n // Overflow top\n if (y - labelHeight / 2 < 0) {\n overflow[0] = Math.max(Math.round(-y + labelHeight / 2), overflow[0]);\n // Overflow left\n }\n else if (y + labelHeight / 2 > plotHeight) {\n overflow[2] = Math.max(Math.round(y + labelHeight / 2 - plotHeight), overflow[2]);\n }\n dataLabel.sideOverflow = sideOverflow;\n }\n } // for each point\n }); // for each half\n // Do not apply the final placement and draw the connectors until we\n // have verified that labels are not spilling over.\n if (arrayMax(overflow) === 0 ||\n this.verifyDataLabelOverflow(overflow)) {\n // Place the labels in the final position\n this.placeDataLabels();\n this.points.forEach(function (point) {\n // #8864: every connector can have individual options\n pointDataLabelsOptions =\n merge(options, point.options.dataLabels);\n connectorWidth =\n pick(pointDataLabelsOptions.connectorWidth, 1);\n // Draw the connector\n if (connectorWidth) {\n var isNew = void 0;\n connector = point.connector;\n dataLabel = point.dataLabel;\n if (dataLabel &&\n dataLabel._pos &&\n point.visible &&\n point.labelDistance > 0) {\n visibility = dataLabel._attr.visibility;\n isNew = !connector;\n if (isNew) {\n point.connector = connector = chart.renderer\n .path()\n .addClass('highcharts-data-label-connector ' +\n ' highcharts-color-' + point.colorIndex +\n (point.className ?\n ' ' + point.className :\n ''))\n .add(series.dataLabelsGroup);\n if (!chart.styledMode) {\n connector.attr({\n 'stroke-width': connectorWidth,\n 'stroke': (pointDataLabelsOptions.connectorColor ||\n point.color ||\n \"#666666\" /* Palette.neutralColor60 */)\n });\n }\n }\n connector[isNew ? 'attr' : 'animate']({\n d: point.getConnectorPath()\n });\n connector.attr('visibility', visibility);\n }\n else if (connector) {\n point.connector = connector.destroy();\n }\n }\n });\n }\n }\n /**\n * Perform the final placement of the data labels after we have verified\n * that they fall within the plot area.\n * @private\n */\n function placeDataLabels() {\n this.points.forEach(function (point) {\n var dataLabel = point.dataLabel,\n _pos;\n if (dataLabel && point.visible) {\n _pos = dataLabel._pos;\n if (_pos) {\n // Shorten data labels with ellipsis if they still overflow\n // after the pie has reached minSize (#223).\n if (dataLabel.sideOverflow) {\n dataLabel._attr.width =\n Math.max(dataLabel.getBBox().width -\n dataLabel.sideOverflow, 0);\n dataLabel.css({\n width: dataLabel._attr.width + 'px',\n textOverflow: ((this.options.dataLabels.style || {})\n .textOverflow ||\n 'ellipsis')\n });\n dataLabel.shortened = true;\n }\n dataLabel.attr(dataLabel._attr);\n dataLabel[dataLabel.moved ? 'animate' : 'attr'](_pos);\n dataLabel.moved = true;\n }\n else if (dataLabel) {\n dataLabel.attr({ y: -9999 });\n }\n }\n // Clear for update\n delete point.distributeBox;\n }, this);\n }\n /**\n * Verify whether the data labels are allowed to draw, or we should run more\n * translation and data label positioning to keep them inside the plot area.\n * Returns true when data labels are ready to draw.\n * @private\n */\n function verifyDataLabelOverflow(overflow) {\n var center = this.center,\n options = this.options,\n centerOption = options.center,\n minSize = options.minSize || 80,\n newSize = minSize, \n // If a size is set, return true and don't try to shrink the pie\n // to fit the labels.\n ret = options.size !== null;\n if (!ret) {\n // Handle horizontal size and center\n if (centerOption[0] !== null) { // Fixed center\n newSize = Math.max(center[2] -\n Math.max(overflow[1], overflow[3]), minSize);\n }\n else { // Auto center\n newSize = Math.max(\n // horizontal overflow\n center[2] - overflow[1] - overflow[3], minSize);\n // horizontal center\n center[0] += (overflow[3] - overflow[1]) / 2;\n }\n // Handle vertical size and center\n if (centerOption[1] !== null) { // Fixed center\n newSize = clamp(newSize, minSize, center[2] - Math.max(overflow[0], overflow[2]));\n }\n else { // Auto center\n newSize = clamp(newSize, minSize, \n // vertical overflow\n center[2] - overflow[0] - overflow[2]);\n // vertical center\n center[1] += (overflow[0] - overflow[2]) / 2;\n }\n // If the size must be decreased, we need to run translate and\n // drawDataLabels again\n if (newSize < center[2]) {\n center[2] = newSize;\n center[3] = Math.min(// #3632\n options.thickness ?\n Math.max(0, newSize - options.thickness * 2) :\n Math.max(0, relativeLength(options.innerSize || 0, newSize)), newSize); // #6647\n this.translate(center);\n if (this.drawDataLabels) {\n this.drawDataLabels();\n }\n // Else, return true to indicate that the pie and its labels is\n // within the plot area\n }\n else {\n ret = true;\n }\n }\n return ret;\n }\n })(ColumnDataLabel || (ColumnDataLabel = {}));\n /* *\n *\n * Default Export\n *\n * */\n\n return ColumnDataLabel;\n });\n _registerModule(_modules, 'Extensions/OverlappingDataLabels.js', [_modules['Core/Chart/Chart.js'], _modules['Core/Utilities.js']], function (Chart, U) {\n /* *\n *\n * Highcharts module to hide overlapping data labels.\n * This module is included in Highcharts.\n *\n * (c) 2009-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n var addEvent = U.addEvent,\n fireEvent = U.fireEvent,\n isArray = U.isArray,\n isNumber = U.isNumber,\n objectEach = U.objectEach,\n pick = U.pick;\n /**\n * Internal type\n * @private\n */\n /* eslint-disable no-invalid-this */\n // Collect potensial overlapping data labels. Stack labels probably don't need\n // to be considered because they are usually accompanied by data labels that lie\n // inside the columns.\n addEvent(Chart, 'render', function collectAndHide() {\n var chart = this,\n labels = [];\n // Consider external label collectors\n (this.labelCollectors || []).forEach(function (collector) {\n labels = labels.concat(collector());\n });\n (this.yAxis || []).forEach(function (yAxis) {\n if (yAxis.stacking &&\n yAxis.options.stackLabels &&\n !yAxis.options.stackLabels.allowOverlap) {\n objectEach(yAxis.stacking.stacks, function (stack) {\n objectEach(stack, function (stackItem) {\n if (stackItem.label) {\n labels.push(stackItem.label);\n }\n });\n });\n }\n });\n (this.series || []).forEach(function (series) {\n var dlOptions = series.options.dataLabels;\n if (series.visible &&\n !(dlOptions.enabled === false && !series._hasPointLabels)) { // #3866\n var push = function (points) {\n return points.forEach(function (point) {\n if (point.visible) {\n var dataLabels = (isArray(point.dataLabels) ?\n point.dataLabels :\n (point.dataLabel ? [point.dataLabel] : []));\n dataLabels.forEach(function (label) {\n var options = label.options;\n label.labelrank = pick(options.labelrank, point.labelrank, point.shapeArgs && point.shapeArgs.height); // #4118\n if (!options.allowOverlap) {\n labels.push(label);\n }\n else { // #13449\n label.oldOpacity = label.opacity;\n label.newOpacity = 1;\n hideOrShow(label, chart);\n }\n });\n }\n });\n };\n push(series.nodes || []);\n push(series.points);\n }\n });\n this.hideOverlappingLabels(labels);\n });\n /**\n * Hide overlapping labels. Labels are moved and faded in and out on zoom to\n * provide a smooth visual imression.\n *\n * @private\n * @function Highcharts.Chart#hideOverlappingLabels\n * @param {Array} labels\n * Rendered data labels\n * @requires modules/overlapping-datalabels\n */\n Chart.prototype.hideOverlappingLabels = function (labels) {\n var chart = this,\n len = labels.length,\n ren = chart.renderer,\n label,\n i,\n j,\n label1,\n label2,\n box1,\n box2,\n isLabelAffected = false,\n isIntersectRect = function (box1,\n box2) {\n return !(box2.x >= box1.x + box1.width ||\n box2.x + box2.width <= box1.x ||\n box2.y >= box1.y + box1.height ||\n box2.y + box2.height <= box1.y);\n }, \n // Get the box with its position inside the chart, as opposed to getBBox\n // that only reports the position relative to the parent.\n getAbsoluteBox = function (label) {\n var pos,\n parent,\n bBox, \n // Substract the padding if no background or border (#4333)\n padding = label.box ? 0 : (label.padding || 0),\n lineHeightCorrection = 0,\n xOffset = 0,\n boxWidth,\n alignValue;\n if (label &&\n (!label.alignAttr || label.placed)) {\n pos = label.alignAttr || {\n x: label.attr('x'),\n y: label.attr('y')\n };\n parent = label.parentGroup;\n // Get width and height if pure text nodes (stack labels)\n if (!label.width) {\n bBox = label.getBBox();\n label.width = bBox.width;\n label.height = bBox.height;\n // Labels positions are computed from top left corner, so\n // we need to substract the text height from text nodes too.\n lineHeightCorrection = ren\n .fontMetrics(null, label.element).h;\n }\n boxWidth = label.width - 2 * padding;\n alignValue = {\n left: '0',\n center: '0.5',\n right: '1'\n }[label.alignValue];\n if (alignValue) {\n xOffset = +alignValue * boxWidth;\n }\n else if (isNumber(label.x) &&\n Math.round(label.x) !== label.translateX) {\n xOffset = label.x - label.translateX;\n }\n return {\n x: pos.x + (parent.translateX || 0) + padding -\n (xOffset || 0),\n y: pos.y + (parent.translateY || 0) + padding -\n lineHeightCorrection,\n width: label.width - 2 * padding,\n height: label.height - 2 * padding\n };\n }\n };\n for (i = 0; i < len; i++) {\n label = labels[i];\n if (label) {\n // Mark with initial opacity\n label.oldOpacity = label.opacity;\n label.newOpacity = 1;\n label.absoluteBox = getAbsoluteBox(label);\n }\n }\n // Prevent a situation in a gradually rising slope, that each label will\n // hide the previous one because the previous one always has lower rank.\n labels.sort(function (a, b) {\n return (b.labelrank || 0) - (a.labelrank || 0);\n });\n // Detect overlapping labels\n for (i = 0; i < len; i++) {\n label1 = labels[i];\n box1 = label1 && label1.absoluteBox;\n for (j = i + 1; j < len; ++j) {\n label2 = labels[j];\n box2 = label2 && label2.absoluteBox;\n if (box1 &&\n box2 &&\n label1 !== label2 && // #6465, polar chart with connectEnds\n label1.newOpacity !== 0 &&\n label2.newOpacity !== 0 &&\n // #15863 dataLabels are no longer hidden by translation\n label1.visibility !== 'hidden' &&\n label2.visibility !== 'hidden') {\n if (isIntersectRect(box1, box2)) {\n (label1.labelrank < label2.labelrank ? label1 : label2)\n .newOpacity = 0;\n }\n }\n }\n }\n // Hide or show\n labels.forEach(function (label) {\n if (hideOrShow(label, chart)) {\n isLabelAffected = true;\n }\n });\n if (isLabelAffected) {\n fireEvent(chart, 'afterHideAllOverlappingLabels');\n }\n };\n /**\n * Hide or show labels based on opacity.\n *\n * @private\n * @function hideOrShow\n * @param {Highcharts.SVGElement} label\n * The label.\n * @param {Highcharts.Chart} chart\n * The chart that contains the label.\n * @return {boolean}\n * Whether label is affected\n */\n function hideOrShow(label, chart) {\n var complete,\n newOpacity,\n isLabelAffected = false;\n if (label) {\n newOpacity = label.newOpacity;\n if (label.oldOpacity !== newOpacity) {\n // Make sure the label is completely hidden to avoid catching clicks\n // (#4362)\n if (label.alignAttr && label.placed) { // data labels\n label[newOpacity ? 'removeClass' : 'addClass']('highcharts-data-label-hidden');\n complete = function () {\n if (!chart.styledMode) {\n label.css({\n pointerEvents: newOpacity ? 'auto' : 'none'\n });\n }\n };\n isLabelAffected = true;\n // Animate or set the opacity\n label.alignAttr.opacity = newOpacity;\n label[label.isOld ? 'animate' : 'attr'](label.alignAttr, null, complete);\n fireEvent(chart, 'afterHideOverlappingLabel');\n }\n else { // other labels, tick labels\n label.attr({\n opacity: newOpacity\n });\n }\n }\n label.isOld = true;\n }\n return isLabelAffected;\n }\n\n });\n _registerModule(_modules, 'Core/Responsive.js', [_modules['Core/Utilities.js']], function (U) {\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 var extend = U.extend,\n find = U.find,\n isArray = U.isArray,\n isObject = U.isObject,\n merge = U.merge,\n objectEach = U.objectEach,\n pick = U.pick,\n splat = U.splat,\n uniqueKey = U.uniqueKey;\n /* *\n *\n * Composition\n *\n * */\n var Responsive;\n (function (Responsive) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * @private\n */\n function compose(ChartClass) {\n if (composedClasses.indexOf(ChartClass) === -1) {\n composedClasses.push(ChartClass);\n extend(ChartClass.prototype, Additions.prototype);\n }\n return ChartClass;\n }\n Responsive.compose = compose;\n /* *\n *\n * Class\n *\n * */\n var Additions = /** @class */ (function () {\n function Additions() {\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Get the current values for a given set of options. Used before we\n * update the chart with a new responsiveness rule.\n *\n * @todo Restore axis options (by id?). The matching of items in\n * collections bears resemblance to the oneToOne matching in\n * Chart.update. Probably we can refactor out that matching and reuse it\n * in both functions.\n *\n * @private\n * @function Highcharts.Chart#currentOptions\n */\n Additions.prototype.currentOptions = function (options) {\n var chart = this, ret = {};\n /**\n * Recurse over a set of options and its current values,\n * and store the current values in the ret object.\n */\n function getCurrent(options, curr, ret, depth) {\n var i;\n objectEach(options, function (val, key) {\n if (!depth &&\n chart.collectionsWithUpdate.indexOf(key) > -1 &&\n curr[key]) {\n val = splat(val);\n ret[key] = [];\n // Iterate over collections like series, xAxis or yAxis\n // and map the items by index.\n for (i = 0; i < Math.max(val.length, curr[key].length); i++) {\n // Item exists in current data (#6347)\n if (curr[key][i]) {\n // If the item is missing from the new data, we\n // need to save the whole config structure. Like\n // when responsively updating from a dual axis\n // layout to a single axis and back (#13544).\n if (val[i] === void 0) {\n ret[key][i] = curr[key][i];\n // Otherwise, proceed\n }\n else {\n ret[key][i] = {};\n getCurrent(val[i], curr[key][i], ret[key][i], depth + 1);\n }\n }\n }\n }\n else if (isObject(val)) {\n ret[key] = isArray(val) ? [] : {};\n getCurrent(val, curr[key] || {}, ret[key], depth + 1);\n }\n else if (typeof curr[key] === 'undefined') { // #10286\n ret[key] = null;\n }\n else {\n ret[key] = curr[key];\n }\n });\n }\n getCurrent(options, this.options, ret, 0);\n return ret;\n };\n /**\n * Handle a single responsiveness rule.\n *\n * @private\n * @function Highcharts.Chart#matchResponsiveRule\n * @param {Highcharts.ResponsiveRulesOptions} rule\n * @param {Array} matches\n */\n Additions.prototype.matchResponsiveRule = function (rule, matches) {\n var condition = rule.condition,\n fn = condition.callback || function () {\n return (this.chartWidth <= pick(condition.maxWidth,\n Number.MAX_VALUE) &&\n this.chartHeight <= pick(condition.maxHeight,\n Number.MAX_VALUE) &&\n this.chartWidth >= pick(condition.minWidth, 0) &&\n this.chartHeight >= pick(condition.minHeight, 0));\n };\n if (fn.call(this)) {\n matches.push(rule._id);\n }\n };\n /**\n * Update the chart based on the current chart/document size and options\n * for responsiveness.\n *\n * @private\n * @function Highcharts.Chart#setResponsive\n * @param {boolean} [redraw=true]\n * @param {boolean} [reset=false]\n * Reset by un-applying all rules. Chart.update resets all rules before\n * applying updated options.\n */\n Additions.prototype.setResponsive = function (redraw, reset) {\n var _this = this;\n var options = this.options.responsive,\n currentResponsive = this.currentResponsive;\n var ruleIds = [],\n undoOptions;\n if (!reset && options && options.rules) {\n options.rules.forEach(function (rule) {\n if (typeof rule._id === 'undefined') {\n rule._id = uniqueKey();\n }\n _this.matchResponsiveRule(rule, ruleIds /* , redraw */);\n }, this);\n }\n // Merge matching rules\n var mergedOptions = merge.apply(void 0,\n ruleIds\n .map(function (ruleId) { return find((options || {}).rules || [],\n function (rule) { return (rule._id === ruleId); }); })\n .map(function (rule) { return (rule && rule.chartOptions); }));\n mergedOptions.isResponsiveOptions = true;\n // Stringified key for the rules that currently apply.\n ruleIds = (ruleIds.toString() || void 0);\n var currentRuleIds = (currentResponsive && currentResponsive.ruleIds);\n // Changes in what rules apply\n if (ruleIds !== currentRuleIds) {\n // Undo previous rules. Before we apply a new set of rules, we\n // need to roll back completely to base options (#6291).\n if (currentResponsive) {\n this.update(currentResponsive.undoOptions, redraw, true);\n }\n if (ruleIds) {\n // Get undo-options for matching rules\n undoOptions = this.currentOptions(mergedOptions);\n undoOptions.isResponsiveOptions = true;\n this.currentResponsive = {\n ruleIds: ruleIds,\n mergedOptions: mergedOptions,\n undoOptions: undoOptions\n };\n this.update(mergedOptions, redraw, true);\n }\n else {\n this.currentResponsive = void 0;\n }\n }\n };\n return Additions;\n }());\n })(Responsive || (Responsive = {}));\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * A callback function to gain complete control on when the responsive rule\n * applies.\n *\n * @callback Highcharts.ResponsiveCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * Chart context.\n *\n * @return {boolean}\n * Return `true` if it applies.\n */\n (''); // keeps doclets above in JS file\n /* *\n *\n * API Options\n *\n * */\n /**\n * Allows setting a set of rules to apply for different screen or chart\n * sizes. Each rule specifies additional chart options.\n *\n * @sample {highstock} stock/demo/responsive/\n * Stock chart\n * @sample highcharts/responsive/axis/\n * Axis\n * @sample highcharts/responsive/legend/\n * Legend\n * @sample highcharts/responsive/classname/\n * Class name\n *\n * @since 5.0.0\n * @apioption responsive\n */\n /**\n * A set of rules for responsive settings. The rules are executed from\n * the top down.\n *\n * @sample {highcharts} highcharts/responsive/axis/\n * Axis changes\n * @sample {highstock} highcharts/responsive/axis/\n * Axis changes\n * @sample {highmaps} highcharts/responsive/axis/\n * Axis changes\n *\n * @type {Array<*>}\n * @since 5.0.0\n * @apioption responsive.rules\n */\n /**\n * A full set of chart options to apply as overrides to the general\n * chart options. The chart options are applied when the given rule\n * is active.\n *\n * A special case is configuration objects that take arrays, for example\n * [xAxis](#xAxis), [yAxis](#yAxis) or [series](#series). For these\n * collections, an `id` option is used to map the new option set to\n * an existing object. If an existing object of the same id is not found,\n * the item of the same indexupdated. So for example, setting `chartOptions`\n * with two series items without an `id`, will cause the existing chart's\n * two series to be updated with respective options.\n *\n * @sample {highstock} stock/demo/responsive/\n * Stock chart\n * @sample highcharts/responsive/axis/\n * Axis\n * @sample highcharts/responsive/legend/\n * Legend\n * @sample highcharts/responsive/classname/\n * Class name\n *\n * @type {Highcharts.Options}\n * @since 5.0.0\n * @apioption responsive.rules.chartOptions\n */\n /**\n * Under which conditions the rule applies.\n *\n * @since 5.0.0\n * @apioption responsive.rules.condition\n */\n /**\n * A callback function to gain complete control on when the responsive\n * rule applies. Return `true` if it applies. This opens for checking\n * against other metrics than the chart size, for example the document\n * size or other elements.\n *\n * @type {Highcharts.ResponsiveCallbackFunction}\n * @since 5.0.0\n * @context Highcharts.Chart\n * @apioption responsive.rules.condition.callback\n */\n /**\n * The responsive rule applies if the chart height is less than this.\n *\n * @type {number}\n * @since 5.0.0\n * @apioption responsive.rules.condition.maxHeight\n */\n /**\n * The responsive rule applies if the chart width is less than this.\n *\n * @sample highcharts/responsive/axis/\n * Max width is 500\n *\n * @type {number}\n * @since 5.0.0\n * @apioption responsive.rules.condition.maxWidth\n */\n /**\n * The responsive rule applies if the chart height is greater than this.\n *\n * @type {number}\n * @default 0\n * @since 5.0.0\n * @apioption responsive.rules.condition.minHeight\n */\n /**\n * The responsive rule applies if the chart width is greater than this.\n *\n * @type {number}\n * @default 0\n * @since 5.0.0\n * @apioption responsive.rules.condition.minWidth\n */\n (''); // keeps doclets above in JS file\n\n return Responsive;\n });\n _registerModule(_modules, 'masters/highcharts.src.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js'], _modules['Core/Defaults.js'], _modules['Core/Animation/Fx.js'], _modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Renderer/HTML/AST.js'], _modules['Core/FormatUtilities.js'], _modules['Core/Renderer/RendererUtilities.js'], _modules['Core/Renderer/SVG/SVGElement.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Renderer/HTML/HTMLElement.js'], _modules['Core/Renderer/HTML/HTMLRenderer.js'], _modules['Core/Axis/Axis.js'], _modules['Core/Axis/DateTimeAxis.js'], _modules['Core/Axis/LogarithmicAxis.js'], _modules['Core/Axis/PlotLineOrBand/PlotLineOrBand.js'], _modules['Core/Axis/Tick.js'], _modules['Core/Tooltip.js'], _modules['Core/Series/Point.js'], _modules['Core/Pointer.js'], _modules['Core/MSPointer.js'], _modules['Core/Legend/Legend.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Axis/Stacking/StackingAxis.js'], _modules['Core/Axis/Stacking/StackItem.js'], _modules['Core/Series/Series.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Series/Column/ColumnSeries.js'], _modules['Series/Column/ColumnDataLabel.js'], _modules['Series/Pie/PieSeries.js'], _modules['Series/Pie/PieDataLabel.js'], _modules['Core/Series/DataLabel.js'], _modules['Core/Responsive.js'], _modules['Core/Color/Color.js'], _modules['Core/Time.js']], function (Highcharts, Utilities, Defaults, Fx, Animation, AST, FormatUtilities, RendererUtilities, SVGElement, SVGRenderer, HTMLElement, HTMLRenderer, Axis, DateTimeAxis, LogarithmicAxis, PlotLineOrBand, Tick, Tooltip, Point, Pointer, MSPointer, Legend, Chart, StackingAxis, StackItem, Series, SeriesRegistry, ColumnSeries, ColumnDataLabel, PieSeries, PieDataLabel, DataLabel, Responsive, Color, Time) {\n\n var G = Highcharts;\n // Animation\n G.animate = Animation.animate;\n G.animObject = Animation.animObject;\n G.getDeferredAnimation = Animation.getDeferredAnimation;\n G.setAnimation = Animation.setAnimation;\n G.stop = Animation.stop;\n G.timers = Fx.timers;\n // Classes\n G.AST = AST;\n G.Axis = Axis;\n G.Chart = Chart;\n G.chart = Chart.chart;\n G.Fx = Fx;\n G.Legend = Legend;\n G.PlotLineOrBand = PlotLineOrBand;\n G.Point = Point;\n G.Pointer = (MSPointer.isRequired() ? MSPointer : Pointer);\n G.Series = Series;\n G.StackItem = StackItem;\n G.SVGElement = SVGElement;\n G.SVGRenderer = SVGRenderer;\n G.Tick = Tick;\n G.Time = Time;\n G.Tooltip = Tooltip;\n // Color\n G.Color = Color;\n G.color = Color.parse;\n // Compositions\n HTMLRenderer.compose(SVGRenderer);\n HTMLElement.compose(SVGElement);\n // DefaultOptions\n G.defaultOptions = Defaults.defaultOptions;\n G.getOptions = Defaults.getOptions;\n G.time = Defaults.defaultTime;\n G.setOptions = Defaults.setOptions;\n // Format Utilities\n G.dateFormat = FormatUtilities.dateFormat;\n G.format = FormatUtilities.format;\n G.numberFormat = FormatUtilities.numberFormat;\n // Utilities\n G.addEvent = Utilities.addEvent;\n G.arrayMax = Utilities.arrayMax;\n G.arrayMin = Utilities.arrayMin;\n G.attr = Utilities.attr;\n G.clearTimeout = Utilities.clearTimeout;\n G.correctFloat = Utilities.correctFloat;\n G.createElement = Utilities.createElement;\n G.css = Utilities.css;\n G.defined = Utilities.defined;\n G.destroyObjectProperties = Utilities.destroyObjectProperties;\n G.discardElement = Utilities.discardElement;\n G.distribute = RendererUtilities.distribute;\n G.erase = Utilities.erase;\n G.error = Utilities.error;\n G.extend = Utilities.extend;\n G.extendClass = Utilities.extendClass;\n G.find = Utilities.find;\n G.fireEvent = Utilities.fireEvent;\n G.getMagnitude = Utilities.getMagnitude;\n G.getStyle = Utilities.getStyle;\n G.inArray = Utilities.inArray;\n G.isArray = Utilities.isArray;\n G.isClass = Utilities.isClass;\n G.isDOMElement = Utilities.isDOMElement;\n G.isFunction = Utilities.isFunction;\n G.isNumber = Utilities.isNumber;\n G.isObject = Utilities.isObject;\n G.isString = Utilities.isString;\n G.keys = Utilities.keys;\n G.merge = Utilities.merge;\n G.normalizeTickInterval = Utilities.normalizeTickInterval;\n G.objectEach = Utilities.objectEach;\n G.offset = Utilities.offset;\n G.pad = Utilities.pad;\n G.pick = Utilities.pick;\n G.pInt = Utilities.pInt;\n G.relativeLength = Utilities.relativeLength;\n G.removeEvent = Utilities.removeEvent;\n G.seriesType = SeriesRegistry.seriesType;\n G.splat = Utilities.splat;\n G.stableSort = Utilities.stableSort;\n G.syncTimeout = Utilities.syncTimeout;\n G.timeUnits = Utilities.timeUnits;\n G.uniqueKey = Utilities.uniqueKey;\n G.useSerialIds = Utilities.useSerialIds;\n G.wrap = Utilities.wrap;\n // Compositions\n ColumnDataLabel.compose(ColumnSeries);\n DataLabel.compose(Series);\n DateTimeAxis.compose(Axis);\n LogarithmicAxis.compose(Axis);\n PieDataLabel.compose(PieSeries);\n PlotLineOrBand.compose(Axis);\n Responsive.compose(Chart);\n StackingAxis.compose(Axis, Chart, Series);\n // Default Export\n\n return G;\n });\n _modules['masters/highcharts.src.js']._modules = _modules;\n return _modules['masters/highcharts.src.js'];\n}));", "/**\n * @license Highcharts JS v10.3.3 (2023-01-20)\n *\n * (c) 2009-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n */\n(function (factory) {\n if (typeof module === 'object' && module.exports) {\n factory['default'] = factory;\n module.exports = factory;\n } else if (typeof define === 'function' && define.amd) {\n define('highcharts/highcharts-more', ['highcharts'], function (Highcharts) {\n factory(Highcharts);\n factory.Highcharts = Highcharts;\n return factory;\n });\n } else {\n factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);\n }\n}(function (Highcharts) {\n 'use strict';\n var _modules = Highcharts ? Highcharts._modules : {};\n function _registerModule(obj, path, args, fn) {\n if (!obj.hasOwnProperty(path)) {\n obj[path] = fn.apply(null, args);\n\n if (typeof CustomEvent === 'function') {\n window.dispatchEvent(\n new CustomEvent(\n 'HighchartsModuleLoaded',\n { detail: { path: path, module: obj[path] }\n })\n );\n }\n }\n }\n _registerModule(_modules, 'Extensions/Pane.js', [_modules['Core/Chart/Chart.js'], _modules['Series/CenteredUtilities.js'], _modules['Core/Globals.js'], _modules['Core/Pointer.js'], _modules['Core/Utilities.js']], function (Chart, CU, H, Pointer, U) {\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 var addEvent = U.addEvent,\n correctFloat = U.correctFloat,\n defined = U.defined,\n extend = U.extend,\n merge = U.merge,\n pick = U.pick,\n splat = U.splat;\n /**\n * @typedef {\"arc\"|\"circle\"|\"solid\"} Highcharts.PaneBackgroundShapeValue\n */\n /* eslint-disable no-invalid-this, valid-jsdoc */\n Chart.prototype.collectionsWithUpdate.push('pane');\n /**\n * The Pane object allows options that are common to a set of X and Y axes.\n *\n * In the future, this can be extended to basic Highcharts and Highcharts Stock.\n *\n * @private\n * @class\n * @name Highcharts.Pane\n * @param {Highcharts.PaneOptions} options\n * @param {Highcharts.Chart} chart\n */\n var Pane = /** @class */ (function () {\n function Pane(options, chart) {\n this.background = void 0;\n this.center = void 0;\n this.chart = void 0;\n this.options = void 0;\n this.coll = 'pane'; // Member of chart.pane\n /**\n * The pane serves as a container for axes and backgrounds for circular\n * gauges and polar charts.\n *\n * @since 2.3.0\n * @product highcharts\n * @requires highcharts-more\n * @optionparent pane\n */\n this.defaultOptions = {\n /**\n * The end angle of the polar X axis or gauge value axis, given in\n * degrees where 0 is north. Defaults to [startAngle](#pane.startAngle)\n * + 360.\n *\n * @sample {highcharts} highcharts/demo/gauge-vu-meter/\n * VU-meter with custom start and end angle\n *\n * @type {number}\n * @since 2.3.0\n * @product highcharts\n * @apioption pane.endAngle\n */\n /**\n * The center of a polar chart or angular gauge, given as an array\n * of [x, y] positions. Positions can be given as integers that\n * transform to pixels, or as percentages of the plot area size.\n *\n * @sample {highcharts} highcharts/demo/gauge-vu-meter/\n * Two gauges with different center\n *\n * @type {Array}\n * @default [\"50%\", \"50%\"]\n * @since 2.3.0\n * @product highcharts\n */\n center: ['50%', '50%'],\n /**\n * The size of the pane, either as a number defining pixels, or a\n * percentage defining a percentage of the available plot area (the\n * smallest of the plot height or plot width).\n *\n * @sample {highcharts} highcharts/demo/gauge-vu-meter/\n * Smaller size\n *\n * @type {number|string}\n * @product highcharts\n */\n size: '85%',\n /**\n * The inner size of the pane, either as a number defining pixels, or a\n * percentage defining a percentage of the pane's size.\n *\n * @sample {highcharts} highcharts/series-polar/column-inverted-inner\n * The inner size set to 20%\n *\n * @type {number|string}\n * @product highcharts\n */\n innerSize: '0%',\n /**\n * The start angle of the polar X axis or gauge axis, given in degrees\n * where 0 is north. Defaults to 0.\n *\n * @sample {highcharts} highcharts/demo/gauge-vu-meter/\n * VU-meter with custom start and end angle\n *\n * @since 2.3.0\n * @product highcharts\n */\n startAngle: 0\n };\n /**\n * An array of background items for the pane.\n *\n * @sample {highcharts} highcharts/demo/gauge-speedometer/\n * Speedometer gauge with multiple backgrounds\n *\n * @type {Array<*>}\n * @optionparent pane.background\n */\n this.defaultBackgroundOptions = {\n /**\n * The class name for this background.\n *\n * @sample {highcharts} highcharts/css/pane/\n * Panes styled by CSS\n * @sample {highstock} highcharts/css/pane/\n * Panes styled by CSS\n * @sample {highmaps} highcharts/css/pane/\n * Panes styled by CSS\n *\n * @type {string}\n * @default highcharts-pane\n * @since 5.0.0\n * @apioption pane.background.className\n */\n /**\n * The shape of the pane background. When `solid`, the background\n * is circular. When `arc`, the background extends only from the min\n * to the max of the value axis.\n *\n * @type {Highcharts.PaneBackgroundShapeValue}\n * @since 2.3.0\n * @product highcharts\n */\n shape: 'circle',\n /**\n * The pixel border width of the pane background.\n *\n * @since 2.3.0\n * @product highcharts\n */\n borderWidth: 1,\n /**\n * The pane background border color.\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 2.3.0\n * @product highcharts\n */\n borderColor: \"#cccccc\" /* Palette.neutralColor20 */,\n /**\n * The background color or gradient for the pane.\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @default { linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 }, stops: [[0, #ffffff], [1, #e6e6e6]] }\n * @since 2.3.0\n * @product highcharts\n */\n backgroundColor: {\n /** @ignore-option */\n linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },\n /** @ignore-option */\n stops: [\n [0, \"#ffffff\" /* Palette.backgroundColor */],\n [1, \"#e6e6e6\" /* Palette.neutralColor10 */]\n ]\n },\n /** @ignore-option */\n from: -Number.MAX_VALUE,\n /**\n * The inner radius of the pane background. Can be either numeric\n * (pixels) or a percentage string.\n *\n * @type {number|string}\n * @since 2.3.0\n * @product highcharts\n */\n innerRadius: 0,\n /** @ignore-option */\n to: Number.MAX_VALUE,\n /**\n * The outer radius of the circular pane background. Can be either\n * numeric (pixels) or a percentage string.\n *\n * @type {number|string}\n * @since 2.3.0\n * @product highcharts\n */\n outerRadius: '105%'\n };\n this.init(options, chart);\n }\n /**\n * Initialize the Pane object\n *\n * @private\n * @function Highcharts.Pane#init\n *\n * @param {Highcharts.PaneOptions} options\n *\n * @param {Highcharts.Chart} chart\n */\n Pane.prototype.init = function (options, chart) {\n this.chart = chart;\n this.background = [];\n chart.pane.push(this);\n this.setOptions(options);\n };\n /**\n * @private\n * @function Highcharts.Pane#setOptions\n *\n * @param {Highcharts.PaneOptions} options\n */\n Pane.prototype.setOptions = function (options) {\n // Set options. Angular charts have a default background (#3318)\n this.options = options = merge(this.defaultOptions, this.chart.angular ? { background: {} } : void 0, options);\n };\n /**\n * Render the pane with its backgrounds.\n *\n * @private\n * @function Highcharts.Pane#render\n */\n Pane.prototype.render = function () {\n var options = this.options,\n backgroundOption = this.options.background,\n renderer = this.chart.renderer,\n len,\n i;\n if (!this.group) {\n this.group = renderer.g('pane-group')\n .attr({ zIndex: options.zIndex || 0 })\n .add();\n }\n this.updateCenter();\n // Render the backgrounds\n if (backgroundOption) {\n backgroundOption = splat(backgroundOption);\n len = Math.max(backgroundOption.length, this.background.length || 0);\n for (i = 0; i < len; i++) {\n // #6641 - if axis exists, chart is circular and apply\n // background\n if (backgroundOption[i] && this.axis) {\n this.renderBackground(merge(this.defaultBackgroundOptions, backgroundOption[i]), i);\n }\n else if (this.background[i]) {\n this.background[i] = this.background[i].destroy();\n this.background.splice(i, 1);\n }\n }\n }\n };\n /**\n * Render an individual pane background.\n *\n * @private\n * @function Highcharts.Pane#renderBackground\n *\n * @param {Highcharts.PaneBackgroundOptions} backgroundOptions\n * Background options\n *\n * @param {number} i\n * The index of the background in this.backgrounds\n */\n Pane.prototype.renderBackground = function (backgroundOptions, i) {\n var method = 'animate',\n attribs = {\n 'class': 'highcharts-pane ' + (backgroundOptions.className || '')\n };\n if (!this.chart.styledMode) {\n extend(attribs, {\n 'fill': backgroundOptions.backgroundColor,\n 'stroke': backgroundOptions.borderColor,\n 'stroke-width': backgroundOptions.borderWidth\n });\n }\n if (!this.background[i]) {\n this.background[i] = this.chart.renderer\n .path()\n .add(this.group);\n method = 'attr';\n }\n this.background[i][method]({\n 'd': this.axis.getPlotBandPath(backgroundOptions.from, backgroundOptions.to, backgroundOptions)\n }).attr(attribs);\n };\n /**\n * Gets the center for the pane and its axis.\n *\n * @private\n * @function Highcharts.Pane#updateCenter\n * @param {Highcharts.Axis} [axis]\n */\n Pane.prototype.updateCenter = function (axis) {\n this.center = (axis ||\n this.axis ||\n {}).center = CU.getCenter.call(this);\n };\n /**\n * Destroy the pane item\n *\n * @ignore\n * @private\n * @function Highcharts.Pane#destroy\n * /\n destroy: function () {\n erase(this.chart.pane, this);\n this.background.forEach(function (background) {\n background.destroy();\n });\n this.background.length = 0;\n this.group = this.group.destroy();\n },\n */\n /**\n * Update the pane item with new options\n *\n * @private\n * @function Highcharts.Pane#update\n * @param {Highcharts.PaneOptions} options\n * New pane options\n * @param {boolean} [redraw]\n */\n Pane.prototype.update = function (options, redraw) {\n merge(true, this.options, options);\n this.setOptions(this.options);\n this.render();\n this.chart.axes.forEach(function (axis) {\n if (axis.pane === this) {\n axis.pane = null;\n axis.update({}, redraw);\n }\n }, this);\n };\n return Pane;\n }());\n /**\n * Check whether element is inside or outside pane.\n * @private\n * @param {number} x\n * Element's x coordinate\n * @param {number} y\n * Element's y coordinate\n * @param {Array} inverted\n * `Chart.inverted` param\n * @param {Array} center\n * Pane's center (x, y) and diameter\n * @param {number} startAngle\n * Pane's normalized start angle in radians (<-PI, PI>)\n * @param {number} endAngle\n * Pane's normalized end angle in radians (<-PI, PI>)\n */\n function isInsidePane(x, y, center, startAngle, endAngle) {\n var insideSlice = true;\n var cx = center[0],\n cy = center[1];\n var distance = Math.sqrt(Math.pow(x - cx, 2) + Math.pow(y - cy, 2));\n if (defined(startAngle) && defined(endAngle)) {\n // Round angle to N-decimals to avoid numeric errors\n var angle = Math.atan2(correctFloat(y - cy, 8),\n correctFloat(x - cx, 8));\n // Ignore full circle panes:\n if (endAngle !== startAngle) {\n // If normalized start angle is bigger than normalized end,\n // it means angles have different signs. In such situation we\n // check the <-PI, startAngle> and ranges.\n if (startAngle > endAngle) {\n insideSlice = (angle >= startAngle &&\n angle <= Math.PI) || (angle <= endAngle &&\n angle >= -Math.PI);\n }\n else {\n // In this case, we simple check if angle is within the\n // range\n insideSlice = angle >= startAngle &&\n angle <= correctFloat(endAngle, 8);\n }\n }\n }\n // Round up radius because x and y values are rounded\n return distance <= Math.ceil(center[2] / 2) && insideSlice;\n }\n Chart.prototype.getHoverPane = function (eventArgs) {\n var chart = this;\n var hoverPane;\n if (eventArgs) {\n chart.pane.forEach(function (pane) {\n var x = eventArgs.chartX - chart.plotLeft,\n y = eventArgs.chartY - chart.plotTop;\n if (isInsidePane(x, y, pane.center)) {\n hoverPane = pane;\n }\n });\n }\n return hoverPane;\n };\n // Check if (x, y) position is within pane for polar\n addEvent(Chart, 'afterIsInsidePlot', function (e) {\n var _a;\n var chart = this;\n if (chart.polar) {\n if (e.options.inverted) {\n _a = [e.y, e.x], e.x = _a[0], e.y = _a[1];\n }\n e.isInsidePlot = chart.pane.some(function (pane) { return isInsidePane(e.x, e.y, pane.center, pane.axis && pane.axis.normalizedStartAngleRad, pane.axis && pane.axis.normalizedEndAngleRad); });\n }\n });\n addEvent(Pointer, 'beforeGetHoverData', function (eventArgs) {\n var chart = this.chart;\n if (chart.polar) {\n // Find pane we are currently hovering over.\n chart.hoverPane = chart.getHoverPane(eventArgs);\n // Edit filter method to handle polar\n eventArgs.filter = function (s) {\n return (s.visible &&\n !(!eventArgs.shared && s.directTouch) && // #3821\n pick(s.options.enableMouseTracking, true) &&\n (!chart.hoverPane || s.xAxis.pane === chart.hoverPane));\n };\n }\n else {\n chart.hoverPane = void 0;\n }\n });\n addEvent(Pointer, 'afterGetHoverData', function (eventArgs) {\n var chart = this.chart;\n if (eventArgs.hoverPoint &&\n eventArgs.hoverPoint.plotX &&\n eventArgs.hoverPoint.plotY &&\n chart.hoverPane &&\n !isInsidePane(eventArgs.hoverPoint.plotX, eventArgs.hoverPoint.plotY, chart.hoverPane.center)) {\n eventArgs.hoverPoint = void 0;\n }\n });\n H.Pane = Pane;\n\n return H.Pane;\n });\n _registerModule(_modules, 'Series/AreaRange/AreaRangePoint.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var _a = SeriesRegistry.seriesTypes.area.prototype,\n AreaPoint = _a.pointClass,\n areaProto = _a.pointClass.prototype;\n var defined = U.defined,\n isNumber = U.isNumber;\n /* *\n *\n * Class\n *\n * */\n var AreaRangePoint = /** @class */ (function (_super) {\n __extends(AreaRangePoint, _super);\n function AreaRangePoint() {\n /* *\n *\n * Properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n /**\n * Range series only. The high or maximum value for each data point.\n * @name Highcharts.Point#high\n * @type {number|undefined}\n */\n _this.high = void 0;\n /**\n * Range series only. The low or minimum value for each data point.\n * @name Highcharts.Point#low\n * @type {number|undefined}\n */\n _this.low = void 0;\n _this.options = void 0;\n _this.plotX = void 0;\n _this.series = void 0;\n return _this;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * @private\n */\n AreaRangePoint.prototype.setState = function () {\n var prevState = this.state,\n series = this.series,\n isPolar = series.chart.polar;\n if (!defined(this.plotHigh)) {\n // Boost doesn't calculate plotHigh\n this.plotHigh = series.yAxis.toPixels(this.high, true);\n }\n if (!defined(this.plotLow)) {\n // Boost doesn't calculate plotLow\n this.plotLow = this.plotY = series.yAxis.toPixels(this.low, true);\n }\n if (series.stateMarkerGraphic) {\n series.lowerStateMarkerGraphic = series.stateMarkerGraphic;\n series.stateMarkerGraphic = series.upperStateMarkerGraphic;\n }\n // Change state also for the top marker\n this.graphic = this.graphics && this.graphics[1];\n this.plotY = this.plotHigh;\n if (isPolar && isNumber(this.plotHighX)) {\n this.plotX = this.plotHighX;\n }\n // Top state:\n areaProto.setState.apply(this, arguments);\n this.state = prevState;\n // Now restore defaults\n this.plotY = this.plotLow;\n this.graphic = this.graphics && this.graphics[0];\n if (isPolar && isNumber(this.plotLowX)) {\n this.plotX = this.plotLowX;\n }\n if (series.stateMarkerGraphic) {\n series.upperStateMarkerGraphic = series.stateMarkerGraphic;\n series.stateMarkerGraphic = series.lowerStateMarkerGraphic;\n // Lower marker is stored at stateMarkerGraphic\n // to avoid reference duplication (#7021)\n series.lowerStateMarkerGraphic = void 0;\n }\n areaProto.setState.apply(this, arguments);\n };\n AreaRangePoint.prototype.haloPath = function () {\n var isPolar = this.series.chart.polar;\n var path = [];\n // Bottom halo\n this.plotY = this.plotLow;\n if (isPolar && isNumber(this.plotLowX)) {\n this.plotX = this.plotLowX;\n }\n if (this.isInside) {\n path = areaProto.haloPath.apply(this, arguments);\n }\n // Top halo\n this.plotY = this.plotHigh;\n if (isPolar && isNumber(this.plotHighX)) {\n this.plotX = this.plotHighX;\n }\n if (this.isTopInside) {\n path = path.concat(areaProto.haloPath.apply(this, arguments));\n }\n return path;\n };\n AreaRangePoint.prototype.isValid = function () {\n return isNumber(this.low) && isNumber(this.high);\n };\n return AreaRangePoint;\n }(AreaPoint));\n /* *\n *\n * Default Export\n *\n * */\n\n return AreaRangePoint;\n });\n _registerModule(_modules, 'Series/AreaRange/AreaRangeSeries.js', [_modules['Series/AreaRange/AreaRangePoint.js'], _modules['Core/Globals.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (AreaRangePoint, H, SeriesRegistry, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var noop = H.noop;\n var _a = SeriesRegistry.seriesTypes,\n AreaSeries = _a.area,\n areaProto = _a.area.prototype,\n columnProto = _a.column.prototype;\n var addEvent = U.addEvent,\n defined = U.defined,\n extend = U.extend,\n isArray = U.isArray,\n isNumber = U.isNumber,\n pick = U.pick,\n merge = U.merge;\n /* *\n *\n * Constants\n *\n * */\n /**\n * The area range series is a carteseian series with higher and lower values for\n * each point along an X axis, where the area between the values is shaded.\n *\n * @sample {highcharts} highcharts/demo/arearange/\n * Area range chart\n * @sample {highstock} stock/demo/arearange/\n * Area range chart\n *\n * @extends plotOptions.area\n * @product highcharts highstock\n * @excluding stack, stacking\n * @requires highcharts-more\n * @optionparent plotOptions.arearange\n *\n * @private\n */\n var areaRangeSeriesOptions = {\n /**\n * @see [fillColor](#plotOptions.arearange.fillColor)\n * @see [fillOpacity](#plotOptions.arearange.fillOpacity)\n *\n * @apioption plotOptions.arearange.color\n */\n /**\n * @default low\n * @apioption plotOptions.arearange.colorKey\n */\n /**\n * @see [color](#plotOptions.arearange.color)\n * @see [fillOpacity](#plotOptions.arearange.fillOpacity)\n *\n * @apioption plotOptions.arearange.fillColor\n */\n /**\n * @see [color](#plotOptions.arearange.color)\n * @see [fillColor](#plotOptions.arearange.fillColor)\n *\n * @default {highcharts} 0.75\n * @default {highstock} 0.75\n * @apioption plotOptions.arearange.fillOpacity\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`,\n `offsetX`,\n * `offsetY`,\n `opacity` and `width`.\n *\n * @type {boolean|Highcharts.ShadowOptionsObject}\n * @product highcharts\n * @apioption plotOptions.arearange.shadow\n */\n /**\n * Pixel width of the arearange graph line.\n *\n * @since 2.3.0\n *\n * @private\n */\n lineWidth: 1,\n /**\n * @type {number|null}\n */\n threshold: null,\n tooltip: {\n pointFormat: '\\u25CF ' +\n '{series.name}: {point.low} - {point.high}
'\n },\n /**\n * Whether the whole area or just the line should respond to mouseover\n * tooltips and other mouse or touch events.\n *\n * @since 2.3.0\n *\n * @private\n */\n trackByArea: true,\n /**\n * Extended data labels for range series types. Range series data\n * labels use no `x` and `y` options. Instead,\n they have `xLow`,\n * `xHigh`,\n `yLow` and `yHigh` options to allow the higher and lower\n * data label sets individually.\n *\n * @declare Highcharts.SeriesAreaRangeDataLabelsOptionsObject\n * @exclude x,\n y\n * @since 2.3.0\n * @product highcharts highstock\n *\n * @private\n */\n dataLabels: {\n align: void 0,\n verticalAlign: void 0,\n /**\n * X offset of the lower data labels relative to the point value.\n *\n * @sample highcharts/plotoptions/arearange-datalabels/\n * Data labels on range series\n * @sample highcharts/plotoptions/arearange-datalabels/\n * Data labels on range series\n */\n xLow: 0,\n /**\n * X offset of the higher data labels relative to the point value.\n *\n * @sample highcharts/plotoptions/arearange-datalabels/\n * Data labels on range series\n */\n xHigh: 0,\n /**\n * Y offset of the lower data labels relative to the point value.\n *\n * @sample highcharts/plotoptions/arearange-datalabels/\n * Data labels on range series\n */\n yLow: 0,\n /**\n * Y offset of the higher data labels relative to the point value.\n *\n * @sample highcharts/plotoptions/arearange-datalabels/\n * Data labels on range series\n */\n yHigh: 0\n }\n };\n /* *\n *\n * Class\n *\n * */\n /**\n * The AreaRange series type.\n *\n * @private\n * @class\n * @name Highcharts.seriesTypes.arearange\n *\n * @augments Highcharts.Series\n */\n var AreaRangeSeries = /** @class */ (function (_super) {\n __extends(AreaRangeSeries, _super);\n function AreaRangeSeries() {\n /**\n *\n * Static Properties\n *\n */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n /* *\n *\n * Properties\n *\n * */\n _this.data = void 0;\n _this.options = void 0;\n _this.points = void 0;\n _this.lowerStateMarkerGraphic = void 0;\n _this.xAxis = void 0;\n return _this;\n }\n /* *\n *\n * Functions\n *\n * */\n AreaRangeSeries.prototype.toYData = function (point) {\n return [point.low, point.high];\n };\n /**\n * Translate a point's plotHigh from the internal angle and radius measures\n * to true plotHigh coordinates. This is an addition of the toXY method\n * found in Polar.js, because it runs too early for arearanges to be\n * considered (#3419).\n * @private\n */\n AreaRangeSeries.prototype.highToXY = function (point) {\n // Find the polar plotX and plotY\n var chart = this.chart,\n xy = this.xAxis.postTranslate(point.rectPlotX || 0,\n this.yAxis.len - (point.plotHigh || 0));\n point.plotHighX = xy.x - chart.plotLeft;\n point.plotHigh = xy.y - chart.plotTop;\n point.plotLowX = point.plotX;\n };\n /**\n * Extend the line series' getSegmentPath method by applying the segment\n * path to both lower and higher values of the range.\n * @private\n */\n AreaRangeSeries.prototype.getGraphPath = function (points) {\n var highPoints = [],\n highAreaPoints = [],\n getGraphPath = areaProto.getGraphPath,\n options = this.options,\n polar = this.chart.polar,\n connectEnds = polar && options.connectEnds !== false,\n connectNulls = options.connectNulls;\n var i,\n point,\n pointShim,\n step = options.step;\n points = points || this.points;\n // Create the top line and the top part of the area fill. The area fill\n // compensates for null points by drawing down to the lower graph,\n // moving across the null gap and starting again at the lower graph.\n i = points.length;\n while (i--) {\n point = points[i];\n // Support for polar\n var highAreaPoint = polar ? {\n plotX: point.rectPlotX,\n plotY: point.yBottom,\n doCurve: false // #5186, gaps in areasplinerange fill\n } : {\n plotX: point.plotX,\n plotY: point.plotY,\n doCurve: false // #5186, gaps in areasplinerange fill\n };\n if (!point.isNull &&\n !connectEnds &&\n !connectNulls &&\n (!points[i + 1] || points[i + 1].isNull)) {\n highAreaPoints.push(highAreaPoint);\n }\n pointShim = {\n polarPlotY: point.polarPlotY,\n rectPlotX: point.rectPlotX,\n yBottom: point.yBottom,\n // plotHighX is for polar charts\n plotX: pick(point.plotHighX, point.plotX),\n plotY: point.plotHigh,\n isNull: point.isNull\n };\n highAreaPoints.push(pointShim);\n highPoints.push(pointShim);\n if (!point.isNull &&\n !connectEnds &&\n !connectNulls &&\n (!points[i - 1] || points[i - 1].isNull)) {\n highAreaPoints.push(highAreaPoint);\n }\n }\n // Get the paths\n var lowerPath = getGraphPath.call(this,\n points);\n if (step) {\n if (step === true) {\n step = 'left';\n }\n options.step = {\n left: 'right',\n center: 'center',\n right: 'left'\n }[step]; // swap for reading in getGraphPath\n }\n var higherPath = getGraphPath.call(this,\n highPoints);\n var higherAreaPath = getGraphPath.call(this,\n highAreaPoints);\n options.step = step;\n // Create a line on both top and bottom of the range\n var linePath = [].concat(lowerPath,\n higherPath);\n // For the area path, we need to change the 'move' statement into\n // 'lineTo'\n if (!this.chart.polar &&\n higherAreaPath[0] &&\n higherAreaPath[0][0] === 'M') {\n // This probably doesn't work for spline\n higherAreaPath[0] = [\n 'L',\n higherAreaPath[0][1],\n higherAreaPath[0][2]\n ];\n }\n this.graphPath = linePath;\n this.areaPath = lowerPath.concat(higherAreaPath);\n // Prepare for sideways animation\n linePath.isArea = true;\n linePath.xMap = lowerPath.xMap;\n this.areaPath.xMap = lowerPath.xMap;\n return linePath;\n };\n /**\n * Extend the basic drawDataLabels method by running it for both lower and\n * higher values.\n * @private\n */\n AreaRangeSeries.prototype.drawDataLabels = function () {\n var data = this.points,\n length = data.length,\n originalDataLabels = [],\n dataLabelOptions = this.options.dataLabels,\n inverted = this.chart.inverted;\n var i,\n point,\n up,\n upperDataLabelOptions,\n lowerDataLabelOptions;\n if (dataLabelOptions) {\n // Split into upper and lower options. If data labels is an array,\n // the first element is the upper label, the second is the lower.\n //\n // TODO: We want to change this and allow multiple labels for both\n // upper and lower values in the future - introducing some options\n // for which point value to use as Y for the dataLabel, so that this\n // could be handled in Series.drawDataLabels. This would also\n // improve performance since we now have to loop over all the points\n // multiple times to work around the data label logic.\n if (isArray(dataLabelOptions)) {\n upperDataLabelOptions = dataLabelOptions[0] || {\n enabled: false\n };\n lowerDataLabelOptions = dataLabelOptions[1] || {\n enabled: false\n };\n }\n else {\n // Make copies\n upperDataLabelOptions = extend({}, dataLabelOptions);\n upperDataLabelOptions.x = dataLabelOptions.xHigh;\n upperDataLabelOptions.y = dataLabelOptions.yHigh;\n lowerDataLabelOptions = extend({}, dataLabelOptions);\n lowerDataLabelOptions.x = dataLabelOptions.xLow;\n lowerDataLabelOptions.y = dataLabelOptions.yLow;\n }\n // Draw upper labels\n if (upperDataLabelOptions.enabled || this._hasPointLabels) {\n // Set preliminary values for plotY and dataLabel\n // and draw the upper labels\n i = length;\n while (i--) {\n point = data[i];\n if (point) {\n var _a = point.plotHigh,\n plotHigh = _a === void 0 ? 0 : _a,\n _b = point.plotLow,\n plotLow = _b === void 0 ? 0 : _b;\n up = upperDataLabelOptions.inside ?\n plotHigh < plotLow :\n plotHigh > plotLow;\n point.y = point.high;\n point._plotY = point.plotY;\n point.plotY = plotHigh;\n // Store original data labels and set preliminary label\n // objects to be picked up in the uber method\n originalDataLabels[i] = point.dataLabel;\n point.dataLabel = point.dataLabelUpper;\n // Set the default offset\n point.below = up;\n if (inverted) {\n if (!upperDataLabelOptions.align) {\n upperDataLabelOptions.align = up ?\n 'right' : 'left';\n }\n }\n else {\n if (!upperDataLabelOptions.verticalAlign) {\n upperDataLabelOptions.verticalAlign = up ?\n 'top' :\n 'bottom';\n }\n }\n }\n }\n this.options.dataLabels = upperDataLabelOptions;\n if (areaProto.drawDataLabels) {\n // #1209:\n areaProto.drawDataLabels.apply(this, arguments);\n }\n // Reset state after the upper labels were created. Move\n // it to point.dataLabelUpper and reassign the originals.\n // We do this here to support not drawing a lower label.\n i = length;\n while (i--) {\n point = data[i];\n if (point) {\n point.dataLabelUpper = point.dataLabel;\n point.dataLabel = originalDataLabels[i];\n delete point.dataLabels;\n point.y = point.low;\n point.plotY = point._plotY;\n }\n }\n }\n // Draw lower labels\n if (lowerDataLabelOptions.enabled || this._hasPointLabels) {\n i = length;\n while (i--) {\n point = data[i];\n if (point) {\n var _c = point.plotHigh,\n plotHigh = _c === void 0 ? 0 : _c,\n _d = point.plotLow,\n plotLow = _d === void 0 ? 0 : _d;\n up = lowerDataLabelOptions.inside ?\n plotHigh < plotLow :\n plotHigh > plotLow;\n // Set the default offset\n point.below = !up;\n if (inverted) {\n if (!lowerDataLabelOptions.align) {\n lowerDataLabelOptions.align = up ?\n 'left' : 'right';\n }\n }\n else {\n if (!lowerDataLabelOptions.verticalAlign) {\n lowerDataLabelOptions.verticalAlign = up ?\n 'bottom' :\n 'top';\n }\n }\n }\n }\n this.options.dataLabels = lowerDataLabelOptions;\n if (areaProto.drawDataLabels) {\n areaProto.drawDataLabels.apply(this, arguments);\n }\n }\n // Merge upper and lower into point.dataLabels for later destroying\n if (upperDataLabelOptions.enabled) {\n i = length;\n while (i--) {\n point = data[i];\n if (point) {\n point.dataLabels = [\n point.dataLabelUpper,\n point.dataLabel\n ].filter(function (label) {\n return !!label;\n });\n }\n }\n }\n // Reset options\n this.options.dataLabels = dataLabelOptions;\n }\n };\n AreaRangeSeries.prototype.alignDataLabel = function () {\n columnProto.alignDataLabel.apply(this, arguments);\n };\n AreaRangeSeries.prototype.drawPoints = function () {\n var series = this,\n pointLength = series.points.length;\n var i,\n point;\n // Draw bottom points\n areaProto.drawPoints.apply(series, arguments);\n // Prepare drawing top points\n i = 0;\n while (i < pointLength) {\n point = series.points[i];\n /**\n * Array for multiple SVG graphics representing the point in the\n * chart. Only used in cases where the point can not be represented\n * by a single graphic.\n *\n * @see Highcharts.Point#graphic\n *\n * @name Highcharts.Point#graphics\n * @type {Array|undefined}\n */\n point.graphics = point.graphics || [];\n // Save original props to be overridden by temporary props for top\n // points\n point.origProps = {\n plotY: point.plotY,\n plotX: point.plotX,\n isInside: point.isInside,\n negative: point.negative,\n zone: point.zone,\n y: point.y\n };\n if (point.graphic || point.graphics[0]) {\n point.graphics[0] = point.graphic;\n }\n point.graphic = point.graphics[1];\n point.plotY = point.plotHigh;\n if (defined(point.plotHighX)) {\n point.plotX = point.plotHighX;\n }\n point.y = pick(point.high, point.origProps.y); // #15523\n point.negative = point.y < (series.options.threshold || 0);\n if (series.zones.length) {\n point.zone = point.getZone();\n }\n if (!series.chart.polar) {\n point.isInside = point.isTopInside = (typeof point.plotY !== 'undefined' &&\n point.plotY >= 0 &&\n point.plotY <= series.yAxis.len && // #3519\n point.plotX >= 0 &&\n point.plotX <= series.xAxis.len);\n }\n i++;\n }\n // Draw top points\n areaProto.drawPoints.apply(series, arguments);\n // Reset top points preliminary modifications\n i = 0;\n while (i < pointLength) {\n point = series.points[i];\n point.graphics = point.graphics || [];\n if (point.graphic || point.graphics[1]) {\n point.graphics[1] = point.graphic;\n }\n point.graphic = point.graphics[0];\n if (point.origProps) {\n extend(point, point.origProps);\n delete point.origProps;\n }\n i++;\n }\n };\n AreaRangeSeries.defaultOptions = merge(AreaSeries.defaultOptions, areaRangeSeriesOptions);\n return AreaRangeSeries;\n }(AreaSeries));\n addEvent(AreaRangeSeries, 'afterTranslate', function () {\n // Set plotLow and plotHigh\n var _this = this;\n // Rules out lollipop, but lollipop should not inherit range series in the\n // first place\n if (this.pointArrayMap.join(',') === 'low,high') {\n this.points.forEach(function (point) {\n var high = point.high,\n plotY = point.plotY;\n if (point.isNull) {\n point.plotY = void 0;\n }\n else {\n point.plotLow = plotY;\n // Calculate plotHigh value based on each yAxis scale (#15752)\n point.plotHigh = isNumber(high) ? _this.yAxis.translate(_this.dataModify ?\n _this.dataModify.modifyValue(high) : high, false, true, void 0, true) : void 0;\n if (_this.dataModify) {\n point.yBottom = point.plotHigh;\n }\n }\n });\n }\n }, { order: 0 });\n addEvent(AreaRangeSeries, 'afterTranslate', function () {\n var _this = this;\n var inverted = this.chart.inverted;\n this.points.forEach(function (point) {\n // Postprocessing after the PolarComposition's afterTranslate\n if (_this.chart.polar) {\n _this.highToXY(point);\n point.plotLow = point.plotY;\n point.tooltipPos = [\n ((point.plotHighX || 0) + (point.plotLowX || 0)) / 2,\n ((point.plotHigh || 0) + (point.plotLow || 0)) / 2\n ];\n // Put the tooltip in the middle of the range\n }\n else {\n var tooltipPos = point.pos(false,\n point.plotLow),\n posHigh = point.pos(false,\n point.plotHigh);\n if (tooltipPos && posHigh) {\n tooltipPos[0] = (tooltipPos[0] + posHigh[0]) / 2;\n tooltipPos[1] = (tooltipPos[1] + posHigh[1]) / 2;\n }\n point.tooltipPos = tooltipPos;\n }\n });\n }, { order: 3 });\n extend(AreaRangeSeries.prototype, {\n deferTranslatePolar: true,\n pointArrayMap: ['low', 'high'],\n pointClass: AreaRangePoint,\n pointValKey: 'low',\n setStackedPoints: noop\n });\n SeriesRegistry.registerSeriesType('arearange', AreaRangeSeries);\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Options\n *\n * */\n /**\n * A `arearange` series. If the [type](#series.arearange.type) option is not\n * specified, it is inherited from [chart.type](#chart.type).\n *\n *\n * @extends series,plotOptions.arearange\n * @excluding dataParser, dataURL, stack, stacking\n * @product highcharts highstock\n * @requires highcharts-more\n * @apioption series.arearange\n */\n /**\n * @see [fillColor](#series.arearange.fillColor)\n * @see [fillOpacity](#series.arearange.fillOpacity)\n *\n * @apioption series.arearange.color\n */\n /**\n * An array of data points for the series. For the `arearange` series type,\n * points can be given in the following ways:\n *\n * 1. An array of arrays with 3 or 2 values. In this case, the values\n * correspond to `x,low,high`. If the first value is a string, it is\n * applied as the name of the point, and the `x` value is inferred.\n * The `x` value can also be omitted, in which case the inner arrays\n * should be of length 2\\. Then the `x` value is automatically calculated,\n * either starting at 0 and incremented by 1, or from `pointStart`\n * and `pointInterval` given in the series options.\n * ```js\n * data: [\n * [0, 8, 3],\n * [1, 1, 1],\n * [2, 6, 8]\n * ]\n * ```\n *\n * 2. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.arearange.turboThreshold),\n * this option is not available.\n * ```js\n * data: [{\n * x: 1,\n * low: 9,\n * high: 0,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * low: 3,\n * high: 4,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @type {Array|Array<(number|string),number,number>|*>}\n * @extends series.line.data\n * @excluding marker, y\n * @product highcharts highstock\n * @apioption series.arearange.data\n */\n /**\n * @extends series.arearange.dataLabels\n * @product highcharts highstock\n * @apioption series.arearange.data.dataLabels\n */\n /**\n * @see [color](#series.arearange.color)\n * @see [fillOpacity](#series.arearange.fillOpacity)\n *\n * @apioption series.arearange.fillColor\n */\n /**\n * @see [color](#series.arearange.color)\n * @see [fillColor](#series.arearange.fillColor)\n *\n * @default {highcharts} 0.75\n * @default {highstock} 0.75\n * @apioption series.arearange.fillOpacity\n */\n /**\n * The high or maximum value for each data point.\n *\n * @type {number}\n * @product highcharts highstock\n * @apioption series.arearange.data.high\n */\n /**\n * The low or minimum value for each data point.\n *\n * @type {number}\n * @product highcharts highstock\n * @apioption series.arearange.data.low\n */\n ''; // adds doclets above to tranpiled file\n\n return AreaRangeSeries;\n });\n _registerModule(_modules, 'Series/AreaSplineRange/AreaSplineRangeSeries.js', [_modules['Series/AreaRange/AreaRangeSeries.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (AreaRangeSeries, SeriesRegistry, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var splineProto = SeriesRegistry.seriesTypes.spline.prototype;\n var merge = U.merge,\n extend = U.extend;\n /* *\n *\n * Class\n *\n * */\n /**\n * The areasplinerange series type.\n *\n * @private\n * @class\n * @name Highcharts.seriesTypes.areasplinerange\n *\n * @augments Highcharts.Series\n */\n var AreaSplineRangeSeries = /** @class */ (function (_super) {\n __extends(AreaSplineRangeSeries, _super);\n function AreaSplineRangeSeries() {\n /* *\n *\n * Static Properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n /* *\n *\n * Properties\n *\n * */\n _this.options = void 0;\n _this.data = void 0;\n _this.points = void 0;\n return _this;\n }\n AreaSplineRangeSeries.defaultOptions = merge(AreaRangeSeries.defaultOptions);\n return AreaSplineRangeSeries;\n }(AreaRangeSeries));\n extend(AreaSplineRangeSeries.prototype, {\n getPointSpline: splineProto.getPointSpline\n });\n SeriesRegistry.registerSeriesType('areasplinerange', AreaSplineRangeSeries);\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Options\n *\n * */\n /**\n * The area spline range is a cartesian series type with higher and\n * lower Y values along an X axis. The area inside the range is colored, and\n * the graph outlining the area is a smoothed spline.\n *\n * @sample {highstock|highstock} stock/demo/areasplinerange/\n * Area spline range\n *\n * @extends plotOptions.arearange\n * @since 2.3.0\n * @excluding step, boostThreshold, boostBlending\n * @product highcharts highstock\n * @requires highcharts-more\n * @apioption plotOptions.areasplinerange\n */\n /**\n * @see [fillColor](#plotOptions.areasplinerange.fillColor)\n * @see [fillOpacity](#plotOptions.areasplinerange.fillOpacity)\n *\n * @apioption plotOptions.areasplinerange.color\n */\n /**\n * @see [color](#plotOptions.areasplinerange.color)\n * @see [fillOpacity](#plotOptions.areasplinerange.fillOpacity)\n *\n * @apioption plotOptions.areasplinerange.fillColor\n */\n /**\n * @see [color](#plotOptions.areasplinerange.color)\n * @see [fillColor](#plotOptions.areasplinerange.fillColor)\n *\n * @default 0.75\n * @apioption plotOptions.areasplinerange.fillOpacity\n */\n /**\n * A `areasplinerange` series. If the [type](#series.areasplinerange.type)\n * option is not specified, it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.areasplinerange\n * @excluding dataParser, dataURL, stack, step, boostThreshold, boostBlending\n * @product highcharts highstock\n * @requires highcharts-more\n * @apioption series.areasplinerange\n */\n /**\n * @see [fillColor](#series.areasplinerange.fillColor)\n * @see [fillOpacity](#series.areasplinerange.fillOpacity)\n *\n * @apioption series.areasplinerange.color\n */\n /**\n * An array of data points for the series. For the `areasplinerange`\n * series type, points can be given in the following ways:\n *\n * 1. An array of arrays with 3 or 2 values. In this case, the values correspond\n * to `x,low,high`. If the first value is a string, it is applied as the name\n * of the point, and the `x` value is inferred. The `x` value can also be\n * omitted, in which case the inner arrays should be of length 2\\. Then the\n * `x` value is automatically calculated, either starting at 0 and\n * incremented by 1, or from `pointStart` and `pointInterval` given in the\n * series options.\n * ```js\n * data: [\n * [0, 0, 5],\n * [1, 9, 1],\n * [2, 5, 2]\n * ]\n * ```\n *\n * 2. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.areasplinerange.turboThreshold), this option is\n * not available.\n * ```js\n * data: [{\n * x: 1,\n * low: 5,\n * high: 0,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * low: 4,\n * high: 1,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @type {Array|Array<(number|string),number,number>|*>}\n * @extends series.arearange.data\n * @product highcharts highstock\n * @apioption series.areasplinerange.data\n */\n /**\n * @see [color](#series.areasplinerange.color)\n * @see [fillOpacity](#series.areasplinerange.fillOpacity)\n *\n * @apioption series.areasplinerange.fillColor\n */\n /**\n * @see [color](#series.areasplinerange.color)\n * @see [fillColor](#series.areasplinerange.fillColor)\n *\n * @default 0.75\n * @apioption series.areasplinerange.fillOpacity\n */\n ''; // adds doclets above to transpiled file\n\n return AreaSplineRangeSeries;\n });\n _registerModule(_modules, 'Series/BoxPlot/BoxPlotSeries.js', [_modules['Series/Column/ColumnSeries.js'], _modules['Core/Globals.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (ColumnSeries, H, SeriesRegistry, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var noop = H.noop;\n var extend = U.extend,\n merge = U.merge,\n pick = U.pick;\n /**\n * The boxplot series type.\n *\n * @private\n * @class\n * @name Highcharts.seriesTypes#boxplot\n *\n * @augments Highcharts.Series\n */\n /* *\n *\n * Class\n *\n * */\n var BoxPlotSeries = /** @class */ (function (_super) {\n __extends(BoxPlotSeries, _super);\n function BoxPlotSeries() {\n /* *\n *\n * Static Properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n /* *\n *\n * Properties\n *\n * */\n _this.data = void 0;\n _this.options = void 0;\n _this.points = void 0;\n return _this;\n }\n /* *\n *\n * Functions\n *\n * */\n // Get presentational attributes\n BoxPlotSeries.prototype.pointAttribs = function () {\n // No attributes should be set on point.graphic which is the group\n return {};\n };\n // Translate data points from raw values x and y to plotX and plotY\n BoxPlotSeries.prototype.translate = function () {\n var series = this,\n yAxis = series.yAxis,\n pointArrayMap = series.pointArrayMap;\n _super.prototype.translate.apply(series);\n // do the translation on each point dimension\n series.points.forEach(function (point) {\n pointArrayMap.forEach(function (key) {\n if (point[key] !== null) {\n point[key + 'Plot'] = yAxis.translate(point[key], 0, 1, 0, 1);\n }\n });\n point.plotHigh = point.highPlot; // For data label validation\n });\n };\n // eslint-disable-next-line valid-jsdoc\n /**\n * Draw the data points\n * @private\n */\n BoxPlotSeries.prototype.drawPoints = function () {\n var series = this,\n points = series.points,\n options = series.options,\n chart = series.chart,\n renderer = chart.renderer,\n q1Plot,\n q3Plot,\n highPlot,\n lowPlot,\n medianPlot,\n medianPath,\n crispCorr,\n crispX = 0,\n boxPath,\n width,\n left,\n right,\n halfWidth, \n // error bar inherits this series type but doesn't do quartiles\n doQuartiles = series.doQuartiles !== false,\n pointWiskerLength,\n whiskerLength = series.options.whiskerLength;\n points.forEach(function (point) {\n var graphic = point.graphic,\n verb = graphic ? 'animate' : 'attr',\n shapeArgs = point.shapeArgs,\n boxAttr = {},\n stemAttr = {},\n whiskersAttr = {},\n medianAttr = {},\n color = point.color || series.color;\n if (typeof point.plotY !== 'undefined') {\n // crisp vector coordinates\n width = Math.round(shapeArgs.width);\n left = Math.floor(shapeArgs.x);\n right = left + width;\n halfWidth = Math.round(width / 2);\n q1Plot = Math.floor(doQuartiles ? point.q1Plot : point.lowPlot);\n q3Plot = Math.floor(doQuartiles ? point.q3Plot : point.lowPlot);\n highPlot = Math.floor(point.highPlot);\n lowPlot = Math.floor(point.lowPlot);\n if (!graphic) {\n point.graphic = graphic = renderer.g('point')\n .add(series.group);\n point.stem = renderer.path()\n .addClass('highcharts-boxplot-stem')\n .add(graphic);\n if (whiskerLength) {\n point.whiskers = renderer.path()\n .addClass('highcharts-boxplot-whisker')\n .add(graphic);\n }\n if (doQuartiles) {\n point.box = renderer.path(boxPath)\n .addClass('highcharts-boxplot-box')\n .add(graphic);\n }\n point.medianShape = renderer.path(medianPath)\n .addClass('highcharts-boxplot-median')\n .add(graphic);\n }\n if (!chart.styledMode) {\n // Stem attributes\n stemAttr.stroke =\n point.stemColor || options.stemColor || color;\n stemAttr['stroke-width'] = pick(point.stemWidth, options.stemWidth, options.lineWidth);\n stemAttr.dashstyle = (point.stemDashStyle ||\n options.stemDashStyle ||\n options.dashStyle);\n point.stem.attr(stemAttr);\n // Whiskers attributes\n if (whiskerLength) {\n whiskersAttr.stroke = (point.whiskerColor ||\n options.whiskerColor ||\n color);\n whiskersAttr['stroke-width'] = pick(point.whiskerWidth, options.whiskerWidth, options.lineWidth);\n whiskersAttr.dashstyle = (point.whiskerDashStyle ||\n options.whiskerDashStyle ||\n options.dashStyle);\n point.whiskers.attr(whiskersAttr);\n }\n if (doQuartiles) {\n boxAttr.fill = (point.fillColor ||\n options.fillColor ||\n color);\n boxAttr.stroke = options.lineColor || color;\n boxAttr['stroke-width'] = options.lineWidth || 0;\n boxAttr.dashstyle = (point.boxDashStyle ||\n options.boxDashStyle ||\n options.dashStyle);\n point.box.attr(boxAttr);\n }\n // Median attributes\n medianAttr.stroke = (point.medianColor ||\n options.medianColor ||\n color);\n medianAttr['stroke-width'] = pick(point.medianWidth, options.medianWidth, options.lineWidth);\n medianAttr.dashstyle = (point.medianDashStyle ||\n options.medianDashStyle ||\n options.dashStyle);\n point.medianShape.attr(medianAttr);\n }\n var d = void 0;\n // The stem\n crispCorr = (point.stem.strokeWidth() % 2) / 2;\n crispX = left + halfWidth + crispCorr;\n d = [\n // stem up\n ['M', crispX, q3Plot],\n ['L', crispX, highPlot],\n // stem down\n ['M', crispX, q1Plot],\n ['L', crispX, lowPlot]\n ];\n point.stem[verb]({ d: d });\n // The box\n if (doQuartiles) {\n crispCorr = (point.box.strokeWidth() % 2) / 2;\n q1Plot = Math.floor(q1Plot) + crispCorr;\n q3Plot = Math.floor(q3Plot) + crispCorr;\n left += crispCorr;\n right += crispCorr;\n d = [\n ['M', left, q3Plot],\n ['L', left, q1Plot],\n ['L', right, q1Plot],\n ['L', right, q3Plot],\n ['L', left, q3Plot],\n ['Z']\n ];\n point.box[verb]({ d: d });\n }\n // The whiskers\n if (whiskerLength) {\n crispCorr = (point.whiskers.strokeWidth() % 2) / 2;\n highPlot = highPlot + crispCorr;\n lowPlot = lowPlot + crispCorr;\n pointWiskerLength = (/%$/).test(whiskerLength) ?\n halfWidth * parseFloat(whiskerLength) / 100 :\n whiskerLength / 2;\n d = [\n // High whisker\n ['M', crispX - pointWiskerLength, highPlot],\n ['L', crispX + pointWiskerLength, highPlot],\n // Low whisker\n ['M', crispX - pointWiskerLength, lowPlot],\n ['L', crispX + pointWiskerLength, lowPlot]\n ];\n point.whiskers[verb]({ d: d });\n }\n // The median\n medianPlot = Math.round(point.medianPlot);\n crispCorr = (point.medianShape.strokeWidth() % 2) / 2;\n medianPlot = medianPlot + crispCorr;\n d = [\n ['M', left, medianPlot],\n ['L', right, medianPlot]\n ];\n point.medianShape[verb]({ d: d });\n }\n });\n };\n // return a plain array for speedy calculation\n BoxPlotSeries.prototype.toYData = function (point) {\n return [point.low, point.q1, point.median, point.q3, point.high];\n };\n /**\n * A box plot is a convenient way of depicting groups of data through their\n * five-number summaries: the smallest observation (sample minimum), lower\n * quartile (Q1), median (Q2), upper quartile (Q3), and largest observation\n * (sample maximum).\n *\n * @sample highcharts/demo/box-plot/\n * Box plot\n *\n * @extends plotOptions.column\n * @excluding borderColor, borderRadius, borderWidth, groupZPadding,\n * states, boostThreshold, boostBlending\n * @product highcharts\n * @requires highcharts-more\n * @optionparent plotOptions.boxplot\n */\n BoxPlotSeries.defaultOptions = merge(ColumnSeries.defaultOptions, {\n /**\n * @type {number|null}\n */\n threshold: null,\n tooltip: {\n pointFormat: '\\u25CF ' +\n '{series.name}
' +\n 'Maximum: {point.high}
' +\n 'Upper quartile: {point.q3}
' +\n 'Median: {point.median}
' +\n 'Lower quartile: {point.q1}
' +\n 'Minimum: {point.low}
'\n },\n /**\n * The length of the whiskers, the horizontal lines marking low and\n * high values. It can be a numerical pixel value, or a percentage\n * value of the box width. Set `0` to disable whiskers.\n *\n * @sample {highcharts} highcharts/plotoptions/box-plot-styling/\n * True by default\n *\n * @type {number|string}\n * @since 3.0\n * @product highcharts\n */\n whiskerLength: '50%',\n /**\n * The fill color of the box.\n *\n * In styled mode, the fill color can be set with the\n * `.highcharts-boxplot-box` class.\n *\n * @sample {highcharts} highcharts/plotoptions/box-plot-styling/\n * Box plot styling\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @default #ffffff\n * @since 3.0\n * @product highcharts\n */\n fillColor: \"#ffffff\" /* Palette.backgroundColor */,\n /**\n * The width of the line surrounding the box. If any of\n * [stemWidth](#plotOptions.boxplot.stemWidth),\n * [medianWidth](#plotOptions.boxplot.medianWidth)\n * or [whiskerWidth](#plotOptions.boxplot.whiskerWidth) are `null`,\n * the lineWidth also applies to these lines.\n *\n * @sample {highcharts} highcharts/plotoptions/box-plot-styling/\n * Box plot styling\n * @sample {highcharts} highcharts/plotoptions/error-bar-styling/\n * Error bar styling\n *\n * @since 3.0\n * @product highcharts\n */\n lineWidth: 1,\n /**\n * The color of the median line. If `undefined`, the general series\n * color applies.\n *\n * In styled mode, the median stroke width can be set with the\n * `.highcharts-boxplot-median` class.\n *\n * @sample {highcharts} highcharts/plotoptions/box-plot-styling/\n * Box plot styling\n * @sample {highcharts} highcharts/css/boxplot/\n * Box plot in styled mode\n * @sample {highcharts} highcharts/plotoptions/error-bar-styling/\n * Error bar styling\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject}\n * @since 3.0\n * @product highcharts\n * @apioption plotOptions.boxplot.medianColor\n */\n /**\n * The pixel width of the median line. If `null`, the\n * [lineWidth](#plotOptions.boxplot.lineWidth) is used.\n *\n * In styled mode, the median stroke width can be set with the\n * `.highcharts-boxplot-median` class.\n *\n * @sample {highcharts} highcharts/plotoptions/box-plot-styling/\n * Box plot styling\n * @sample {highcharts} highcharts/css/boxplot/\n * Box plot in styled mode\n *\n * @type {number|null}\n * @since 3.0\n * @product highcharts\n */\n medianWidth: 2,\n /*\n // States are not working and are removed from docs.\n // Refer to: #2340\n states: {\n hover: {\n brightness: -0.3\n }\n },\n */\n /**\n * The color of the stem, the vertical line extending from the box to\n * the whiskers. If `undefined`, the series color is used.\n *\n * In styled mode, the stem stroke can be set with the\n * `.highcharts-boxplot-stem` class.\n *\n * @sample {highcharts} highcharts/plotoptions/box-plot-styling/\n * Box plot styling\n * @sample {highcharts} highcharts/css/boxplot/\n * Box plot in styled mode\n * @sample {highcharts} highcharts/plotoptions/error-bar-styling/\n * Error bar styling\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 3.0\n * @product highcharts\n * @apioption plotOptions.boxplot.stemColor\n */\n /**\n * The dash style of the box.\n *\n * @sample {highcharts} highcharts/plotoptions/box-plot-styling/\n * Box plot styling\n * @sample {highcharts} highcharts/css/boxplot/\n * Box plot in styled mode\n *\n * @type {Highcharts.DashStyleValue}\n * @default Solid\n * @since 8.1.0\n * @product highcharts\n * @apioption plotOptions.boxplot.boxDashStyle\n */\n /**\n * The dash style of the median.\n *\n * @sample {highcharts} highcharts/plotoptions/box-plot-styling/\n * Box plot styling\n * @sample {highcharts} highcharts/css/boxplot/\n * Box plot in styled mode\n *\n * @type {Highcharts.DashStyleValue}\n * @default Solid\n * @since 8.1.0\n * @product highcharts\n * @apioption plotOptions.boxplot.medianDashStyle\n */\n /**\n * The dash style of the stem, the vertical line extending from the\n * box to the whiskers.\n *\n * @sample {highcharts} highcharts/plotoptions/box-plot-styling/\n * Box plot styling\n * @sample {highcharts} highcharts/css/boxplot/\n * Box plot in styled mode\n * @sample {highcharts} highcharts/plotoptions/error-bar-styling/\n * Error bar styling\n *\n * @type {Highcharts.DashStyleValue}\n * @default Solid\n * @since 3.0\n * @product highcharts\n * @apioption plotOptions.boxplot.stemDashStyle\n */\n /**\n * The dash style of the whiskers.\n *\n * @sample {highcharts} highcharts/plotoptions/box-plot-styling/\n * Box plot styling\n * @sample {highcharts} highcharts/css/boxplot/\n * Box plot in styled mode\n *\n * @type {Highcharts.DashStyleValue}\n * @default Solid\n * @since 8.1.0\n * @product highcharts\n * @apioption plotOptions.boxplot.whiskerDashStyle\n */\n /**\n * The width of the stem, the vertical line extending from the box to\n * the whiskers. If `undefined`, the width is inherited from the\n * [lineWidth](#plotOptions.boxplot.lineWidth) option.\n *\n * In styled mode, the stem stroke width can be set with the\n * `.highcharts-boxplot-stem` class.\n *\n * @sample {highcharts} highcharts/plotoptions/box-plot-styling/\n * Box plot styling\n * @sample {highcharts} highcharts/css/boxplot/\n * Box plot in styled mode\n * @sample {highcharts} highcharts/plotoptions/error-bar-styling/\n * Error bar styling\n *\n * @type {number}\n * @since 3.0\n * @product highcharts\n * @apioption plotOptions.boxplot.stemWidth\n */\n /**\n * @default high\n * @apioption plotOptions.boxplot.colorKey\n */\n /**\n * The color of the whiskers, the horizontal lines marking low and high\n * values. When `undefined`, the general series color is used.\n *\n * In styled mode, the whisker stroke can be set with the\n * `.highcharts-boxplot-whisker` class .\n *\n * @sample {highcharts} highcharts/plotoptions/box-plot-styling/\n * Box plot styling\n * @sample {highcharts} highcharts/css/boxplot/\n * Box plot in styled mode\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 3.0\n * @product highcharts\n * @apioption plotOptions.boxplot.whiskerColor\n */\n /**\n * The line width of the whiskers, the horizontal lines marking low and\n * high values. When `undefined`, the general\n * [lineWidth](#plotOptions.boxplot.lineWidth) applies.\n *\n * In styled mode, the whisker stroke width can be set with the\n * `.highcharts-boxplot-whisker` class.\n *\n * @sample {highcharts} highcharts/plotoptions/box-plot-styling/\n * Box plot styling\n * @sample {highcharts} highcharts/css/boxplot/\n * Box plot in styled mode\n *\n * @since 3.0\n * @product highcharts\n */\n whiskerWidth: 2\n });\n return BoxPlotSeries;\n }(ColumnSeries));\n extend(BoxPlotSeries.prototype, {\n // array point configs are mapped to this\n pointArrayMap: ['low', 'q1', 'median', 'q3', 'high'],\n // defines the top of the tracker\n pointValKey: 'high',\n // Disable data labels for box plot\n drawDataLabels: noop,\n setStackedPoints: noop // #3890\n });\n /* *\n *\n * Registry\n *\n * */\n SeriesRegistry.registerSeriesType('boxplot', BoxPlotSeries);\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Options\n *\n * */\n /**\n * A `boxplot` series. If the [type](#series.boxplot.type) option is\n * not specified, it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.boxplot\n * @excluding dataParser, dataURL, marker, stack, stacking, states,\n * boostThreshold, boostBlending\n * @product highcharts\n * @requires highcharts-more\n * @apioption series.boxplot\n */\n /**\n * An array of data points for the series. For the `boxplot` series\n * type, points can be given in the following ways:\n *\n * 1. An array of arrays with 6 or 5 values. In this case, the values correspond\n * to `x,low,q1,median,q3,high`. If the first value is a string, it is\n * applied as the name of the point, and the `x` value is inferred. The `x`\n * value can also be omitted, in which case the inner arrays should be of\n * length 5. Then the `x` value is automatically calculated, either starting\n * at 0 and incremented by 1, or from `pointStart` and `pointInterval` given\n * in the series options.\n * ```js\n * data: [\n * [0, 3, 0, 10, 3, 5],\n * [1, 7, 8, 7, 2, 9],\n * [2, 6, 9, 5, 1, 3]\n * ]\n * ```\n *\n * 2. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.boxplot.turboThreshold), this option is not\n * available.\n * ```js\n * data: [{\n * x: 1,\n * low: 4,\n * q1: 9,\n * median: 9,\n * q3: 1,\n * high: 10,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * low: 5,\n * q1: 7,\n * median: 3,\n * q3: 6,\n * high: 2,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @type {Array|Array<(number|string),number,number,number,number,number>|*>}\n * @extends series.line.data\n * @excluding marker\n * @product highcharts\n * @apioption series.boxplot.data\n */\n /**\n * The `high` value for each data point, signifying the highest value\n * in the sample set. The top whisker is drawn here.\n *\n * @type {number}\n * @product highcharts\n * @apioption series.boxplot.data.high\n */\n /**\n * The `low` value for each data point, signifying the lowest value\n * in the sample set. The bottom whisker is drawn here.\n *\n * @type {number}\n * @product highcharts\n * @apioption series.boxplot.data.low\n */\n /**\n * The median for each data point. This is drawn as a line through the\n * middle area of the box.\n *\n * @type {number}\n * @product highcharts\n * @apioption series.boxplot.data.median\n */\n /**\n * The lower quartile for each data point. This is the bottom of the\n * box.\n *\n * @type {number}\n * @product highcharts\n * @apioption series.boxplot.data.q1\n */\n /**\n * The higher quartile for each data point. This is the top of the box.\n *\n * @type {number}\n * @product highcharts\n * @apioption series.boxplot.data.q3\n */\n /**\n * The dash style of the box.\n *\n * @sample {highcharts} highcharts/plotoptions/box-plot-styling/\n * Box plot styling\n * @sample {highcharts} highcharts/css/boxplot/\n * Box plot in styled mode\n *\n * @type {Highcharts.DashStyleValue}\n * @default Solid\n * @since 8.1.0\n * @product highcharts\n * @apioption series.boxplot.data.boxDashStyle\n */\n /**\n * The dash style of the median.\n *\n * @sample {highcharts} highcharts/plotoptions/box-plot-styling/\n * Box plot styling\n * @sample {highcharts} highcharts/css/boxplot/\n * Box plot in styled mode\n *\n * @type {Highcharts.DashStyleValue}\n * @default Solid\n * @since 8.1.0\n * @product highcharts\n * @apioption series.boxplot.data.medianDashStyle\n */\n /**\n * The dash style of the stem.\n *\n * @sample {highcharts} highcharts/plotoptions/box-plot-styling/\n * Box plot styling\n * @sample {highcharts} highcharts/css/boxplot/\n * Box plot in styled mode\n *\n * @type {Highcharts.DashStyleValue}\n * @default Solid\n * @since 8.1.0\n * @product highcharts\n * @apioption series.boxplot.data.stemDashStyle\n */\n /**\n * The dash style of the whiskers.\n *\n * @sample {highcharts} highcharts/plotoptions/box-plot-styling/\n * Box plot styling\n * @sample {highcharts} highcharts/css/boxplot/\n * Box plot in styled mode\n *\n * @type {Highcharts.DashStyleValue}\n * @default Solid\n * @since 8.1.0\n * @product highcharts\n * @apioption series.boxplot.data.whiskerDashStyle\n */\n ''; // adds doclets above to transpiled file\n\n return BoxPlotSeries;\n });\n _registerModule(_modules, 'Series/Bubble/BubbleLegendDefaults.js', [], function () {\n /* *\n *\n * (c) 2010-2021 Highsoft AS\n *\n * Author: Pawe\u0142 Potaczek\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n /**\n * The bubble legend is an additional element in legend which\n * presents the scale of the bubble series. Individual bubble ranges\n * can be defined by user or calculated from series. In the case of\n * automatically calculated ranges, a 1px margin of error is\n * permitted.\n *\n * @since 7.0.0\n * @product highcharts highstock highmaps\n * @requires highcharts-more\n * @optionparent legend.bubbleLegend\n */\n var BubbleLegendDefaults = {\n /**\n * The color of the ranges borders,\n can be also defined for an\n * individual range.\n *\n * @sample highcharts/bubble-legend/similartoseries/\n * Similar look to the bubble series\n * @sample highcharts/bubble-legend/bordercolor/\n * Individual bubble border color\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n borderColor: void 0,\n /**\n * The width of the ranges borders in pixels,\n can be also\n * defined for an individual range.\n */\n borderWidth: 2,\n /**\n * An additional class name to apply to the bubble legend'\n * circle graphical elements. This option does not replace\n * default class names of the graphical element.\n *\n * @sample {highcharts} highcharts/css/bubble-legend/\n * Styling by CSS\n *\n * @type {string}\n */\n className: void 0,\n /**\n * The main color of the bubble legend. Applies to ranges,\n if\n * individual color is not defined.\n *\n * @sample highcharts/bubble-legend/similartoseries/\n * Similar look to the bubble series\n * @sample highcharts/bubble-legend/color/\n * Individual bubble color\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n color: void 0,\n /**\n * An additional class name to apply to the bubble legend's\n * connector graphical elements. This option does not replace\n * default class names of the graphical element.\n *\n * @sample {highcharts} highcharts/css/bubble-legend/\n * Styling by CSS\n *\n * @type {string}\n */\n connectorClassName: void 0,\n /**\n * The color of the connector,\n can be also defined\n * for an individual range.\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n connectorColor: void 0,\n /**\n * The length of the connectors in pixels. If labels are\n * centered,\n the distance is reduced to 0.\n *\n * @sample highcharts/bubble-legend/connectorandlabels/\n * Increased connector length\n */\n connectorDistance: 60,\n /**\n * The width of the connectors in pixels.\n *\n * @sample highcharts/bubble-legend/connectorandlabels/\n * Increased connector width\n */\n connectorWidth: 1,\n /**\n * Enable or disable the bubble legend.\n */\n enabled: false,\n /**\n * Options for the bubble legend labels.\n */\n labels: {\n /**\n * An additional class name to apply to the bubble legend\n * label graphical elements. This option does not replace\n * default class names of the graphical element.\n *\n * @sample {highcharts} highcharts/css/bubble-legend/\n * Styling by CSS\n *\n * @type {string}\n */\n className: void 0,\n /**\n * Whether to allow data labels to overlap.\n */\n allowOverlap: false,\n /**\n * A format string for the bubble legend labels. Available\n * variables are the same as for `formatter`.\n *\n * @sample highcharts/bubble-legend/format/\n * Add a unit\n *\n * @type {string}\n */\n format: '',\n /**\n * Available `this` properties are:\n *\n * - `this.value`: The bubble value.\n *\n * - `this.radius`: The radius of the bubble range.\n *\n * - `this.center`: The center y position of the range.\n *\n * @type {Highcharts.FormatterCallbackFunction}\n */\n formatter: void 0,\n /**\n * The alignment of the labels compared to the bubble\n * legend. Can be one of `left`,\n `center` or `right`.\n *\n * @sample highcharts/bubble-legend/connectorandlabels/\n * Labels on left\n *\n * @type {Highcharts.AlignValue}\n */\n align: 'right',\n /**\n * CSS styles for the labels.\n *\n * @type {Highcharts.CSSObject}\n */\n style: {\n /** @ignore-option */\n fontSize: '10px',\n /** @ignore-option */\n color: \"#000000\" /* Palette.neutralColor100 */\n },\n /**\n * The x position offset of the label relative to the\n * connector.\n */\n x: 0,\n /**\n * The y position offset of the label relative to the\n * connector.\n */\n y: 0\n },\n /**\n * Miximum bubble legend range size. If values for ranges are\n * not specified,\n the `minSize` and the `maxSize` are calculated\n * from bubble series.\n */\n maxSize: 60,\n /**\n * Minimum bubble legend range size. If values for ranges are\n * not specified,\n the `minSize` and the `maxSize` are calculated\n * from bubble series.\n */\n minSize: 10,\n /**\n * The position of the bubble legend in the legend.\n * @sample highcharts/bubble-legend/connectorandlabels/\n * Bubble legend as last item in legend\n */\n legendIndex: 0,\n /**\n * Options for specific range. One range consists of bubble,\n * label and connector.\n *\n * @sample highcharts/bubble-legend/ranges/\n * Manually defined ranges\n * @sample highcharts/bubble-legend/autoranges/\n * Auto calculated ranges\n *\n * @type {Array<*>}\n */\n ranges: {\n /**\n * Range size value,\n similar to bubble Z data.\n * @type {number}\n */\n value: void 0,\n /**\n * The color of the border for individual range.\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n borderColor: void 0,\n /**\n * The color of the bubble for individual range.\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n color: void 0,\n /**\n * The color of the connector for individual range.\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n connectorColor: void 0\n },\n /**\n * Whether the bubble legend range value should be represented\n * by the area or the width of the bubble. The default,\n area,\n * corresponds best to the human perception of the size of each\n * bubble.\n *\n * @sample highcharts/bubble-legend/ranges/\n * Size by width\n *\n * @type {Highcharts.BubbleSizeByValue}\n */\n sizeBy: 'area',\n /**\n * When this is true,\n the absolute value of z determines the\n * size of the bubble. This means that with the default\n * zThreshold of 0,\n a bubble of value -1 will have the same size\n * as a bubble of value 1,\n while a bubble of value 0 will have a\n * smaller size according to minSize.\n */\n sizeByAbsoluteValue: false,\n /**\n * Define the visual z index of the bubble legend.\n */\n zIndex: 1,\n /**\n * Ranges with with lower value than zThreshold,\n are skipped.\n */\n zThreshold: 0\n };\n /* *\n *\n * Default Export\n *\n * */\n\n return BubbleLegendDefaults;\n });\n _registerModule(_modules, 'Series/Bubble/BubbleLegendItem.js', [_modules['Core/Color/Color.js'], _modules['Core/FormatUtilities.js'], _modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (Color, F, H, U) {\n /* *\n *\n * (c) 2010-2021 Highsoft AS\n *\n * Author: Pawe\u0142 Potaczek\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n var color = Color.parse;\n var noop = H.noop;\n var arrayMax = U.arrayMax,\n arrayMin = U.arrayMin,\n isNumber = U.isNumber,\n merge = U.merge,\n pick = U.pick,\n stableSort = U.stableSort;\n /* *\n *\n * Class\n *\n * */\n /**\n * BubbleLegend class.\n *\n * @private\n * @class\n * @name Highcharts.BubbleLegend\n * @param {Highcharts.LegendBubbleLegendOptions} options\n * Options of BubbleLegendItem.\n *\n * @param {Highcharts.Legend} legend\n * Legend of item.\n */\n var BubbleLegendItem = /** @class */ (function () {\n /* *\n *\n * Constructor\n *\n * */\n function BubbleLegendItem(options, legend) {\n /* *\n *\n * Properties\n *\n * */\n this.chart = void 0;\n this.fontMetrics = void 0;\n this.legend = void 0;\n this.maxLabel = void 0;\n this.movementX = void 0;\n this.ranges = void 0;\n this.selected = void 0;\n this.visible = void 0;\n this.symbols = void 0;\n this.options = void 0;\n this.setState = noop;\n this.init(options, legend);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Create basic bubbleLegend properties similar to item in legend.\n * @private\n */\n BubbleLegendItem.prototype.init = function (options, legend) {\n this.options = options;\n this.visible = true;\n this.chart = legend.chart;\n this.legend = legend;\n };\n /**\n * Depending on the position option, add bubbleLegend to legend items.\n *\n * @private\n *\n * @param {Array<(Highcharts.Point|Highcharts.Series)>} items\n * All legend items\n */\n BubbleLegendItem.prototype.addToLegend = function (items) {\n // Insert bubbleLegend into legend items\n items.splice(this.options.legendIndex, 0, this);\n };\n /**\n * Calculate ranges, sizes and call the next steps of bubbleLegend\n * creation.\n *\n * @private\n *\n * @param {Highcharts.Legend} legend\n * Legend instance\n */\n BubbleLegendItem.prototype.drawLegendSymbol = function (legend) {\n var chart = this.chart,\n itemDistance = pick(legend.options.itemDistance, 20),\n legendItem = this.legendItem || {},\n options = this.options,\n ranges = options.ranges,\n connectorDistance = options.connectorDistance;\n var connectorSpace;\n // Predict label dimensions\n this.fontMetrics = chart.renderer.fontMetrics(options.labels.style.fontSize);\n // Do not create bubbleLegend now if ranges or ranges valeus are not\n // specified or if are empty array.\n if (!ranges || !ranges.length || !isNumber(ranges[0].value)) {\n legend.options.bubbleLegend.autoRanges = true;\n return;\n }\n // Sort ranges to right render order\n stableSort(ranges, function (a, b) {\n return b.value - a.value;\n });\n this.ranges = ranges;\n this.setOptions();\n this.render();\n // Get max label size\n var maxLabel = this.getMaxLabelSize(),\n radius = this.ranges[0].radius,\n size = radius * 2;\n // Space for connectors and labels.\n connectorSpace =\n connectorDistance - radius + maxLabel.width;\n connectorSpace = connectorSpace > 0 ? connectorSpace : 0;\n this.maxLabel = maxLabel;\n this.movementX = options.labels.align === 'left' ?\n connectorSpace : 0;\n legendItem.labelWidth = size + connectorSpace + itemDistance;\n legendItem.labelHeight = size + this.fontMetrics.h / 2;\n };\n /**\n * Set style options for each bubbleLegend range.\n * @private\n */\n BubbleLegendItem.prototype.setOptions = function () {\n var ranges = this.ranges,\n options = this.options,\n series = this.chart.series[options.seriesIndex],\n baseline = this.legend.baseline,\n bubbleAttribs = {\n zIndex: options.zIndex,\n 'stroke-width': options.borderWidth\n },\n connectorAttribs = {\n zIndex: options.zIndex,\n 'stroke-width': options.connectorWidth\n },\n labelAttribs = {\n align: (this.legend.options.rtl ||\n options.labels.align === 'left') ? 'right' : 'left',\n zIndex: options.zIndex\n },\n fillOpacity = series.options.marker.fillOpacity,\n styledMode = this.chart.styledMode;\n // Allow to parts of styles be used individually for range\n ranges.forEach(function (range, i) {\n if (!styledMode) {\n bubbleAttribs.stroke = pick(range.borderColor, options.borderColor, series.color);\n bubbleAttribs.fill = pick(range.color, options.color, fillOpacity !== 1 ?\n color(series.color).setOpacity(fillOpacity)\n .get('rgba') :\n series.color);\n connectorAttribs.stroke = pick(range.connectorColor, options.connectorColor, series.color);\n }\n // Set options needed for rendering each range\n ranges[i].radius = this.getRangeRadius(range.value);\n ranges[i] = merge(ranges[i], {\n center: (ranges[0].radius - ranges[i].radius +\n baseline)\n });\n if (!styledMode) {\n merge(true, ranges[i], {\n bubbleAttribs: merge(bubbleAttribs),\n connectorAttribs: merge(connectorAttribs),\n labelAttribs: labelAttribs\n });\n }\n }, this);\n };\n /**\n * Calculate radius for each bubble range,\n * used code from BubbleSeries.js 'getRadius' method.\n *\n * @private\n *\n * @param {number} value\n * Range value\n *\n * @return {number|null}\n * Radius for one range\n */\n BubbleLegendItem.prototype.getRangeRadius = function (value) {\n var options = this.options,\n seriesIndex = this.options.seriesIndex,\n bubbleSeries = this.chart.series[seriesIndex],\n zMax = options.ranges[0].value,\n zMin = options.ranges[options.ranges.length - 1].value,\n minSize = options.minSize,\n maxSize = options.maxSize;\n return bubbleSeries.getRadius.call(this, zMin, zMax, minSize, maxSize, value);\n };\n /**\n * Render the legendItem group.\n * @private\n */\n BubbleLegendItem.prototype.render = function () {\n var legendItem = this.legendItem || {},\n renderer = this.chart.renderer,\n zThreshold = this.options.zThreshold;\n if (!this.symbols) {\n this.symbols = {\n connectors: [],\n bubbleItems: [],\n labels: []\n };\n }\n // Nesting SVG groups to enable handleOverflow\n legendItem.symbol = renderer.g('bubble-legend');\n legendItem.label = renderer.g('bubble-legend-item');\n // To enable default 'hideOverlappingLabels' method\n legendItem.symbol.translateX = 0;\n legendItem.symbol.translateY = 0;\n for (var _i = 0, _a = this.ranges; _i < _a.length; _i++) {\n var range = _a[_i];\n if (range.value >= zThreshold) {\n this.renderRange(range);\n }\n }\n // To use handleOverflow method\n legendItem.symbol.add(legendItem.label);\n legendItem.label.add(legendItem.group);\n this.hideOverlappingLabels();\n };\n /**\n * Render one range, consisting of bubble symbol, connector and label.\n *\n * @private\n *\n * @param {Highcharts.LegendBubbleLegendRangesOptions} range\n * Range options\n */\n BubbleLegendItem.prototype.renderRange = function (range) {\n var mainRange = this.ranges[0],\n legend = this.legend,\n options = this.options,\n labelsOptions = options.labels,\n chart = this.chart,\n bubbleSeries = chart.series[options.seriesIndex],\n renderer = chart.renderer,\n symbols = this.symbols,\n labels = symbols.labels,\n elementCenter = range.center,\n absoluteRadius = Math.abs(range.radius),\n connectorDistance = options.connectorDistance || 0,\n labelsAlign = labelsOptions.align,\n rtl = legend.options.rtl,\n borderWidth = options.borderWidth,\n connectorWidth = options.connectorWidth,\n posX = mainRange.radius || 0,\n posY = elementCenter - absoluteRadius -\n borderWidth / 2 + connectorWidth / 2,\n fontMetrics = this.fontMetrics,\n labelMovement = fontMetrics.f / 2 -\n (fontMetrics.h - fontMetrics.f) / 2,\n crispMovement = (posY % 1 ? 1 : 0.5) -\n (connectorWidth % 2 ? 0 : 0.5),\n styledMode = renderer.styledMode;\n var connectorLength = rtl || labelsAlign === 'left' ?\n -connectorDistance : connectorDistance;\n // Set options for centered labels\n if (labelsAlign === 'center') {\n connectorLength = 0; // do not use connector\n options.connectorDistance = 0;\n range.labelAttribs.align = 'center';\n }\n var labelY = posY + options.labels.y,\n labelX = posX + connectorLength + options.labels.x;\n // Render bubble symbol\n symbols.bubbleItems.push(renderer\n .circle(posX, elementCenter + crispMovement, absoluteRadius)\n .attr(styledMode ? {} : range.bubbleAttribs)\n .addClass((styledMode ?\n 'highcharts-color-' +\n bubbleSeries.colorIndex + ' ' :\n '') +\n 'highcharts-bubble-legend-symbol ' +\n (options.className || '')).add(this.legendItem.symbol));\n // Render connector\n symbols.connectors.push(renderer\n .path(renderer.crispLine([\n ['M', posX, posY],\n ['L', posX + connectorLength, posY]\n ], options.connectorWidth))\n .attr((styledMode ? {} : range.connectorAttribs))\n .addClass((styledMode ?\n 'highcharts-color-' +\n this.options.seriesIndex + ' ' : '') +\n 'highcharts-bubble-legend-connectors ' +\n (options.connectorClassName || '')).add(this.legendItem.symbol));\n // Render label\n var label = renderer\n .text(this.formatLabel(range),\n labelX,\n labelY + labelMovement)\n .attr((styledMode ? {} : range.labelAttribs))\n .css(styledMode ? {} : labelsOptions.style)\n .addClass('highcharts-bubble-legend-labels ' +\n (options.labels.className || '')).add(this.legendItem.symbol);\n labels.push(label);\n // To enable default 'hideOverlappingLabels' method\n label.placed = true;\n label.alignAttr = {\n x: labelX,\n y: labelY + labelMovement\n };\n };\n /**\n * Get the label which takes up the most space.\n * @private\n */\n BubbleLegendItem.prototype.getMaxLabelSize = function () {\n var labels = this.symbols.labels;\n var maxLabel,\n labelSize;\n labels.forEach(function (label) {\n labelSize = label.getBBox(true);\n if (maxLabel) {\n maxLabel = labelSize.width > maxLabel.width ?\n labelSize : maxLabel;\n }\n else {\n maxLabel = labelSize;\n }\n });\n return maxLabel || {};\n };\n /**\n * Get formatted label for range.\n *\n * @private\n *\n * @param {Highcharts.LegendBubbleLegendRangesOptions} range\n * Range options\n *\n * @return {string}\n * Range label text\n */\n BubbleLegendItem.prototype.formatLabel = function (range) {\n var options = this.options,\n formatter = options.labels.formatter,\n format = options.labels.format;\n var numberFormatter = this.chart.numberFormatter;\n return format ? F.format(format, range) :\n formatter ? formatter.call(range) :\n numberFormatter(range.value, 1);\n };\n /**\n * By using default chart 'hideOverlappingLabels' method, hide or show\n * labels and connectors.\n * @private\n */\n BubbleLegendItem.prototype.hideOverlappingLabels = function () {\n var chart = this.chart,\n allowOverlap = this.options.labels.allowOverlap,\n symbols = this.symbols;\n if (!allowOverlap && symbols) {\n chart.hideOverlappingLabels(symbols.labels);\n // Hide or show connectors\n symbols.labels.forEach(function (label, index) {\n if (!label.newOpacity) {\n symbols.connectors[index].hide();\n }\n else if (label.newOpacity !== label.oldOpacity) {\n symbols.connectors[index].show();\n }\n });\n }\n };\n /**\n * Calculate ranges from created series.\n *\n * @private\n *\n * @return {Array}\n * Array of range objects\n */\n BubbleLegendItem.prototype.getRanges = function () {\n var bubbleLegend = this.legend.bubbleLegend,\n series = bubbleLegend.chart.series,\n rangesOptions = bubbleLegend.options.ranges;\n var ranges,\n zData,\n minZ = Number.MAX_VALUE,\n maxZ = -Number.MAX_VALUE;\n series.forEach(function (s) {\n // Find the min and max Z, like in bubble series\n if (s.isBubble && !s.ignoreSeries) {\n zData = s.zData.filter(isNumber);\n if (zData.length) {\n minZ = pick(s.options.zMin, Math.min(minZ, Math.max(arrayMin(zData), s.options.displayNegative === false ?\n s.options.zThreshold :\n -Number.MAX_VALUE)));\n maxZ = pick(s.options.zMax, Math.max(maxZ, arrayMax(zData)));\n }\n }\n });\n // Set values for ranges\n if (minZ === maxZ) {\n // Only one range if min and max values are the same.\n ranges = [{ value: maxZ }];\n }\n else {\n ranges = [\n { value: minZ },\n { value: (minZ + maxZ) / 2 },\n { value: maxZ, autoRanges: true }\n ];\n }\n // Prevent reverse order of ranges after redraw\n if (rangesOptions.length && rangesOptions[0].radius) {\n ranges.reverse();\n }\n // Merge ranges values with user options\n ranges.forEach(function (range, i) {\n if (rangesOptions && rangesOptions[i]) {\n ranges[i] = merge(rangesOptions[i], range);\n }\n });\n return ranges;\n };\n /**\n * Calculate bubble legend sizes from rendered series.\n *\n * @private\n *\n * @return {Array}\n * Calculated min and max bubble sizes\n */\n BubbleLegendItem.prototype.predictBubbleSizes = function () {\n var chart = this.chart,\n fontMetrics = this.fontMetrics,\n legendOptions = chart.legend.options,\n floating = legendOptions.floating,\n horizontal = legendOptions.layout === 'horizontal',\n lastLineHeight = horizontal ? chart.legend.lastLineHeight : 0,\n plotSizeX = chart.plotSizeX,\n plotSizeY = chart.plotSizeY,\n bubbleSeries = chart.series[this.options.seriesIndex],\n pxSizes = bubbleSeries.getPxExtremes(),\n minSize = Math.ceil(pxSizes.minPxSize),\n maxPxSize = Math.ceil(pxSizes.maxPxSize),\n plotSize = Math.min(plotSizeY,\n plotSizeX);\n var calculatedSize,\n maxSize = bubbleSeries.options.maxSize;\n // Calculate prediceted max size of bubble\n if (floating || !(/%$/.test(maxSize))) {\n calculatedSize = maxPxSize;\n }\n else {\n maxSize = parseFloat(maxSize);\n calculatedSize = ((plotSize + lastLineHeight -\n fontMetrics.h / 2) * maxSize / 100) / (maxSize / 100 + 1);\n // Get maxPxSize from bubble series if calculated bubble legend\n // size will not affect to bubbles series.\n if ((horizontal && plotSizeY - calculatedSize >=\n plotSizeX) || (!horizontal && plotSizeX -\n calculatedSize >= plotSizeY)) {\n calculatedSize = maxPxSize;\n }\n }\n return [minSize, Math.ceil(calculatedSize)];\n };\n /**\n * Correct ranges with calculated sizes.\n * @private\n */\n BubbleLegendItem.prototype.updateRanges = function (min, max) {\n var bubbleLegendOptions = this.legend.options.bubbleLegend;\n bubbleLegendOptions.minSize = min;\n bubbleLegendOptions.maxSize = max;\n bubbleLegendOptions.ranges = this.getRanges();\n };\n /**\n * Because of the possibility of creating another legend line, predicted\n * bubble legend sizes may differ by a few pixels, so it is necessary to\n * correct them.\n * @private\n */\n BubbleLegendItem.prototype.correctSizes = function () {\n var legend = this.legend,\n chart = this.chart,\n bubbleSeries = chart.series[this.options.seriesIndex],\n pxSizes = bubbleSeries.getPxExtremes(),\n bubbleSeriesSize = pxSizes.maxPxSize,\n bubbleLegendSize = this.options.maxSize;\n if (Math.abs(Math.ceil(bubbleSeriesSize) - bubbleLegendSize) >\n 1) {\n this.updateRanges(this.options.minSize, pxSizes.maxPxSize);\n legend.render();\n }\n };\n return BubbleLegendItem;\n }());\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * @interface Highcharts.BubbleLegendFormatterContextObject\n */ /**\n * The center y position of the range.\n * @name Highcharts.BubbleLegendFormatterContextObject#center\n * @type {number}\n */ /**\n * The radius of the bubble range.\n * @name Highcharts.BubbleLegendFormatterContextObject#radius\n * @type {number}\n */ /**\n * The bubble value.\n * @name Highcharts.BubbleLegendFormatterContextObject#value\n * @type {number}\n */\n ''; // detach doclets above\n\n return BubbleLegendItem;\n });\n _registerModule(_modules, 'Series/Bubble/BubbleLegendComposition.js', [_modules['Series/Bubble/BubbleLegendDefaults.js'], _modules['Series/Bubble/BubbleLegendItem.js'], _modules['Core/Defaults.js'], _modules['Core/Utilities.js']], function (BubbleLegendDefaults, BubbleLegendItem, D, U) {\n /* *\n *\n * (c) 2010-2021 Highsoft AS\n *\n * Author: Pawe\u0142 Potaczek\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n var setOptions = D.setOptions;\n var addEvent = U.addEvent,\n objectEach = U.objectEach,\n wrap = U.wrap;\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n /* *\n *\n * Functions\n *\n * */\n /**\n * If ranges are not specified, determine ranges from rendered bubble series\n * and render legend again.\n */\n function chartDrawChartBox(proceed, options, callback) {\n var chart = this,\n legend = chart.legend,\n bubbleSeries = getVisibleBubbleSeriesIndex(chart) >= 0;\n var bubbleLegendOptions,\n bubbleSizes,\n legendItem;\n if (legend && legend.options.enabled && legend.bubbleLegend &&\n legend.options.bubbleLegend.autoRanges && bubbleSeries) {\n bubbleLegendOptions = legend.bubbleLegend.options;\n bubbleSizes = legend.bubbleLegend.predictBubbleSizes();\n legend.bubbleLegend.updateRanges(bubbleSizes[0], bubbleSizes[1]);\n // Disable animation on init\n if (!bubbleLegendOptions.placed) {\n legend.group.placed = false;\n legend.allItems.forEach(function (item) {\n legendItem = item.legendItem || {};\n if (legendItem.group) {\n legendItem.group.translateY = null;\n }\n });\n }\n // Create legend with bubbleLegend\n legend.render();\n chart.getMargins();\n chart.axes.forEach(function (axis) {\n if (axis.visible) { // #11448\n axis.render();\n }\n if (!bubbleLegendOptions.placed) {\n axis.setScale();\n axis.updateNames();\n // Disable axis animation on init\n objectEach(axis.ticks, function (tick) {\n tick.isNew = true;\n tick.isNewLabel = true;\n });\n }\n });\n bubbleLegendOptions.placed = true;\n // After recalculate axes, calculate margins again.\n chart.getMargins();\n // Call default 'drawChartBox' method.\n proceed.call(chart, options, callback);\n // Check bubble legend sizes and correct them if necessary.\n legend.bubbleLegend.correctSizes();\n // Correct items positions with different dimensions in legend.\n retranslateItems(legend, getLinesHeights(legend));\n }\n else {\n proceed.call(chart, options, callback);\n // Allow color change on static bubble legend after click on legend\n if (legend && legend.options.enabled && legend.bubbleLegend) {\n legend.render();\n retranslateItems(legend, getLinesHeights(legend));\n }\n }\n }\n /**\n * Compose classes for use with Bubble series.\n * @private\n *\n * @param {Highcharts.Chart} ChartClass\n * Core chart class to use with Bubble series.\n *\n * @param {Highcharts.Legend} LegendClass\n * Core legend class to use with Bubble series.\n *\n * @param {Highcharts.Series} SeriesClass\n * Core series class to use with Bubble series.\n */\n function compose(ChartClass, LegendClass, SeriesClass) {\n if (composedClasses.indexOf(ChartClass) === -1) {\n composedClasses.push(ChartClass);\n setOptions({\n // Set default bubble legend options\n legend: {\n bubbleLegend: BubbleLegendDefaults\n }\n });\n wrap(ChartClass.prototype, 'drawChartBox', chartDrawChartBox);\n }\n if (composedClasses.indexOf(LegendClass) === -1) {\n composedClasses.push(LegendClass);\n addEvent(LegendClass, 'afterGetAllItems', onLegendAfterGetAllItems);\n }\n if (composedClasses.indexOf(SeriesClass) === -1) {\n composedClasses.push(SeriesClass);\n addEvent(SeriesClass, 'legendItemClick', onSeriesLegendItemClick);\n }\n }\n /**\n * Check if there is at least one visible bubble series.\n *\n * @private\n * @function getVisibleBubbleSeriesIndex\n * @param {Highcharts.Chart} chart\n * Chart to check.\n * @return {number}\n * First visible bubble series index\n */\n function getVisibleBubbleSeriesIndex(chart) {\n var series = chart.series;\n var i = 0;\n while (i < series.length) {\n if (series[i] &&\n series[i].isBubble &&\n series[i].visible &&\n series[i].zData.length) {\n return i;\n }\n i++;\n }\n return -1;\n }\n /**\n * Calculate height for each row in legend.\n *\n * @private\n * @function getLinesHeights\n *\n * @param {Highcharts.Legend} legend\n * Legend to calculate from.\n *\n * @return {Array>}\n * Informations about line height and items amount\n */\n function getLinesHeights(legend) {\n var items = legend.allItems,\n lines = [],\n length = items.length;\n var lastLine,\n legendItem,\n legendItem2,\n i = 0,\n j = 0;\n for (i = 0; i < length; i++) {\n legendItem = items[i].legendItem || {};\n legendItem2 = (items[i + 1] || {}).legendItem || {};\n if (legendItem.labelHeight) {\n // for bubbleLegend\n items[i].itemHeight = legendItem.labelHeight;\n }\n if ( // Line break\n items[i] === items[length - 1] ||\n legendItem.y !== legendItem2.y) {\n lines.push({ height: 0 });\n lastLine = lines[lines.length - 1];\n // Find the highest item in line\n for (j; j <= i; j++) {\n if (items[j].itemHeight > lastLine.height) {\n lastLine.height = items[j].itemHeight;\n }\n }\n lastLine.step = i;\n }\n }\n return lines;\n }\n /**\n * Start the bubble legend creation process.\n */\n function onLegendAfterGetAllItems(e) {\n var legend = this,\n bubbleLegend = legend.bubbleLegend,\n legendOptions = legend.options,\n options = legendOptions.bubbleLegend,\n bubbleSeriesIndex = getVisibleBubbleSeriesIndex(legend.chart);\n // Remove unnecessary element\n if (bubbleLegend && bubbleLegend.ranges && bubbleLegend.ranges.length) {\n // Allow change the way of calculating ranges in update\n if (options.ranges.length) {\n options.autoRanges =\n !!options.ranges[0].autoRanges;\n }\n // Update bubbleLegend dimensions in each redraw\n legend.destroyItem(bubbleLegend);\n }\n // Create bubble legend\n if (bubbleSeriesIndex >= 0 &&\n legendOptions.enabled &&\n options.enabled) {\n options.seriesIndex = bubbleSeriesIndex;\n legend.bubbleLegend = new BubbleLegendItem(options, legend);\n legend.bubbleLegend.addToLegend(e.allItems);\n }\n }\n /**\n * Toggle bubble legend depending on the visible status of bubble series.\n */\n function onSeriesLegendItemClick() {\n var series = this,\n chart = series.chart,\n visible = series.visible,\n legend = series.chart.legend;\n var status;\n if (legend && legend.bubbleLegend) {\n // Temporary correct 'visible' property\n series.visible = !visible;\n // Save future status for getRanges method\n series.ignoreSeries = visible;\n // Check if at lest one bubble series is visible\n status = getVisibleBubbleSeriesIndex(chart) >= 0;\n // Hide bubble legend if all bubble series are disabled\n if (legend.bubbleLegend.visible !== status) {\n // Show or hide bubble legend\n legend.update({\n bubbleLegend: { enabled: status }\n });\n legend.bubbleLegend.visible = status; // Restore default status\n }\n series.visible = visible;\n }\n }\n /**\n * Correct legend items translation in case of different elements heights.\n *\n * @private\n * @function Highcharts.Legend#retranslateItems\n *\n * @param {Highcharts.Legend} legend\n * Legend to translate in.\n *\n * @param {Array>} lines\n * Informations about line height and items amount\n */\n function retranslateItems(legend, lines) {\n var items = legend.allItems,\n rtl = legend.options.rtl;\n var orgTranslateX,\n orgTranslateY,\n movementX,\n legendItem,\n actualLine = 0;\n items.forEach(function (item, index) {\n legendItem = item.legendItem || {};\n if (!legendItem.group) {\n return;\n }\n orgTranslateX = legendItem.group.translateX || 0;\n orgTranslateY = legendItem.y || 0;\n movementX = item.movementX;\n if (movementX || (rtl && item.ranges)) {\n movementX = rtl ?\n orgTranslateX - item.options.maxSize / 2 :\n orgTranslateX + movementX;\n legendItem.group.attr({ translateX: movementX });\n }\n if (index > lines[actualLine].step) {\n actualLine++;\n }\n legendItem.group.attr({\n translateY: Math.round(orgTranslateY + lines[actualLine].height / 2)\n });\n legendItem.y = orgTranslateY + lines[actualLine].height / 2;\n });\n }\n /* *\n *\n * Default Export\n *\n * */\n var BubbleLegendComposition = {\n compose: compose\n };\n\n return BubbleLegendComposition;\n });\n _registerModule(_modules, 'Series/Bubble/BubblePoint.js', [_modules['Core/Series/Point.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (Point, SeriesRegistry, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var ScatterPoint = SeriesRegistry.seriesTypes.scatter.prototype.pointClass;\n var extend = U.extend;\n /* *\n *\n * Class\n *\n * */\n var BubblePoint = /** @class */ (function (_super) {\n __extends(BubblePoint, _super);\n function BubblePoint() {\n /* *\n *\n * Properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n _this.options = void 0;\n _this.series = void 0;\n return _this;\n /* eslint-enable valid-jsdoc */\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * @private\n */\n BubblePoint.prototype.haloPath = function (size) {\n return Point.prototype.haloPath.call(this, \n // #6067\n size === 0 ? 0 : (this.marker ? this.marker.radius || 0 : 0) + size);\n };\n return BubblePoint;\n }(ScatterPoint));\n /* *\n *\n * Class Prototype\n *\n * */\n extend(BubblePoint.prototype, {\n ttBelow: false\n });\n /* *\n *\n * Default Export\n *\n * */\n\n return BubblePoint;\n });\n _registerModule(_modules, 'Series/Bubble/BubbleSeries.js', [_modules['Series/Bubble/BubbleLegendComposition.js'], _modules['Series/Bubble/BubblePoint.js'], _modules['Core/Color/Color.js'], _modules['Core/Globals.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (BubbleLegendComposition, BubblePoint, Color, H, SeriesRegistry, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var color = Color.parse;\n var noop = H.noop;\n var Series = SeriesRegistry.series,\n _a = SeriesRegistry.seriesTypes,\n columnProto = _a.column.prototype,\n ScatterSeries = _a.scatter;\n var addEvent = U.addEvent,\n arrayMax = U.arrayMax,\n arrayMin = U.arrayMin,\n clamp = U.clamp,\n extend = U.extend,\n isNumber = U.isNumber,\n merge = U.merge,\n pick = U.pick;\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n /* *\n *\n * Functions\n *\n * */\n /**\n * Add logic to pad each axis with the amount of pixels necessary to avoid the\n * bubbles to overflow.\n */\n function axisBeforePadding() {\n var _this = this;\n var axisLength = this.len,\n chart = this.chart,\n isXAxis = this.isXAxis,\n dataKey = isXAxis ? 'xData' : 'yData',\n min = this.min,\n range = this.max - min;\n var pxMin = 0,\n pxMax = axisLength,\n transA = axisLength / range,\n hasActiveSeries;\n // Handle padding on the second pass, or on redraw\n this.series.forEach(function (series) {\n if (series.bubblePadding &&\n (series.visible || !chart.options.chart.ignoreHiddenSeries)) {\n // Correction for #1673\n _this.allowZoomOutside = true;\n hasActiveSeries = true;\n var data = series[dataKey];\n if (isXAxis) {\n (series.onPoint || series).getRadii(0, 0, series);\n if (series.onPoint) {\n series.radii = series.onPoint.radii;\n }\n }\n if (range > 0) {\n var i = data.length;\n while (i--) {\n if (isNumber(data[i]) &&\n _this.dataMin <= data[i] &&\n data[i] <= _this.max) {\n var radius = series.radii && series.radii[i] || 0;\n pxMin = Math.min(((data[i] - min) * transA) - radius, pxMin);\n pxMax = Math.max(((data[i] - min) * transA) + radius, pxMax);\n }\n }\n }\n }\n });\n // Apply the padding to the min and max properties\n if (hasActiveSeries && range > 0 && !this.logarithmic) {\n pxMax -= axisLength;\n transA *= (axisLength +\n Math.max(0, pxMin) - // #8901\n Math.min(pxMax, axisLength)) / axisLength;\n [\n ['min', 'userMin', pxMin],\n ['max', 'userMax', pxMax]\n ].forEach(function (keys) {\n if (typeof pick(_this.options[keys[0]], _this[keys[1]]) === 'undefined') {\n _this[keys[0]] += keys[2] / transA;\n }\n });\n }\n }\n /* *\n *\n * Class\n *\n * */\n var BubbleSeries = /** @class */ (function (_super) {\n __extends(BubbleSeries, _super);\n function BubbleSeries() {\n /* *\n *\n * Static Properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n /* *\n *\n * Properties\n *\n * */\n _this.data = void 0;\n _this.maxPxSize = void 0;\n _this.minPxSize = void 0;\n _this.options = void 0;\n _this.points = void 0;\n _this.radii = void 0;\n _this.yData = void 0;\n _this.zData = void 0;\n return _this;\n }\n /* *\n *\n * Static Functions\n *\n * */\n BubbleSeries.compose = function (AxisClass, ChartClass, LegendClass, SeriesClass) {\n BubbleLegendComposition.compose(ChartClass, LegendClass, SeriesClass);\n if (composedClasses.indexOf(AxisClass) === -1) {\n composedClasses.push(AxisClass);\n AxisClass.prototype.beforePadding = axisBeforePadding;\n }\n };\n /* *\n *\n * Functions\n *\n * */\n /**\n * Perform animation on the bubbles\n * @private\n */\n BubbleSeries.prototype.animate = function (init) {\n if (!init &&\n this.points.length < this.options.animationLimit // #8099\n ) {\n this.points.forEach(function (point) {\n var graphic = point.graphic;\n if (graphic && graphic.width) { // URL symbols don't have width\n // Start values\n if (!this.hasRendered) {\n graphic.attr({\n x: point.plotX,\n y: point.plotY,\n width: 1,\n height: 1\n });\n }\n // Run animation\n graphic.animate(this.markerAttribs(point), this.options.animation);\n }\n }, this);\n }\n };\n /**\n * Get the radius for each point based on the minSize, maxSize and each\n * point's Z value. This must be done prior to Series.translate because\n * the axis needs to add padding in accordance with the point sizes.\n * @private\n */\n BubbleSeries.prototype.getRadii = function () {\n var _this = this;\n var zData = this.zData,\n yData = this.yData,\n radii = [];\n var len,\n i,\n value,\n zExtremes = this.chart.bubbleZExtremes;\n var _a = this.getPxExtremes(),\n minPxSize = _a.minPxSize,\n maxPxSize = _a.maxPxSize;\n // Get the collective Z extremes of all bubblish series. The chart-level\n // `bubbleZExtremes` are only computed once, and reset on `updatedData`\n // in any member series.\n if (!zExtremes) {\n var zMin_1 = Number.MAX_VALUE;\n var zMax_1 = -Number.MAX_VALUE;\n var valid_1;\n this.chart.series.forEach(function (otherSeries) {\n if (otherSeries.bubblePadding && (otherSeries.visible ||\n !_this.chart.options.chart.ignoreHiddenSeries)) {\n var zExtremes_1 = (otherSeries.onPoint || otherSeries).getZExtremes();\n if (zExtremes_1) {\n zMin_1 = Math.min(zMin_1 || zExtremes_1.zMin, zExtremes_1.zMin);\n zMax_1 = Math.max(zMax_1 || zExtremes_1.zMax, zExtremes_1.zMax);\n valid_1 = true;\n }\n }\n });\n if (valid_1) {\n zExtremes = { zMin: zMin_1, zMax: zMax_1 };\n this.chart.bubbleZExtremes = zExtremes;\n }\n else {\n zExtremes = { zMin: 0, zMax: 0 };\n }\n }\n // Set the shape type and arguments to be picked up in drawPoints\n for (i = 0, len = zData.length; i < len; i++) {\n value = zData[i];\n // Separate method to get individual radius for bubbleLegend\n radii.push(this.getRadius(zExtremes.zMin, zExtremes.zMax, minPxSize, maxPxSize, value, yData && yData[i]));\n }\n this.radii = radii;\n };\n /**\n * Get the individual radius for one point.\n * @private\n */\n BubbleSeries.prototype.getRadius = function (zMin, zMax, minSize, maxSize, value, yValue) {\n var options = this.options,\n sizeByArea = options.sizeBy !== 'width',\n zThreshold = options.zThreshold;\n var zRange = zMax - zMin,\n pos = 0.5;\n // #8608 - bubble should be visible when z is undefined\n if (yValue === null || value === null) {\n return null;\n }\n if (isNumber(value)) {\n // When sizing by threshold, the absolute value of z determines\n // the size of the bubble.\n if (options.sizeByAbsoluteValue) {\n value = Math.abs(value - zThreshold);\n zMax = zRange = Math.max(zMax - zThreshold, Math.abs(zMin - zThreshold));\n zMin = 0;\n }\n // Issue #4419 - if value is less than zMin, push a radius that's\n // always smaller than the minimum size\n if (value < zMin) {\n return minSize / 2 - 1;\n }\n // Relative size, a number between 0 and 1\n if (zRange > 0) {\n pos = (value - zMin) / zRange;\n }\n }\n if (sizeByArea && pos >= 0) {\n pos = Math.sqrt(pos);\n }\n return Math.ceil(minSize + pos * (maxSize - minSize)) / 2;\n };\n /**\n * Define hasData function for non-cartesian series.\n * Returns true if the series has points at all.\n * @private\n */\n BubbleSeries.prototype.hasData = function () {\n return !!this.processedXData.length; // != 0\n };\n /**\n * @private\n */\n BubbleSeries.prototype.pointAttribs = function (point, state) {\n var markerOptions = this.options.marker,\n fillOpacity = markerOptions.fillOpacity,\n attr = Series.prototype.pointAttribs.call(this,\n point,\n state);\n if (fillOpacity !== 1) {\n attr.fill = color(attr.fill)\n .setOpacity(fillOpacity)\n .get('rgba');\n }\n return attr;\n };\n /**\n * Extend the base translate method to handle bubble size\n * @private\n */\n BubbleSeries.prototype.translate = function () {\n // Run the parent method\n _super.prototype.translate.call(this);\n this.getRadii();\n this.translateBubble();\n };\n BubbleSeries.prototype.translateBubble = function () {\n var _a = this,\n data = _a.data,\n radii = _a.radii;\n var minPxSize = this.getPxExtremes().minPxSize;\n // Set the shape type and arguments to be picked up in drawPoints\n var i = data.length;\n while (i--) {\n var point = data[i];\n var radius = radii ? radii[i] : 0; // #1737\n if (isNumber(radius) && radius >= minPxSize / 2) {\n // Shape arguments\n point.marker = extend(point.marker, {\n radius: radius,\n width: 2 * radius,\n height: 2 * radius\n });\n // Alignment box for the data label\n point.dlBox = {\n x: point.plotX - radius,\n y: point.plotY - radius,\n width: 2 * radius,\n height: 2 * radius\n };\n }\n else { // below zThreshold\n // #1691\n point.shapeArgs = point.plotY = point.dlBox = void 0;\n point.isInside = false; // #17281\n }\n }\n };\n BubbleSeries.prototype.getPxExtremes = function () {\n var smallestSize = Math.min(this.chart.plotWidth,\n this.chart.plotHeight);\n var getPxSize = function (length) {\n var isPercent;\n if (typeof length === 'string') {\n isPercent = /%$/.test(length);\n length = parseInt(length, 10);\n }\n return isPercent ? smallestSize * length / 100 : length;\n };\n var minPxSize = getPxSize(pick(this.options.minSize, 8));\n // Prioritize min size if conflict to make sure bubbles are\n // always visible. #5873\n var maxPxSize = Math.max(getPxSize(pick(this.options.maxSize, '20%')),\n minPxSize);\n return { minPxSize: minPxSize, maxPxSize: maxPxSize };\n };\n BubbleSeries.prototype.getZExtremes = function () {\n var options = this.options,\n zData = (this.zData || []).filter(isNumber);\n if (zData.length) {\n var zMin = pick(options.zMin,\n clamp(arrayMin(zData),\n options.displayNegative === false ?\n (options.zThreshold || 0) :\n -Number.MAX_VALUE,\n Number.MAX_VALUE));\n var zMax = pick(options.zMax,\n arrayMax(zData));\n if (isNumber(zMin) && isNumber(zMax)) {\n return { zMin: zMin, zMax: zMax };\n }\n }\n };\n /**\n * A bubble series is a three dimensional series type where each point\n * renders an X, Y and Z value. Each points is drawn as a bubble where the\n * position along the X and Y axes mark the X and Y values, and the size of\n * the bubble relates to the Z value.\n *\n * @sample {highcharts} highcharts/demo/bubble/\n * Bubble chart\n *\n * @extends plotOptions.scatter\n * @excluding cluster\n * @product highcharts highstock\n * @requires highcharts-more\n * @optionparent plotOptions.bubble\n */\n BubbleSeries.defaultOptions = merge(ScatterSeries.defaultOptions, {\n dataLabels: {\n formatter: function () {\n var numberFormatter = this.series.chart.numberFormatter;\n var z = this.point.z;\n return isNumber(z) ? numberFormatter(z, -1) : '';\n },\n inside: true,\n verticalAlign: 'middle'\n },\n /**\n * If there are more points in the series than the `animationLimit`, the\n * animation won't run. Animation affects overall performance and\n * doesn't work well with heavy data series.\n *\n * @since 6.1.0\n */\n animationLimit: 250,\n /**\n * Whether to display negative sized bubbles. The threshold is given\n * by the [zThreshold](#plotOptions.bubble.zThreshold) option, and negative\n * bubbles can be visualized by setting\n * [negativeColor](#plotOptions.bubble.negativeColor).\n *\n * @sample {highcharts} highcharts/plotoptions/bubble-negative/\n * Negative bubbles\n *\n * @type {boolean}\n * @default true\n * @since 3.0\n * @apioption plotOptions.bubble.displayNegative\n */\n /**\n * @extends plotOptions.series.marker\n * @excluding enabled, enabledThreshold, height, radius, width\n */\n marker: {\n lineColor: null,\n lineWidth: 1,\n /**\n * The fill opacity of the bubble markers.\n */\n fillOpacity: 0.5,\n /**\n * In bubble charts, the radius is overridden and determined based\n * on the point's data value.\n *\n * @ignore-option\n */\n radius: null,\n states: {\n hover: {\n radiusPlus: 0\n }\n },\n /**\n * A predefined shape or symbol for the marker. Possible values are\n * \"circle\", \"square\", \"diamond\", \"triangle\" and \"triangle-down\".\n *\n * Additionally, the URL to a graphic can be given on the 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/bubble-symbol/\n * Bubble chart with various symbols\n * @sample {highcharts} highcharts/plotoptions/series-marker-symbol/\n * General chart with predefined, graphic and custom markers\n *\n * @type {Highcharts.SymbolKeyValue|string}\n * @since 5.0.11\n */\n symbol: 'circle'\n },\n /**\n * Minimum bubble size. Bubbles will automatically size between the\n * `minSize` and `maxSize` to reflect the `z` value of each bubble.\n * Can be either pixels (when no unit is given), or a percentage of\n * the smallest one of the plot width and height.\n *\n * @sample {highcharts} highcharts/plotoptions/bubble-size/\n * Bubble size\n *\n * @type {number|string}\n * @since 3.0\n * @product highcharts highstock\n */\n minSize: 8,\n /**\n * Maximum bubble size. Bubbles will automatically size between the\n * `minSize` and `maxSize` to reflect the `z` value of each bubble.\n * Can be either pixels (when no unit is given), or a percentage of\n * the smallest one of the plot width and height.\n *\n * @sample {highcharts} highcharts/plotoptions/bubble-size/\n * Bubble size\n *\n * @type {number|string}\n * @since 3.0\n * @product highcharts highstock\n */\n maxSize: '20%',\n /**\n * When a point's Z value is below the\n * [zThreshold](#plotOptions.bubble.zThreshold)\n * setting, this color is used.\n *\n * @sample {highcharts} highcharts/plotoptions/bubble-negative/\n * Negative bubbles\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 3.0\n * @product highcharts\n * @apioption plotOptions.bubble.negativeColor\n */\n /**\n * Whether the bubble's value should be represented by the area or the\n * width of the bubble. The default, `area`, corresponds best to the\n * human perception of the size of each bubble.\n *\n * @sample {highcharts} highcharts/plotoptions/bubble-sizeby/\n * Comparison of area and size\n *\n * @type {Highcharts.BubbleSizeByValue}\n * @default area\n * @since 3.0.7\n * @apioption plotOptions.bubble.sizeBy\n */\n /**\n * When this is true, the absolute value of z determines the size of\n * the bubble. This means that with the default `zThreshold` of 0, a\n * bubble of value -1 will have the same size as a bubble of value 1,\n * while a bubble of value 0 will have a smaller size according to\n * `minSize`.\n *\n * @sample {highcharts} highcharts/plotoptions/bubble-sizebyabsolutevalue/\n * Size by absolute value, various thresholds\n *\n * @type {boolean}\n * @default false\n * @since 4.1.9\n * @product highcharts\n * @apioption plotOptions.bubble.sizeByAbsoluteValue\n */\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\n */\n softThreshold: false,\n states: {\n hover: {\n halo: {\n size: 5\n }\n }\n },\n tooltip: {\n pointFormat: '({point.x}, {point.y}), Size: {point.z}'\n },\n turboThreshold: 0,\n /**\n * The minimum for the Z value range. Defaults to the highest Z value\n * in the data.\n *\n * @see [zMin](#plotOptions.bubble.zMin)\n *\n * @sample {highcharts} highcharts/plotoptions/bubble-zmin-zmax/\n * Z has a possible range of 0-100\n *\n * @type {number}\n * @since 4.0.3\n * @product highcharts\n * @apioption plotOptions.bubble.zMax\n */\n /**\n * @default z\n * @apioption plotOptions.bubble.colorKey\n */\n /**\n * The minimum for the Z value range. Defaults to the lowest Z value\n * in the data.\n *\n * @see [zMax](#plotOptions.bubble.zMax)\n *\n * @sample {highcharts} highcharts/plotoptions/bubble-zmin-zmax/\n * Z has a possible range of 0-100\n *\n * @type {number}\n * @since 4.0.3\n * @product highcharts\n * @apioption plotOptions.bubble.zMin\n */\n /**\n * When [displayNegative](#plotOptions.bubble.displayNegative) is `false`,\n * bubbles with lower Z values are skipped. When `displayNegative`\n * is `true` and a [negativeColor](#plotOptions.bubble.negativeColor)\n * is given, points with lower Z is colored.\n *\n * @sample {highcharts} highcharts/plotoptions/bubble-negative/\n * Negative bubbles\n *\n * @since 3.0\n * @product highcharts\n */\n zThreshold: 0,\n zoneAxis: 'z'\n });\n return BubbleSeries;\n }(ScatterSeries));\n extend(BubbleSeries.prototype, {\n alignDataLabel: columnProto.alignDataLabel,\n applyZones: noop,\n bubblePadding: true,\n buildKDTree: noop,\n directTouch: true,\n isBubble: true,\n pointArrayMap: ['y', 'z'],\n pointClass: BubblePoint,\n parallelArrays: ['x', 'y', 'z'],\n trackerGroups: ['group', 'dataLabelsGroup'],\n specialGroup: 'group',\n zoneAxis: 'z'\n });\n // On updated data in any series, delete the chart-level Z extremes cache\n addEvent(BubbleSeries, 'updatedData', function (e) {\n delete e.target.chart.bubbleZExtremes;\n });\n // After removing series, delete the chart-level Z extremes cache, #17502.\n addEvent(BubbleSeries, 'remove', function (e) {\n delete e.target.chart.bubbleZExtremes;\n });\n SeriesRegistry.registerSeriesType('bubble', BubbleSeries);\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * @typedef {\"area\"|\"width\"} Highcharts.BubbleSizeByValue\n */\n ''; // detach doclets above\n /* *\n *\n * API Options\n *\n * */\n /**\n * A `bubble` series. If the [type](#series.bubble.type) option is\n * not specified, it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.bubble\n * @excluding dataParser, dataURL, stack\n * @product highcharts highstock\n * @requires highcharts-more\n * @apioption series.bubble\n */\n /**\n * An array of data points for the series. For the `bubble` series type,\n * points can be given in the following ways:\n *\n * 1. An array of arrays with 3 or 2 values. In this case, the values correspond\n * to `x,y,z`. If the first value is a string, it is applied as the name of\n * the point, and the `x` value is inferred. The `x` value can also be\n * omitted, in which case the inner arrays should be of length 2\\. Then the\n * `x` value is automatically calculated, either starting at 0 and\n * incremented by 1, or from `pointStart` and `pointInterval` given in the\n * series options.\n * ```js\n * data: [\n * [0, 1, 2],\n * [1, 5, 5],\n * [2, 0, 2]\n * ]\n * ```\n *\n * 2. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.bubble.turboThreshold), this option is not\n * available.\n * ```js\n * data: [{\n * x: 1,\n * y: 1,\n * z: 1,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * y: 5,\n * z: 4,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @type {Array|Array<(number|string),number,number>|*>}\n * @extends series.line.data\n * @product highcharts\n * @apioption series.bubble.data\n */\n /**\n * @extends series.line.data.marker\n * @excluding enabledThreshold, height, radius, width\n * @product highcharts\n * @apioption series.bubble.data.marker\n */\n /**\n * The size value for each bubble. The bubbles' diameters are computed\n * based on the `z`, and controlled by series options like `minSize`,\n * `maxSize`, `sizeBy`, `zMin` and `zMax`.\n *\n * @type {number|null}\n * @product highcharts\n * @apioption series.bubble.data.z\n */\n /**\n * @excluding enabled, enabledThreshold, height, radius, width\n * @apioption series.bubble.marker\n */\n ''; // adds doclets above to transpiled file\n\n return BubbleSeries;\n });\n _registerModule(_modules, 'Series/ColumnRange/ColumnRangePoint.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var _a = SeriesRegistry.seriesTypes,\n columnProto = _a.column.prototype.pointClass.prototype,\n AreaRangePoint = _a.arearange.prototype.pointClass;\n var extend = U.extend,\n isNumber = U.isNumber;\n /* *\n *\n * Class\n *\n * */\n var ColumnRangePoint = /** @class */ (function (_super) {\n __extends(ColumnRangePoint, _super);\n function ColumnRangePoint() {\n /* *\n *\n * Properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n _this.options = void 0;\n _this.series = void 0;\n return _this;\n }\n /* *\n *\n * Functions\n *\n * */\n ColumnRangePoint.prototype.isValid = function () {\n return isNumber(this.low);\n };\n return ColumnRangePoint;\n }(AreaRangePoint));\n extend(ColumnRangePoint.prototype, {\n setState: columnProto.setState\n });\n /* *\n *\n * Default Export\n *\n * */\n\n return ColumnRangePoint;\n });\n _registerModule(_modules, 'Series/ColumnRange/ColumnRangeSeries.js', [_modules['Series/ColumnRange/ColumnRangePoint.js'], _modules['Core/Globals.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (ColumnRangePoint, H, SeriesRegistry, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var noop = H.noop;\n var _a = SeriesRegistry.seriesTypes,\n AreaRangeSeries = _a.arearange,\n ColumnSeries = _a.column,\n columnProto = _a.column.prototype;\n var clamp = U.clamp,\n extend = U.extend,\n isNumber = U.isNumber,\n merge = U.merge,\n pick = U.pick;\n /* *\n *\n * Constants\n *\n * */\n /**\n * The column range is a cartesian series type with higher and lower\n * Y values along an X axis. To display horizontal bars, set\n * [chart.inverted](#chart.inverted) to `true`.\n *\n * @sample {highcharts|highstock} highcharts/demo/columnrange/\n * Inverted column range\n *\n * @extends plotOptions.column\n * @since 2.3.0\n * @excluding negativeColor, stacking, softThreshold, threshold\n * @product highcharts highstock\n * @requires highcharts-more\n * @optionparent plotOptions.columnrange\n */\n var columnRangeOptions = {\n /**\n * Extended data labels for range series types. Range series data labels\n * have no `x` and `y` options. Instead,\n they have `xLow`,\n `xHigh`,\n * `yLow` and `yHigh` options to allow the higher and lower data label\n * sets individually.\n *\n * @declare Highcharts.SeriesAreaRangeDataLabelsOptionsObject\n * @extends plotOptions.arearange.dataLabels\n * @since 2.3.0\n * @product highcharts highstock\n * @apioption plotOptions.columnrange.dataLabels\n */\n pointRange: null,\n /** @ignore-option */\n marker: null,\n states: {\n hover: {\n /** @ignore-option */\n halo: false\n }\n }\n };\n /* *\n *\n * Class\n *\n * */\n /**\n * The ColumnRangeSeries class\n *\n * @private\n * @class\n * @name Highcharts.seriesTypes.columnrange\n *\n * @augments Highcharts.Series\n */\n var ColumnRangeSeries = /** @class */ (function (_super) {\n __extends(ColumnRangeSeries, _super);\n function ColumnRangeSeries() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /* *\n *\n * Functions\n *\n * */\n ColumnRangeSeries.prototype.setOptions = function () {\n // #14359 Prevent side-effect from stacking.\n merge(true, arguments[0], { stacking: void 0 });\n return AreaRangeSeries.prototype.setOptions.apply(this, arguments);\n };\n // eslint-disable-next-line valid-jsdoc\n /**\n * Translate data points from raw values x and y to plotX and plotY\n * @private\n */\n ColumnRangeSeries.prototype.translate = function () {\n var _this = this;\n var yAxis = this.yAxis,\n xAxis = this.xAxis,\n startAngleRad = xAxis.startAngleRad,\n chart = this.chart,\n isRadial = this.xAxis.isRadial,\n safeDistance = Math.max(chart.chartWidth,\n chart.chartHeight) + 999;\n var height,\n heightDifference,\n start,\n plotHigh,\n y;\n // eslint-disable-next-line valid-jsdoc\n /**\n * Don't draw too far outside plot area (#6835)\n * @private\n */\n function safeBounds(pixelPos) {\n return clamp(pixelPos, -safeDistance, safeDistance);\n }\n columnProto.translate.apply(this);\n // Set plotLow and plotHigh\n this.points.forEach(function (point) {\n var shapeArgs = point.shapeArgs || {},\n minPointLength = _this.options.minPointLength,\n plotY = point.plotY,\n plotHigh = yAxis.translate(point.high, 0, 1, 0, 1);\n if (isNumber(plotHigh) && isNumber(plotY)) {\n point.plotHigh = safeBounds(plotHigh);\n point.plotLow = safeBounds(plotY);\n // adjust shape\n y = point.plotHigh;\n height = pick(point.rectPlotY, point.plotY) - point.plotHigh;\n // Adjust for minPointLength\n if (Math.abs(height) < minPointLength) {\n heightDifference = (minPointLength - height);\n height += heightDifference;\n y -= heightDifference / 2;\n // Adjust for negative ranges or reversed Y axis (#1457)\n }\n else if (height < 0) {\n height *= -1;\n y -= height;\n }\n if (isRadial && _this.polar) {\n start = point.barX + startAngleRad;\n point.shapeType = 'arc';\n point.shapeArgs = _this.polar.arc(y + height, y, start, start + point.pointWidth);\n }\n else {\n shapeArgs.height = height;\n shapeArgs.y = y;\n var _a = shapeArgs.x,\n x = _a === void 0 ? 0 : _a,\n _b = shapeArgs.width,\n width = _b === void 0 ? 0 : _b;\n point.tooltipPos = chart.inverted ?\n [\n yAxis.len + yAxis.pos - chart.plotLeft - y -\n height / 2,\n xAxis.len + xAxis.pos - chart.plotTop - x -\n width / 2,\n height\n ] : [\n xAxis.left - chart.plotLeft + x + width / 2,\n yAxis.pos - chart.plotTop + y + height / 2,\n height\n ]; // don't inherit from column tooltip position - #3372\n }\n }\n });\n };\n // Overrides from modules that may be loaded after this module\n // @todo move to compositions\n // public crispCol(): BBoxObject {\n // return columnProto.crispCol.apply(this, arguments as any);\n // }\n // public drawPoints(): void {\n // return columnProto.drawPoints.apply(this, arguments as any);\n // }\n // public drawTracker(): void {\n // return columnProto.drawTracker.apply(this, arguments as any);\n // }\n // public getColumnMetrics(): ColumnMetricsObject {\n // return columnProto.getColumnMetrics.apply(this, arguments as any);\n // }\n ColumnRangeSeries.prototype.pointAttribs = function () {\n return columnProto.pointAttribs.apply(this, arguments);\n };\n // public adjustForMissingColumns(): number {\n // return columnProto.adjustForMissingColumns.apply(this, arguments);\n // }\n // public animate(): void {\n // return columnProto.animate.apply(this, arguments as any);\n // }\n ColumnRangeSeries.prototype.translate3dPoints = function () {\n return columnProto.translate3dPoints.apply(this, arguments);\n };\n ColumnRangeSeries.prototype.translate3dShapes = function () {\n return columnProto.translate3dShapes.apply(this, arguments);\n };\n /* *\n *\n * Static Properties\n *\n * */\n ColumnRangeSeries.defaultOptions = merge(ColumnSeries.defaultOptions, AreaRangeSeries.defaultOptions, columnRangeOptions);\n return ColumnRangeSeries;\n }(AreaRangeSeries));\n extend(ColumnRangeSeries.prototype, {\n directTouch: true,\n pointClass: ColumnRangePoint,\n trackerGroups: ['group', 'dataLabelsGroup'],\n adjustForMissingColumns: columnProto.adjustForMissingColumns,\n animate: columnProto.animate,\n crispCol: columnProto.crispCol,\n drawGraph: noop,\n drawPoints: columnProto.drawPoints,\n getSymbol: noop,\n drawTracker: columnProto.drawTracker,\n getColumnMetrics: columnProto.getColumnMetrics\n // pointAttribs: columnProto.pointAttribs,\n // polarArc: columnProto.polarArc\n // translate3dPoints: columnProto.translate3dPoints,\n // translate3dShapes: columnProto.translate3dShapes\n });\n SeriesRegistry.registerSeriesType('columnrange', ColumnRangeSeries);\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Options\n *\n * */\n /**\n * A `columnrange` series. If the [type](#series.columnrange.type)\n * option is not specified, it is inherited from\n * [chart.type](#chart.type).\n *\n * @extends series,plotOptions.columnrange\n * @excluding dataParser, dataURL, stack, stacking\n * @product highcharts highstock\n * @requires highcharts-more\n * @apioption series.columnrange\n */\n /**\n * An array of data points for the series. For the `columnrange` series\n * type, points can be given in the following ways:\n *\n * 1. An array of arrays with 3 or 2 values. In this case, the values correspond\n * to `x,low,high`. If the first value is a string, it is applied as the name\n * of the point, and the `x` value is inferred. The `x` value can also be\n * omitted, in which case the inner arrays should be of length 2\\. Then the\n * `x` value is automatically calculated, either starting at 0 and\n * incremented by 1, or from `pointStart` and `pointInterval` given in the\n * series options.\n * ```js\n * data: [\n * [0, 4, 2],\n * [1, 2, 1],\n * [2, 9, 10]\n * ]\n * ```\n *\n * 2. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.columnrange.turboThreshold), this option is not\n * available.\n * ```js\n * data: [{\n * x: 1,\n * low: 0,\n * high: 4,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * low: 5,\n * high: 3,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @type {Array|Array<(number|string),number,number>|*>}\n * @extends series.arearange.data\n * @excluding marker\n * @product highcharts highstock\n * @apioption series.columnrange.data\n */\n /**\n * @extends series.columnrange.dataLabels\n * @product highcharts highstock\n * @apioption series.columnrange.data.dataLabels\n */\n /**\n * @excluding halo, lineWidth, lineWidthPlus, marker\n * @product highcharts highstock\n * @apioption series.columnrange.states.hover\n */\n /**\n * @excluding halo, lineWidth, lineWidthPlus, marker\n * @product highcharts highstock\n * @apioption series.columnrange.states.select\n */\n ''; // adds doclets above into transpiled\n\n return ColumnRangeSeries;\n });\n _registerModule(_modules, 'Series/ColumnPyramid/ColumnPyramidSeries.js', [_modules['Series/Column/ColumnSeries.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (ColumnSeries, SeriesRegistry, U) {\n /* *\n *\n * (c) 2010-2021 Sebastian Bochan\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var colProto = ColumnSeries.prototype;\n var clamp = U.clamp,\n extend = U.extend,\n merge = U.merge,\n pick = U.pick;\n /**\n * The ColumnPyramidSeries class\n *\n * @private\n * @class\n * @name Highcharts.seriesTypes.columnpyramid\n *\n * @augments Highcharts.Series\n */\n var ColumnPyramidSeries = /** @class */ (function (_super) {\n __extends(ColumnPyramidSeries, _super);\n function ColumnPyramidSeries() {\n /* *\n *\n * Static properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n /* *\n *\n * Properties\n *\n * */\n _this.data = void 0;\n _this.options = void 0;\n _this.points = void 0;\n return _this;\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable-next-line valid-jsdoc */\n /**\n * Overrides the column translate method\n * @private\n */\n ColumnPyramidSeries.prototype.translate = function () {\n var series = this,\n chart = series.chart,\n options = series.options,\n dense = series.dense =\n series.closestPointRange * series.xAxis.transA < 2,\n borderWidth = series.borderWidth = pick(options.borderWidth,\n dense ? 0 : 1 // #3635\n ),\n yAxis = series.yAxis,\n threshold = options.threshold,\n translatedThreshold = series.translatedThreshold =\n yAxis.getThreshold(threshold),\n minPointLength = pick(options.minPointLength, 5),\n metrics = series.getColumnMetrics(),\n pointWidth = metrics.width, \n // postprocessed for border width\n seriesBarW = series.barW =\n Math.max(pointWidth, 1 + 2 * borderWidth),\n pointXOffset = series.pointXOffset = metrics.offset;\n if (chart.inverted) {\n translatedThreshold -= 0.5; // #3355\n }\n // When the pointPadding is 0,\n // we want the pyramids to be packed tightly,\n // so we allow individual pyramids to have individual sizes.\n // When pointPadding is greater,\n // we strive for equal-width columns (#2694).\n if (options.pointPadding) {\n seriesBarW = Math.ceil(seriesBarW);\n }\n colProto.translate.apply(series);\n // Record the new values\n series.points.forEach(function (point) {\n var yBottom = pick(point.yBottom,\n translatedThreshold),\n safeDistance = 999 + Math.abs(yBottom),\n plotY = clamp(point.plotY, -safeDistance,\n yAxis.len + safeDistance), \n // Don't draw too far outside plot area\n // (#1303, #2241, #4264)\n barX = point.plotX + pointXOffset,\n barW = seriesBarW / 2,\n barY = Math.min(plotY,\n yBottom),\n barH = Math.max(plotY,\n yBottom) - barY,\n stackTotal,\n stackHeight,\n topPointY,\n topXwidth,\n bottomXwidth,\n invBarPos,\n x1,\n x2,\n x3,\n x4,\n y1,\n y2;\n point.barX = barX;\n point.pointWidth = pointWidth;\n // Fix the tooltip on center of grouped pyramids\n // (#1216, #424, #3648)\n point.tooltipPos = chart.inverted ?\n [\n yAxis.len + yAxis.pos - chart.plotLeft - plotY,\n series.xAxis.len - barX - barW,\n barH\n ] :\n [\n barX + barW,\n plotY + yAxis.pos - chart.plotTop,\n barH\n ];\n stackTotal =\n threshold + (point.total || point.y);\n // overwrite stacktotal (always 100 / -100)\n if (options.stacking === 'percent') {\n stackTotal =\n threshold + (point.y < 0) ?\n -100 :\n 100;\n }\n // get the highest point (if stack, extract from total)\n topPointY = yAxis.toPixels((stackTotal), true);\n // calculate height of stack (in pixels)\n stackHeight =\n chart.plotHeight - topPointY -\n (chart.plotHeight - translatedThreshold);\n // topXwidth and bottomXwidth = width of lines from the center\n // calculated from tanges proportion.\n // Cannot be a NaN #12514\n topXwidth = stackHeight ?\n (barW * (barY - topPointY)) / stackHeight : 0;\n // like topXwidth, but with height of point\n bottomXwidth = stackHeight ?\n (barW * (barY + barH - topPointY)) / stackHeight :\n 0;\n /*\n /\\\n / \\\n x1,y1,------ x2,y1\n / \\\n ----------\n x4,y2 x3,y2\n */\n x1 = barX - topXwidth + barW;\n x2 = barX + topXwidth + barW;\n x3 = barX + bottomXwidth + barW;\n x4 = barX - bottomXwidth + barW;\n y1 = barY - minPointLength;\n y2 = barY + barH;\n if (point.y < 0) {\n y1 = barY;\n y2 = barY + barH + minPointLength;\n }\n // inverted chart\n if (chart.inverted) {\n invBarPos = yAxis.width - barY;\n stackHeight =\n topPointY - (yAxis.width - translatedThreshold);\n // proportion tanges\n topXwidth = (barW *\n (topPointY - invBarPos)) / stackHeight;\n bottomXwidth = (barW *\n (topPointY - (invBarPos - barH))) / stackHeight;\n x1 = barX + barW + topXwidth; // top bottom\n x2 = x1 - 2 * topXwidth; // top top\n x3 = barX - bottomXwidth + barW; // bottom top\n x4 = barX + bottomXwidth + barW; // bottom bottom\n y1 = barY;\n y2 = barY + barH - minPointLength;\n if (point.y < 0) {\n y2 = barY + barH + minPointLength;\n }\n }\n // Register shape type and arguments to be used in drawPoints\n point.shapeType = 'path';\n point.shapeArgs = {\n // args for datalabels positioning\n x: x1,\n y: y1,\n width: x2 - x1,\n height: barH,\n // path of pyramid\n d: [\n ['M', x1, y1],\n ['L', x2, y1],\n ['L', x3, y2],\n ['L', x4, y2],\n ['Z']\n ]\n };\n });\n };\n /**\n * Column pyramid series display one pyramid per value along an X axis.\n * To display horizontal pyramids, set [chart.inverted](#chart.inverted) to\n * `true`.\n *\n * @sample {highcharts|highstock} highcharts/demo/column-pyramid/\n * Column pyramid\n * @sample {highcharts|highstock} highcharts/plotoptions/columnpyramid-stacked/\n * Column pyramid stacked\n * @sample {highcharts|highstock} highcharts/plotoptions/columnpyramid-inverted/\n * Column pyramid inverted\n *\n * @extends plotOptions.column\n * @since 7.0.0\n * @product highcharts highstock\n * @excluding boostThreshold, borderRadius, crisp, depth, edgeColor,\n * edgeWidth, groupZPadding, negativeColor, softThreshold,\n * threshold, zoneAxis, zones, boostBlending\n * @requires highcharts-more\n * @optionparent plotOptions.columnpyramid\n */\n ColumnPyramidSeries.defaultOptions = merge(ColumnSeries.defaultOptions, {\n // Nothing here\n });\n return ColumnPyramidSeries;\n }(ColumnSeries));\n SeriesRegistry.registerSeriesType('columnpyramid', ColumnPyramidSeries);\n /* *\n *\n * Default export\n *\n * */\n /* *\n *\n * API Options\n *\n * */\n /**\n * A `columnpyramid` series. If the [type](#series.columnpyramid.type) option is\n * not specified, it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.columnpyramid\n * @excluding connectEnds, connectNulls, dashStyle, dataParser, dataURL,\n * gapSize, gapUnit, linecap, lineWidth, marker, step,\n * boostThreshold, boostBlending\n * @product highcharts highstock\n * @requires highcharts-more\n * @apioption series.columnpyramid\n */\n /**\n * @excluding halo, lineWidth, lineWidthPlus, marker\n * @product highcharts highstock\n * @apioption series.columnpyramid.states.hover\n */\n /**\n * @excluding halo, lineWidth, lineWidthPlus, marker\n * @product highcharts highstock\n * @apioption series.columnpyramid.states.select\n */\n /**\n * An array of data points for the series. For the `columnpyramid` series type,\n * points can be given in the following ways:\n *\n * 1. An array of numerical values. In this case, the numerical values will be\n * interpreted as `y` options. The `x` values will be automatically\n * calculated, either starting at 0 and incremented by 1, or from\n * `pointStart` and `pointInterval` given in the series options. If the axis\n * has categories, these will be used. Example:\n * ```js\n * data: [0, 5, 3, 5]\n * ```\n *\n * 2. An array of arrays with 2 values. In this case, the values correspond to\n * `x,y`. If the first value is a string, it is applied as the name of the\n * point, and the `x` value is inferred.\n * ```js\n * data: [\n * [0, 6],\n * [1, 2],\n * [2, 6]\n * ]\n * ```\n *\n * 3. An array of objects with named values. The objects are point configuration\n * objects as seen below. If the total number of data points exceeds the\n * series' [turboThreshold](#series.columnpyramid.turboThreshold), this\n * option is not available.\n * ```js\n * data: [{\n * x: 1,\n * y: 9,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * y: 6,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * Numerical values\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @type {Array|null|*>}\n * @extends series.line.data\n * @excluding marker\n * @product highcharts highstock\n * @apioption series.columnpyramid.data\n */\n ''; // adds doclets above to transpiled file;\n\n return ColumnPyramidSeries;\n });\n _registerModule(_modules, 'Series/ErrorBar/ErrorBarSeriesDefaults.js', [], function () {\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 /* *\n *\n * API Options\n *\n * */\n /**\n * Error bars are a graphical representation of the variability of data and\n * are used on graphs to indicate the error, or uncertainty in a reported\n * measurement.\n *\n * @sample highcharts/demo/error-bar/\n * Error bars on a column series\n * @sample highcharts/series-errorbar/on-scatter/\n * Error bars on a scatter series\n * @sample highcharts/series-errorbar/datalabels/\n * Error bars with data labels\n *\n * @extends plotOptions.boxplot\n * @excluding boostBlending, boostThreshold\n * @product highcharts\n * @requires highcharts-more\n * @optionparent plotOptions.errorbar\n */\n var ErrorBarSeriesDefaults = {\n /**\n * The main color of the bars. This can be overridden by\n * [stemColor](#plotOptions.errorbar.stemColor) and\n * [whiskerColor](#plotOptions.errorbar.whiskerColor) individually.\n *\n * @sample {highcharts} highcharts/plotoptions/error-bar-styling/\n * Error bar styling\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @default #000000\n * @since 3.0\n * @product highcharts\n */\n color: \"#000000\" /* Palette.neutralColor100 */,\n grouping: false,\n /**\n * The parent series of the error bar. The default value links it to\n * the previous series. Otherwise,\n use the id of the parent series.\n *\n * @since 3.0\n * @product highcharts\n */\n linkedTo: ':previous',\n tooltip: {\n pointFormat: '\\u25CF {series.name}: {point.low} - {point.high}
'\n },\n /**\n * The line width of the whiskers,\n the horizontal lines marking\n * low and high values. When `null`,\n the general\n * [lineWidth](#plotOptions.errorbar.lineWidth) applies.\n *\n * @sample {highcharts} highcharts/plotoptions/error-bar-styling/\n * Error bar styling\n *\n * @type {number}\n * @since 3.0\n * @product highcharts\n */\n whiskerWidth: null\n };\n /**\n * A `errorbar` series. If the [type](#series.errorbar.type) option\n * is not specified, it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.errorbar\n * @excluding dataParser, dataURL, stack, stacking, boostThreshold,\n * boostBlending\n * @product highcharts\n * @requires highcharts-more\n * @apioption series.errorbar\n */\n /**\n * An array of data points for the series. For the `errorbar` series\n * type, points can be given in the following ways:\n *\n * 1. An array of arrays with 3 or 2 values. In this case, the values correspond\n * to `x,low,high`. If the first value is a string, it is applied as the name\n * of the point, and the `x` value is inferred. The `x` value can also be\n * omitted, in which case the inner arrays should be of length 2\\. Then the\n * `x` value is automatically calculated, either starting at 0 and\n * incremented by 1, or from `pointStart` and `pointInterval` given in the\n * series options.\n * ```js\n * data: [\n * [0, 10, 2],\n * [1, 1, 8],\n * [2, 4, 5]\n * ]\n * ```\n *\n * 2. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.errorbar.turboThreshold), this option is not\n * available.\n * ```js\n * data: [{\n * x: 1,\n * low: 0,\n * high: 0,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * low: 5,\n * high: 5,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @type {Array|Array<(number|string),number,number>|*>}\n * @extends series.arearange.data\n * @excluding dataLabels, drilldown, marker, states\n * @product highcharts\n * @apioption series.errorbar.data\n */\n ''; // adds doclets above to transpiled file\n /* *\n *\n * Default Export\n *\n * */\n\n return ErrorBarSeriesDefaults;\n });\n _registerModule(_modules, 'Series/ErrorBar/ErrorBarSeries.js', [_modules['Series/BoxPlot/BoxPlotSeries.js'], _modules['Series/Column/ColumnSeries.js'], _modules['Series/ErrorBar/ErrorBarSeriesDefaults.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (BoxPlotSeries, ColumnSeries, ErrorBarSeriesDefaults, SeriesRegistry, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var AreaRangeSeries = SeriesRegistry.seriesTypes.arearange;\n var addEvent = U.addEvent,\n merge = U.merge,\n extend = U.extend;\n /* *\n *\n * Class\n *\n * */\n /**\n * Errorbar series type\n *\n * @private\n * @class\n * @name Highcharts.seriesTypes.errorbar\n *\n * @augments Highcharts.Series\n *\n */\n var ErrorBarSeries = /** @class */ (function (_super) {\n __extends(ErrorBarSeries, _super);\n function ErrorBarSeries() {\n /* *\n *\n * Static Properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n /* *\n *\n * Properties\n *\n * */\n _this.data = void 0;\n _this.options = void 0;\n _this.points = void 0;\n return _this;\n }\n /* *\n *\n * Functions\n *\n * */\n ErrorBarSeries.prototype.getColumnMetrics = function () {\n // Get the width and X offset, either on top of the linked series\n // column or standalone\n return ((this.linkedParent && this.linkedParent.columnMetrics) ||\n ColumnSeries.prototype.getColumnMetrics.call(this));\n };\n ErrorBarSeries.prototype.drawDataLabels = function () {\n var valKey = this.pointValKey;\n if (AreaRangeSeries) {\n AreaRangeSeries.prototype.drawDataLabels.call(this);\n // Arearange drawDataLabels does not reset point.y to high,\n // but to low after drawing (#4133)\n this.data.forEach(function (point) {\n point.y = point[valKey];\n });\n }\n };\n ErrorBarSeries.prototype.toYData = function (point) {\n // return a plain array for speedy calculation\n return [point.low, point.high];\n };\n ErrorBarSeries.defaultOptions = merge(BoxPlotSeries.defaultOptions, ErrorBarSeriesDefaults);\n return ErrorBarSeries;\n }(BoxPlotSeries));\n addEvent(ErrorBarSeries, 'afterTranslate', function () {\n this.points.forEach(function (point) {\n point.plotLow = point.plotY;\n });\n }, { order: 0 });\n extend(ErrorBarSeries.prototype, {\n // pointClass: ErrorBarPoint, // just a declaration\n pointArrayMap: ['low', 'high'],\n pointValKey: 'high',\n doQuartiles: false\n });\n SeriesRegistry.registerSeriesType('errorbar', ErrorBarSeries);\n /* *\n *\n * Default Export\n *\n * */\n\n return ErrorBarSeries;\n });\n _registerModule(_modules, 'Series/Gauge/GaugePoint.js', [_modules['Core/Series/SeriesRegistry.js']], function (SeriesRegistry) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var Point = SeriesRegistry.series.prototype.pointClass;\n /* *\n *\n * Class\n *\n * */\n var GaugePoint = /** @class */ (function (_super) {\n __extends(GaugePoint, _super);\n function GaugePoint() {\n /* *\n *\n * Properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n _this.options = void 0;\n _this.series = void 0;\n _this.shapeArgs = void 0;\n return _this;\n /* eslint-enable valid-jsdoc */\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Don't do any hover colors or anything\n * @private\n */\n GaugePoint.prototype.setState = function (state) {\n this.state = state;\n };\n return GaugePoint;\n }(Point));\n /* *\n *\n * Default Export\n *\n * */\n\n return GaugePoint;\n });\n _registerModule(_modules, 'Series/Gauge/GaugeSeries.js', [_modules['Series/Gauge/GaugePoint.js'], _modules['Core/Globals.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (GaugePoint, H, SeriesRegistry, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var noop = H.noop;\n var Series = SeriesRegistry.series,\n ColumnSeries = SeriesRegistry.seriesTypes.column;\n var clamp = U.clamp,\n isNumber = U.isNumber,\n extend = U.extend,\n merge = U.merge,\n pick = U.pick,\n pInt = U.pInt;\n /* *\n *\n * Class\n *\n * */\n /**\n *\n * The `gauge` series type\n *\n * @private\n * @class\n * @name Highcharts.seriesTypes.map\n *\n * @augments Highcharts.Series\n */\n var GaugeSeries = /** @class */ (function (_super) {\n __extends(GaugeSeries, _super);\n function GaugeSeries() {\n /* *\n *\n * Static properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n /* *\n *\n * Properties\n *\n * */\n _this.data = void 0;\n _this.points = void 0;\n _this.options = void 0;\n _this.yAxis = void 0;\n return _this;\n /* eslint-enable valid-jsdoc */\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Calculate paths etc\n * @private\n */\n GaugeSeries.prototype.translate = function () {\n var series = this,\n yAxis = series.yAxis,\n options = series.options,\n center = yAxis.center;\n series.generatePoints();\n series.points.forEach(function (point) {\n var dialOptions = merge(options.dial,\n point.dial),\n radius = (pInt(dialOptions.radius) * center[2]) / 200,\n baseLength = (pInt(dialOptions.baseLength) * radius) / 100,\n rearLength = (pInt(dialOptions.rearLength) * radius) / 100,\n baseWidth = dialOptions.baseWidth,\n topWidth = dialOptions.topWidth;\n var overshoot = options.overshoot,\n rotation = yAxis.startAngleRad + yAxis.translate(point.y,\n void 0,\n void 0,\n void 0,\n true);\n // Handle the wrap and overshoot options\n if (isNumber(overshoot) || options.wrap === false) {\n overshoot = isNumber(overshoot) ?\n (overshoot / 180 * Math.PI) : 0;\n rotation = clamp(rotation, yAxis.startAngleRad - overshoot, yAxis.endAngleRad + overshoot);\n }\n rotation = rotation * 180 / Math.PI;\n point.shapeType = 'path';\n var d = dialOptions.path || [\n ['M', -rearLength, -baseWidth / 2],\n ['L',\n baseLength, -baseWidth / 2],\n ['L',\n radius, -topWidth / 2],\n ['L',\n radius,\n topWidth / 2],\n ['L',\n baseLength,\n baseWidth / 2],\n ['L', -rearLength,\n baseWidth / 2],\n ['Z']\n ];\n point.shapeArgs = {\n d: d,\n translateX: center[0],\n translateY: center[1],\n rotation: rotation\n };\n // Positions for data label\n point.plotX = center[0];\n point.plotY = center[1];\n });\n };\n /**\n * Draw the points where each point is one needle\n * @private\n */\n GaugeSeries.prototype.drawPoints = function () {\n var series = this,\n chart = series.chart,\n center = series.yAxis.center,\n pivot = series.pivot,\n options = series.options,\n pivotOptions = options.pivot,\n renderer = chart.renderer;\n series.points.forEach(function (point) {\n var graphic = point.graphic,\n shapeArgs = point.shapeArgs,\n d = shapeArgs.d,\n dialOptions = merge(options.dial,\n point.dial); // #1233\n if (graphic) {\n graphic.animate(shapeArgs);\n shapeArgs.d = d; // animate alters it\n }\n else {\n point.graphic =\n renderer[point.shapeType](shapeArgs)\n .attr({\n // required by VML when animation is false\n rotation: shapeArgs.rotation,\n zIndex: 1\n })\n .addClass('highcharts-dial')\n .add(series.group);\n }\n // Presentational attributes\n if (!chart.styledMode) {\n point.graphic[graphic ? 'animate' : 'attr']({\n stroke: dialOptions.borderColor,\n 'stroke-width': dialOptions.borderWidth,\n fill: dialOptions.backgroundColor\n });\n }\n });\n // Add or move the pivot\n if (pivot) {\n pivot.animate({\n translateX: center[0],\n translateY: center[1]\n });\n }\n else if (pivotOptions) {\n series.pivot =\n renderer.circle(0, 0, pivotOptions.radius)\n .attr({\n zIndex: 2\n })\n .addClass('highcharts-pivot')\n .translate(center[0], center[1])\n .add(series.group);\n // Presentational attributes\n if (!chart.styledMode) {\n series.pivot.attr({\n fill: pivotOptions.backgroundColor,\n stroke: pivotOptions.borderColor,\n 'stroke-width': pivotOptions.borderWidth\n });\n }\n }\n };\n /**\n * Animate the arrow up from startAngle\n * @private\n */\n GaugeSeries.prototype.animate = function (init) {\n var series = this;\n if (!init) {\n series.points.forEach(function (point) {\n var graphic = point.graphic;\n if (graphic) {\n // start value\n graphic.attr({\n rotation: series.yAxis.startAngleRad * 180 / Math.PI\n });\n // animate\n graphic.animate({\n rotation: point.shapeArgs.rotation\n }, series.options.animation);\n }\n });\n }\n };\n /**\n * @private\n */\n GaugeSeries.prototype.render = function () {\n this.group = this.plotGroup('group', 'series', this.visible ? 'inherit' : 'hidden', this.options.zIndex, this.chart.seriesGroup);\n Series.prototype.render.call(this);\n this.group.clip(this.chart.clipRect);\n };\n /**\n * Extend the basic setData method by running processData and generatePoints\n * immediately, in order to access the points from the legend.\n * @private\n */\n GaugeSeries.prototype.setData = function (data, redraw) {\n Series.prototype.setData.call(this, data, false);\n this.processData();\n this.generatePoints();\n if (pick(redraw, true)) {\n this.chart.redraw();\n }\n };\n /**\n * Define hasData function for non-cartesian series.\n * Returns true if the series has points at all.\n * @private\n */\n GaugeSeries.prototype.hasData = function () {\n return !!this.points.length; // != 0\n };\n /**\n * Gauges are circular plots displaying one or more values with a dial\n * pointing to values along the perimeter.\n *\n * @sample highcharts/demo/gauge-speedometer/\n * Gauge chart\n *\n * @extends plotOptions.line\n * @excluding animationLimit, boostThreshold, colorAxis, colorKey,\n * connectEnds, connectNulls, cropThreshold, dashStyle,\n * dragDrop, findNearestPointBy, getExtremesFromAll, marker,\n * negativeColor, pointPlacement, shadow, softThreshold,\n * stacking, states, step, threshold, turboThreshold, xAxis,\n * zoneAxis, zones, dataSorting, boostBlending\n * @product highcharts\n * @requires highcharts-more\n * @optionparent plotOptions.gauge\n */\n GaugeSeries.defaultOptions = merge(Series.defaultOptions, {\n /**\n * When this option is `true`, the dial will wrap around the axes.\n * For instance, in a full-range gauge going from 0 to 360, a value\n * of 400 will point to 40\\. When `wrap` is `false`, the dial stops\n * at 360.\n *\n * @see [overshoot](#plotOptions.gauge.overshoot)\n *\n * @type {boolean}\n * @default true\n * @since 3.0\n * @product highcharts\n * @apioption plotOptions.gauge.wrap\n */\n /**\n * Data labels for the gauge. For gauges, the data labels are\n * enabled by default and shown in a bordered box below the point.\n *\n * @since 2.3.0\n * @product highcharts\n */\n dataLabels: {\n borderColor: \"#cccccc\" /* Palette.neutralColor20 */,\n borderRadius: 3,\n borderWidth: 1,\n crop: false,\n defer: false,\n enabled: true,\n verticalAlign: 'top',\n y: 15,\n zIndex: 2\n },\n /**\n * Options for the dial or arrow pointer of the gauge.\n *\n * In styled mode, the dial is styled with the\n * `.highcharts-gauge-series .highcharts-dial` rule.\n *\n * @sample {highcharts} highcharts/css/gauge/\n * Styled mode\n *\n * @type {*}\n * @since 2.3.0\n * @product highcharts\n */\n dial: {\n /**\n * The background or fill color of the gauge's dial.\n *\n * @sample {highcharts} highcharts/plotoptions/gauge-dial/\n * Dial options demonstrated\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @default #000000\n * @since 2.3.0\n * @product highcharts\n * @apioption plotOptions.gauge.dial.backgroundColor\n */\n backgroundColor: \"#000000\" /* Palette.neutralColor100 */,\n /**\n * The length of the dial's base part, relative to the total\n * radius or length of the dial.\n *\n * @sample {highcharts} highcharts/plotoptions/gauge-dial/\n * Dial options demonstrated\n *\n * @type {string}\n * @default 70%\n * @since 2.3.0\n * @product highcharts\n * @apioption plotOptions.gauge.dial.baseLength\n */\n baseLength: '70%',\n /**\n * The pixel width of the base of the gauge dial. The base is\n * the part closest to the pivot, defined by baseLength.\n *\n * @sample {highcharts} highcharts/plotoptions/gauge-dial/\n * Dial options demonstrated\n *\n * @type {number}\n * @default 3\n * @since 2.3.0\n * @product highcharts\n * @apioption plotOptions.gauge.dial.baseWidth\n */\n baseWidth: 3,\n /**\n * The border color or stroke of the gauge's dial. By default,\n * the borderWidth is 0, so this must be set in addition to a\n * custom border color.\n *\n * @sample {highcharts} highcharts/plotoptions/gauge-dial/\n * Dial options demonstrated\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @default #cccccc\n * @since 2.3.0\n * @product highcharts\n * @apioption plotOptions.gauge.dial.borderColor\n */\n borderColor: \"#cccccc\" /* Palette.neutralColor20 */,\n /**\n * The width of the gauge dial border in pixels.\n *\n * @sample {highcharts} highcharts/plotoptions/gauge-dial/\n * Dial options demonstrated\n *\n * @type {number}\n * @default 0\n * @since 2.3.0\n * @product highcharts\n * @apioption plotOptions.gauge.dial.borderWidth\n */\n borderWidth: 0,\n /**\n * An array with an SVG path for the custom dial.\n *\n * @sample {highcharts} highcharts/plotoptions/gauge-path/\n * Dial options demonstrated\n *\n * @type {Highcharts.SVGPathArray}\n * @since 10.2.0\n * @product highcharts\n * @apioption plotOptions.gauge.dial.path\n */\n /**\n * The radius or length of the dial, in percentages relative to\n * the radius of the gauge itself.\n *\n * @sample {highcharts} highcharts/plotoptions/gauge-dial/\n * Dial options demonstrated\n *\n * @type {string}\n * @default 80%\n * @since 2.3.0\n * @product highcharts\n * @apioption plotOptions.gauge.dial.radius\n */\n radius: '80%',\n /**\n * The length of the dial's rear end, the part that extends out\n * on the other side of the pivot. Relative to the dial's\n * length.\n *\n * @sample {highcharts} highcharts/plotoptions/gauge-dial/\n * Dial options demonstrated\n *\n * @type {string}\n * @default 10%\n * @since 2.3.0\n * @product highcharts\n * @apioption plotOptions.gauge.dial.rearLength\n */\n rearLength: '10%',\n /**\n * The width of the top of the dial, closest to the perimeter.\n * The pivot narrows in from the base to the top.\n *\n * @sample {highcharts} highcharts/plotoptions/gauge-dial/\n * Dial options demonstrated\n *\n * @type {number}\n * @default 1\n * @since 2.3.0\n * @product highcharts\n * @apioption plotOptions.gauge.dial.topWidth\n */\n topWidth: 1\n },\n /**\n * Allow the dial to overshoot the end of the perimeter axis by\n * this many degrees. Say if the gauge axis goes from 0 to 60, a\n * value of 100, or 1000, will show 5 degrees beyond the end of the\n * axis when this option is set to 5.\n *\n * @see [wrap](#plotOptions.gauge.wrap)\n *\n * @sample {highcharts} highcharts/plotoptions/gauge-overshoot/\n * Allow 5 degrees overshoot\n *\n * @type {number}\n * @since 3.0.10\n * @product highcharts\n * @apioption plotOptions.gauge.overshoot\n */\n /**\n * Options for the pivot or the center point of the gauge.\n *\n * In styled mode, the pivot is styled with the\n * `.highcharts-gauge-series .highcharts-pivot` rule.\n *\n * @sample {highcharts} highcharts/css/gauge/\n * Styled mode\n *\n * @type {*}\n * @since 2.3.0\n * @product highcharts\n */\n pivot: {\n /**\n * The pixel radius of the pivot.\n *\n * @sample {highcharts} highcharts/plotoptions/gauge-pivot/\n * Pivot options demonstrated\n *\n * @type {number}\n * @default 5\n * @since 2.3.0\n * @product highcharts\n * @apioption plotOptions.gauge.pivot.radius\n */\n radius: 5,\n /**\n * The border or stroke width of the pivot.\n *\n * @sample {highcharts} highcharts/plotoptions/gauge-pivot/\n * Pivot options demonstrated\n *\n * @type {number}\n * @default 0\n * @since 2.3.0\n * @product highcharts\n * @apioption plotOptions.gauge.pivot.borderWidth\n */\n borderWidth: 0,\n /**\n * The border or stroke color of the pivot. In able to change\n * this, the borderWidth must also be set to something other\n * than the default 0.\n *\n * @sample {highcharts} highcharts/plotoptions/gauge-pivot/\n * Pivot options demonstrated\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @default #cccccc\n * @since 2.3.0\n * @product highcharts\n * @apioption plotOptions.gauge.pivot.borderColor\n */\n borderColor: \"#cccccc\" /* Palette.neutralColor20 */,\n /**\n * The background color or fill of the pivot.\n *\n * @sample {highcharts} highcharts/plotoptions/gauge-pivot/\n * Pivot options demonstrated\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @default #000000\n * @since 2.3.0\n * @product highcharts\n * @apioption plotOptions.gauge.pivot.backgroundColor\n */\n backgroundColor: \"#000000\" /* Palette.neutralColor100 */\n },\n tooltip: {\n headerFormat: ''\n },\n /**\n * Whether to display this particular series or series type in the\n * legend. Defaults to false for gauge series.\n *\n * @since 2.3.0\n * @product highcharts\n */\n showInLegend: false\n // Prototype members\n });\n return GaugeSeries;\n }(Series));\n extend(GaugeSeries.prototype, {\n // chart.angular will be set to true when a gauge series is present,\n // and this will be used on the axes\n angular: true,\n directTouch: true,\n drawGraph: noop,\n drawTracker: ColumnSeries.prototype.drawTracker,\n fixedBox: true,\n forceDL: true,\n noSharedTooltip: true,\n pointClass: GaugePoint,\n trackerGroups: ['group', 'dataLabelsGroup']\n });\n SeriesRegistry.registerSeriesType('gauge', GaugeSeries);\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API options\n *\n * */\n /**\n * A `gauge` series. If the [type](#series.gauge.type) option is not\n * specified, it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.gauge\n * @excluding animationLimit, boostThreshold, connectEnds, connectNulls,\n * cropThreshold, dashStyle, dataParser, dataURL, findNearestPointBy,\n * getExtremesFromAll, marker, negativeColor, pointPlacement, shadow,\n * softThreshold, stack, stacking, states, step, threshold,\n * turboThreshold, zoneAxis, zones, dataSorting, boostBlending\n * @product highcharts\n * @requires highcharts-more\n * @apioption series.gauge\n */\n /**\n * An array of data points for the series. For the `gauge` series type,\n * points can be given in the following ways:\n *\n * 1. An array of numerical values. In this case, the numerical values will be\n * interpreted as `y` options. Example:\n * ```js\n * data: [0, 5, 3, 5]\n * ```\n *\n * 2. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.gauge.turboThreshold), this option is not\n * available.\n * ```js\n * data: [{\n * y: 6,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * y: 8,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * The typical gauge only contains a single data value.\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * Numerical values\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @type {Array}\n * @extends series.line.data\n * @excluding drilldown, marker, x\n * @product highcharts\n * @apioption series.gauge.data\n */\n ''; // adds the doclets above in the transpiled file\n\n return GaugeSeries;\n });\n _registerModule(_modules, 'Series/DragNodesComposition.js', [_modules['Core/Utilities.js']], function (U) {\n /* *\n *\n * Networkgraph series\n *\n * (c) 2010-2021 Pawe\u0142 Fus\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n var addEvent = U.addEvent;\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n /* *\n *\n * Functions\n *\n * */\n /**\n * @private\n */\n function compose(ChartClass) {\n if (composedClasses.indexOf(ChartClass) === -1) {\n composedClasses.push(ChartClass);\n addEvent(ChartClass, 'load', onChartLoad);\n }\n }\n /**\n * Draggable mode:\n * @private\n */\n function onChartLoad() {\n var chart = this;\n var mousedownUnbinder,\n mousemoveUnbinder,\n mouseupUnbinder;\n if (chart.container) {\n mousedownUnbinder = addEvent(chart.container, 'mousedown', function (event) {\n var point = chart.hoverPoint;\n if (point &&\n point.series &&\n point.series.hasDraggableNodes &&\n point.series.options.draggable) {\n point.series.onMouseDown(point, event);\n mousemoveUnbinder = addEvent(chart.container, 'mousemove', function (e) { return (point &&\n point.series &&\n point.series.onMouseMove(point, e)); });\n mouseupUnbinder = addEvent(chart.container.ownerDocument, 'mouseup', function (e) {\n mousemoveUnbinder();\n mouseupUnbinder();\n return point &&\n point.series &&\n point.series.onMouseUp(point, e);\n });\n }\n });\n }\n addEvent(chart, 'destroy', function () {\n mousedownUnbinder();\n });\n }\n /**\n * Mouse down action, initializing drag&drop mode.\n *\n * @private\n * @param {Highcharts.Point} point\n * The point that event occured.\n * @param {Highcharts.PointerEventObject} event\n * Browser event, before normalization.\n */\n function onMouseDown(point, event) {\n var normalizedEvent = this.chart.pointer.normalize(event);\n point.fixedPosition = {\n chartX: normalizedEvent.chartX,\n chartY: normalizedEvent.chartY,\n plotX: point.plotX,\n plotY: point.plotY\n };\n point.inDragMode = true;\n }\n /**\n * Mouse move action during drag&drop.\n *\n * @private\n *\n * @param {global.Event} event\n * Browser event, before normalization.\n * @param {Highcharts.Point} point\n * The point that event occured.\n *\n */\n function onMouseMove(point, event) {\n if (point.fixedPosition && point.inDragMode) {\n var series = this,\n chart = series.chart,\n normalizedEvent = chart.pointer.normalize(event),\n diffX = point.fixedPosition.chartX - normalizedEvent.chartX,\n diffY = point.fixedPosition.chartY - normalizedEvent.chartY,\n graphLayoutsLookup = chart.graphLayoutsLookup;\n var newPlotX = void 0,\n newPlotY = void 0;\n // At least 5px to apply change (avoids simple click):\n if (Math.abs(diffX) > 5 || Math.abs(diffY) > 5) {\n newPlotX = point.fixedPosition.plotX - diffX;\n newPlotY = point.fixedPosition.plotY - diffY;\n if (chart.isInsidePlot(newPlotX, newPlotY)) {\n point.plotX = newPlotX;\n point.plotY = newPlotY;\n point.hasDragged = true;\n this.redrawHalo(point);\n graphLayoutsLookup.forEach(function (layout) {\n layout.restartSimulation();\n });\n }\n }\n }\n }\n /**\n * Mouse up action, finalizing drag&drop.\n *\n * @private\n * @param {Highcharts.Point} point\n * The point that event occured.\n */\n function onMouseUp(point, _event) {\n if (point.fixedPosition) {\n if (point.hasDragged) {\n if (this.layout.enableSimulation) {\n this.layout.start();\n }\n else {\n this.chart.redraw();\n }\n }\n point.inDragMode = point.hasDragged = false;\n if (!this.options.fixedDraggable) {\n delete point.fixedPosition;\n }\n }\n }\n /**\n * Redraw halo on mousemove during the drag&drop action.\n *\n * @private\n * @param {Highcharts.Point} point\n * The point that should show halo.\n */\n function redrawHalo(point) {\n if (point && this.halo) {\n this.halo.attr({\n d: point.haloPath(this.options.states.hover.halo.size)\n });\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n var DragNodesComposition = {\n compose: compose,\n onMouseDown: onMouseDown,\n onMouseMove: onMouseMove,\n onMouseUp: onMouseUp,\n redrawHalo: redrawHalo\n };\n\n return DragNodesComposition;\n });\n _registerModule(_modules, 'Series/GraphLayoutComposition.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Utilities.js']], function (A, U) {\n /* *\n *\n * Networkgraph series\n *\n * (c) 2010-2021 Pawe\u0142 Fus\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n var setAnimation = A.setAnimation;\n var addEvent = U.addEvent;\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n var integrations = {};\n var layouts = {};\n /* *\n *\n * Functions\n *\n * */\n /**\n * @private\n */\n function compose(ChartClass) {\n if (composedClasses.indexOf(ChartClass)) {\n composedClasses.push(ChartClass);\n addEvent(ChartClass, 'afterPrint', onChartAfterPrint);\n addEvent(ChartClass, 'beforePrint', onChartBeforePrint);\n addEvent(ChartClass, 'predraw', onChartPredraw);\n addEvent(ChartClass, 'render', onChartRender);\n }\n }\n /**\n * Re-enable simulation after print.\n * @private\n */\n function onChartAfterPrint() {\n if (this.graphLayoutsLookup) {\n this.graphLayoutsLookup.forEach(function (layout) {\n // return to default simulation\n layout.updateSimulation();\n });\n this.redraw();\n }\n }\n /**\n * Disable simulation before print if enabled.\n * @private\n */\n function onChartBeforePrint() {\n if (this.graphLayoutsLookup) {\n this.graphLayoutsLookup.forEach(function (layout) {\n layout.updateSimulation(false);\n });\n this.redraw();\n }\n }\n /**\n * Clear previous layouts.\n * @private\n */\n function onChartPredraw() {\n if (this.graphLayoutsLookup) {\n this.graphLayoutsLookup.forEach(function (layout) {\n layout.stop();\n });\n }\n }\n /**\n * @private\n */\n function onChartRender() {\n var systemsStable,\n afterRender = false;\n var layoutStep = function (layout) {\n if (layout.maxIterations-- &&\n isFinite(layout.temperature) &&\n !layout.isStable() &&\n !layout.enableSimulation) {\n // Hook similar to build-in addEvent, but instead of\n // creating whole events logic, use just a function.\n // It's faster which is important for rAF code.\n // Used e.g. in packed-bubble series for bubble radius\n // calculations\n if (layout.beforeStep) {\n layout.beforeStep();\n }\n layout.step();\n systemsStable = false;\n afterRender = true;\n }\n };\n if (this.graphLayoutsLookup) {\n setAnimation(false, this);\n // Start simulation\n this.graphLayoutsLookup.forEach(function (layout) { return layout.start(); });\n // Just one sync step, to run different layouts similar to\n // async mode.\n while (!systemsStable) {\n systemsStable = true;\n this.graphLayoutsLookup.forEach(layoutStep);\n }\n if (afterRender) {\n this.series.forEach(function (series) {\n if (series && series.layout) {\n series.render();\n }\n });\n }\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n var GraphLayoutComposition = {\n compose: compose,\n integrations: integrations,\n layouts: layouts\n };\n\n return GraphLayoutComposition;\n });\n _registerModule(_modules, 'Series/PackedBubble/PackedBubblePoint.js', [_modules['Core/Chart/Chart.js'], _modules['Core/Series/Point.js'], _modules['Core/Series/SeriesRegistry.js']], function (Chart, Point, SeriesRegistry) {\n /* *\n *\n * (c) 2010-2021 Grzegorz Blachlinski, Sebastian Bochan\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var BubblePoint = SeriesRegistry.seriesTypes.bubble.prototype.pointClass;\n /* *\n *\n * Class\n *\n * */\n var PackedBubblePoint = /** @class */ (function (_super) {\n __extends(PackedBubblePoint, _super);\n function PackedBubblePoint() {\n /* *\n *\n * Properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n _this.degree = NaN;\n _this.mass = NaN;\n _this.radius = NaN;\n _this.options = void 0;\n _this.series = void 0;\n _this.value = null;\n return _this;\n /* eslint-enable valid-jsdoc */\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Destroy point.\n * Then remove point from the layout.\n * @private\n */\n PackedBubblePoint.prototype.destroy = function () {\n if (this.series.layout) {\n this.series.layout.removeElementFromCollection(this, this.series.layout.nodes);\n }\n return Point.prototype.destroy.apply(this, arguments);\n };\n PackedBubblePoint.prototype.firePointEvent = function () {\n var point = this,\n series = this.series,\n seriesOptions = series.options;\n if (this.isParentNode && seriesOptions.parentNode) {\n var temp = seriesOptions.allowPointSelect;\n seriesOptions.allowPointSelect = (seriesOptions.parentNode.allowPointSelect);\n Point.prototype.firePointEvent.apply(this, arguments);\n seriesOptions.allowPointSelect = temp;\n }\n else {\n Point.prototype.firePointEvent.apply(this, arguments);\n }\n };\n PackedBubblePoint.prototype.select = function () {\n var point = this,\n series = this.series,\n chart = series.chart;\n if (point.isParentNode) {\n chart.getSelectedPoints = chart.getSelectedParentNodes;\n Point.prototype.select.apply(this, arguments);\n chart.getSelectedPoints = Chart.prototype.getSelectedPoints;\n }\n else {\n Point.prototype.select.apply(this, arguments);\n }\n };\n return PackedBubblePoint;\n }(BubblePoint));\n /* *\n *\n * Default Export\n *\n * */\n\n return PackedBubblePoint;\n });\n _registerModule(_modules, 'Series/PackedBubble/PackedBubbleSeriesDefaults.js', [_modules['Core/Utilities.js']], function (U) {\n /* *\n *\n * Imports\n *\n * */\n var isNumber = U.isNumber;\n /* *\n *\n * Constants\n *\n * */\n /**\n * A packed bubble series is a two dimensional series type, where each point\n * renders a value in X, Y position. Each point is drawn as a bubble\n * where the bubbles don't overlap with each other and the radius\n * of the bubble relates to the value.\n *\n * @sample highcharts/demo/packed-bubble/\n * Packed bubble chart\n * @sample highcharts/demo/packed-bubble-split/\n * Split packed bubble chart\n *\n * @extends plotOptions.bubble\n * @excluding connectEnds, connectNulls, cropThreshold, dragDrop, jitter,\n * keys, pointPlacement, sizeByAbsoluteValue, step, xAxis,\n * yAxis, zMax, zMin, dataSorting, boostThreshold,\n * boostBlending\n * @product highcharts\n * @since 7.0.0\n * @requires highcharts-more\n * @optionparent plotOptions.packedbubble\n *\n * @private\n */\n var PackedBubbleSeriesDefaults = {\n /**\n * Minimum bubble size. Bubbles will automatically size between the\n * `minSize` and `maxSize` to reflect the value of each bubble.\n * Can be either pixels (when no unit is given),\n or a percentage of\n * the smallest one of the plot width and height,\n divided by the square\n * root of total number of points.\n *\n * @sample highcharts/plotoptions/bubble-size/\n * Bubble size\n *\n * @type {number|string}\n *\n * @private\n */\n minSize: '10%',\n /**\n * Maximum bubble size. Bubbles will automatically size between the\n * `minSize` and `maxSize` to reflect the value of each bubble.\n * Can be either pixels (when no unit is given),\n or a percentage of\n * the smallest one of the plot width and height,\n divided by the square\n * root of total number of points.\n *\n * @sample highcharts/plotoptions/bubble-size/\n * Bubble size\n *\n * @type {number|string}\n *\n * @private\n */\n maxSize: '50%',\n sizeBy: 'area',\n zoneAxis: 'y',\n crisp: false,\n tooltip: {\n pointFormat: 'Value: {point.value}'\n },\n /**\n * Flag to determine if nodes are draggable or not. Available for\n * graph with useSimulation set to true only.\n *\n * @since 7.1.0\n *\n * @private\n */\n draggable: true,\n /**\n * An option is giving a possibility to choose between using simulation\n * for calculating bubble positions. These reflects in both animation\n * and final position of bubbles. Simulation is also adding options to\n * the series graph based on used layout. In case of big data sets,\n with\n * any performance issues,\n it is possible to disable animation and pack\n * bubble in a simple circular way.\n *\n * @sample highcharts/series-packedbubble/spiral/\n * useSimulation set to false\n *\n * @since 7.1.0\n *\n * @private\n */\n useSimulation: true,\n /**\n * Series options for parent nodes.\n *\n * @since 8.1.1\n *\n * @private\n */\n parentNode: {\n /**\n * Allow this series' parent nodes to be selected\n * by clicking on the graph.\n *\n * @since 8.1.1\n */\n allowPointSelect: false\n },\n /**\n /**\n *\n * @declare Highcharts.SeriesPackedBubbleDataLabelsOptionsObject\n *\n * @private\n */\n dataLabels: {\n /**\n * The\n * [format string](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)\n * specifying what to show for _node_ in the networkgraph. In v7.0\n * defaults to `{key}`,\n since v7.1 defaults to `undefined` and\n * `formatter` is used instead.\n *\n * @type {string}\n * @since 7.0.0\n * @apioption plotOptions.packedbubble.dataLabels.format\n */\n // eslint-disable-next-line valid-jsdoc\n /**\n * Callback JavaScript function to format the data label for a node.\n * Note that if a `format` is defined,\n the format takes precedence\n * and the formatter is ignored.\n *\n * @type {Highcharts.SeriesPackedBubbleDataLabelsFormatterCallbackFunction}\n * @since 7.0.0\n */\n formatter: function () {\n var numberFormatter = this.series.chart.numberFormatter;\n var value = this.point.value;\n return isNumber(value) ? numberFormatter(value, -1) : '';\n },\n /**\n * @type {string}\n * @since 7.1.0\n * @apioption plotOptions.packedbubble.dataLabels.parentNodeFormat\n */\n // eslint-disable-next-line valid-jsdoc\n /**\n * @type {Highcharts.SeriesPackedBubbleDataLabelsFormatterCallbackFunction}\n * @since 7.1.0\n */\n parentNodeFormatter: function () {\n return this.name;\n },\n /**\n * @sample {highcharts} highcharts/series-packedbubble/packed-dashboard\n * Dashboard with dataLabels on parentNodes\n *\n * @declare Highcharts.SeriesPackedBubbleDataLabelsTextPathOptionsObject\n * @since 7.1.0\n */\n parentNodeTextPath: {\n /**\n * Presentation attributes for the text path.\n *\n * @type {Highcharts.SVGAttributes}\n * @since 7.1.0\n * @apioption plotOptions.packedbubble.dataLabels.attributes\n */\n /**\n * Enable or disable `textPath` option for link's or marker's\n * data labels.\n *\n * @since 7.1.0\n */\n enabled: true\n },\n /**\n * Options for a _node_ label text which should follow marker's\n * shape.\n *\n * **Note:** Only SVG-based renderer supports this option.\n *\n * @extends plotOptions.series.dataLabels.textPath\n * @apioption plotOptions.packedbubble.dataLabels.textPath\n */\n padding: 0,\n style: {\n transition: 'opacity 2000ms'\n }\n },\n /**\n * Options for layout algorithm when simulation is enabled. Inside there\n * are options to change the speed, padding, initial bubbles positions\n * and more.\n *\n * @extends plotOptions.networkgraph.layoutAlgorithm\n * @excluding approximation, attractiveForce, repulsiveForce, theta\n * @since 7.1.0\n *\n * @private\n */\n layoutAlgorithm: {\n /**\n * Initial layout algorithm for positioning nodes. Can be one of\n * the built-in options (\"circle\", \"random\") or a function where\n * positions should be set on each node (`this.nodes`) as\n * `node.plotX` and `node.plotY`.\n *\n * @sample highcharts/series-networkgraph/initial-positions/\n * Initial positions with callback\n *\n * @type {\"circle\"|\"random\"|Function}\n */\n initialPositions: 'circle',\n /**\n * @sample highcharts/series-packedbubble/initial-radius/\n * Initial radius set to 200\n *\n * @extends plotOptions.networkgraph.layoutAlgorithm.initialPositionRadius\n * @excluding states\n */\n initialPositionRadius: 20,\n /**\n * The distance between two bubbles, when the algorithm starts to\n * treat two bubbles as overlapping. The `bubblePadding` is also the\n * expected distance between all the bubbles on simulation end.\n */\n bubblePadding: 5,\n /**\n * Whether bubbles should interact with their parentNode to keep\n * them inside.\n */\n parentNodeLimit: false,\n /**\n * Whether series should interact with each other or not. When\n * `parentNodeLimit` is set to true, thi option should be set to\n * false to avoid sticking points in wrong series parentNode.\n */\n seriesInteraction: true,\n /**\n * In case of split series, this option allows user to drag and\n * drop points between series, for changing point related series.\n *\n * @sample highcharts/series-packedbubble/packed-dashboard/\n * Example of drag'n drop bubbles for bubble kanban\n */\n dragBetweenSeries: false,\n /**\n * Layout algorithm options for parent nodes.\n *\n * @extends plotOptions.networkgraph.layoutAlgorithm\n * @excluding approximation, attractiveForce, enableSimulation,\n * repulsiveForce, theta\n */\n parentNodeOptions: {\n maxIterations: 400,\n gravitationalConstant: 0.03,\n maxSpeed: 50,\n initialPositionRadius: 100,\n seriesInteraction: true,\n /**\n * Styling options for parentNodes markers. Similar to\n * line.marker options.\n *\n * @sample highcharts/series-packedbubble/parentnode-style/\n * Bubble size\n *\n * @extends plotOptions.series.marker\n * @excluding states\n */\n marker: {\n fillColor: null,\n fillOpacity: 1,\n lineWidth: null,\n lineColor: null,\n symbol: 'circle'\n }\n },\n enableSimulation: true,\n /**\n * Type of the algorithm used when positioning bubbles.\n * @ignore-option\n */\n type: 'packedbubble',\n /**\n * Integration type. Integration determines how forces are applied\n * on particles. The `packedbubble` integration is based on\n * the networkgraph `verlet` integration, where the new position\n * is based on a previous position without velocity:\n * `newPosition += previousPosition - newPosition`.\n *\n * @sample highcharts/series-networkgraph/forces/\n *\n * @ignore-option\n */\n integration: 'packedbubble',\n maxIterations: 1000,\n /**\n * Whether to split series into individual groups or to mix all\n * series together.\n *\n * @since 7.1.0\n * @default false\n */\n splitSeries: false,\n /**\n * Max speed that node can get in one iteration. In terms of\n * simulation, it's a maximum translation (in pixels) that a node\n * can move (in both, x and y, dimensions). While `friction` is\n * applied on all nodes, max speed is applied only for nodes that\n * move very fast, for example small or disconnected ones.\n *\n * @see [layoutAlgorithm.integration](#series.networkgraph.layoutAlgorithm.integration)\n *\n * @see [layoutAlgorithm.friction](#series.networkgraph.layoutAlgorithm.friction)\n */\n maxSpeed: 5,\n gravitationalConstant: 0.01,\n friction: -0.981\n }\n };\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Options\n *\n * */\n /**\n * A `packedbubble` series. If the [type](#series.packedbubble.type) option is\n * not specified, it is inherited from [chart.type](#chart.type).\n *\n * @type {Object}\n * @extends series,plotOptions.packedbubble\n * @excluding cropThreshold, dataParser, dataSorting, dataURL, dragDrop, stack,\n * boostThreshold, boostBlending\n * @product highcharts\n * @requires highcharts-more\n * @apioption series.packedbubble\n */\n /**\n * An array of data points for the series. For the `packedbubble` series type,\n * points can be given in the following ways:\n *\n * 1. An array of `values`.\n *\n * ```js\n * data: [5, 1, 20]\n * ```\n *\n * 2. An array of objects with named values. The objects are point\n * configuration objects as seen below. If the total number of data points\n * exceeds the series' [turboThreshold](#series.packedbubble.turboThreshold),\n * this option is not available.\n *\n * ```js\n * data: [{\n * value: 1,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * value: 5,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @type {Array}\n * @extends series.line.data\n * @excluding marker, x, y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n * @product highcharts\n * @apioption series.packedbubble.data\n */\n /**\n * @type {Highcharts.SeriesPackedBubbleDataLabelsOptionsObject|Array}\n * @product highcharts\n * @apioption series.packedbubble.data.dataLabels\n */\n /**\n * @excluding enabled,enabledThreshold,height,radius,width\n * @product highcharts\n * @apioption series.packedbubble.marker\n */\n ''; // adds doclets above to transpiled file\n\n return PackedBubbleSeriesDefaults;\n });\n _registerModule(_modules, 'Series/Networkgraph/VerletIntegration.js', [], function () {\n /* *\n *\n * Networkgraph series\n *\n * (c) 2010-2021 Pawe\u0142 Fus\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * Attractive force.\n *\n * In Verlet integration, force is applied on a node immidatelly to it's\n * `plotX` and `plotY` position.\n *\n * @private\n * @param {Highcharts.Point} link\n * Link that connects two nodes\n * @param {number} force\n * Force calcualated in `repulsiveForceFunction`\n * @param {Highcharts.PositionObject} distance\n * Distance between two nodes e.g. `{x, y}`\n */\n function attractive(link, force, distanceXY) {\n var massFactor = link.getMass(),\n translatedX = -distanceXY.x * force * this.diffTemperature,\n translatedY = -distanceXY.y * force * this.diffTemperature;\n if (!link.fromNode.fixedPosition) {\n link.fromNode.plotX -=\n translatedX * massFactor.fromNode / link.fromNode.degree;\n link.fromNode.plotY -=\n translatedY * massFactor.fromNode / link.fromNode.degree;\n }\n if (!link.toNode.fixedPosition) {\n link.toNode.plotX +=\n translatedX * massFactor.toNode / link.toNode.degree;\n link.toNode.plotY +=\n translatedY * massFactor.toNode / link.toNode.degree;\n }\n }\n /**\n * Attractive force funtion. Can be replaced by API's\n * `layoutAlgorithm.attractiveForce`\n *\n * @private\n * @param {number} d current distance between two nodes\n * @param {number} k expected distance between two nodes\n * @return {number} force\n */\n function attractiveForceFunction(d, k) {\n // Used in API:\n return (k - d) / d;\n }\n /**\n * Barycenter force. Calculate and applys barycenter forces on the\n * nodes. Making them closer to the center of their barycenter point.\n *\n * In Verlet integration, force is applied on a node immidatelly to it's\n * `plotX` and `plotY` position.\n *\n * @private\n */\n function barycenter() {\n var gravitationalConstant = this.options.gravitationalConstant,\n xFactor = this.barycenter.xFactor,\n yFactor = this.barycenter.yFactor;\n // To consider:\n xFactor = (xFactor - (this.box.left + this.box.width) / 2) *\n gravitationalConstant;\n yFactor = (yFactor - (this.box.top + this.box.height) / 2) *\n gravitationalConstant;\n this.nodes.forEach(function (node) {\n if (!node.fixedPosition) {\n node.plotX -=\n xFactor / node.mass / node.degree;\n node.plotY -=\n yFactor / node.mass / node.degree;\n }\n });\n }\n /**\n * Estiamte the best possible distance between two nodes, making graph\n * readable.\n * @private\n */\n function getK(layout) {\n return Math.pow(layout.box.width * layout.box.height / layout.nodes.length, 0.5);\n }\n /**\n * Integration method.\n *\n * In Verlet integration, forces are applied on node immidatelly to it's\n * `plotX` and `plotY` position.\n *\n * Verlet without velocity:\n *\n * x(n+1) = 2 * x(n) - x(n-1) + A(T) * deltaT ^ 2\n *\n * where:\n * - x(n+1) - new position\n * - x(n) - current position\n * - x(n-1) - previous position\n *\n * Assuming A(t) = 0 (no acceleration) and (deltaT = 1) we get:\n *\n * x(n+1) = x(n) + (x(n) - x(n-1))\n *\n * where:\n * - (x(n) - x(n-1)) - position change\n *\n * TO DO:\n * Consider Verlet with velocity to support additional\n * forces. Or even Time-Corrected Verlet by Jonathan\n * \"lonesock\" Dummer\n *\n * @private\n * @param {Highcharts.NetworkgraphLayout} layout layout object\n * @param {Highcharts.Point} node node that should be translated\n */\n function integrate(layout, node) {\n var friction = -layout.options.friction,\n maxSpeed = layout.options.maxSpeed,\n prevX = node.prevX,\n prevY = node.prevY, \n // Apply friciton:\n diffX = ((node.plotX + node.dispX -\n prevX) * friction),\n diffY = ((node.plotY + node.dispY -\n prevY) * friction),\n abs = Math.abs,\n signX = abs(diffX) / (diffX || 1), // need to deal with 0\n signY = abs(diffY) / (diffY || 1);\n // Apply max speed:\n diffX = signX * Math.min(maxSpeed, Math.abs(diffX));\n diffY = signY * Math.min(maxSpeed, Math.abs(diffY));\n // Store for the next iteration:\n node.prevX = node.plotX + node.dispX;\n node.prevY = node.plotY + node.dispY;\n // Update positions:\n node.plotX += diffX;\n node.plotY += diffY;\n node.temperature = layout.vectorLength({\n x: diffX,\n y: diffY\n });\n }\n /**\n * Repulsive force.\n *\n * In Verlet integration, force is applied on a node immidatelly to it's\n * `plotX` and `plotY` position.\n *\n * @private\n * @param {Highcharts.Point} node\n * Node that should be translated by force.\n * @param {number} force\n * Force calcualated in `repulsiveForceFunction`\n * @param {Highcharts.PositionObject} distance\n * Distance between two nodes e.g. `{x, y}`\n */\n function repulsive(node, force, distanceXY) {\n var factor = force * this.diffTemperature / node.mass / node.degree;\n if (!node.fixedPosition) {\n node.plotX += distanceXY.x * factor;\n node.plotY += distanceXY.y * factor;\n }\n }\n /**\n * Repulsive force funtion. Can be replaced by API's\n * `layoutAlgorithm.repulsiveForce`\n *\n * @private\n * @param {number} d current distance between two nodes\n * @param {number} k expected distance between two nodes\n * @return {number} force\n */\n function repulsiveForceFunction(d, k) {\n // Used in API:\n return (k - d) / d * (k > d ? 1 : 0); // Force only for close nodes\n }\n /* *\n *\n * Default Export\n *\n * */\n var VerletIntegration = {\n attractive: attractive,\n attractiveForceFunction: attractiveForceFunction,\n barycenter: barycenter,\n getK: getK,\n integrate: integrate,\n repulsive: repulsive,\n repulsiveForceFunction: repulsiveForceFunction\n };\n\n return VerletIntegration;\n });\n _registerModule(_modules, 'Series/PackedBubble/PackedBubbleIntegration.js', [_modules['Core/Globals.js'], _modules['Series/Networkgraph/VerletIntegration.js']], function (H, VerletIntegration) {\n /* *\n *\n * (c) 2010-2021 Grzegorz Blachlinski, Sebastian Bochan\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n var noop = H.noop;\n /* *\n *\n * Functions\n *\n * */\n /**\n * @private\n */\n function barycenter() {\n var layout = this,\n gravitationalConstant = layout.options.gravitationalConstant,\n box = layout.box,\n nodes = layout.nodes;\n var centerX,\n centerY;\n for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {\n var node = nodes_1[_i];\n if (layout.options.splitSeries && !node.isParentNode) {\n centerX = node.series.parentNode.plotX;\n centerY = node.series.parentNode.plotY;\n }\n else {\n centerX = box.width / 2;\n centerY = box.height / 2;\n }\n if (!node.fixedPosition) {\n node.plotX -=\n (node.plotX - centerX) *\n gravitationalConstant /\n (node.mass * Math.sqrt(nodes.length));\n node.plotY -=\n (node.plotY - centerY) *\n gravitationalConstant /\n (node.mass * Math.sqrt(nodes.length));\n }\n }\n }\n /**\n * @private\n */\n function repulsive(node, force, distanceXY, repNode) {\n var factor = (force * this.diffTemperature / node.mass /\n node.degree),\n x = distanceXY.x * factor,\n y = distanceXY.y * factor;\n if (!node.fixedPosition) {\n node.plotX += x;\n node.plotY += y;\n }\n if (!repNode.fixedPosition) {\n repNode.plotX -= x;\n repNode.plotY -= y;\n }\n }\n /**\n * @private\n */\n function repulsiveForceFunction(d, k, node, repNode) {\n return Math.min(d, (node.marker.radius +\n repNode.marker.radius) / 2);\n }\n /* *\n *\n * Default Export\n *\n * */\n var PackedBubbleIntegration = {\n barycenter: barycenter,\n getK: noop,\n integrate: VerletIntegration.integrate,\n repulsive: repulsive,\n repulsiveForceFunction: repulsiveForceFunction\n };\n\n return PackedBubbleIntegration;\n });\n _registerModule(_modules, 'Series/Networkgraph/EulerIntegration.js', [], function () {\n /* *\n *\n * Networkgraph series\n *\n * (c) 2010-2021 Pawe\u0142 Fus\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * Attractive force.\n *\n * In Euler integration, force is stored in a node, not changing it's\n * position. Later, in `integrate()` forces are applied on nodes.\n *\n * @private\n * @param {Highcharts.Point} link\n * Link that connects two nodes\n * @param {number} force\n * Force calcualated in `repulsiveForceFunction`\n * @param {Highcharts.PositionObject} distanceXY\n * Distance between two nodes e.g. `{x, y}`\n * @param {number} distanceR\n */\n function attractive(link, force, distanceXY, distanceR) {\n var massFactor = link.getMass(),\n translatedX = (distanceXY.x / distanceR) * force,\n translatedY = (distanceXY.y / distanceR) * force;\n if (!link.fromNode.fixedPosition) {\n link.fromNode.dispX -=\n translatedX * massFactor.fromNode / link.fromNode.degree;\n link.fromNode.dispY -=\n translatedY * massFactor.fromNode / link.fromNode.degree;\n }\n if (!link.toNode.fixedPosition) {\n link.toNode.dispX +=\n translatedX * massFactor.toNode / link.toNode.degree;\n link.toNode.dispY +=\n translatedY * massFactor.toNode / link.toNode.degree;\n }\n }\n /**\n * Attractive force funtion. Can be replaced by API's\n * `layoutAlgorithm.attractiveForce`\n *\n * Other forces that can be used:\n *\n * basic, not recommended:\n * `function (d, k) { return d / k }`\n *\n * @private\n * @param {number} d current distance between two nodes\n * @param {number} k expected distance between two nodes\n * @return {number} force\n */\n function attractiveForceFunction(d, k) {\n return d * d / k;\n }\n /**\n * Barycenter force. Calculate and applys barycenter forces on the\n * nodes. Making them closer to the center of their barycenter point.\n *\n * In Euler integration, force is stored in a node, not changing it's\n * position. Later, in `integrate()` forces are applied on nodes.\n *\n * @private\n */\n function barycenter() {\n var gravitationalConstant = this.options.gravitationalConstant,\n xFactor = this.barycenter.xFactor,\n yFactor = this.barycenter.yFactor;\n this.nodes.forEach(function (node) {\n if (!node.fixedPosition) {\n var degree = node.getDegree(),\n phi = degree * (1 + degree / 2);\n node.dispX += ((xFactor - node.plotX) *\n gravitationalConstant *\n phi / node.degree);\n node.dispY += ((yFactor - node.plotY) *\n gravitationalConstant *\n phi / node.degree);\n }\n });\n }\n /**\n * Estiamte the best possible distance between two nodes, making graph\n * readable.\n * @private\n */\n function getK(layout) {\n return Math.pow(layout.box.width * layout.box.height / layout.nodes.length, 0.3);\n }\n /**\n * Integration method.\n *\n * In Euler integration, force were stored in a node, not changing it's\n * position. Now, in the integrator method, we apply changes.\n *\n * Euler:\n *\n * Basic form: `x(n+1) = x(n) + v(n)`\n *\n * With Rengoild-Fruchterman we get:\n * `x(n+1) = x(n) + v(n) / length(v(n)) * min(v(n), temperature(n))`\n * where:\n * - `x(n+1)`: next position\n * - `x(n)`: current position\n * - `v(n)`: velocity (comes from net force)\n * - `temperature(n)`: current temperature\n *\n * Known issues:\n * Oscillations when force vector has the same magnitude but opposite\n * direction in the next step. Potentially solved by decreasing force by\n * `v * (1 / node.degree)`\n *\n * Note:\n * Actually `min(v(n), temperature(n))` replaces simulated annealing.\n *\n * @private\n * @param {Highcharts.NetworkgraphLayout} layout\n * Layout object\n * @param {Highcharts.Point} node\n * Node that should be translated\n */\n function integrate(layout, node) {\n var distanceR;\n node.dispX +=\n node.dispX * layout.options.friction;\n node.dispY +=\n node.dispY * layout.options.friction;\n distanceR = node.temperature = layout.vectorLength({\n x: node.dispX,\n y: node.dispY\n });\n if (distanceR !== 0) {\n node.plotX += (node.dispX / distanceR *\n Math.min(Math.abs(node.dispX), layout.temperature));\n node.plotY += (node.dispY / distanceR *\n Math.min(Math.abs(node.dispY), layout.temperature));\n }\n }\n /**\n * Repulsive force.\n *\n * @private\n * @param {Highcharts.Point} node\n * Node that should be translated by force.\n * @param {number} force\n * Force calcualated in `repulsiveForceFunction`\n * @param {Highcharts.PositionObject} distanceXY\n * Distance between two nodes e.g. `{x, y}`\n */\n function repulsive(node, force, distanceXY, distanceR) {\n node.dispX +=\n (distanceXY.x / distanceR) * force / node.degree;\n node.dispY +=\n (distanceXY.y / distanceR) * force / node.degree;\n }\n /**\n * Repulsive force funtion. Can be replaced by API's\n * `layoutAlgorithm.repulsiveForce`.\n *\n * Other forces that can be used:\n *\n * basic, not recommended:\n * `function (d, k) { return k / d }`\n *\n * standard:\n * `function (d, k) { return k * k / d }`\n *\n * grid-variant:\n * `function (d, k) { return k * k / d * (2 * k - d > 0 ? 1 : 0) }`\n *\n * @private\n * @param {number} d current distance between two nodes\n * @param {number} k expected distance between two nodes\n * @return {number} force\n */\n function repulsiveForceFunction(d, k) {\n return k * k / d;\n }\n /* *\n *\n * Default Export\n *\n * */\n var EulerIntegration = {\n attractive: attractive,\n attractiveForceFunction: attractiveForceFunction,\n barycenter: barycenter,\n getK: getK,\n integrate: integrate,\n repulsive: repulsive,\n repulsiveForceFunction: repulsiveForceFunction\n };\n\n return EulerIntegration;\n });\n _registerModule(_modules, 'Series/Networkgraph/QuadTreeNode.js', [], function () {\n /* *\n *\n * Networkgraph series\n *\n * (c) 2010-2021 Pawe\u0142 Fus\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n /* *\n *\n * Class\n *\n * */\n /**\n * The QuadTree node class. Used in Networkgraph chart as a base for Barnes-Hut\n * approximation.\n *\n * @private\n * @class\n * @name Highcharts.QuadTreeNode\n *\n * @param {Highcharts.Dictionary} box\n * Available space for the node\n */\n var QuadTreeNode = /** @class */ (function () {\n /* *\n *\n * Constructor\n *\n * */\n function QuadTreeNode(box) {\n /* *\n *\n * Properties\n *\n * */\n /**\n * Read only. If QuadTreeNode is an external node, Point is stored in\n * `this.body`.\n *\n * @name Highcharts.QuadTreeNode#body\n * @type {boolean|Highcharts.Point}\n */\n this.body = false;\n /**\n * Read only. Internal nodes when created are empty to reserve the\n * space. If Point is added to this QuadTreeNode, QuadTreeNode is no\n * longer empty.\n *\n * @name Highcharts.QuadTreeNode#isEmpty\n * @type {boolean}\n */\n this.isEmpty = false;\n /**\n * Read only. Flag to determine if QuadTreeNode is internal (and has\n * subnodes with mass and central position) or external (bound to\n * Point).\n *\n * @name Highcharts.QuadTreeNode#isInternal\n * @type {boolean}\n */\n this.isInternal = false;\n /**\n * Read only. Array of subnodes. Empty if QuadTreeNode has just one\n * Point. When added another Point to this QuadTreeNode, array is\n * filled with four subnodes.\n *\n * @name Highcharts.QuadTreeNode#nodes\n * @type {Array}\n */\n this.nodes = [];\n /**\n * Read only. The available space for node.\n *\n * @name Highcharts.QuadTreeNode#box\n * @type {Highcharts.Dictionary}\n */\n this.box = box;\n /**\n * Read only. The minium of width and height values.\n *\n * @name Highcharts.QuadTreeNode#boxSize\n * @type {number}\n */\n this.boxSize = Math.min(box.width, box.height);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * When inserting another node into the box, that already hove one node,\n * divide the available space into another four quadrants.\n *\n * Indexes of quadrants are:\n * ```\n * ------------- -------------\n * | | | | |\n * | | | 0 | 1 |\n * | | divide() | | |\n * | 1 | -----------> -------------\n * | | | | |\n * | | | 3 | 2 |\n * | | | | |\n * ------------- -------------\n * ```\n */\n QuadTreeNode.prototype.divideBox = function () {\n var halfWidth = this.box.width / 2,\n halfHeight = this.box.height / 2;\n // Top left\n this.nodes[0] = new QuadTreeNode({\n left: this.box.left,\n top: this.box.top,\n width: halfWidth,\n height: halfHeight\n });\n // Top right\n this.nodes[1] = new QuadTreeNode({\n left: this.box.left + halfWidth,\n top: this.box.top,\n width: halfWidth,\n height: halfHeight\n });\n // Bottom right\n this.nodes[2] = new QuadTreeNode({\n left: this.box.left + halfWidth,\n top: this.box.top + halfHeight,\n width: halfWidth,\n height: halfHeight\n });\n // Bottom left\n this.nodes[3] = new QuadTreeNode({\n left: this.box.left,\n top: this.box.top + halfHeight,\n width: halfWidth,\n height: halfHeight\n });\n };\n /**\n * Determine which of the quadrants should be used when placing node in\n * the QuadTree. Returned index is always in range `< 0 , 3 >`.\n * @private\n */\n QuadTreeNode.prototype.getBoxPosition = function (point) {\n var left = point.plotX < this.box.left + this.box.width / 2,\n top = point.plotY < this.box.top + this.box.height / 2;\n var index;\n if (left) {\n if (top) {\n // Top left\n index = 0;\n }\n else {\n // Bottom left\n index = 3;\n }\n }\n else {\n if (top) {\n // Top right\n index = 1;\n }\n else {\n // Bottom right\n index = 2;\n }\n }\n return index;\n };\n /**\n * Insert recursively point(node) into the QuadTree. If the given\n * quadrant is already occupied, divide it into smaller quadrants.\n *\n * @param {Highcharts.Point} point\n * Point/node to be inserted\n * @param {number} depth\n * Max depth of the QuadTree\n */\n QuadTreeNode.prototype.insert = function (point, depth) {\n var newQuadTreeNode;\n if (this.isInternal) {\n // Internal node:\n this.nodes[this.getBoxPosition(point)].insert(point, depth - 1);\n }\n else {\n this.isEmpty = false;\n if (!this.body) {\n // First body in a quadrant:\n this.isInternal = false;\n this.body = point;\n }\n else {\n if (depth) {\n // Every other body in a quadrant:\n this.isInternal = true;\n this.divideBox();\n // Reinsert main body only once:\n if (this.body !== true) {\n this.nodes[this.getBoxPosition(this.body)]\n .insert(this.body, depth - 1);\n this.body = true;\n }\n // Add second body:\n this.nodes[this.getBoxPosition(point)]\n .insert(point, depth - 1);\n }\n else {\n // We are below max allowed depth. That means either:\n // - really huge number of points\n // - falling two points into exactly the same position\n // In this case, create another node in the QuadTree.\n //\n // Alternatively we could add some noise to the\n // position, but that could result in different\n // rendered chart in exporting.\n newQuadTreeNode = new QuadTreeNode({\n top: point.plotX || NaN,\n left: point.plotY || NaN,\n // Width/height below 1px\n width: 0.1,\n height: 0.1\n });\n newQuadTreeNode.body = point;\n newQuadTreeNode.isInternal = false;\n this.nodes.push(newQuadTreeNode);\n }\n }\n }\n };\n /**\n * Each quad node requires it's mass and center position. That mass and\n * position is used to imitate real node in the layout by approximation.\n */\n QuadTreeNode.prototype.updateMassAndCenter = function () {\n var mass = 0,\n plotX = 0,\n plotY = 0;\n if (this.isInternal) {\n // Calcualte weightened mass of the quad node:\n for (var _i = 0, _a = this.nodes; _i < _a.length; _i++) {\n var pointMass = _a[_i];\n if (!pointMass.isEmpty) {\n mass += pointMass.mass;\n plotX += pointMass.plotX * pointMass.mass;\n plotY += pointMass.plotY * pointMass.mass;\n }\n }\n plotX /= mass;\n plotY /= mass;\n }\n else if (this.body) {\n // Just one node, use coordinates directly:\n mass = this.body.mass;\n plotX = this.body.plotX;\n plotY = this.body.plotY;\n }\n // Store details:\n this.mass = mass;\n this.plotX = plotX;\n this.plotY = plotY;\n };\n return QuadTreeNode;\n }());\n /* *\n *\n * Default Export\n *\n * */\n\n return QuadTreeNode;\n });\n _registerModule(_modules, 'Series/Networkgraph/QuadTree.js', [_modules['Series/Networkgraph/QuadTreeNode.js']], function (QuadTreeNode) {\n /* *\n *\n * Networkgraph series\n *\n * (c) 2010-2021 Pawe\u0142 Fus\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n /* *\n *\n * Class\n *\n * */\n /**\n * The QuadTree class. Used in Networkgraph chart as a base for Barnes-Hut\n * approximation.\n *\n * @private\n * @class\n * @name Highcharts.QuadTree\n *\n * @param {number} x\n * Left position of the plotting area\n * @param {number} y\n * Top position of the plotting area\n * @param {number} width\n * Width of the plotting area\n * @param {number} height\n * Height of the plotting area\n */\n var QuadTree = /** @class */ (function () {\n /* *\n *\n * Constructor\n *\n * */\n function QuadTree(x, y, width, height) {\n // Boundary rectangle:\n this.box = {\n left: x,\n top: y,\n width: width,\n height: height\n };\n this.maxDepth = 25;\n this.root = new QuadTreeNode(this.box);\n this.root.isInternal = true;\n this.root.isRoot = true;\n this.root.divideBox();\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Calculate mass of the each QuadNode in the tree.\n */\n QuadTree.prototype.calculateMassAndCenter = function () {\n this.visitNodeRecursive(null, null, function (node) {\n node.updateMassAndCenter();\n });\n };\n /**\n * Insert nodes into the QuadTree\n *\n * @param {Array} points\n * Points as nodes\n */\n QuadTree.prototype.insertNodes = function (points) {\n for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {\n var point = points_1[_i];\n this.root.insert(point, this.maxDepth);\n }\n };\n /**\n * Depfth first treversal (DFS). Using `before` and `after` callbacks,\n * we can get two results: preorder and postorder traversals, reminder:\n *\n * ```\n * (a)\n * / \\\n * (b) (c)\n * / \\\n * (d) (e)\n * ```\n *\n * DFS (preorder): `a -> b -> d -> e -> c`\n *\n * DFS (postorder): `d -> e -> b -> c -> a`\n *\n * @param {Highcharts.QuadTreeNode|null} node\n * QuadTree node\n * @param {Function} [beforeCallback]\n * Function to be called before visiting children nodes.\n * @param {Function} [afterCallback]\n * Function to be called after visiting children nodes.\n */\n QuadTree.prototype.visitNodeRecursive = function (node, beforeCallback, afterCallback) {\n var goFurther;\n if (!node) {\n node = this.root;\n }\n if (node === this.root && beforeCallback) {\n goFurther = beforeCallback(node);\n }\n if (goFurther === false) {\n return;\n }\n for (var _i = 0, _a = node.nodes; _i < _a.length; _i++) {\n var qtNode = _a[_i];\n if (qtNode.isInternal) {\n if (beforeCallback) {\n goFurther = beforeCallback(qtNode);\n }\n if (goFurther === false) {\n continue;\n }\n this.visitNodeRecursive(qtNode, beforeCallback, afterCallback);\n }\n else if (qtNode.body) {\n if (beforeCallback) {\n beforeCallback(qtNode.body);\n }\n }\n if (afterCallback) {\n afterCallback(qtNode);\n }\n }\n if (node === this.root && afterCallback) {\n afterCallback(node);\n }\n };\n return QuadTree;\n }());\n /* *\n *\n * Default Export\n *\n * */\n\n return QuadTree;\n });\n _registerModule(_modules, 'Series/Networkgraph/ReingoldFruchtermanLayout.js', [_modules['Series/Networkgraph/EulerIntegration.js'], _modules['Core/Globals.js'], _modules['Series/GraphLayoutComposition.js'], _modules['Series/Networkgraph/QuadTree.js'], _modules['Core/Utilities.js'], _modules['Series/Networkgraph/VerletIntegration.js']], function (EulerIntegration, H, GraphLayout, QuadTree, U, VerletIntegration) {\n /* *\n *\n * Networkgraph series\n *\n * (c) 2010-2021 Pawe\u0142 Fus\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n var win = H.win;\n var clamp = U.clamp,\n defined = U.defined,\n isFunction = U.isFunction,\n pick = U.pick;\n /* *\n *\n * Class\n *\n * */\n /**\n * Reingold-Fruchterman algorithm from\n * \"Graph Drawing by Force-directed Placement\" paper.\n * @private\n */\n var ReingoldFruchtermanLayout = /** @class */ (function () {\n function ReingoldFruchtermanLayout() {\n /* *\n *\n * Static Functions\n *\n * */\n this.attractiveForce = void 0;\n this.box = {};\n this.currentStep = 0;\n this.initialRendering = true;\n this.integration = void 0;\n this.links = [];\n this.nodes = [];\n this.options = void 0;\n this.quadTree = void 0;\n this.repulsiveForce = void 0;\n this.series = [];\n this.simulation = false;\n }\n ReingoldFruchtermanLayout.compose = function (ChartClass) {\n GraphLayout.compose(ChartClass);\n GraphLayout.integrations.euler = EulerIntegration;\n GraphLayout.integrations.verlet = VerletIntegration;\n GraphLayout.layouts['reingold-fruchterman'] =\n ReingoldFruchtermanLayout;\n };\n ReingoldFruchtermanLayout.prototype.init = function (options) {\n this.options = options;\n this.nodes = [];\n this.links = [];\n this.series = [];\n this.box = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n this.setInitialRendering(true);\n this.integration =\n GraphLayout.integrations[options.integration];\n this.enableSimulation = options.enableSimulation;\n this.attractiveForce = pick(options.attractiveForce, this.integration.attractiveForceFunction);\n this.repulsiveForce = pick(options.repulsiveForce, this.integration.repulsiveForceFunction);\n this.approximation = options.approximation;\n };\n ReingoldFruchtermanLayout.prototype.updateSimulation = function (enable) {\n this.enableSimulation = pick(enable, this.options.enableSimulation);\n };\n ReingoldFruchtermanLayout.prototype.start = function () {\n var layout = this,\n series = this.series,\n options = this.options;\n layout.currentStep = 0;\n layout.forces = series[0] && series[0].forces || [];\n layout.chart = series[0] && series[0].chart;\n if (layout.initialRendering) {\n layout.initPositions();\n // Render elements in initial positions:\n series.forEach(function (s) {\n s.finishedAnimating = true; // #13169\n s.render();\n });\n }\n layout.setK();\n layout.resetSimulation(options);\n if (layout.enableSimulation) {\n layout.step();\n }\n };\n ReingoldFruchtermanLayout.prototype.step = function () {\n var _this = this;\n var anyLayout = this,\n allSeries = this.series;\n // Algorithm:\n this.currentStep++;\n if (this.approximation === 'barnes-hut') {\n this.createQuadTree();\n this.quadTree.calculateMassAndCenter();\n }\n for (var _i = 0, _a = this.forces || []; _i < _a.length; _i++) {\n var forceName = _a[_i];\n anyLayout[forceName + 'Forces'](this.temperature);\n }\n // Limit to the plotting area and cool down:\n this.applyLimits();\n // Cool down the system:\n this.temperature = this.coolDown(this.startTemperature, this.diffTemperature, this.currentStep);\n this.prevSystemTemperature = this.systemTemperature;\n this.systemTemperature = this.getSystemTemperature();\n if (this.enableSimulation) {\n for (var _b = 0, allSeries_1 = allSeries; _b < allSeries_1.length; _b++) {\n var series = allSeries_1[_b];\n // Chart could be destroyed during the simulation\n if (series.chart) {\n series.render();\n }\n }\n if (this.maxIterations-- &&\n isFinite(this.temperature) &&\n !this.isStable()) {\n if (this.simulation) {\n win.cancelAnimationFrame(this.simulation);\n }\n this.simulation = win.requestAnimationFrame(function () { return _this.step(); });\n }\n else {\n this.simulation = false;\n }\n }\n };\n ReingoldFruchtermanLayout.prototype.stop = function () {\n if (this.simulation) {\n win.cancelAnimationFrame(this.simulation);\n }\n };\n ReingoldFruchtermanLayout.prototype.setArea = function (x, y, w, h) {\n this.box = {\n left: x,\n top: y,\n width: w,\n height: h\n };\n };\n ReingoldFruchtermanLayout.prototype.setK = function () {\n // Optimal distance between nodes,\n // available space around the node:\n this.k = this.options.linkLength || this.integration.getK(this);\n };\n ReingoldFruchtermanLayout.prototype.addElementsToCollection = function (elements, collection) {\n for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {\n var element = elements_1[_i];\n if (collection.indexOf(element) === -1) {\n collection.push(element);\n }\n }\n };\n ReingoldFruchtermanLayout.prototype.removeElementFromCollection = function (element, collection) {\n var index = collection.indexOf(element);\n if (index !== -1) {\n collection.splice(index, 1);\n }\n };\n ReingoldFruchtermanLayout.prototype.clear = function () {\n this.nodes.length = 0;\n this.links.length = 0;\n this.series.length = 0;\n this.resetSimulation();\n };\n ReingoldFruchtermanLayout.prototype.resetSimulation = function () {\n this.forcedStop = false;\n this.systemTemperature = 0;\n this.setMaxIterations();\n this.setTemperature();\n this.setDiffTemperature();\n };\n ReingoldFruchtermanLayout.prototype.restartSimulation = function () {\n if (!this.simulation) {\n // When dragging nodes, we don't need to calculate\n // initial positions and rendering nodes:\n this.setInitialRendering(false);\n // Start new simulation:\n if (!this.enableSimulation) {\n // Run only one iteration to speed things up:\n this.setMaxIterations(1);\n }\n else {\n this.start();\n }\n if (this.chart) {\n this.chart.redraw();\n }\n // Restore defaults:\n this.setInitialRendering(true);\n }\n else {\n // Extend current simulation:\n this.resetSimulation();\n }\n };\n ReingoldFruchtermanLayout.prototype.setMaxIterations = function (maxIterations) {\n this.maxIterations = pick(maxIterations, this.options.maxIterations);\n };\n ReingoldFruchtermanLayout.prototype.setTemperature = function () {\n this.temperature = this.startTemperature =\n Math.sqrt(this.nodes.length);\n };\n ReingoldFruchtermanLayout.prototype.setDiffTemperature = function () {\n this.diffTemperature = this.startTemperature /\n (this.options.maxIterations + 1);\n };\n ReingoldFruchtermanLayout.prototype.setInitialRendering = function (enable) {\n this.initialRendering = enable;\n };\n ReingoldFruchtermanLayout.prototype.createQuadTree = function () {\n this.quadTree = new QuadTree(this.box.left, this.box.top, this.box.width, this.box.height);\n this.quadTree.insertNodes(this.nodes);\n };\n ReingoldFruchtermanLayout.prototype.initPositions = function () {\n var initialPositions = this.options.initialPositions;\n if (isFunction(initialPositions)) {\n initialPositions.call(this);\n for (var _i = 0, _a = this.nodes; _i < _a.length; _i++) {\n var node = _a[_i];\n if (!defined(node.prevX)) {\n node.prevX = node.plotX;\n }\n if (!defined(node.prevY)) {\n node.prevY = node.plotY;\n }\n node.dispX = 0;\n node.dispY = 0;\n }\n }\n else if (initialPositions === 'circle') {\n this.setCircularPositions();\n }\n else {\n this.setRandomPositions();\n }\n };\n ReingoldFruchtermanLayout.prototype.setCircularPositions = function () {\n var box = this.box,\n nodes = this.nodes,\n nodesLength = nodes.length + 1,\n angle = 2 * Math.PI / nodesLength,\n rootNodes = nodes.filter(function (node) {\n return node.linksTo.length === 0;\n }), visitedNodes = {}, radius = this.options.initialPositionRadius, addToNodes = function (node) {\n for (var _i = 0, _a = node.linksFrom || []; _i < _a.length; _i++) {\n var link = _a[_i];\n if (!visitedNodes[link.toNode.id]) {\n visitedNodes[link.toNode.id] = true;\n sortedNodes.push(link.toNode);\n addToNodes(link.toNode);\n }\n }\n };\n var sortedNodes = [];\n // Start with identified root nodes an sort the nodes by their\n // hierarchy. In trees, this ensures that branches don't cross\n // eachother.\n for (var _i = 0, rootNodes_1 = rootNodes; _i < rootNodes_1.length; _i++) {\n var rootNode = rootNodes_1[_i];\n sortedNodes.push(rootNode);\n addToNodes(rootNode);\n }\n // Cyclic tree, no root node found\n if (!sortedNodes.length) {\n sortedNodes = nodes;\n // Dangling, cyclic trees\n }\n else {\n for (var _a = 0, nodes_1 = nodes; _a < nodes_1.length; _a++) {\n var node_1 = nodes_1[_a];\n if (sortedNodes.indexOf(node_1) === -1) {\n sortedNodes.push(node_1);\n }\n }\n }\n var node;\n // Initial positions are laid out along a small circle, appearing\n // as a cluster in the middle\n for (var i = 0, iEnd = sortedNodes.length; i < iEnd; ++i) {\n node = sortedNodes[i];\n node.plotX = node.prevX = pick(node.plotX, box.width / 2 + radius * Math.cos(i * angle));\n node.plotY = node.prevY = pick(node.plotY, box.height / 2 + radius * Math.sin(i * angle));\n node.dispX = 0;\n node.dispY = 0;\n }\n };\n ReingoldFruchtermanLayout.prototype.setRandomPositions = function () {\n var box = this.box,\n nodes = this.nodes,\n nodesLength = nodes.length + 1, \n /**\n * Return a repeatable,\n quasi-random number based on an integer\n * input. For the initial positions\n * @private\n */\n unrandom = function (n) {\n var rand = n * n / Math.PI;\n rand = rand - Math.floor(rand);\n return rand;\n };\n var node;\n // Initial positions:\n for (var i = 0, iEnd = nodes.length; i < iEnd; ++i) {\n node = nodes[i];\n node.plotX = node.prevX = pick(node.plotX, box.width * unrandom(i));\n node.plotY = node.prevY = pick(node.plotY, box.height * unrandom(nodesLength + i));\n node.dispX = 0;\n node.dispY = 0;\n }\n };\n ReingoldFruchtermanLayout.prototype.force = function (name) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n this.integration[name].apply(this, args);\n };\n ReingoldFruchtermanLayout.prototype.barycenterForces = function () {\n this.getBarycenter();\n this.force('barycenter');\n };\n ReingoldFruchtermanLayout.prototype.getBarycenter = function () {\n var systemMass = 0,\n cx = 0,\n cy = 0;\n for (var _i = 0, _a = this.nodes; _i < _a.length; _i++) {\n var node = _a[_i];\n cx += node.plotX * node.mass;\n cy += node.plotY * node.mass;\n systemMass += node.mass;\n }\n this.barycenter = {\n x: cx,\n y: cy,\n xFactor: cx / systemMass,\n yFactor: cy / systemMass\n };\n return this.barycenter;\n };\n ReingoldFruchtermanLayout.prototype.barnesHutApproximation = function (node, quadNode) {\n var distanceXY = this.getDistXY(node,\n quadNode),\n distanceR = this.vectorLength(distanceXY);\n var goDeeper,\n force;\n if (node !== quadNode && distanceR !== 0) {\n if (quadNode.isInternal) {\n // Internal node:\n if (quadNode.boxSize / distanceR <\n this.options.theta &&\n distanceR !== 0) {\n // Treat as an external node:\n force = this.repulsiveForce(distanceR, this.k);\n this.force('repulsive', node, force * quadNode.mass, distanceXY, distanceR);\n goDeeper = false;\n }\n else {\n // Go deeper:\n goDeeper = true;\n }\n }\n else {\n // External node, direct force:\n force = this.repulsiveForce(distanceR, this.k);\n this.force('repulsive', node, force * quadNode.mass, distanceXY, distanceR);\n }\n }\n return goDeeper;\n };\n ReingoldFruchtermanLayout.prototype.repulsiveForces = function () {\n var _this = this;\n if (this.approximation === 'barnes-hut') {\n var _loop_1 = function (node) {\n this_1.quadTree.visitNodeRecursive(null,\n function (quadNode) { return (_this.barnesHutApproximation(node,\n quadNode)); });\n };\n var this_1 = this;\n for (var _i = 0, _a = this.nodes; _i < _a.length; _i++) {\n var node = _a[_i];\n _loop_1(node);\n }\n }\n else {\n var force = void 0,\n distanceR = void 0,\n distanceXY = void 0;\n for (var _b = 0, _c = this.nodes; _b < _c.length; _b++) {\n var node = _c[_b];\n for (var _d = 0, _e = this.nodes; _d < _e.length; _d++) {\n var repNode = _e[_d];\n if (\n // Node cannot repulse itself:\n node !== repNode &&\n // Only close nodes affect each other:\n // layout.getDistR(node, repNode) < 2 * k &&\n // Not dragged:\n !node.fixedPosition) {\n distanceXY = this.getDistXY(node, repNode);\n distanceR = this.vectorLength(distanceXY);\n if (distanceR !== 0) {\n force = this.repulsiveForce(distanceR, this.k);\n this.force('repulsive', node, force * repNode.mass, distanceXY, distanceR);\n }\n }\n }\n }\n }\n };\n ReingoldFruchtermanLayout.prototype.attractiveForces = function () {\n var distanceXY,\n distanceR,\n force;\n for (var _i = 0, _a = this.links; _i < _a.length; _i++) {\n var link = _a[_i];\n if (link.fromNode && link.toNode) {\n distanceXY = this.getDistXY(link.fromNode, link.toNode);\n distanceR = this.vectorLength(distanceXY);\n if (distanceR !== 0) {\n force = this.attractiveForce(distanceR, this.k);\n this.force('attractive', link, force, distanceXY, distanceR);\n }\n }\n }\n };\n ReingoldFruchtermanLayout.prototype.applyLimits = function () {\n var nodes = this.nodes;\n for (var _i = 0, nodes_2 = nodes; _i < nodes_2.length; _i++) {\n var node = nodes_2[_i];\n if (node.fixedPosition) {\n return;\n }\n this.integration.integrate(this, node);\n this.applyLimitBox(node, this.box);\n // Reset displacement:\n node.dispX = 0;\n node.dispY = 0;\n }\n };\n /**\n * External box that nodes should fall. When hitting an edge, node\n * should stop or bounce.\n * @private\n */\n ReingoldFruchtermanLayout.prototype.applyLimitBox = function (node, box) {\n var radius = node.radius;\n /*\n TO DO: Consider elastic collision instead of stopping.\n o' means end position when hitting plotting area edge:\n\n - \"inelastic\":\n o\n \\\n ______\n | o'\n | \\\n | \\\n\n - \"elastic\"/\"bounced\":\n o\n \\\n ______\n | ^\n | / \\\n |o' \\\n\n Euler sample:\n if (plotX < 0) {\n plotX = 0;\n dispX *= -1;\n }\n\n if (plotX > box.width) {\n plotX = box.width;\n dispX *= -1;\n }\n\n */\n // Limit X-coordinates:\n node.plotX = clamp(node.plotX, box.left + radius, box.width - radius);\n // Limit Y-coordinates:\n node.plotY = clamp(node.plotY, box.top + radius, box.height - radius);\n };\n /**\n * From \"A comparison of simulated annealing cooling strategies\" by\n * Nourani and Andresen work.\n * @private\n */\n ReingoldFruchtermanLayout.prototype.coolDown = function (temperature, temperatureStep, currentStep) {\n // Logarithmic:\n /*\n return Math.sqrt(this.nodes.length) -\n Math.log(\n currentStep * layout.diffTemperature\n );\n */\n // Exponential:\n /*\n let alpha = 0.1;\n layout.temperature = Math.sqrt(layout.nodes.length) *\n Math.pow(alpha, layout.diffTemperature);\n */\n // Linear:\n return temperature - temperatureStep * currentStep;\n };\n ReingoldFruchtermanLayout.prototype.isStable = function () {\n return Math.abs(this.systemTemperature -\n this.prevSystemTemperature) < 0.00001 || this.temperature <= 0;\n };\n ReingoldFruchtermanLayout.prototype.getSystemTemperature = function () {\n var value = 0;\n for (var _i = 0, _a = this.nodes; _i < _a.length; _i++) {\n var node = _a[_i];\n value += node.temperature;\n }\n return value;\n };\n ReingoldFruchtermanLayout.prototype.vectorLength = function (vector) {\n return Math.sqrt(vector.x * vector.x + vector.y * vector.y);\n };\n ReingoldFruchtermanLayout.prototype.getDistR = function (nodeA, nodeB) {\n var distance = this.getDistXY(nodeA,\n nodeB);\n return this.vectorLength(distance);\n };\n ReingoldFruchtermanLayout.prototype.getDistXY = function (nodeA, nodeB) {\n var xDist = nodeA.plotX - nodeB.plotX,\n yDist = nodeA.plotY - nodeB.plotY;\n return {\n x: xDist,\n y: yDist,\n absX: Math.abs(xDist),\n absY: Math.abs(yDist)\n };\n };\n return ReingoldFruchtermanLayout;\n }());\n /* *\n *\n * Default Export\n *\n * */\n\n return ReingoldFruchtermanLayout;\n });\n _registerModule(_modules, 'Series/PackedBubble/PackedBubbleLayout.js', [_modules['Series/GraphLayoutComposition.js'], _modules['Series/PackedBubble/PackedBubbleIntegration.js'], _modules['Series/Networkgraph/ReingoldFruchtermanLayout.js'], _modules['Core/Utilities.js']], function (GraphLayout, PackedBubbleIntegration, ReingoldFruchtermanLayout, U) {\n /* *\n *\n * (c) 2010-2021 Grzegorz Blachlinski, Sebastian Bochan\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var addEvent = U.addEvent,\n pick = U.pick;\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n /* *\n *\n * Functions\n *\n * */\n /**\n * @private\n */\n function chartGetSelectedParentNodes() {\n var allSeries = this.series,\n selectedParentsNodes = [];\n allSeries.forEach(function (series) {\n if (series.parentNode && series.parentNode.selected) {\n selectedParentsNodes.push(series.parentNode);\n }\n });\n return selectedParentsNodes;\n }\n /**\n * Remove accumulated data points to redistribute all of them again\n * (i.e after hiding series by legend)\n * @private\n */\n function onChartBeforeRedraw() {\n if (this.allDataPoints) {\n delete this.allDataPoints;\n }\n }\n /* *\n *\n * Class\n *\n * */\n var PackedBubbleLayout = /** @class */ (function (_super) {\n __extends(PackedBubbleLayout, _super);\n function PackedBubbleLayout() {\n /* *\n *\n * Static Functions\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n _this.index = NaN;\n _this.nodes = [];\n _this.options = void 0;\n _this.series = [];\n return _this;\n }\n PackedBubbleLayout.compose = function (ChartClass) {\n ReingoldFruchtermanLayout.compose(ChartClass);\n GraphLayout.integrations.packedbubble = PackedBubbleIntegration;\n GraphLayout.layouts.packedbubble = PackedBubbleLayout;\n if (composedClasses.indexOf(ChartClass) === -1) {\n composedClasses.push(ChartClass);\n addEvent(ChartClass, 'beforeRedraw', onChartBeforeRedraw);\n var chartProto = ChartClass.prototype;\n chartProto.getSelectedParentNodes = chartGetSelectedParentNodes;\n }\n };\n /* *\n *\n * Functions\n *\n * */\n PackedBubbleLayout.prototype.beforeStep = function () {\n if (this.options.marker) {\n this.series.forEach(function (series) {\n if (series) {\n series.calculateParentRadius();\n }\n });\n }\n };\n // #14439, new stable check.\n PackedBubbleLayout.prototype.isStable = function () {\n var tempDiff = Math.abs(this.prevSystemTemperature -\n this.systemTemperature);\n var upScaledTemperature = 10 * this.systemTemperature /\n Math.sqrt(this.nodes.length);\n return Math.abs(upScaledTemperature) < 1 &&\n tempDiff < 0.00001 ||\n this.temperature <= 0;\n };\n PackedBubbleLayout.prototype.setCircularPositions = function () {\n var layout = this,\n box = layout.box,\n nodes = layout.nodes,\n nodesLength = nodes.length + 1,\n angle = 2 * Math.PI / nodesLength,\n radius = layout.options.initialPositionRadius;\n var centerX,\n centerY,\n index = 0;\n for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {\n var node = nodes_1[_i];\n if (layout.options.splitSeries &&\n !node.isParentNode) {\n centerX = node.series.parentNode.plotX;\n centerY = node.series.parentNode.plotY;\n }\n else {\n centerX = box.width / 2;\n centerY = box.height / 2;\n }\n node.plotX = node.prevX = pick(node.plotX, centerX +\n radius * Math.cos(node.index || index * angle));\n node.plotY = node.prevY = pick(node.plotY, centerY +\n radius * Math.sin(node.index || index * angle));\n node.dispX = 0;\n node.dispY = 0;\n index++;\n }\n };\n PackedBubbleLayout.prototype.repulsiveForces = function () {\n var layout = this,\n bubblePadding = layout.options.bubblePadding;\n var force,\n distanceR,\n distanceXY;\n layout.nodes.forEach(function (node) {\n node.degree = node.mass;\n node.neighbours = 0;\n layout.nodes.forEach(function (repNode) {\n force = 0;\n if (\n // Node cannot repulse itself:\n node !== repNode &&\n // Only close nodes affect each other:\n // Not dragged:\n !node.fixedPosition &&\n (layout.options.seriesInteraction ||\n node.series === repNode.series)) {\n distanceXY = layout.getDistXY(node, repNode);\n distanceR = (layout.vectorLength(distanceXY) -\n (node.marker.radius +\n repNode.marker.radius +\n bubblePadding));\n // TODO padding configurable\n if (distanceR < 0) {\n node.degree += 0.01;\n node.neighbours++;\n force = layout.repulsiveForce(-distanceR / Math.sqrt(node.neighbours), layout.k, node, repNode);\n }\n layout.force('repulsive', node, force * repNode.mass, distanceXY, repNode, distanceR);\n }\n });\n });\n };\n PackedBubbleLayout.prototype.applyLimitBox = function (node, box) {\n var layout = this,\n factor = 0.01;\n var distanceXY,\n distanceR;\n // parentNodeLimit should be used together\n // with seriesInteraction: false\n if (layout.options.splitSeries &&\n !node.isParentNode &&\n layout.options.parentNodeLimit) {\n distanceXY = layout.getDistXY(node, node.series.parentNode);\n distanceR = (node.series.parentNodeRadius -\n node.marker.radius -\n layout.vectorLength(distanceXY));\n if (distanceR < 0 &&\n distanceR > -2 * node.marker.radius) {\n node.plotX -= distanceXY.x * factor;\n node.plotY -= distanceXY.y * factor;\n }\n }\n _super.prototype.applyLimitBox.call(this, node, box);\n };\n return PackedBubbleLayout;\n }(ReingoldFruchtermanLayout));\n /* *\n *\n * Registry\n *\n * */\n GraphLayout.layouts.packedbubble = PackedBubbleLayout;\n /* *\n *\n * Default Export\n *\n * */\n\n return PackedBubbleLayout;\n });\n _registerModule(_modules, 'Series/PackedBubble/PackedBubbleSeries.js', [_modules['Core/Color/Color.js'], _modules['Series/DragNodesComposition.js'], _modules['Series/GraphLayoutComposition.js'], _modules['Core/Globals.js'], _modules['Series/PackedBubble/PackedBubblePoint.js'], _modules['Series/PackedBubble/PackedBubbleSeriesDefaults.js'], _modules['Series/PackedBubble/PackedBubbleLayout.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (Color, DragNodesComposition, GraphLayout, H, PackedBubblePoint, PackedBubbleSeriesDefaults, PackedBubbleLayout, SeriesRegistry, U) {\n /* *\n *\n * (c) 2010-2021 Grzegorz Blachlinski, Sebastian Bochan\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var color = Color.parse;\n var noop = H.noop;\n var seriesProto = SeriesRegistry.series.prototype,\n BubbleSeries = SeriesRegistry.seriesTypes.bubble;\n var addEvent = U.addEvent,\n clamp = U.clamp,\n defined = U.defined,\n extend = U.extend,\n fireEvent = U.fireEvent,\n isArray = U.isArray,\n isNumber = U.isNumber,\n merge = U.merge,\n pick = U.pick;\n /* *\n *\n * Class\n *\n * */\n /**\n * @private\n * @class\n * @name Highcharts.seriesTypes.packedbubble\n *\n * @extends Highcharts.Series\n */\n var PackedBubbleSeries = /** @class */ (function (_super) {\n __extends(PackedBubbleSeries, _super);\n function PackedBubbleSeries() {\n /* *\n *\n * Static Properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n /* *\n *\n * Properties\n *\n * */\n _this.chart = void 0;\n _this.data = void 0;\n _this.layout = void 0;\n _this.options = void 0;\n _this.parentNodeMass = 0;\n _this.points = void 0;\n _this.xData = void 0;\n return _this;\n /* eslint-enable valid-jsdoc */\n }\n /* *\n *\n * Static Functions\n *\n * */\n PackedBubbleSeries.compose = function (AxisClass, ChartClass, LegendClass, SeriesClass) {\n BubbleSeries.compose(AxisClass, ChartClass, LegendClass, SeriesClass);\n DragNodesComposition.compose(ChartClass);\n PackedBubbleLayout.compose(ChartClass);\n };\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Create a single array of all points from all series\n * @private\n */\n PackedBubbleSeries.prototype.accumulateAllPoints = function () {\n var chart = this.chart,\n allDataPoints = [];\n var yData;\n for (var _i = 0, _a = chart.series; _i < _a.length; _i++) {\n var series = _a[_i];\n if (series.is('packedbubble') && // #13574\n series.visible ||\n !chart.options.chart.ignoreHiddenSeries) {\n yData = series.yData || [];\n // add data to array only if series is visible\n for (var j = 0; j < yData.length; j++) {\n allDataPoints.push([\n null, null,\n yData[j],\n series.index,\n j,\n {\n id: j,\n marker: {\n radius: 0\n }\n }\n ]);\n }\n }\n }\n return allDataPoints;\n };\n /**\n * Adding the basic layout to series points.\n * @private\n */\n PackedBubbleSeries.prototype.addLayout = function () {\n var layoutOptions = this.options.layoutAlgorithm =\n this.options.layoutAlgorithm || {},\n layoutType = layoutOptions.type || 'packedbubble',\n chartOptions = this.chart.options.chart;\n var graphLayoutsStorage = this.chart.graphLayoutsStorage,\n graphLayoutsLookup = this.chart.graphLayoutsLookup,\n layout;\n if (!graphLayoutsStorage) {\n this.chart.graphLayoutsStorage = graphLayoutsStorage = {};\n this.chart.graphLayoutsLookup = graphLayoutsLookup = [];\n }\n layout = graphLayoutsStorage[layoutType];\n if (!layout) {\n layoutOptions.enableSimulation =\n !defined(chartOptions.forExport) ?\n layoutOptions.enableSimulation :\n !chartOptions.forExport;\n graphLayoutsStorage[layoutType] = layout =\n new GraphLayout.layouts[layoutType]();\n layout.init(layoutOptions);\n graphLayoutsLookup.splice(layout.index, 0, layout);\n }\n this.layout = layout;\n this.points.forEach(function (node) {\n node.mass = 2;\n node.degree = 1;\n node.collisionNmb = 1;\n });\n layout.setArea(0, 0, this.chart.plotWidth, this.chart.plotHeight);\n layout.addElementsToCollection([this], layout.series);\n layout.addElementsToCollection(this.points, layout.nodes);\n };\n /**\n * Function responsible for adding series layout, used for parent nodes.\n * @private\n */\n PackedBubbleSeries.prototype.addSeriesLayout = function () {\n var layoutOptions = this.options.layoutAlgorithm =\n this.options.layoutAlgorithm || {},\n layoutType = (layoutOptions.type || 'packedbubble'),\n graphLayoutsStorage = this.chart.graphLayoutsStorage,\n graphLayoutsLookup = this.chart.graphLayoutsLookup,\n parentNodeOptions = merge(layoutOptions,\n layoutOptions.parentNodeOptions, {\n enableSimulation: this.layout.options.enableSimulation\n });\n var seriesLayout = graphLayoutsStorage[layoutType + '-series'];\n if (!seriesLayout) {\n graphLayoutsStorage[layoutType + '-series'] = seriesLayout =\n new GraphLayout.layouts[layoutType]();\n seriesLayout.init(parentNodeOptions);\n graphLayoutsLookup.splice(seriesLayout.index, 0, seriesLayout);\n }\n this.parentNodeLayout = seriesLayout;\n this.createParentNodes();\n };\n /**\n * The function responsible for calculating the parent node radius\n * based on the total surface of iniside-bubbles and the group BBox\n * @private\n */\n PackedBubbleSeries.prototype.calculateParentRadius = function () {\n var bBox = this.seriesBox(),\n parentPadding = 20,\n minParentRadius = 20;\n this.parentNodeRadius = clamp(Math.sqrt(2 * this.parentNodeMass / Math.PI) + parentPadding, minParentRadius, bBox ?\n Math.max(Math.sqrt(Math.pow(bBox.width, 2) +\n Math.pow(bBox.height, 2)) / 2 + parentPadding, minParentRadius) :\n Math.sqrt(2 * this.parentNodeMass / Math.PI) + parentPadding);\n if (this.parentNode) {\n this.parentNode.marker.radius =\n this.parentNode.radius = this.parentNodeRadius;\n }\n };\n /**\n * Calculate min and max bubble value for radius calculation.\n * @private\n */\n PackedBubbleSeries.prototype.calculateZExtremes = function () {\n var chart = this.chart,\n allSeries = chart.series;\n var zMin = this.options.zMin,\n zMax = this.options.zMax,\n valMin = Infinity,\n valMax = -Infinity;\n if (zMin && zMax) {\n return [zMin, zMax];\n }\n // it is needed to deal with null\n // and undefined values\n allSeries.forEach(function (series) {\n series.yData.forEach(function (y) {\n if (defined(y)) {\n if (y > valMax) {\n valMax = y;\n }\n if (y < valMin) {\n valMin = y;\n }\n }\n });\n });\n zMin = pick(zMin, valMin);\n zMax = pick(zMax, valMax);\n return [zMin, zMax];\n };\n /**\n * Check if two bubbles overlaps.\n * @private\n */\n PackedBubbleSeries.prototype.checkOverlap = function (bubble1, bubble2) {\n var diffX = bubble1[0] - bubble2[0], // diff of X center values\n diffY = bubble1[1] - bubble2[1], // diff of Y center values\n sumRad = bubble1[2] + bubble2[2]; // sum of bubble radius\n return (Math.sqrt(diffX * diffX + diffY * diffY) -\n Math.abs(sumRad)) < -0.001;\n };\n /**\n * Creating parent nodes for split series, in which all the bubbles\n * are rendered.\n * @private\n */\n PackedBubbleSeries.prototype.createParentNodes = function () {\n var _this = this;\n var PackedBubblePoint = this.pointClass,\n chart = this.chart,\n parentNodeLayout = this.parentNodeLayout,\n layoutOptions = this.layout.options;\n var nodeAdded,\n parentNode = this.parentNode,\n parentMarkerOptions = {\n radius: this.parentNodeRadius,\n lineColor: this.color,\n fillColor: color(this.color).brighten(0.4).get()\n };\n if (layoutOptions.parentNodeOptions) {\n parentMarkerOptions = merge(layoutOptions.parentNodeOptions.marker || {}, parentMarkerOptions);\n }\n this.parentNodeMass = 0;\n this.points.forEach(function (p) {\n _this.parentNodeMass +=\n Math.PI * Math.pow(p.marker.radius, 2);\n });\n this.calculateParentRadius();\n parentNodeLayout.nodes.forEach(function (node) {\n if (node.seriesIndex === _this.index) {\n nodeAdded = true;\n }\n });\n parentNodeLayout.setArea(0, 0, chart.plotWidth, chart.plotHeight);\n if (!nodeAdded) {\n if (!parentNode) {\n parentNode = (new PackedBubblePoint()).init(this, {\n mass: this.parentNodeRadius / 2,\n marker: parentMarkerOptions,\n dataLabels: {\n inside: false\n },\n states: {\n normal: {\n marker: parentMarkerOptions\n },\n hover: {\n marker: parentMarkerOptions\n }\n },\n dataLabelOnNull: true,\n degree: this.parentNodeRadius,\n isParentNode: true,\n seriesIndex: this.index\n });\n }\n if (this.parentNode) {\n parentNode.plotX = this.parentNode.plotX;\n parentNode.plotY = this.parentNode.plotY;\n }\n this.parentNode = parentNode;\n parentNodeLayout.addElementsToCollection([this], parentNodeLayout.series);\n parentNodeLayout.addElementsToCollection([parentNode], parentNodeLayout.nodes);\n }\n };\n /**\n * Function responsible for adding all the layouts to the chart.\n * @private\n */\n PackedBubbleSeries.prototype.deferLayout = function () {\n // TODO split layouts to independent methods\n var layoutOptions = this.options.layoutAlgorithm;\n if (!this.visible) {\n return;\n }\n // layout is using nodes for position calculation\n this.addLayout();\n if (layoutOptions.splitSeries) {\n this.addSeriesLayout();\n }\n };\n PackedBubbleSeries.prototype.destroy = function () {\n var _this = this;\n // Remove the series from all layouts series collections #11469\n if (this.chart.graphLayoutsLookup) {\n this.chart.graphLayoutsLookup.forEach(function (layout) {\n layout.removeElementFromCollection(_this, layout.series);\n }, this);\n }\n if (this.parentNode &&\n this.parentNodeLayout) {\n this.parentNodeLayout.removeElementFromCollection(this.parentNode, this.parentNodeLayout.nodes);\n if (this.parentNode.dataLabel) {\n this.parentNode.dataLabel =\n this.parentNode.dataLabel.destroy();\n }\n }\n seriesProto.destroy.apply(this, arguments);\n };\n /**\n * Packedbubble has two separate collecions of nodes if split, render\n * dataLabels for both sets:\n * @private\n */\n PackedBubbleSeries.prototype.drawDataLabels = function () {\n seriesProto.drawDataLabels.call(this, this.points);\n // Render parentNode labels:\n if (this.parentNode) {\n this.parentNode.formatPrefix = 'parentNode';\n seriesProto.drawDataLabels.call(this, [this.parentNode]);\n }\n };\n /**\n * Create Background/Parent Nodes for split series.\n * @private\n */\n PackedBubbleSeries.prototype.drawGraph = function () {\n // if the series is not using layout, don't add parent nodes\n if (!this.layout || !this.layout.options.splitSeries) {\n return;\n }\n var chart = this.chart,\n nodeMarker = this.layout.options.parentNodeOptions.marker,\n parentOptions = {\n fill: (nodeMarker.fillColor ||\n color(this.color).brighten(0.4).get()),\n opacity: nodeMarker.fillOpacity,\n stroke: nodeMarker.lineColor || this.color,\n 'stroke-width': pick(nodeMarker.lineWidth,\n this.options.lineWidth)\n };\n var parentAttribs = {};\n // create the group for parent Nodes if doesn't exist\n if (!this.parentNodesGroup) {\n this.parentNodesGroup = this.plotGroup('parentNodesGroup', 'parentNode', this.visible ? 'inherit' : 'hidden', 0.1, chart.seriesGroup);\n this.group.attr({\n zIndex: 2\n });\n }\n this.calculateParentRadius();\n parentAttribs = merge({\n x: this.parentNode.plotX -\n this.parentNodeRadius,\n y: this.parentNode.plotY -\n this.parentNodeRadius,\n width: this.parentNodeRadius * 2,\n height: this.parentNodeRadius * 2\n }, parentOptions);\n if (!this.parentNode.graphic) {\n this.graph = this.parentNode.graphic =\n chart.renderer.symbol(parentOptions.symbol)\n .add(this.parentNodesGroup);\n }\n this.parentNode.graphic.attr(parentAttribs);\n };\n PackedBubbleSeries.prototype.drawTracker = function () {\n var parentNode = this.parentNode;\n // chart = series.chart,\n // pointer = chart.pointer,\n // onMouseOver = function (e: PointerEvent): void {\n // const point = pointer.getPointFromEvent(e);\n // // undefined on graph in scatterchart\n // if (typeof point !== 'undefined') {\n // pointer.isDirectTouch = true;\n // point.onMouseOver(e);\n // }\n // };\n var dataLabels;\n _super.prototype.drawTracker.call(this);\n // Add reference to the point\n if (parentNode) {\n dataLabels = (isArray(parentNode.dataLabels) ?\n parentNode.dataLabels :\n (parentNode.dataLabel ? [parentNode.dataLabel] : []));\n if (parentNode.graphic) {\n parentNode.graphic.element.point = parentNode;\n }\n dataLabels.forEach(function (dataLabel) {\n if (dataLabel.div) {\n dataLabel.div.point = parentNode;\n }\n else {\n dataLabel.element.point = parentNode;\n }\n });\n }\n };\n /**\n * Calculate radius of bubbles in series.\n * @private\n */\n PackedBubbleSeries.prototype.getPointRadius = function () {\n var _this = this;\n var chart = this.chart,\n plotWidth = chart.plotWidth,\n plotHeight = chart.plotHeight,\n seriesOptions = this.options,\n useSimulation = seriesOptions.useSimulation,\n smallestSize = Math.min(plotWidth,\n plotHeight),\n extremes = {},\n radii = [],\n allDataPoints = chart.allDataPoints || [],\n allDataPointsLength = allDataPoints.length;\n var minSize,\n maxSize,\n value,\n radius;\n ['minSize', 'maxSize'].forEach(function (prop) {\n var length = parseInt(seriesOptions[prop], 10),\n isPercent = /%$/.test(seriesOptions[prop]);\n extremes[prop] = isPercent ?\n smallestSize * length / 100 :\n length * Math.sqrt(allDataPointsLength);\n });\n chart.minRadius = minSize = extremes.minSize /\n Math.sqrt(allDataPointsLength);\n chart.maxRadius = maxSize = extremes.maxSize /\n Math.sqrt(allDataPointsLength);\n var zExtremes = useSimulation ?\n this.calculateZExtremes() :\n [minSize,\n maxSize];\n allDataPoints.forEach(function (point, i) {\n value = useSimulation ?\n clamp(point[2], zExtremes[0], zExtremes[1]) :\n point[2];\n radius = _this.getRadius(zExtremes[0], zExtremes[1], minSize, maxSize, value);\n if (radius === 0) {\n radius = null;\n }\n allDataPoints[i][2] = radius;\n radii.push(radius);\n });\n this.radii = radii;\n };\n PackedBubbleSeries.prototype.init = function () {\n seriesProto.init.apply(this, arguments);\n /* eslint-disable no-invalid-this */\n // When one series is modified, the others need to be recomputed\n this.eventsToUnbind.push(addEvent(this, 'updatedData', function () {\n var _this = this;\n this.chart.series.forEach(function (s) {\n if (s.type === _this.type) {\n s.isDirty = true;\n }\n }, this);\n }));\n /* eslint-enable no-invalid-this */\n return this;\n };\n /**\n * Mouse up action, finalizing drag&drop.\n * @private\n * @param {Highcharts.Point} point The point that event occured.\n */\n PackedBubbleSeries.prototype.onMouseUp = function (dnPoint) {\n var point = dnPoint;\n if (point.fixedPosition && !point.removed) {\n var layout_1 = this.layout,\n parentNodeLayout = this.parentNodeLayout;\n var distanceXY_1,\n distanceR_1;\n if (parentNodeLayout && layout_1.options.dragBetweenSeries) {\n parentNodeLayout.nodes.forEach(function (node) {\n if (point && point.marker &&\n node !== point.series.parentNode) {\n distanceXY_1 = layout_1.getDistXY(point, node);\n distanceR_1 = (layout_1.vectorLength(distanceXY_1) -\n node.marker.radius -\n point.marker.radius);\n if (distanceR_1 < 0) {\n node.series.addPoint(merge(point.options, {\n plotX: point.plotX,\n plotY: point.plotY\n }), false);\n layout_1.removeElementFromCollection(point, layout_1.nodes);\n point.remove();\n }\n }\n });\n }\n DragNodesComposition.onMouseUp.apply(this, arguments);\n }\n };\n /**\n * This is the main function responsible\n * for positioning all of the bubbles\n * allDataPoints - bubble array, in format [pixel x value,\n * pixel y value, radius,\n * related series index, related point index]\n * @private\n * @param {Array} allDataPoints All points from all series\n * @return {Array} Positions of all bubbles\n */\n PackedBubbleSeries.prototype.placeBubbles = function (allDataPoints) {\n var checkOverlap = this.checkOverlap,\n positionBubble = this.positionBubble,\n bubblePos = [];\n var stage = 1,\n j = 0,\n k = 0,\n calculatedBubble,\n arr = [],\n i;\n // sort all points\n var sortedArr = allDataPoints.sort(function (a,\n b) {\n return b[2] - a[2];\n });\n if (sortedArr.length) {\n // create first bubble in the middle of the chart\n bubblePos.push([\n [\n 0,\n 0,\n sortedArr[0][2],\n sortedArr[0][3],\n sortedArr[0][4]\n ] // point index\n ]); // 0 level bubble\n if (sortedArr.length > 1) {\n bubblePos.push([\n [\n 0,\n (0 - sortedArr[1][2] -\n sortedArr[0][2]),\n // move bubble above first one\n sortedArr[1][2],\n sortedArr[1][3],\n sortedArr[1][4]\n ]\n ]); // 1 level 1st bubble\n // first two already positioned so starting from 2\n for (i = 2; i < sortedArr.length; i++) {\n sortedArr[i][2] = sortedArr[i][2] || 1;\n // in case if radius is calculated as 0.\n calculatedBubble = positionBubble(bubblePos[stage][j], bubblePos[stage - 1][k], sortedArr[i]); // calculate initial bubble position\n if (checkOverlap(calculatedBubble, bubblePos[stage][0])) {\n /* if new bubble is overlapping with first bubble\n * in current level (stage)\n */\n bubblePos.push([]);\n k = 0;\n /* reset index of bubble, used for\n * positioning the bubbles around it,\n * we are starting from first bubble in next\n * stage because we are changing level to higher\n */\n bubblePos[stage + 1].push(positionBubble(bubblePos[stage][j], bubblePos[stage][0], sortedArr[i]));\n // (last bubble, 1. from curr stage, new bubble)\n stage++; // the new level is created, above current\n j = 0; // set the index of bubble in curr level to 0\n }\n else if (stage > 1 &&\n bubblePos[stage - 1][k + 1] &&\n checkOverlap(calculatedBubble, bubblePos[stage - 1][k + 1])) {\n /* if new bubble is overlapping with one of the prev\n * stage bubbles, it means that - bubble, used for\n * positioning the bubbles around it has changed\n * so we need to recalculate it\n */\n k++;\n bubblePos[stage].push(positionBubble(bubblePos[stage][j], bubblePos[stage - 1][k], sortedArr[i]));\n // (last bubble, prev stage bubble, new bubble)\n j++;\n }\n else { // simply add calculated bubble\n j++;\n bubblePos[stage].push(calculatedBubble);\n }\n }\n }\n this.chart.stages = bubblePos;\n // it may not be necessary but adding it just in case -\n // it is containing all of the bubble levels\n this.chart.rawPositions =\n []\n .concat.apply([], bubblePos);\n // bubble positions merged into one array\n this.resizeRadius();\n arr = this.chart.rawPositions;\n }\n return arr;\n };\n /**\n * Function that checks for a parentMarker and sets the correct opacity.\n * @private\n * @param {Highcharts.Pack} point\n * Candidate point for opacity correction.\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 PackedBubbleSeries.prototype.pointAttribs = function (point, state) {\n var options = this.options,\n hasParentMarker = point && point.isParentNode;\n var markerOptions = options.marker;\n if (hasParentMarker &&\n options.layoutAlgorithm &&\n options.layoutAlgorithm.parentNodeOptions) {\n markerOptions = options.layoutAlgorithm.parentNodeOptions.marker;\n }\n var fillOpacity = markerOptions.fillOpacity,\n attr = seriesProto.pointAttribs.call(this,\n point,\n state);\n if (fillOpacity !== 1) {\n attr['fill-opacity'] = fillOpacity;\n }\n return attr;\n };\n /**\n * Function that is adding one bubble based on positions and sizes of\n * two other bubbles, lastBubble is the last added bubble, newOrigin is\n * the bubble for positioning new bubbles. nextBubble is the curently\n * added bubble for which we are calculating positions\n * @private\n * @param {Array} lastBubble The closest last bubble\n * @param {Array} newOrigin New bubble\n * @param {Array} nextBubble The closest next bubble\n * @return {Array} Bubble with correct positions\n */\n PackedBubbleSeries.prototype.positionBubble = function (lastBubble, newOrigin, nextBubble) {\n var sqrt = Math.sqrt,\n asin = Math.asin,\n acos = Math.acos,\n pow = Math.pow,\n abs = Math.abs,\n distance = sqrt(// dist between lastBubble and newOrigin\n pow((lastBubble[0] - newOrigin[0]), 2) +\n pow((lastBubble[1] - newOrigin[1]), 2)),\n alfa = acos(\n // from cosinus theorem: alfa is an angle used for\n // calculating correct position\n (pow(distance, 2) +\n pow(nextBubble[2] + newOrigin[2], 2) -\n pow(nextBubble[2] + lastBubble[2], 2)) / (2 * (nextBubble[2] + newOrigin[2]) * distance)),\n beta = asin(// from sinus theorem.\n abs(lastBubble[0] - newOrigin[0]) /\n distance), \n // providing helping variables, related to angle between\n // lastBubble and newOrigin\n gamma = (lastBubble[1] - newOrigin[1]) < 0 ? 0 : Math.PI, \n // if new origin y is smaller than last bubble y value\n // (2 and 3 quarter),\n // add Math.PI to final angle\n delta = (lastBubble[0] - newOrigin[0]) *\n (lastBubble[1] - newOrigin[1]) < 0 ?\n 1 : -1, // (1st and 3rd quarter)\n finalAngle = gamma + alfa + beta * delta,\n cosA = Math.cos(finalAngle),\n sinA = Math.sin(finalAngle),\n posX = newOrigin[0] + (newOrigin[2] + nextBubble[2]) * sinA, \n // center of new origin + (radius1 + radius2) * sinus A\n posY = newOrigin[1] - (newOrigin[2] + nextBubble[2]) * cosA;\n return [\n posX,\n posY,\n nextBubble[2],\n nextBubble[3],\n nextBubble[4]\n ]; // the same as described before\n };\n PackedBubbleSeries.prototype.render = function () {\n var dataLabels = [];\n seriesProto.render.apply(this, arguments);\n // #10823 - dataLabels should stay visible\n // when enabled allowOverlap.\n if (!this.options.dataLabels.allowOverlap) {\n this.data.forEach(function (point) {\n if (isArray(point.dataLabels)) {\n point.dataLabels.forEach(function (dataLabel) {\n dataLabels.push(dataLabel);\n });\n }\n });\n // Only hide overlapping dataLabels for layouts that\n // use simulation. Spiral packedbubble don't need\n // additional dataLabel hiding on every simulation step\n if (this.options.useSimulation) {\n this.chart.hideOverlappingLabels(dataLabels);\n }\n }\n };\n /**\n * The function responsible for resizing the bubble radius.\n * In shortcut: it is taking the initially\n * calculated positions of bubbles. Then it is calculating the min max\n * of both dimensions, creating something in shape of bBox.\n * The comparison of bBox and the size of plotArea\n * (later it may be also the size set by customer) is giving the\n * value how to recalculate the radius so it will match the size\n * @private\n */\n PackedBubbleSeries.prototype.resizeRadius = function () {\n var chart = this.chart,\n positions = chart.rawPositions,\n min = Math.min,\n max = Math.max,\n plotLeft = chart.plotLeft,\n plotTop = chart.plotTop,\n chartHeight = chart.plotHeight,\n chartWidth = chart.plotWidth;\n var minX,\n maxX,\n minY,\n maxY,\n radius;\n minX = minY = Number.POSITIVE_INFINITY; // set initial values\n maxX = maxY = Number.NEGATIVE_INFINITY;\n for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {\n var position = positions_1[_i];\n radius = position[2];\n minX = min(minX, position[0] - radius);\n // (x center-radius) is the min x value used by specific bubble\n maxX = max(maxX, position[0] + radius);\n minY = min(minY, position[1] - radius);\n maxY = max(maxY, position[1] + radius);\n }\n var bBox = [maxX - minX,\n maxY - minY],\n spaceRatio = [\n (chartWidth - plotLeft) / bBox[0],\n (chartHeight - plotTop) / bBox[1]\n ],\n smallerDimension = min.apply([],\n spaceRatio);\n if (Math.abs(smallerDimension - 1) > 1e-10) {\n // if bBox is considered not the same width as possible size\n for (var _a = 0, positions_2 = positions; _a < positions_2.length; _a++) {\n var position = positions_2[_a];\n position[2] *= smallerDimension;\n }\n this.placeBubbles(positions);\n }\n else {\n /** if no radius recalculation is needed, we need to position\n * the whole bubbles in center of chart plotarea\n * for this, we are adding two parameters,\n * diffY and diffX, that are related to differences\n * between the initial center and the bounding box\n */\n chart.diffY = chartHeight / 2 +\n plotTop - minY - (maxY - minY) / 2;\n chart.diffX = chartWidth / 2 +\n plotLeft - minX - (maxX - minX) / 2;\n }\n };\n /**\n * The function responsible for calculating series bubble' s bBox.\n * Needed because of exporting failure when useSimulation\n * is set to false\n * @private\n */\n PackedBubbleSeries.prototype.seriesBox = function () {\n var chart = this.chart,\n data = this.data,\n max = Math.max,\n min = Math.min, \n // bBox = [xMin, xMax, yMin, yMax]\n bBox = [\n chart.plotLeft,\n chart.plotLeft + chart.plotWidth,\n chart.plotTop,\n chart.plotTop + chart.plotHeight\n ];\n var radius;\n data.forEach(function (p) {\n if (defined(p.plotX) &&\n defined(p.plotY) &&\n p.marker.radius) {\n radius = p.marker.radius;\n bBox[0] = min(bBox[0], p.plotX - radius);\n bBox[1] = max(bBox[1], p.plotX + radius);\n bBox[2] = min(bBox[2], p.plotY - radius);\n bBox[3] = max(bBox[3], p.plotY + radius);\n }\n });\n return isNumber(bBox.width / bBox.height) ?\n bBox :\n null;\n };\n /**\n * Needed because of z-indexing issue if point is added in series.group\n * @private\n */\n PackedBubbleSeries.prototype.setVisible = function () {\n var series = this;\n seriesProto.setVisible.apply(series, arguments);\n if (series.parentNodeLayout && series.graph) {\n if (series.visible) {\n series.graph.show();\n if (series.parentNode.dataLabel) {\n series.parentNode.dataLabel.show();\n }\n }\n else {\n series.graph.hide();\n series.parentNodeLayout\n .removeElementFromCollection(series.parentNode, series.parentNodeLayout.nodes);\n if (series.parentNode.dataLabel) {\n series.parentNode.dataLabel.hide();\n }\n }\n }\n else if (series.layout) {\n if (series.visible) {\n series.layout.addElementsToCollection(series.points, series.layout.nodes);\n }\n else {\n series.points.forEach(function (node) {\n series.layout.removeElementFromCollection(node, series.layout.nodes);\n });\n }\n }\n };\n /**\n * Extend the base translate method to handle bubble size,\n * and correct positioning them.\n * @private\n */\n PackedBubbleSeries.prototype.translate = function () {\n var chart = this.chart,\n data = this.data,\n index = this.index,\n useSimulation = this.options.useSimulation;\n var point,\n radius,\n positions;\n this.processedXData = this.xData;\n this.generatePoints();\n // merged data is an array with all of the data from all series\n if (!defined(chart.allDataPoints)) {\n chart.allDataPoints = this.accumulateAllPoints();\n // calculate radius for all added data\n this.getPointRadius();\n }\n // after getting initial radius, calculate bubble positions\n if (useSimulation) {\n positions = chart.allDataPoints;\n }\n else {\n positions = this.placeBubbles(chart.allDataPoints);\n this.options.draggable = false;\n }\n // Set the shape and arguments to be picked up in drawPoints\n for (var _i = 0, positions_3 = positions; _i < positions_3.length; _i++) {\n var position = positions_3[_i];\n if (position[3] === index) {\n // update the series points with the val from positions\n // array\n point = data[position[4]];\n radius = pick(position[2], void 0);\n if (!useSimulation) {\n point.plotX = (position[0] - chart.plotLeft +\n chart.diffX);\n point.plotY = (position[1] - chart.plotTop +\n chart.diffY);\n }\n if (isNumber(radius)) {\n point.marker = extend(point.marker, {\n radius: radius,\n width: 2 * radius,\n height: 2 * radius\n });\n point.radius = radius;\n }\n }\n }\n if (useSimulation) {\n this.deferLayout();\n }\n fireEvent(this, 'afterTranslate');\n };\n PackedBubbleSeries.defaultOptions = merge(BubbleSeries.defaultOptions, PackedBubbleSeriesDefaults);\n return PackedBubbleSeries;\n }(BubbleSeries));\n extend(PackedBubbleSeries.prototype, {\n pointClass: PackedBubblePoint,\n axisTypes: [],\n directTouch: true,\n forces: ['barycenter', 'repulsive'],\n hasDraggableNodes: true,\n isCartesian: false,\n noSharedTooltip: true,\n pointArrayMap: ['value'],\n pointValKey: 'value',\n requireSorting: false,\n trackerGroups: ['group', 'dataLabelsGroup', 'parentNodesGroup'],\n alignDataLabel: seriesProto.alignDataLabel,\n indexateNodes: noop,\n onMouseDown: DragNodesComposition.onMouseDown,\n onMouseMove: DragNodesComposition.onMouseMove,\n redrawHalo: DragNodesComposition.redrawHalo,\n searchPoint: noop // solving #12287\n });\n SeriesRegistry.registerSeriesType('packedbubble', PackedBubbleSeries);\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * Formatter callback function.\n *\n * @callback Highcharts.SeriesPackedBubbleDataLabelsFormatterCallbackFunction\n *\n * @param {Highcharts.SeriesPackedBubbleDataLabelsFormatterContextObject} this\n * Data label context to format\n *\n * @return {string}\n * Formatted data label text\n */\n /**\n * Context for the formatter function.\n *\n * @interface Highcharts.SeriesPackedBubbleDataLabelsFormatterContextObject\n * @extends Highcharts.PointLabelObject\n * @since 7.0.0\n */ /**\n * The color of the node.\n * @name Highcharts.SeriesPackedBubbleDataLabelsFormatterContextObject#color\n * @type {Highcharts.ColorString}\n * @since 7.0.0\n */ /**\n * The point (node) object. The node name, if defined, is available through\n * `this.point.name`. Arrays: `this.point.linksFrom` and `this.point.linksTo`\n * contains all nodes connected to this point.\n * @name Highcharts.SeriesPackedBubbleDataLabelsFormatterContextObject#point\n * @type {Highcharts.Point}\n * @since 7.0.0\n */ /**\n * The ID of the node.\n * @name Highcharts.SeriesPackedBubbleDataLabelsFormatterContextObject#key\n * @type {string}\n * @since 7.0.0\n */\n ''; // detach doclets above\n\n return PackedBubbleSeries;\n });\n _registerModule(_modules, 'Series/Polygon/PolygonSeries.js', [_modules['Core/Globals.js'], _modules['Core/Legend/LegendSymbol.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (H, LegendSymbol, SeriesRegistry, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var noop = H.noop;\n var Series = SeriesRegistry.series,\n _a = SeriesRegistry.seriesTypes,\n AreaSeries = _a.area,\n LineSeries = _a.line,\n ScatterSeries = _a.scatter;\n var extend = U.extend,\n merge = U.merge;\n /* *\n *\n * Class\n *\n * */\n var PolygonSeries = /** @class */ (function (_super) {\n __extends(PolygonSeries, _super);\n function PolygonSeries() {\n /* *\n *\n * Static properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n _this.data = void 0;\n _this.options = void 0;\n _this.points = void 0;\n return _this;\n }\n /* *\n *\n * Functions\n *\n * */\n PolygonSeries.prototype.getGraphPath = function () {\n var graphPath = LineSeries.prototype.getGraphPath.call(this),\n i = graphPath.length + 1;\n // Close all segments\n while (i--) {\n if ((i === graphPath.length || graphPath[i][0] === 'M') && i > 0) {\n graphPath.splice(i, 0, ['Z']);\n }\n }\n this.areaPath = graphPath;\n return graphPath;\n };\n PolygonSeries.prototype.drawGraph = function () {\n // Hack into the fill logic in area.drawGraph\n this.options.fillColor = this.color;\n AreaSeries.prototype.drawGraph.call(this);\n };\n /**\n * A polygon series can be used to draw any freeform shape in the cartesian\n * coordinate system. A fill is applied with the `color` option, and\n * stroke is applied through `lineWidth` and `lineColor` options.\n *\n * @sample {highcharts} highcharts/demo/polygon/\n * Polygon\n * @sample {highstock} highcharts/demo/polygon/\n * Polygon\n *\n * @extends plotOptions.scatter\n * @since 4.1.0\n * @excluding jitter, softThreshold, threshold, cluster, boostThreshold,\n * boostBlending\n * @product highcharts highstock\n * @requires highcharts-more\n * @optionparent plotOptions.polygon\n */\n PolygonSeries.defaultOptions = merge(ScatterSeries.defaultOptions, {\n marker: {\n enabled: false,\n states: {\n hover: {\n enabled: false\n }\n }\n },\n stickyTracking: false,\n tooltip: {\n followPointer: true,\n pointFormat: ''\n },\n trackByArea: true\n });\n return PolygonSeries;\n }(ScatterSeries));\n extend(PolygonSeries.prototype, {\n type: 'polygon',\n drawLegendSymbol: LegendSymbol.drawRectangle,\n drawTracker: Series.prototype.drawTracker,\n setStackedPoints: noop // No stacking points on polygons (#5310)\n });\n SeriesRegistry.registerSeriesType('polygon', PolygonSeries);\n /* *\n *\n * Export\n *\n * */\n /* *\n *\n * API Options\n *\n * */\n /**\n * A `polygon` series. If the [type](#series.polygon.type) option is\n * not specified, it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.polygon\n * @excluding dataParser, dataURL, stack, boostThreshold, boostBlending\n * @product highcharts highstock\n * @requires highcharts-more\n * @apioption series.polygon\n */\n /**\n * An array of data points for the series. For the `polygon` series\n * type, points can be given in the following ways:\n *\n * 1. An array of numerical values. In this case, the numerical values will be\n * interpreted as `y` options. The `x` values will be automatically\n * calculated, either starting at 0 and incremented by 1, or from\n * `pointStart` and `pointInterval` given in the series options. If the axis\n * has categories, these will be used. Example:\n * ```js\n * data: [0, 5, 3, 5]\n * ```\n *\n * 2. An array of arrays with 2 values. In this case, the values correspond to\n * `x,y`. If the first value is a string, it is applied as the name of the\n * point, and the `x` value is inferred.\n * ```js\n * data: [\n * [0, 10],\n * [1, 3],\n * [2, 1]\n * ]\n * ```\n *\n * 3. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.polygon.turboThreshold), this option is not\n * available.\n * ```js\n * data: [{\n * x: 1,\n * y: 1,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * y: 8,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * Numerical values\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @type {Array|null|*>}\n * @extends series.line.data\n * @product highcharts highstock\n * @apioption series.polygon.data\n */\n ''; // adds doclets above to transpiled file\n\n return PolygonSeries;\n });\n _registerModule(_modules, 'Core/Axis/WaterfallAxis.js', [_modules['Core/Axis/Stacking/StackItem.js'], _modules['Core/Utilities.js']], function (StackItem, U) {\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 var addEvent = U.addEvent,\n objectEach = U.objectEach;\n /**\n * @private\n */\n var WaterfallAxis;\n (function (WaterfallAxis) {\n /* *\n *\n * Interfaces\n *\n * */\n /* *\n *\n * Classes\n *\n * */\n /**\n * @private\n */\n var Composition = /** @class */ (function () {\n /* eslint-disable no-invalid-this, valid-jsdoc */\n /* *\n *\n * Constructors\n *\n * */\n /**\n * @private\n */\n function Composition(axis) {\n this.axis = axis;\n this.stacks = {\n changed: false\n };\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Calls StackItem.prototype.render function that creates and renders\n * stack total label for each waterfall stack item.\n *\n * @private\n * @function Highcharts.Axis#renderWaterfallStackTotals\n */\n Composition.prototype.renderStackTotals = function () {\n var yAxis = this.axis,\n waterfallStacks = yAxis.waterfall.stacks,\n stackTotalGroup = (yAxis.stacking && yAxis.stacking.stackTotalGroup),\n dummyStackItem = new StackItem(yAxis,\n yAxis.options.stackLabels || {},\n false, 0,\n void 0);\n this.dummyStackItem = dummyStackItem;\n // Render each waterfall stack total\n if (stackTotalGroup) {\n objectEach(waterfallStacks, function (type) {\n objectEach(type, function (stackItem, key) {\n dummyStackItem.total = stackItem.stackTotal;\n dummyStackItem.x = +key;\n if (stackItem.label) {\n dummyStackItem.label = stackItem.label;\n }\n StackItem.prototype.render.call(dummyStackItem, stackTotalGroup);\n stackItem.label = dummyStackItem.label;\n delete dummyStackItem.label;\n });\n });\n }\n dummyStackItem.total = null;\n };\n return Composition;\n }());\n WaterfallAxis.Composition = Composition;\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable no-invalid-this, valid-jsdoc */\n /**\n * @private\n */\n function compose(AxisClass, ChartClass) {\n addEvent(AxisClass, 'init', onInit);\n addEvent(AxisClass, 'afterBuildStacks', onAfterBuildStacks);\n addEvent(AxisClass, 'afterRender', onAfterRender);\n addEvent(ChartClass, 'beforeRedraw', onBeforeRedraw);\n }\n WaterfallAxis.compose = compose;\n /**\n * @private\n */\n function onAfterBuildStacks() {\n var axis = this;\n var stacks = axis.waterfall.stacks;\n if (stacks) {\n stacks.changed = false;\n delete stacks.alreadyChanged;\n }\n }\n /**\n * @private\n */\n function onAfterRender() {\n var axis = this;\n var stackLabelOptions = axis.options.stackLabels;\n if (stackLabelOptions && stackLabelOptions.enabled &&\n axis.waterfall.stacks) {\n axis.waterfall.renderStackTotals();\n }\n }\n /**\n * @private\n */\n function onBeforeRedraw() {\n var axes = this.axes,\n series = this.series,\n i = series.length;\n while (i--) {\n if (series[i].options.stacking) {\n axes.forEach(function (axis) {\n if (!axis.isXAxis) {\n axis.waterfall.stacks.changed = true;\n }\n });\n i = 0;\n }\n }\n }\n /**\n * @private\n */\n function onInit() {\n var axis = this;\n if (!axis.waterfall) {\n axis.waterfall = new Composition(axis);\n }\n }\n })(WaterfallAxis || (WaterfallAxis = {}));\n /* *\n *\n * Default Export\n *\n * */\n\n return WaterfallAxis;\n });\n _registerModule(_modules, 'Series/Waterfall/WaterfallPoint.js', [_modules['Series/Column/ColumnSeries.js'], _modules['Core/Series/Point.js'], _modules['Core/Utilities.js']], function (ColumnSeries, Point, U) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var isNumber = U.isNumber;\n /* *\n *\n * Class\n *\n * */\n var WaterfallPoint = /** @class */ (function (_super) {\n __extends(WaterfallPoint, _super);\n function WaterfallPoint() {\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n _this.options = void 0;\n _this.series = void 0;\n return _this;\n }\n /* *\n *\n * Functions\n *\n * */\n WaterfallPoint.prototype.getClassName = function () {\n var className = Point.prototype.getClassName.call(this);\n if (this.isSum) {\n className += ' highcharts-sum';\n }\n else if (this.isIntermediateSum) {\n className += ' highcharts-intermediate-sum';\n }\n return className;\n };\n // Pass the null test in ColumnSeries.translate.\n WaterfallPoint.prototype.isValid = function () {\n return (isNumber(this.y) ||\n this.isSum ||\n Boolean(this.isIntermediateSum));\n };\n return WaterfallPoint;\n }(ColumnSeries.prototype.pointClass));\n /* *\n *\n * Export\n *\n * */\n\n return WaterfallPoint;\n });\n _registerModule(_modules, 'Series/Waterfall/WaterfallSeries.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js'], _modules['Core/Axis/WaterfallAxis.js'], _modules['Series/Waterfall/WaterfallPoint.js']], function (Axis, Chart, SeriesRegistry, U, WaterfallAxis, WaterfallPoint) {\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 var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d,\n b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d,\n b) { d.__proto__ = b; }) ||\n function (d,\n b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n var _a = SeriesRegistry.seriesTypes,\n ColumnSeries = _a.column,\n LineSeries = _a.line;\n var arrayMax = U.arrayMax,\n arrayMin = U.arrayMin,\n correctFloat = U.correctFloat,\n extend = U.extend,\n isNumber = U.isNumber,\n merge = U.merge,\n objectEach = U.objectEach,\n pick = U.pick;\n /**\n * Returns true if the key is a direct property of the object.\n * @private\n * @param {*} obj\n * Object with property to test\n * @param {string} key\n * Property key to test\n * @return {boolean}\n * Whether it is a direct property\n */\n function ownProp(obj, key) {\n return Object.hasOwnProperty.call(obj, key);\n }\n /* eslint-disable no-invalid-this, valid-jsdoc */\n // eslint-disable-next-line valid-jsdoc\n /**\n * Waterfall series type.\n *\n * @private\n */\n var WaterfallSeries = /** @class */ (function (_super) {\n __extends(WaterfallSeries, _super);\n function WaterfallSeries() {\n /* *\n *\n * Static properties\n *\n * */\n var _this = _super !== null && _super.apply(this,\n arguments) || this;\n /* *\n *\n * Properties\n *\n * */\n _this.chart = void 0;\n _this.data = void 0;\n _this.options = void 0;\n _this.points = void 0;\n _this.stackedYNeg = void 0;\n _this.stackedYPos = void 0;\n _this.stackKey = void 0;\n _this.xData = void 0;\n _this.yAxis = void 0;\n _this.yData = void 0;\n return _this;\n }\n /* *\n *\n * Functions\n *\n * */\n // After generating points, set y-values for all sums.\n WaterfallSeries.prototype.generatePoints = function () {\n // Parent call:\n ColumnSeries.prototype.generatePoints.apply(this);\n for (var i = 0, len = this.points.length; i < len; i++) {\n var point = this.points[i],\n y = this.processedYData[i];\n // Override point value for sums. #3710 Update point does not\n // propagate to sum\n if (isNumber(y) && (point.isIntermediateSum || point.isSum)) {\n point.y = correctFloat(y);\n }\n }\n };\n // Translate data points from raw values\n WaterfallSeries.prototype.translate = function () {\n var series = this,\n options = series.options,\n yAxis = series.yAxis,\n minPointLength = pick(options.minPointLength, 5),\n halfMinPointLength = minPointLength / 2,\n threshold = options.threshold || 0,\n stacking = options.stacking,\n actualStack = yAxis.waterfall.stacks[series.stackKey];\n var previousIntermediate = threshold,\n previousY = threshold,\n y,\n total,\n yPos,\n hPos;\n // run column series translate\n ColumnSeries.prototype.translate.apply(series);\n var points = series.points;\n for (var i = 0; i < points.length; i++) {\n var point = points[i],\n yValue = series.processedYData[i],\n shapeArgs = point.shapeArgs;\n if (!shapeArgs || !isNumber(yValue)) {\n continue;\n }\n var range = [0,\n yValue],\n pointY = point.y;\n // code responsible for correct positions of stacked points\n // starts here\n if (stacking) {\n if (actualStack) {\n var actualStackX = actualStack[i];\n if (stacking === 'overlap') {\n total =\n actualStackX.stackState[actualStackX.stateIndex--];\n y = pointY >= 0 ? total : total - pointY;\n if (ownProp(actualStackX, 'absolutePos')) {\n delete actualStackX.absolutePos;\n }\n if (ownProp(actualStackX, 'absoluteNeg')) {\n delete actualStackX.absoluteNeg;\n }\n }\n else {\n if (pointY >= 0) {\n total = actualStackX.threshold +\n actualStackX.posTotal;\n actualStackX.posTotal -= pointY;\n y = total;\n }\n else {\n total = actualStackX.threshold +\n actualStackX.negTotal;\n actualStackX.negTotal -= pointY;\n y = total - pointY;\n }\n if (!actualStackX.posTotal) {\n if (isNumber(actualStackX.absolutePos) &&\n ownProp(actualStackX, 'absolutePos')) {\n actualStackX.posTotal =\n actualStackX.absolutePos;\n delete actualStackX.absolutePos;\n }\n }\n if (!actualStackX.negTotal) {\n if (isNumber(actualStackX.absoluteNeg) &&\n ownProp(actualStackX, 'absoluteNeg')) {\n actualStackX.negTotal =\n actualStackX.absoluteNeg;\n delete actualStackX.absoluteNeg;\n }\n }\n }\n if (!point.isSum) {\n // the connectorThreshold property is later used in\n // getCrispPath function to draw a connector line in a\n // correct place\n actualStackX.connectorThreshold =\n actualStackX.threshold + actualStackX.stackTotal;\n }\n if (yAxis.reversed) {\n yPos = (pointY >= 0) ? (y - pointY) : (y + pointY);\n hPos = y;\n }\n else {\n yPos = y;\n hPos = y - pointY;\n }\n point.below = yPos <= threshold;\n shapeArgs.y = yAxis.translate(yPos, false, true, false, true);\n shapeArgs.height = Math.abs(shapeArgs.y -\n yAxis.translate(hPos, false, true, false, true));\n var dummyStackItem = yAxis.waterfall.dummyStackItem;\n if (dummyStackItem) {\n dummyStackItem.x = i;\n dummyStackItem.label = actualStack[i].label;\n dummyStackItem.setOffset(series.pointXOffset || 0, series.barW || 0, series.stackedYNeg[i], series.stackedYPos[i], void 0, this.xAxis);\n }\n }\n }\n else {\n // up points\n y = Math.max(previousY, previousY + pointY) + range[0];\n shapeArgs.y = yAxis.translate(y, false, true, false, true);\n // sum points\n if (point.isSum) {\n shapeArgs.y = yAxis.translate(range[1], false, true, false, true);\n shapeArgs.height = Math.min(yAxis.translate(range[0], false, true, false, true), yAxis.len) - shapeArgs.y; // #4256\n point.below = range[1] <= threshold;\n }\n else if (point.isIntermediateSum) {\n if (pointY >= 0) {\n yPos = range[1] + previousIntermediate;\n hPos = previousIntermediate;\n }\n else {\n yPos = previousIntermediate;\n hPos = range[1] + previousIntermediate;\n }\n if (yAxis.reversed) {\n // swapping values\n yPos ^= hPos;\n hPos ^= yPos;\n yPos ^= hPos;\n }\n shapeArgs.y = yAxis.translate(yPos, false, true, false, true);\n shapeArgs.height = Math.abs(shapeArgs.y -\n Math.min(yAxis.translate(hPos, false, true, false, true), yAxis.len));\n previousIntermediate += range[1];\n point.below = yPos <= threshold;\n // If it's not the sum point, update previous stack end position\n // and get shape height (#3886)\n }\n else {\n shapeArgs.height = yValue > 0 ?\n yAxis.translate(previousY, false, true, false, true) - shapeArgs.y :\n yAxis.translate(previousY, false, true, false, true) - yAxis.translate(previousY - yValue, false, true, false, true);\n previousY += yValue;\n point.below = previousY < threshold;\n }\n // #3952 Negative sum or intermediate sum not rendered correctly\n if (shapeArgs.height < 0) {\n shapeArgs.y += shapeArgs.height;\n shapeArgs.height *= -1;\n }\n }\n point.plotY = shapeArgs.y =\n Math.round(shapeArgs.y || 0) - (series.borderWidth % 2) / 2;\n // #3151\n shapeArgs.height =\n Math.max(Math.round(shapeArgs.height || 0), 0.001);\n point.yBottom = shapeArgs.y + shapeArgs.height;\n if (shapeArgs.height <= minPointLength && !point.isNull) {\n shapeArgs.height = minPointLength;\n shapeArgs.y -= halfMinPointLength;\n point.plotY = shapeArgs.y;\n if (point.y < 0) {\n point.minPointLengthOffset = -halfMinPointLength;\n }\n else {\n point.minPointLengthOffset = halfMinPointLength;\n }\n }\n else {\n if (point.isNull) {\n shapeArgs.width = 0;\n }\n point.minPointLengthOffset = 0;\n }\n // Correct tooltip placement (#3014)\n var tooltipY = point.plotY + (point.negative ? shapeArgs.height : 0);\n if (point.below) { // #15334\n point.plotY += shapeArgs.height;\n }\n if (point.tooltipPos) {\n if (series.chart.inverted) {\n point.tooltipPos[0] = yAxis.len - tooltipY;\n }\n else {\n point.tooltipPos[1] = tooltipY;\n }\n }\n // Check point position after recalculation (#16788)\n point.isInside = this.isPointInside(point);\n }\n };\n // Call default processData then override yData to reflect waterfall's\n // extremes on yAxis\n WaterfallSeries.prototype.processData = function (force) {\n var series = this,\n options = series.options,\n yData = series.yData, \n // #3710 Update point does not propagate to sum\n points = options.data,\n point,\n dataLength = yData.length,\n threshold = options.threshold || 0,\n subSum,\n sum,\n dataMin,\n dataMax,\n y,\n i;\n sum = subSum = dataMin = dataMax = 0;\n for (i = 0; i < dataLength; i++) {\n y = yData[i];\n point = points && points[i] ? points[i] : {};\n if (y === 'sum' || point.isSum) {\n yData[i] = correctFloat(sum);\n }\n else if (y === 'intermediateSum' ||\n point.isIntermediateSum) {\n yData[i] = correctFloat(subSum);\n subSum = 0;\n }\n else {\n sum += y;\n subSum += y;\n }\n dataMin = Math.min(sum, dataMin);\n dataMax = Math.max(sum, dataMax);\n }\n _super.prototype.processData.call(this, force);\n // Record extremes only if stacking was not set:\n if (!options.stacking) {\n series.dataMin = dataMin + threshold;\n series.dataMax = dataMax;\n }\n return;\n };\n // Return y value or string if point is sum\n WaterfallSeries.prototype.toYData = function (pt) {\n if (pt.isSum) {\n return 'sum';\n }\n if (pt.isIntermediateSum) {\n return 'intermediateSum';\n }\n return pt.y;\n };\n WaterfallSeries.prototype.updateParallelArrays = function (point, i) {\n _super.prototype.updateParallelArrays.call(this, point, i);\n // Prevent initial sums from triggering an error (#3245, #7559)\n if (this.yData[0] === 'sum' || this.yData[0] === 'intermediateSum') {\n this.yData[0] = null;\n }\n };\n // Postprocess mapping between options and SVG attributes\n WaterfallSeries.prototype.pointAttribs = function (point, state) {\n var upColor = this.options.upColor;\n // Set or reset up color (#3710, update to negative)\n if (upColor && !point.options.color) {\n point.color = point.y > 0 ? upColor : void 0;\n }\n var attr = ColumnSeries.prototype.pointAttribs.call(this,\n point,\n state);\n // The dashStyle option in waterfall applies to the graph, not\n // the points\n delete attr.dashstyle;\n return attr;\n };\n // Return an empty path initially, because we need to know the stroke-width\n // in order to set the final path.\n WaterfallSeries.prototype.getGraphPath = function () {\n return [['M', 0, 0]];\n };\n // Draw columns' connector lines\n WaterfallSeries.prototype.getCrispPath = function () {\n var data = this.data,\n yAxis = this.yAxis,\n length = data.length,\n graphNormalizer = Math.round(this.graph.strokeWidth()) % 2 / 2,\n borderNormalizer = Math.round(this.borderWidth) % 2 / 2,\n reversedXAxis = this.xAxis.reversed,\n reversedYAxis = this.yAxis.reversed,\n stacking = this.options.stacking,\n path = [],\n connectorThreshold,\n prevStack,\n prevStackX,\n prevPoint,\n yPos,\n isPos,\n prevArgs,\n pointArgs,\n i;\n for (i = 1; i < length; i++) {\n pointArgs = data[i].shapeArgs;\n prevPoint = data[i - 1];\n prevArgs = data[i - 1].shapeArgs;\n prevStack = yAxis.waterfall.stacks[this.stackKey];\n isPos = prevPoint.y > 0 ? -prevArgs.height : 0;\n if (prevStack && prevArgs && pointArgs) {\n prevStackX = prevStack[i - 1];\n // y position of the connector is different when series are\n // stacked, yAxis is reversed and it also depends on point's\n // value\n if (stacking) {\n connectorThreshold = prevStackX.connectorThreshold;\n yPos = Math.round((yAxis.translate(connectorThreshold, false, true, false, true) +\n (reversedYAxis ? isPos : 0))) - graphNormalizer;\n }\n else {\n yPos =\n prevArgs.y + prevPoint.minPointLengthOffset +\n borderNormalizer - graphNormalizer;\n }\n path.push([\n 'M',\n (prevArgs.x || 0) + (reversedXAxis ?\n 0 :\n (prevArgs.width || 0)),\n yPos\n ], [\n 'L',\n (pointArgs.x || 0) + (reversedXAxis ?\n (pointArgs.width || 0) :\n 0),\n yPos\n ]);\n }\n if (prevArgs &&\n path.length &&\n ((!stacking && prevPoint.y < 0 && !reversedYAxis) ||\n (prevPoint.y > 0 && reversedYAxis))) {\n var nextLast = path[path.length - 2];\n if (nextLast && typeof nextLast[2] === 'number') {\n nextLast[2] += prevArgs.height || 0;\n }\n var last = path[path.length - 1];\n if (last && typeof last[2] === 'number') {\n last[2] += prevArgs.height || 0;\n }\n }\n }\n return path;\n };\n // The graph is initially drawn with an empty definition, then updated with\n // crisp rendering.\n WaterfallSeries.prototype.drawGraph = function () {\n LineSeries.prototype.drawGraph.call(this);\n if (this.graph) {\n this.graph.attr({\n d: this.getCrispPath()\n });\n }\n };\n // Waterfall has stacking along the x-values too.\n WaterfallSeries.prototype.setStackedPoints = function () {\n var series = this,\n options = series.options,\n waterfallStacks = series.yAxis.waterfall.stacks,\n seriesThreshold = options.threshold || 0,\n stackThreshold = seriesThreshold,\n interSum = stackThreshold,\n stackKey = series.stackKey,\n xData = series.xData,\n xLength = xData.length,\n actualStackX,\n totalYVal,\n actualSum,\n prevSum,\n statesLen,\n posTotal,\n negTotal,\n xPoint,\n yVal,\n x,\n alreadyChanged,\n changed;\n // Function responsible for calculating correct values for stackState\n // array of each stack item. The arguments are: firstS - the value for\n // the first state, nextS - the difference between the previous and the\n // newest state, sInx - counter used in the for that updates each state\n // when necessary, sOff - offset that must be added to each state when\n // they need to be updated (if point isn't a total sum)\n // eslint-disable-next-line require-jsdoc\n function calculateStackState(firstS, nextS, sInx, sOff) {\n if (actualStackX) {\n if (!statesLen) {\n actualStackX.stackState[0] = firstS;\n statesLen = actualStackX.stackState.length;\n }\n else {\n for (sInx; sInx < statesLen; sInx++) {\n actualStackX.stackState[sInx] += sOff;\n }\n }\n actualStackX.stackState.push(actualStackX.stackState[statesLen - 1] + nextS);\n }\n }\n series.yAxis.stacking.usePercentage = false;\n totalYVal = actualSum = prevSum = stackThreshold;\n // code responsible for creating stacks for waterfall series\n if (series.visible ||\n !series.chart.options.chart.ignoreHiddenSeries) {\n changed = waterfallStacks.changed;\n alreadyChanged = waterfallStacks.alreadyChanged;\n // In case of a redraw, stack for each x value must be emptied (only\n // for the first series in a specific stack) and recalculated once\n // more\n if (alreadyChanged &&\n alreadyChanged.indexOf(stackKey) < 0) {\n changed = true;\n }\n if (!waterfallStacks[stackKey]) {\n waterfallStacks[stackKey] = {};\n }\n var actualStack = waterfallStacks[stackKey];\n if (actualStack) {\n for (var i = 0; i < xLength; i++) {\n x = xData[i];\n if (!actualStack[x] || changed) {\n actualStack[x] = {\n negTotal: 0,\n posTotal: 0,\n stackTotal: 0,\n threshold: 0,\n stateIndex: 0,\n stackState: [],\n label: ((changed &&\n actualStack[x]) ?\n actualStack[x].label :\n void 0)\n };\n }\n actualStackX = actualStack[x];\n yVal = series.yData[i];\n if (yVal >= 0) {\n actualStackX.posTotal += yVal;\n }\n else {\n actualStackX.negTotal += yVal;\n }\n // points do not exist yet, so raw data is used\n xPoint = options.data[i];\n posTotal = actualStackX.absolutePos = actualStackX.posTotal;\n negTotal = actualStackX.absoluteNeg = actualStackX.negTotal;\n actualStackX.stackTotal = posTotal + negTotal;\n statesLen = actualStackX.stackState.length;\n if (xPoint && xPoint.isIntermediateSum) {\n calculateStackState(prevSum, actualSum, 0, prevSum);\n prevSum = actualSum;\n actualSum = seriesThreshold;\n // swapping values\n stackThreshold ^= interSum;\n interSum ^= stackThreshold;\n stackThreshold ^= interSum;\n }\n else if (xPoint && xPoint.isSum) {\n calculateStackState(seriesThreshold, totalYVal, statesLen, 0);\n stackThreshold = seriesThreshold;\n }\n else {\n calculateStackState(stackThreshold, yVal, 0, totalYVal);\n if (xPoint) {\n totalYVal += yVal;\n actualSum += yVal;\n }\n }\n actualStackX.stateIndex++;\n actualStackX.threshold = stackThreshold;\n stackThreshold += actualStackX.stackTotal;\n }\n }\n waterfallStacks.changed = false;\n if (!waterfallStacks.alreadyChanged) {\n waterfallStacks.alreadyChanged = [];\n }\n waterfallStacks.alreadyChanged.push(stackKey);\n }\n };\n // Extremes for a non-stacked series are recorded in processData.\n // In case of stacking, use Series.stackedYData to calculate extremes.\n WaterfallSeries.prototype.getExtremes = function () {\n var stacking = this.options.stacking,\n yAxis,\n waterfallStacks,\n stackedYNeg,\n stackedYPos;\n if (stacking) {\n yAxis = this.yAxis;\n waterfallStacks = yAxis.waterfall.stacks;\n stackedYNeg = this.stackedYNeg = [];\n stackedYPos = this.stackedYPos = [];\n // the visible y range can be different when stacking is set to\n // overlap and different when it's set to normal\n if (stacking === 'overlap') {\n objectEach(waterfallStacks[this.stackKey], function (stackX) {\n stackedYNeg.push(arrayMin(stackX.stackState));\n stackedYPos.push(arrayMax(stackX.stackState));\n });\n }\n else {\n objectEach(waterfallStacks[this.stackKey], function (stackX) {\n stackedYNeg.push(stackX.negTotal + stackX.threshold);\n stackedYPos.push(stackX.posTotal + stackX.threshold);\n });\n }\n return {\n dataMin: arrayMin(stackedYNeg),\n dataMax: arrayMax(stackedYPos)\n };\n }\n // When not stacking, data extremes have already been computed in the\n // processData function.\n return {\n dataMin: this.dataMin,\n dataMax: this.dataMax\n };\n };\n /**\n * A waterfall chart displays sequentially introduced positive or negative\n * values in cumulative columns.\n *\n * @sample highcharts/demo/waterfall/\n * Waterfall chart\n * @sample highcharts/plotoptions/waterfall-inverted/\n * Horizontal (inverted) waterfall\n * @sample highcharts/plotoptions/waterfall-stacked/\n * Stacked waterfall chart\n *\n * @extends plotOptions.column\n * @excluding boostThreshold, boostBlending\n * @product highcharts\n * @requires highcharts-more\n * @optionparent plotOptions.waterfall\n */\n WaterfallSeries.defaultOptions = merge(ColumnSeries.defaultOptions, {\n /**\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @apioption plotOptions.waterfall.color\n */\n /**\n * The color used specifically for positive point columns. When not\n * specified, the general series color is used.\n *\n * In styled mode, the waterfall colors can be set with the\n * `.highcharts-point-negative`, `.highcharts-sum` and\n * `.highcharts-intermediate-sum` classes.\n *\n * @sample {highcharts} highcharts/demo/waterfall/\n * Waterfall\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @product highcharts\n * @apioption plotOptions.waterfall.upColor\n */\n dataLabels: {\n inside: true\n },\n /**\n * The width of the line connecting waterfall columns.\n *\n * @product highcharts\n */\n lineWidth: 1,\n /**\n * The color of the line that connects columns in a waterfall series.\n *\n * In styled mode, the stroke can be set with the `.highcharts-graph`\n * class.\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 3.0\n * @product highcharts\n */\n lineColor: \"#333333\" /* Palette.neutralColor80 */,\n /**\n * A name for the dash style to use for the line connecting the columns\n * of the waterfall series. Possible values: Dash, DashDot, Dot,\n * LongDash, LongDashDot, LongDashDotDot, ShortDash, ShortDashDot,\n * ShortDashDotDot, ShortDot, Solid\n *\n * In styled mode, the stroke dash-array can be set with the\n * `.highcharts-graph` class.\n *\n * @type {Highcharts.DashStyleValue}\n * @since 3.0\n * @product highcharts\n */\n dashStyle: 'Dot',\n /**\n * The color of the border of each waterfall column.\n *\n * In styled mode, the border stroke can be set with the\n * `.highcharts-point` class.\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 3.0\n * @product highcharts\n */\n borderColor: \"#333333\" /* Palette.neutralColor80 */,\n states: {\n hover: {\n lineWidthPlus: 0 // #3126\n }\n }\n });\n return WaterfallSeries;\n }(ColumnSeries));\n extend(WaterfallSeries.prototype, {\n getZonesGraphs: LineSeries.prototype.getZonesGraphs,\n pointValKey: 'y',\n // Property needed to prevent lines between the columns from disappearing\n // when negativeColor is used.\n showLine: true,\n pointClass: WaterfallPoint\n });\n SeriesRegistry.registerSeriesType('waterfall', WaterfallSeries);\n WaterfallAxis.compose(Axis, Chart);\n /* *\n *\n * Export\n *\n * */\n /**\n *\n * API Options\n *\n */\n /**\n * A `waterfall` series. If the [type](#series.waterfall.type) option\n * is not specified, it is inherited from [chart.type](#chart.type).\n *\n * @extends series,plotOptions.waterfall\n * @excluding dataParser, dataURL, boostThreshold, boostBlending\n * @product highcharts\n * @requires highcharts-more\n * @apioption series.waterfall\n */\n /**\n * An array of data points for the series. For the `waterfall` series\n * type, points can be given in the following ways:\n *\n * 1. An array of numerical values. In this case, the numerical values will be\n * interpreted as `y` options. The `x` values will be automatically\n * calculated, either starting at 0 and incremented by 1, or from\n * `pointStart` and `pointInterval` given in the series options. If the axis\n * has categories, these will be used. Example:\n * ```js\n * data: [0, 5, 3, 5]\n * ```\n *\n * 2. An array of arrays with 2 values. In this case, the values correspond to\n * `x,y`. If the first value is a string, it is applied as the name of the\n * point, and the `x` value is inferred.\n * ```js\n * data: [\n * [0, 7],\n * [1, 8],\n * [2, 3]\n * ]\n * ```\n *\n * 3. An array of objects with named values. The following snippet shows only a\n * few settings, see the complete options set below. If the total number of\n * data points exceeds the series'\n * [turboThreshold](#series.waterfall.turboThreshold), this option is not\n * available.\n * ```js\n * data: [{\n * x: 1,\n * y: 8,\n * name: \"Point2\",\n * color: \"#00FF00\"\n * }, {\n * x: 1,\n * y: 8,\n * name: \"Point1\",\n * color: \"#FF00FF\"\n * }]\n * ```\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * Numerical values\n * @sample {highcharts} highcharts/series/data-array-of-arrays/\n * Arrays of numeric x and y\n * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/\n * Arrays of datetime x and y\n * @sample {highcharts} highcharts/series/data-array-of-name-value/\n * Arrays of point.name and y\n * @sample {highcharts} highcharts/series/data-array-of-objects/\n * Config objects\n *\n * @type {Array|null|*>}\n * @extends series.line.data\n * @excluding marker\n * @product highcharts\n * @apioption series.waterfall.data\n */\n /**\n * When this property is true, the points acts as a summary column for\n * the values added or substracted since the last intermediate sum,\n * or since the start of the series. The `y` value is ignored.\n *\n * @sample {highcharts} highcharts/demo/waterfall/\n * Waterfall\n *\n * @type {boolean}\n * @default false\n * @product highcharts\n * @apioption series.waterfall.data.isIntermediateSum\n */\n /**\n * When this property is true, the point display the total sum across\n * the entire series. The `y` value is ignored.\n *\n * @sample {highcharts} highcharts/demo/waterfall/\n * Waterfall\n *\n * @type {boolean}\n * @default false\n * @product highcharts\n * @apioption series.waterfall.data.isSum\n */\n ''; // adds doclets above to transpiled file\n\n return WaterfallSeries;\n });\n _registerModule(_modules, 'Core/Axis/RadialAxis.js', [_modules['Core/Axis/AxisDefaults.js'], _modules['Core/Defaults.js'], _modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (AxisDefaults, D, H, U) {\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 var defaultOptions = D.defaultOptions;\n var noop = H.noop;\n var addEvent = U.addEvent,\n correctFloat = U.correctFloat,\n defined = U.defined,\n extend = U.extend,\n fireEvent = U.fireEvent,\n merge = U.merge,\n pick = U.pick,\n relativeLength = U.relativeLength,\n wrap = U.wrap;\n /* *\n *\n * Composition\n *\n * */\n var RadialAxis;\n (function (RadialAxis) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n /**\n * Circular axis around the perimeter of a polar chart.\n * @private\n */\n var defaultCircularOptions = {\n gridLineWidth: 1,\n labels: {\n align: void 0,\n distance: 15,\n x: 0,\n y: void 0,\n style: {\n textOverflow: 'none' // wrap lines by default (#7248)\n }\n },\n maxPadding: 0,\n minPadding: 0,\n showLastLabel: false,\n tickLength: 0\n };\n /**\n * The default options extend defaultYAxisOptions.\n * @private\n */\n var defaultRadialGaugeOptions = {\n labels: {\n align: 'center',\n x: 0,\n y: void 0 // auto\n },\n minorGridLineWidth: 0,\n minorTickInterval: 'auto',\n minorTickLength: 10,\n minorTickPosition: 'inside',\n minorTickWidth: 1,\n tickLength: 10,\n tickPosition: 'inside',\n tickWidth: 2,\n title: {\n rotation: 0\n },\n zIndex: 2 // behind dials, points in the series group\n };\n /**\n * Radial axis, like a spoke in a polar chart.\n * @private\n */\n var defaultRadialOptions = {\n /**\n * In a polar chart, this is the angle of the Y axis in degrees, where\n * 0 is up and 90 is right. The angle determines the position of the\n * axis line and the labels, though the coordinate system is unaffected.\n * Since v8.0.0 this option is also applicable for X axis (inverted\n * polar).\n *\n * @sample {highcharts} highcharts/xaxis/angle/\n * Custom X axis' angle on inverted polar chart\n * @sample {highcharts} highcharts/yaxis/angle/\n * Dual axis polar chart\n *\n * @type {number}\n * @default 0\n * @since 4.2.7\n * @product highcharts\n * @apioption xAxis.angle\n */\n /**\n * Polar charts only. Whether the grid lines should draw as a polygon\n * with straight lines between categories, or as circles. Can be either\n * `circle` or `polygon`. Since v8.0.0 this option is also applicable\n * for X axis (inverted polar).\n *\n * @sample {highcharts} highcharts/demo/polar-spider/\n * Polygon grid lines\n * @sample {highcharts} highcharts/xaxis/gridlineinterpolation/\n * Circle and polygon on inverted polar\n * @sample {highcharts} highcharts/yaxis/gridlineinterpolation/\n * Circle and polygon\n *\n * @type {string}\n * @product highcharts\n * @validvalue [\"circle\", \"polygon\"]\n * @apioption xAxis.gridLineInterpolation\n */\n gridLineInterpolation: 'circle',\n gridLineWidth: 1,\n labels: {\n align: 'right',\n x: -3,\n y: -2\n },\n showLastLabel: false,\n title: {\n x: 4,\n text: null,\n rotation: 90\n }\n };\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * In case of auto connect, add one closestPointRange to the max value\n * right before tickPositions are computed, so that ticks will extend\n * passed the real max.\n * @private\n */\n function beforeSetTickPositions() {\n // If autoConnect is true, polygonal grid lines are connected, and\n // one closestPointRange is added to the X axis to prevent the last\n // point from overlapping the first.\n this.autoConnect = (this.isCircular &&\n typeof pick(this.userMax, this.options.max) === 'undefined' &&\n correctFloat(this.endAngleRad - this.startAngleRad) ===\n correctFloat(2 * Math.PI));\n // This will lead to add an extra tick to xAxis in order to display\n // a correct range on inverted polar\n if (!this.isCircular && this.chart.inverted) {\n this.max++;\n }\n if (this.autoConnect) {\n this.max += ((this.categories && 1) ||\n this.pointRange ||\n this.closestPointRange ||\n 0); // #1197, #2260\n }\n }\n /**\n * Augments methods for the value axis.\n *\n * @private\n *\n * @param {Highcharts.Axis} AxisClass\n * Axis class to extend.\n *\n * @param {Highcharts.Tick} TickClass\n * Tick class to use.\n *\n * @return {Highcharts.Axis}\n * Axis composition.\n */\n function compose(AxisClass, TickClass) {\n if (composedClasses.indexOf(AxisClass) === -1) {\n composedClasses.push(AxisClass);\n addEvent(AxisClass, 'afterInit', onAxisAfterInit);\n addEvent(AxisClass, 'autoLabelAlign', onAxisAutoLabelAlign);\n addEvent(AxisClass, 'destroy', onAxisDestroy);\n addEvent(AxisClass, 'init', onAxisInit);\n addEvent(AxisClass, 'initialAxisTranslation', onAxisInitialAxisTranslation);\n }\n if (composedClasses.indexOf(TickClass) === -1) {\n composedClasses.push(TickClass);\n addEvent(TickClass, 'afterGetLabelPosition', onTickAfterGetLabelPosition);\n addEvent(TickClass, 'afterGetPosition', onTickAfterGetPosition);\n wrap(TickClass.prototype, 'getMarkPath', wrapTickGetMarkPath);\n }\n return AxisClass;\n }\n RadialAxis.compose = compose;\n /**\n * Attach and return collecting function for labels in radial axis for\n * anti-collision.\n *\n * @private\n */\n function createLabelCollector() {\n var _this = this;\n return function () {\n if (_this.isRadial &&\n _this.tickPositions &&\n // undocumented option for now, but working\n _this.options.labels &&\n _this.options.labels.allowOverlap !== true) {\n return _this.tickPositions\n .map(function (pos) {\n return _this.ticks[pos] && _this.ticks[pos].label;\n })\n .filter(function (label) {\n return Boolean(label);\n });\n }\n };\n }\n /**\n * Creates an empty collector function.\n * @private\n */\n function createLabelCollectorHidden() {\n return noop;\n }\n /**\n * Find the correct end values of crosshair in polar.\n * @private\n */\n function getCrosshairPosition(options, x1, y1) {\n var center = this.pane.center;\n var value = options.value,\n shapeArgs,\n end,\n x2,\n y2;\n if (this.isCircular) {\n if (!defined(value)) {\n // When the snap is set to false\n x2 = options.chartX || 0;\n y2 = options.chartY || 0;\n value = this.translate(Math.atan2(y2 - y1, x2 - x1) - this.startAngleRad, true);\n }\n else if (options.point) {\n // When the snap is set to true\n shapeArgs = options.point.shapeArgs || {};\n if (shapeArgs.start) {\n // Find a true value of the point based on the\n // angle\n value = this.chart.inverted ?\n this.translate(options.point.rectPlotY, true) :\n options.point.x;\n }\n }\n end = this.getPosition(value);\n x2 = end.x;\n y2 = end.y;\n }\n else {\n if (!defined(value)) {\n x2 = options.chartX;\n y2 = options.chartY;\n }\n if (defined(x2) && defined(y2)) {\n // Calculate radius of non-circular axis' crosshair\n y1 = center[1] + this.chart.plotTop;\n value = this.translate(Math.min(Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)), center[2] / 2) - center[3] / 2, true);\n }\n }\n return [value, x2 || 0, y2 || 0];\n }\n /**\n * Get the path for the axis line. This method is also referenced in the\n * getPlotLinePath method.\n *\n * @private\n * @param {number} _lineWidth\n * Line width is not used.\n * @param {number} [radius]\n * Radius of radial path.\n * @param {number} [innerRadius]\n * Inner radius of radial path.\n */\n function getLinePath(_lineWidth, radius, innerRadius) {\n var center = this.pane.center,\n chart = this.chart,\n left = this.left || 0,\n top = this.top || 0;\n var end,\n r = pick(radius,\n center[2] / 2 - this.offset),\n path;\n if (typeof innerRadius === 'undefined') {\n innerRadius = this.horiz ? 0 : this.center && -this.center[3] / 2;\n }\n // In case when innerSize of pane is set, it must be included\n if (innerRadius) {\n r += innerRadius;\n }\n if (this.isCircular || typeof radius !== 'undefined') {\n path = this.chart.renderer.symbols.arc(left + center[0], top + center[1], r, r, {\n start: this.startAngleRad,\n end: this.endAngleRad,\n open: true,\n innerR: 0\n });\n // Bounds used to position the plotLine label next to the line\n // (#7117)\n path.xBounds = [left + center[0]];\n path.yBounds = [top + center[1] - r];\n }\n else {\n end = this.postTranslate(this.angleRad, r);\n path = [\n [\n 'M',\n this.center[0] + chart.plotLeft,\n this.center[1] + chart.plotTop\n ],\n ['L', end.x, end.y]\n ];\n }\n return path;\n }\n /**\n * Wrap the getOffset method to return zero offset for title or labels\n * in a radial axis.\n */\n function getOffset() {\n var axisProto = this.constructor.prototype;\n // Call the Axis prototype method (the method we're in now is on the\n // instance)\n axisProto.getOffset.call(this);\n // Title or label offsets are not counted\n this.chart.axisOffset[this.side] = 0;\n }\n /**\n * Find the path for plot bands along the radial axis.\n *\n * @private\n */\n function getPlotBandPath(from, to, options) {\n var chart = this.chart,\n radiusToPixels = function (radius) {\n if (typeof radius === 'string') {\n var r = parseInt(radius, 10);\n if (percentRegex.test(radius)) {\n r = (r * fullRadius) / 100;\n }\n return r;\n }\n return radius;\n }, center = this.center, startAngleRad = this.startAngleRad, fullRadius = center[2] / 2, offset = Math.min(this.offset, 0), left = this.left || 0, top = this.top || 0, percentRegex = /%$/, isCircular = this.isCircular; // X axis in a polar chart\n var start,\n end,\n angle,\n xOnPerimeter,\n open,\n path,\n outerRadius = pick(radiusToPixels(options.outerRadius),\n fullRadius),\n innerRadius = radiusToPixels(options.innerRadius),\n thickness = pick(radiusToPixels(options.thickness), 10);\n // Polygonal plot bands\n if (this.options.gridLineInterpolation === 'polygon') {\n path = this.getPlotLinePath({ value: from }).concat(this.getPlotLinePath({ value: to, reverse: true }));\n // Circular grid bands\n }\n else {\n // Keep within bounds\n from = Math.max(from, this.min);\n to = Math.min(to, this.max);\n var transFrom = this.translate(from),\n transTo = this.translate(to);\n // Plot bands on Y axis (radial axis) - inner and outer\n // radius depend on to and from\n if (!isCircular) {\n outerRadius = transFrom || 0;\n innerRadius = transTo || 0;\n }\n // Handle full circle\n if (options.shape === 'circle' || !isCircular) {\n start = -Math.PI / 2;\n end = Math.PI * 1.5;\n open = true;\n }\n else {\n start = startAngleRad + (transFrom || 0);\n end = startAngleRad + (transTo || 0);\n }\n outerRadius -= offset; // #5283\n thickness -= offset; // #5283\n path = chart.renderer.symbols.arc(left + center[0], top + center[1], outerRadius, outerRadius, {\n // Math is for reversed yAxis (#3606)\n start: Math.min(start, end),\n end: Math.max(start, end),\n innerR: pick(innerRadius, outerRadius - thickness),\n open: open\n });\n // Provide positioning boxes for the label (#6406)\n if (isCircular) {\n angle = (end + start) / 2;\n xOnPerimeter = (left +\n center[0] +\n (center[2] / 2) * Math.cos(angle));\n path.xBounds = angle > -Math.PI / 2 && angle < Math.PI / 2 ?\n // Right hemisphere\n [xOnPerimeter, chart.plotWidth] :\n // Left hemisphere\n [0, xOnPerimeter];\n path.yBounds = [\n top + center[1] + (center[2] / 2) * Math.sin(angle)\n ];\n // Shift up or down to get the label clear of the perimeter\n path.yBounds[0] += ((angle > -Math.PI && angle < 0) ||\n (angle > Math.PI)) ? -10 : 10;\n }\n }\n return path;\n }\n /**\n * Find the path for plot lines perpendicular to the radial axis.\n */\n function getPlotLinePath(options) {\n var _this = this;\n var center = this.pane.center, chart = this.chart, inverted = chart.inverted, reverse = options.reverse, background = this.pane.options.background ?\n (this.pane.options.background[0] ||\n this.pane.options.background) :\n {}, innerRadius = background.innerRadius || '0%', outerRadius = background.outerRadius || '100%', x1 = center[0] + chart.plotLeft, y1 = center[1] + chart.plotTop, height = this.height, isCrosshair = options.isCrosshair, paneInnerR = center[3] / 2;\n var value = options.value,\n innerRatio,\n distance,\n a,\n b,\n otherAxis,\n xy,\n tickPositions,\n crossPos,\n path;\n var end = this.getPosition(value);\n var x2 = end.x,\n y2 = end.y;\n // Crosshair logic\n if (isCrosshair) {\n // Find crosshair's position and perform destructuring\n // assignment\n crossPos = this.getCrosshairPosition(options, x1, y1);\n value = crossPos[0];\n x2 = crossPos[1];\n y2 = crossPos[2];\n }\n // Spokes\n if (this.isCircular) {\n distance = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n a = (typeof innerRadius === 'string') ?\n relativeLength(innerRadius, 1) :\n (innerRadius / distance);\n b = (typeof outerRadius === 'string') ?\n relativeLength(outerRadius, 1) :\n (outerRadius / distance);\n // To ensure that gridlines won't be displayed in area\n // defined by innerSize in case of custom radiuses of pane's\n // background\n if (center && paneInnerR) {\n innerRatio = paneInnerR / distance;\n if (a < innerRatio) {\n a = innerRatio;\n }\n if (b < innerRatio) {\n b = innerRatio;\n }\n }\n path = [\n ['M', x1 + a * (x2 - x1), y1 - a * (y1 - y2)],\n ['L', x2 - (1 - b) * (x2 - x1), y2 + (1 - b) * (y1 - y2)]\n ];\n // Concentric circles\n }\n else {\n // Pick the right values depending if it is grid line or\n // crosshair\n value = this.translate(value);\n // This is required in case when xAxis is non-circular to\n // prevent grid lines (or crosshairs, if enabled) from\n // rendering above the center after they supposed to be\n // displayed below the center point\n if (value) {\n if (value < 0 || value > height) {\n value = 0;\n }\n }\n if (this.options.gridLineInterpolation === 'circle') {\n // A value of 0 is in the center, so it won't be\n // visible, but draw it anyway for update and animation\n // (#2366)\n path = this.getLinePath(0, value, paneInnerR);\n // Concentric polygons\n }\n else {\n path = [];\n // Find the other axis (a circular one) in the same pane\n chart[inverted ? 'yAxis' : 'xAxis'].forEach(function (a) {\n if (a.pane === _this.pane) {\n otherAxis = a;\n }\n });\n if (otherAxis) {\n tickPositions = otherAxis.tickPositions;\n if (otherAxis.autoConnect) {\n tickPositions =\n tickPositions.concat([tickPositions[0]]);\n }\n // Reverse the positions for concatenation of polygonal\n // plot bands\n if (reverse) {\n tickPositions = tickPositions.slice().reverse();\n }\n if (value) {\n value += paneInnerR;\n }\n for (var i = 0; i < tickPositions.length; i++) {\n xy = otherAxis.getPosition(tickPositions[i], value);\n path.push(i ? ['L', xy.x, xy.y] : ['M', xy.x, xy.y]);\n }\n }\n }\n }\n return path;\n }\n /**\n * Returns the x, y coordinate of a point given by a value and a pixel\n * distance from center.\n *\n * @private\n * @param {number} value\n * Point value.\n * @param {number} [length]\n * Distance from center.\n */\n function getPosition(value, length) {\n var translatedVal = this.translate(value);\n return this.postTranslate(this.isCircular ? translatedVal : this.angleRad, // #2848\n // In case when translatedVal is negative, the 0 value must be\n // used instead, in order to deal with lines and labels that\n // fall out of the visible range near the center of a pane\n pick(this.isCircular ?\n length :\n (translatedVal < 0 ? 0 : translatedVal), this.center[2] / 2) - this.offset);\n }\n /**\n * Find the position for the axis title, by default inside the gauge.\n */\n function getTitlePosition() {\n var center = this.center,\n chart = this.chart,\n titleOptions = this.options.title;\n return {\n x: chart.plotLeft + center[0] + (titleOptions.x || 0),\n y: (chart.plotTop +\n center[1] -\n ({\n high: 0.5,\n middle: 0.25,\n low: 0\n }[titleOptions.align] *\n center[2]) +\n (titleOptions.y || 0))\n };\n }\n /**\n * Modify radial axis.\n * @private\n *\n * @param {Highcharts.Axis} radialAxis\n * Radial axis to modify.\n */\n function modify(axis) {\n axis.beforeSetTickPositions = beforeSetTickPositions;\n axis.createLabelCollector = createLabelCollector;\n axis.getCrosshairPosition = getCrosshairPosition;\n axis.getLinePath = getLinePath;\n axis.getOffset = getOffset;\n axis.getPlotBandPath = getPlotBandPath;\n axis.getPlotLinePath = getPlotLinePath;\n axis.getPosition = getPosition;\n axis.getTitlePosition = getTitlePosition;\n axis.postTranslate = postTranslate;\n axis.setAxisSize = setAxisSize;\n axis.setAxisTranslation = setAxisTranslation;\n axis.setOptions = setOptions;\n }\n /**\n * Modify radial axis as hidden.\n * @private\n *\n * @param {Highcharts.Axis} radialAxis\n * Radial axis to modify.\n */\n function modifyAsHidden(radialAxis) {\n radialAxis.isHidden = true;\n radialAxis.createLabelCollector = createLabelCollectorHidden;\n radialAxis.getOffset = noop;\n radialAxis.redraw = renderHidden;\n radialAxis.render = renderHidden;\n radialAxis.setScale = noop;\n radialAxis.setCategories = noop;\n radialAxis.setTitle = noop;\n }\n /**\n * Finalize modification of axis instance with radial logic.\n */\n function onAxisAfterInit() {\n var chart = this.chart,\n options = this.options,\n isHidden = chart.angular && this.isXAxis,\n pane = this.pane,\n paneOptions = pane && pane.options;\n if (!isHidden && pane && (chart.angular || chart.polar)) {\n var fullCircle = Math.PI * 2, \n // Start and end angle options are given in degrees relative to\n // top, while internal computations are in radians relative to\n // right (like SVG).\n start = (pick(paneOptions.startAngle, 0) - 90) * Math.PI / 180,\n end = (pick(paneOptions.endAngle,\n pick(paneOptions.startAngle, 0) + 360) - 90) * Math.PI / 180;\n // Y axis in polar charts\n this.angleRad = (options.angle || 0) * Math.PI / 180;\n // Gauges\n this.startAngleRad = start;\n this.endAngleRad = end;\n this.offset = options.offset || 0;\n // Normalize Start and End to <0, 2*PI> range\n // (in degrees: <0,360>)\n var normalizedStart = (start % fullCircle + fullCircle) %\n fullCircle,\n normalizedEnd = (end % fullCircle + fullCircle) % fullCircle;\n // Move normalized angles to <-PI, PI> range (<-180, 180>)\n // to match values returned by Math.atan2()\n if (normalizedStart > Math.PI) {\n normalizedStart -= fullCircle;\n }\n if (normalizedEnd > Math.PI) {\n normalizedEnd -= fullCircle;\n }\n this.normalizedStartAngleRad = normalizedStart;\n this.normalizedEndAngleRad = normalizedEnd;\n }\n }\n /**\n * Wrap auto label align to avoid setting axis-wide rotation on radial axes.\n * (#4920)\n */\n function onAxisAutoLabelAlign(e) {\n if (this.isRadial) {\n e.align = void 0;\n e.preventDefault();\n }\n }\n /**\n * Remove label collector function on axis remove/update.\n */\n function onAxisDestroy() {\n if (this.chart &&\n this.chart.labelCollectors) {\n var index = (this.labelCollector ?\n this.chart.labelCollectors.indexOf(this.labelCollector) :\n -1);\n if (index >= 0) {\n this.chart.labelCollectors.splice(index, 1);\n }\n }\n }\n /**\n * Modify axis instance with radial logic before common axis init.\n */\n function onAxisInit(e) {\n var chart = this.chart,\n inverted = chart.inverted,\n angular = chart.angular,\n polar = chart.polar,\n isX = this.isXAxis,\n coll = this.coll,\n isHidden = angular && isX,\n chartOptions = chart.options,\n paneIndex = e.userOptions.pane || 0,\n pane = this.pane = chart.pane && chart.pane[paneIndex];\n var isCircular;\n // Prevent changes for colorAxis\n if (coll === 'colorAxis') {\n this.isRadial = false;\n return;\n }\n // Before prototype.init\n if (angular) {\n if (isHidden) {\n modifyAsHidden(this);\n }\n else {\n modify(this);\n }\n isCircular = !isX;\n if (isCircular) {\n this.defaultPolarOptions = defaultRadialGaugeOptions;\n }\n }\n else if (polar) {\n modify(this);\n // Check which axis is circular\n isCircular = this.horiz;\n this.defaultPolarOptions = isCircular ?\n defaultCircularOptions :\n merge(coll === 'xAxis' ?\n AxisDefaults.defaultXAxisOptions :\n AxisDefaults.defaultYAxisOptions, defaultRadialOptions);\n // Apply the stack labels for yAxis in case of inverted chart\n if (inverted && coll === 'yAxis') {\n this.defaultPolarOptions.stackLabels = AxisDefaults\n .defaultYAxisOptions.stackLabels;\n this.defaultPolarOptions.reversedStacks = true;\n }\n }\n // Disable certain features on angular and polar axes\n if (angular || polar) {\n this.isRadial = true;\n if (!this.labelCollector) {\n this.labelCollector = this.createLabelCollector();\n }\n if (this.labelCollector) {\n // Prevent overlapping axis labels (#9761)\n chart.labelCollectors.push(this.labelCollector);\n }\n }\n else {\n this.isRadial = false;\n }\n // A pointer back to this axis to borrow geometry\n if (pane && isCircular) {\n pane.axis = this;\n }\n this.isCircular = isCircular;\n }\n /**\n * Prepare axis translation.\n */\n function onAxisInitialAxisTranslation() {\n if (this.isRadial) {\n this.beforeSetTickPositions();\n }\n }\n /**\n * Find the center position of the label based on the distance option.\n */\n function onTickAfterGetLabelPosition(e) {\n var label = this.label;\n if (!label) {\n return;\n }\n var axis = this.axis,\n labelBBox = label.getBBox(),\n labelOptions = axis.options.labels,\n angle = ((axis.translate(this.pos) + axis.startAngleRad +\n Math.PI / 2) / Math.PI * 180) % 360,\n correctAngle = Math.round(angle),\n labelYPosCorrection = !defined(labelOptions.y) ? -labelBBox.height * 0.3 : 0;\n var optionsY = labelOptions.y, ret, centerSlot = 20, // 20 degrees to each side at the top and bottom\n align = labelOptions.align, labelDir = 'end', // Direction of the label 'start' or 'end'\n reducedAngle1 = correctAngle < 0 ?\n correctAngle + 360 : correctAngle, reducedAngle2 = reducedAngle1, translateY = 0, translateX = 0;\n if (axis.isRadial) { // Both X and Y axes in a polar chart\n ret = axis.getPosition(this.pos, (axis.center[2] / 2) +\n relativeLength(pick(labelOptions.distance, -25), axis.center[2] / 2, -axis.center[2] / 2));\n // Automatically rotated\n if (labelOptions.rotation === 'auto') {\n label.attr({\n rotation: angle\n });\n // Vertically centered\n }\n else if (!defined(optionsY)) {\n optionsY = (axis.chart.renderer\n .fontMetrics(label.styles && label.styles.fontSize).b -\n labelBBox.height / 2);\n }\n // Automatic alignment\n if (!defined(align)) {\n if (axis.isCircular) { // Y axis\n if (labelBBox.width >\n axis.len * axis.tickInterval / (axis.max - axis.min)) { // #3506\n centerSlot = 0;\n }\n if (angle > centerSlot && angle < 180 - centerSlot) {\n align = 'left'; // right hemisphere\n }\n else if (angle > 180 + centerSlot &&\n angle < 360 - centerSlot) {\n align = 'right'; // left hemisphere\n }\n else {\n align = 'center'; // top or bottom\n }\n }\n else {\n align = 'center';\n }\n label.attr({\n align: align\n });\n }\n // Auto alignment for solid-gauges with two labels (#10635)\n if (align === 'auto' &&\n axis.tickPositions.length === 2 &&\n axis.isCircular) {\n // Angles reduced to 0 - 90 or 180 - 270\n if (reducedAngle1 > 90 && reducedAngle1 < 180) {\n reducedAngle1 = 180 - reducedAngle1;\n }\n else if (reducedAngle1 > 270 && reducedAngle1 <= 360) {\n reducedAngle1 = 540 - reducedAngle1;\n }\n // Angles reduced to 0 - 180\n if (reducedAngle2 > 180 && reducedAngle2 <= 360) {\n reducedAngle2 = 360 - reducedAngle2;\n }\n if ((axis.pane.options.startAngle === correctAngle) ||\n (axis.pane.options.startAngle === correctAngle + 360) ||\n (axis.pane.options.startAngle === correctAngle - 360)) {\n labelDir = 'start';\n }\n if ((correctAngle >= -90 && correctAngle <= 90) ||\n (correctAngle >= -360 && correctAngle <= -270) ||\n (correctAngle >= 270 && correctAngle <= 360)) {\n align = (labelDir === 'start') ? 'right' : 'left';\n }\n else {\n align = (labelDir === 'start') ? 'left' : 'right';\n }\n // For angles beetwen (90 + n * 180) +- 20\n if (reducedAngle2 > 70 && reducedAngle2 < 110) {\n align = 'center';\n }\n // auto Y translation\n if (reducedAngle1 < 15 ||\n (reducedAngle1 >= 180 && reducedAngle1 < 195)) {\n translateY = labelBBox.height * 0.3;\n }\n else if (reducedAngle1 >= 15 && reducedAngle1 <= 35) {\n translateY = labelDir === 'start' ?\n 0 : labelBBox.height * 0.75;\n }\n else if (reducedAngle1 >= 195 && reducedAngle1 <= 215) {\n translateY = labelDir === 'start' ?\n labelBBox.height * 0.75 : 0;\n }\n else if (reducedAngle1 > 35 && reducedAngle1 <= 90) {\n translateY = labelDir === 'start' ?\n -labelBBox.height * 0.25 : labelBBox.height;\n }\n else if (reducedAngle1 > 215 && reducedAngle1 <= 270) {\n translateY = labelDir === 'start' ?\n labelBBox.height : -labelBBox.height * 0.25;\n }\n // auto X translation\n if (reducedAngle2 < 15) {\n translateX = labelDir === 'start' ?\n -labelBBox.height * 0.15 : labelBBox.height * 0.15;\n }\n else if (reducedAngle2 > 165 && reducedAngle2 <= 180) {\n translateX = labelDir === 'start' ?\n labelBBox.height * 0.15 : -labelBBox.height * 0.15;\n }\n label.attr({ align: align });\n label.translate(translateX, translateY + labelYPosCorrection);\n }\n e.pos.x = ret.x + (labelOptions.x || 0);\n e.pos.y = ret.y + (optionsY || 0);\n }\n }\n /**\n * Add special cases within the Tick class' methods for radial axes.\n */\n function onTickAfterGetPosition(e) {\n if (this.axis.getPosition) {\n extend(e.pos, this.axis.getPosition(this.pos));\n }\n }\n /**\n * Translate from intermediate plotX (angle), plotY (axis.len - radius)\n * to final chart coordinates.\n *\n * @private\n * @param {number} angle\n * Translation angle.\n * @param {number} radius\n * Translation radius.\n */\n function postTranslate(angle, radius) {\n var chart = this.chart,\n center = this.center;\n angle = this.startAngleRad + angle;\n return {\n x: chart.plotLeft + center[0] + Math.cos(angle) * radius,\n y: chart.plotTop + center[1] + Math.sin(angle) * radius\n };\n }\n /**\n * Prevent setting Y axis dirty.\n */\n function renderHidden() {\n this.isDirty = false;\n }\n /**\n * Override the setAxisSize method to use the arc's circumference as\n * length. This allows tickPixelInterval to apply to pixel lengths along\n * the perimeter.\n * @private\n */\n function setAxisSize() {\n var axisProto = this.constructor.prototype;\n var center,\n start;\n axisProto.setAxisSize.call(this);\n if (this.isRadial) {\n // Set the center array\n this.pane.updateCenter(this);\n // In case when the innerSize is set in a polar chart, the axis'\n // center cannot be a reference to pane's center\n center = this.center = this.pane.center.slice();\n // The sector is used in Axis.translate to compute the\n // translation of reversed axis points (#2570)\n if (this.isCircular) {\n this.sector = this.endAngleRad - this.startAngleRad;\n }\n else {\n // When the pane's startAngle or the axis' angle is set then\n // new x and y values for vertical axis' center must be\n // calulated\n start = this.postTranslate(this.angleRad, center[3] / 2);\n center[0] = start.x - this.chart.plotLeft;\n center[1] = start.y - this.chart.plotTop;\n }\n // Axis len is used to lay out the ticks\n this.len = this.width = this.height =\n (center[2] - center[3]) * pick(this.sector, 1) / 2;\n }\n }\n /**\n * Override setAxisTranslation by setting the translation to the\n * difference in rotation. This allows the translate method to return\n * angle for any given value.\n *\n * @private\n */\n function setAxisTranslation() {\n var axisProto = this.constructor.prototype;\n // Call uber method\n axisProto.setAxisTranslation.call(this);\n // Set transA and minPixelPadding\n if (this.center) { // it's not defined the first time\n if (this.isCircular) {\n this.transA = (this.endAngleRad - this.startAngleRad) /\n ((this.max - this.min) || 1);\n }\n else {\n // The transA here is the length of the axis, so in case\n // of inner radius, the length must be decreased by it\n this.transA = ((this.center[2] - this.center[3]) / 2) /\n ((this.max - this.min) || 1);\n }\n if (this.isXAxis) {\n this.minPixelPadding = this.transA * this.minPointOffset;\n }\n else {\n // This is a workaround for regression #2593, but categories\n // still don't position correctly.\n this.minPixelPadding = 0;\n }\n }\n }\n /**\n * Merge and set options.\n */\n function setOptions(userOptions) {\n var options = this.options = merge(this.constructor.defaultOptions,\n this.defaultPolarOptions,\n defaultOptions[this.coll], // #16112\n userOptions);\n // Make sure the plotBands array is instanciated for each Axis\n // (#2649)\n if (!options.plotBands) {\n options.plotBands = [];\n }\n fireEvent(this, 'afterSetOptions');\n }\n /**\n * Wrap the getMarkPath function to return the path of the radial marker.\n */\n function wrapTickGetMarkPath(proceed, x, y, tickLength, tickWidth, horiz, renderer) {\n var axis = this.axis;\n var endPoint,\n ret;\n if (axis.isRadial) {\n endPoint = axis.getPosition(this.pos, axis.center[2] / 2 + tickLength);\n ret = [\n 'M',\n x,\n y,\n 'L',\n endPoint.x,\n endPoint.y\n ];\n }\n else {\n ret = proceed.call(this, x, y, tickLength, tickWidth, horiz, renderer);\n }\n return ret;\n }\n /* eslint-enable valid-jsdoc */\n })(RadialAxis || (RadialAxis = {}));\n /* *\n *\n * Default Export\n *\n * */\n\n return RadialAxis;\n });\n _registerModule(_modules, 'Series/PolarComposition.js', [_modules['Core/Animation/AnimationUtilities.js'], _modules['Core/Globals.js'], _modules['Extensions/Pane.js'], _modules['Core/Axis/RadialAxis.js'], _modules['Core/Utilities.js']], function (A, H, Pane, RadialAxis, U) {\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 var __spreadArray = (this && this.__spreadArray) || function (to,\n from,\n pack) {\n if (pack || arguments.length === 2) for (var i = 0,\n l = from.length,\n ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0,\n i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n };\n var animObject = A.animObject;\n var addEvent = U.addEvent,\n defined = U.defined,\n find = U.find,\n isNumber = U.isNumber,\n pick = U.pick,\n splat = U.splat,\n uniqueKey = U.uniqueKey,\n wrap = U.wrap;\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n /* *\n *\n * Functions\n *\n * */\n /**\n * @private\n */\n function clipCircle(renderer, x, y, r, innerR) {\n var id = uniqueKey(),\n clipPath = renderer.createElement('clipPath').attr({\n id: id\n }).add(renderer.defs),\n wrapper = innerR ?\n renderer.arc(x,\n y,\n r,\n innerR, 0, 2 * Math.PI).add(clipPath) :\n renderer.circle(x,\n y,\n r).add(clipPath);\n wrapper.id = id;\n wrapper.clipPath = clipPath;\n return wrapper;\n }\n /**\n * Find correct align and vertical align based on an angle in polar chart\n * @private\n */\n function findAlignments(angle, options) {\n var align,\n verticalAlign;\n if (options.align === null) {\n if (angle > 20 && angle < 160) {\n align = 'left'; // right hemisphere\n }\n else if (angle > 200 && angle < 340) {\n align = 'right'; // left hemisphere\n }\n else {\n align = 'center'; // top or bottom\n }\n options.align = align;\n }\n if (options.verticalAlign === null) {\n if (angle < 45 || angle > 315) {\n verticalAlign = 'bottom'; // top part\n }\n else if (angle > 135 && angle < 225) {\n verticalAlign = 'top'; // bottom part\n }\n else {\n verticalAlign = 'middle'; // left or right\n }\n options.verticalAlign = verticalAlign;\n }\n return options;\n }\n /**\n * #6212 Calculate connectors for spline series in polar chart.\n * @private\n * @param {boolean} calculateNeighbours\n * Check if connectors should be calculated for neighbour points as\n * well allows short recurence\n */\n function getConnectors(segment, index, calculateNeighbours, connectEnds) {\n var smoothing = 1.5,\n denom = smoothing + 1,\n addedNumber = connectEnds ? 1 : 0;\n var i,\n leftContX,\n leftContY,\n rightContX,\n rightContY,\n jointAngle;\n // Calculate final index of points depending on the initial index value.\n // Because of calculating neighbours, index may be outisde segment\n // array.\n if (index >= 0 && index <= segment.length - 1) {\n i = index;\n }\n else if (index < 0) {\n i = segment.length - 1 + index;\n }\n else {\n i = 0;\n }\n // 1 means control points midway between points, 2 means 1/3 from\n // the point, 3 is 1/4 etc;\n var prevPointInd = ((i - 1 < 0) ? segment.length - (1 + addedNumber) : i - 1),\n nextPointInd = (i + 1 > segment.length - 1) ? addedNumber : i + 1,\n previousPoint = segment[prevPointInd],\n nextPoint = segment[nextPointInd],\n previousX = previousPoint.plotX,\n previousY = previousPoint.plotY,\n nextX = nextPoint.plotX,\n nextY = nextPoint.plotY,\n plotX = segment[i].plotX, // actual point\n plotY = segment[i].plotY;\n leftContX = (smoothing * plotX + previousX) / denom;\n leftContY = (smoothing * plotY + previousY) / denom;\n rightContX = (smoothing * plotX + nextX) / denom;\n rightContY = (smoothing * plotY + nextY) / denom;\n // distance left control point\n var dLControlPoint = Math.sqrt(Math.pow(leftContX - plotX, 2) + Math.pow(leftContY - plotY, 2)),\n dRControlPoint = Math.sqrt(Math.pow(rightContX - plotX, 2) + Math.pow(rightContY - plotY, 2)),\n leftContAngle = Math.atan2(leftContY - plotY,\n leftContX - plotX),\n rightContAngle = Math.atan2(rightContY - plotY,\n rightContX - plotX);\n jointAngle = (Math.PI / 2) + ((leftContAngle + rightContAngle) / 2);\n // Ensure the right direction, jointAngle should be in the same quadrant\n // as leftContAngle\n if (Math.abs(leftContAngle - jointAngle) > Math.PI / 2) {\n jointAngle -= Math.PI;\n }\n // Find the corrected control points for a spline straight through the\n // point\n leftContX = plotX + Math.cos(jointAngle) * dLControlPoint;\n leftContY = plotY + Math.sin(jointAngle) * dLControlPoint;\n rightContX = plotX + Math.cos(Math.PI + jointAngle) * dRControlPoint;\n rightContY = plotY + Math.sin(Math.PI + jointAngle) * dRControlPoint;\n // push current point's connectors into returned object\n var ret = {\n rightContX: rightContX,\n rightContY: rightContY,\n leftContX: leftContX,\n leftContY: leftContY,\n plotX: plotX,\n plotY: plotY\n };\n // calculate connectors for previous and next point and push them inside\n // returned object\n if (calculateNeighbours) {\n ret.prevPointCont = getConnectors(segment, prevPointInd, false, connectEnds);\n }\n return ret;\n }\n function onChartAfterDrawChartBox() {\n (this.pane || []).forEach(function (pane) {\n pane.render();\n });\n }\n /**\n * If polar has polygonal grid lines, force start and endOnTick on radial axis\n * @private\n */\n function onChartAfterInit(event) {\n var xAxis = event.args[0].xAxis,\n yAxis = event.args[0].yAxis,\n chart = event.args[0].chart;\n if (xAxis && yAxis) {\n if (yAxis.gridLineInterpolation === 'polygon') {\n xAxis.startOnTick = true;\n xAxis.endOnTick = true;\n }\n else if (xAxis.gridLineInterpolation === 'polygon' &&\n chart.inverted) {\n yAxis.startOnTick = true;\n yAxis.endOnTick = true;\n }\n }\n }\n function onChartGetAxes() {\n var _this = this;\n if (!this.pane) {\n this.pane = [];\n }\n this.options.pane = splat(this.options.pane);\n this.options.pane.forEach(function (paneOptions) {\n new Pane(// eslint-disable-line no-new\n paneOptions, _this);\n }, this);\n }\n /**\n * Get selection dimensions\n * @private\n */\n function onPointerGetSelectionBox(event) {\n var marker = event.args.marker,\n xAxis = this.chart.xAxis[0],\n yAxis = this.chart.yAxis[0],\n inverted = this.chart.inverted,\n radialAxis = inverted ? yAxis : xAxis,\n linearAxis = inverted ? xAxis : yAxis;\n if (this.chart.polar) {\n event.preventDefault();\n var start = (marker.attr ? marker.attr('start') : marker.start) - radialAxis.startAngleRad;\n var r = (marker.attr ? marker.attr('r') : marker.r);\n var end = (marker.attr ? marker.attr('end') : marker.end) - radialAxis.startAngleRad;\n var innerR = (marker.attr ? marker.attr('innerR') : marker.innerR);\n event.result.x = start + radialAxis.pos;\n event.result.width = end - start;\n // innerR goes from pane's center but toValue computes values from top\n event.result.y = linearAxis.len + linearAxis.pos - innerR;\n event.result.height = innerR - r;\n }\n }\n /**\n * Get attrs for Polar selection marker\n * @private\n */\n function onPointerGetSelectionMarkerAttrs(event) {\n var chart = this.chart;\n if (chart.polar && chart.hoverPane && chart.hoverPane.axis) {\n event.preventDefault();\n var center = chart.hoverPane.center,\n mouseDownX = (this.mouseDownX || 0),\n mouseDownY = (this.mouseDownY || 0),\n chartY = event.args.chartY,\n chartX = event.args.chartX,\n fullCircle = Math.PI * 2,\n startAngleRad = chart.hoverPane.axis.startAngleRad,\n endAngleRad = chart.hoverPane.axis.endAngleRad,\n linearAxis = chart.inverted ? chart.xAxis[0] : chart.yAxis[0],\n attrs = {};\n var shapeType = 'arc';\n attrs.x = center[0] + chart.plotLeft;\n attrs.y = center[1] + chart.plotTop;\n // Adjust the width of the selection marker\n if (this.zoomHor) {\n var paneRadRange = startAngleRad > 0 ?\n endAngleRad - startAngleRad :\n Math.abs(startAngleRad) + Math.abs(endAngleRad);\n var startAngle = Math.atan2(mouseDownY - chart.plotTop - center[1],\n mouseDownX - chart.plotLeft - center[0]) - startAngleRad,\n endAngle = Math.atan2(chartY - chart.plotTop - center[1],\n chartX - chart.plotLeft - center[0]) - startAngleRad;\n attrs.r = center[2] / 2;\n attrs.innerR = center[3] / 2;\n if (startAngle <= 0) {\n startAngle += fullCircle;\n }\n if (endAngle <= 0) {\n endAngle += fullCircle;\n }\n if (endAngle < startAngle) {\n // Swapping angles\n endAngle = [startAngle, startAngle = endAngle][0];\n }\n // If pane is not a full circle we need to let users zoom to the min\n // We do this by swapping angles after pointer crosses\n // middle angle (swapAngle) of the missing slice of the pane\n if (paneRadRange < fullCircle) {\n var swapAngle = endAngleRad + (fullCircle - paneRadRange) / 2;\n if (startAngleRad + endAngle > swapAngle) {\n endAngle = startAngle;\n startAngle = startAngleRad <= 0 ? startAngleRad : 0;\n }\n }\n var start = attrs.start =\n Math.max(startAngle + startAngleRad,\n startAngleRad),\n end = attrs.end =\n Math.min(endAngle + startAngleRad,\n endAngleRad);\n // Adjust the selection shape for polygon grid lines\n if (linearAxis.options.gridLineInterpolation === 'polygon') {\n var radialAxis = chart.hoverPane.axis,\n tickInterval = radialAxis.tickInterval,\n min = start - radialAxis.startAngleRad + radialAxis.pos,\n max = end - start;\n var path = linearAxis.getPlotLinePath({\n value: linearAxis.max\n }),\n pathStart = radialAxis.toValue(min),\n pathEnd = radialAxis.toValue(min + max);\n if (pathStart < radialAxis.getExtremes().min) {\n var _a = radialAxis.getExtremes(),\n min_1 = _a.min,\n max_1 = _a.max;\n pathStart = max_1 - (min_1 - pathStart);\n }\n if (pathEnd < radialAxis.getExtremes().min) {\n var _b = radialAxis.getExtremes(),\n min_2 = _b.min,\n max_2 = _b.max;\n pathEnd = max_2 - (min_2 - pathEnd);\n }\n if (pathEnd < pathStart) {\n // Swapping angles\n pathEnd = [pathStart, pathStart = pathEnd][0];\n }\n // Get trimmed path\n path = trimPath(path, pathStart, pathEnd, radialAxis);\n // Add center to the path\n path.push([\n 'L', center[0] + chart.plotLeft,\n chart.plotTop + center[1]\n ]);\n attrs.d = path;\n shapeType = 'path';\n }\n }\n // Adjust the height of the selection marker\n if (this.zoomVert) {\n var linearAxis_1 = chart.inverted ? chart.xAxis[0] : chart.yAxis[0];\n var innerR = Math.sqrt(Math.pow(mouseDownX - chart.plotLeft - center[0], 2) +\n Math.pow(mouseDownY - chart.plotTop - center[1], 2)),\n r = Math.sqrt(Math.pow(chartX - chart.plotLeft - center[0], 2) +\n Math.pow(chartY - chart.plotTop - center[1], 2));\n if (r < innerR) {\n // Swapping angles\n innerR = [r, r = innerR][0];\n }\n if (r > center[2] / 2) {\n r = center[2] / 2;\n }\n if (innerR < center[3] / 2) {\n innerR = center[3] / 2;\n }\n if (!this.zoomHor) {\n attrs.start = startAngleRad;\n attrs.end = endAngleRad;\n }\n attrs.r = r;\n attrs.innerR = innerR;\n if (linearAxis_1.options.gridLineInterpolation === 'polygon') {\n var end = linearAxis_1.toValue(linearAxis_1.len + linearAxis_1.pos - innerR),\n start = linearAxis_1.toValue(linearAxis_1.len + linearAxis_1.pos - r),\n path = linearAxis_1.getPlotLinePath({\n value: start\n }).concat(linearAxis_1.getPlotLinePath({\n value: end,\n reverse: true\n }));\n attrs.d = path;\n shapeType = 'path';\n }\n }\n if (this.zoomHor &&\n this.zoomVert &&\n linearAxis.options.gridLineInterpolation === 'polygon') {\n var radialAxis = chart.hoverPane.axis,\n start = attrs.start || 0,\n end = attrs.end || 0,\n min = start - radialAxis.startAngleRad + radialAxis.pos,\n max = end - start,\n pathStart = radialAxis.toValue(min),\n pathEnd = radialAxis.toValue(min + max);\n // Trim path\n if (attrs.d instanceof Array) {\n var innerPath = attrs.d.slice(0,\n attrs.d.length / 2),\n outerPath = attrs.d.slice(attrs.d.length / 2,\n attrs.d.length);\n outerPath = __spreadArray([], outerPath, true).reverse();\n var radialAxis_1 = chart.hoverPane.axis;\n innerPath = trimPath(innerPath, pathStart, pathEnd, radialAxis_1);\n outerPath = trimPath(outerPath, pathStart, pathEnd, radialAxis_1);\n if (outerPath) {\n (outerPath[0][0]) = 'L';\n }\n outerPath = __spreadArray([], outerPath, true).reverse();\n attrs.d = innerPath.concat(outerPath);\n shapeType = 'path';\n }\n }\n event.attrs = attrs;\n event.shapeType = shapeType;\n }\n }\n /**\n * @private\n */\n function onSeriesAfterInit() {\n var chart = this.chart;\n if (chart.polar) {\n this.polar = new PolarAdditions(this);\n // Add flags that identifies radial inverted series\n if (chart.inverted) {\n this.isRadialSeries = true;\n if (this.is('column')) {\n this.isRadialBar = true;\n }\n }\n }\n }\n /**\n * Extend translate. The plotX and plotY values are computed as if the polar\n * chart were a cartesian plane, where plotX denotes the angle in radians\n * and (yAxis.len - plotY) is the pixel distance from center.\n * @private\n */\n function onSeriesAfterTranslate() {\n if (this.chart.polar && this.xAxis) {\n var series = this,\n chart_1 = series.chart;\n // Prepare k-d-tree handling. It searches by angle (clientX) in\n // case of shared tooltip, and by two dimensional distance in case\n // of non-shared.\n series.kdByAngle = chart_1.tooltip && chart_1.tooltip.shared;\n if (series.kdByAngle) {\n series.searchPoint = searchPointByAngle;\n }\n else {\n series.options.findNearestPointBy = 'xy';\n }\n var points = series.points;\n var i = points.length;\n while (i--) {\n // Translate plotX, plotY from angle and radius to true plot\n // coordinates\n if (!series.preventPostTranslate) {\n series.polar.toXY(points[i]);\n }\n // Treat points below Y axis min as null (#10082)\n if (!chart_1.hasParallelCoordinates &&\n !series.yAxis.reversed) {\n if (pick(points[i].y, Number.MIN_VALUE) < series.yAxis.min ||\n points[i].x < series.xAxis.min ||\n points[i].x > series.xAxis.max) {\n // Destroy markers\n points[i].isNull = true;\n // Destroy column's graphic\n points[i].plotY = NaN;\n }\n else {\n // Restore isNull flag\n points[i].isNull =\n points[i].isValid && !points[i].isValid();\n }\n }\n }\n // Perform clip after render\n if (!this.hasClipCircleSetter) {\n this.hasClipCircleSetter = !!series.eventsToUnbind.push(addEvent(series, 'afterRender', function () {\n var circ;\n if (chart_1.polar) {\n // For clipping purposes there is a need for\n // coordinates from the absolute center\n circ = this.yAxis.pane.center;\n if (!this.clipCircle) {\n this.clipCircle = clipCircle(chart_1.renderer, circ[0], circ[1], circ[2] / 2, circ[3] / 2);\n }\n else {\n this.clipCircle.animate({\n x: circ[0],\n y: circ[1],\n r: circ[2] / 2,\n innerR: circ[3] / 2\n });\n }\n this.group.clip(this.clipCircle);\n this.setClip = H.noop;\n }\n }));\n }\n }\n }\n /**\n * Search a k-d tree by the point angle, used for shared tooltips in polar\n * charts\n * @private\n */\n function searchPointByAngle(e) {\n var series = this,\n chart = series.chart,\n xAxis = series.xAxis,\n center = xAxis.pane && xAxis.pane.center,\n plotX = e.chartX - (center && center[0] || 0) - chart.plotLeft,\n plotY = e.chartY - (center && center[1] || 0) - chart.plotTop;\n return series.searchKDTree({\n clientX: 180 + (Math.atan2(plotX, plotY) * (-180 / Math.PI))\n });\n }\n /**\n * Trim polygonal path\n * @private\n */\n function trimPath(path, start, end, radialAxis) {\n var tickInterval = radialAxis.tickInterval,\n ticks = radialAxis.tickPositions;\n var lastTick = find(ticks,\n function (tick) { return tick >= end; }),\n firstTick = find(__spreadArray([],\n ticks,\n true).reverse(),\n function (tick) { return tick <= start; });\n if (!defined(lastTick)) {\n lastTick = ticks[ticks.length - 1];\n }\n if (!defined(firstTick)) {\n firstTick = ticks[0];\n lastTick += tickInterval;\n path[0][0] = 'L';\n // To do: figure out why -3 or -2\n path.unshift(path[path.length - 3]);\n }\n path = path.slice(ticks.indexOf(firstTick), ticks.indexOf(lastTick) + 1);\n path[0][0] = 'M';\n return path;\n }\n /**\n * Extend chart.get to also search in panes. Used internally in\n * responsiveness and chart.update.\n * @private\n */\n function wrapChartGet(proceed, id) {\n return find(this.pane || [], function (pane) {\n // @todo remove id or define id type:\n return pane.options.id === id;\n }) || proceed.call(this, id);\n }\n /**\n * Align column data labels outside the columns. #1199.\n * @private\n */\n function wrapColumnSeriesAlignDataLabel(proceed, point, dataLabel, options, alignTo, isNew) {\n var chart = this.chart,\n inside = pick(options.inside, !!this.options.stacking);\n var angle,\n shapeArgs,\n labelPos;\n if (chart.polar) {\n angle = point.rectPlotX / Math.PI * 180;\n if (!chart.inverted) {\n // Align nicely outside the perimeter of the columns\n options = findAlignments(angle, options);\n }\n else { // Required corrections for data labels of inverted bars\n // The plotX and plotY are correctly set therefore they\n // don't need to be swapped (inverted argument is false)\n this.forceDL = chart.isInsidePlot(point.plotX, point.plotY);\n // Checks if labels should be positioned inside\n if (inside && point.shapeArgs) {\n shapeArgs = point.shapeArgs;\n // Calculates pixel positions for a data label to be\n // inside\n labelPos =\n this.yAxis.postTranslate(\n // angle\n ((shapeArgs.start || 0) + (shapeArgs.end || 0)) / 2 -\n this\n .xAxis.startAngleRad, \n // radius\n point.barX +\n point.pointWidth / 2);\n alignTo = {\n x: labelPos.x - chart.plotLeft,\n y: labelPos.y - chart.plotTop\n };\n }\n else if (point.tooltipPos) {\n alignTo = {\n x: point.tooltipPos[0],\n y: point.tooltipPos[1]\n };\n }\n options.align = pick(options.align, 'center');\n options.verticalAlign =\n pick(options.verticalAlign, 'middle');\n }\n Object\n .getPrototypeOf(Object.getPrototypeOf(this))\n .alignDataLabel.call(this, point, dataLabel, options, alignTo, isNew);\n // Hide label of a point (only inverted) that is outside the\n // visible y range\n if (this.isRadialBar && point.shapeArgs &&\n point.shapeArgs.start === point.shapeArgs.end) {\n dataLabel.hide();\n }\n else {\n dataLabel.show();\n }\n }\n else {\n proceed.call(this, point, dataLabel, options, alignTo, isNew);\n }\n }\n /**\n * Extend the column prototype's translate method\n * @private\n */\n function wrapColumnSeriesTranslate(proceed) {\n var series = this,\n options = series.options,\n stacking = options.stacking,\n chart = series.chart,\n xAxis = series.xAxis,\n yAxis = series.yAxis,\n reversed = yAxis.reversed,\n center = yAxis.center,\n startAngleRad = xAxis.startAngleRad,\n endAngleRad = xAxis.endAngleRad,\n visibleRange = endAngleRad - startAngleRad;\n var threshold = options.threshold,\n thresholdAngleRad = 0,\n points,\n point,\n i,\n yMin,\n yMax,\n start = 0,\n end = 0,\n tooltipPos,\n pointX,\n pointY,\n stackValues,\n stack,\n barX,\n innerR,\n r;\n series.preventPostTranslate = true;\n // Run uber method\n proceed.call(series);\n // Postprocess plot coordinates\n if (xAxis.isRadial) {\n points = series.points;\n i = points.length;\n yMin = yAxis.translate(yAxis.min);\n yMax = yAxis.translate(yAxis.max);\n threshold = options.threshold || 0;\n if (chart.inverted) {\n // Finding a correct threshold\n if (isNumber(threshold)) {\n thresholdAngleRad = yAxis.translate(threshold);\n // Checks if threshold is outside the visible range\n if (defined(thresholdAngleRad)) {\n if (thresholdAngleRad < 0) {\n thresholdAngleRad = 0;\n }\n else if (thresholdAngleRad > visibleRange) {\n thresholdAngleRad = visibleRange;\n }\n // Adding start angle offset\n series.translatedThreshold =\n thresholdAngleRad + startAngleRad;\n }\n }\n }\n while (i--) {\n point = points[i];\n barX = point.barX;\n pointX = point.x;\n pointY = point.y;\n point.shapeType = 'arc';\n if (chart.inverted) {\n point.plotY = yAxis.translate(pointY);\n if (stacking && yAxis.stacking) {\n stack = yAxis.stacking.stacks[(pointY < 0 ? '-' : '') +\n series.stackKey];\n if (series.visible && stack && stack[pointX]) {\n if (!point.isNull) {\n stackValues = stack[pointX].points[series.getStackIndicator(void 0, pointX, series.index).key];\n // Translating to radial values\n start = yAxis.translate(stackValues[0]);\n end = yAxis.translate(stackValues[1]);\n // If starting point is beyond the\n // range, set it to 0\n if (defined(start)) {\n start = U.clamp(start, 0, visibleRange);\n }\n }\n }\n }\n else {\n // Initial start and end angles for radial bar\n start = thresholdAngleRad;\n end = point.plotY;\n }\n if (start > end) {\n // Swapping start and end\n end = [start, start = end][0];\n }\n // Prevent from rendering point outside the\n // acceptable circular range\n if (!reversed) {\n if (start < yMin) {\n start = yMin;\n }\n else if (end > yMax) {\n end = yMax;\n }\n else if (end < yMin || start > yMax) {\n start = end = 0;\n }\n }\n else {\n if (end > yMin) {\n end = yMin;\n }\n else if (start < yMax) {\n start = yMax;\n }\n else if (start > yMin || end < yMax) {\n start = end = visibleRange;\n }\n }\n if (yAxis.min > yAxis.max) {\n start = end = reversed ? visibleRange : 0;\n }\n start += startAngleRad;\n end += startAngleRad;\n if (center) {\n point.barX = barX += center[3] / 2;\n }\n // In case when radius, inner radius or both are\n // negative, a point is rendered but partially or as\n // a center point\n innerR = Math.max(barX, 0);\n r = Math.max(barX + point.pointWidth, 0);\n point.shapeArgs = {\n x: center && center[0],\n y: center && center[1],\n r: r,\n innerR: innerR,\n start: start,\n end: end\n };\n // Fade out the points if not inside the polar \"plot area\"\n point.opacity = start === end ? 0 : void 0;\n // A correct value for stacked or not fully visible\n // point\n point.plotY = (defined(series.translatedThreshold) &&\n (start < series.translatedThreshold ? start : end)) -\n startAngleRad;\n }\n else {\n start = barX + startAngleRad;\n // Changed the way polar columns are drawn in order to make\n // it more consistent with the drawing of inverted columns\n // (they are using the same function now). Also, it was\n // essential to make the animation work correctly (the\n // scaling of the group) is replaced by animating each\n // element separately.\n point.shapeArgs = series.polar.arc(point.yBottom, point.plotY, start, start + point.pointWidth);\n }\n // Provided a correct coordinates for the tooltip\n series.polar.toXY(point);\n if (chart.inverted) {\n tooltipPos = yAxis.postTranslate(point.rectPlotY, barX + point.pointWidth / 2);\n point.tooltipPos = [\n tooltipPos.x - chart.plotLeft,\n tooltipPos.y - chart.plotTop\n ];\n }\n else {\n point.tooltipPos = [point.plotX, point.plotY];\n }\n if (center) {\n point.ttBelow = point.plotY > center[1];\n }\n }\n }\n }\n /**\n * Extend getSegmentPath to allow connecting ends across 0 to provide a\n * closed circle in line-like series.\n * @private\n */\n function wrapLineSeriesGetGraphPath(proceed, points) {\n var series = this;\n var firstValid,\n popLastPoint;\n // Connect the path\n if (this.chart.polar) {\n points = points || this.points;\n // Append first valid point in order to connect the ends\n for (var i = 0; i < points.length; i++) {\n if (!points[i].isNull) {\n firstValid = i;\n break;\n }\n }\n /**\n * Polar charts only. Whether to connect the ends of a line series\n * plot across the extremes.\n *\n * @sample {highcharts} highcharts/plotoptions/line-connectends-false/\n * Do not connect\n *\n * @type {boolean}\n * @since 2.3.0\n * @product highcharts\n * @apioption plotOptions.series.connectEnds\n */\n if (this.options.connectEnds !== false &&\n typeof firstValid !== 'undefined') {\n this.connectEnds = true; // re-used in splines\n points.splice(points.length, 0, points[firstValid]);\n popLastPoint = true;\n }\n // For area charts, pseudo points are added to the graph, now we\n // need to translate these\n points.forEach(function (point) {\n if (typeof point.polarPlotY === 'undefined') {\n series.polar.toXY(point);\n }\n });\n }\n // Run uber method\n var ret = proceed.apply(this,\n [].slice.call(arguments, 1));\n // #6212 points.splice method is adding points to an array. In case of\n // areaspline getGraphPath method is used two times and in both times\n // points are added to an array. That is why points.pop is used, to get\n // unmodified points.\n if (popLastPoint) {\n points.pop();\n }\n return ret;\n }\n /**\n * Extend getCoordinates to prepare for polar axis values\n * @private\n */\n function wrapPointerGetCoordinates(proceed, e) {\n var chart = this.chart;\n var ret = {\n xAxis: [],\n yAxis: []\n };\n if (chart.polar) {\n chart.axes.forEach(function (axis) {\n // Skip colorAxis\n if (axis.coll === 'colorAxis') {\n return;\n }\n var isXAxis = axis.isXAxis,\n center = axis.center,\n x = e.chartX - center[0] - chart.plotLeft,\n y = e.chartY - center[1] - chart.plotTop;\n ret[isXAxis ? 'xAxis' : 'yAxis'].push({\n axis: axis,\n value: axis.translate(isXAxis ?\n Math.PI - Math.atan2(x, y) : // angle\n // distance from center\n Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)), true)\n });\n });\n }\n else {\n ret = proceed.call(this, e);\n }\n return ret;\n }\n /**\n * Prevent zooming on mobile devices\n * @private\n */\n function wrapPointerPinch(proceed, e) {\n if (this.chart.polar) {\n return;\n }\n proceed.call(this, e);\n }\n /**\n * Define the animate method for regular series\n * @private\n */\n function wrapSeriesAnimate(proceed, init) {\n var series = this,\n chart = this.chart,\n group = this.group,\n markerGroup = this.markerGroup,\n center = this.xAxis && this.xAxis.center,\n plotLeft = chart.plotLeft,\n plotTop = chart.plotTop;\n var animation = this.options.animation,\n attribs,\n paneInnerR,\n graphic,\n shapeArgs,\n r,\n innerR;\n // Specific animation for polar charts\n if (chart.polar) {\n if (series.isRadialBar) {\n if (!init) {\n // Run the pie animation for radial bars\n series.startAngleRad = pick(series.translatedThreshold, series.xAxis.startAngleRad);\n H.seriesTypes.pie.prototype.animate.call(series, init);\n }\n }\n else {\n // Enable animation on polar charts only in SVG. In VML, the scaling\n // is different, plus animation would be so slow it would't matter.\n if (chart.renderer.isSVG) {\n animation = animObject(animation);\n // A different animation needed for column like series\n if (series.is('column')) {\n if (!init) {\n paneInnerR = center[3] / 2;\n series.points.forEach(function (point) {\n graphic = point.graphic;\n shapeArgs = point.shapeArgs;\n r = shapeArgs && shapeArgs.r;\n innerR = shapeArgs && shapeArgs.innerR;\n if (graphic && shapeArgs) {\n // start values\n graphic.attr({\n r: paneInnerR,\n innerR: paneInnerR\n });\n // animate\n graphic.animate({\n r: r,\n innerR: innerR\n }, series.options.animation);\n }\n });\n }\n }\n else {\n // Initialize the animation\n if (init) {\n // Scale down the group and place it in the center\n attribs = {\n translateX: center[0] + plotLeft,\n translateY: center[1] + plotTop,\n scaleX: 0.001,\n scaleY: 0.001\n };\n group.attr(attribs);\n if (markerGroup) {\n markerGroup.attr(attribs);\n }\n // Run the animation\n }\n else {\n attribs = {\n translateX: plotLeft,\n translateY: plotTop,\n scaleX: 1,\n scaleY: 1\n };\n group.animate(attribs, animation);\n if (markerGroup) {\n markerGroup.animate(attribs, animation);\n }\n }\n }\n }\n }\n // For non-polar charts, revert to the basic animation\n }\n else {\n proceed.call(this, init);\n }\n }\n /**\n * Overridden method for calculating a spline from one point to the next\n * @private\n */\n function wrapSplineSeriesGetPointSpline(proceed, segment, point, i) {\n var ret,\n connectors;\n if (this.chart.polar) {\n // moveTo or lineTo\n if (!i) {\n ret = ['M', point.plotX, point.plotY];\n }\n else { // curve from last point to this\n connectors = getConnectors(segment, i, true, this.connectEnds);\n var rightContX = connectors.prevPointCont &&\n connectors.prevPointCont.rightContX;\n var rightContY = connectors.prevPointCont &&\n connectors.prevPointCont.rightContY;\n ret = [\n 'C',\n isNumber(rightContX) ? rightContX : connectors.plotX,\n isNumber(rightContY) ? rightContY : connectors.plotY,\n isNumber(connectors.leftContX) ?\n connectors.leftContX :\n connectors.plotX,\n isNumber(connectors.leftContY) ?\n connectors.leftContY :\n connectors.plotY,\n connectors.plotX,\n connectors.plotY\n ];\n }\n }\n else {\n ret = proceed.call(this, segment, point, i);\n }\n return ret;\n }\n /* *\n *\n * Class\n *\n * */\n /**\n * Extensions for polar charts. Additionally, much of the geometry required\n * for polar charts is gathered in RadialAxes.js.\n * @private\n */\n var PolarAdditions = /** @class */ (function () {\n /* *\n *\n * Constructor\n *\n * */\n function PolarAdditions(series) {\n this.series = series;\n }\n /* *\n *\n * Static Functions\n *\n * */\n PolarAdditions.compose = function (AxisClass, ChartClass, PointerClass, SeriesClass, TickClass, AreaSplineRangeSeriesClass, ColumnSeriesClass, LineSeriesClass, SplineSeriesClass) {\n RadialAxis.compose(AxisClass, TickClass);\n if (composedClasses.indexOf(ChartClass) === -1) {\n composedClasses.push(ChartClass);\n addEvent(ChartClass, 'afterDrawChartBox', onChartAfterDrawChartBox);\n addEvent(ChartClass, 'getAxes', onChartGetAxes);\n addEvent(ChartClass, 'init', onChartAfterInit);\n var chartProto = ChartClass.prototype;\n wrap(chartProto, 'get', wrapChartGet);\n }\n if (composedClasses.indexOf(PointerClass) === -1) {\n composedClasses.push(PointerClass);\n var pointerProto = PointerClass.prototype;\n wrap(pointerProto, 'getCoordinates', wrapPointerGetCoordinates);\n wrap(pointerProto, 'pinch', wrapPointerPinch);\n addEvent(PointerClass, 'getSelectionMarkerAttrs', onPointerGetSelectionMarkerAttrs);\n addEvent(PointerClass, 'getSelectionBox', onPointerGetSelectionBox);\n }\n if (composedClasses.indexOf(SeriesClass) === -1) {\n composedClasses.push(SeriesClass);\n addEvent(SeriesClass, 'afterInit', onSeriesAfterInit);\n addEvent(SeriesClass, 'afterTranslate', onSeriesAfterTranslate, { order: 2 } // Run after translation of ||-coords\n );\n var seriesProto = SeriesClass.prototype;\n wrap(seriesProto, 'animate', wrapSeriesAnimate);\n }\n if (ColumnSeriesClass &&\n composedClasses.indexOf(ColumnSeriesClass) === -1) {\n composedClasses.push(ColumnSeriesClass);\n var columnProto = ColumnSeriesClass.prototype;\n wrap(columnProto, 'alignDataLabel', wrapColumnSeriesAlignDataLabel);\n wrap(columnProto, 'animate', wrapSeriesAnimate);\n wrap(columnProto, 'translate', wrapColumnSeriesTranslate);\n }\n if (LineSeriesClass &&\n composedClasses.indexOf(LineSeriesClass) === -1) {\n composedClasses.push(LineSeriesClass);\n var lineProto = LineSeriesClass.prototype;\n wrap(lineProto, 'getGraphPath', wrapLineSeriesGetGraphPath);\n }\n if (SplineSeriesClass &&\n composedClasses.indexOf(SplineSeriesClass) === -1) {\n composedClasses.push(SplineSeriesClass);\n var splineProto = SplineSeriesClass.prototype;\n wrap(splineProto, 'getPointSpline', wrapSplineSeriesGetPointSpline);\n if (AreaSplineRangeSeriesClass &&\n composedClasses.indexOf(AreaSplineRangeSeriesClass) === -1) {\n composedClasses.push(AreaSplineRangeSeriesClass);\n var areaSplineRangeProto = AreaSplineRangeSeriesClass.prototype;\n // #6430 Areasplinerange series use unwrapped getPointSpline\n // method, so we need to set this method again.\n areaSplineRangeProto.getPointSpline =\n splineProto.getPointSpline;\n }\n }\n };\n /* *\n *\n * Functions\n *\n * */\n PolarAdditions.prototype.arc = function (low, high, start, end) {\n var series = this.series,\n center = series.xAxis.center,\n len = series.yAxis.len,\n paneInnerR = center[3] / 2;\n var r = len - high + paneInnerR,\n innerR = len - pick(low,\n len) + paneInnerR;\n // Prevent columns from shooting through the pane's center\n if (series.yAxis.reversed) {\n if (r < 0) {\n r = paneInnerR;\n }\n if (innerR < 0) {\n innerR = paneInnerR;\n }\n }\n // Return a new shapeArgs\n return {\n x: center[0],\n y: center[1],\n r: r,\n innerR: innerR,\n start: start,\n end: end\n };\n };\n /**\n * Translate a point's plotX and plotY from the internal angle and radius\n * measures to true plotX, plotY coordinates\n * @private\n */\n PolarAdditions.prototype.toXY = function (point) {\n var series = this.series,\n chart = series.chart,\n xAxis = series.xAxis,\n yAxis = series.yAxis,\n plotX = point.plotX,\n inverted = chart.inverted,\n pointY = point.y;\n var plotY = point.plotY,\n radius = inverted ? plotX : yAxis.len - plotY,\n clientX;\n // Corrected y position of inverted series other than column\n if (inverted && series && !series.isRadialBar) {\n point.plotY = plotY =\n isNumber(pointY) ? yAxis.translate(pointY) : 0;\n }\n // Save rectangular plotX, plotY for later computation\n point.rectPlotX = plotX;\n point.rectPlotY = plotY;\n if (yAxis.center) {\n radius += yAxis.center[3] / 2;\n }\n // Find the polar plotX and plotY. Avoid setting plotX and plotY to NaN\n // when plotY is undefined (#15438)\n if (isNumber(plotY)) {\n var xy = inverted ? yAxis.postTranslate(plotY,\n radius) :\n xAxis.postTranslate(plotX,\n radius);\n point.plotX = point.polarPlotX = xy.x - chart.plotLeft;\n point.plotY = point.polarPlotY = xy.y - chart.plotTop;\n }\n // If shared tooltip, record the angle in degrees in order to align X\n // points. Otherwise, use a standard k-d tree to get the nearest point\n // in two dimensions.\n if (series.kdByAngle) {\n clientX = ((plotX / Math.PI * 180) + xAxis.pane.options.startAngle) % 360;\n if (clientX < 0) { // #2665\n clientX += 360;\n }\n point.clientX = clientX;\n }\n else {\n point.clientX = point.plotX;\n }\n };\n return PolarAdditions;\n }());\n /* *\n *\n * Default Export\n *\n * */\n\n return PolarAdditions;\n });\n _registerModule(_modules, 'masters/highcharts-more.src.js', [_modules['Core/Globals.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Series/Bubble/BubbleSeries.js'], _modules['Series/PackedBubble/PackedBubbleSeries.js'], _modules['Series/PolarComposition.js']], function (Highcharts, SeriesRegistry, BubbleSeries, PackedBubbleSeries, PolarAdditions) {\n\n var G = Highcharts;\n BubbleSeries.compose(G.Axis, G.Chart, G.Legend, G.Series);\n PackedBubbleSeries.compose(G.Axis, G.Chart, G.Legend, G.Series);\n PolarAdditions.compose(G.Axis, G.Chart, G.Pointer, G.Series, G.Tick, SeriesRegistry.seriesTypes.areasplinerange, SeriesRegistry.seriesTypes.column, SeriesRegistry.seriesTypes.line, SeriesRegistry.seriesTypes.spline);\n\n });\n}));", "export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: xhtml,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n", "import namespaces from \"./namespaces.js\";\n\nexport default function(name) {\n var prefix = name += \"\", i = prefix.indexOf(\":\");\n if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins\n}\n", "import namespace from \"./namespace.js\";\nimport {xhtml} from \"./namespaces.js\";\n\nfunction creatorInherit(name) {\n return function() {\n var document = this.ownerDocument,\n uri = this.namespaceURI;\n return uri === xhtml && document.documentElement.namespaceURI === xhtml\n ? document.createElement(name)\n : document.createElementNS(uri, name);\n };\n}\n\nfunction creatorFixed(fullname) {\n return function() {\n return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n };\n}\n\nexport default function(name) {\n var fullname = namespace(name);\n return (fullname.local\n ? creatorFixed\n : creatorInherit)(fullname);\n}\n", "function none() {}\n\nexport default function(selector) {\n return selector == null ? none : function() {\n return this.querySelector(selector);\n };\n}\n", "import {Selection} from \"./index.js\";\nimport selector from \"../selector.js\";\n\nexport default function(select) {\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n", "// Given something array like (or null), returns something that is strictly an\n// array. This is used to ensure that array-like objects passed to d3.selectAll\n// or selection.selectAll are converted into proper arrays when creating a\n// selection; we don\u2019t ever want to create a selection backed by a live\n// HTMLCollection or NodeList. However, note that selection.selectAll will use a\n// static NodeList as a group, since it safely derived from querySelectorAll.\nexport default function array(x) {\n return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\n}\n", "function empty() {\n return [];\n}\n\nexport default function(selector) {\n return selector == null ? empty : function() {\n return this.querySelectorAll(selector);\n };\n}\n", "import {Selection} from \"./index.js\";\nimport array from \"../array.js\";\nimport selectorAll from \"../selectorAll.js\";\n\nfunction arrayAll(select) {\n return function() {\n return array(select.apply(this, arguments));\n };\n}\n\nexport default function(select) {\n if (typeof select === \"function\") select = arrayAll(select);\n else select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n subgroups.push(select.call(node, node.__data__, i, group));\n parents.push(node);\n }\n }\n }\n\n return new Selection(subgroups, parents);\n}\n", "export default function(selector) {\n return function() {\n return this.matches(selector);\n };\n}\n\nexport function childMatcher(selector) {\n return function(node) {\n return node.matches(selector);\n };\n}\n\n", "import {childMatcher} from \"../matcher.js\";\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n return function() {\n return find.call(this.children, match);\n };\n}\n\nfunction childFirst() {\n return this.firstElementChild;\n}\n\nexport default function(match) {\n return this.select(match == null ? childFirst\n : childFind(typeof match === \"function\" ? match : childMatcher(match)));\n}\n", "import {childMatcher} from \"../matcher.js\";\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n return Array.from(this.children);\n}\n\nfunction childrenFilter(match) {\n return function() {\n return filter.call(this.children, match);\n };\n}\n\nexport default function(match) {\n return this.selectAll(match == null ? children\n : childrenFilter(typeof match === \"function\" ? match : childMatcher(match)));\n}\n", "import {Selection} from \"./index.js\";\nimport matcher from \"../matcher.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n", "export default function(update) {\n return new Array(update.length);\n}\n", "import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n this.ownerDocument = parent.ownerDocument;\n this.namespaceURI = parent.namespaceURI;\n this._next = null;\n this._parent = parent;\n this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n constructor: EnterNode,\n appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n querySelector: function(selector) { return this._parent.querySelector(selector); },\n querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n", "export default function(x) {\n return function() {\n return x;\n };\n}\n", "import {Selection} from \"./index.js\";\nimport {EnterNode} from \"./enter.js\";\nimport constant from \"../constant.js\";\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n var i = 0,\n node,\n groupLength = group.length,\n dataLength = data.length;\n\n // Put any non-null nodes that fit into update.\n // Put any null nodes into enter.\n // Put any remaining data into enter.\n for (; i < dataLength; ++i) {\n if (node = group[i]) {\n node.__data__ = data[i];\n update[i] = node;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Put any non-null nodes that don\u2019t fit into exit.\n for (; i < groupLength; ++i) {\n if (node = group[i]) {\n exit[i] = node;\n }\n }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n var i,\n node,\n nodeByKeyValue = new Map,\n groupLength = group.length,\n dataLength = data.length,\n keyValues = new Array(groupLength),\n keyValue;\n\n // Compute the key for each node.\n // If multiple nodes have the same key, the duplicates are added to exit.\n for (i = 0; i < groupLength; ++i) {\n if (node = group[i]) {\n keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n if (nodeByKeyValue.has(keyValue)) {\n exit[i] = node;\n } else {\n nodeByKeyValue.set(keyValue, node);\n }\n }\n }\n\n // Compute the key for each datum.\n // If there a node associated with this key, join and add it to update.\n // If there is not (or the key is a duplicate), add it to enter.\n for (i = 0; i < dataLength; ++i) {\n keyValue = key.call(parent, data[i], i, data) + \"\";\n if (node = nodeByKeyValue.get(keyValue)) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue.delete(keyValue);\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Add any remaining nodes that were not bound to data to exit.\n for (i = 0; i < groupLength; ++i) {\n if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {\n exit[i] = node;\n }\n }\n}\n\nfunction datum(node) {\n return node.__data__;\n}\n\nexport default function(value, key) {\n if (!arguments.length) return Array.from(this, datum);\n\n var bind = key ? bindKey : bindIndex,\n parents = this._parents,\n groups = this._groups;\n\n if (typeof value !== \"function\") value = constant(value);\n\n for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n var parent = parents[j],\n group = groups[j],\n groupLength = group.length,\n data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),\n dataLength = data.length,\n enterGroup = enter[j] = new Array(dataLength),\n updateGroup = update[j] = new Array(dataLength),\n exitGroup = exit[j] = new Array(groupLength);\n\n bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n // Now connect the enter nodes to their following update node, such that\n // appendChild can insert the materialized enter node before this node,\n // rather than at the end of the parent node.\n for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n if (previous = enterGroup[i0]) {\n if (i0 >= i1) i1 = i0 + 1;\n while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n previous._next = next || null;\n }\n }\n }\n\n update = new Selection(update, parents);\n update._enter = enter;\n update._exit = exit;\n return update;\n}\n\n// Given some data, this returns an array-like view of it: an object that\n// exposes a length property and allows numeric indexing. Note that unlike\n// selectAll, this isn\u2019t worried about \u201Clive\u201D collections because the resulting\n// array will only be used briefly while data is being bound. (It is possible to\n// cause the data to change while iterating by using a key function, but please\n// don\u2019t; we\u2019d rather avoid a gratuitous copy.)\nfunction arraylike(data) {\n return typeof data === \"object\" && \"length\" in data\n ? data // Array, TypedArray, NodeList, array-like\n : Array.from(data); // Map, Set, iterable, string, or anything else\n}\n", "import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n", "export default function(onenter, onupdate, onexit) {\n var enter = this.enter(), update = this, exit = this.exit();\n if (typeof onenter === \"function\") {\n enter = onenter(enter);\n if (enter) enter = enter.selection();\n } else {\n enter = enter.append(onenter + \"\");\n }\n if (onupdate != null) {\n update = onupdate(update);\n if (update) update = update.selection();\n }\n if (onexit == null) exit.remove(); else onexit(exit);\n return enter && update ? enter.merge(update).order() : update;\n}\n", "import {Selection} from \"./index.js\";\n\nexport default function(context) {\n var selection = context.selection ? context.selection() : context;\n\n for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Selection(merges, this._parents);\n}\n", "export default function() {\n\n for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n if (node = group[i]) {\n if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n\n return this;\n}\n", "import {Selection} from \"./index.js\";\n\nexport default function(compare) {\n if (!compare) compare = ascending;\n\n function compareNode(a, b) {\n return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n }\n\n for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n sortgroup[i] = node;\n }\n }\n sortgroup.sort(compareNode);\n }\n\n return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "export default function() {\n var callback = arguments[0];\n arguments[0] = this;\n callback.apply(null, arguments);\n return this;\n}\n", "export default function() {\n return Array.from(this);\n}\n", "export default function() {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n var node = group[i];\n if (node) return node;\n }\n }\n\n return null;\n}\n", "export default function() {\n let size = 0;\n for (const node of this) ++size; // eslint-disable-line no-unused-vars\n return size;\n}\n", "export default function() {\n return !this.node();\n}\n", "export default function(callback) {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) callback.call(node, node.__data__, i, group);\n }\n }\n\n return this;\n}\n", "import namespace from \"../namespace.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, value) {\n return function() {\n this.setAttribute(name, value);\n };\n}\n\nfunction attrConstantNS(fullname, value) {\n return function() {\n this.setAttributeNS(fullname.space, fullname.local, value);\n };\n}\n\nfunction attrFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttribute(name);\n else this.setAttribute(name, v);\n };\n}\n\nfunction attrFunctionNS(fullname, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n else this.setAttributeNS(fullname.space, fullname.local, v);\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name);\n\n if (arguments.length < 2) {\n var node = this.node();\n return fullname.local\n ? node.getAttributeNS(fullname.space, fullname.local)\n : node.getAttribute(fullname);\n }\n\n return this.each((value == null\n ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)\n : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n", "export default function(node) {\n return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n || (node.document && node) // node is a Window\n || node.defaultView; // node is a Document\n}\n", "import defaultView from \"../window.js\";\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, value, priority) {\n return function() {\n this.style.setProperty(name, value, priority);\n };\n}\n\nfunction styleFunction(name, value, priority) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.style.removeProperty(name);\n else this.style.setProperty(name, v, priority);\n };\n}\n\nexport default function(name, value, priority) {\n return arguments.length > 1\n ? this.each((value == null\n ? styleRemove : typeof value === \"function\"\n ? styleFunction\n : styleConstant)(name, value, priority == null ? \"\" : priority))\n : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n return node.style.getPropertyValue(name)\n || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n", "function propertyRemove(name) {\n return function() {\n delete this[name];\n };\n}\n\nfunction propertyConstant(name, value) {\n return function() {\n this[name] = value;\n };\n}\n\nfunction propertyFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) delete this[name];\n else this[name] = v;\n };\n}\n\nexport default function(name, value) {\n return arguments.length > 1\n ? this.each((value == null\n ? propertyRemove : typeof value === \"function\"\n ? propertyFunction\n : propertyConstant)(name, value))\n : this.node()[name];\n}\n", "function classArray(string) {\n return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n this._node = node;\n this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n add: function(name) {\n var i = this._names.indexOf(name);\n if (i < 0) {\n this._names.push(name);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n remove: function(name) {\n var i = this._names.indexOf(name);\n if (i >= 0) {\n this._names.splice(i, 1);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n contains: function(name) {\n return this._names.indexOf(name) >= 0;\n }\n};\n\nfunction classedAdd(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n return function() {\n classedAdd(this, names);\n };\n}\n\nfunction classedFalse(names) {\n return function() {\n classedRemove(this, names);\n };\n}\n\nfunction classedFunction(names, value) {\n return function() {\n (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n };\n}\n\nexport default function(name, value) {\n var names = classArray(name + \"\");\n\n if (arguments.length < 2) {\n var list = classList(this.node()), i = -1, n = names.length;\n while (++i < n) if (!list.contains(names[i])) return false;\n return true;\n }\n\n return this.each((typeof value === \"function\"\n ? classedFunction : value\n ? classedTrue\n : classedFalse)(names, value));\n}\n", "function textRemove() {\n this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.textContent = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? textRemove : (typeof value === \"function\"\n ? textFunction\n : textConstant)(value))\n : this.node().textContent;\n}\n", "function htmlRemove() {\n this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n return function() {\n this.innerHTML = value;\n };\n}\n\nfunction htmlFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.innerHTML = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? htmlRemove : (typeof value === \"function\"\n ? htmlFunction\n : htmlConstant)(value))\n : this.node().innerHTML;\n}\n", "function raise() {\n if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n return this.each(raise);\n}\n", "function lower() {\n if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n return this.each(lower);\n}\n", "import creator from \"../creator.js\";\n\nexport default function(name) {\n var create = typeof name === \"function\" ? name : creator(name);\n return this.select(function() {\n return this.appendChild(create.apply(this, arguments));\n });\n}\n", "import creator from \"../creator.js\";\nimport selector from \"../selector.js\";\n\nfunction constantNull() {\n return null;\n}\n\nexport default function(name, before) {\n var create = typeof name === \"function\" ? name : creator(name),\n select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n return this.select(function() {\n return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n });\n}\n", "function remove() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n return this.each(remove);\n}\n", "function selection_cloneShallow() {\n var clone = this.cloneNode(false), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n var clone = this.cloneNode(true), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n", "export default function(value) {\n return arguments.length\n ? this.property(\"__data__\", value)\n : this.node().__data__;\n}\n", "function contextListener(listener) {\n return function(event) {\n listener.call(this, event, this.__data__);\n };\n}\n\nfunction parseTypenames(typenames) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n return {type: t, name: name};\n });\n}\n\nfunction onRemove(typename) {\n return function() {\n var on = this.__on;\n if (!on) return;\n for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n } else {\n on[++i] = o;\n }\n }\n if (++i) on.length = i;\n else delete this.__on;\n };\n}\n\nfunction onAdd(typename, value, options) {\n return function() {\n var on = this.__on, o, listener = contextListener(value);\n if (on) for (var j = 0, m = on.length; j < m; ++j) {\n if ((o = on[j]).type === typename.type && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n this.addEventListener(o.type, o.listener = listener, o.options = options);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, options);\n o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n if (!on) this.__on = [o];\n else on.push(o);\n };\n}\n\nexport default function(typename, value, options) {\n var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n if (arguments.length < 2) {\n var on = this.node().__on;\n if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n for (i = 0, o = on[j]; i < n; ++i) {\n if ((t = typenames[i]).type === o.type && t.name === o.name) {\n return o.value;\n }\n }\n }\n return;\n }\n\n on = value ? onAdd : onRemove;\n for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n return this;\n}\n", "import defaultView from \"../window.js\";\n\nfunction dispatchEvent(node, type, params) {\n var window = defaultView(node),\n event = window.CustomEvent;\n\n if (typeof event === \"function\") {\n event = new event(type, params);\n } else {\n event = window.document.createEvent(\"Event\");\n if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n else event.initEvent(type, false, false);\n }\n\n node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n return function() {\n return dispatchEvent(this, type, params);\n };\n}\n\nfunction dispatchFunction(type, params) {\n return function() {\n return dispatchEvent(this, type, params.apply(this, arguments));\n };\n}\n\nexport default function(type, params) {\n return this.each((typeof params === \"function\"\n ? dispatchFunction\n : dispatchConstant)(type, params));\n}\n", "export default function*() {\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) yield node;\n }\n }\n}\n", "import selection_select from \"./select.js\";\nimport selection_selectAll from \"./selectAll.js\";\nimport selection_selectChild from \"./selectChild.js\";\nimport selection_selectChildren from \"./selectChildren.js\";\nimport selection_filter from \"./filter.js\";\nimport selection_data from \"./data.js\";\nimport selection_enter from \"./enter.js\";\nimport selection_exit from \"./exit.js\";\nimport selection_join from \"./join.js\";\nimport selection_merge from \"./merge.js\";\nimport selection_order from \"./order.js\";\nimport selection_sort from \"./sort.js\";\nimport selection_call from \"./call.js\";\nimport selection_nodes from \"./nodes.js\";\nimport selection_node from \"./node.js\";\nimport selection_size from \"./size.js\";\nimport selection_empty from \"./empty.js\";\nimport selection_each from \"./each.js\";\nimport selection_attr from \"./attr.js\";\nimport selection_style from \"./style.js\";\nimport selection_property from \"./property.js\";\nimport selection_classed from \"./classed.js\";\nimport selection_text from \"./text.js\";\nimport selection_html from \"./html.js\";\nimport selection_raise from \"./raise.js\";\nimport selection_lower from \"./lower.js\";\nimport selection_append from \"./append.js\";\nimport selection_insert from \"./insert.js\";\nimport selection_remove from \"./remove.js\";\nimport selection_clone from \"./clone.js\";\nimport selection_datum from \"./datum.js\";\nimport selection_on from \"./on.js\";\nimport selection_dispatch from \"./dispatch.js\";\nimport selection_iterator from \"./iterator.js\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n this._groups = groups;\n this._parents = parents;\n}\n\nfunction selection() {\n return new Selection([[document.documentElement]], root);\n}\n\nfunction selection_selection() {\n return this;\n}\n\nSelection.prototype = selection.prototype = {\n constructor: Selection,\n select: selection_select,\n selectAll: selection_selectAll,\n selectChild: selection_selectChild,\n selectChildren: selection_selectChildren,\n filter: selection_filter,\n data: selection_data,\n enter: selection_enter,\n exit: selection_exit,\n join: selection_join,\n merge: selection_merge,\n selection: selection_selection,\n order: selection_order,\n sort: selection_sort,\n call: selection_call,\n nodes: selection_nodes,\n node: selection_node,\n size: selection_size,\n empty: selection_empty,\n each: selection_each,\n attr: selection_attr,\n style: selection_style,\n property: selection_property,\n classed: selection_classed,\n text: selection_text,\n html: selection_html,\n raise: selection_raise,\n lower: selection_lower,\n append: selection_append,\n insert: selection_insert,\n remove: selection_remove,\n clone: selection_clone,\n datum: selection_datum,\n on: selection_on,\n dispatch: selection_dispatch,\n [Symbol.iterator]: selection_iterator\n};\n\nexport default selection;\n", "import {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n : new Selection([[selector]], root);\n}\n", "var noop = {value: () => {}};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n}\n\nexport default dispatch;\n", "var frame = 0, // is an animation frame pending?\n timeout = 0, // is a timeout pending?\n interval = 0, // are any timers active?\n pokeDelay = 1000, // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call =\n this._time =\n this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;\n else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\n\nexport function timer(callback, delay, time) {\n var t = new Timer;\n t.restart(callback, delay, time);\n return t;\n}\n\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we\u2019ve set an alarm, if we haven\u2019t already.\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);\n t = t._next;\n }\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(), delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n", "import {Timer} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n var t = new Timer;\n delay = delay == null ? 0 : +delay;\n t.restart(elapsed => {\n t.stop();\n callback(elapsed + delay);\n }, delay, time);\n return t;\n}\n", "import {dispatch} from \"d3-dispatch\";\nimport {timer, timeout} from \"d3-timer\";\n\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\n\nexport default function(node, name, id, index, group, timing) {\n var schedules = node.__transition;\n if (!schedules) node.__transition = {};\n else if (id in schedules) return;\n create(node, id, {\n name: name,\n index: index, // For context during callback.\n group: group, // For context during callback.\n on: emptyOn,\n tween: emptyTween,\n time: timing.time,\n delay: timing.delay,\n duration: timing.duration,\n ease: timing.ease,\n timer: null,\n state: CREATED\n });\n}\n\nexport function init(node, id) {\n var schedule = get(node, id);\n if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n return schedule;\n}\n\nexport function set(node, id) {\n var schedule = get(node, id);\n if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n return schedule;\n}\n\nexport function get(node, id) {\n var schedule = node.__transition;\n if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n return schedule;\n}\n\nfunction create(node, id, self) {\n var schedules = node.__transition,\n tween;\n\n // Initialize the self timer when the transition is created.\n // Note the actual delay is not known until the first callback!\n schedules[id] = self;\n self.timer = timer(schedule, 0, self.time);\n\n function schedule(elapsed) {\n self.state = SCHEDULED;\n self.timer.restart(start, self.delay, self.time);\n\n // If the elapsed delay is less than our first sleep, start immediately.\n if (self.delay <= elapsed) start(elapsed - self.delay);\n }\n\n function start(elapsed) {\n var i, j, n, o;\n\n // If the state is not SCHEDULED, then we previously errored on start.\n if (self.state !== SCHEDULED) return stop();\n\n for (i in schedules) {\n o = schedules[i];\n if (o.name !== self.name) continue;\n\n // While this element already has a starting transition during this frame,\n // defer starting an interrupting transition until that transition has a\n // chance to tick (and possibly end); see d3/d3-transition#54!\n if (o.state === STARTED) return timeout(start);\n\n // Interrupt the active transition, if any.\n if (o.state === RUNNING) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n\n // Cancel any pre-empted transitions.\n else if (+i < id) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n }\n\n // Defer the first tick to end of the current frame; see d3/d3#1576.\n // Note the transition may be canceled after start and before the first tick!\n // Note this must be scheduled before the start event; see d3/d3-transition#16!\n // Assuming this is successful, subsequent callbacks go straight to tick.\n timeout(function() {\n if (self.state === STARTED) {\n self.state = RUNNING;\n self.timer.restart(tick, self.delay, self.time);\n tick(elapsed);\n }\n });\n\n // Dispatch the start event.\n // Note this must be done before the tween are initialized.\n self.state = STARTING;\n self.on.call(\"start\", node, node.__data__, self.index, self.group);\n if (self.state !== STARTING) return; // interrupted\n self.state = STARTED;\n\n // Initialize the tween, deleting null tween.\n tween = new Array(n = self.tween.length);\n for (i = 0, j = -1; i < n; ++i) {\n if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n tween[++j] = o;\n }\n }\n tween.length = j + 1;\n }\n\n function tick(elapsed) {\n var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n i = -1,\n n = tween.length;\n\n while (++i < n) {\n tween[i].call(node, t);\n }\n\n // Dispatch the end event.\n if (self.state === ENDING) {\n self.on.call(\"end\", node, node.__data__, self.index, self.group);\n stop();\n }\n }\n\n function stop() {\n self.state = ENDED;\n self.timer.stop();\n delete schedules[id];\n for (var i in schedules) return; // eslint-disable-line no-unused-vars\n delete node.__transition;\n }\n}\n", "import {STARTING, ENDING, ENDED} from \"./transition/schedule.js\";\n\nexport default function(node, name) {\n var schedules = node.__transition,\n schedule,\n active,\n empty = true,\n i;\n\n if (!schedules) return;\n\n name = name == null ? null : name + \"\";\n\n for (i in schedules) {\n if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n active = schedule.state > STARTING && schedule.state < ENDING;\n schedule.state = ENDED;\n schedule.timer.stop();\n schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n delete schedules[i];\n }\n\n if (empty) delete node.__transition;\n}\n", "import interrupt from \"../interrupt.js\";\n\nexport default function(name) {\n return this.each(function() {\n interrupt(this, name);\n });\n}\n", "export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n", "import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(`^rgb\\\\(${reI},${reI},${reI}\\\\)$`),\n reRgbPercent = new RegExp(`^rgb\\\\(${reP},${reP},${reP}\\\\)$`),\n reRgbaInteger = new RegExp(`^rgba\\\\(${reI},${reI},${reI},${reN}\\\\)$`),\n reRgbaPercent = new RegExp(`^rgba\\\\(${reP},${reP},${reP},${reN}\\\\)$`),\n reHslPercent = new RegExp(`^hsl\\\\(${reN},${reP},${reP}\\\\)$`),\n reHslaPercent = new RegExp(`^hsla\\\\(${reN},${reP},${reP},${reN}\\\\)$`);\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHex8: color_formatHex8,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHex8() {\n return this.rgb().formatHex8();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb() {\n return this;\n },\n clamp() {\n return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));\n },\n displayable() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatHex8: rgb_formatHex8,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;\n}\n\nfunction rgb_formatHex8() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\n\nfunction rgb_formatRgb() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"rgb(\" : \"rgba(\"}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? \")\" : `, ${a})`}`;\n}\n\nfunction clampa(opacity) {\n return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));\n}\n\nfunction clampi(value) {\n return Math.max(0, Math.min(255, Math.round(value) || 0));\n}\n\nfunction hex(value) {\n value = clampi(value);\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n clamp() {\n return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));\n },\n displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"hsl(\" : \"hsla(\"}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? \")\" : `, ${a})`}`;\n }\n}));\n\nfunction clamph(value) {\n value = (value || 0) % 360;\n return value < 0 ? value + 360 : value;\n}\n\nfunction clampt(value) {\n return Math.max(0, Math.min(1, value || 0));\n}\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n", "export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1, t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n + (4 - 6 * t2 + 3 * t3) * v1\n + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n + t3 * v3) / 6;\n}\n\nexport default function(values) {\n var n = values.length - 1;\n return function(t) {\n var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n", "import {basis} from \"./basis.js\";\n\nexport default function(values) {\n var n = values.length;\n return function(t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n", "export default x => () => x;\n", "import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\n\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n", "import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n", "export default function(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n}\n\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n", "import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n}\n", "export default function(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}\n", "export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\n", "import value from \"./value.js\";\n\nexport default function(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}\n", "import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\nexport default function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: number(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}\n", "import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant(b)\n : (t === \"number\" ? number\n : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n : b instanceof color ? rgb\n : b instanceof Date ? date\n : isNumberArray(b) ? numberArray\n : Array.isArray(b) ? genericArray\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n : number)(a, b);\n}\n", "var degrees = 180 / Math.PI;\n\nexport var identity = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\n\nexport default function(a, b, c, d, e, f) {\n var scaleX, scaleY, skewX;\n if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n return {\n translateX: e,\n translateY: f,\n rotate: Math.atan2(b, a) * degrees,\n skewX: Math.atan(skewX) * degrees,\n scaleX: scaleX,\n scaleY: scaleY\n };\n}\n", "import decompose, {identity} from \"./decompose.js\";\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nexport function parseCss(value) {\n const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nexport function parseSvg(value) {\n if (value == null) return identity;\n if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n svgNode.setAttribute(\"transform\", value);\n if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n value = value.matrix;\n return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n", "import number from \"../number.js\";\nimport {parseCss, parseSvg} from \"./parse.js\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n function pop(s) {\n return s.length ? s.pop() + \" \" : \"\";\n }\n\n function translate(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb || yb) {\n s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n }\n }\n\n function rotate(a, b, s, q) {\n if (a !== b) {\n if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"rotate(\" + b + degParen);\n }\n }\n\n function skewX(a, b, s, q) {\n if (a !== b) {\n q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"skewX(\" + b + degParen);\n }\n }\n\n function scale(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb !== 1 || yb !== 1) {\n s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n }\n }\n\n return function(a, b) {\n var s = [], // string constants and placeholders\n q = []; // number interpolators\n a = parse(a), b = parse(b);\n translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n rotate(a.rotate, b.rotate, s, q);\n skewX(a.skewX, b.skewX, s, q);\n scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n a = b = null; // gc\n return function(t) {\n var i = -1, n = q.length, o;\n while (++i < n) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n", "import {get, set} from \"./schedule.js\";\n\nfunction tweenRemove(id, name) {\n var tween0, tween1;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we\u2019re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = tween0 = tween;\n for (var i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1 = tween1.slice();\n tween1.splice(i, 1);\n break;\n }\n }\n }\n\n schedule.tween = tween1;\n };\n}\n\nfunction tweenFunction(id, name, value) {\n var tween0, tween1;\n if (typeof value !== \"function\") throw new Error;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we\u2019re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = (tween0 = tween).slice();\n for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1[i] = t;\n break;\n }\n }\n if (i === n) tween1.push(t);\n }\n\n schedule.tween = tween1;\n };\n}\n\nexport default function(name, value) {\n var id = this._id;\n\n name += \"\";\n\n if (arguments.length < 2) {\n var tween = get(this.node(), id).tween;\n for (var i = 0, n = tween.length, t; i < n; ++i) {\n if ((t = tween[i]).name === name) {\n return t.value;\n }\n }\n return null;\n }\n\n return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\n\nexport function tweenValue(transition, name, value) {\n var id = transition._id;\n\n transition.each(function() {\n var schedule = set(this, id);\n (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n });\n\n return function(node) {\n return get(node, id).value[name];\n };\n}\n", "import {color} from \"d3-color\";\nimport {interpolateNumber, interpolateRgb, interpolateString} from \"d3-interpolate\";\n\nexport default function(a, b) {\n var c;\n return (typeof b === \"number\" ? interpolateNumber\n : b instanceof color ? interpolateRgb\n : (c = color(b)) ? (b = c, interpolateRgb)\n : interpolateString)(a, b);\n}\n", "import {interpolateTransformSvg as interpolateTransform} from \"d3-interpolate\";\nimport {namespace} from \"d3-selection\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttribute(name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttributeNS(fullname.space, fullname.local);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttribute(name);\n string0 = this.getAttribute(name);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n string0 = this.getAttributeNS(fullname.space, fullname.local);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name), i = fullname === \"transform\" ? interpolateTransform : interpolate;\n return this.attrTween(name, typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value))\n : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}\n", "import {namespace} from \"d3-selection\";\n\nfunction attrInterpolate(name, i) {\n return function(t) {\n this.setAttribute(name, i.call(this, t));\n };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n return function(t) {\n this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n };\n}\n\nfunction attrTweenNS(fullname, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nfunction attrTween(name, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value) {\n var key = \"attr.\" + name;\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n var fullname = namespace(name);\n return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}\n", "import {get, init} from \"./schedule.js\";\n\nfunction delayFunction(id, value) {\n return function() {\n init(this, id).delay = +value.apply(this, arguments);\n };\n}\n\nfunction delayConstant(id, value) {\n return value = +value, function() {\n init(this, id).delay = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? delayFunction\n : delayConstant)(id, value))\n : get(this.node(), id).delay;\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction durationFunction(id, value) {\n return function() {\n set(this, id).duration = +value.apply(this, arguments);\n };\n}\n\nfunction durationConstant(id, value) {\n return value = +value, function() {\n set(this, id).duration = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? durationFunction\n : durationConstant)(id, value))\n : get(this.node(), id).duration;\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction easeConstant(id, value) {\n if (typeof value !== \"function\") throw new Error;\n return function() {\n set(this, id).ease = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each(easeConstant(id, value))\n : get(this.node(), id).ease;\n}\n", "import {set} from \"./schedule.js\";\n\nfunction easeVarying(id, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (typeof v !== \"function\") throw new Error;\n set(this, id).ease = v;\n };\n}\n\nexport default function(value) {\n if (typeof value !== \"function\") throw new Error;\n return this.each(easeVarying(this._id, value));\n}\n", "import {matcher} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Transition(subgroups, this._parents, this._name, this._id);\n}\n", "import {Transition} from \"./index.js\";\n\nexport default function(transition) {\n if (transition._id !== this._id) throw new Error;\n\n for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Transition(merges, this._parents, this._name, this._id);\n}\n", "import {get, set, init} from \"./schedule.js\";\n\nfunction start(name) {\n return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n var i = t.indexOf(\".\");\n if (i >= 0) t = t.slice(0, i);\n return !t || t === \"start\";\n });\n}\n\nfunction onFunction(id, name, listener) {\n var on0, on1, sit = start(name) ? init : set;\n return function() {\n var schedule = sit(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we\u2019re done!\n // Otherwise, copy-on-write.\n if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, listener) {\n var id = this._id;\n\n return arguments.length < 2\n ? get(this.node(), id).on.on(name)\n : this.each(onFunction(id, name, listener));\n}\n", "function removeFunction(id) {\n return function() {\n var parent = this.parentNode;\n for (var i in this.__transition) if (+i !== id) return;\n if (parent) parent.removeChild(this);\n };\n}\n\nexport default function() {\n return this.on(\"end.remove\", removeFunction(this._id));\n}\n", "import {selector} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n }\n }\n }\n\n return new Transition(subgroups, this._parents, name, id);\n}\n", "import {selectorAll} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n if (child = children[k]) {\n schedule(child, name, id, k, children, inherit);\n }\n }\n subgroups.push(children);\n parents.push(node);\n }\n }\n }\n\n return new Transition(subgroups, parents, name, id);\n}\n", "import {selection} from \"d3-selection\";\n\nvar Selection = selection.prototype.constructor;\n\nexport default function() {\n return new Selection(this._groups, this._parents);\n}\n", "import {interpolateTransformCss as interpolateTransform} from \"d3-interpolate\";\nimport {style} from \"d3-selection\";\nimport {set} from \"./schedule.js\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction styleNull(name, interpolate) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n string1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, string10 = string1);\n };\n}\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = style(this, name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction styleFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n value1 = value(this),\n string1 = value1 + \"\";\n if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction styleMaybeRemove(id, name) {\n var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n return function() {\n var schedule = set(this, id),\n on = schedule.on,\n listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we\u2019re done!\n // Otherwise, copy-on-write.\n if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, value, priority) {\n var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n return value == null ? this\n .styleTween(name, styleNull(name, i))\n .on(\"end.style.\" + name, styleRemove(name))\n : typeof value === \"function\" ? this\n .styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value)))\n .each(styleMaybeRemove(this._id, name))\n : this\n .styleTween(name, styleConstant(name, i, value), priority)\n .on(\"end.style.\" + name, null);\n}\n", "function styleInterpolate(name, i, priority) {\n return function(t) {\n this.style.setProperty(name, i.call(this, t), priority);\n };\n}\n\nfunction styleTween(name, value, priority) {\n var t, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n return t;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value, priority) {\n var key = \"style.\" + (name += \"\");\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}\n", "import {tweenValue} from \"./tween.js\";\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var value1 = value(this);\n this.textContent = value1 == null ? \"\" : value1;\n };\n}\n\nexport default function(value) {\n return this.tween(\"text\", typeof value === \"function\"\n ? textFunction(tweenValue(this, \"text\", value))\n : textConstant(value == null ? \"\" : value + \"\"));\n}\n", "function textInterpolate(i) {\n return function(t) {\n this.textContent = i.call(this, t);\n };\n}\n\nfunction textTween(value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(value) {\n var key = \"text\";\n if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, textTween(value));\n}\n", "import {Transition, newId} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function() {\n var name = this._name,\n id0 = this._id,\n id1 = newId();\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n var inherit = get(node, id0);\n schedule(node, name, id1, i, group, {\n time: inherit.time + inherit.delay + inherit.duration,\n delay: 0,\n duration: inherit.duration,\n ease: inherit.ease\n });\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id1);\n}\n", "import {set} from \"./schedule.js\";\n\nexport default function() {\n var on0, on1, that = this, id = that._id, size = that.size();\n return new Promise(function(resolve, reject) {\n var cancel = {value: reject},\n end = {value: function() { if (--size === 0) resolve(); }};\n\n that.each(function() {\n var schedule = set(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we\u2019re done!\n // Otherwise, copy-on-write.\n if (on !== on0) {\n on1 = (on0 = on).copy();\n on1._.cancel.push(cancel);\n on1._.interrupt.push(cancel);\n on1._.end.push(end);\n }\n\n schedule.on = on1;\n });\n\n // The selection was empty, resolve end immediately\n if (size === 0) resolve();\n });\n}\n", "import {selection} from \"d3-selection\";\nimport transition_attr from \"./attr.js\";\nimport transition_attrTween from \"./attrTween.js\";\nimport transition_delay from \"./delay.js\";\nimport transition_duration from \"./duration.js\";\nimport transition_ease from \"./ease.js\";\nimport transition_easeVarying from \"./easeVarying.js\";\nimport transition_filter from \"./filter.js\";\nimport transition_merge from \"./merge.js\";\nimport transition_on from \"./on.js\";\nimport transition_remove from \"./remove.js\";\nimport transition_select from \"./select.js\";\nimport transition_selectAll from \"./selectAll.js\";\nimport transition_selection from \"./selection.js\";\nimport transition_style from \"./style.js\";\nimport transition_styleTween from \"./styleTween.js\";\nimport transition_text from \"./text.js\";\nimport transition_textTween from \"./textTween.js\";\nimport transition_transition from \"./transition.js\";\nimport transition_tween from \"./tween.js\";\nimport transition_end from \"./end.js\";\n\nvar id = 0;\n\nexport function Transition(groups, parents, name, id) {\n this._groups = groups;\n this._parents = parents;\n this._name = name;\n this._id = id;\n}\n\nexport default function transition(name) {\n return selection().transition(name);\n}\n\nexport function newId() {\n return ++id;\n}\n\nvar selection_prototype = selection.prototype;\n\nTransition.prototype = transition.prototype = {\n constructor: Transition,\n select: transition_select,\n selectAll: transition_selectAll,\n selectChild: selection_prototype.selectChild,\n selectChildren: selection_prototype.selectChildren,\n filter: transition_filter,\n merge: transition_merge,\n selection: transition_selection,\n transition: transition_transition,\n call: selection_prototype.call,\n nodes: selection_prototype.nodes,\n node: selection_prototype.node,\n size: selection_prototype.size,\n empty: selection_prototype.empty,\n each: selection_prototype.each,\n on: transition_on,\n attr: transition_attr,\n attrTween: transition_attrTween,\n style: transition_style,\n styleTween: transition_styleTween,\n text: transition_text,\n textTween: transition_textTween,\n remove: transition_remove,\n tween: transition_tween,\n delay: transition_delay,\n duration: transition_duration,\n ease: transition_ease,\n easeVarying: transition_easeVarying,\n end: transition_end,\n [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};\n", "export function cubicIn(t) {\n return t * t * t;\n}\n\nexport function cubicOut(t) {\n return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n", "import {Transition, newId} from \"../transition/index.js\";\nimport schedule from \"../transition/schedule.js\";\nimport {easeCubicInOut} from \"d3-ease\";\nimport {now} from \"d3-timer\";\n\nvar defaultTiming = {\n time: null, // Set on use.\n delay: 0,\n duration: 250,\n ease: easeCubicInOut\n};\n\nfunction inherit(node, id) {\n var timing;\n while (!(timing = node.__transition) || !(timing = timing[id])) {\n if (!(node = node.parentNode)) {\n throw new Error(`transition ${id} not found`);\n }\n }\n return timing;\n}\n\nexport default function(name) {\n var id,\n timing;\n\n if (name instanceof Transition) {\n id = name._id, name = name._name;\n } else {\n id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n }\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n schedule(node, name, id, i, group, timing || inherit(node, id));\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id);\n}\n", "import {selection} from \"d3-selection\";\nimport selection_interrupt from \"./interrupt.js\";\nimport selection_transition from \"./transition.js\";\n\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;\n", "var EOL = {},\n EOF = {},\n QUOTE = 34,\n NEWLINE = 10,\n RETURN = 13;\n\nfunction objectConverter(columns) {\n return new Function(\"d\", \"return {\" + columns.map(function(name, i) {\n return JSON.stringify(name) + \": d[\" + i + \"] || \\\"\\\"\";\n }).join(\",\") + \"}\");\n}\n\nfunction customConverter(columns, f) {\n var object = objectConverter(columns);\n return function(row, i) {\n return f(object(row), i, columns);\n };\n}\n\n// Compute unique columns in order of discovery.\nfunction inferColumns(rows) {\n var columnSet = Object.create(null),\n columns = [];\n\n rows.forEach(function(row) {\n for (var column in row) {\n if (!(column in columnSet)) {\n columns.push(columnSet[column] = column);\n }\n }\n });\n\n return columns;\n}\n\nfunction pad(value, width) {\n var s = value + \"\", length = s.length;\n return length < width ? new Array(width - length + 1).join(0) + s : s;\n}\n\nfunction formatYear(year) {\n return year < 0 ? \"-\" + pad(-year, 6)\n : year > 9999 ? \"+\" + pad(year, 6)\n : pad(year, 4);\n}\n\nfunction formatDate(date) {\n var hours = date.getUTCHours(),\n minutes = date.getUTCMinutes(),\n seconds = date.getUTCSeconds(),\n milliseconds = date.getUTCMilliseconds();\n return isNaN(date) ? \"Invalid Date\"\n : formatYear(date.getUTCFullYear(), 4) + \"-\" + pad(date.getUTCMonth() + 1, 2) + \"-\" + pad(date.getUTCDate(), 2)\n + (milliseconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \".\" + pad(milliseconds, 3) + \"Z\"\n : seconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \"Z\"\n : minutes || hours ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \"Z\"\n : \"\");\n}\n\nexport default function(delimiter) {\n var reFormat = new RegExp(\"[\\\"\" + delimiter + \"\\n\\r]\"),\n DELIMITER = delimiter.charCodeAt(0);\n\n function parse(text, f) {\n var convert, columns, rows = parseRows(text, function(row, i) {\n if (convert) return convert(row, i - 1);\n columns = row, convert = f ? customConverter(row, f) : objectConverter(row);\n });\n rows.columns = columns || [];\n return rows;\n }\n\n function parseRows(text, f) {\n var rows = [], // output rows\n N = text.length,\n I = 0, // current character index\n n = 0, // current line number\n t, // current token\n eof = N <= 0, // current token followed by EOF?\n eol = false; // current token followed by EOL?\n\n // Strip the trailing newline.\n if (text.charCodeAt(N - 1) === NEWLINE) --N;\n if (text.charCodeAt(N - 1) === RETURN) --N;\n\n function token() {\n if (eof) return EOF;\n if (eol) return eol = false, EOL;\n\n // Unescape quotes.\n var i, j = I, c;\n if (text.charCodeAt(j) === QUOTE) {\n while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE);\n if ((i = I) >= N) eof = true;\n else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n return text.slice(j + 1, i - 1).replace(/\"\"/g, \"\\\"\");\n }\n\n // Find next delimiter or newline.\n while (I < N) {\n if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n else if (c !== DELIMITER) continue;\n return text.slice(j, i);\n }\n\n // Return last token before EOF.\n return eof = true, text.slice(j, N);\n }\n\n while ((t = token()) !== EOF) {\n var row = [];\n while (t !== EOL && t !== EOF) row.push(t), t = token();\n if (f && (row = f(row, n++)) == null) continue;\n rows.push(row);\n }\n\n return rows;\n }\n\n function preformatBody(rows, columns) {\n return rows.map(function(row) {\n return columns.map(function(column) {\n return formatValue(row[column]);\n }).join(delimiter);\n });\n }\n\n function format(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join(\"\\n\");\n }\n\n function formatBody(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return preformatBody(rows, columns).join(\"\\n\");\n }\n\n function formatRows(rows) {\n return rows.map(formatRow).join(\"\\n\");\n }\n\n function formatRow(row) {\n return row.map(formatValue).join(delimiter);\n }\n\n function formatValue(value) {\n return value == null ? \"\"\n : value instanceof Date ? formatDate(value)\n : reFormat.test(value += \"\") ? \"\\\"\" + value.replace(/\"/g, \"\\\"\\\"\") + \"\\\"\"\n : value;\n }\n\n return {\n parse: parse,\n parseRows: parseRows,\n format: format,\n formatBody: formatBody,\n formatRows: formatRows,\n formatRow: formatRow,\n formatValue: formatValue\n };\n}\n", "import Highcharts from 'highcharts/highcharts.src';\nimport more from 'highcharts/highcharts-more.src'\n\nmore(Highcharts);\n\nwindow.Highcharts = Highcharts;\nHighcharts.theme = {\n colors: [\"#B34C3C\", \"#2b908f\", \"#90ee7e\", \"#f45b5b\", \"#7798BF\", \"#aaeeee\", \"#ff0066\", \"#eeaaee\",\n \"#55BF3B\", \"#DF5353\", \"#7798BF\", \"#aaeeee\"],\n chart: {\n backgroundColor: '#1d1f21',\n plotBorderColor: '#606063'\n },\n title: {\n style: {\n color: '#c5c8c6',\n fontSize: '20px'\n }\n },\n xAxis: {\n gridLineColor: '#707073',\n labels: {\n style: {\n color: '#c5c8c6'\n }\n },\n lineColor: '#707073',\n minorGridLineColor: '#505053',\n tickColor: '#707073',\n title: {\n style: {\n color: '#c5c8c6'\n\n }\n }\n },\n yAxis: {\n gridLineColor: '#707073',\n labels: {\n style: {\n color: '#c5c8c6'\n }\n },\n lineColor: '#707073',\n minorGridLineColor: '#505053',\n tickColor: '#707073',\n tickWidth: 1,\n title: {\n style: {\n color: '#A0A0A3'\n }\n }\n },\n tooltip: {\n backgroundColor: 'rgba(0, 0, 0, 0.85)',\n style: {\n color: '#c5c8c6'\n },\n pointFormat: '\\u25CF {series.name}: {point.y:,.2f}
'\n },\n plotOptions: {\n series: {\n dataLabels: {\n color: '#B0B0B3'\n },\n marker: {\n lineColor: '#333'\n }\n },\n boxplot: {\n fillColor: '#505053'\n },\n candlestick: {\n lineColor: 'white'\n },\n errorbar: {\n color: 'white'\n }\n },\n legend: {\n itemStyle: {\n color: '#E0E0E3'\n },\n itemHoverStyle: {\n color: '#FFF'\n },\n itemHiddenStyle: {\n color: '#606063'\n }\n },\n credits: {\n style: {\n color: '#666'\n }\n },\n labels: {\n style: {\n color: '#707073'\n }\n },\n\n drilldown: {\n activeAxisLabelStyle: {\n color: '#F0F0F3'\n },\n activeDataLabelStyle: {\n color: '#F0F0F3'\n }\n },\n\n navigation: {\n buttonOptions: {\n symbolStroke: '#DDDDDD',\n theme: {\n fill: '#505053'\n }\n }\n },\n\n // scroll charts\n rangeSelector: {\n buttonTheme: {\n fill: '#505053',\n stroke: '#000000',\n style: {\n color: '#CCC'\n },\n states: {\n hover: {\n fill: '#707073',\n stroke: '#000000',\n style: {\n color: 'white'\n }\n },\n select: {\n fill: '#000003',\n stroke: '#000000',\n style: {\n color: 'white'\n }\n }\n }\n },\n inputBoxBorderColor: '#505053',\n inputStyle: {\n backgroundColor: '#333',\n color: 'silver'\n },\n labelStyle: {\n color: 'silver'\n }\n },\n\n navigator: {\n handles: {\n backgroundColor: '#666',\n borderColor: '#AAA'\n },\n outlineColor: '#CCC',\n maskFill: 'rgba(255,255,255,0.1)',\n series: {\n color: '#7798BF',\n lineColor: '#A6C7ED'\n },\n xAxis: {\n gridLineColor: '#505053'\n }\n },\n\n scrollbar: {\n barBackgroundColor: '#808083',\n barBorderColor: '#808083',\n buttonArrowColor: '#CCC',\n buttonBackgroundColor: '#606063',\n buttonBorderColor: '#606063',\n rifleColor: '#FFF',\n trackBackgroundColor: '#404043',\n trackBorderColor: '#404043'\n },\n\n // special colors for some of the\n legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',\n background2: '#505053',\n dataLabelsColor: '#B0B0B3',\n textColor: '#C0C0C0',\n contrastTextColor: '#F0F0F3',\n maskColor: 'rgba(255,255,255,0.3)'\n};\n\n// Apply the theme\nHighcharts.setOptions(Highcharts.theme);\n", "let array8 = arrayUntyped,\n array16 = arrayUntyped,\n array32 = arrayUntyped,\n arrayLengthen = arrayLengthenUntyped,\n arrayWiden = arrayWidenUntyped;\nif (typeof Uint8Array !== \"undefined\") {\n array8 = function(n) { return new Uint8Array(n); };\n array16 = function(n) { return new Uint16Array(n); };\n array32 = function(n) { return new Uint32Array(n); };\n\n arrayLengthen = function(array, length) {\n if (array.length >= length) return array;\n var copy = new array.constructor(length);\n copy.set(array);\n return copy;\n };\n\n arrayWiden = function(array, width) {\n var copy;\n switch (width) {\n case 16: copy = array16(array.length); break;\n case 32: copy = array32(array.length); break;\n default: throw new Error(\"invalid array width!\");\n }\n copy.set(array);\n return copy;\n };\n}\n\nfunction arrayUntyped(n) {\n var array = new Array(n), i = -1;\n while (++i < n) array[i] = 0;\n return array;\n}\n\nfunction arrayLengthenUntyped(array, length) {\n var n = array.length;\n while (n < length) array[n++] = 0;\n return array;\n}\n\nfunction arrayWidenUntyped(array, width) {\n if (width > 32) throw new Error(\"invalid array width!\");\n return array;\n}\n\n// An arbitrarily-wide array of bitmasks\nfunction bitarray(n) {\n this.length = n;\n this.subarrays = 1;\n this.width = 8;\n this.masks = {\n 0: 0\n }\n\n this[0] = array8(n);\n}\n\nbitarray.prototype.lengthen = function(n) {\n var i, len;\n for (i = 0, len = this.subarrays; i < len; ++i) {\n this[i] = arrayLengthen(this[i], n);\n }\n this.length = n;\n};\n\n// Reserve a new bit index in the array, returns {offset, one}\nbitarray.prototype.add = function() {\n var m, w, one, i, len;\n\n for (i = 0, len = this.subarrays; i < len; ++i) {\n m = this.masks[i];\n w = this.width - (32 * i);\n // isolate the rightmost zero bit and return it as an unsigned int of 32 bits, if NaN or -1, return a 0 \n one = (~m & (m + 1)) >>> 0;\n\n if (w >= 32 && !one) {\n continue;\n }\n\n if (w < 32 && (one & (1 << w))) {\n // widen this subarray\n this[i] = arrayWiden(this[i], w <<= 1);\n this.width = 32 * i + w;\n }\n\n this.masks[i] |= one;\n\n return {\n offset: i,\n one: one\n };\n }\n\n // add a new subarray\n this[this.subarrays] = array8(this.length);\n this.masks[this.subarrays] = 1;\n this.width += 8;\n return {\n offset: this.subarrays++,\n one: 1\n };\n};\n\n// Copy record from index src to index dest\nbitarray.prototype.copy = function(dest, src) {\n var i, len;\n for (i = 0, len = this.subarrays; i < len; ++i) {\n this[i][dest] = this[i][src];\n }\n};\n\n// Truncate the array to the given length\nbitarray.prototype.truncate = function(n) {\n var i, len;\n for (i = 0, len = this.subarrays; i < len; ++i) {\n for (var j = this.length - 1; j >= n; j--) {\n this[i][j] = 0;\n }\n }\n this.length = n;\n};\n\n// Checks that all bits for the given index are 0\nbitarray.prototype.zero = function(n) {\n var i, len;\n for (i = 0, len = this.subarrays; i < len; ++i) {\n if (this[i][n]) {\n return false;\n }\n }\n return true;\n};\n\n// Checks that all bits for the given index are 0 except for possibly one\nbitarray.prototype.zeroExcept = function(n, offset, zero) {\n var i, len;\n for (i = 0, len = this.subarrays; i < len; ++i) {\n if (i === offset ? this[i][n] & zero : this[i][n]) {\n return false;\n }\n }\n return true;\n};\n\n// Checks that all bits for the given index are 0 except for the specified mask.\n// The mask should be an array of the same size as the filter subarrays width.\nbitarray.prototype.zeroExceptMask = function(n, mask) {\n var i, len;\n for (i = 0, len = this.subarrays; i < len; ++i) {\n if (this[i][n] & mask[i]) {\n return false;\n }\n }\n return true;\n}\n\n// Checks that only the specified bit is set for the given index\nbitarray.prototype.only = function(n, offset, one) {\n var i, len;\n for (i = 0, len = this.subarrays; i < len; ++i) {\n if (this[i][n] != (i === offset ? one : 0)) {\n return false;\n }\n }\n return true;\n};\n\n// Checks that only the specified bit is set for the given index except for possibly one other\nbitarray.prototype.onlyExcept = function(n, offset, zero, onlyOffset, onlyOne) {\n var mask;\n var i, len;\n for (i = 0, len = this.subarrays; i < len; ++i) {\n mask = this[i][n];\n if (i === offset)\n mask = (mask & zero) >>> 0;\n if (mask != (i === onlyOffset ? onlyOne : 0)) {\n return false;\n }\n }\n return true;\n};\n\nexport default {\n array8: arrayUntyped,\n array16: arrayUntyped,\n array32: arrayUntyped,\n arrayLengthen: arrayLengthenUntyped,\n arrayWiden: arrayWidenUntyped,\n bitarray: bitarray\n};\n", "const filterExact = (bisect, value) => {\n return function(values) {\n var n = values.length;\n return [bisect.left(values, value, 0, n), bisect.right(values, value, 0, n)];\n };\n}\n\nconst filterRange = (bisect, range) => {\n var min = range[0],\n max = range[1];\n return function(values) {\n var n = values.length;\n return [bisect.left(values, min, 0, n), bisect.left(values, max, 0, n)];\n };\n}\n\nconst filterAll = values => {\n return [0, values.length];\n}\n\nexport default {\n filterExact,\n filterRange,\n filterAll\n};\n", "export default d => {\n return d;\n};\n", "export default () => {\n return null;\n}\n", "export default () => {\n return 0;\n}\n", "import identity from './identity';\n\nfunction heap_by(f) {\n\n // Builds a binary heap within the specified array a[lo:hi]. The heap has the\n // property such that the parent a[lo+i] is always less than or equal to its\n // two children: a[lo+2*i+1] and a[lo+2*i+2].\n function heap(a, lo, hi) {\n var n = hi - lo,\n i = (n >>> 1) + 1;\n while (--i > 0) sift(a, i, n, lo);\n return a;\n }\n\n // Sorts the specified array a[lo:hi] in descending order, assuming it is\n // already a heap.\n function sort(a, lo, hi) {\n var n = hi - lo,\n t;\n while (--n > 0) t = a[lo], a[lo] = a[lo + n], a[lo + n] = t, sift(a, 1, n, lo);\n return a;\n }\n\n // Sifts the element a[lo+i-1] down the heap, where the heap is the contiguous\n // slice of array a[lo:lo+n]. This method can also be used to update the heap\n // incrementally, without incurring the full cost of reconstructing the heap.\n function sift(a, i, n, lo) {\n var d = a[--lo + i],\n x = f(d),\n child;\n while ((child = i << 1) <= n) {\n if (child < n && f(a[lo + child]) > f(a[lo + child + 1])) child++;\n if (x <= f(a[lo + child])) break;\n a[lo + i] = a[lo + child];\n i = child;\n }\n a[lo + i] = d;\n }\n\n heap.sort = sort;\n return heap;\n}\n\nconst h = heap_by(identity);\nh.by = heap_by;\n\nexport default h;\n", "import identity from './identity';\nimport xFilterHeap from './heap';\n\nfunction heapselect_by(f) {\n var heap = xFilterHeap.by(f);\n\n // Returns a new array containing the top k elements in the array a[lo:hi].\n // The returned array is not sorted, but maintains the heap property. If k is\n // greater than hi - lo, then fewer than k elements will be returned. The\n // order of elements in a is unchanged by this operation.\n function heapselect(a, lo, hi, k) {\n var queue = new Array(k = Math.min(hi - lo, k)),\n min,\n i,\n d;\n\n for (i = 0; i < k; ++i) queue[i] = a[lo++];\n heap(queue, 0, k);\n\n if (lo < hi) {\n min = f(queue[0]);\n do {\n if (f(d = a[lo]) > min) {\n queue[0] = d;\n min = f(heap(queue, 0, k)[0]);\n }\n } while (++lo < hi);\n }\n\n return queue;\n }\n\n return heapselect;\n}\n\n\nconst h = heapselect_by(identity);\nh.by = heapselect_by; // assign the raw function to the export as well\n\nexport default h;\n", "import identity from './identity';\n\nfunction bisect_by(f) {\n\n // Locate the insertion point for x in a to maintain sorted order. The\n // arguments lo and hi may be used to specify a subset of the array which\n // should be considered; by default the entire array is used. If x is already\n // present in a, the insertion point will be before (to the left of) any\n // existing entries. The return value is suitable for use as the first\n // argument to `array.splice` assuming that a is already sorted.\n //\n // The returned insertion point i partitions the array a into two halves so\n // that all v < x for v in a[lo:i] for the left side and all v >= x for v in\n // a[i:hi] for the right side.\n function bisectLeft(a, x, lo, hi) {\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (f(a[mid]) < x) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n }\n\n // Similar to bisectLeft, but returns an insertion point which comes after (to\n // the right of) any existing entries of x in a.\n //\n // The returned insertion point i partitions the array into two halves so that\n // all v <= x for v in a[lo:i] for the left side and all v > x for v in\n // a[i:hi] for the right side.\n function bisectRight(a, x, lo, hi) {\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (x < f(a[mid])) hi = mid;\n else lo = mid + 1;\n }\n return lo;\n }\n\n bisectRight.right = bisectRight;\n bisectRight.left = bisectLeft;\n return bisectRight;\n}\n\nconst bisect = bisect_by(identity);\nbisect.by = bisect_by; // assign the raw function to the export as well\n\nexport default bisect;\n\n", "export default (array, index, deep) => {\n for (var i = 0, n = index.length, copy = deep ? JSON.parse(JSON.stringify(array)) : new Array(n); i < n; ++i) {\n copy[i] = array[index[i]];\n }\n return copy;\n}\n", "const reduceIncrement = p => {\n return p + 1;\n}\n\nconst reduceDecrement = p => {\n return p - 1;\n}\n\nconst reduceAdd = f => {\n return function(p, v) {\n return p + +f(v);\n };\n}\n\nconst reduceSubtract = f => {\n return function(p, v) {\n return p - f(v);\n };\n}\n\nexport default {\n reduceIncrement,\n reduceDecrement,\n reduceAdd,\n reduceSubtract\n};\n", "export default (action, obj, keys, id, key) => {\n keys = keys.split(\".\");\n id = keys.splice(-1, 1);\n for (key in keys) obj = obj[keys[key]] = obj[keys[key]] || {};\n return action(obj, id);\n}\n", "import deep from \"@ranfdev/deepobj\"\n// Note(cg): result was previsouly using lodash.result, not ESM compatible.\n \nconst get = (obj, prop) => {\n const value = obj[prop];\n return (typeof value === 'function') ? value.call(obj) : value;\n}\n\n/**\n * get value of object at a deep path.\n * if the resolved value is a function,\n * it's invoked with the `this` binding of \n * its parent object and its result is returned. \n * \n * @param {Object} obj the object (e.g. { 'a': [{ 'b': { 'c1': 3, 'c2': 4} }], 'd': {e:1} }; )\n * @param {String} path deep path (e.g. `d.e`` or `a[0].b.c1`. Dot notation (a.0.b)is also supported)\n * @return {Any} the resolved value\n */\nconst reg = /\\[([\\w\\d]+)\\]/g;\nexport default (obj, path) => {\n return deep(get, obj, path.replace(reg, '.$1'))\n}\n", "import xfilterArray from './array';\nimport xfilterFilter from './filter';\nimport cr_identity from './identity';\nimport cr_null from './null';\nimport cr_zero from './zero';\nimport xfilterHeapselect from './heapselect';\nimport xfilterHeap from './heap';\nimport bisect from './bisect';\nimport permute from './permute';\nimport xfilterReduce from './reduce';\nimport result from './result';\n\n// constants\nvar REMOVED_INDEX = -1;\n\ncrossfilter.heap = xfilterHeap;\ncrossfilter.heapselect = xfilterHeapselect;\ncrossfilter.bisect = bisect;\ncrossfilter.permute = permute;\nexport default crossfilter;\n\nfunction crossfilter() {\n var crossfilter = {\n add: add,\n remove: removeData,\n dimension: dimension,\n groupAll: groupAll,\n size: size,\n all: all,\n allFiltered: allFiltered,\n onChange: onChange,\n isElementFiltered: isElementFiltered\n };\n\n var data = [], // the records\n n = 0, // the number of records; data.length\n filters, // 1 is filtered out\n filterListeners = [], // when the filters change\n dataListeners = [], // when data is added\n removeDataListeners = [], // when data is removed\n callbacks = [];\n\n filters = new xfilterArray.bitarray(0);\n\n // Adds the specified new records to this crossfilter.\n function add(newData) {\n var n0 = n,\n n1 = newData.length;\n\n // If there's actually new data to add\u2026\n // Merge the new data into the existing data.\n // Lengthen the filter bitset to handle the new records.\n // Notify listeners (dimensions and groups) that new data is available.\n if (n1) {\n data = data.concat(newData);\n filters.lengthen(n += n1);\n dataListeners.forEach(function(l) { l(newData, n0, n1); });\n triggerOnChange('dataAdded');\n }\n\n return crossfilter;\n }\n\n // Removes all records that match the current filters, or if a predicate function is passed,\n // removes all records matching the predicate (ignoring filters).\n function removeData(predicate) {\n var // Mapping from old record indexes to new indexes (after records removed)\n newIndex = new Array(n),\n removed = [],\n usePred = typeof predicate === 'function',\n shouldRemove = function (i) {\n return usePred ? predicate(data[i], i) : filters.zero(i)\n };\n\n for (var index1 = 0, index2 = 0; index1 < n; ++index1) {\n if ( shouldRemove(index1) ) {\n removed.push(index1);\n newIndex[index1] = REMOVED_INDEX;\n } else {\n newIndex[index1] = index2++;\n }\n }\n\n // Remove all matching records from groups.\n filterListeners.forEach(function(l) { l(-1, -1, [], removed, true); });\n\n // Update indexes.\n removeDataListeners.forEach(function(l) { l(newIndex); });\n\n // Remove old filters and data by overwriting.\n for (var index3 = 0, index4 = 0; index3 < n; ++index3) {\n if ( newIndex[index3] !== REMOVED_INDEX ) {\n if (index3 !== index4) filters.copy(index4, index3), data[index4] = data[index3];\n ++index4;\n }\n }\n\n data.length = n = index4;\n filters.truncate(index4);\n triggerOnChange('dataRemoved');\n }\n\n function maskForDimensions(dimensions) {\n var n,\n d,\n len,\n id,\n mask = Array(filters.subarrays);\n for (n = 0; n < filters.subarrays; n++) { mask[n] = ~0; }\n for (d = 0, len = dimensions.length; d < len; d++) {\n // The top bits of the ID are the subarray offset and the lower bits are the bit\n // offset of the \"one\" mask.\n id = dimensions[d].id();\n mask[id >> 7] &= ~(0x1 << (id & 0x3f));\n }\n return mask;\n }\n\n // Return true if the data element at index i is filtered IN.\n // Optionally, ignore the filters of any dimensions in the ignore_dimensions list.\n function isElementFiltered(i, ignore_dimensions) {\n var mask = maskForDimensions(ignore_dimensions || []);\n return filters.zeroExceptMask(i,mask);\n }\n\n // Adds a new dimension with the specified value accessor function.\n function dimension(value, iterable) {\n\n if (typeof value === 'string') {\n var accessorPath = value;\n value = function(d) { return result(d, accessorPath); };\n }\n\n var dimension = {\n filter: filter,\n filterExact: filterExact,\n filterRange: filterRange,\n filterFunction: filterFunction,\n filterAll: filterAll,\n currentFilter: currentFilter,\n hasCurrentFilter: hasCurrentFilter,\n top: top,\n bottom: bottom,\n group: group,\n groupAll: groupAll,\n dispose: dispose,\n remove: dispose, // for backwards-compatibility\n accessor: value,\n id: function() { return id; }\n };\n\n var one, // lowest unset bit as mask, e.g., 00001000\n zero, // inverted one, e.g., 11110111\n offset, // offset into the filters arrays\n id, // unique ID for this dimension (reused when dimensions are disposed)\n values, // sorted, cached array\n index, // maps sorted value index -> record index (in data)\n newValues, // temporary array storing newly-added values\n newIndex, // temporary array storing newly-added index\n iterablesIndexCount,\n iterablesIndexFilterStatus,\n iterablesEmptyRows = [],\n sortRange = function(n) {\n return cr_range(n).sort(function(A, B) {\n var a = newValues[A], b = newValues[B];\n return a < b ? -1 : a > b ? 1 : A - B;\n });\n },\n refilter = xfilterFilter.filterAll, // for recomputing filter\n refilterFunction, // the custom filter function in use\n filterValue, // the value used for filtering (value, array, function or undefined)\n filterValuePresent, // true if filterValue contains something\n indexListeners = [], // when data is added\n dimensionGroups = [],\n lo0 = 0,\n hi0 = 0,\n t = 0,\n k;\n\n // Updating a dimension is a two-stage process. First, we must update the\n // associated filters for the newly-added records. Once all dimensions have\n // updated their filters, the groups are notified to update.\n dataListeners.unshift(preAdd);\n dataListeners.push(postAdd);\n\n removeDataListeners.push(removeData);\n\n // Add a new dimension in the filter bitmap and store the offset and bitmask.\n var tmp = filters.add();\n offset = tmp.offset;\n one = tmp.one;\n zero = ~one;\n\n // Create a unique ID for the dimension\n // IDs will be re-used if dimensions are disposed.\n // For internal use the ID is the subarray offset shifted left 7 bits or'd with the\n // bit offset of the set bit in the dimension's \"one\" mask.\n id = (offset << 7) | (Math.log(one) / Math.log(2));\n\n preAdd(data, 0, n);\n postAdd(data, 0, n);\n\n // Incorporates the specified new records into this dimension.\n // This function is responsible for updating filters, values, and index.\n function preAdd(newData, n0, n1) {\n var newIterablesIndexCount,\n newIterablesIndexFilterStatus;\n\n if (iterable){\n // Count all the values\n t = 0;\n j = 0;\n k = [];\n\n for (var i0 = 0; i0 < newData.length; i0++) {\n for(j = 0, k = value(newData[i0]); j < k.length; j++) {\n t++;\n }\n }\n\n newValues = [];\n newIterablesIndexCount = cr_range(newData.length);\n newIterablesIndexFilterStatus = cr_index(t,1);\n var unsortedIndex = cr_range(t);\n\n for (var l = 0, index1 = 0; index1 < newData.length; index1++) {\n k = value(newData[index1])\n //\n if(!k.length){\n newIterablesIndexCount[index1] = 0;\n iterablesEmptyRows.push(index1 + n0);\n continue;\n }\n newIterablesIndexCount[index1] = k.length\n for (j = 0; j < k.length; j++) {\n newValues.push(k[j]);\n unsortedIndex[l] = index1;\n l++;\n }\n }\n\n // Create the Sort map used to sort both the values and the valueToData indices\n var sortMap = sortRange(t);\n\n // Use the sortMap to sort the newValues\n newValues = permute(newValues, sortMap);\n\n\n // Use the sortMap to sort the unsortedIndex map\n // newIndex should be a map of sortedValue -> crossfilterData\n newIndex = permute(unsortedIndex, sortMap)\n\n } else{\n // Permute new values into natural order using a standard sorted index.\n newValues = newData.map(value);\n newIndex = sortRange(n1);\n newValues = permute(newValues, newIndex);\n }\n\n // Bisect newValues to determine which new records are selected.\n var bounds = refilter(newValues), lo1 = bounds[0], hi1 = bounds[1];\n\n var index2, index3, index4;\n if(iterable) {\n n1 = t;\n if (refilterFunction) {\n for (index2 = 0; index2 < n1; ++index2) {\n if (!refilterFunction(newValues[index2], index2)) {\n if(--newIterablesIndexCount[newIndex[index2]] === 0) {\n filters[offset][newIndex[index2] + n0] |= one;\n }\n newIterablesIndexFilterStatus[index2] = 1;\n }\n }\n } else {\n for (index3 = 0; index3 < lo1; ++index3) {\n if(--newIterablesIndexCount[newIndex[index3]] === 0) {\n filters[offset][newIndex[index3] + n0] |= one;\n }\n newIterablesIndexFilterStatus[index3] = 1;\n }\n for (index4 = hi1; index4 < n1; ++index4) {\n if(--newIterablesIndexCount[newIndex[index4]] === 0) {\n filters[offset][newIndex[index4] + n0] |= one;\n }\n newIterablesIndexFilterStatus[index4] = 1;\n }\n }\n } else {\n if (refilterFunction) {\n for (index2 = 0; index2 < n1; ++index2) {\n if (!refilterFunction(newValues[index2], index2)) {\n filters[offset][newIndex[index2] + n0] |= one;\n }\n }\n } else {\n for (index3 = 0; index3 < lo1; ++index3) {\n filters[offset][newIndex[index3] + n0] |= one;\n }\n for (index4 = hi1; index4 < n1; ++index4) {\n filters[offset][newIndex[index4] + n0] |= one;\n }\n }\n }\n\n // If this dimension previously had no data, then we don't need to do the\n // more expensive merge operation; use the new values and index as-is.\n if (!n0) {\n values = newValues;\n index = newIndex;\n iterablesIndexCount = newIterablesIndexCount;\n iterablesIndexFilterStatus = newIterablesIndexFilterStatus;\n lo0 = lo1;\n hi0 = hi1;\n return;\n }\n\n\n\n var oldValues = values,\n oldIndex = index,\n oldIterablesIndexFilterStatus = iterablesIndexFilterStatus,\n old_n0,\n i1 = 0;\n\n i0 = 0;\n\n if(iterable){\n old_n0 = n0\n n0 = oldValues.length;\n n1 = t\n }\n\n // Otherwise, create new arrays into which to merge new and old.\n values = iterable ? new Array(n0 + n1) : new Array(n);\n index = iterable ? new Array(n0 + n1) : cr_index(n, n);\n if(iterable) iterablesIndexFilterStatus = cr_index(n0 + n1, 1);\n\n // Concatenate the newIterablesIndexCount onto the old one.\n if(iterable) {\n var oldiiclength = iterablesIndexCount.length;\n iterablesIndexCount = xfilterArray.arrayLengthen(iterablesIndexCount, n);\n for(var j=0; j+oldiiclength < n; j++) {\n iterablesIndexCount[j+oldiiclength] = newIterablesIndexCount[j];\n }\n }\n\n // Merge the old and new sorted values, and old and new index.\n var index5 = 0;\n for (; i0 < n0 && i1 < n1; ++index5) {\n if (oldValues[i0] < newValues[i1]) {\n values[index5] = oldValues[i0];\n if(iterable) iterablesIndexFilterStatus[index5] = oldIterablesIndexFilterStatus[i0];\n index[index5] = oldIndex[i0++];\n } else {\n values[index5] = newValues[i1];\n if(iterable) iterablesIndexFilterStatus[index5] = newIterablesIndexFilterStatus[i1];\n index[index5] = newIndex[i1++] + (iterable ? old_n0 : n0);\n }\n }\n\n // Add any remaining old values.\n for (; i0 < n0; ++i0, ++index5) {\n values[index5] = oldValues[i0];\n if(iterable) iterablesIndexFilterStatus[index5] = oldIterablesIndexFilterStatus[i0];\n index[index5] = oldIndex[i0];\n }\n\n // Add any remaining new values.\n for (; i1 < n1; ++i1, ++index5) {\n values[index5] = newValues[i1];\n if(iterable) iterablesIndexFilterStatus[index5] = newIterablesIndexFilterStatus[i1];\n index[index5] = newIndex[i1] + (iterable ? old_n0 : n0);\n }\n\n // Bisect again to recompute lo0 and hi0.\n bounds = refilter(values), lo0 = bounds[0], hi0 = bounds[1];\n }\n\n // When all filters have updated, notify index listeners of the new values.\n function postAdd(newData, n0, n1) {\n indexListeners.forEach(function(l) { l(newValues, newIndex, n0, n1); });\n newValues = newIndex = null;\n }\n\n function removeData(reIndex) {\n if (iterable) {\n for (var i0 = 0, i1 = 0; i0 < iterablesEmptyRows.length; i0++) {\n if (reIndex[iterablesEmptyRows[i0]] !== REMOVED_INDEX) {\n iterablesEmptyRows[i1] = reIndex[iterablesEmptyRows[i0]];\n i1++;\n }\n }\n iterablesEmptyRows.length = i1;\n for (i0 = 0, i1 = 0; i0 < n; i0++) {\n if (reIndex[i0] !== REMOVED_INDEX) {\n if (i1 !== i0) iterablesIndexCount[i1] = iterablesIndexCount[i0];\n i1++;\n }\n }\n iterablesIndexCount = iterablesIndexCount.slice(0, i1);\n }\n // Rewrite our index, overwriting removed values\n var n0 = values.length;\n for (var i = 0, j = 0, oldDataIndex; i < n0; ++i) {\n oldDataIndex = index[i];\n if (reIndex[oldDataIndex] !== REMOVED_INDEX) {\n if (i !== j) values[j] = values[i];\n index[j] = reIndex[oldDataIndex];\n if (iterable) {\n iterablesIndexFilterStatus[j] = iterablesIndexFilterStatus[i];\n }\n ++j;\n }\n }\n values.length = j;\n if (iterable) iterablesIndexFilterStatus = iterablesIndexFilterStatus.slice(0, j);\n while (j < n0) index[j++] = 0;\n\n // Bisect again to recompute lo0 and hi0.\n var bounds = refilter(values);\n lo0 = bounds[0], hi0 = bounds[1];\n }\n\n // Updates the selected values based on the specified bounds [lo, hi].\n // This implementation is used by all the public filter methods.\n function filterIndexBounds(bounds) {\n\n var lo1 = bounds[0],\n hi1 = bounds[1];\n\n if (refilterFunction) {\n refilterFunction = null;\n filterIndexFunction(function(d, i) { return lo1 <= i && i < hi1; }, bounds[0] === 0 && bounds[1] === values.length);\n lo0 = lo1;\n hi0 = hi1;\n return dimension;\n }\n\n var i,\n j,\n k,\n added = [],\n removed = [],\n valueIndexAdded = [],\n valueIndexRemoved = [];\n\n\n // Fast incremental update based on previous lo index.\n if (lo1 < lo0) {\n for (i = lo1, j = Math.min(lo0, hi1); i < j; ++i) {\n added.push(index[i]);\n valueIndexAdded.push(i);\n }\n } else if (lo1 > lo0) {\n for (i = lo0, j = Math.min(lo1, hi0); i < j; ++i) {\n removed.push(index[i]);\n valueIndexRemoved.push(i);\n }\n }\n\n // Fast incremental update based on previous hi index.\n if (hi1 > hi0) {\n for (i = Math.max(lo1, hi0), j = hi1; i < j; ++i) {\n added.push(index[i]);\n valueIndexAdded.push(i);\n }\n } else if (hi1 < hi0) {\n for (i = Math.max(lo0, hi1), j = hi0; i < j; ++i) {\n removed.push(index[i]);\n valueIndexRemoved.push(i);\n }\n }\n\n if(!iterable) {\n // Flip filters normally.\n\n for(i=0; i 0) toSkip = top_offset;\n\n while (--i >= lo0 && k > 0) {\n if (filters.zero(j = index[i])) {\n if(toSkip > 0) {\n //skip matching row\n --toSkip;\n } else {\n array.push(data[j]);\n --k;\n }\n }\n }\n\n if(iterable){\n for(i = 0; i < iterablesEmptyRows.length && k > 0; i++) {\n // Add row with empty iterable column at the end\n if(filters.zero(j = iterablesEmptyRows[i])) {\n if(toSkip > 0) {\n //skip matching row\n --toSkip;\n } else {\n array.push(data[j]);\n --k;\n }\n }\n }\n }\n\n return array;\n }\n\n // Returns the bottom K selected records based on this dimension's order.\n // Note: observes this dimension's filter, unlike group and groupAll.\n function bottom(k, bottom_offset) {\n var array = [],\n i,\n j,\n toSkip = 0;\n\n if(bottom_offset && bottom_offset > 0) toSkip = bottom_offset;\n\n if(iterable) {\n // Add row with empty iterable column at the top\n for(i = 0; i < iterablesEmptyRows.length && k > 0; i++) {\n if(filters.zero(j = iterablesEmptyRows[i])) {\n if(toSkip > 0) {\n //skip matching row\n --toSkip;\n } else {\n array.push(data[j]);\n --k;\n }\n }\n }\n }\n\n i = lo0;\n\n while (i < hi0 && k > 0) {\n if (filters.zero(j = index[i])) {\n if(toSkip > 0) {\n //skip matching row\n --toSkip;\n } else {\n array.push(data[j]);\n --k;\n }\n }\n i++;\n }\n\n return array;\n }\n\n // Adds a new group to this dimension, using the specified key function.\n function group(key) {\n var group = {\n top: top,\n all: all,\n reduce: reduce,\n reduceCount: reduceCount,\n reduceSum: reduceSum,\n order: order,\n orderNatural: orderNatural,\n size: size,\n dispose: dispose,\n remove: dispose // for backwards-compatibility\n };\n\n // Ensure that this group will be removed when the dimension is removed.\n dimensionGroups.push(group);\n\n var groups, // array of {key, value}\n groupIndex, // object id \u21A6 group id\n groupWidth = 8,\n groupCapacity = capacity(groupWidth),\n k = 0, // cardinality\n select,\n heap,\n reduceAdd,\n reduceRemove,\n reduceInitial,\n update = cr_null,\n reset = cr_null,\n resetNeeded = true,\n groupAll = key === cr_null,\n n0old;\n\n if (arguments.length < 1) key = cr_identity;\n\n // The group listens to the crossfilter for when any dimension changes, so\n // that it can update the associated reduce values. It must also listen to\n // the parent dimension for when data is added, and compute new keys.\n filterListeners.push(update);\n indexListeners.push(add);\n removeDataListeners.push(removeData);\n\n // Incorporate any existing data into the grouping.\n add(values, index, 0, n);\n\n // Incorporates the specified new values into this group.\n // This function is responsible for updating groups and groupIndex.\n function add(newValues, newIndex, n0, n1) {\n\n if(iterable) {\n n0old = n0\n n0 = values.length - newValues.length\n n1 = newValues.length;\n }\n\n var oldGroups = groups,\n reIndex = iterable ? [] : cr_index(k, groupCapacity),\n add = reduceAdd,\n remove = reduceRemove,\n initial = reduceInitial,\n k0 = k, // old cardinality\n i0 = 0, // index of old group\n i1 = 0, // index of new record\n j, // object id\n g0, // old group\n x0, // old key\n x1, // new key\n g, // group to add\n x; // key of group to add\n\n // If a reset is needed, we don't need to update the reduce values.\n if (resetNeeded) add = initial = cr_null;\n if (resetNeeded) remove = initial = cr_null;\n\n // Reset the new groups (k is a lower bound).\n // Also, make sure that groupIndex exists and is long enough.\n groups = new Array(k), k = 0;\n if(iterable){\n groupIndex = k0 ? groupIndex : [];\n }\n else{\n groupIndex = k0 > 1 ? xfilterArray.arrayLengthen(groupIndex, n) : cr_index(n, groupCapacity);\n }\n\n\n // Get the first old key (x0 of g0), if it exists.\n if (k0) x0 = (g0 = oldGroups[0]).key;\n\n // Find the first new key (x1), skipping NaN keys.\n while (i1 < n1 && !((x1 = key(newValues[i1])) >= x1)) ++i1;\n\n // While new keys remain\u2026\n while (i1 < n1) {\n\n // Determine the lesser of the two current keys; new and old.\n // If there are no old keys remaining, then always add the new key.\n if (g0 && x0 <= x1) {\n g = g0, x = x0;\n\n // Record the new index of the old group.\n reIndex[i0] = k;\n\n // Retrieve the next old key.\n g0 = oldGroups[++i0];\n if (g0) x0 = g0.key;\n } else {\n g = {key: x1, value: initial()}, x = x1;\n }\n\n // Add the lesser group.\n groups[k] = g;\n\n // Add any selected records belonging to the added group, while\n // advancing the new key and populating the associated group index.\n\n while (x1 <= x) {\n j = newIndex[i1] + (iterable ? n0old : n0)\n\n\n if(iterable){\n if(groupIndex[j]){\n groupIndex[j].push(k)\n }\n else{\n groupIndex[j] = [k]\n }\n }\n else{\n groupIndex[j] = k;\n }\n\n // Always add new values to groups. Only remove when not in filter.\n // This gives groups full information on data life-cycle.\n g.value = add(g.value, data[j], true);\n if (!filters.zeroExcept(j, offset, zero)) g.value = remove(g.value, data[j], false);\n if (++i1 >= n1) break;\n x1 = key(newValues[i1]);\n }\n\n groupIncrement();\n }\n\n // Add any remaining old groups that were greater th1an all new keys.\n // No incremental reduce is needed; these groups have no new records.\n // Also record the new index of the old group.\n while (i0 < k0) {\n groups[reIndex[i0] = k] = oldGroups[i0++];\n groupIncrement();\n }\n\n\n // Fill in gaps with empty arrays where there may have been rows with empty iterables\n if(iterable){\n for (var index1 = 0; index1 < n; index1++) {\n if(!groupIndex[index1]){\n groupIndex[index1] = [];\n }\n }\n }\n\n // If we added any new groups before any old groups,\n // update the group index of all the old records.\n if(k > i0){\n if(iterable){\n for (i0 = 0; i0 < n0old; ++i0) {\n for (index1 = 0; index1 < groupIndex[i0].length; index1++) {\n groupIndex[i0][index1] = reIndex[groupIndex[i0][index1]];\n }\n }\n }\n else{\n for (i0 = 0; i0 < n0; ++i0) {\n groupIndex[i0] = reIndex[groupIndex[i0]];\n }\n }\n }\n\n // Modify the update and reset behavior based on the cardinality.\n // If the cardinality is less than or equal to one, then the groupIndex\n // is not needed. If the cardinality is zero, then there are no records\n // and therefore no groups to update or reset. Note that we also must\n // change the registered listener to point to the new method.\n j = filterListeners.indexOf(update);\n if (k > 1 || iterable) {\n update = updateMany;\n reset = resetMany;\n } else {\n if (!k && groupAll) {\n k = 1;\n groups = [{key: null, value: initial()}];\n }\n if (k === 1) {\n update = updateOne;\n reset = resetOne;\n } else {\n update = cr_null;\n reset = cr_null;\n }\n groupIndex = null;\n }\n filterListeners[j] = update;\n\n // Count the number of added groups,\n // and widen the group index as needed.\n function groupIncrement() {\n if(iterable){\n k++\n return\n }\n if (++k === groupCapacity) {\n reIndex = xfilterArray.arrayWiden(reIndex, groupWidth <<= 1);\n groupIndex = xfilterArray.arrayWiden(groupIndex, groupWidth);\n groupCapacity = capacity(groupWidth);\n }\n }\n }\n\n function removeData(reIndex) {\n if (k > 1 || iterable) {\n var oldK = k,\n oldGroups = groups,\n seenGroups = cr_index(oldK, oldK),\n i,\n i0,\n j;\n\n // Filter out non-matches by copying matching group index entries to\n // the beginning of the array.\n if (!iterable) {\n for (i = 0, j = 0; i < n; ++i) {\n if (reIndex[i] !== REMOVED_INDEX) {\n seenGroups[groupIndex[j] = groupIndex[i]] = 1;\n ++j;\n }\n }\n } else {\n for (i = 0, j = 0; i < n; ++i) {\n if (reIndex[i] !== REMOVED_INDEX) {\n groupIndex[j] = groupIndex[i];\n for (i0 = 0; i0 < groupIndex[j].length; i0++) {\n seenGroups[groupIndex[j][i0]] = 1;\n }\n ++j;\n }\n }\n groupIndex = groupIndex.slice(0, j);\n }\n\n // Reassemble groups including only those groups that were referred\n // to by matching group index entries. Note the new group index in\n // seenGroups.\n groups = [], k = 0;\n for (i = 0; i < oldK; ++i) {\n if (seenGroups[i]) {\n seenGroups[i] = k++;\n groups.push(oldGroups[i]);\n }\n }\n\n if (k > 1 || iterable) {\n // Reindex the group index using seenGroups to find the new index.\n if (!iterable) {\n for (i = 0; i < j; ++i) groupIndex[i] = seenGroups[groupIndex[i]];\n } else {\n for (i = 0; i < j; ++i) {\n for (i0 = 0; i0 < groupIndex[i].length; ++i0) {\n groupIndex[i][i0] = seenGroups[groupIndex[i][i0]];\n }\n }\n }\n } else {\n groupIndex = null;\n }\n filterListeners[filterListeners.indexOf(update)] = k > 1 || iterable\n ? (reset = resetMany, update = updateMany)\n : k === 1 ? (reset = resetOne, update = updateOne)\n : reset = update = cr_null;\n } else if (k === 1) {\n if (groupAll) return;\n for (var index3 = 0; index3 < n; ++index3) if (reIndex[index3] !== REMOVED_INDEX) return;\n groups = [], k = 0;\n filterListeners[filterListeners.indexOf(update)] =\n update = reset = cr_null;\n }\n }\n\n // Reduces the specified selected or deselected records.\n // This function is only used when the cardinality is greater than 1.\n // notFilter indicates a crossfilter.add/remove operation.\n function updateMany(filterOne, filterOffset, added, removed, notFilter) {\n\n if ((filterOne === one && filterOffset === offset) || resetNeeded) return;\n\n var i,\n j,\n k,\n n,\n g;\n\n if(iterable){\n // Add the added values.\n for (i = 0, n = added.length; i < n; ++i) {\n if (filters.zeroExcept(k = added[i], offset, zero)) {\n for (j = 0; j < groupIndex[k].length; j++) {\n g = groups[groupIndex[k][j]];\n g.value = reduceAdd(g.value, data[k], false, j);\n }\n }\n }\n\n // Remove the removed values.\n for (i = 0, n = removed.length; i < n; ++i) {\n if (filters.onlyExcept(k = removed[i], offset, zero, filterOffset, filterOne)) {\n for (j = 0; j < groupIndex[k].length; j++) {\n g = groups[groupIndex[k][j]];\n g.value = reduceRemove(g.value, data[k], notFilter, j);\n }\n }\n }\n return;\n }\n\n // Add the added values.\n for (i = 0, n = added.length; i < n; ++i) {\n if (filters.zeroExcept(k = added[i], offset, zero)) {\n g = groups[groupIndex[k]];\n g.value = reduceAdd(g.value, data[k], false);\n }\n }\n\n // Remove the removed values.\n for (i = 0, n = removed.length; i < n; ++i) {\n if (filters.onlyExcept(k = removed[i], offset, zero, filterOffset, filterOne)) {\n g = groups[groupIndex[k]];\n g.value = reduceRemove(g.value, data[k], notFilter);\n }\n }\n }\n\n // Reduces the specified selected or deselected records.\n // This function is only used when the cardinality is 1.\n // notFilter indicates a crossfilter.add/remove operation.\n function updateOne(filterOne, filterOffset, added, removed, notFilter) {\n if ((filterOne === one && filterOffset === offset) || resetNeeded) return;\n\n var i,\n k,\n n,\n g = groups[0];\n\n // Add the added values.\n for (i = 0, n = added.length; i < n; ++i) {\n if (filters.zeroExcept(k = added[i], offset, zero)) {\n g.value = reduceAdd(g.value, data[k], false);\n }\n }\n\n // Remove the removed values.\n for (i = 0, n = removed.length; i < n; ++i) {\n if (filters.onlyExcept(k = removed[i], offset, zero, filterOffset, filterOne)) {\n g.value = reduceRemove(g.value, data[k], notFilter);\n }\n }\n }\n\n // Recomputes the group reduce values from scratch.\n // This function is only used when the cardinality is greater than 1.\n function resetMany() {\n var i,\n j,\n g;\n\n // Reset all group values.\n for (i = 0; i < k; ++i) {\n groups[i].value = reduceInitial();\n }\n\n // We add all records and then remove filtered records so that reducers\n // can build an 'unfiltered' view even if there are already filters in\n // place on other dimensions.\n if(iterable){\n for (i = 0; i < n; ++i) {\n for (j = 0; j < groupIndex[i].length; j++) {\n g = groups[groupIndex[i][j]];\n g.value = reduceAdd(g.value, data[i], true, j);\n }\n }\n for (i = 0; i < n; ++i) {\n if (!filters.zeroExcept(i, offset, zero)) {\n for (j = 0; j < groupIndex[i].length; j++) {\n g = groups[groupIndex[i][j]];\n g.value = reduceRemove(g.value, data[i], false, j);\n }\n }\n }\n return;\n }\n\n for (i = 0; i < n; ++i) {\n g = groups[groupIndex[i]];\n g.value = reduceAdd(g.value, data[i], true);\n }\n for (i = 0; i < n; ++i) {\n if (!filters.zeroExcept(i, offset, zero)) {\n g = groups[groupIndex[i]];\n g.value = reduceRemove(g.value, data[i], false);\n }\n }\n }\n\n // Recomputes the group reduce values from scratch.\n // This function is only used when the cardinality is 1.\n function resetOne() {\n var i,\n g = groups[0];\n\n // Reset the singleton group values.\n g.value = reduceInitial();\n\n // We add all records and then remove filtered records so that reducers\n // can build an 'unfiltered' view even if there are already filters in\n // place on other dimensions.\n for (i = 0; i < n; ++i) {\n g.value = reduceAdd(g.value, data[i], true);\n }\n\n for (i = 0; i < n; ++i) {\n if (!filters.zeroExcept(i, offset, zero)) {\n g.value = reduceRemove(g.value, data[i], false);\n }\n }\n }\n\n // Returns the array of group values, in the dimension's natural order.\n function all() {\n if (resetNeeded) reset(), resetNeeded = false;\n return groups;\n }\n\n // Returns a new array containing the top K group values, in reduce order.\n function top(k) {\n var top = select(all(), 0, groups.length, k);\n return heap.sort(top, 0, top.length);\n }\n\n // Sets the reduce behavior for this group to use the specified functions.\n // This method lazily recomputes the reduce values, waiting until needed.\n function reduce(add, remove, initial) {\n reduceAdd = add;\n reduceRemove = remove;\n reduceInitial = initial;\n resetNeeded = true;\n return group;\n }\n\n // A convenience method for reducing by count.\n function reduceCount() {\n return reduce(xfilterReduce.reduceIncrement, xfilterReduce.reduceDecrement, cr_zero);\n }\n\n // A convenience method for reducing by sum(value).\n function reduceSum(value) {\n return reduce(xfilterReduce.reduceAdd(value), xfilterReduce.reduceSubtract(value), cr_zero);\n }\n\n // Sets the reduce order, using the specified accessor.\n function order(value) {\n select = xfilterHeapselect.by(valueOf);\n heap = xfilterHeap.by(valueOf);\n function valueOf(d) { return value(d.value); }\n return group;\n }\n\n // A convenience method for natural ordering by reduce value.\n function orderNatural() {\n return order(cr_identity);\n }\n\n // Returns the cardinality of this group, irrespective of any filters.\n function size() {\n return k;\n }\n\n // Removes this group and associated event listeners.\n function dispose() {\n var i = filterListeners.indexOf(update);\n if (i >= 0) filterListeners.splice(i, 1);\n i = indexListeners.indexOf(add);\n if (i >= 0) indexListeners.splice(i, 1);\n i = removeDataListeners.indexOf(removeData);\n if (i >= 0) removeDataListeners.splice(i, 1);\n i = dimensionGroups.indexOf(group);\n if (i >= 0) dimensionGroups.splice(i, 1);\n return group;\n }\n\n return reduceCount().orderNatural();\n }\n\n // A convenience function for generating a singleton group.\n function groupAll() {\n var g = group(cr_null), all = g.all;\n delete g.all;\n delete g.top;\n delete g.order;\n delete g.orderNatural;\n delete g.size;\n g.value = function() { return all()[0].value; };\n return g;\n }\n\n // Removes this dimension and associated groups and event listeners.\n function dispose() {\n dimensionGroups.forEach(function(group) { group.dispose(); });\n var i = dataListeners.indexOf(preAdd);\n if (i >= 0) dataListeners.splice(i, 1);\n i = dataListeners.indexOf(postAdd);\n if (i >= 0) dataListeners.splice(i, 1);\n i = removeDataListeners.indexOf(removeData);\n if (i >= 0) removeDataListeners.splice(i, 1);\n filters.masks[offset] &= zero;\n return filterAll();\n }\n\n return dimension;\n }\n\n // A convenience method for groupAll on a dummy dimension.\n // This implementation can be optimized since it always has cardinality 1.\n function groupAll() {\n var group = {\n reduce: reduce,\n reduceCount: reduceCount,\n reduceSum: reduceSum,\n value: value,\n dispose: dispose,\n remove: dispose // for backwards-compatibility\n };\n\n var reduceValue,\n reduceAdd,\n reduceRemove,\n reduceInitial,\n resetNeeded = true;\n\n // The group listens to the crossfilter for when any dimension changes, so\n // that it can update the reduce value. It must also listen to the parent\n // dimension for when data is added.\n filterListeners.push(update);\n dataListeners.push(add);\n\n // For consistency; actually a no-op since resetNeeded is true.\n add(data, 0, n);\n\n // Incorporates the specified new values into this group.\n function add(newData, n0) {\n var i;\n\n if (resetNeeded) return;\n\n // Cycle through all the values.\n for (i = n0; i < n; ++i) {\n\n // Add all values all the time.\n reduceValue = reduceAdd(reduceValue, data[i], true);\n\n // Remove the value if filtered.\n if (!filters.zero(i)) {\n reduceValue = reduceRemove(reduceValue, data[i], false);\n }\n }\n }\n\n // Reduces the specified selected or deselected records.\n function update(filterOne, filterOffset, added, removed, notFilter) {\n var i,\n k,\n n;\n\n if (resetNeeded) return;\n\n // Add the added values.\n for (i = 0, n = added.length; i < n; ++i) {\n if (filters.zero(k = added[i])) {\n reduceValue = reduceAdd(reduceValue, data[k], notFilter);\n }\n }\n\n // Remove the removed values.\n for (i = 0, n = removed.length; i < n; ++i) {\n if (filters.only(k = removed[i], filterOffset, filterOne)) {\n reduceValue = reduceRemove(reduceValue, data[k], notFilter);\n }\n }\n }\n\n // Recomputes the group reduce value from scratch.\n function reset() {\n var i;\n\n reduceValue = reduceInitial();\n\n // Cycle through all the values.\n for (i = 0; i < n; ++i) {\n\n // Add all values all the time.\n reduceValue = reduceAdd(reduceValue, data[i], true);\n\n // Remove the value if it is filtered.\n if (!filters.zero(i)) {\n reduceValue = reduceRemove(reduceValue, data[i], false);\n }\n }\n }\n\n // Sets the reduce behavior for this group to use the specified functions.\n // This method lazily recomputes the reduce value, waiting until needed.\n function reduce(add, remove, initial) {\n reduceAdd = add;\n reduceRemove = remove;\n reduceInitial = initial;\n resetNeeded = true;\n return group;\n }\n\n // A convenience method for reducing by count.\n function reduceCount() {\n return reduce(xfilterReduce.reduceIncrement, xfilterReduce.reduceDecrement, cr_zero);\n }\n\n // A convenience method for reducing by sum(value).\n function reduceSum(value) {\n return reduce(xfilterReduce.reduceAdd(value), xfilterReduce.reduceSubtract(value), cr_zero);\n }\n\n // Returns the computed reduce value.\n function value() {\n if (resetNeeded) reset(), resetNeeded = false;\n return reduceValue;\n }\n\n // Removes this group and associated event listeners.\n function dispose() {\n var i = filterListeners.indexOf(update);\n if (i >= 0) filterListeners.splice(i, 1);\n i = dataListeners.indexOf(add);\n if (i >= 0) dataListeners.splice(i, 1);\n return group;\n }\n\n return reduceCount();\n }\n\n // Returns the number of records in this crossfilter, irrespective of any filters.\n function size() {\n return n;\n }\n\n // Returns the raw row data contained in this crossfilter\n function all(){\n return data;\n }\n\n // Returns row data with all dimension filters applied, except for filters in ignore_dimensions\n function allFiltered(ignore_dimensions) {\n var array = [],\n i = 0,\n mask = maskForDimensions(ignore_dimensions || []);\n\n for (i = 0; i < n; i++) {\n if (filters.zeroExceptMask(i, mask)) {\n array.push(data[i]);\n }\n }\n\n return array;\n }\n\n function onChange(cb){\n if(typeof cb !== 'function'){\n /* eslint no-console: 0 */\n console.warn('onChange callback parameter must be a function!');\n return;\n }\n callbacks.push(cb);\n return function(){\n callbacks.splice(callbacks.indexOf(cb), 1);\n };\n }\n\n function triggerOnChange(eventName){\n for (var i = 0; i < callbacks.length; i++) {\n callbacks[i](eventName);\n }\n }\n\n return arguments.length\n ? add(arguments[0])\n : crossfilter;\n}\n\n// Returns an array of size n, big enough to store ids up to m.\nfunction cr_index(n, m) {\n return (m < 0x101\n ? xfilterArray.array8 : m < 0x10001\n ? xfilterArray.array16\n : xfilterArray.array32)(n);\n}\n\n// Constructs a new array of size n, with sequential values from 0 to n - 1.\nfunction cr_range(n) {\n var range = cr_index(n, n);\n for (var i = -1; ++i < n;) range[i] = i;\n return range;\n}\n\nfunction capacity(w) {\n return w === 8\n ? 0x100 : w === 16\n ? 0x10000\n : 0x100000000;\n}\n", "export default function ascending(a, b) {\n return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "import crossfilter from 'crossfilter2';\nimport { ascending } from 'd3-array'; \n\nlet cf = crossfilter();\n\ncf.addData = function(data) {\n cf.data = data;\n window.data = data;\n\n data.sort((a,b) => ascending(a.DisciplineOrder, b.DisciplineOrder));\n\n cf.add(data);\n};\nexport default cf;\n", "function reduceId() {\n return {\n reduceAdd(p) {\n return p\n },\n reduceRemove(p) {\n return p\n },\n reduceInitial(p = {}) {\n return p || {}\n },\n }\n}\n\nexport const Reducer = {\n empty: reduceId(),\n concat: concatReducer,\n concatAll: (...reducers) => {\n return reducers.reduce((p, v) => concatReducer(p, v), reduceId())\n },\n reduceGroup,\n}\n\nfunction concatReducer(reducerA, reducerB) {\n return {\n reduceAdd(p, v) {\n p = reducerA.reduceAdd(p, v)\n return reducerB.reduceAdd(p, v)\n },\n reduceRemove(p, v) {\n p = reducerA.reduceRemove(p, v)\n return reducerB.reduceRemove(p, v)\n },\n reduceInitial(p) {\n p = reducerA.reduceInitial(p)\n return reducerB.reduceInitial(p)\n },\n }\n}\n\nfunction reduceGroup(reducer, group) {\n return group.reduce(\n reducer.reduceAdd,\n reducer.reduceRemove,\n reducer.reduceInitial\n )\n}\n", "export function average(count = 'count', sum = 'sum', key = 'avg') {\n return {\n reduceAdd(p) {\n p[key] = p[count] === 0 ? 0 : p[sum] / p[count]\n return p\n },\n reduceRemove(p) {\n p[key] = p[count] === 0 ? 0 : p[sum] / p[count]\n return p\n },\n reduceInitial(p = {}) {\n p[key] = 0\n return p\n },\n }\n}\n", "function bisect_by(f) {\n function bisectLeft(a, x, lo, hi) {\n while (lo < hi) {\n var mid = (lo + hi) >>> 1\n if (f(a[mid]) < x) lo = mid + 1\n else hi = mid\n }\n return lo\n }\n\n function bisectRight(a, x, lo, hi) {\n while (lo < hi) {\n var mid = (lo + hi) >>> 1\n if (x < f(a[mid])) hi = mid\n else lo = mid + 1\n }\n return lo\n }\n\n bisectRight.right = bisectRight\n bisectRight.left = bisectLeft\n return bisectRight\n}\n\nexport const bisect = bisect_by(x => x)\nbisect.by = bisect_by\n", "import { bisect } from './bisect.js'\n\nexport function valueList(valueAccessor, key = 'valueList') {\n return {\n reduceAdd(p, v) {\n const value = valueAccessor(v)\n const idx = bisect.left(p[key], value, 0, p[key].length)\n p[key].splice(idx, 0, value)\n return p\n },\n reduceRemove(p, v) {\n const value = valueAccessor(v)\n const idx = bisect.left(p[key], value, 0, p[key].length)\n p[key].splice(idx, 1)\n return p\n },\n reduceInitial(p = {}) {\n p[key] = []\n return p\n },\n }\n}\n", "import { Reducer } from '../index.js'\nimport { valueList } from './value-list.js'\n\nconst last = l => l[l.length - 1]\n\nexport function max(valueAccessor, key = 'max') {\n const valuelist = key + '_valuelist'\n const valueListReducer = valueList(valueAccessor, valuelist)\n const maxReducer = {\n reduceAdd(p) {\n p[key] = last(p[valuelist])\n return p\n },\n reduceRemove(p) {\n if (p[valuelist].length === 0) {\n p[key] = undefined\n return p\n }\n p[key] = last(p[valuelist])\n return p\n },\n reduceInitial(p = {}) {\n p[key] = 0\n return p\n },\n }\n return Reducer.concat(valueListReducer, maxReducer)\n}\n", "import { Reducer } from '../index.js'\nimport { valueList } from './value-list.js'\n\nexport function min(valueAccessor, key = 'min') {\n const valuelist = key + '_valuelist'\n const valueListReducer = valueList(valueAccessor, valuelist)\n const minReducer = {\n reduceAdd(p) {\n p[key] = p[valuelist][0]\n return p\n },\n reduceRemove(p) {\n if (p[valuelist].length === 0) {\n p[key] = undefined\n return p\n }\n p[key] = p[valuelist][0]\n return p\n },\n reduceInitial(p = {}) {\n p[key] = 0\n return p\n },\n }\n return Reducer.concat(valueListReducer, minReducer)\n}\n", "export function sum(valueAccessor, key = 'sum') {\n return {\n reduceAdd(p, v) {\n p[key] += valueAccessor(v)\n return p\n },\n reduceRemove(p, v) {\n p[key] -= valueAccessor(v)\n return p\n },\n reduceInitial(p = {}) {\n p[key] = 0\n return p\n },\n }\n}\n", "import { Reducer } from \"redugator\";\nimport { sum, average } from \"redugator/reducers\";\n\nexport const averageScoreReducer = Reducer.concatAll(sum(x => +x.Score), sum(_ => 1, 'count'), average())\n\nfunction getPercentile(a, p) {\n let idx = p * a.length;\n return a[Math.floor(idx)] ?? 0;\n}\n\nexport const quartiles = (valueList = 'valueList') => {\n function setQuartiles(p) {\n let l = p[valueList];\n p.min = l[0];\n p.q1 = getPercentile(l, 0.25);\n p.median = getPercentile(l, 0.50);\n p.q3 = getPercentile(l, 0.75);\n p.max = l[l.length - 1];\n }\n\n return {\n reduceAdd(p) {\n setQuartiles(p)\n return p\n },\n reduceRemove(p) {\n setQuartiles(p)\n return p\n },\n reduceInitial(p = {}) {\n p.min = 0;\n p.q1 = 0;\n p.median = 0;\n p.q3 = 0;\n p.max = 0;\n return p\n },\n }\n}\n", "import cf from './cf';\nimport { ascending } from 'd3-array';\n\nimport { Reducer } from 'redugator';\nimport { averageScoreReducer } from './reducers';\n\nexport default class PlayerGameChart {\n\n constructor() {\n this.dimension = cf.dimension(d => {\n let game = +d.Game;\n let disc = d.Discipline;\n let discOrder = +d.Disciplineorder * 10;\n\n if (d.Block2 === '-1') {\n game += 3;\n }\n\n return [disc + ': ' + game, discOrder + game, d.Gender];\n });\n this.group = Reducer.reduceGroup(averageScoreReducer, this.dimension.group());\n\n this.dimension2 = cf.dimension(d => {\n let game = +d.Game;\n let discOrder = +d.Disciplineorder * 10;\n\n if (d.Block2 === '-1') {\n game += 3;\n }\n\n return discOrder + game;\n });\n\n this.group2 = Reducer.reduceGroup(averageScoreReducer, this.dimension2.group());\n\n this.initialTotal = this.group2.all().reduce((p,v)=> p + v.value.sum, 0);\n }\n\n render() {\n let _all = this.group.all().sort((a,b)=> ascending(a.key[1], b.key[1]));\n let genders = new Map()\n let categories = new Set()\n\n for (let i = 0; i < _all.length; ++i) {\n let d = _all[i];\n let gender = d.key[2]\n if (!genders.has(gender)) genders.set(gender, []);\n genders.get(gender).push(d.value.avg);\n categories.add(d.key[0]);\n }\n\n this.genderCount = genders.size;\n if (!_all.length) return;\n this.chart = new Highcharts.Chart({\n chart: {\n renderTo: document.getElementById('playerGameChart'),\n type: 'line'\n },\n title: { text: 'Game Averages' },\n xAxis: {\n categories: Array.from(categories),\n title: { text: null },\n },\n yAxis: {\n min: 0,\n title: { text: 'Average' },\n labels: { overflow: 'justify' }\n },\n series: Array.from(genders.keys()).map((gender, i) => ({\n name: gender + ' Average',\n data: genders.get(gender),\n color: Highcharts.theme.colors[i+1]\n }))\n });\n }\n\n redraw() {\n if (!this.chart) return this.render();\n\n let _all = this.group2.all();\n\n let data = []; \n let total = 0;\n\n for (let i = 0; i < _all.length; ++i) {\n let d = _all[i];\n data.push(d.value.avg);\n total += d.value.sum;\n }\n\n const lastIdx = this.chart.series.length - 1;\n const lastSeries = this.chart.series[lastIdx];\n\n\n if (total === this.initialTotal && lastSeries.name === 'Filter Average') {\n lastSeries.remove(true);\n return;\n }\n\n if (lastSeries.name === 'Filter Average') {\n lastSeries.setData(data);\n } else {\n this.chart.addSeries({\n name: 'Filter Average',\n data: data,\n color: Highcharts.theme.colors[0]\n });\n }\n }\n}\n", "import { Reducer } from \"redugator\";\nimport { averageScoreReducer } from \"./reducers\";\n\nexport default function scoreReducer(group) {\n const g = Reducer.reduceGroup(averageScoreReducer, group);\n return {\n all: () => g.all().filter(d => d.value.sum !== 0)\n };\n}\n\n", "import cf from 'crossfilter2';\n\nconst bisectDescending = cf.bisect.by(x => -x.value.avg).right;\n\n// single pass filter and sort descending by average\nexport default function avgAll(all) {\n let result = []\n for (let i = 0; i < all.length; ++i) {\n let x = all[i];\n if (x.value.avg !== 0) {\n const idx = bisectDescending(result, -x.value.avg, 0, result.length);\n result.splice(idx, 0, x);\n }\n }\n return result;\n}\n", "let _charts = [];\n\nexport default {\n register(c) {\n _charts.push(c);\n },\n\n deregister(c) {\n let idx = _charts.indexOf(c);\n if (~idx) _charts.splice(idx, 1);\n },\n\n redrawAll() {\n _charts.forEach(c => c.redraw());\n },\n\n renderAll() {\n _charts.forEach(c => c.render());\n },\n\n list() {\n return _charts.slice();\n }\n};\n", "import avgAll from './avgAll';\nimport cr from './chart_registry.js';\n\nexport default class AverageChart {\n constructor() {\n this.filters = [];\n }\n\n hasFilter(key){\n if (!arguments.length) {\n return !!this.filters.length;\n }\n return !!~this.filters.indexOf(key);\n }\n\n filter(key) {\n if (this.hasFilter(key)) {\n this.filters.splice(this.filters.indexOf(key), 1);\n } else {\n this.filters.push(key);\n }\n if (this.filters.length === 0) {\n this.dimension.filter(null);\n } else if (this.filters.length === 1) {\n this.dimension.filterExact(this.filters[0]);\n } else {\n this.dimension.filterFunction(d => {\n for (let i = 0; i < this.filters.length; ++i) {\n let filter = this.filters[i];\n if (filter <= d && filter >= d) {\n return true;\n }\n }\n return false;\n });\n }\n }\n\n data() {\n return avgAll(this.group.all());\n }\n\n render() {\n let _all = this.data();\n if (!_all.length) return;\n\n let _this = this;\n this.chart = new Highcharts.chart({\n chart: {\n type: this.options.type || 'bar',\n renderTo: this.options.renderTo,\n height: this.options.height\n },\n plotOptions: {\n series: {\n cursor: 'pointer',\n point: {\n events: {\n click() {\n _this.filter(this.category);\n cr.redrawAll();\n }\n }\n }\n }\n },\n title: {\n text: this.options.title\n },\n xAxis: {\n categories: _all.map(d => d.key),\n title: {\n text: null\n }\n },\n yAxis: {\n min: 0,\n title: {\n text: 'Average'\n },\n labels: {\n overflow: 'justify'\n }\n },\n legend: {\n enabled: false\n },\n series: [{\n name: 'Average',\n data: _all.map(d => d.value.avg)\n }]\n });\n\n if (this.postRender) {\n this.postRender();\n }\n }\n\n redraw() {\n let shouldRedraw = !this._redraw;\n if (!this.chart) return this.render();\n let _all = this.data();\n let keys = []\n let values = []\n for (let i = 0; i < _all.length; ++i) {\n let d = _all[i];\n keys.push(d.key);\n values.push({\n y: d.value.avg,\n color: this.getColor(d)\n });\n }\n this.chart.xAxis[0].setCategories(keys, false);\n this.chart.series[0].setData(values, shouldRedraw);\n if (this._redraw) this._redraw(_all);\n if (this.postRedraw) this.postRedraw();\n }\n\n getColor(d) {\n return !this.hasFilter() ? undefined : (this.hasFilter(d.key) ? undefined : '#333333');\n }\n}\n", "import cf from './cf';\nimport scoreReducer from './scoreReducer';\n\nimport AverageChart from './average_chart';\n\nexport class AgeChart extends AverageChart {\n\n constructor() {\n super();\n this.dimension = cf.dimension(d => 'Age' in d ? +d.Age : 0);\n this.group = scoreReducer(this.dimension.group());\n\n this.options = {\n renderTo: document.getElementById('ageChart'),\n title: 'Age Averages'\n };\n }\n\n data() {\n return this.group.all()\n }\n\n}\n", "import cf from './cf';\nimport scoreReducer from './scoreReducer';\n\nimport AverageChart from './average_chart';\nimport avgAll from './avgAll';\n\nexport default class PlayerGameChart extends AverageChart {\n\n constructor() {\n super();\n this.dimension = cf.dimension(d => d.Playername);\n this.group = scoreReducer(this.dimension.group());\n\n let height = avgAll(this.group.all()).length * 19 + 182;\n this.options = {\n renderTo: document.getElementById('playerChart'),\n title: 'Athlete Averages',\n height: height\n };\n }\n\n _redraw(_all) {\n this.chart.setSize(this.chart.chartWidth, 19 * _all.length + (this.chart.marginBottom * 2));\n }\n}\n", "import cf from './cf';\nimport scoreReducer from './scoreReducer';\n\nimport AverageChart from './average_chart';\nimport avgAll from './avgAll';\n\nexport default class CountryChart extends AverageChart {\n constructor() {\n super();\n this.dimension = cf.dimension(d => d.Federation);\n this.group = scoreReducer(this.dimension.group());\n\n let height = avgAll(this.group.all()).length * 20;\n this.options = {\n renderTo: document.getElementById('countryChart'),\n title: 'Federation Averages',\n height: height\n };\n }\n\n}\n", "import cf from './cf';\nimport scoreReducer from './scoreReducer';\n\nimport AverageChart from './average_chart';\n\nexport default class DisciplineChart extends AverageChart {\n\n constructor() {\n super();\n this.dimension = cf.dimension(d => d.Discipline);\n this.group = scoreReducer(this.dimension.group());\n\n this.options = {\n renderTo: document.getElementById('disciplineChart'),\n title: 'Discipline Averages'\n };\n }\n\n}\n", "import cf from './cf';\nimport scoreReducer from './scoreReducer';\n\nimport AverageChart from './average_chart';\n\nexport default class GenderChart extends AverageChart {\n\n constructor() {\n super();\n this.dimension = cf.dimension(d => d.Gender);\n this.group = scoreReducer(this.dimension.group());\n\n const el = document.getElementById('genderChart');\n\n this.options = {\n renderTo: el,\n title: 'Gender Averages'\n };\n\n if (this.group.all().length < 2) el.parentNode.removeChild(el) \n }\n\n}\n", "import cf from './cf';\nimport scoreReducer from './scoreReducer';\n\nimport AverageChart from './average_chart';\n\nexport default class HandChart extends AverageChart {\n\n constructor() {\n super();\n this.dimension = cf.dimension(d => d.Hand);\n this.group = scoreReducer(this.dimension.group());\n\n this.options = {\n renderTo: document.getElementById('handChart'),\n title: 'Hand Averages'\n };\n }\n\n}\n", "export default function(x) {\n return Math.abs(x = Math.round(x)) >= 1e21\n ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, \u00B1Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n", "export default function(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n}\n", "export default function(numerals) {\n return function(value) {\n return value.replace(/[0-9]/g, function(i) {\n return numerals[+i];\n });\n };\n}\n", "// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + (this.trim ? \"~\" : \"\")\n + this.type;\n};\n", "// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n", "import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n \"%\": (x, p) => (x * 100).toFixed(p),\n \"b\": (x) => Math.round(x).toString(2),\n \"c\": (x) => x + \"\",\n \"d\": formatDecimal,\n \"e\": (x, p) => x.toExponential(p),\n \"f\": (x, p) => x.toFixed(p),\n \"g\": (x, p) => x.toPrecision(p),\n \"o\": (x) => Math.round(x).toString(8),\n \"p\": (x, p) => formatRounded(x * 100, p),\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n \"x\": (x) => Math.round(x).toString(16)\n};\n", "export default function(x) {\n return x;\n}\n", "import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\u00B5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"\u2212\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type;\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision === undefined ? 6\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i, n, c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = value < 0 || 1 / value < 0;\n\n // Perform the initial formatting.\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n // Trim insignificant zeros.\n if (trim) value = formatTrim(value);\n\n // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer \u201Cvalue\u201D part that can be\n // grouped, and fractional or exponential \u201Csuffix\u201D part that is not.\n if (maybeSuffix) {\n i = -1, n = value.length;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n default: value = padding + valuePrefix + value + valueSuffix; break;\n }\n\n return numerals(value);\n }\n\n format.toString = function() {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}\n", "import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n}\n", "import { Reducer } from 'redugator';\nimport cf from './cf';\nimport { format as d3_format } from 'd3-format';\nimport { select } from 'd3-selection';\nimport { interpolate } from 'd3-interpolate';\n\nconst format = d3_format(',.0f');\nconst universal_dim = cf.dimension(_ => 'all');\n\nexport default class NumberContainer {\n constructor({anchor, description, reducer, accessor}) {\n this.el = select(anchor);\n this.group = Reducer.reduceGroup(reducer, universal_dim.group());\n\n this.description = description;\n this.accessor = accessor;\n\n this._value = 0;\n }\n\n render() {\n if (!this.group.all()[0]) return;\n let _value = this.accessor(this.group.all()[0]);\n let _sel = this.el.selectAll('.number').data([_value]);\n\n _sel.enter()\n .append('span')\n .attr('class', 'number')\n .text(this._value);\n\n _sel.enter()\n .append('span')\n .attr('class', 'description')\n .text(this.description);\n\n _sel.exit().remove();\n\n this.el.selectAll('.number').transition().duration(375)\n .tween('text', d => {\n const i = interpolate(this._value, d);\n this._value = d;\n return function(t) {\n this.textContent = format(i(t));\n };\n });\n }\n\n redraw() {\n this.render();\n }\n}\n", "import cf from './cf';\n\nimport AverageChart from './average_chart';\nimport { Reducer } from 'redugator';\nimport { valueList } from 'redugator/reducers';\nimport { averageScoreReducer, quartiles } from './reducers';\n\nexport default class LanePairChart extends AverageChart {\n\n constructor() {\n super();\n this.dimension = cf.dimension(d => d.GameLanePair);\n const reducer = Reducer.concatAll(\n averageScoreReducer, \n valueList(x => +x.Score),\n quartiles()\n )\n\n this.group = Reducer.reduceGroup(reducer, this.dimension.group());\n\n this.sorter = arr => arr.sort((a, b) => parseInt(a.key, 10) - parseInt(b.key, 10));\n\n this.options = {\n type: 'boxplot',\n renderTo: document.getElementById('lanePairChart'),\n title: 'Lane Pair Averages',\n height: 300\n };\n }\n\n data() {\n let _all = this.group.all();\n\n this.sorter(_all);\n\n return _all;\n }\n\n postRender() {\n let _all = this.data();\n\n this.chart.series[0].remove();\n\n this.chart.addSeries({\n name: 'Lane Quartiles',\n color: Highcharts.theme.colors[0],\n data: _all.map(d => {\n return {\n category: d.key,\n low: d.value.min,\n q1: d.value.q1,\n median: d.value.median,\n q3: d.value.q3,\n high: d.value.max,\n color: this.getColor(d) || Highcharts.theme.colors[0]\n };\n }),\n colorByPoint: true\n });\n }\n\n postRedraw() {\n let _all = this.data();\n this.chart.series[0].setData(_all.map(d => {\n return {\n category: d.key,\n low: d.value.min,\n q1: d.value.q1,\n median: d.value.median,\n q3: d.value.q3,\n high: d.value.max,\n color: this.getColor(d) || Highcharts.theme.colors[0]\n };\n }), false);\n\n this.chart.render();\n }\n\n}\n", "import { select } from 'd3-selection';\nimport {ascending} from 'd3-array';\nimport {format as d3_format} from 'd3-format';\n\nimport cf from './cf';\n\nconst formatNumber = d3_format(',.2f');\n\nfunction reduceAdd(p,v) {\n let game = +v.Game;\n if (v.Block2 === '-1') {\n game += 3;\n }\n\n p['G' + game] = +v.Score;\n\n p.order = +v.Disciplineorder;\n\n p.Name = v.Playername;\n p.Discipline = v.Discipline;\n p.Gender = v.Gender;\n ++p.count;\n\n p.sum += +v.Score;\n p.Average = p.count ? p.sum / p.count : 0;\n\n return p;\n}\n\nfunction reduceRemove(p, v) {\n --p.count;\n\n p.sum -= +v.Score;\n p.Average = p.count ? p.sum / p.count : 0;\n\n return p;\n}\n\nfunction reduceInitial() {\n return {\n Name: '',\n Discipline: '',\n Gender: '',\n order: 0,\n G1: 0,\n G2: 0,\n G3: 0,\n G4: 0,\n G5: 0,\n G6: 0,\n count: 0,\n sum: 0,\n Average: 0\n };\n}\n\nconst headings = ['Name', 'Discipline', 'Gender', 'G1', 'G2', 'G3', 'G4', 'G5', 'G6', 'Average'];\n\nexport default class Table {\n constructor() {\n this.dimension = cf.dimension(d => [d.Playername, d.Discipline]);\n\n this.group = this.dimension.group().reduce(\n reduceAdd,\n reduceRemove,\n reduceInitial\n );\n\n this.el = select('#table > tbody');\n }\n\n render() {\n let data = this.group.all()\n .filter(d => d.value.sum !== 0)\n .map(d => d.value);\n\n let _sel = this.el\n .selectAll('tr').data(data, d => d.Name + d.Discipline);\n\n _sel.exit().remove();\n\n _sel.enter()\n .append('tr')\n .selectAll('td')\n .data(row => headings.map(k => row[k]))\n .enter()\n .append('td')\n .html((d,i) => headings[i] == 'Average' ? formatNumber(d) : d);\n\n _sel.sort((a,b)=> {\n const sorts = [ascending(a.order, b.order), ascending(a.Gender, b.Gender), descending(a.Average, b.Average)];\n for (let i = 0; i < sorts.length; ++i) {\n if (sorts[i] !== 0) return sorts[i];\n }\n return 0;\n });\n }\n\n redraw() {\n this.render();\n }\n}\n", "import 'd3-transition';\nimport { dsvFormat } from 'd3-dsv';\nimport './highcharts_theme';\nimport cf from './cf';\n\nimport GameAverageChart from './game_averages';\nimport { AgeChart } from './age_chart.js';\nimport PlayerChart from './player_chart';\nimport CountryChart from './country_chart';\nimport DisciplineChart from './discipline_chart';\nimport GenderChart from './gender_chart';\nimport HandChart from './hand_chart';\nimport NumberContainer from './number';\nimport LanePairChart from './lane_pair_chart';\nimport Table from './table';\nimport cr from './chart_registry';\nimport * as R from 'redugator/reducers';\nimport { averageScoreReducer } from './reducers';\n\nconst ssv = dsvFormat(';')\n\nfunction init(data){\n\n cf.addData(data);\n cr.register(new GameAverageChart());\n cr.register(new PlayerChart());\n cr.register(new CountryChart());\n cr.register(new DisciplineChart());\n cr.register(new GenderChart());\n cr.register(new HandChart());\n cr.register(new LanePairChart());\n cr.register(new AgeChart());\n cr.register(new Table());\n\n cr.register(new NumberContainer({\n anchor: '#lowGame',\n description: 'Low',\n reducer: R.min(x => +x.Score),\n accessor: d => d ? d.value.min : 0\n }));\n\n cr.register(new NumberContainer({\n anchor: '#highGame',\n description: 'High',\n reducer: R.max(x => +x.Score),\n accessor: d => d ? d.value.max : 0\n }));\n\n cr.register(new NumberContainer({\n anchor: '#avgGame',\n description: 'Average',\n reducer: averageScoreReducer,\n accessor: d => d ? d.value.avg : 0\n }));\n\n cr.register(new NumberContainer({\n anchor: '#totalScore',\n description: 'Total',\n reducer: R.sum(x => +x.Score),\n accessor: d => d ? d.value.sum : 0\n }));\n\n cr.renderAll();\n}\n\nfetch('playerstats.csv')\n .then(response => response.text())\n .then(ssv.parse)\n .then(init);\n\n"], "mappings": "6iBAAA,IAAAA,GAAAC,GAAA,CAAAC,GAAAC,KAAA,EAOC,SAAUC,EAAMC,EAAS,CAClB,OAAOF,IAAW,UAAYA,GAAO,SACrCE,EAAQ,QAAaA,EACrBF,GAAO,QAAUC,EAAK,SAClBC,EAAQD,CAAI,EACZC,GACG,OAAO,QAAW,YAAc,OAAO,IAC9C,OAAO,wBAAyB,UAAY,CACxC,OAAOA,EAAQD,CAAI,CACvB,CAAC,GAEGA,EAAK,YACLA,EAAK,WAAW,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W,CAClDP,EAAiBO,EAAWD,CAAU,CAC1C,CAAC,EACGA,EAAW,SACXJ,EAAQ,SAAWI,GAG3BL,EAAM,KAAKC,CAAO,CACtB,EACA,OAAC,EAAE,QAAQ,KAAKvT,EAAI,KAAK,WAAY,SAAU4T,EAAW,CAAE,OAAOP,EAAiBO,EAAWT,CAAK,CAAG,CAAC,EACjGA,CACX,EAqBAnB,EAAI,kBAAoB,CACpB,gBACA,mBACA,gBACA,gBACA,cACA,aACA,kBACA,YACA,eACA,gBACA,uBACA,gBACA,QACA,YACA,QACA,UACA,KACA,KACA,IACA,KACA,KACA,WACA,OACA,SACA,OACA,KACA,KACA,eACA,cACA,SACA,UACA,SACA,UACA,cACA,eACA,eACA,IACA,OACA,OACA,OACA,QACA,QACA,MACA,cACA,eACA,SACA,iBACA,eACA,QACA,cACA,SACA,UACA,UACA,SACA,WACA,aACA,cACA,aACA,aACA,QACA,OACA,SACA,QACA,IACA,KACA,KACA,aACA,IACA,KACA,KACA,QACJ,EAgBAA,EAAI,kBAAoB,CACpB,WACA,UACA,UACA,IACA,MACA,KACA,GACJ,EAeAA,EAAI,YAAc,CACd,IACA,OACA,IACA,KACA,SACA,UACA,SACA,WACA,OACA,KACA,OACA,MACA,KACA,KACA,KACA,sBACA,UACA,UACA,UACA,UACA,iBACA,WACA,UACA,cACA,SACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,MACA,KACA,iBACA,SACA,KACA,IACA,OACA,UACA,MACA,OACA,QACA,OACA,OACA,SACA,QACA,MACA,MACA,MACA,QACA,OACA,WACA,QACA,QACA,QACA,QACA,KACA,KACA,KACA,IACA,KACA,OACJ,EACAA,EAAI,UAAYF,EA4BhBE,EAAI,oBAAsB,GACnBA,CACX,EAAE,EA8BF,OAAOA,CACX,CAAC,EACD1S,EAAgBD,EAAU,0BAA2B,CAACA,EAAS,kBAAkB,EAAGA,EAAS,mBAAmB,CAAC,EAAG,SAAUwU,EAAG7J,EAAG,CAUhI,IAAImE,EAA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,IAAIS,GAAgB,CAC9B,OAAQ,cACR,YAAa,QACb,QAAWM,GAAIJ,GAAK,CAACA,EAAE,KAAK,EAC5B,SAAUC,GAAKA,EAAIA,EAAE,MAAM,IAAM,CACnC,CAAC,CAAC,EAEFZ,GAAG,UAAU,CACjB,CAEA,MAAM,iBAAiB,EACpB,KAAKgB,GAAYA,EAAS,KAAK,CAAC,EAChC,KAAKrB,GAAI,KAAK,EACd,KAAKE,EAAI", "names": ["require_highcharts_src", "__commonJSMin", "exports", "module", "root", "factory", "window", "_modules", "_registerModule", "obj", "path", "args", "fn", "Globals", "supportsPassive", "opts", "H", "charts", "doc", "win", "error", "code", "stop", "chart", "params", "severity", "isCode", "isNumber", "message", "defaultHandler", "additionalMessages_1", "objectEach", "value", "key", "fireEvent", "merge", "i", "ret", "doCopy", "copy", "original", "isObject", "isClass", "isDOMElement", "len", "clamp", "min", "max", "cleanRecursively", "newer", "older", "result", "_val", "ob", "pInt", "s", "mag", "isString", "isArray", "str", "strict", "c", "n", "erase", "arr", "item", "defined", "attr", "elem", "keyOrAttribs", "isGetter", "attrSingle", "splat", "syncTimeout", "delay", "context", "internalClearTimeout", "id", "extend", "a", "b", "pick", "length", "arg", "css", "el", "styles", "createElement", "tag", "attribs", "parent", "nopad", "extendClass", "members", "pad", "number", "padder", "relativeLength", "base", "offset", "wrap", "method", "func", "proceed", "outerArgs", "scope", "getMagnitude", "num", "normalizeTickInterval", "interval", "multiples", "magnitude", "allowDecimals", "hasTickAmount", "retInterval", "normalized", "correctFloat", "stableSort", "sortFunction", "sortValue", "arrayMin", "data", "arrayMax", "destroyObjectProperties", "except", "val", "discardElement", "element", "prec", "timeUnits", "pos", "getNestedProperty", "pathElements", "pathElement", "child", "getStyle", "prop", "toInt", "customGetStyle", "style", "offsetWidth", "boundingClientRectWidth", "inArray", "fromIndex", "find", "callback", "keys", "docElem", "box", "ctx", "_a", "addEvent", "type", "options", "owner", "events", "addEventListener", "eventObject", "removeEvent", "removeOneEvent", "removeEventListener", "removeAllEvents", "eventCollection", "types", "typeEvents", "eventArguments", "defaultFunction", "e", "object", "multilevel", "serialMode", "uniqueKey", "hash", "useSerialIds", "mode", "isFunction", "Utilities", "ChartDefaults", "U", "Color", "input", "GlobalColor", "rgba", "parser", "col", "format", "ret_1", "alpha", "to", "fromRgba", "toRgba", "hasAlpha", "SeriesPalettes", "hasNewSafariBug", "hasOldSafariBug", "Time", "unit", "date", "realMs", "ms", "newOffset", "useUTC", "year", "month", "hours", "minutes", "seconds", "d", "time", "getTimezoneOffset", "moment", "timestamp", "capitalize", "day", "dayOfMonth", "fullYear", "lang", "langWeekdays", "shortWeekdays", "replacements", "f", "normalizedInterval", "startOfWeek", "Date", "tickPositions", "higherRanks", "minDate", "count", "minYear", "variableDayLength", "minDay", "minMonth", "minDateDate", "minHours", "t", "range", "dateTimeLabelFormats", "dateStr", "blank", "strpos", "lastN", "Palettes", "color", "isTouchDevice", "svg", "defaultOptions", "defaultTime", "getOptions", "setOptions", "DefaultOptions", "Fx", "paths", "start", "end", "now", "startSeg", "endSeg", "tweenSeg", "j", "startItem", "endItem", "step", "from", "self", "timer", "gotoEnd", "requestAnimationFrame", "complete", "duration", "curAnim", "done", "fromD", "toD", "startX", "endX", "isArea", "positionFactor", "shift", "fullLength", "reverse", "prepend", "other", "moveSegment", "otherSegment", "z", "append", "segmentToAdd", "lowerSegmentToAdd", "setAnimation", "animation", "animObject", "getDeferredAnimation", "series", "labelAnimation", "defer", "seriesAnim", "anim", "animate", "opt", "fx", "animationExports", "SVG_NS", "trustedTypes", "trustedTypesPolicy", "emptyHTML", "hasValidDOMParser", "AST", "source", "attributes", "valid", "ref", "line", "pair", "html", "ast", "recurse", "subtree", "subParent", "tagName", "textNode", "bypassHTMLFiltering", "node", "NS", "attributes_1", "markup", "nodes", "body", "appendChildNodes", "addTo", "astNode", "parsedAttributes", "attributes_2", "attrib", "children_1", "childNode", "D", "dateFormat", "splitter", "isInside", "segment", "valueAndFormat", "index", "floatRegex", "decRegex", "numberFormatter", "numberFormat", "decimals", "decimalPoint", "thousandsSep", "fractionDigits", "origDec", "exponent", "firstDecimals", "roundedNumber", "strinteger", "thousands", "FormatUtilities", "RendererUtilities", "distribute", "boxes", "maxDistance", "origBoxes", "reducedLen", "sortByRank", "sortByTarget", "overlapping", "restBoxes", "target", "total", "posInCompositeBox", "A", "deg2rad", "noop", "SVGElement", "renderer", "inserted", "className", "replace", "currentClassName", "newClassName", "name", "alignOptions", "alignByTranslate", "alignedObjects", "x", "y", "alignTo", "alignFactor", "vAlignFactor", "align", "vAlign", "convert", "_this", "animOptions", "deferTime", "textOutline", "hasContrast", "parts", "strokeWidth", "match", "digit", "outline_1", "parentElem", "clone", "totalHeight_1", "br", "continueAnimation", "symbolCustomAttribs", "hasSetSymbolSize", "skipAttr", "setter", "clipRect", "rect", "wrapper", "normalizer", "colorOptions", "colorObject", "gradName", "gradAttr", "radAttr", "gradients", "stops", "stopColor", "stopOpacity", "radialReference", "gradientObject_1", "stopObject", "oldStyles", "newStyles", "textWidth", "hasNew", "stylesToApply_1", "v", "ownerSVGElement", "parentToClean", "grandParent", "clipPath_1", "shadow", "acc", "seg", "elemWrapper", "reload", "rot", "alignValue", "textStr", "cache", "cacheKeys", "isSVG", "rotation", "fontSize", "bBox", "width", "height", "toggleTextShadowShim", "cacheKey", "display", "outline", "baseline", "rad", "rad90", "wCosRad", "wSinRad", "cosRad90", "sinRad90", "pX", "pY", "aX", "bX", "cX", "dX", "aY", "bY", "cY", "dY", "nodeName", "eventType", "handler", "onEvents", "opacity", "parentNode", "coordinates", "existingGradient", "textPathOptions", "url", "textWrapper", "textPath", "enabled", "undo", "textPathId", "textAttribs", "children", "shadowOptions", "group", "cutOff", "shadows", "oldShadowOptions", "parentGroup", "parentInverted", "defaultShadowOptions", "shadowElementOpacity", "update", "transform", "inherit", "dummy", "titleNode", "matrix", "_b", "scaleX", "scaleY", "_c", "translateX", "_d", "translateY", "parentWrapper", "svgParent", "childNodes", "otherElement", "otherZIndex", "undefinedOtherZIndex", "run", "RendererRegistry", "defaultRenderer", "getRendererType", "rendererType", "registerRendererType", "rendererClass", "setAsDefault", "__extends", "extendStatics", "p", "__", "SVGLabel", "_super", "shape", "anchorX", "anchorY", "useHTML", "hasBGImage", "textStyles_1", "padding", "paddingLeft", "text", "crispAdjust", "metrics", "textY", "textX", "paddingRight", "arc", "w", "h", "rx", "ry", "proximity", "fullCircle", "innerRadius", "open_1", "cosStart", "sinStart", "cosEnd", "sinEnd", "longArc", "callout", "arrowLength", "halfDistance", "r", "safeDistance", "roundedRect", "circle", "diamond", "triangle", "triangleDown", "Symbols", "TextBuilder", "svgElement", "textStyles", "hasMarkup", "tempParent", "regexMatchBreaks", "textCache", "firstChild", "modifyTextNode", "parentElement", "words", "hasWhiteSpace", "dy", "lineNo", "startAt", "currentIndex", "lines", "precedingSiblings", "modifyChildren", "fontSizeStyle", "modifyChild", "styledMode", "nextNode", "getString", "lengths", "minIndex", "maxIndex", "actualWidth", "getSubStringLength", "charEnd", "concatenatedEnd", "inputStr", "isFirefox", "isMS", "isWebKit", "symbolSizes", "hasInternalReferenceBug", "SVGRenderer", "container", "forExport", "allowHTML", "boxWrapper", "desc", "subPixelFix", "def", "hitElement", "rendererDefs", "b8", "l", "theme", "hoverState", "selectState", "disabledState", "label", "states", "curState", "normalStyle", "normalState", "hoverStyle", "selectStyle", "disabledStyle", "state", "css_1", "points", "roundingFunction", "innerR", "_key", "src", "onload", "setSVGImageSource", "onDummyLoad", "symbol", "ren", "imageRegex", "isImage", "sym", "symbolFn", "imageSrc", "centerImage", "img_1", "imgwidth", "imgheight", "imgSize", "scale", "clipPath", "tspans", "parentVal", "tspan", "lineHeight", "alterY", "commandLength", "HTMLElement", "SVGElementClass", "htmlElementProto", "svgElementProto", "alignCorrection", "isSettingWidth", "doTransform", "whiteSpace", "getTextPxLength", "currentTextTransform", "hasBoxWidthChanged", "textPxLength", "getTransformKey", "rotationStyle", "cssTransformKey", "HTMLRenderer", "SVGRendererClass", "htmlRendererProto", "svgRendererProto", "addSetters", "gWrapper", "styleObject", "svgGroupWrapper", "parents", "htmlGroup", "cls", "translateSetter", "htmlGroupStyle", "parentGroupStyles", "AxisDefaults", "Foundation", "registerEventOptions", "component", "event", "F", "Tick", "axis", "noLabel", "parameters", "tick", "categories", "log", "names", "labelOptions", "isFirst", "isLast", "animateLabels", "tickPositionInfo", "dateTimeLabelFormat", "labelFormatter", "list", "xy", "horiz", "tickPos", "tickmarkOffset", "old", "cHeight", "transA", "reversed", "staggerLines", "rotCorr", "labelOffsetCorrection", "yOffset", "tickLength", "tickWidth", "pxPos", "chartWidth", "spacing", "leftBound", "rightBound", "factor", "labelWidth", "slotWidth", "xCorrection", "modifiedSlotWidth", "goRight", "leftPos", "rightPos", "moved", "labelPos", "xPos", "yPos", "currentTick", "reverseCrisp", "labelOpacity", "gridLine", "gridLinePath", "gridLineWidth", "gridLineColor", "dashStyle", "tickSize", "tickColor", "mark", "isNewMark", "show", "getNormalizedTickInterval", "tickInterval", "Axis", "userOptions", "isXAxis", "labelsOptions", "crosshair", "numericSymbols", "numSymMagnitude", "numericSymbolDetector", "multi", "xExtremes", "seriesOptions", "xData", "threshold", "seriesDataMin", "seriesDataMax", "dataExtremes", "backwards", "cvsCoord", "handleLog", "pointPlacement", "localMin", "minPixelPadding", "doPostTranslate", "sign", "cvsOffset", "localA", "returnValue", "paneCoordinates", "pixel", "axisLeft", "axisTop", "lineWidth", "cWidth", "transB", "translatedValue", "force", "x1", "y1", "x2", "y2", "skip", "between", "evt", "roundedMin", "roundedMax", "lastPos", "precision", "minorTickInterval", "pointRangePadding", "minorTickPositions", "logarithmic_1", "_pos", "paddedTicks", "zoomOffset", "spaceAvailable", "closestDataRange", "distance", "loopLength", "minArgs", "maxArgs", "minRange", "seriesClosest", "visible", "point", "explicitCategories", "nameX", "linkedParent", "hasCategories", "pointRange", "closestPointRange", "minPointOffset", "ordinalCorrection", "seriesPointRange", "isPointPlacementAxis", "secondPass", "isLinked", "tickPixelIntervalOption", "softThreshold", "maxPadding", "minPadding", "linkedParentExtremes", "tickIntervalOption", "thresholdMin", "thresholdMax", "hardMin", "hardMax", "hasExtremesChanged_1", "minTickInterval", "tickPositionsOption", "tickPositioner", "minorTickIntervalOption", "hasVerticalPanning", "isColorAxis", "startOnTick", "endOnTick", "tickPositionerResult", "startingTickInterval", "adjustedTickInterval", "alignedAxes", "alignThresholds", "thresholdAlignments", "hasOther", "getKey_1", "thisKey_1", "otherAxis", "threshAlign", "thresholdAlignment_1", "sum", "callerAxis", "thresholdAlignment", "tickPixelInterval", "tickAmount", "finalTickAmt", "currentTickAmount", "thresholdTickIndex", "adjustExtremes", "isDirtyData", "isXAxisDirty", "isDirtyAxisLength", "newMin", "newMax", "redraw", "serie", "dataMin", "dataMax", "offsets", "top", "left", "realMin", "realMax", "angle", "prefix", "slotSize", "rotationOption", "labelMetrics", "getStep", "spaceNeeded", "newTickInterval", "bestScore", "autoRotation", "score", "_i", "autoRotation_1", "slotCount", "marginLeft", "cssWidth", "ticks", "labelStyleOptions", "innerWidth", "textOverflowOption", "commonWidth", "commonTextOverflow", "maxLabelLength", "tickPosition", "widthOption", "opposite", "axisTitleOptions", "textAlign", "side", "coll", "axisParent", "invertedSide", "hasData", "axisOffset", "clipOffset", "directionFactor", "showAxis", "titleOffset", "titleOffsetOption", "titleMargin", "labelOffset", "labelOffsetPadded", "lineHeightCorrection", "createGroup", "suffix", "zIndex", "clip", "lineLeft", "lineTop", "axisLength", "margin", "xOption", "yOption", "axisTitle", "fontMetrics", "textHeightOvershoot", "alongAxis", "offAxis", "titlePosition", "slideIn", "minorTicks", "alternateBands", "stackLabelOptions", "alternateGridColor", "axisLine", "slideInTicks_1", "plotLineOptions", "forDestruction", "destroyInactiveItems", "titleXy", "plotLine", "keepEvents", "plotLinesAndBands", "eventOptions", "plotGroup", "snap", "categorized", "graphic", "crossOptions", "panningOptions", "axisSeries", "titleOptions", "DateTimeAxis", "composedClasses", "compose", "AxisClass", "axisProto", "getTimeTicks", "onInit", "Additions", "unitsOption", "units", "lessThan", "LogarithmicAxis", "onAfterInit", "logarithmic", "minor", "positions", "intermediate", "break2", "filteredTickIntervalOption", "totalPixelLength", "PlotLineOrBandAxis", "PlotLineOrBandClass", "PlotLineOrBandType", "toPath", "outside", "plus", "isFlat", "pathStart", "pathEnd", "toPathStart", "toPathEnd", "updatedOptions", "i_1", "PlotLineOrBand", "groupAttribs", "optionsLabel", "svgElem", "isBand", "isLine", "isNew", "groupName", "xBounds", "yBounds", "R", "Tooltip", "items", "tooltipOptions", "tt", "tooltip", "mouseEvent", "pointer", "inverted", "plotTop", "plotLeft", "chartX_1", "chartY_1", "isSplit", "isHeader", "doSplit", "pointerEvents", "wasSplit", "chartStyle", "Renderer", "label_1", "xSetter_1", "ySetter_1", "boxWidth", "boxHeight", "outerWidth", "outerHeight", "chartPosition", "buildDimensionArray", "dim", "isX", "first", "second", "swapped", "flipped", "preferFarSide", "firstDimension", "outerSize", "innerSize", "scaledInnerSize", "scaledDist", "scaleDiff", "roomLeft", "roomRight", "alignedLeft", "alignedRight", "secondDimension", "retVal", "swap", "temp", "pointerEvent", "skipAnchor", "pointOrPoints", "pointConfig", "formatter", "shared", "textConfig", "anchor", "currentSeries", "checkX_1", "checkY_1", "labels", "chartHeight", "plotHeight", "scrollablePixelsY", "scrollablePixelsX", "scrollLeft", "scrollTop", "positioner", "bounds", "tooltipLabel", "headerTop", "_e", "chartLeft", "chartTop", "distributionBoxTop", "headerHeight", "adjustedPlotHeight", "getAnchor", "plotX", "plotY", "xAxis", "yAxis", "defaultPositioner", "updatePartialTooltip", "partialTooltip", "size", "boxPosition", "boxStart", "boxExtremes", "_f", "anchorPos", "labelBBox", "formatString", "labelConfig", "isFooter", "dateTime", "xDateFormat", "Point", "animateParams", "graphicalProps", "isDataLabel", "plural", "pointValKey", "dataSorting", "hoverPoints", "globalAnimation", "destroyPoint", "kinds", "props", "eventArgs", "zones", "zoneAxis", "zone", "oldShapeType", "pointArrayMap", "valueCount", "firstItemType", "chartCoordinates", "posX", "posY", "optionsChart", "colors", "colorCount", "colorIndex", "nestedKeys", "isLastKey", "pointFormat", "seriesTooltipOptions", "valueDecimals", "valuePrefix", "valueSuffix", "runEvent", "hasMockGraphic", "shouldDestroyGraphic", "selected", "accumulate", "loopPoint", "loopSeries", "point_1", "move", "previousState", "stateOptions", "markerOptions", "normalDisabled", "markerStateOptions", "stateDisabled", "pointMarker", "hasMarkers", "halo", "markerAttribs", "pointAttribs", "pointAttribsAnimation", "stateMarkerGraphic", "newSymbol", "opacity_1", "haloOptions", "markerGraphic", "markerVisibility", "Pointer", "activeSeries", "inactiveSeries", "unbind", "chartX", "chartY", "mouseDownX", "mouseDownY", "zoomHor", "zoomVert", "attrs", "chartOptions", "plotWidth", "panningEnabled", "panKey", "clickedInside", "selectionMarker", "shapeType", "marker", "hasPinched", "x_1", "y_1", "width_1", "height_1", "selectionData_1", "runZoom_1", "selectionMin", "selectionMax", "closest", "sort", "p1", "p2", "isCloserX", "isCloser", "isAbove", "noSharedTooltip", "compareX", "shapeArgs", "offsetHeight", "existingHoverPoint", "existingHoverSeries", "isDirectTouch", "useExisting", "filter", "hoverSeries", "searchSeries", "notSticky", "hoverPoint", "relatedTarget", "elemClassName", "touches", "ePos", "pEvt", "isPrimaryButton", "hoverChart", "pinchDown", "touchesLength", "lastValidTouch", "hasZoom", "fireClickEvent", "followTouchMove", "absMin", "absMax", "forcedScale", "XY", "sChartXY", "wh", "plotLeftTop", "singleTouch", "touch0Start", "touch1Start", "setScale", "touch1Now", "touch0Now", "clipXY", "selectionWH", "selectionXY", "outOfBounds", "scaleKey", "transformScale", "allowMove", "tooltipPoints", "hoverData", "followPointer", "useSharedTooltip", "seriesAttribs", "ownerDoc", "hasMoved", "zoomType", "zoomX", "zoomY", "hasPointerEvent", "getWebkitTouches", "fake", "touch", "translateMSPointer", "wktype", "MSPointer", "marginNames", "Legend", "legend", "hiddenColor", "textColor", "symbolColor", "symbolAttr", "symbolPadding", "ltr", "checkbox", "legendItem", "alignAttr", "clipHeight", "titleHeight", "horizontal", "symbolWidth", "itemStyle", "itemHiddenStyle", "itemDistance", "isSeries", "showCheckbox", "itemClassName", "itemExtraWidth", "fontMetricsH", "itemHeight", "itemMarginBottom", "itemMarginTop", "maxLegendWidth", "itemWidth", "allItems", "alignment", "alignments", "alignLeft", "lastPoint", "useFirstPoint", "legendWidth", "legendHeight", "legendGroup", "allowedWidth", "optionsY", "alignTop", "maxHeight", "navOptions", "arrowSize", "pages", "clipToHeight", "addTracker", "nav", "lastY", "spaceHeight", "scrollBy", "pageCount", "pager", "currentPage", "legendLabel", "isPoint", "activeClass", "legendElements", "setOtherItemsState", "otherItem", "legendElements_1", "strLegendItemClick", "fnLegendItemClick", "SeriesRegistry", "registerSeriesType", "seriesType", "SeriesClass", "defaultPlotOptions", "seriesProto", "pointProto", "seriesTypes", "Chart", "userPlotOptions", "typeOptions", "zooming", "iEnd", "plotBox", "scrollablePlotBox", "axes", "legendUserOptions", "isHiddenChart", "afterRedraw", "hasDirtyStacks", "hasStackedSeries", "isDirtyBox", "redrawLegend", "itemById", "xAxisOptions", "yAxisOptions", "optionsArray", "axisOptions", "subtitleOptions", "explicitOptions", "updateOptions", "spacingBox", "title", "verticalAlign", "titleSize", "requiresDirtyBox", "heightOption", "renderTo", "revert", "tempStyle", "indexAttrName", "containerId", "containerStyle", "oldChartIndex", "skipAxes", "colorAxis", "getOffset", "m", "hasUserSize", "reflow", "plotBorderWidth", "clipX", "clipY", "values", "sideName", "plotBGImage", "chartBackgroundColor", "plotBackgroundColor", "plotBackgroundImage", "clipBox", "chartBackground", "plotBackground", "plotBorder", "chartBorderWidth", "mgn", "bgAttr", "verb", "klass", "chartSeries", "linkedTo", "renderAxes", "correction", "tempWidth", "tempHeight", "redoHorizontal", "redoVertical", "credits", "creds", "serieOptions", "loadingOptions", "setLoadingSize", "loadingDiv", "loadingSpan", "oneToOne", "adders", "isResponsiveOptions", "itemsForRemoval", "updateAllAxes", "updateAllSeries", "runSetSize", "indexMap", "newOptions", "hasId", "newWidth", "newHeight", "btnOptions", "zoomOut", "displayButton", "hasZoomed", "axisData", "resetZoomButton", "panning", "doRedraw", "nextMousePos", "mousePos", "mouseDown", "startPos", "halfPointRange", "pointRangeDirection", "extremes", "panMin", "panMax", "panningState", "spill", "processedData", "paddedMin", "paddedMax", "down", "LegendSymbol", "drawLineMarker", "symbolHeight", "generalRadius", "legendItemGroup", "verticalCenter", "legendSymbol", "lineSizer", "radius", "drawRectangle", "square", "seriesDefaults", "SeriesDefaults", "hasTouch", "Series", "lastSeries", "collection", "indexOption", "AXIS", "pointIntervalUnit", "relativeXValue", "xIncrement", "pointInterval", "itemOptions", "plotOptions", "seriesUserOptions", "defaults", "indexName", "counterName", "setting", "seriesMarkerOption", "optionsObject", "oldData", "matchingPoint", "matchedById", "pointIndex", "matcher", "oldPoint", "pointsToAdd", "requireSorting", "equalLength", "hasUpdatedByKey", "lastIndex", "succeeded", "pointOptions", "updatePoints", "oldDataLength", "turboThreshold", "yData", "pt", "updatedData", "indexOfX", "indexOfY", "firstPoint", "copiedData", "dataLength", "sortKey", "getPointOptionsObject", "sortedData", "aValue", "bValue", "linkedSeries", "seriesData", "forceExtremesFromAll", "cropThreshold", "getExtremesFromAll", "isCartesian", "val2lin", "isLog", "croppedData", "cropped", "cropStart", "processedXData", "processedYData", "throwOnUnsorted", "updatingNames", "cropShoulder", "cropEnd", "dataOptions", "PointClass", "processedDataLength", "hasGroupedData", "groupCropStartIndex", "cursor", "activeYData", "shoulder", "positiveValuesOnly", "validValue", "withinRange", "xMin", "xMax", "activeCounter", "yDataLength", "stacking", "enabledDataSorting", "dynamicallyPlaced", "stackThreshold", "lastPlotX", "stackIndicator", "closestPointRangePx", "limitedRange", "xValue", "pointStack", "stackValues", "yValue", "yBottom", "stack", "translated", "insideOnly", "allowNull", "seriesBox", "markerGroup", "sharedClips", "sharedClipKey", "init", "animationClipKey", "animationClipRect", "markerAnimationClipRect", "markerClipBox", "finalBox", "step_1", "seriesMarkerOptions", "globallyEnabled", "pointMarkerOptions", "hasPointMarker", "shouldDrawMarker", "pointAttr", "seriesStateOptions", "pointStateOptions", "pointColorOption", "pointColor", "zoneColor", "fill", "stroke", "keepEventsForUpdate", "issue134", "destroy", "clips", "graph", "area", "plotSizeMax", "translatedFrom", "translatedTo", "clipAttr", "pxRange", "pxPosMin", "pxPosMax", "zoneArea", "zoneGraph", "ignoreZones", "visibility", "horAxis", "vertAxis", "hasRendered", "chartSeriesGroup", "animDuration", "wasDirty", "dimensions", "_kdtree", "depth", "median", "startRecursive", "kdX", "kdY", "kdComparer", "kdDimensions", "setDistance", "_search", "search", "tree", "nPoint1", "nPoint2", "tdist", "sideA", "sideB", "trackByArea", "trackerPath", "tracker", "onMouseOver", "TRACKER_FILL", "withEvent", "isInTheMiddle", "remove", "oldOptions", "initialType", "initialSeriesProto", "groups", "preserve", "newType", "keepPoints", "casting", "ownEvents", "dataLabels", "oldMarker", "optionName", "option", "oldOption", "inactiveOtherPoints", "stateAnimation", "vis", "ignoreHiddenSeries", "oldVisibility", "showOrHide", "otherSeries", "scrollablePlotArea", "scrollableMinWidth", "scrollableMinHeight", "corrections", "marginName", "correctionValue", "lastHoverPoint", "fixedRenderer", "fixedSelectors", "axisClass", "firstTime", "scrollableOptions", "scrollableWidth", "scrollableHeight", "maskTop", "maskLeft", "maskBottom", "maskRight", "maskPlotRight", "maskPlotBottom", "FU", "StackItem", "negativeValue", "stackOption", "isNegative", "formatOption", "xOffset", "xWidth", "boxBottom", "boxTop", "defaultX", "stackBox", "labelBox", "isJustify", "factorMap", "verticalAlignFactor", "textAlignFactor", "stackBoxProps", "stackItem", "totalStackValue", "yZero", "neg", "chartGetStacks", "onAxisDestroy", "stacks", "stackKey", "onAxisInit", "AxisAdditions", "seriesGetStackIndicator", "seriesModifyStacks", "stacker", "pointExtremes", "seriesPercentStacker", "totalFactor", "seriesSetGroupedPoints", "seriesSetStackedPoints", "stackingParam", "stackedYData", "negKey", "negStacks", "oldStacks", "pointKey", "reversedStacks", "actualSeries", "stackLabelsAnim", "animationConfig", "stackTotalGroup", "StackingAxis", "ChartClass", "chartProto", "seriesProto_1", "LineSeries", "graphPath", "graphKey", "nullsAsZeroes", "connectCliffs", "xMap", "gap", "pathToPoint", "propset", "AreaSeries", "areaPath", "areaKey", "getGraphPath", "bottomPoints", "graphPoints", "seriesIndex", "translatedThreshold", "connectNulls", "addDummyPoints", "otherI", "stackedValues", "nullVal", "cliffVal", "bottom", "isNull", "topPath", "bottomPath", "firstBottomPoint", "pointMap", "yAxisSeries", "seriesLength", "upOrDown", "stackX", "visibleSeries_1", "idx", "stackPoint", "direction", "nullName", "cliffName", "otherStack", "cliff", "si", "SplineSeries", "smoothing", "denom", "nextPoint", "leftContX", "leftContY", "rightContX", "rightContY", "doCurve", "otherPoint", "lastX", "nextX", "nextY", "areaProto", "AreaSplineSeries", "ColumnSeriesDefaults", "ColumnSeries", "translateProp", "translateStart", "reverseStacks", "stackGroups", "columnCount", "otherYAxis", "otherOptions", "columnIndex", "categoryWidth", "groupPadding", "groupWidth", "pointOffsetWidth", "pointWidth", "pointPadding", "colIndex", "pointXOffset", "borderWidth", "xCrisp", "right", "yCrisp", "fromTop", "reversedStacks_1", "indexInCategory_1", "totalInCategory_1", "stackItem_1", "pointValues", "seriesIndexes", "dense", "minPointLength", "seriesPointWidth", "seriesXOffset", "seriesBarW", "up", "barY", "barH", "barX", "barW", "p2o", "strokeOption", "strokeWidthOption", "brightness", "dashstyle", "animationLimit", "hasGraphic", "dataLabel", "DataLabel", "alignDataLabel", "isInsidePlot", "setStartPos", "justify", "bBoxCorrection", "applyFilter", "op", "drawDataLabels", "justifyDataLabel", "setDataLabelStartPos", "backgroundColor", "contrastColor", "seriesDlOptions", "dataLabelsGroup", "dataLabelAnim", "mergeArrays", "labelEnabled", "connector", "labelText", "labelDistance", "backgroundColor_1", "borderColor", "off", "justified", "one", "two", "res", "labelCenter", "halfWidth", "ColumnDataLabel", "xLen", "yLen", "dlBox", "below", "inside", "overshoot", "ColumnSeriesClass", "BarSeries", "ScatterSeriesDefaults", "ScatterSeries", "jitter", "unrandom", "seed", "rand", "plotProp", "translatedJitter", "CenteredUtilities", "getCenter", "slicingRoom", "centerOption", "smallestSize", "thickness", "handleSlicingRoom", "getStartAndEndRadians", "startAngle", "endAngle", "PiePoint", "labelPosition", "predefinedShapes", "connectorShape", "toggleSlice", "ignoreHiddenPoint", "sliced", "connectorPosition", "breakAt", "touchingSliceAt", "lineSegment", "pieCenterX", "crookDistance", "crookX", "segmentWithCrook", "useCrook", "PieSeriesDefaults", "CU", "PieSeries", "startAngleRad", "centerX", "centerY", "center", "groupTranslation", "animateTo", "shadowGroup", "slicedOffset", "connectorOffset", "radians", "endAngleRad", "circ", "finalConnectorOffset", "radiusX", "radiusY", "cumulative", "dataLabelPositioners", "naturalY", "seriesCenter", "half", "dataLabelWidth", "maxDataLabelWidth", "PieSeriesClass", "pieProto", "placeDataLabels", "verifyDataLabelOverflow", "connectorPadding", "maxWidth", "halves", "overflow", "connectorWidth", "labelHeight", "pointDataLabelsOptions", "sideOverflow", "distributionLength", "minSize", "newSize", "collector", "dlOptions", "push", "hideOrShow", "label1", "label2", "box1", "box2", "isLabelAffected", "isIntersectRect", "getAbsoluteBox", "newOpacity", "Responsive", "getCurrent", "curr", "rule", "matches", "condition", "reset", "currentResponsive", "ruleIds", "undoOptions", "mergedOptions", "ruleId", "currentRuleIds", "Highcharts", "Defaults", "Animation", "PieDataLabel", "G", "require_highcharts_more_src", "__commonJSMin", "exports", "module", "factory", "Highcharts", "_modules", "_registerModule", "obj", "path", "args", "fn", "Chart", "CU", "H", "Pointer", "U", "addEvent", "correctFloat", "defined", "extend", "merge", "pick", "splat", "Pane", "options", "chart", "backgroundOption", "renderer", "len", "i", "backgroundOptions", "method", "attribs", "axis", "redraw", "isInsidePane", "x", "y", "center", "startAngle", "endAngle", "insideSlice", "cx", "cy", "distance", "angle", "eventArgs", "hoverPane", "pane", "e", "_a", "s", "SeriesRegistry", "__extends", "extendStatics", "d", "b", "p", "__", "AreaPoint", "areaProto", "isNumber", "AreaRangePoint", "_super", "_this", "prevState", "series", "isPolar", "noop", "AreaSeries", "columnProto", "isArray", "areaRangeSeriesOptions", "AreaRangeSeries", "point", "xy", "points", "highPoints", "highAreaPoints", "getGraphPath", "polar", "connectEnds", "connectNulls", "pointShim", "step", "highAreaPoint", "lowerPath", "higherPath", "higherAreaPath", "linePath", "data", "length", "originalDataLabels", "dataLabelOptions", "inverted", "up", "upperDataLabelOptions", "lowerDataLabelOptions", "plotHigh", "_b", "plotLow", "_c", "_d", "label", "pointLength", "high", "plotY", "tooltipPos", "posHigh", "splineProto", "AreaSplineRangeSeries", "ColumnSeries", "BoxPlotSeries", "yAxis", "pointArrayMap", "key", "q1Plot", "q3Plot", "highPlot", "lowPlot", "medianPlot", "medianPath", "crispCorr", "crispX", "boxPath", "width", "left", "right", "halfWidth", "doQuartiles", "pointWiskerLength", "whiskerLength", "graphic", "verb", "shapeArgs", "boxAttr", "stemAttr", "whiskersAttr", "medianAttr", "color", "BubbleLegendDefaults", "Color", "F", "arrayMax", "arrayMin", "stableSort", "BubbleLegendItem", "legend", "items", "itemDistance", "legendItem", "ranges", "connectorDistance", "connectorSpace", "a", "maxLabel", "radius", "size", "baseline", "bubbleAttribs", "connectorAttribs", "labelAttribs", "fillOpacity", "styledMode", "range", "value", "seriesIndex", "bubbleSeries", "zMax", "zMin", "minSize", "maxSize", "zThreshold", "_i", "mainRange", "labelsOptions", "symbols", "labels", "elementCenter", "absoluteRadius", "labelsAlign", "rtl", "borderWidth", "connectorWidth", "posX", "posY", "fontMetrics", "labelMovement", "crispMovement", "connectorLength", "labelY", "labelX", "labelSize", "formatter", "format", "numberFormatter", "allowOverlap", "index", "bubbleLegend", "rangesOptions", "zData", "minZ", "maxZ", "legendOptions", "floating", "horizontal", "lastLineHeight", "plotSizeX", "plotSizeY", "pxSizes", "maxPxSize", "plotSize", "calculatedSize", "min", "max", "bubbleLegendOptions", "bubbleSeriesSize", "bubbleLegendSize", "D", "setOptions", "objectEach", "wrap", "composedClasses", "chartDrawChartBox", "proceed", "callback", "getVisibleBubbleSeriesIndex", "bubbleSizes", "item", "tick", "retranslateItems", "getLinesHeights", "compose", "ChartClass", "LegendClass", "SeriesClass", "onLegendAfterGetAllItems", "onSeriesLegendItemClick", "lines", "lastLine", "legendItem2", "j", "bubbleSeriesIndex", "visible", "status", "orgTranslateX", "orgTranslateY", "movementX", "actualLine", "BubbleLegendComposition", "Point", "ScatterPoint", "BubblePoint", "Series", "ScatterSeries", "clamp", "axisBeforePadding", "axisLength", "isXAxis", "dataKey", "pxMin", "pxMax", "transA", "hasActiveSeries", "keys", "BubbleSeries", "AxisClass", "init", "yData", "radii", "zExtremes", "minPxSize", "zMin_1", "zMax_1", "valid_1", "otherSeries", "zExtremes_1", "yValue", "sizeByArea", "zRange", "pos", "state", "markerOptions", "attr", "smallestSize", "getPxSize", "isPercent", "z", "ColumnRangePoint", "columnRangeOptions", "ColumnRangeSeries", "xAxis", "startAngleRad", "isRadial", "safeDistance", "height", "heightDifference", "start", "safeBounds", "pixelPos", "minPointLength", "colProto", "ColumnPyramidSeries", "dense", "threshold", "translatedThreshold", "metrics", "pointWidth", "seriesBarW", "pointXOffset", "yBottom", "barX", "barW", "barY", "barH", "stackTotal", "stackHeight", "topPointY", "topXwidth", "bottomXwidth", "invBarPos", "x1", "x2", "x3", "x4", "y1", "y2", "ErrorBarSeriesDefaults", "ErrorBarSeries", "valKey", "GaugePoint", "pInt", "GaugeSeries", "dialOptions", "baseLength", "rearLength", "baseWidth", "topWidth", "overshoot", "rotation", "pivot", "pivotOptions", "onChartLoad", "mousedownUnbinder", "mousemoveUnbinder", "mouseupUnbinder", "event", "onMouseDown", "normalizedEvent", "onMouseMove", "diffX", "diffY", "graphLayoutsLookup", "newPlotX", "newPlotY", "layout", "onMouseUp", "_event", "redrawHalo", "DragNodesComposition", "A", "setAnimation", "integrations", "layouts", "onChartAfterPrint", "onChartBeforePrint", "onChartPredraw", "onChartRender", "systemsStable", "afterRender", "layoutStep", "GraphLayoutComposition", "PackedBubblePoint", "seriesOptions", "temp", "PackedBubbleSeriesDefaults", "attractive", "link", "force", "distanceXY", "massFactor", "translatedX", "translatedY", "attractiveForceFunction", "k", "barycenter", "gravitationalConstant", "xFactor", "yFactor", "node", "getK", "integrate", "friction", "maxSpeed", "prevX", "prevY", "abs", "signX", "signY", "repulsive", "factor", "repulsiveForceFunction", "VerletIntegration", "box", "nodes", "centerX", "centerY", "nodes_1", "repNode", "PackedBubbleIntegration", "distanceR", "degree", "phi", "EulerIntegration", "QuadTreeNode", "halfHeight", "top", "depth", "newQuadTreeNode", "mass", "plotX", "pointMass", "QuadTree", "points_1", "beforeCallback", "afterCallback", "goFurther", "qtNode", "GraphLayout", "win", "isFunction", "ReingoldFruchtermanLayout", "enable", "anyLayout", "allSeries", "forceName", "allSeries_1", "w", "h", "elements", "collection", "elements_1", "element", "maxIterations", "initialPositions", "nodesLength", "rootNodes", "visitedNodes", "addToNodes", "sortedNodes", "rootNodes_1", "rootNode", "node_1", "iEnd", "unrandom", "n", "rand", "name", "systemMass", "quadNode", "goDeeper", "_loop_1", "this_1", "_e", "nodes_2", "temperature", "temperatureStep", "currentStep", "vector", "nodeA", "nodeB", "xDist", "yDist", "chartGetSelectedParentNodes", "selectedParentsNodes", "onChartBeforeRedraw", "PackedBubbleLayout", "chartProto", "tempDiff", "upScaledTemperature", "bubblePadding", "seriesProto", "fireEvent", "PackedBubbleSeries", "allDataPoints", "layoutOptions", "layoutType", "chartOptions", "graphLayoutsStorage", "parentNodeOptions", "seriesLayout", "bBox", "parentPadding", "minParentRadius", "valMin", "valMax", "bubble1", "bubble2", "sumRad", "parentNodeLayout", "nodeAdded", "parentNode", "parentMarkerOptions", "nodeMarker", "parentOptions", "parentAttribs", "dataLabels", "dataLabel", "plotWidth", "plotHeight", "useSimulation", "extremes", "allDataPointsLength", "prop", "dnPoint", "layout_1", "distanceXY_1", "distanceR_1", "checkOverlap", "positionBubble", "bubblePos", "stage", "calculatedBubble", "arr", "sortedArr", "hasParentMarker", "lastBubble", "newOrigin", "nextBubble", "sqrt", "asin", "acos", "pow", "alfa", "beta", "gamma", "delta", "finalAngle", "cosA", "sinA", "positions", "plotLeft", "plotTop", "chartHeight", "chartWidth", "minX", "maxX", "minY", "maxY", "positions_1", "position", "spaceRatio", "smallerDimension", "positions_2", "positions_3", "LegendSymbol", "LineSeries", "PolygonSeries", "graphPath", "StackItem", "WaterfallAxis", "Composition", "waterfallStacks", "stackTotalGroup", "dummyStackItem", "type", "stackItem", "onInit", "onAfterBuildStacks", "onAfterRender", "onBeforeRedraw", "stacks", "stackLabelOptions", "axes", "WaterfallPoint", "className", "Axis", "ownProp", "WaterfallSeries", "halfMinPointLength", "stacking", "actualStack", "previousIntermediate", "previousY", "total", "yPos", "hPos", "pointY", "actualStackX", "tooltipY", "dataLength", "subSum", "sum", "dataMin", "dataMax", "pt", "upColor", "graphNormalizer", "borderNormalizer", "reversedXAxis", "reversedYAxis", "connectorThreshold", "prevStack", "prevStackX", "prevPoint", "isPos", "prevArgs", "pointArgs", "nextLast", "last", "seriesThreshold", "stackThreshold", "interSum", "stackKey", "xData", "xLength", "totalYVal", "actualSum", "prevSum", "statesLen", "posTotal", "negTotal", "xPoint", "yVal", "alreadyChanged", "changed", "calculateStackState", "firstS", "nextS", "sInx", "sOff", "stackedYNeg", "stackedYPos", "stackX", "AxisDefaults", "defaultOptions", "relativeLength", "RadialAxis", "defaultCircularOptions", "defaultRadialGaugeOptions", "defaultRadialOptions", "beforeSetTickPositions", "TickClass", "onAxisAfterInit", "onAxisAutoLabelAlign", "onAxisDestroy", "onAxisInit", "onAxisInitialAxisTranslation", "onTickAfterGetLabelPosition", "onTickAfterGetPosition", "wrapTickGetMarkPath", "createLabelCollector", "createLabelCollectorHidden", "getCrosshairPosition", "end", "getLinePath", "_lineWidth", "innerRadius", "r", "getOffset", "axisProto", "getPlotBandPath", "from", "to", "radiusToPixels", "percentRegex", "fullRadius", "offset", "isCircular", "xOnPerimeter", "open", "outerRadius", "thickness", "transFrom", "transTo", "getPlotLinePath", "reverse", "background", "isCrosshair", "paneInnerR", "innerRatio", "otherAxis", "tickPositions", "crossPos", "getPosition", "translatedVal", "getTitlePosition", "titleOptions", "modify", "postTranslate", "setAxisSize", "setAxisTranslation", "modifyAsHidden", "radialAxis", "renderHidden", "isHidden", "paneOptions", "fullCircle", "normalizedStart", "normalizedEnd", "angular", "isX", "coll", "paneIndex", "labelBBox", "labelOptions", "correctAngle", "labelYPosCorrection", "optionsY", "ret", "centerSlot", "align", "labelDir", "reducedAngle1", "reducedAngle2", "translateY", "translateX", "userOptions", "tickLength", "tickWidth", "horiz", "endPoint", "__spreadArray", "pack", "l", "ar", "animObject", "find", "uniqueKey", "clipCircle", "innerR", "id", "clipPath", "wrapper", "findAlignments", "verticalAlign", "getConnectors", "segment", "calculateNeighbours", "smoothing", "denom", "addedNumber", "leftContX", "leftContY", "rightContX", "rightContY", "jointAngle", "prevPointInd", "nextPointInd", "previousPoint", "nextPoint", "previousX", "nextX", "nextY", "dLControlPoint", "dRControlPoint", "leftContAngle", "rightContAngle", "onChartAfterDrawChartBox", "onChartAfterInit", "onChartGetAxes", "onPointerGetSelectionBox", "marker", "linearAxis", "onPointerGetSelectionMarkerAttrs", "mouseDownX", "mouseDownY", "chartY", "chartX", "endAngleRad", "attrs", "shapeType", "paneRadRange", "swapAngle", "tickInterval", "pathStart", "pathEnd", "min_1", "max_1", "min_2", "max_2", "trimPath", "linearAxis_1", "innerPath", "outerPath", "radialAxis_1", "onSeriesAfterInit", "PolarAdditions", "onSeriesAfterTranslate", "chart_1", "searchPointByAngle", "circ", "ticks", "lastTick", "firstTick", "wrapChartGet", "wrapColumnSeriesAlignDataLabel", "alignTo", "isNew", "inside", "labelPos", "wrapColumnSeriesTranslate", "reversed", "visibleRange", "thresholdAngleRad", "yMin", "yMax", "pointX", "stackValues", "stack", "wrapLineSeriesGetGraphPath", "firstValid", "popLastPoint", "wrapPointerGetCoordinates", "wrapPointerPinch", "wrapSeriesAnimate", "group", "markerGroup", "animation", "wrapSplineSeriesGetPointSpline", "connectors", "PointerClass", "AreaSplineRangeSeriesClass", "ColumnSeriesClass", "LineSeriesClass", "SplineSeriesClass", "pointerProto", "lineProto", "areaSplineRangeProto", "low", "clientX", "G", "xhtml", "namespaces_default", "namespace_default", "name", "prefix", "i", "namespaces_default", "creatorInherit", "name", "document", "uri", "xhtml", "creatorFixed", "fullname", "creator_default", "namespace_default", "none", "selector_default", "selector", "select_default", "select", "selector_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "subnode", "i", "Selection", "array", "x", "empty", "selectorAll_default", "selector", "arrayAll", "select", "array", "selectAll_default", "selectorAll_default", "groups", "m", "subgroups", "parents", "j", "group", "n", "node", "i", "Selection", "matcher_default", "selector", "childMatcher", "node", "find", "childFind", "match", "childFirst", "selectChild_default", "childMatcher", "filter", "children", "childrenFilter", "match", "selectChildren_default", "childMatcher", "filter_default", "match", "matcher_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "i", "Selection", "sparse_default", "update", "enter_default", "Selection", "sparse_default", "EnterNode", "parent", "datum", "child", "next", "selector", "constant_default", "x", "bindIndex", "parent", "group", "enter", "update", "exit", "data", "i", "node", "groupLength", "dataLength", "EnterNode", "bindKey", "key", "nodeByKeyValue", "keyValues", "keyValue", "datum", "data_default", "value", "bind", "parents", "groups", "constant_default", "m", "j", "arraylike", "enterGroup", "updateGroup", "exitGroup", "i0", "i1", "previous", "next", "Selection", "exit_default", "Selection", "sparse_default", "join_default", "onenter", "onupdate", "onexit", "enter", "update", "exit", "merge_default", "context", "selection", "groups0", "groups1", "m0", "m1", "m", "merges", "j", "group0", "group1", "n", "merge", "node", "i", "Selection", "order_default", "groups", "j", "m", "group", "i", "next", "node", "sort_default", "compare", "ascending", "compareNode", "a", "b", "groups", "m", "sortgroups", "j", "group", "n", "sortgroup", "node", "i", "Selection", "call_default", "callback", "nodes_default", "node_default", "groups", "j", "m", "group", "i", "n", "node", "size_default", "size", "node", "empty_default", "each_default", "callback", "groups", "j", "m", "group", "i", "n", "node", "attrRemove", "name", "attrRemoveNS", "fullname", "attrConstant", "value", "attrConstantNS", "attrFunction", "v", "attrFunctionNS", "attr_default", "namespace_default", "node", "window_default", "node", "styleRemove", "name", "styleConstant", "value", "priority", "styleFunction", "v", "style_default", "styleValue", "node", "window_default", "propertyRemove", "name", "propertyConstant", "value", "propertyFunction", "v", "property_default", "classArray", "string", "classList", "node", "ClassList", "name", "i", "classedAdd", "names", "list", "n", "classedRemove", "classedTrue", "classedFalse", "classedFunction", "value", "classed_default", "textRemove", "textConstant", "value", "textFunction", "v", "text_default", "htmlRemove", "htmlConstant", "value", "htmlFunction", "v", "html_default", "raise", "raise_default", "lower", "lower_default", "append_default", "name", "create", "creator_default", "constantNull", "insert_default", "name", "before", "create", "creator_default", "select", "selector_default", "remove", "parent", "remove_default", "selection_cloneShallow", "clone", "parent", "selection_cloneDeep", "clone_default", "deep", "datum_default", "value", "contextListener", "listener", "event", "parseTypenames", "typenames", "name", "i", "onRemove", "typename", "on", "j", "o", "onAdd", "value", "options", "m", "on_default", "n", "t", "dispatchEvent", "node", "type", "params", "window", "window_default", "event", "dispatchConstant", "dispatchFunction", "dispatch_default", "iterator_default", "groups", "j", "m", "group", "i", "n", "node", "root", "Selection", "groups", "parents", "selection", "selection_selection", "select_default", "selectAll_default", "selectChild_default", "selectChildren_default", "filter_default", "data_default", "enter_default", "exit_default", "join_default", "merge_default", "order_default", "sort_default", "call_default", "nodes_default", "node_default", "size_default", "empty_default", "each_default", "attr_default", "style_default", "property_default", "classed_default", "text_default", "html_default", "raise_default", "lower_default", "append_default", "insert_default", "remove_default", "clone_default", "datum_default", "on_default", "dispatch_default", "iterator_default", "selection_default", "select_default", "selector", "Selection", "root", "noop", "dispatch", "i", "n", "_", "t", "Dispatch", "parseTypenames", "typenames", "types", "name", "typename", "callback", "T", "get", "set", "copy", "type", "that", "args", "c", "dispatch_default", "frame", "timeout", "interval", "pokeDelay", "taskHead", "taskTail", "clockLast", "clockNow", "clockSkew", "clock", "setFrame", "f", "now", "clearNow", "Timer", "timer", "callback", "delay", "time", "sleep", "t", "timerFlush", "e", "wake", "nap", "poke", "t0", "t1", "t2", "timeout_default", "callback", "delay", "time", "t", "Timer", "elapsed", "emptyOn", "dispatch_default", "emptyTween", "CREATED", "SCHEDULED", "STARTING", "STARTED", "RUNNING", "ENDING", "ENDED", "schedule_default", "node", "name", "id", "index", "group", "timing", "schedules", "create", "init", "schedule", "get", "set", "self", "tween", "timer", "elapsed", "start", "i", "n", "o", "stop", "timeout_default", "tick", "t", "interrupt_default", "node", "name", "schedules", "schedule", "active", "empty", "i", "STARTING", "ENDING", "ENDED", "interrupt_default", "name", "define_default", "constructor", "factory", "prototype", "extend", "parent", "definition", "key", "Color", "darker", "brighter", "reI", "reN", "reP", "reHex", "reRgbInteger", "reRgbPercent", "reRgbaInteger", "reRgbaPercent", "reHslPercent", "reHslaPercent", "named", "define_default", "color", "channels", "color_formatHex", "color_formatHex8", "color_formatHsl", "color_formatRgb", "hslConvert", "format", "m", "l", "rgbn", "Rgb", "rgba", "hsla", "n", "r", "g", "b", "rgbConvert", "o", "rgb", "opacity", "extend", "k", "clampi", "clampa", "rgb_formatHex", "rgb_formatHex8", "rgb_formatRgb", "hex", "a", "value", "h", "s", "Hsl", "min", "max", "hsl", "m2", "m1", "hsl2rgb", "clamph", "clampt", "basis", "t1", "v0", "v1", "v2", "v3", "t2", "t3", "basis_default", "values", "n", "t", "i", "basisClosed_default", "values", "n", "t", "i", "v0", "v1", "v2", "v3", "basis", "constant_default", "x", "linear", "a", "d", "t", "exponential", "b", "y", "gamma", "y", "nogamma", "a", "b", "exponential", "constant_default", "d", "linear", "rgb_default", "rgbGamma", "y", "color", "gamma", "rgb", "start", "end", "r", "g", "b", "opacity", "nogamma", "t", "rgbSpline", "spline", "colors", "n", "i", "rgbBasis", "basis_default", "rgbBasisClosed", "basisClosed_default", "numberArray_default", "a", "b", "n", "c", "i", "t", "isNumberArray", "x", "genericArray", "a", "b", "nb", "na", "x", "c", "i", "value_default", "t", "date_default", "a", "b", "d", "t", "number_default", "a", "b", "t", "object_default", "a", "b", "i", "c", "k", "value_default", "t", "reA", "reB", "zero", "b", "one", "string_default", "a", "bi", "am", "bm", "bs", "i", "s", "q", "number_default", "t", "o", "value_default", "a", "b", "t", "c", "constant_default", "number_default", "color", "rgb_default", "string_default", "date_default", "isNumberArray", "numberArray_default", "genericArray", "object_default", "degrees", "identity", "decompose_default", "a", "b", "c", "d", "e", "f", "scaleX", "scaleY", "skewX", "svgNode", "parseCss", "value", "m", "identity", "decompose_default", "parseSvg", "interpolateTransform", "parse", "pxComma", "pxParen", "degParen", "pop", "s", "translate", "xa", "ya", "xb", "yb", "q", "i", "number_default", "rotate", "a", "b", "skewX", "scale", "t", "n", "o", "interpolateTransformCss", "parseCss", "interpolateTransformSvg", "parseSvg", "tweenRemove", "id", "name", "tween0", "tween1", "schedule", "set", "tween", "i", "n", "tweenFunction", "value", "t", "tween_default", "get", "tweenValue", "transition", "node", "interpolate_default", "a", "b", "c", "number_default", "color", "rgb_default", "string_default", "attrRemove", "name", "attrRemoveNS", "fullname", "attrConstant", "interpolate", "value1", "string00", "string1", "interpolate0", "string0", "attrConstantNS", "attrFunction", "value", "string10", "attrFunctionNS", "attr_default", "namespace_default", "i", "interpolateTransformSvg", "interpolate_default", "tweenValue", "attrInterpolate", "name", "i", "t", "attrInterpolateNS", "fullname", "attrTweenNS", "value", "t0", "i0", "tween", "attrTween", "attrTween_default", "key", "namespace_default", "delayFunction", "id", "value", "init", "delayConstant", "delay_default", "get", "durationFunction", "id", "value", "set", "durationConstant", "duration_default", "get", "easeConstant", "id", "value", "set", "ease_default", "get", "easeVarying", "id", "value", "v", "set", "easeVarying_default", "filter_default", "match", "matcher_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "i", "Transition", "merge_default", "transition", "groups0", "groups1", "m0", "m1", "m", "merges", "j", "group0", "group1", "n", "merge", "node", "i", "Transition", "start", "name", "i", "onFunction", "id", "listener", "on0", "on1", "sit", "init", "set", "schedule", "on", "on_default", "get", "removeFunction", "id", "parent", "i", "remove_default", "select_default", "select", "name", "id", "selector_default", "groups", "subgroups", "j", "group", "n", "subgroup", "node", "subnode", "i", "schedule_default", "get", "Transition", "selectAll_default", "select", "name", "id", "selectorAll_default", "groups", "subgroups", "parents", "j", "group", "n", "node", "i", "children", "child", "inherit", "get", "k", "schedule_default", "Transition", "Selection", "selection_default", "styleNull", "name", "interpolate", "string00", "string10", "interpolate0", "string0", "styleValue", "string1", "styleRemove", "styleConstant", "value1", "styleFunction", "value", "styleMaybeRemove", "id", "on0", "on1", "listener0", "key", "event", "remove", "schedule", "set", "on", "listener", "style_default", "priority", "i", "interpolateTransformCss", "interpolate_default", "tweenValue", "styleInterpolate", "name", "i", "priority", "t", "styleTween", "value", "i0", "tween", "styleTween_default", "key", "textConstant", "value", "textFunction", "value1", "text_default", "tweenValue", "textInterpolate", "i", "textTween", "value", "t0", "i0", "tween", "textTween_default", "key", "transition_default", "name", "id0", "id1", "newId", "groups", "j", "group", "n", "node", "i", "inherit", "get", "schedule_default", "Transition", "end_default", "on0", "on1", "that", "id", "size", "resolve", "reject", "cancel", "end", "schedule", "set", "on", "id", "Transition", "groups", "parents", "name", "transition", "selection_default", "newId", "selection_prototype", "select_default", "selectAll_default", "filter_default", "merge_default", "transition_default", "on_default", "attr_default", "attrTween_default", "style_default", "styleTween_default", "text_default", "textTween_default", "remove_default", "tween_default", "delay_default", "duration_default", "ease_default", "easeVarying_default", "end_default", "cubicInOut", "t", "defaultTiming", "cubicInOut", "inherit", "node", "id", "timing", "transition_default", "name", "Transition", "newId", "now", "groups", "j", "group", "n", "i", "schedule_default", "selection_default", "interrupt_default", "transition_default", "EOL", "EOF", "QUOTE", "NEWLINE", "RETURN", "objectConverter", "columns", "name", "i", "customConverter", "f", "object", "row", "inferColumns", "rows", "columnSet", "column", "pad", "value", "width", "s", "length", "formatYear", "year", "formatDate", "date", "hours", "minutes", "seconds", "milliseconds", "dsv_default", "delimiter", "reFormat", "DELIMITER", "parse", "text", "convert", "parseRows", "N", "I", "n", "t", "eof", "eol", "token", "j", "c", "preformatBody", "formatValue", "format", "formatBody", "formatRows", "formatRow", "import_highcharts", "import_highcharts_more", "more", "Highcharts", "array8", "arrayUntyped", "array16", "array32", "arrayLengthen", "arrayLengthenUntyped", "arrayWiden", "arrayWidenUntyped", "n", "array", "length", "copy", "width", "i", "bitarray", "len", "m", "w", "one", "dest", "src", "j", "offset", "zero", "mask", "onlyOffset", "onlyOne", "array_default", "filterExact", "bisect", "value", "values", "n", "filterRange", "range", "min", "max", "filterAll", "filter_default", "identity_default", "d", "null_default", "zero_default", "heap_by", "f", "heap", "a", "lo", "hi", "n", "i", "sift", "sort", "t", "d", "x", "child", "h", "identity_default", "heap_default", "heapselect_by", "f", "heap", "heap_default", "heapselect", "lo", "hi", "k", "queue", "min", "i", "d", "h", "identity_default", "heapselect_default", "bisect_by", "f", "bisectLeft", "x", "lo", "hi", "mid", "bisectRight", "bisect", "identity_default", "bisect_default", "permute_default", "array", "index", "deep", "i", "n", "copy", "reduceIncrement", "p", "reduceDecrement", "reduceAdd", "f", "v", "reduceSubtract", "reduce_default", "action", "obj", "keys", "id", "key", "split", "splice", "get", "obj", "prop", "value", "reg", "result_default", "path", "deepobj_m_default", "REMOVED_INDEX", "crossfilter", "heap_default", "heapselect_default", "bisect_default", "permute_default", "src_default", "add", "removeData", "dimension", "groupAll", "size", "all", "allFiltered", "onChange", "isElementFiltered", "data", "n", "filters", "filterListeners", "dataListeners", "removeDataListeners", "callbacks", "array_default", "newData", "n0", "n1", "l", "triggerOnChange", "predicate", "newIndex", "removed", "usePred", "shouldRemove", "i", "index1", "index2", "index3", "index4", "maskForDimensions", "dimensions", "d", "len", "id", "mask", "ignore_dimensions", "value", "iterable", "accessorPath", "result_default", "filter", "filterExact", "filterRange", "filterFunction", "filterAll", "currentFilter", "hasCurrentFilter", "top", "bottom", "group", "dispose", "one", "zero", "offset", "values", "index", "newValues", "iterablesIndexCount", "iterablesIndexFilterStatus", "iterablesEmptyRows", "sortRange", "cr_range", "A", "B", "a", "b", "refilter", "filter_default", "refilterFunction", "filterValue", "filterValuePresent", "indexListeners", "dimensionGroups", "lo0", "hi0", "t", "k", "preAdd", "postAdd", "tmp", "newIterablesIndexCount", "newIterablesIndexFilterStatus", "j", "i0", "cr_index", "unsortedIndex", "sortMap", "bounds", "lo1", "hi1", "oldValues", "oldIndex", "oldIterablesIndexFilterStatus", "old_n0", "i1", "oldiiclength", "index5", "reIndex", "oldDataIndex", "filterIndexBounds", "filterIndexFunction", "added", "valueIndexAdded", "valueIndexRemoved", "newAdded", "newRemoved", "range", "f", "x", "indexLength", "top_offset", "array", "toSkip", "bottom_offset", "key", "reduce", "reduceCount", "reduceSum", "order", "orderNatural", "groups", "groupIndex", "groupWidth", "groupCapacity", "capacity", "select", "heap", "reduceAdd", "reduceRemove", "reduceInitial", "update", "null_default", "reset", "resetNeeded", "n0old", "identity_default", "oldGroups", "remove", "initial", "k0", "g0", "x0", "x1", "g", "groupIncrement", "updateMany", "resetMany", "updateOne", "resetOne", "oldK", "seenGroups", "filterOne", "filterOffset", "notFilter", "reduce_default", "zero_default", "valueOf", "reduceValue", "cb", "eventName", "m", "w", "ascending", "a", "b", "cf", "src_default", "data", "a", "b", "ascending", "cf_default", "reduceId", "p", "Reducer", "concatReducer", "reducers", "v", "reduceGroup", "reducerA", "reducerB", "reducer", "group", "average", "count", "sum", "key", "p", "bisect_by", "f", "bisectLeft", "x", "lo", "hi", "mid", "bisectRight", "bisect", "valueList", "valueAccessor", "key", "p", "v", "value", "idx", "bisect", "last", "l", "max", "valueAccessor", "key", "valuelist", "valueListReducer", "valueList", "maxReducer", "p", "Reducer", "min", "valueAccessor", "key", "valuelist", "valueListReducer", "valueList", "minReducer", "p", "Reducer", "sum", "valueAccessor", "key", "p", "v", "averageScoreReducer", "Reducer", "sum", "x", "_", "average", "getPercentile", "a", "p", "idx", "quartiles", "valueList", "setQuartiles", "l", "PlayerGameChart", "cf_default", "d", "game", "disc", "discOrder", "Reducer", "averageScoreReducer", "p", "v", "_all", "a", "b", "ascending", "genders", "categories", "i", "gender", "data", "total", "lastIdx", "lastSeries", "scoreReducer", "group", "g", "Reducer", "averageScoreReducer", "d", "bisectDescending", "src_default", "x", "avgAll", "all", "result", "i", "idx", "_charts", "chart_registry_default", "c", "idx", "AverageChart", "key", "d", "i", "filter", "avgAll", "_all", "_this", "chart_registry_default", "shouldRedraw", "keys", "values", "AgeChart", "AverageChart", "cf_default", "d", "scoreReducer", "PlayerGameChart", "AverageChart", "cf_default", "d", "scoreReducer", "height", "avgAll", "_all", "CountryChart", "AverageChart", "cf_default", "d", "scoreReducer", "height", "avgAll", "DisciplineChart", "AverageChart", "cf_default", "d", "scoreReducer", "GenderChart", "AverageChart", "cf_default", "d", "scoreReducer", "el", "HandChart", "AverageChart", "cf_default", "d", "scoreReducer", "formatDecimal_default", "x", "formatDecimalParts", "p", "i", "coefficient", "exponent_default", "x", "formatDecimalParts", "formatGroup_default", "grouping", "thousands", "value", "width", "i", "t", "j", "g", "length", "formatNumerals_default", "numerals", "value", "i", "re", "formatSpecifier", "specifier", "match", "FormatSpecifier", "formatTrim_default", "s", "out", "n", "i", "i0", "i1", "prefixExponent", "formatPrefixAuto_default", "x", "p", "d", "formatDecimalParts", "coefficient", "exponent", "i", "n", "formatRounded_default", "x", "p", "d", "formatDecimalParts", "coefficient", "exponent", "formatTypes_default", "x", "p", "formatDecimal_default", "formatRounded_default", "formatPrefixAuto_default", "identity_default", "x", "map", "prefixes", "locale_default", "locale", "group", "identity_default", "formatGroup_default", "currencyPrefix", "currencySuffix", "decimal", "numerals", "formatNumerals_default", "percent", "minus", "nan", "newFormat", "specifier", "formatSpecifier", "fill", "align", "sign", "symbol", "zero", "width", "comma", "precision", "trim", "type", "formatTypes_default", "prefix", "suffix", "formatType", "maybeSuffix", "format", "value", "valuePrefix", "valueSuffix", "i", "n", "c", "valueNegative", "formatTrim_default", "prefixExponent", "length", "padding", "formatPrefix", "f", "e", "exponent_default", "k", "locale", "format", "formatPrefix", "defaultLocale", "definition", "locale_default", "format", "universal_dim", "cf_default", "_", "NumberContainer", "anchor", "description", "reducer", "accessor", "select_default", "Reducer", "_value", "_sel", "d", "i", "value_default", "t", "LanePairChart", "AverageChart", "cf_default", "d", "reducer", "Reducer", "averageScoreReducer", "valueList", "x", "quartiles", "arr", "b", "_all", "formatNumber", "format", "reduceAdd", "p", "v", "game", "reduceRemove", "reduceInitial", "headings", "Table", "cf_default", "d", "select_default", "data", "_sel", "row", "k", "i", "b", "sorts", "ascending", "ssv", "dsv_default", "init", "data", "cf_default", "chart_registry_default", "PlayerGameChart", "CountryChart", "DisciplineChart", "GenderChart", "HandChart", "LanePairChart", "AgeChart", "Table", "NumberContainer", "min", "x", "d", "max", "averageScoreReducer", "sum", "response"] }