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OAJAkzB,EAASlzB,QAAU,SAASA,GAC1B,OAAOizB,GAAQjzB,EACjB,EAEOkzB,CACR,CAXD,CAWG,E","sources":["webpack://@amcharts/amcharts5/./src/.internal/charts/xy/XYChart.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/XYChartDefaultTheme.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/XYCursor.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/axes/Axis.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/axes/AxisLabel.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/axes/AxisLabelRadial.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/axes/AxisRenderer.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/axes/AxisRendererX.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/axes/AxisRendererY.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/axes/AxisTick.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/axes/DateAxis.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/axes/GaplessDateAxis.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/axes/Grid.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/axes/ValueAxis.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/series/BaseColumnSeries.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/series/Candlestick.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/series/CandlestickSeries.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/series/ColumnSeries.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/series/LineSeries.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/series/XYSeries.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/XYChartScrollbar.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/axes/CategoryAxis.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/axes/CategoryDateAxis.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/axes/DurationAxis.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/axes/AxisBullet.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/series/OHLC.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/series/OHLCSeries.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/series/SmoothedYLineSeries.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/series/SmoothedXLineSeries.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/series/SmoothedXYLineSeries.ts","webpack://@amcharts/amcharts5/./node_modules/d3-shape/src/curve/step.js","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/series/StepLineSeries.ts","webpack://@amcharts/amcharts5/./tmp/webpack/xy.js","webpack://@amcharts/amcharts5/./node_modules/d3-shape/src/curve/cardinal.js"],"sourcesContent":["import type { Axis } from \"./axes/Axis\";\nimport type { XYCursor } from \"./XYCursor\";\nimport type { AxisRenderer } from \"./axes/AxisRenderer\";\nimport type { DataItem } from \"../../core/render/Component\";\nimport type { IDisposer } from \"../../core/util/Disposer\";\nimport type { XYSeries, IXYSeriesDataItem } from \"./series/XYSeries\";\nimport type { IPointerEvent } from \"../../core/render/backend/Renderer\";\nimport type { Scrollbar } from \"../../core/render/Scrollbar\";\nimport type { Tooltip } from \"../../core/render/Tooltip\";\nimport type { IPoint } from \"../../core/util/IPoint\";\n\nimport { XYChartDefaultTheme } from \"./XYChartDefaultTheme\";\nimport { Container } from \"../../core/render/Container\";\nimport { Rectangle } from \"../../core/render/Rectangle\";\nimport { SerialChart, ISerialChartPrivate, ISerialChartSettings, ISerialChartEvents } from \"../../core/render/SerialChart\";\nimport { ListAutoDispose } from \"../../core/util/List\";\nimport { p100 } from \"../../core/util/Percent\";\nimport { Color } from \"../../core/util/Color\";\nimport { Button } from \"../../core/render/Button\";\nimport { Graphics } from \"../../core/render/Graphics\";\nimport { Percent } from \"../../core/util/Percent\";\n\nimport * as $array from \"../../core/util/Array\";\nimport * as $type from \"../../core/util/Type\";\nimport * as $order from \"../../core/util/Order\";\nimport * as $object from \"../../core/util/Object\";\nimport * as $utils from \"../../core/util/Utils\";\nimport type { Animation } from \"../../core/util/Entity\";\n\nexport interface IXYChartSettings extends ISerialChartSettings {\n\n\t/**\n\t * horizontal scrollbar.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/scrollbars/} for more info\n\t */\n\tscrollbarX?: Scrollbar;\n\n\t/**\n\t * Vertical scrollbar.\n\t *\n\t */\n\tscrollbarY?: Scrollbar;\n\n\t/**\n\t * If this is set to `true`, users will be able to pan the chart horizontally\n\t * by dragging plot area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Panning} for more info\n\t */\n\tpanX?: boolean;\n\n\t/**\n\t * If this is set to `true`, users will be able to pan the chart vertically\n\t * by dragging plot area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Panning} for more info\n\t */\n\tpanY?: boolean;\n\n\t/**\n\t * Indicates what happens when mouse wheel is spinned horizontally while over\n\t * plot area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Mouse_wheel_behavior} for more info\n\t */\n\twheelX?: \"zoomX\" | \"zoomY\" | \"zoomXY\" | \"panX\" | \"panY\" | \"panXY\" | \"none\";\n\n\t/**\n\t * Indicates what happens when mouse wheel is spinned vertically while over\n\t * plot area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Mouse_wheel_behavior} for more info\n\t */\n\twheelY?: \"zoomX\" | \"zoomY\" | \"zoomXY\" | \"panX\" | \"panY\" | \"panXY\" | \"none\";\n\n\t/**\n\t * Indicates the relative \"speed\" of the mouse wheel.\n\t *\n\t * @default 0.25\n\t */\n\twheelStep?: number;\n\n\t/**\n\t * Chart's cursor.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/} for more info\n\t */\n\tcursor?: XYCursor;\n\n\t/**\n\t * If not set (default), cursor will show tooltips for all data items in the\n\t * same category/date.\n\t * \n\t * If set, cursor will select closest data item to pointer (mouse or touch) and\n\t * show tooltip for it.\n\t *\n\t * It will also show tooltips for all data items that are within X pixels\n\t * range (as set in `maxTooltipDistance`).\n\t *\n\t * Tooltips for data items farther then X pixels, will not be shown.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/#Tooltips} for more info\n\t */\n\tmaxTooltipDistance?: number;\n\n\t/**\n\t * Indicates how the distance should be measured when assessing distance\n\t * between tooltips as set in `maxTooltipDistance`.\n\t * \n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/#Tooltips} for more info\n\t * @since 5.2.6\n\t */\n\tmaxTooltipDistanceBy?: \"xy\" | \"x\" | \"y\";\n\n\t/**\n\t * If set to `false` the chart will not check for overlapping of multiple\n\t * tooltips, and will not arrange them to not overlap.\n\t *\n\t * Will work only if chart has an `XYCursor` enabled.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/#Tooltips} for more info\n\t * @default true\n\t */\n\tarrangeTooltips?: boolean\n\n\t/**\n\t * If set to `true`, using pinch gesture on the chart's plot area will zoom\n\t * chart horizontally.\n\t *\n\t * NOTE: this setting is not supported in a [[RadarChart]].\n\t * \n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Pinch_zoom} for more info\n\t * @since 5.1.8\n\t * @default false\n\t */\n\tpinchZoomX?: boolean;\n\n\t/**\n\t * If set to `true`, using pinch gesture on the chart's plot area will zoom\n\t * chart vertically.\n\t * \n\t * NOTE: this setting is not supported in a [[RadarChart]].\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Pinch_zoom} for more info\n\t * @since 5.1.8\n\t * @default false\n\t */\n\tpinchZoomY?: boolean;\n\n\t/**\n\t * If set, will use this relative position as a \"center\" for mouse wheel\n\t * horizontal zooming instead of actual cursor position.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Mouse_wheel_behavior} for more info\n\t * @since 5.2.11\n\t */\n\twheelZoomPositionX?: number;\n\n\t/**\n\t * If set, will use this relative position as a \"center\" for mouse wheel\n\t * vertical zooming instead of actual cursor position.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Mouse_wheel_behavior} for more info\n\t * @since 5.2.11\n\t */\n\twheelZoomPositionY?: number;\n\n}\n\nexport interface IXYChartPrivate extends ISerialChartPrivate {\n\n\t/**\n\t * A list of [[Series]] that currently have their tooltip being displayed.\n\t */\n\ttooltipSeries?: Array\n\n\t/**\n\t * Array of other [[XYChart]] objects that cursors should be synced with.\n\t * \n\t * Note: cursors will be synced across the vertically stacked charts only.\n\t */\n\totherCharts?: Array\n\n}\n\n\nexport interface IXYChartEvents extends ISerialChartEvents {\n\n\t/**\n\t * Invoked when panning starts.\n\t *\n\t * @since 5.0.4\n\t */\n\tpanstarted: {\n\t\toriginalEvent: IPointerEvent\n\t};\n\n\t/**\n\t * Invoked when panning ends.\n\t *\n\t * @since 5.0.4\n\t */\n\tpanended: {\n\t\toriginalEvent: IPointerEvent\n\t};\n\n\t/**\n\t * Invoked if pointer is pressed down on a chart and released without moving.\n\t *\n\t * `panended` event will still kick in after that.\n\t * \n\t * @since 5.2.19\n\t */\n\tpancancelled: {\n\t\toriginalEvent: IPointerEvent\n\t};\n\n\t/**\n\t * Invoked when wheel caused zoom ends.\n\t *\n\t * @since 5.0.4\n\t */\n\twheelended: {};\n\n}\n\n/**\n * Creates an XY chart.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/} for more info\n * @important\n */\nexport class XYChart extends SerialChart {\n\n\tpublic static className: string = \"XYChart\";\n\tpublic static classNames: Array = SerialChart.classNames.concat([XYChart.className]);\n\n\tdeclare public _settings: IXYChartSettings;\n\tdeclare public _privateSettings: IXYChartPrivate;\n\tdeclare public _seriesType: XYSeries;\n\tdeclare public _events: IXYChartEvents;\n\n\t/**\n\t * A list of horizontal axes.\n\t */\n\tpublic readonly xAxes: ListAutoDispose> = new ListAutoDispose();\n\n\t/**\n\t * A list of vertical axes.\n\t */\n\tpublic readonly yAxes: ListAutoDispose> = new ListAutoDispose();\n\n\t/**\n\t * A [[Container]] located on top of the chart, used to store top horizontal\n\t * axes.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly topAxesContainer: Container = this.chartContainer.children.push(Container.new(this._root, { width: p100, layout: this._root.verticalLayout }));\n\n\t/**\n\t * A [[Container]] located in the middle the chart, used to store vertical axes\n\t * and plot area container.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly yAxesAndPlotContainer: Container = this.chartContainer.children.push(Container.new(this._root, { width: p100, height: p100, layout: this._root.horizontalLayout }));\n\n\t/**\n\t * A [[Container]] located on bottom of the chart, used to store bottom\n\t * horizontal axes.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly bottomAxesContainer: Container = this.chartContainer.children.push(Container.new(this._root, { width: p100, layout: this._root.verticalLayout }));\n\n\t/**\n\t * A [[Container]] located on left of the chart, used to store left-hand\n\t * vertical axes.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly leftAxesContainer: Container = this.yAxesAndPlotContainer.children.push(Container.new(this._root, { height: p100, layout: this._root.horizontalLayout }));\n\n\t/**\n\t * A [[Container]] located in the middle of the chart, used to store plotContainer and topPlotContainer\t \n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly plotsContainer: Container = this.yAxesAndPlotContainer.children.push(Container.new(this._root, { width: p100, height: p100, maskContent: false }));\n\n\t/**\n\t * A [[Container]] located in the middle of the chart, used to store actual\n\t * plots (series).\n\t * \n\t * NOTE: `plotContainer` will automatically have its `background` preset. If\n\t * you need to modify background or outline for chart's plot area, you can\n\t * use `plotContainer.get(\"background\")` for that.* \n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly plotContainer: Container = this.plotsContainer.children.push(Container.new(this._root, { width: p100, height: p100 }));\n\n\t/**\n\t * A [[Container]] used for any elements that need to be displayed over\n\t * regular `plotContainer`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly topPlotContainer: Container = this.plotsContainer.children.push(Container.new(this._root, { width: p100, height: p100 }));\n\n\t/**\n\t * A [[Container]] axis grid elements are stored in.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly gridContainer: Container = this.plotContainer.children.push(Container.new(this._root, { width: p100, height: p100, isMeasured: false }));\n\n\t/**\n\t * A [[Container]] axis background grid elements are stored in.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly topGridContainer: Container = Container.new(this._root, { width: p100, height: p100, isMeasured: false });\n\n\t/**\n\t * A [[Container]] located on right of the chart, used to store right-hand\n\t * vertical axes.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/xy-chart-containers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly rightAxesContainer: Container = this.yAxesAndPlotContainer.children.push(Container.new(this._root, { height: p100, layout: this._root.horizontalLayout }));\n\n\t/**\n\t * A [[Container]] axis headers are stored in.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-headers/} for more info\n\t * @default Container.new()\n\t */\n\tpublic readonly axisHeadersContainer: Container = this.plotContainer.children.push(Container.new(this._root, {}));\n\n\t/**\n\t * A button that is shown when chart is not fully zoomed out.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Zoom_out_button} for more info\n\t * @default Button.new()\n\t */\n\tpublic readonly zoomOutButton: Button = this.topPlotContainer.children.push(Button.new(this._root, {\n\t\tthemeTags: [\"zoom\"],\n\t\ticon: Graphics.new(this._root, {\n\t\t\tthemeTags: [\"button\", \"icon\"]\n\t\t})\n\t}));\n\n\tpublic _movePoint: IPoint = { x: 0, y: 0 };\n\n\tprotected _wheelDp: IDisposer | undefined;\n\n\tpublic _otherCharts?: Array;\n\n\tprotected _movePoints: { [index: number]: IPoint } = {};\n\n\tprotected _downStartX?: number;\n\tprotected _downEndX?: number;\n\n\tprotected _downStartY?: number;\n\tprotected _downEndY?: number;\n\n\tprotected _afterNew() {\n\t\tthis._defaultThemes.push(XYChartDefaultTheme.new(this._root));\n\n\t\tsuper._afterNew();\n\n\t\tthis._disposers.push(this.xAxes);\n\t\tthis._disposers.push(this.yAxes);\n\n\t\tconst root = this._root;\n\n\t\tlet verticalLayout = this._root.verticalLayout;\n\n\t\tconst zoomOutButton = this.zoomOutButton;\n\t\tzoomOutButton.events.on(\"click\", () => {\n\t\t\tthis.zoomOut();\n\t\t})\n\t\tzoomOutButton.set(\"opacity\", 0);\n\t\tzoomOutButton.states.lookup(\"default\")!.set(\"opacity\", 1);\n\n\t\tthis.chartContainer.set(\"layout\", verticalLayout);\n\n\t\tconst plotContainer = this.plotContainer;\n\t\tplotContainer.children.push(this.seriesContainer);\n\n\t\tthis._disposers.push(this._processAxis(this.xAxes, this.bottomAxesContainer));\n\t\tthis._disposers.push(this._processAxis(this.yAxes, this.leftAxesContainer));\n\n\n\t\tplotContainer.children.push(this.topGridContainer);\n\t\tplotContainer.children.push(this.bulletsContainer);\n\n\t\t// Setting trasnparent background so that full body of the plot container\n\t\t// is interactive\n\t\tplotContainer.set(\"interactive\", true);\n\t\tplotContainer.set(\"interactiveChildren\", false);\n\t\tplotContainer.set(\"background\", Rectangle.new(root, {\n\t\t\tthemeTags: [\"xy\", \"background\"],\n\t\t\tfill: Color.fromHex(0x000000),\n\t\t\tfillOpacity: 0\n\t\t}));\n\n\t\tthis._disposers.push(plotContainer.events.on(\"pointerdown\", (event) => {\n\t\t\tthis._handlePlotDown(event.originalEvent);\n\t\t}));\n\n\t\tthis._disposers.push(plotContainer.events.on(\"globalpointerup\", (event) => {\n\t\t\tthis._handlePlotUp(event.originalEvent);\n\t\t}));\n\n\t\tthis._disposers.push(plotContainer.events.on(\"globalpointermove\", (event) => {\n\t\t\tthis._handlePlotMove(event.originalEvent);\n\t\t}));\n\n\t\tthis._maskGrid();\n\t\tthis._setUpTouch();\n\t}\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"pinchZoomX\") || this.isDirty(\"pinchZoomY\") || this.get(\"panX\") || this.get(\"panY\")) {\n\t\t\tthis._setUpTouch();\n\t\t}\n\n\t}\n\n\tprotected _setUpTouch(): void {\n\t\tif (!this.plotContainer._display.cancelTouch) {\n\t\t\tthis.plotContainer._display.cancelTouch = (this.get(\"pinchZoomX\") || this.get(\"pinchZoomY\") || this.get(\"panX\") || this.get(\"panY\")) ? true : false;\n\t\t}\n\t}\n\n\tprotected _maskGrid() {\n\t\tthis.gridContainer.set(\"maskContent\", true);\n\t\tthis.topGridContainer.set(\"maskContent\", true);\n\t}\n\n\tprotected _removeSeries(series: this[\"_seriesType\"]) {\n\t\tconst xAxis = series.get(\"xAxis\");\n\t\tif (xAxis) {\n\t\t\t$array.remove(xAxis.series, series);\n\t\t\txAxis.markDirtyExtremes();\n\t\t}\n\t\tconst yAxis = series.get(\"yAxis\");\n\t\tif (yAxis) {\n\t\t\t$array.remove(yAxis.series, series);\n\t\t\tyAxis.markDirtyExtremes();\n\t\t}\n\n\t\tconst cursor = this.get(\"cursor\");\n\t\tif (cursor) {\n\t\t\tconst snapToSeries = cursor.get(\"snapToSeries\");\n\t\t\tif (snapToSeries) {\n\t\t\t\t$array.remove(snapToSeries, series);\n\t\t\t}\n\t\t}\n\n\t\tsuper._removeSeries(series);\n\t}\n\n\t/**\n\t * This method is invoked when mouse wheel is used over chart's plot\n\t * container, and handles zooming/pan.\n\t *\n\t * You can invoke this method manually, if you need to mimic chart's wheel\n\t * behavior over other elements of the chart.\n\t */\n\tpublic handleWheel(event: { originalEvent: WheelEvent, point: IPoint, target: Container }) {\n\t\tconst wheelX = this.get(\"wheelX\");\n\t\tconst wheelY = this.get(\"wheelY\");\n\t\tconst plotContainer = this.plotContainer;\n\n\t\tconst wheelEvent = event.originalEvent;\n\n\t\t// Ignore wheel event if it is happening on a non-chart element, e.g. if\n\t\t// some page element is over the chart.\n\t\tif ($utils.isLocalEvent(wheelEvent, this)) {\n\t\t\twheelEvent.preventDefault();\n\t\t}\n\t\telse {\n\t\t\treturn;\n\t\t}\n\n\t\tconst plotPoint = plotContainer.toLocal(this._root.documentPointToRoot({ x: wheelEvent.clientX, y: wheelEvent.clientY }))\n\t\tconst wheelStep = this.get(\"wheelStep\", 0.2);\n\n\t\tconst shiftY = wheelEvent.deltaY / 100;\n\t\tconst shiftX = wheelEvent.deltaX / 100;\n\n\t\tconst wheelZoomPositionX = this.get(\"wheelZoomPositionX\");\n\t\tconst wheelZoomPositionY = this.get(\"wheelZoomPositionY\");\n\n\t\tif ((wheelX === \"zoomX\" || wheelX === \"zoomXY\") && shiftX != 0) {\n\t\t\tthis.xAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"zoomX\")) {\n\t\t\t\t\tlet start = axis.get(\"start\")!;\n\t\t\t\t\tlet end = axis.get(\"end\")!;\n\n\t\t\t\t\tlet position = axis.fixPosition(plotPoint.x / plotContainer.width());\n\n\t\t\t\t\tif (wheelZoomPositionX != null) {\n\t\t\t\t\t\tposition = wheelZoomPositionX;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet newStart = start - wheelStep * (end - start) * shiftX * position;\n\t\t\t\t\tlet newEnd = end + wheelStep * (end - start) * shiftX * (1 - position);\n\t\t\t\t\tif (1 / (newEnd - newStart) < axis.getPrivate(\"maxZoomFactor\", Infinity) / axis.get(\"minZoomCount\", 1)) {\n\t\t\t\t\t\tthis._handleWheelAnimation(axis.zoom(newStart, newEnd));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tif ((wheelY === \"zoomX\" || wheelY === \"zoomXY\") && shiftY != 0) {\n\t\t\tthis.xAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"zoomX\")) {\n\t\t\t\t\tlet start = axis.get(\"start\")!;\n\t\t\t\t\tlet end = axis.get(\"end\")!;\n\n\t\t\t\t\tlet position = axis.fixPosition(plotPoint.x / plotContainer.width());\n\n\t\t\t\t\tif (wheelZoomPositionX != null) {\n\t\t\t\t\t\tposition = wheelZoomPositionX;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet newStart = start - wheelStep * (end - start) * shiftY * position;\n\t\t\t\t\tlet newEnd = end + wheelStep * (end - start) * shiftY * (1 - position);\n\n\t\t\t\t\tif (1 / (newEnd - newStart) < axis.getPrivate(\"maxZoomFactor\", Infinity) / axis.get(\"minZoomCount\", 1)) {\n\t\t\t\t\t\tthis._handleWheelAnimation(axis.zoom(newStart, newEnd));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\n\t\tif ((wheelX === \"zoomY\" || wheelX === \"zoomXY\") && shiftX != 0) {\n\t\t\tthis.yAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"zoomY\")) {\n\t\t\t\t\tlet start = axis.get(\"start\")!;\n\t\t\t\t\tlet end = axis.get(\"end\")!;\n\n\t\t\t\t\tlet position = axis.fixPosition(plotPoint.y / plotContainer.height());\n\n\t\t\t\t\tif (wheelZoomPositionY != null) {\n\t\t\t\t\t\tposition = wheelZoomPositionY;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet newStart = start - wheelStep * (end - start) * shiftX * position;\n\t\t\t\t\tlet newEnd = end + wheelStep * (end - start) * shiftX * (1 - position);\n\n\t\t\t\t\tif (1 / (newEnd - newStart) < axis.getPrivate(\"maxZoomFactor\", Infinity) / axis.get(\"minZoomCount\", 1)) {\n\t\t\t\t\t\tthis._handleWheelAnimation(axis.zoom(newStart, newEnd));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tif ((wheelY === \"zoomY\" || wheelY === \"zoomXY\") && shiftY != 0) {\n\t\t\tthis.yAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"zoomY\")) {\n\t\t\t\t\tlet start = axis.get(\"start\")!;\n\t\t\t\t\tlet end = axis.get(\"end\")!;\n\n\t\t\t\t\tlet position = axis.fixPosition(plotPoint.y / plotContainer.height());\n\n\t\t\t\t\tif (wheelZoomPositionY != null) {\n\t\t\t\t\t\tposition = wheelZoomPositionY;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet newStart = start - wheelStep * (end - start) * shiftY * position;\n\t\t\t\t\tlet newEnd = end + wheelStep * (end - start) * shiftY * (1 - position);\n\n\t\t\t\t\tif (1 / (newEnd - newStart) < axis.getPrivate(\"maxZoomFactor\", Infinity) / axis.get(\"minZoomCount\", 1)) {\n\t\t\t\t\t\tthis._handleWheelAnimation(axis.zoom(newStart, newEnd));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\n\t\tif ((wheelX === \"panX\" || wheelX === \"panXY\") && shiftX != 0) {\n\t\t\tthis.xAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"panX\")) {\n\t\t\t\t\tlet start = axis.get(\"start\")!;\n\t\t\t\t\tlet end = axis.get(\"end\")!;\n\n\t\t\t\t\tlet delta = this._getWheelSign(axis) * wheelStep * (end - start) * shiftX;\n\t\t\t\t\tlet newStart = start + delta;\n\t\t\t\t\tlet newEnd = end + delta;\n\n\t\t\t\t\tlet se = this._fixWheel(newStart, newEnd);\n\t\t\t\t\tnewStart = se[0];\n\t\t\t\t\tnewEnd = se[1];\n\n\t\t\t\t\tthis._handleWheelAnimation(axis.zoom(newStart, newEnd));\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tif ((wheelY === \"panX\" || wheelY === \"panXY\") && shiftY != 0) {\n\t\t\tthis.xAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"panX\")) {\n\t\t\t\t\tlet start = axis.get(\"start\")!;\n\t\t\t\t\tlet end = axis.get(\"end\")!;\n\n\t\t\t\t\tlet delta = this._getWheelSign(axis) * wheelStep * (end - start) * shiftY;\n\t\t\t\t\tlet newStart = start + delta;\n\t\t\t\t\tlet newEnd = end + delta;\n\n\t\t\t\t\tlet se = this._fixWheel(newStart, newEnd);\n\t\t\t\t\tnewStart = se[0];\n\t\t\t\t\tnewEnd = se[1];\n\n\t\t\t\t\tthis._handleWheelAnimation(axis.zoom(newStart, newEnd));\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tif ((wheelX === \"panY\" || wheelX === \"panXY\") && shiftX != 0) {\n\t\t\tthis.yAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"panY\")) {\n\t\t\t\t\tlet start = axis.get(\"start\")!;\n\t\t\t\t\tlet end = axis.get(\"end\")!;\n\n\t\t\t\t\tlet delta = this._getWheelSign(axis) * wheelStep * (end - start) * shiftX;\n\t\t\t\t\tlet newStart = start + delta;\n\t\t\t\t\tlet newEnd = end + delta;\n\n\t\t\t\t\tlet se = this._fixWheel(newStart, newEnd);\n\t\t\t\t\tnewStart = se[0];\n\t\t\t\t\tnewEnd = se[1];\n\n\t\t\t\t\tthis._handleWheelAnimation(axis.zoom(newStart, newEnd));\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tif ((wheelY === \"panY\" || wheelY === \"panXY\") && shiftY != 0) {\n\t\t\tthis.yAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"panY\")) {\n\t\t\t\t\tlet start = axis.get(\"start\")!;\n\t\t\t\t\tlet end = axis.get(\"end\")!;\n\n\t\t\t\t\tlet delta = this._getWheelSign(axis) * wheelStep * (end - start) * shiftY;\n\t\t\t\t\tlet newStart = start - delta;\n\t\t\t\t\tlet newEnd = end - delta;\n\n\t\t\t\t\tlet se = this._fixWheel(newStart, newEnd);\n\t\t\t\t\tnewStart = se[0];\n\t\t\t\t\tnewEnd = se[1];\n\n\t\t\t\t\tthis._handleWheelAnimation(axis.zoom(newStart, newEnd));\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _handleSetWheel() {\n\t\tconst wheelX = this.get(\"wheelX\");\n\t\tconst wheelY = this.get(\"wheelY\");\n\t\tconst plotContainer = this.plotContainer;\n\n\t\tif (wheelX !== \"none\" || wheelY !== \"none\") {\n\t\t\tthis._wheelDp = plotContainer.events.on(\"wheel\", (event) => {\n\t\t\t\tthis.handleWheel(event);\n\t\t\t});\n\n\t\t\tthis._disposers.push(this._wheelDp);\n\t\t}\n\t\telse {\n\t\t\tif (this._wheelDp) {\n\t\t\t\tthis._wheelDp.dispose();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _getWheelSign(axis: Axis) {\n\t\tlet sign = 1;\n\t\tif (axis.get(\"renderer\").get(\"inversed\")) {\n\t\t\tsign = -1;\n\t\t}\n\n\t\treturn sign\n\t}\n\n\tprotected _fixWheel(start: number, end: number): [number, number] {\n\t\tconst diff = end - start;\n\t\tif (start < 0) {\n\t\t\tstart = 0;\n\t\t\tend = start + diff;\n\t\t}\n\t\tif (end > 1) {\n\t\t\tend = 1;\n\t\t\tstart = end - diff;\n\t\t}\n\n\t\treturn [start, end];\n\t}\n\n\tprotected _handlePlotDown(event: IPointerEvent) {\n\t\tif((event as any).button == 2){\n\t\t\treturn;\n\t\t}\n\t\tconst plotContainer = this.plotContainer;\n\t\tlet local = plotContainer.toLocal(this._root.documentPointToRoot({ x: event.clientX, y: event.clientY }));\n\n\t\tif (this.get(\"pinchZoomX\") || this.get(\"pinchZoomY\")) {\n\n\t\t\tconst touchEvent = event as any;\n\t\t\tconst pointerId = touchEvent.pointerId;\n\n\t\t\tif (pointerId) {\n\n\t\t\t\tif ($object.keys(plotContainer._downPoints).length > 0) {\n\t\t\t\t\tconst xAxis = this.xAxes.getIndex(0);\n\t\t\t\t\tconst yAxis = this.yAxes.getIndex(0);\n\n\n\t\t\t\t\tif (xAxis) {\n\t\t\t\t\t\tthis._downStartX = xAxis.get(\"start\", 0);\n\t\t\t\t\t\tthis._downEndX = xAxis.get(\"end\", 1);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (yAxis) {\n\t\t\t\t\t\tthis._downStartY = yAxis.get(\"start\", 0);\n\t\t\t\t\t\tthis._downEndY = yAxis.get(\"end\", 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.get(\"panX\") || this.get(\"panY\")) {\n\n\t\t\tif (local.x >= 0 && local.y >= 0 && local.x <= plotContainer.width() && local.y <= this.height()) {\n\t\t\t\t//this._downPoint = local;\n\t\t\t\tthis._downPoint = { x: event.clientX, y: event.clientY };\n\n\t\t\t\tconst panX = this.get(\"panX\");\n\t\t\t\tconst panY = this.get(\"panY\");\n\n\t\t\t\tif (panX) {\n\t\t\t\t\tthis.xAxes.each((axis) => {\n\t\t\t\t\t\taxis._panStart = axis.get(\"start\")!;\n\t\t\t\t\t\taxis._panEnd = axis.get(\"end\")!;\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tif (panY) {\n\t\t\t\t\tthis.yAxes.each((axis) => {\n\t\t\t\t\t\taxis._panStart = axis.get(\"start\")!;\n\t\t\t\t\t\taxis._panEnd = axis.get(\"end\")!;\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tconst eventType = \"panstarted\";\n\t\t\t\tif (this.events.isEnabled(eventType)) {\n\t\t\t\t\tthis.events.dispatch(eventType, { type: eventType, target: this, originalEvent: event });\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _handleWheelAnimation(animation?: Animation) {\n\t\tif (animation) {\n\t\t\tanimation.events.on(\"stopped\", () => {\n\t\t\t\tthis._dispatchWheelAnimation();\n\t\t\t})\n\t\t}\n\t\telse {\n\t\t\tthis._dispatchWheelAnimation();\n\t\t}\n\t}\n\n\tprotected _dispatchWheelAnimation() {\n\t\tconst eventType = \"wheelended\";\n\t\tif (this.events.isEnabled(eventType)) {\n\t\t\tthis.events.dispatch(eventType, { type: eventType, target: this });\n\t\t}\n\t}\n\n\tprotected _handlePlotUp(event: IPointerEvent) {\n\t\tconst downPoint = this._downPoint;\n\t\tif (downPoint) {\n\t\t\tif (this.get(\"panX\") || this.get(\"panY\")) {\n\t\t\t\tlet local = this.plotContainer.toLocal(this._root.documentPointToRoot({ x: event.clientX, y: event.clientY }));\n\t\t\t\tif (local.x == downPoint.x && local.y == downPoint.y) {\n\t\t\t\t\tconst eventType = \"pancancelled\";\n\t\t\t\t\tif (this.events.isEnabled(eventType)) {\n\t\t\t\t\t\tthis.events.dispatch(eventType, { type: eventType, target: this, originalEvent: event });\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst eventType = \"panended\";\n\t\t\t\tif (this.events.isEnabled(eventType)) {\n\t\t\t\t\tthis.events.dispatch(eventType, { type: eventType, target: this, originalEvent: event });\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// TODO: handle multitouch\n\t\tthis._downPoint = undefined;\n\t\tthis.xAxes.each((xAxis) => {\n\t\t\txAxis._isPanning = false;\n\t\t})\n\t\tthis.yAxes.each((yAxis) => {\n\t\t\tyAxis._isPanning = false;\n\t\t})\n\t}\n\n\tprotected _handlePlotMove(event: IPointerEvent) {\n\t\tconst plotContainer = this.plotContainer;\n\n\t\tif (this.get(\"pinchZoomX\") || this.get(\"pinchZoomY\")) {\n\t\t\tconst touchEvent = event as any;\n\t\t\tconst pointerId = touchEvent.pointerId;\n\n\t\t\tif (pointerId) {\n\t\t\t\tthis._movePoints[pointerId] = this._root.documentPointToRoot({ x: event.clientX, y: event.clientY });\n\n\t\t\t\tif ($object.keys(plotContainer._downPoints).length > 1) {\n\t\t\t\t\tthis._handlePinch();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlet downPoint = this._downPoint!;\n\n\t\tif (downPoint) {\n\n\t\t\tdownPoint = plotContainer.toLocal(this._root.documentPointToRoot(downPoint));\n\t\t\tlet local = plotContainer.toLocal(this._root.documentPointToRoot({ x: event.clientX, y: event.clientY }));\n\n\t\t\tconst panX = this.get(\"panX\");\n\t\t\tconst panY = this.get(\"panY\");\n\n\t\t\tif (panX) {\n\n\t\t\t\tlet scrollbarX = this.get(\"scrollbarX\");\n\t\t\t\tif (scrollbarX) {\n\t\t\t\t\tscrollbarX.events.disableType(\"rangechanged\");\n\t\t\t\t}\n\n\t\t\t\tthis.xAxes.each((axis) => {\n\t\t\t\t\tif (axis.get(\"panX\")) {\n\t\t\t\t\t\taxis._isPanning = true;\n\t\t\t\t\t\t//const maxDeviation = axis.get(\"maxDeviation\", 0);\n\t\t\t\t\t\tlet panStart = axis._panStart;\n\t\t\t\t\t\tlet panEnd = axis._panEnd;\n\t\t\t\t\t\tlet difference = (panEnd - panStart);\n\t\t\t\t\t\tlet deltaX = difference * (downPoint.x - local.x) / plotContainer.width();\n\n\t\t\t\t\t\tif (axis.get(\"renderer\").get(\"inversed\")) {\n\t\t\t\t\t\t\tdeltaX *= -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet start = panStart + deltaX;\n\t\t\t\t\t\tlet end = panEnd + deltaX;\n\n\t\t\t\t\t\tif (end - start < 1 + axis.get(\"maxDeviation\", 1) * 2) {\n\t\t\t\t\t\t\taxis.set(\"start\", start);\n\t\t\t\t\t\t\taxis.set(\"end\", end);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tif (scrollbarX) {\n\t\t\t\t\tscrollbarX.events.enableType(\"rangechanged\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (panY) {\n\n\t\t\t\tlet scrollbarY = this.get(\"scrollbarY\");\n\t\t\t\tif (scrollbarY) {\n\t\t\t\t\tscrollbarY.events.disableType(\"rangechanged\");\n\t\t\t\t}\n\n\t\t\t\tthis.yAxes.each((axis) => {\n\t\t\t\t\tif (axis.get(\"panY\")) {\n\t\t\t\t\t\taxis._isPanning = true;\n\t\t\t\t\t\t//const maxDeviation = axis.get(\"maxDeviation\", 0);\n\n\t\t\t\t\t\tlet panStart = axis._panStart;\n\t\t\t\t\t\tlet panEnd = axis._panEnd;\n\t\t\t\t\t\tlet difference = (panEnd - panStart);\n\t\t\t\t\t\tlet deltaY = difference * (downPoint.y - local.y) / plotContainer.height();\n\t\t\t\t\t\tif (axis.get(\"renderer\").get(\"inversed\")) {\n\t\t\t\t\t\t\tdeltaY *= -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet start = panStart - deltaY;\n\t\t\t\t\t\tlet end = panEnd - deltaY;\n\n\t\t\t\t\t\tif (end - start < 1 + axis.get(\"maxDeviation\", 1) * 2) {\n\t\t\t\t\t\t\taxis.set(\"start\", start);\n\t\t\t\t\t\t\taxis.set(\"end\", end);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tif (scrollbarY) {\n\t\t\t\t\tscrollbarY.events.enableType(\"rangechanged\");\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\t}\n\n\tprotected _handlePinch() {\n\t\tconst plotContainer = this.plotContainer;\n\t\tlet i = 0;\n\t\tlet downPoints: Array = [];\n\t\tlet movePoints: Array = [];\n\n\t\t$object.each(plotContainer._downPoints, (k, point) => {\n\t\t\tdownPoints[i] = point;\n\t\t\tlet movePoint = this._movePoints[k];\n\t\t\tif (movePoint) {\n\t\t\t\tmovePoints[i] = movePoint;\n\t\t\t}\n\t\t\ti++;\n\t\t});\n\n\t\tif (downPoints.length > 1 && movePoints.length > 1) {\n\t\t\tconst w = plotContainer.width();\n\t\t\tconst h = plotContainer.height();\n\n\t\t\tlet downPoint0 = downPoints[0];\n\t\t\tlet downPoint1 = downPoints[1];\n\n\t\t\tlet movePoint0 = movePoints[0];\n\t\t\tlet movePoint1 = movePoints[1];\n\n\t\t\tif (downPoint0 && downPoint1 && movePoint0 && movePoint1) {\n\n\t\t\t\tmovePoint0 = plotContainer.toLocal(movePoint0)\n\t\t\t\tmovePoint1 = plotContainer.toLocal(movePoint1)\n\n\t\t\t\tdownPoint0 = plotContainer.toLocal(downPoint0)\n\t\t\t\tdownPoint1 = plotContainer.toLocal(downPoint1)\n\n\t\t\t\tif (this.get(\"pinchZoomX\")) {\n\t\t\t\t\tconst downStartX = this._downStartX;\n\t\t\t\t\tconst downEndX = this._downEndX;\n\n\t\t\t\t\tif (downStartX != null && downEndX != null) {\n\n\t\t\t\t\t\tif (downPoint0.x > downPoint1.x) {\n\t\t\t\t\t\t\t[downPoint0, downPoint1] = [downPoint1, downPoint0];\n\t\t\t\t\t\t\t[movePoint0, movePoint1] = [movePoint1, movePoint0];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet downPos0 = downStartX + (downPoint0.x / w) * (downEndX - downStartX);\n\t\t\t\t\t\tlet downPos1 = downStartX + (downPoint1.x / w) * (downEndX - downStartX);\n\n\t\t\t\t\t\tlet movePos0 = downStartX + (movePoint0.x / w) * (downEndX - downStartX);\n\t\t\t\t\t\tlet movePos1 = downStartX + (movePoint1.x / w) * (downEndX - downStartX);\n\n\t\t\t\t\t\tlet initialDistance = Math.max(0.001, downPos1 - downPos0);\n\t\t\t\t\t\tlet currentDistance = Math.max(0.001, movePos1 - movePos0);\n\n\n\t\t\t\t\t\tlet d = initialDistance / currentDistance;\n\n\t\t\t\t\t\tlet s = downStartX * d + downPos0 - movePos0 * d;\n\t\t\t\t\t\tlet e = downEndX * d + downPos1 - movePos1 * d;\n\n\t\t\t\t\t\tthis.xAxes.each((xAxis) => {\n\t\t\t\t\t\t\tlet sa = xAxis.fixPosition(s);\n\t\t\t\t\t\t\tlet ea = xAxis.fixPosition(e);\n\n\t\t\t\t\t\t\txAxis.zoom(sa, ea, 0);\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (this.get(\"pinchZoomY\")) {\n\t\t\t\t\tconst downStartY = this._downStartY;\n\t\t\t\t\tconst downEndY = this._downEndY;\n\n\t\t\t\t\tif (downStartY != null && downEndY != null) {\n\n\t\t\t\t\t\tif (downPoint0.y < downPoint1.y) {\n\t\t\t\t\t\t\t[downPoint0, downPoint1] = [downPoint1, downPoint0];\n\t\t\t\t\t\t\t[movePoint0, movePoint1] = [movePoint1, movePoint0];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet downPos0 = downStartY + (1 - downPoint0.y / h) * (downEndY - downStartY);\n\t\t\t\t\t\tlet downPos1 = downStartY + (1 - downPoint1.y / h) * (downEndY - downStartY);\n\n\t\t\t\t\t\tlet movePos0 = downStartY + (1 - movePoint0.y / h) * (downEndY - downStartY);\n\t\t\t\t\t\tlet movePos1 = downStartY + (1 - movePoint1.y / h) * (downEndY - downStartY);\n\n\t\t\t\t\t\tlet initialDistance = Math.max(0.001, downPos1 - downPos0);\n\t\t\t\t\t\tlet currentDistance = Math.max(0.001, movePos1 - movePos0);\n\n\t\t\t\t\t\tlet d = initialDistance / currentDistance;\n\n\t\t\t\t\t\tlet s = downStartY * d + downPos0 - movePos0 * d;\n\t\t\t\t\t\tlet e = downEndY * d + downPos1 - movePos1 * d;\n\n\t\t\t\t\t\tthis.yAxes.each((yAxis) => {\n\n\t\t\t\t\t\t\tlet sa = yAxis.fixPosition(s);\n\t\t\t\t\t\t\tlet ea = yAxis.fixPosition(e);\n\n\t\t\t\t\t\t\tyAxis.zoom(sa, ea, 0);\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _handleCursorPosition() {\n\t\tconst cursor = this.get(\"cursor\");\n\t\tif (cursor) {\n\t\t\tconst cursorPoint = cursor.getPrivate(\"point\");\n\n\t\t\tlet snapToSeries = cursor.get(\"snapToSeries\");\n\n\t\t\tif (cursor._downPoint) {\n\t\t\t\tsnapToSeries = undefined;\n\t\t\t}\n\n\t\t\tif (snapToSeries && cursorPoint) {\n\t\t\t\tconst snapToSeriesBy = cursor.get(\"snapToSeriesBy\");\n\t\t\t\tconst dataItems: Array> = [];\n\t\t\t\t$array.each(snapToSeries, (series) => {\n\t\t\t\t\tif (!series.isHidden() && !series.isHiding()) {\n\t\t\t\t\t\tif (snapToSeriesBy != \"x!\" && snapToSeriesBy != \"y!\") {\n\t\t\t\t\t\t\tconst startIndex = series.startIndex();\n\t\t\t\t\t\t\tconst endIndex = series.endIndex();\n\t\t\t\t\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\t\t\t\t\tconst dataItem = series.dataItems[i];\n\t\t\t\t\t\t\t\tif (dataItem && !dataItem.isHidden()) {\n\t\t\t\t\t\t\t\t\tdataItems.push(dataItem);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tconst tooltipDataItem = series.get(\"tooltipDataItem\");\n\t\t\t\t\t\t\tif (tooltipDataItem) {\n\t\t\t\t\t\t\t\tdataItems.push(tooltipDataItem);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tlet minDistance = Infinity;\n\t\t\t\tlet closestItem: DataItem | undefined;\n\n\t\t\t\t$array.each(dataItems, (dataItem) => {\n\t\t\t\t\tconst point = dataItem.get(\"point\");\n\n\t\t\t\t\tif (point) {\n\t\t\t\t\t\tlet distance = 0;\n\t\t\t\t\t\tif (snapToSeriesBy == \"x\" || snapToSeriesBy == \"x!\") {\n\t\t\t\t\t\t\tdistance = Math.abs(cursorPoint.x - point.x);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (snapToSeriesBy == \"y\" || snapToSeriesBy == \"y!\") {\n\t\t\t\t\t\t\tdistance = Math.abs(cursorPoint.y - point.y);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tdistance = Math.hypot(cursorPoint.x - point.x, cursorPoint.y - point.y);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (distance < minDistance) {\n\t\t\t\t\t\t\tminDistance = distance;\n\t\t\t\t\t\t\tclosestItem = dataItem;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\t$array.each(snapToSeries, (series) => {\n\t\t\t\t\tconst tooltip = series.get(\"tooltip\");\n\t\t\t\t\tif (tooltip) {\n\t\t\t\t\t\ttooltip._setDataItem(undefined);\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tif (closestItem) {\n\t\t\t\t\tlet series = closestItem.component as XYSeries;\n\t\t\t\t\tseries.showDataItemTooltip(closestItem);\n\t\t\t\t\tconst point = closestItem.get(\"point\");\n\t\t\t\t\tif (point) {\n\t\t\t\t\t\t// removing x and y to solve #72225\n\t\t\t\t\t\tcursor.handleMove(series.toGlobal({ x: point.x - series.x(), y: point.y - series.y() }), true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateCursor() {\n\t\tlet cursor = this.get(\"cursor\");\n\t\tif (cursor) {\n\t\t\tcursor.handleMove();\n\t\t}\n\t}\n\n\tprotected _addCursor(cursor: XYCursor) {\n\t\tthis.plotContainer.children.push(cursor);\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tthis.series.each((series) => {\n\t\t\tthis._colorize(series);\n\t\t})\n\n\t\tif (this.isDirty(\"wheelX\") || this.isDirty(\"wheelY\")) {\n\t\t\tthis._handleSetWheel();\n\t\t}\n\n\t\tif (this.isDirty(\"cursor\")) {\n\t\t\tconst previous = this._prevSettings.cursor;\n\t\t\tconst cursor = this.get(\"cursor\")!;\n\t\t\tif (cursor !== previous) {\n\t\t\t\tthis._disposeProperty(\"cursor\");\n\t\t\t\tif (previous) {\n\t\t\t\t\tprevious.dispose();\n\t\t\t\t}\n\t\t\t\tif (cursor) {\n\t\t\t\t\tcursor._setChart(this);\n\t\t\t\t\tthis._addCursor(cursor);\n\n\t\t\t\t\tthis._pushPropertyDisposer(\"cursor\", cursor.events.on(\"selectended\", () => {\n\t\t\t\t\t\tthis._handleCursorSelectEnd();\n\t\t\t\t\t}))\n\t\t\t\t}\n\n\t\t\t\t//this.setRaw(\"cursor\", cursor) // to reset previous value\n\t\t\t\tthis._prevSettings.cursor = cursor;\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"scrollbarX\")) {\n\t\t\tconst previous = this._prevSettings.scrollbarX;\n\t\t\tconst scrollbarX = this.get(\"scrollbarX\")!;\n\t\t\tif (scrollbarX !== previous) {\n\t\t\t\tthis._disposeProperty(\"scrollbarX\");\n\t\t\t\tif (previous) {\n\t\t\t\t\tprevious.dispose();\n\t\t\t\t}\n\t\t\t\tif (scrollbarX) {\n\t\t\t\t\tif (!scrollbarX.parent) {\n\t\t\t\t\t\tthis.topAxesContainer.children.push(scrollbarX);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._pushPropertyDisposer(\"scrollbarX\", scrollbarX.events.on(\"rangechanged\", (e) => {\n\t\t\t\t\t\tthis._handleScrollbar(this.xAxes, e.start, e.end, e.grip);\n\t\t\t\t\t}))\n\n\t\t\t\t\t// Used to populate `ariaLabel` with meaningful values\n\t\t\t\t\tscrollbarX.setPrivate(\"positionTextFunction\", (position: number) => {\n\t\t\t\t\t\tconst axis = this.xAxes.getIndex(0);\n\t\t\t\t\t\treturn axis ? axis.getTooltipText(position) || \"\" : \"\";\n\t\t\t\t\t});\n\n\t\t\t\t}\n\n\t\t\t\tthis._prevSettings.scrollbarX = scrollbarX;\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"scrollbarY\")) {\n\t\t\tconst previous = this._prevSettings.scrollbarY;\n\t\t\tconst scrollbarY = this.get(\"scrollbarY\")!;\n\t\t\tif (scrollbarY !== previous) {\n\t\t\t\tthis._disposeProperty(\"scrollbarY\");\n\t\t\t\tif (previous) {\n\t\t\t\t\tprevious.dispose();\n\t\t\t\t}\n\t\t\t\tif (scrollbarY) {\n\t\t\t\t\tif (!scrollbarY.parent) {\n\t\t\t\t\t\tthis.rightAxesContainer.children.push(scrollbarY);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._pushPropertyDisposer(\"scrollbarY\", scrollbarY.events.on(\"rangechanged\", (e) => {\n\t\t\t\t\t\tthis._handleScrollbar(this.yAxes, e.start, e.end, e.grip);\n\t\t\t\t\t}))\n\n\t\t\t\t\t// Used to populate `ariaLabel` with meaningful values\n\t\t\t\t\tscrollbarY.setPrivate(\"positionTextFunction\", (position: number) => {\n\t\t\t\t\t\tconst axis = this.yAxes.getIndex(0);\n\t\t\t\t\t\treturn axis ? axis.getTooltipText(position) || \"\" : \"\";\n\t\t\t\t\t});\n\n\t\t\t\t}\n\t\t\t\tthis._prevSettings.scrollbarY = scrollbarY;\n\t\t\t}\n\t\t}\n\n\t\tthis._handleZoomOut();\n\t}\n\n\tprotected _processSeries(series: this[\"_seriesType\"]) {\n\t\tsuper._processSeries(series);\n\t\tthis._colorize(series);\n\t}\n\n\tprotected _colorize(series: this[\"_seriesType\"]) {\n\t\tconst colorSet = this.get(\"colors\")!;\n\t\tif (colorSet) {\n\t\t\tif (series.get(\"fill\") == null) {\n\t\t\t\tconst color = colorSet.next();\n\n\t\t\t\tseries._setSoft(\"stroke\", color);\n\t\t\t\tseries._setSoft(\"fill\", color);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _handleCursorSelectEnd() {\n\t\tconst cursor = this.get(\"cursor\")!;\n\t\tconst behavior = cursor.get(\"behavior\");\n\n\t\tconst downPositionX = cursor.getPrivate(\"downPositionX\", 0);\n\t\tconst downPositionY = cursor.getPrivate(\"downPositionY\", 0);\n\n\t\tconst positionX = cursor.getPrivate(\"positionX\", 0.5);\n\t\tconst positionY = cursor.getPrivate(\"positionY\", 0.5);\n\n\n\t\tthis.xAxes.each((axis) => {\n\t\t\tif (behavior === \"zoomX\" || behavior === \"zoomXY\") {\n\t\t\t\tlet position0 = axis.toAxisPosition(downPositionX);\n\t\t\t\tlet position1 = axis.toAxisPosition(positionX);\n\t\t\t\taxis.zoom(position0, position1);\n\t\t\t}\n\t\t\taxis.setPrivate(\"updateScrollbar\", true);\n\t\t})\n\n\t\tthis.yAxes.each((axis) => {\n\t\t\tif (behavior === \"zoomY\" || behavior === \"zoomXY\") {\n\t\t\t\tlet position0 = axis.toAxisPosition(downPositionY);\n\t\t\t\tlet position1 = axis.toAxisPosition(positionY);\n\t\t\t\taxis.zoom(position0, position1);\n\t\t\t}\n\t\t\taxis.setPrivate(\"updateScrollbar\", true);\n\t\t})\n\t}\n\n\tprotected _handleScrollbar(axes: ListAutoDispose>, start: number, end: number, priority?: \"start\" | \"end\") {\n\n\t\taxes.each((axis) => {\n\n\t\t\tlet axisStart = axis.fixPosition(start);\n\t\t\tlet axisEnd = axis.fixPosition(end);\n\n\t\t\tlet zoomAnimation = axis.zoom(axisStart, axisEnd, undefined, priority);\n\n\t\t\tconst updateScrollbar = \"updateScrollbar\";\n\t\t\taxis.setPrivateRaw(updateScrollbar, false);\n\n\t\t\tif (zoomAnimation) {\n\t\t\t\tzoomAnimation.events.on(\"stopped\", () => {\n\t\t\t\t\taxis.setPrivateRaw(updateScrollbar, true);\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\taxis.setPrivateRaw(updateScrollbar, true);\n\t\t\t}\n\t\t})\n\t}\n\n\n\tprotected _processAxis(axes: ListAutoDispose>, container: Container): IDisposer {\n\t\treturn axes.events.onAll((change) => {\n\t\t\tif (change.type === \"clear\") {\n\t\t\t\t$array.each(change.oldValues, (axis) => {\n\t\t\t\t\tthis._removeAxis(axis);\n\t\t\t\t})\n\t\t\t} else if (change.type === \"push\") {\n\t\t\t\tcontainer.children.push(change.newValue);\n\t\t\t\tchange.newValue.processChart(this);\n\t\t\t} else if (change.type === \"setIndex\") {\n\t\t\t\tcontainer.children.setIndex(change.index, change.newValue);\n\t\t\t\tchange.newValue.processChart(this);\n\t\t\t} else if (change.type === \"insertIndex\") {\n\t\t\t\tcontainer.children.insertIndex(change.index, change.newValue);\n\t\t\t\tchange.newValue.processChart(this);\n\t\t\t} else if (change.type === \"removeIndex\") {\n\t\t\t\tthis._removeAxis(change.oldValue);\n\t\t\t} else if (change.type === \"moveIndex\") {\n\t\t\t\tcontainer.children.moveValue(change.value, change.newIndex);\n\t\t\t\tchange.value.processChart(this);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unknown IListEvent type\");\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected _removeAxis(axis: Axis) {\n\t\tif (!axis.isDisposed()) {\n\t\t\tconst axisParent = axis.parent\n\t\t\tif (axisParent) {\n\t\t\t\taxisParent.children.removeValue(axis);\n\t\t\t}\n\n\t\t\tconst gridContainer = axis.gridContainer;\n\t\t\tconst gridParent = gridContainer.parent;\n\t\t\tif (gridParent) {\n\t\t\t\tgridParent.children.removeValue(gridContainer);\n\t\t\t}\n\n\t\t\tconst topGridContainer = axis.topGridContainer;\n\t\t\tconst topGridParent = topGridContainer.parent;\n\t\t\tif (topGridParent) {\n\t\t\t\ttopGridParent.children.removeValue(topGridContainer);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateChartLayout() {\n\t\tconst left = this.leftAxesContainer.width();\n\t\tconst right = this.rightAxesContainer.width();\n\n\t\tconst bottomAxesContainer = this.bottomAxesContainer;\n\t\tbottomAxesContainer.set(\"paddingLeft\", left);\n\t\tbottomAxesContainer.set(\"paddingRight\", right);\n\n\t\tconst topAxesContainer = this.topAxesContainer;\n\t\ttopAxesContainer.set(\"paddingLeft\", left);\n\t\ttopAxesContainer.set(\"paddingRight\", right);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic processAxis(_axis: Axis) { };\n\n\tpublic _handleAxisSelection(axis: Axis, force?: boolean) {\n\n\t\tlet start = axis.fixPosition(axis.get(\"start\", 0));\n\t\tlet end = axis.fixPosition(axis.get(\"end\", 1));\n\n\t\tif (start > end) {\n\t\t\t[start, end] = [end, start];\n\t\t}\n\n\t\tif (this.xAxes.indexOf(axis) != -1) {\n\t\t\tif (force || axis.getPrivate(\"updateScrollbar\")) {\n\t\t\t\tlet scrollbarX = this.get(\"scrollbarX\");\n\n\t\t\t\tif (scrollbarX && (!scrollbarX.getPrivate(\"isBusy\") || force)) {\n\t\t\t\t\tscrollbarX.setRaw(\"start\", start);\n\t\t\t\t\tscrollbarX.setRaw(\"end\", end);\n\t\t\t\t\tscrollbarX.updateGrips();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (this.yAxes.indexOf(axis) != -1) {\n\t\t\tif (force || axis.getPrivate(\"updateScrollbar\")) {\n\t\t\t\tlet scrollbarY = this.get(\"scrollbarY\");\n\n\t\t\t\tif (scrollbarY && (!scrollbarY.getPrivate(\"isBusy\") || force)) {\n\t\t\t\t\tscrollbarY.setRaw(\"start\", start);\n\t\t\t\t\tscrollbarY.setRaw(\"end\", end);\n\t\t\t\t\tscrollbarY.updateGrips();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._handleZoomOut();\n\t}\n\n\tprotected _handleZoomOut() {\n\t\tlet zoomOutButton = this.zoomOutButton;\n\t\tif (zoomOutButton && zoomOutButton.parent) {\n\t\t\tlet visible = false;\n\t\t\tthis.xAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"start\") != 0 || axis.get(\"end\") != 1) {\n\t\t\t\t\tvisible = true;\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.yAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"start\") != 0 || axis.get(\"end\") != 1) {\n\t\t\t\t\tvisible = true;\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (visible) {\n\t\t\t\tif (zoomOutButton.isHidden()) {\n\t\t\t\t\tzoomOutButton.show();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tzoomOutButton.hide();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if point is within plot area.\n\t *\n\t * @param point Reference point\n\t * @return Is within plot area?\n\t */\n\tpublic inPlot(point: IPoint): boolean {\n\t\tconst plotContainer = this.plotContainer;\n\t\tconst otherCharts = this.getPrivate(\"otherCharts\", this._otherCharts);\n\t\tconst global = plotContainer.toGlobal(point);\n\n\t\tif (point.x >= -0.5 && point.y >= -0.5 && point.x <= plotContainer.width() + 0.5 && point.y <= plotContainer.height() + 0.5) {\n\t\t\treturn true;\n\t\t}\n\t\tif (otherCharts) {\n\n\t\t\tfor (let i = otherCharts.length - 1; i >= 0; i--) {\n\t\t\t\tconst chart = otherCharts[i];\n\n\t\t\t\tif (chart != this) {\n\t\t\t\t\tconst chartPlotContainer = chart.plotContainer;\n\t\t\t\t\tconst documentPoint = this._root.rootPointToDocument(global);\n\t\t\t\t\tconst chartRoot = chart._root.documentPointToRoot(documentPoint);\n\t\t\t\t\tconst local = chartPlotContainer.toLocal(chartRoot);\n\t\t\t\t\tif (local.x >= -0.1 && local.y >= -0.1 && local.x <= chartPlotContainer.width() + 0.1 && local.y <= chartPlotContainer.height() + 0.1) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic arrangeTooltips() {\n\t\tconst plotContainer = this.plotContainer;\n\n\t\tconst w = plotContainer.width();\n\t\tconst h = plotContainer.height();\n\n\t\tconst hh = this.height();\n\n\t\tlet plotT = plotContainer._display.toGlobal({ x: 0, y: 0 });\n\t\tlet plotB = plotContainer._display.toGlobal({ x: w, y: h });\n\n\t\tconst tooltips: Array = [];\n\t\tlet sum = 0;\n\n\t\tlet minDistance = Infinity;\n\t\tlet movePoint = this._movePoint;\n\t\tlet maxTooltipDistance = this.get(\"maxTooltipDistance\");\n\t\tlet maxTooltipDistanceBy = this.get(\"maxTooltipDistanceBy\", \"xy\");\n\t\tlet closest: XYSeries;\n\t\tlet closestPoint: IPoint;\n\n\t\tif ($type.isNumber(maxTooltipDistance)) {\n\t\t\tthis.series.each((series) => {\n\t\t\t\tif(!series.isHidden()){\n\t\t\t\t\tconst tooltip = series.get(\"tooltip\");\n\t\t\t\t\tif (tooltip) {\n\t\t\t\t\t\tlet point = tooltip.get(\"pointTo\")!;\n\t\t\t\t\t\tif (point) {\n\t\t\t\t\t\t\tlet distance = Math.hypot(movePoint.x - point.x, movePoint.y - point.y);\n\t\t\t\t\t\t\tif (maxTooltipDistanceBy == \"x\") {\n\t\t\t\t\t\t\t\tdistance = Math.abs(movePoint.x - point.x);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (maxTooltipDistanceBy == \"y\") {\n\t\t\t\t\t\t\t\tdistance = Math.abs(movePoint.y - point.y);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (distance < minDistance) {\n\t\t\t\t\t\t\t\tminDistance = distance;\n\t\t\t\t\t\t\t\tclosest = series;\n\t\t\t\t\t\t\t\tclosestPoint = point;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\tconst tooltipSeries: Array = [];\n\n\t\tthis.series.each((series) => {\n\t\t\tconst tooltip = series.get(\"tooltip\")!;\n\n\t\t\tif (tooltip) {\n\t\t\t\tlet hidden = false;\n\t\t\t\tlet point = tooltip.get(\"pointTo\")!;\n\t\t\t\tif (point) {\n\t\t\t\t\tif (maxTooltipDistance >= 0) {\n\t\t\t\t\t\tlet point = tooltip.get(\"pointTo\")!;\n\t\t\t\t\t\tif (point) {\n\t\t\t\t\t\t\tif (series != closest) {\n\t\t\t\t\t\t\t\tlet distance = Math.hypot(closestPoint.x - point.x, closestPoint.y - point.y);\n\t\t\t\t\t\t\t\tif (maxTooltipDistanceBy == \"x\") {\n\t\t\t\t\t\t\t\t\tdistance = Math.abs(closestPoint.x - point.x);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (maxTooltipDistanceBy == \"y\") {\n\t\t\t\t\t\t\t\t\tdistance = Math.abs(closestPoint.y - point.y);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (distance > maxTooltipDistance) {\n\t\t\t\t\t\t\t\t\thidden = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (maxTooltipDistance == -1) {\n\t\t\t\t\t\tif (series != closest) {\n\t\t\t\t\t\t\thidden = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!this.inPlot(this._tooltipToLocal(point)) || !tooltip.dataItem) {\n\t\t\t\t\t\thidden = true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (!hidden) {\n\t\t\t\t\t\t\tsum += point.y;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (hidden || series.isHidden() || series.isHiding()) {\n\t\t\t\t\t\ttooltip.hide(0);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttooltip.show();\n\t\t\t\t\t\ttooltips.push(tooltip);\n\n\t\t\t\t\t\ttooltipSeries.push(series);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tthis.setPrivate(\"tooltipSeries\", tooltipSeries);\n\n\t\tif (this.get(\"arrangeTooltips\")) {\n\n\t\t\tconst tooltipContainer = this._root.tooltipContainer;\n\n\t\t\tconst count = tooltips.length;\n\t\t\tconst average = sum / count;\n\n\t\t\tif (average > h / 2 + plotT.y) {\n\t\t\t\ttooltips.sort((a, b) => $order.compareNumber(b.get(\"pointTo\")!.y, a.get(\"pointTo\")!.y));\n\n\t\t\t\tlet prevY = plotB.y;\n\n\t\t\t\t$array.each(tooltips, (tooltip) => {\n\t\t\t\t\tlet height = tooltip.height();\n\t\t\t\t\tlet centerY = tooltip.get(\"centerY\");\n\t\t\t\t\tif (centerY instanceof Percent) {\n\t\t\t\t\t\theight *= centerY.value;\n\t\t\t\t\t}\n\t\t\t\t\theight += tooltip.get(\"marginBottom\", 0);\n\n\t\t\t\t\ttooltip.set(\"bounds\", { left: plotT.x, top: plotT.y, right: plotB.x, bottom: prevY })\n\t\t\t\t\ttooltip.setPrivate(\"customData\", { left: plotT.x, top: plotT.y, right: plotB.x, bottom: prevY })\n\t\t\t\t\tprevY = Math.min(prevY - height, tooltip._fy - height);\n\t\t\t\t\tif (tooltip.parent == tooltipContainer) {\n\t\t\t\t\t\ttooltipContainer.children.moveValue(tooltip, 0);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tif (prevY < 0) {\n\n\t\t\t\t\ttooltips.reverse();\n\t\t\t\t\tlet prevBottom = prevY;\n\n\t\t\t\t\t$array.each(tooltips, (tooltip) => {\n\t\t\t\t\t\tlet bounds = tooltip.get(\"bounds\");\n\t\t\t\t\t\tif (bounds) {\n\t\t\t\t\t\t\tlet top = bounds.top - prevY;\n\t\t\t\t\t\t\tlet bottom = bounds.bottom - prevY;\n\t\t\t\t\t\t\tif (top < prevBottom) {\n\t\t\t\t\t\t\t\ttop = prevBottom;\n\t\t\t\t\t\t\t\tbottom = top + tooltip.height();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttooltip.set(\"bounds\", { left: bounds.left, top: top, right: bounds.right, bottom: bottom })\n\t\t\t\t\t\t\tprevBottom = bounds.bottom - prevY + tooltip.get(\"marginBottom\", 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttooltips.reverse();\n\t\t\t\ttooltips.sort((a, b) => $order.compareNumber(a.get(\"pointTo\")!.y, b.get(\"pointTo\")!.y));\n\n\t\t\t\tlet prevY = 0;\n\t\t\t\t$array.each(tooltips, (tooltip) => {\n\t\t\t\t\tlet height = tooltip.height();\n\t\t\t\t\tlet centerY = tooltip.get(\"centerY\");\n\t\t\t\t\tif (centerY instanceof Percent) {\n\t\t\t\t\t\theight *= centerY.value;\n\t\t\t\t\t}\n\t\t\t\t\theight += tooltip.get(\"marginBottom\", 0);\n\n\t\t\t\t\ttooltip.set(\"bounds\", { left: plotT.x, top: prevY, right: plotB.x, bottom: Math.max(plotT.y + hh, prevY + height) })\n\t\t\t\t\tif (tooltip.parent == tooltipContainer) {\n\t\t\t\t\t\ttooltipContainer.children.moveValue(tooltip, 0);\n\t\t\t\t\t}\n\t\t\t\t\tprevY = Math.max(prevY + height, tooltip._fy + height);\n\t\t\t\t})\n\n\t\t\t\tif (prevY > hh) {\n\t\t\t\t\ttooltips.reverse();\n\t\t\t\t\tlet prevBottom = hh;\n\n\t\t\t\t\t$array.each(tooltips, (tooltip) => {\n\t\t\t\t\t\tlet bounds = tooltip.get(\"bounds\");\n\t\t\t\t\t\tif (bounds) {\n\t\t\t\t\t\t\tlet top = bounds.top - (hh - prevY);\n\t\t\t\t\t\t\tlet bottom = bounds.bottom - (hh - prevY);\n\t\t\t\t\t\t\tif (bottom > prevBottom) {\n\t\t\t\t\t\t\t\tbottom = prevBottom\n\t\t\t\t\t\t\t\ttop = bottom - tooltip.height();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttooltip.set(\"bounds\", { left: bounds.left, top: top, right: bounds.right, bottom: bottom })\n\t\t\t\t\t\t\tprevBottom = bottom - tooltip.height() - tooltip.get(\"marginBottom\", 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _tooltipToLocal(point: IPoint): IPoint {\n\t\treturn this.plotContainer.toLocal(point);\n\t}\n\n\t/**\n\t * Fully zooms out the chart.\n\t */\n\tpublic zoomOut() {\n\t\tthis.xAxes.each((axis) => {\n\t\t\taxis.setPrivate(\"updateScrollbar\", true);\n\t\t\taxis.zoom(0, 1);\n\t\t})\n\n\t\tthis.yAxes.each((axis) => {\n\t\t\taxis.setPrivate(\"updateScrollbar\", true);\n\t\t\taxis.zoom(0, 1);\n\t\t})\n\t}\n\n}\n","import type { ITimeInterval } from \"../../core/util/Time\";\r\nimport type { DataItem } from \"../../core/render/Component\";\r\nimport type { IValueAxisDataItem, ValueAxis } from \"./axes/ValueAxis\";\r\nimport type { AxisRenderer } from \"./axes/AxisRenderer\";\r\nimport type { DateAxis } from \"./axes/DateAxis\";\r\nimport type { ICategoryAxisDataItem } from \"./axes/CategoryAxis\";\r\nimport type { IGaplessDateAxisDataItem } from \"./axes/GaplessDateAxis\";\r\n\r\nimport { Theme } from \"../../core/Theme\";\r\nimport { percent, p50, p100 } from \"../../core/util/Percent\";\r\nimport { ColorSet } from \"../../core/util/ColorSet\";\r\nimport { setColor } from \"../../themes/DefaultTheme\";\r\n\r\nimport * as $time from \"../../core/util/Time\";\r\nimport * as $type from \"../../core/util/Type\";\r\nimport * as $math from \"../../core/util/Math\";\r\nimport * as $object from \"../../core/util/Object\";\r\nimport * as $array from \"../../core/util/Array\";\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport class XYChartDefaultTheme extends Theme {\r\n\tprotected setupDefaultRules() {\r\n\t\tsuper.setupDefaultRules();\r\n\r\n\t\tconst ic = this._root.interfaceColors;\r\n\t\tconst language = this._root.language;\r\n\t\tconst r = this.rule.bind(this);\r\n\r\n\t\t/**\r\n\t\t * ========================================================================\r\n\t\t * charts/xy\r\n\t\t * ========================================================================\r\n\t\t */\r\n\r\n\t\tr(\"XYChart\").setAll({\r\n\t\t\tcolors: ColorSet.new(this._root, {}),\r\n\t\t\tpaddingLeft: 20,\r\n\t\t\tpaddingRight: 20,\r\n\t\t\tpaddingTop: 16,\r\n\t\t\tpaddingBottom: 16,\r\n\t\t\tpanX: false,\r\n\t\t\tpanY: false,\r\n\t\t\twheelStep: 0.25,\r\n\t\t\tarrangeTooltips: true,\r\n\t\t\tpinchZoomX: false,\r\n\t\t\tpinchZoomY: false\r\n\t\t});\r\n\r\n\r\n\t\tr(\"XYSeries\").setAll({\r\n\t\t\tlegendLabelText: \"{name}\"\r\n\t\t})\r\n\r\n\t\t/**\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t * charts/xy: XYChartScrollbar\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t */\r\n\r\n\t\tr(\"XYChart\", [\"scrollbar\", \"chart\"]).setAll({\r\n\t\t\tpaddingBottom: 0,\r\n\t\t\tpaddingLeft: 0,\r\n\t\t\tpaddingTop: 0,\r\n\t\t\tpaddingRight: 0,\r\n\t\t\tcolors: ColorSet.new(this._root, {\r\n\t\t\t\tsaturation: 0\r\n\t\t\t})\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Graphics\", [\"scrollbar\", \"overlay\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tfillOpacity: 0.5\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"fill\", ic, \"background\");\r\n\t\t}\r\n\r\n\t\t// Class: RoundedRectangle\r\n\t\tr(\"RoundedRectangle\", [\"xy\", \"scrollbar\", \"thumb\"]).setAll({\r\n\t\t\tcornerRadiusTR: 0,\r\n\t\t\tcornerRadiusTL: 0,\r\n\t\t\tcornerRadiusBR: 0,\r\n\t\t\tcornerRadiusBL: 0,\r\n\t\t\tfillOpacity: 0,\r\n\t\t\tfocusable: true\r\n\t\t});\r\n\r\n\t\tr(\"RoundedRectangle\", [\"xy\", \"scrollbar\", \"thumb\"]).states.create(\"hover\", { fillOpacity: 0.4 });\r\n\r\n\t\tr(\"RoundedRectangle\", [\"xy\", \"scrollbar\", \"chart\", \"background\"]).setAll({\r\n\t\t\tcornerRadiusTL: 0,\r\n\t\t\tcornerRadiusBL: 0,\r\n\t\t\tcornerRadiusTR: 0,\r\n\t\t\tcornerRadiusBR: 0\r\n\t\t});\r\n\r\n\t\tr(\"RoundedRectangle\", [\"xy\", \"scrollbar\", \"chart\", \"background\", \"resize\", \"button\"]).setAll({\r\n\t\t\tcornerRadiusBL: 40,\r\n\t\t\tcornerRadiusBR: 40,\r\n\t\t\tcornerRadiusTL: 40,\r\n\t\t\tcornerRadiusTR: 40\r\n\t\t});\r\n\r\n\t\tr(\"AxisRendererX\", [\"xy\", \"chart\", \"scrollbar\"]).setAll({\r\n\t\t\tstrokeOpacity: 0,\r\n\t\t\tinside: true\r\n\t\t});\r\n\r\n\t\tr(\"AxisRendererY\", [\"xy\", \"chart\", \"scrollbar\"]).setAll({\r\n\t\t\tstrokeOpacity: 0,\r\n\t\t\tinside: true,\r\n\t\t\tminGridDistance: 5\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"xy\", \"scrollbar\", \"x\"]).setAll({\r\n\t\t\topacity: 0.5,\r\n\t\t\tcenterY: p100,\r\n\t\t\tminPosition: 0.01,\r\n\t\t\tmaxPosition: 0.99,\r\n\t\t\tfontSize: \"0.8em\"\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"category\"]).setAll({\r\n\t\t\ttext: \"{category}\",\r\n\t\t\tpopulateText: true\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"x\"]).setAll({\r\n\t\t\tcenterY: 0\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"x\", \"inside\"]).setAll({\r\n\t\t\tcenterY: p100\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"x\", \"inside\", \"opposite\"]).setAll({\r\n\t\t\tcenterY: 0\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"x\", \"opposite\"]).setAll({\r\n\t\t\tcenterY: p100\r\n\t\t});\r\n\r\n\r\n\t\tr(\"AxisLabel\", [\"y\"]).setAll({\r\n\t\t\tcenterX: p100\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"y\", \"inside\"]).setAll({\r\n\t\t\tcenterX: 0\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"y\", \"inside\", \"opposite\"]).setAll({\r\n\t\t\tcenterX: p100\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"y\", \"opposite\"]).setAll({\r\n\t\t\tcenterX: 0\r\n\t\t});\r\n\r\n\r\n\t\tr(\"AxisLabel\", [\"xy\", \"scrollbar\", \"y\"]).setAll({\r\n\t\t\tvisible: false\r\n\t\t});\r\n\r\n\t\t// Class: Grid\r\n\t\tr(\"Grid\", [\"xy\", \"scrollbar\", \"y\"]).setAll({\r\n\t\t\tvisible: false\r\n\t\t});\r\n\r\n\t\t// Class: Grid\r\n\t\tr(\"Grid\", [\"xy\", \"scrollbar\", \"x\"]).setAll({\r\n\t\t\topacity: 0.5\r\n\t\t});\r\n\r\n\r\n\r\n\r\n\t\t/**\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t * charts/xy: Cursor\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t */\r\n\r\n\t\tr(\"XYCursor\").setAll({\r\n\t\t\tbehavior: \"none\",\r\n\t\t\tlayer: 30,\r\n\t\t\texportable: false,\r\n\t\t\tsnapToSeriesBy: \"xy\",\r\n\t\t\tmoveThreshold: 1\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Grid\", [\"cursor\", \"x\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tstrokeOpacity: 0.8,\r\n\t\t\t\tstrokeDasharray: [2, 2],\r\n\t\t\t\tariaLabel: language.translate(\"Use left and right arrows to move selection\")\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"alternativeBackground\");\r\n\t\t}\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Grid\", [\"cursor\", \"y\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tstrokeOpacity: 0.8,\r\n\t\t\t\tstrokeDasharray: [2, 2],\r\n\t\t\t\tariaLabel: language.translate(\"Use up and down arrows to move selection\")\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"alternativeBackground\");\r\n\t\t}\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Graphics\", [\"cursor\", \"selection\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tfillOpacity: 0.15,\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"fill\", ic, \"alternativeBackground\");\r\n\t\t}\r\n\r\n\r\n\t\t/**\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t * charts/xy: Axes\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t */\r\n\r\n\t\tr(\"Axis\").setAll({\r\n\t\t\tstart: 0,\r\n\t\t\tend: 1,\r\n\t\t\tminZoomCount: 1,\r\n\t\t\tmaxZoomCount: Infinity,\r\n\t\t\tmaxZoomFactor: 1000,\r\n\t\t\tmaxDeviation: 0.1,\r\n\t\t\tsnapTooltip: true,\r\n\t\t\ttooltipLocation: 0.5,\r\n\t\t\tpanX: true,\r\n\t\t\tpanY: true,\r\n\t\t\tzoomX: true,\r\n\t\t\tzoomY: true,\r\n\t\t\tfixAxisSize: true\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\").setAll({\r\n\t\t\tlocation: 0.5,\r\n\t\t\tmultiLocation: 0,\r\n\t\t\tcenterX: p50,\r\n\t\t\tcenterY: p50,\r\n\t\t\tpaddingTop: 3,\r\n\t\t\tpaddingBottom: 3,\r\n\t\t\tpaddingLeft: 5,\r\n\t\t\tpaddingRight: 5\r\n\t\t});\r\n\r\n\t\t// The following is deprecated following text measuring updates in 5.0.5\r\n\t\t// r(\"AxisLabel\", [\"y\"]).setAll({\r\n\t\t// \ttextAlign: \"right\"\r\n\t\t// });\r\n\r\n\t\t// r(\"AxisLabel\", [\"y\", \"opposite\"]).setAll({\r\n\t\t// \ttextAlign: \"left\"\r\n\t\t// });\r\n\r\n\t\tr(\"Container\", [\"axis\", \"header\"]).setAll({\r\n\t\t\tlayer: 30\r\n\t\t});\r\n\r\n\t\tr(\"Rectangle\", [\"axis\", \"header\", \"background\"]).setAll({\r\n\t\t\tcrisp: true\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"AxisRenderer\");\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tcrisp: true,\r\n\t\t\t\tstrokeOpacity: 0\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"grid\");\r\n\t\t}\r\n\r\n\t\tr(\"AxisRendererX\").setAll({\r\n\t\t\tminGridDistance: 120,\r\n\t\t\topposite: false,\r\n\t\t\tinversed: false,\r\n\t\t\tcellStartLocation: 0,\r\n\t\t\tcellEndLocation: 1,\r\n\t\t\twidth: p100\r\n\t\t});\r\n\r\n\t\tr(\"AxisRendererY\").setAll({\r\n\t\t\tminGridDistance: 40,\r\n\t\t\topposite: false,\r\n\t\t\tinversed: false,\r\n\t\t\tcellStartLocation: 0,\r\n\t\t\tcellEndLocation: 1,\r\n\t\t\theight: p100\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Rectangle\", [\"axis\", \"thumb\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tfillOpacity: 0\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"fill\", ic, \"alternativeBackground\");\r\n\r\n\t\t\trule.states.create(\"hover\", { fillOpacity: 0.1 })\r\n\t\t}\r\n\r\n\t\tr(\"Rectangle\", [\"axis\", \"thumb\", \"x\"]).setAll({\r\n\t\t\tcursorOverStyle: \"ew-resize\"\r\n\t\t});\r\n\r\n\t\tr(\"Rectangle\", [\"axis\", \"thumb\", \"y\"]).setAll({\r\n\t\t\tcursorOverStyle: \"ns-resize\"\r\n\t\t});\r\n\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Grid\");\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tlocation: 0,\r\n\t\t\t\tstrokeOpacity: 0.15,\r\n\t\t\t\tcrisp: true\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"grid\");\r\n\t\t}\r\n\r\n\t\tr(\"Grid\", [\"base\"]).setAll({\r\n\t\t\tstrokeOpacity: 0.3\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Graphics\", [\"axis\", \"fill\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tvisible: false,\r\n\t\t\t\tisMeasured: false,\r\n\t\t\t\tposition: \"absolute\",\r\n\t\t\t\tfillOpacity: 0.05,\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"fill\", ic, \"alternativeBackground\");\r\n\t\t}\r\n\r\n\t\tr(\"Graphics\", [\"axis\", \"fill\", \"range\"]).setAll({\r\n\t\t\tisMeasured: true\r\n\t\t});\r\n\r\n\t\t// hides all elements of series axis range\r\n\t\tr(\"Graphics\", [\"series\", \"fill\", \"range\"]).setAll({\r\n\t\t\tvisible: false,\r\n\t\t\tisMeasured: true\r\n\t\t});\r\n\r\n\t\tr(\"Grid\", [\"series\", \"range\"]).setAll({\r\n\t\t\tvisible: false\r\n\t\t});\r\n\r\n\t\tr(\"AxisTick\", [\"series\", \"range\"]).setAll({\r\n\t\t\tvisible: false\t\t\t\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"series\", \"range\"]).setAll({\r\n\t\t\tvisible: false\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"AxisTick\");\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tlocation: 0.5,\r\n\t\t\t\tmultiLocation: 0,\r\n\t\t\t\tstrokeOpacity: 1,\r\n\t\t\t\tisMeasured: false,\r\n\t\t\t\tposition: \"absolute\",\r\n\t\t\t\tvisible: false\t\t\t\t\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"grid\");\r\n\t\t}\r\n\r\n\t\tr(\"CategoryAxis\").setAll({\r\n\t\t\tstartLocation: 0,\r\n\t\t\tendLocation: 1,\r\n\t\t\tfillRule: (dataItem: DataItem, index?: number) => {\r\n\t\t\t\tconst axisFill = dataItem.get(\"axisFill\");\r\n\t\t\t\tif (axisFill) {\r\n\t\t\t\t\tif (!$type.isNumber(index) || index % 2 == 0) {\r\n\t\t\t\t\t\taxisFill.setPrivate(\"visible\", true);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\taxisFill.setPrivate(\"visible\", false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tconst gridIntervals: Array = [\r\n\t\t\t{ timeUnit: \"millisecond\", count: 1 },\r\n\t\t\t{ timeUnit: \"millisecond\", count: 5 },\r\n\t\t\t{ timeUnit: \"millisecond\", count: 10 },\r\n\t\t\t{ timeUnit: \"millisecond\", count: 50 },\r\n\t\t\t{ timeUnit: \"millisecond\", count: 100 },\r\n\t\t\t{ timeUnit: \"millisecond\", count: 500 },\r\n\t\t\t{ timeUnit: \"second\", count: 1 },\r\n\t\t\t{ timeUnit: \"second\", count: 5 },\r\n\t\t\t{ timeUnit: \"second\", count: 10 },\r\n\t\t\t{ timeUnit: \"second\", count: 30 },\r\n\t\t\t{ timeUnit: \"minute\", count: 1 },\r\n\t\t\t{ timeUnit: \"minute\", count: 5 },\r\n\t\t\t{ timeUnit: \"minute\", count: 10 },\r\n\t\t\t{ timeUnit: \"minute\", count: 15 },\r\n\t\t\t{ timeUnit: \"minute\", count: 30 },\r\n\t\t\t{ timeUnit: \"hour\", count: 1 },\r\n\t\t\t{ timeUnit: \"hour\", count: 3 },\r\n\t\t\t{ timeUnit: \"hour\", count: 6 },\r\n\t\t\t{ timeUnit: \"hour\", count: 12 },\r\n\t\t\t{ timeUnit: \"day\", count: 1 },\r\n\t\t\t{ timeUnit: \"day\", count: 2 },\r\n\t\t\t{ timeUnit: \"day\", count: 3 },\r\n\t\t\t{ timeUnit: \"day\", count: 4 },\r\n\t\t\t{ timeUnit: \"day\", count: 5 },\r\n\t\t\t{ timeUnit: \"week\", count: 1 },\r\n\t\t\t{ timeUnit: \"month\", count: 1 },\r\n\t\t\t{ timeUnit: \"month\", count: 2 },\r\n\t\t\t{ timeUnit: \"month\", count: 3 },\r\n\t\t\t{ timeUnit: \"month\", count: 6 },\r\n\t\t\t{ timeUnit: \"year\", count: 1 },\r\n\t\t\t{ timeUnit: \"year\", count: 2 },\r\n\t\t\t{ timeUnit: \"year\", count: 5 },\r\n\t\t\t{ timeUnit: \"year\", count: 10 },\r\n\t\t\t{ timeUnit: \"year\", count: 50 },\r\n\t\t\t{ timeUnit: \"year\", count: 100 },\r\n\t\t\t{ timeUnit: \"year\", count: 200 },\r\n\t\t\t{ timeUnit: \"year\", count: 500 },\r\n\t\t\t{ timeUnit: \"year\", count: 1000 },\r\n\t\t\t{ timeUnit: \"year\", count: 2000 },\r\n\t\t\t{ timeUnit: \"year\", count: 5000 },\r\n\t\t\t{ timeUnit: \"year\", count: 10000 },\r\n\t\t\t{ timeUnit: \"year\", count: 100000 }\r\n\t\t];\r\n\r\n\t\tconst dateFormats = {\r\n\t\t\t\"millisecond\": language.translate(\"_date_millisecond\"),\r\n\t\t\t\"second\": language.translate(\"_date_second\"),\r\n\t\t\t\"minute\": language.translate(\"_date_minute\"),\r\n\t\t\t\"hour\": language.translate(\"_date_hour\"),\r\n\t\t\t\"day\": language.translate(\"_date_day\"),\r\n\t\t\t\"week\": language.translate(\"_date_day\"),\r\n\t\t\t\"month\": language.translate(\"_date_month\"),\r\n\t\t\t\"year\": language.translate(\"_date_year\")\r\n\t\t};\r\n\r\n\t\tconst periodChangeDateFormats = {\r\n\t\t\t\"millisecond\": language.translate(\"_date_millisecond\"),\r\n\t\t\t\"second\": language.translate(\"_date_second\"),\r\n\t\t\t\"minute\": language.translate(\"_date_minute\"),\r\n\t\t\t\"hour\": language.translate(\"_date_day\"),\r\n\t\t\t\"day\": language.translate(\"_date_day\"),\r\n\t\t\t\"week\": language.translate(\"_date_day\"),\r\n\t\t\t\"month\": language.translate(\"_date_month\") + \" \" + language.translate(\"_date_year\"),\r\n\t\t\t\"year\": language.translate(\"_date_year\")\r\n\t\t};\r\n\r\n\t\tconst tooltipDateFormats = {\r\n\t\t\t\"millisecond\": language.translate(\"_date_millisecond_full\"),\r\n\t\t\t\"second\": language.translate(\"_date_second_full\"),\r\n\t\t\t\"minute\": language.translate(\"_date_minute_full\"),\r\n\t\t\t\"hour\": language.translate(\"_date_hour_full\"),\r\n\t\t\t\"day\": language.translate(\"_date_day_full\"),\r\n\t\t\t\"week\": language.translate(\"_date_week_full\"),\r\n\t\t\t\"month\": language.translate(\"_date_month_full\"),\r\n\t\t\t\"year\": language.translate(\"_date_year\")\r\n\t\t};\r\n\r\n\t\tr(\"CategoryDateAxis\").setAll({\r\n\t\t\tmarkUnitChange: true,\r\n\t\t\tgridIntervals: $array.copy(gridIntervals),\r\n\t\t\tdateFormats: $object.copy(dateFormats),\r\n\t\t\tperiodChangeDateFormats: $object.copy(periodChangeDateFormats)\r\n\t\t});\r\n\r\n\t\tr(\"DateAxis\").setAll({\r\n\t\t\tmaxZoomFactor: null,\r\n\t\t\tstrictMinMax: true,\r\n\t\t\tstartLocation: 0,\r\n\t\t\tendLocation: 1,\r\n\t\t\tmarkUnitChange: true,\r\n\t\t\tgroupData: false,\r\n\t\t\tgroupCount: 500,\r\n\t\t\tgridIntervals: $array.copy(gridIntervals),\r\n\t\t\tdateFormats: $object.copy(dateFormats),\r\n\t\t\tperiodChangeDateFormats: $object.copy(periodChangeDateFormats),\r\n\t\t\ttooltipDateFormats: tooltipDateFormats,\r\n\r\n\t\t\tgroupIntervals: [\r\n\t\t\t\t{ timeUnit: \"millisecond\", count: 1 },\r\n\t\t\t\t{ timeUnit: \"millisecond\", count: 10 },\r\n\t\t\t\t{ timeUnit: \"millisecond\", count: 100 },\r\n\t\t\t\t{ timeUnit: \"second\", count: 1 },\r\n\t\t\t\t{ timeUnit: \"second\", count: 10 },\r\n\t\t\t\t{ timeUnit: \"minute\", count: 1 },\r\n\t\t\t\t{ timeUnit: \"minute\", count: 10 },\r\n\t\t\t\t{ timeUnit: \"hour\", count: 1 },\r\n\t\t\t\t{ timeUnit: \"day\", count: 1 },\r\n\t\t\t\t{ timeUnit: \"week\", count: 1 },\r\n\t\t\t\t{ timeUnit: \"month\", count: 1 },\r\n\t\t\t\t{ timeUnit: \"year\", count: 1 }\r\n\t\t\t],\r\n\r\n\t\t\tfillRule: (dataItem: DataItem) => {\r\n\t\t\t\tconst axisFill = dataItem.get(\"axisFill\");\r\n\t\t\t\tif (axisFill) {\r\n\t\t\t\t\tconst axis = >dataItem.component;\r\n\t\t\t\t\tconst value = dataItem.get(\"value\");\r\n\t\t\t\t\tconst endValue = dataItem.get(\"endValue\");\r\n\t\t\t\t\tconst intervalDuration = axis.intervalDuration();\r\n\t\t\t\t\tconst baseInterval = axis.getPrivate(\"baseInterval\");\r\n\t\t\t\t\tconst gridInterval = axis.getPrivate(\"gridInterval\", baseInterval);\r\n\r\n\r\n\t\t\t\t\tlet min = axis.getPrivate(\"min\", 0);\r\n\t\t\t\t\tmin = $time.round(new Date(min), gridInterval.timeUnit, gridInterval.count, this._root.locale.firstDayOfWeek, this._root.utc, undefined, this._root.timezone).getTime();\r\n\r\n\t\t\t\t\tif (value != null && endValue != null) {\r\n\t\t\t\t\t\tconst val = Math.round(Math.round((value - min) / intervalDuration)) / 2;\r\n\r\n\t\t\t\t\t\tif (val == Math.round(val)) {\r\n\t\t\t\t\t\t\taxisFill.setPrivate(\"visible\", true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\taxisFill.setPrivate(\"visible\", false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tr(\"GaplessDateAxis\").setAll({\r\n\t\t\tfillRule: (dataItem: DataItem) => {\r\n\t\t\t\tconst axisFill = dataItem.get(\"axisFill\");\r\n\t\t\t\tif (axisFill) {\r\n\r\n\t\t\t\t\tconst index = dataItem.get(\"index\")\r\n\t\t\t\t\tlet visible = false;\r\n\t\t\t\t\tif (!$type.isNumber(index) || index % 2 == 0) {\r\n\t\t\t\t\t\tvisible = true\r\n\t\t\t\t\t}\r\n\t\t\t\t\taxisFill.setPrivate(\"visible\", visible);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\tr(\"ValueAxis\").setAll({\r\n\r\n\t\t\tbaseValue: 0,\r\n\t\t\tlogarithmic: false,\r\n\t\t\tstrictMinMax: false,\r\n\t\t\tautoZoom: true,\r\n\r\n\t\t\tfillRule: (dataItem: DataItem) => {\r\n\t\t\t\tconst axisFill = dataItem.get(\"axisFill\");\r\n\t\t\t\tif (axisFill) {\r\n\t\t\t\t\tconst axis = >dataItem.component;\r\n\t\t\t\t\tconst value = dataItem.get(\"value\");\r\n\t\t\t\t\tconst step = axis.getPrivate(\"step\");\r\n\r\n\t\t\t\t\tif ($type.isNumber(value) && $type.isNumber(step)) {\r\n\t\t\t\t\t\tif ($math.round(value / step / 2, 5) == Math.round(value / step / 2)) {\r\n\t\t\t\t\t\t\taxisFill.setPrivate(\"visible\", false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\taxisFill.setPrivate(\"visible\", true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tr(\"DurationAxis\").setAll({\r\n\t\t\tbaseUnit: \"second\"\r\n\t\t})\r\n\r\n\r\n\t\t/**\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t * charts/xy: Series\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t */\r\n\r\n\t\tr(\"XYSeries\").setAll({\r\n\t\t\tmaskBullets: true,\r\n\t\t\tstackToNegative: true,\r\n\r\n\t\t\tlocationX: 0.5,\r\n\t\t\tlocationY: 0.5,\r\n\r\n\t\t\tsnapTooltip: false,\r\n\r\n\t\t\topenValueXGrouped: \"open\",\r\n\t\t\topenValueYGrouped: \"open\",\r\n\t\t\tvalueXGrouped: \"close\",\r\n\t\t\tvalueYGrouped: \"close\",\r\n\r\n\t\t\tseriesTooltipTarget: \"series\"\r\n\t\t});\r\n\r\n\t\tr(\"BaseColumnSeries\").setAll({\r\n\t\t\tadjustBulletPosition: true\r\n\t\t});\r\n\r\n\t\tr(\"ColumnSeries\").setAll({\r\n\t\t\tclustered: true\r\n\t\t});\r\n\r\n\t\tr(\"RoundedRectangle\", [\"series\", \"column\"]).setAll({\r\n\t\t\tposition: \"absolute\",\r\n\t\t\tisMeasured: false,\r\n\t\t\twidth: percent(70),\r\n\t\t\theight: percent(70),\r\n\t\t\tstrokeWidth: 1,\r\n\t\t\tstrokeOpacity: 1,\r\n\t\t\tcornerRadiusBL: 0,\r\n\t\t\tcornerRadiusTL: 0,\r\n\t\t\tcornerRadiusBR: 0,\r\n\t\t\tcornerRadiusTR: 0,\r\n\t\t\tfillOpacity: 1,\r\n\t\t\trole: \"figure\"\r\n\t\t});\r\n\r\n\t\tr(\"LineSeries\").setAll({\r\n\t\t\tconnect: true,\r\n\t\t\tautoGapCount: 1.1,\r\n\t\t\tstackToNegative: false\r\n\t\t});\r\n\r\n\t\tr(\"Graphics\", [\"series\", \"stroke\"]).setAll({\r\n\t\t\tposition: \"absolute\",\r\n\t\t\tstrokeWidth: 1,\r\n\t\t\tstrokeOpacity: 1,\r\n\t\t\tisMeasured: false\r\n\t\t});\r\n\r\n\t\tr(\"Graphics\", [\"series\", \"fill\"]).setAll({\r\n\t\t\tvisible: false,\r\n\t\t\tfillOpacity: 0,\r\n\t\t\tposition: \"absolute\",\r\n\t\t\tstrokeWidth: 0,\r\n\t\t\tstrokeOpacity: 0,\r\n\t\t\tisMeasured: false\r\n\t\t});\r\n\r\n\t\tr(\"Graphics\", [\"line\", \"series\", \"legend\", \"marker\", \"stroke\"]).setAll({\r\n\t\t\tdraw: (display: any, sprite: any) => {\r\n\t\t\t\tconst parent = sprite.parent;\r\n\t\t\t\tif (parent) {\r\n\t\t\t\t\tconst h = parent.height();\r\n\t\t\t\t\tconst w = parent.width();\r\n\t\t\t\t\tdisplay.moveTo(0, h / 2);\r\n\t\t\t\t\tdisplay.lineTo(w, h / 2);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Graphics\", [\"line\", \"series\", \"legend\", \"marker\", \"stroke\"]).states.create(\"disabled\", {});\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"disabled\");\r\n\t\t}\r\n\r\n\t\tr(\"Graphics\", [\"line\", \"series\", \"legend\", \"marker\", \"fill\"]).setAll({\r\n\t\t\tdraw: (display: any, sprite: any) => {\r\n\t\t\t\tconst parent = sprite.parent;\r\n\t\t\t\tif (parent) {\r\n\t\t\t\t\tconst h = parent.height();\r\n\t\t\t\t\tconst w = parent.width();\r\n\t\t\t\t\tdisplay.moveTo(0, 0);\r\n\t\t\t\t\tdisplay.lineTo(w, 0);\r\n\t\t\t\t\tdisplay.lineTo(w, h);\r\n\t\t\t\t\tdisplay.lineTo(0, h);\r\n\t\t\t\t\tdisplay.lineTo(0, 0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Graphics\", [\"line\", \"series\", \"legend\", \"marker\", \"fill\"]).states.create(\"disabled\", {});\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"disabled\");\r\n\t\t}\r\n\r\n\t\tr(\"SmoothedXYLineSeries\").setAll({\r\n\t\t\ttension: 0.5\r\n\t\t});\r\n\r\n\t\tr(\"SmoothedXLineSeries\").setAll({\r\n\t\t\ttension: 0.5\r\n\t\t});\r\n\r\n\t\tr(\"SmoothedYLineSeries\").setAll({\r\n\t\t\ttension: 0.5\r\n\t\t});\r\n\r\n\t\tr(\"Candlestick\").setAll({\r\n\t\t\tposition: \"absolute\",\r\n\t\t\tisMeasured: false,\r\n\t\t\twidth: percent(50),\r\n\t\t\theight: percent(50),\r\n\t\t\tstrokeWidth: 1,\r\n\t\t\tstrokeOpacity: 1,\r\n\t\t\tcornerRadiusBL: 0,\r\n\t\t\tcornerRadiusTL: 0,\r\n\t\t\tcornerRadiusBR: 0,\r\n\t\t\tcornerRadiusTR: 0,\r\n\t\t\tfillOpacity: 1,\r\n\t\t\trole: \"figure\"\r\n\t\t});\r\n\r\n\t\tr(\"OHLC\").setAll({\r\n\t\t\twidth: percent(80),\r\n\t\t\theight: percent(80)\r\n\t\t});\r\n\r\n\t\tr(\"CandlestickSeries\").setAll({\r\n\t\t\tlowValueXGrouped: \"low\",\r\n\t\t\tlowValueYGrouped: \"low\",\r\n\t\t\thighValueXGrouped: \"high\",\r\n\t\t\thighValueYGrouped: \"high\",\r\n\t\t\topenValueXGrouped: \"open\",\r\n\t\t\topenValueYGrouped: \"open\",\r\n\t\t\tvalueXGrouped: \"close\",\r\n\t\t\tvalueYGrouped: \"close\"\r\n\t\t})\r\n\r\n\t\t// These rules can be used for regular columns, too\r\n\t\t{\r\n\t\t\tconst rule = r(\"Rectangle\", [\"column\", \"autocolor\"]).states.create(\"riseFromOpen\", {});\r\n\t\t\tsetColor(rule, \"fill\", ic, \"positive\");\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"positive\");\r\n\t\t}\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Rectangle\", [\"column\", \"autocolor\"]).states.create(\"dropFromOpen\", {});\r\n\t\t\tsetColor(rule, \"fill\", ic, \"negative\");\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"negative\");\r\n\t\t}\r\n\r\n\t\t// Hollow\r\n\t\tr(\"Rectangle\", [\"column\", \"autocolor\", \"pro\"]).states.create(\"riseFromOpen\", { fillOpacity: 0 });\r\n\t\tr(\"Rectangle\", [\"column\", \"autocolor\", \"pro\"]).states.create(\"dropFromOpen\", { fillOpacity: 1 });\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Rectangle\", [\"column\", \"autocolor\", \"pro\"]).states.create(\"riseFromPrevious\", {});\r\n\t\t\tsetColor(rule, \"fill\", ic, \"positive\");\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"positive\");\r\n\t\t}\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Rectangle\", [\"column\", \"autocolor\", \"pro\"]).states.create(\"dropFromPrevious\", {});\r\n\t\t\tsetColor(rule, \"fill\", ic, \"negative\");\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"negative\");\r\n\t\t}\r\n\r\n\t}\r\n}\r\n","import type { IPoint } from \"../../core/util/IPoint\";\nimport type { XYChart } from \"./XYChart\"\nimport type { XYSeries } from \"./series/XYSeries\";\nimport type { IPointerEvent } from \"../../core/render/backend/Renderer\";\nimport type { Axis } from \"./axes/Axis\";\nimport type { AxisRenderer } from \"./axes/AxisRenderer\";\nimport type { Tooltip } from \"../../core/render/Tooltip\";\n\nimport { Container, IContainerSettings, IContainerPrivate, IContainerEvents } from \"../../core/render/Container\";\nimport { p100 } from \"../../core/util/Percent\";\nimport { Graphics } from \"../../core/render/Graphics\";\nimport { Grid } from \"./axes/Grid\";\n//import { Animations } from \"../core/util/Animation\";\n\nimport * as $type from \"../../core/util/Type\";\nimport * as $utils from \"../../core/util/Utils\";\nimport * as $math from \"../../core/util/Math\";\nimport * as $array from \"../../core/util/Array\";\nimport * as $object from \"../../core/util/Object\";\n\nexport interface IXYCursorSettings extends IContainerSettings {\n\n\t/**\n\t * Cursor's X axis.\n\t *\n\t * If set, cursor will snap to that axis' cells.\n\t */\n\txAxis?: Axis;\n\n\t/**\n\t * Cursor's Y axis.\n\t *\n\t * If set, cursor will snap to that axis' cells.\n\t */\n\tyAxis?: Axis;\n\n\t/**\n\t * What should cursor do when dragged across plot area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/#Behavior} for more info\n\t * @default \"none\"\n\t */\n\tbehavior?: \"zoomX\" | \"zoomY\" | \"zoomXY\" | \"selectX\" | \"selectY\" | \"selectXY\" | \"none\";\n\n\t/**\n\t * Cursor's horizontal position relative to plot area.\n\t *\n\t * If this setting is set, cursor will not react to mouse/touch and will just\n\t * sit at specified position until `positionX` is reset to `undefined`.\n\t *\n\t * `0` - left, `1` - right.\n\t */\n\tpositionX?: number;\n\n\t/**\n\t * Cursor's vertical position relative to plot area.\n\t *\n\t * If this setting is set, cursor will not react to mouse/touch and will just\n\t * sit at specified position until `positionY` is reset to `undefined`.\n\t *\n\t * `0` - left, `1` - right.\n\t */\n\tpositionY?: number;\n\n\t/**\n\t * If set to `true`, cursor will not be hidden when mouse cursor moves out\n\t * of the plot area.\n\t *\n\t * @default false\n\t */\n\talwaysShow?: boolean;\n\n\t/**\n\t * A list of series to snap cursor to.\n\t *\n\t * If set, the cursor will always snap to the closest data item of listed\n\t * series.\n\t */\n\tsnapToSeries?: Array;\n\n\t/**\n\t * Defines in which direction to look when searching for the nearest data\n\t * item to snap to.\n\t * \n\t * Possible values: `\"xy\"` (default), `\"x\"`, and `\"y\"`.\n\t *\n\t * @since 5.0.6\n\t * @default \"xy\"\n\t */\n\tsnapToSeriesBy?: \"xy\" | \"x\" | \"y\" | \"x!\" | \"y!\";\n\n\t/**\n\t * An array of other [[XYCursor]] objects to sync this cursor with.\n\t *\n\t * If set will automatically move synced cursors to the same position within\n\t * their respective axes as the this cursor assumin same XY coordinates of\n\t * the pointer.\n\t *\n\t * NOTE: Syncing is performed using actual X/Y coordinates of the point of\n\t * mouse cursor's position or touch. It means that they will not sync by axis\n\t * positions, but rather by screen coordinates. For example vertical lines\n\t * will not sync across horizontally laid out charts, and vice versa.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/#syncing-cursors} for more info\n\t * @since 5.1.4\n\t */\n\tsyncWith?: Array;\n\n\t/**\n\t * Minimum distance in pixels between down and up points.\n\t * \n\t * If a distance is less than the value of `moveThreshold`, the zoom or\n\t * selection won't happen.\n\t *\n\t * @since 5.2.20\n\t * @default 1\n\t */\n\tmoveThreshold?: number\n\n}\n\n\nexport interface IXYCursorPrivate extends IContainerPrivate {\n\n\t/**\n\t * Current X/Y coordinates of the cursor.\n\t */\n\tpoint?: IPoint;\n\n\t/**\n\t * Current horizontal position relative to the plot area (0-1).\n\t */\n\tpositionX?: number;\n\n\t/**\n\t * Current vertical position relative to the plot area (0-1).\n\t */\n\tpositionY?: number;\n\n\t/**\n\t * Horizontal cursor position on the moment when selection started.\n\t */\n\tdownPositionX?: number;\n\n\t/**\n\t * Vertical cursor position on the moment when selection started.\n\t */\n\tdownPositionY?: number;\n\n\t/**\n\t * Last global point to which cursor moved\n\t */\n\tlastPoint?: IPoint;\n}\n\nexport interface IXYCursorEvents extends IContainerEvents {\n\n\t/**\n\t * Kicks in when cursor selection starts.\n\t *\n\t * Only when `behavior` is set.\n\t */\n\tselectended: {\n\t\ttarget: XYCursor;\n\t};\n\n\t/**\n\t * Kicks in when cursor selection ends.\n\t *\n\t * Only when `behavior` is set.\n\t */\n\tselectstarted: {\n\t\ttarget: XYCursor;\n\t};\n\n\t/**\n\t * Kicks in when cursor's position over plot area changes.\n\t */\n\tcursormoved: {\n\t\ttarget: XYCursor;\n\t};\n\n\t/**\n\t * Kicks in when cursor's is hidden when user rolls-out of the plot area\n\t */\n\tcursorhidden: {\n\t\ttarget: XYCursor;\n\t};\n\n}\n\n/**\n * Creates a chart cursor for an [[XYChart]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/} for more info\n * @important\n */\nexport class XYCursor extends Container {\n\tpublic static className: string = \"XYCursor\";\n\tpublic static classNames: Array = Container.classNames.concat([XYCursor.className]);\n\n\tdeclare public _settings: IXYCursorSettings;\n\tdeclare public _privateSettings: IXYCursorPrivate;\n\tdeclare public _events: IXYCursorEvents;\n\n\t/**\n\t * A [[Grid]] elment that used for horizontal line of the cursor crosshair.\n\t *\n\t * @default Grid.new()\n\t */\n\tpublic readonly lineX: Grid = this.children.push(Grid.new(this._root, {\n\t\tthemeTags: [\"x\"]\n\t}));\n\n\t/**\n\t * A [[Grid]] elment that used for horizontal line of the cursor crosshair.\n\t *\n\t * @default Grid.new()\n\t */\n\tpublic readonly lineY: Grid = this.children.push(Grid.new(this._root, {\n\t\tthemeTags: [\"y\"]\n\t}));\n\n\t/**\n\t * An element that represents current selection.\n\t *\n\t * @default Graphics.new()\n\t */\n\tpublic readonly selection: Graphics = this.children.push(Graphics.new(this._root, {\n\t\tthemeTags: [\"selection\", \"cursor\"], layer: 30\n\t}));\n\n\tprotected _movePoint: IPoint | undefined;\n\tprotected _lastPoint: IPoint = { x: 0, y: 0 };\n\n\tprotected _tooltipX: boolean = false;\n\tprotected _tooltipY: boolean = false;\n\n\t/**\n\t * A chart cursor is attached to.\n\t */\n\tpublic chart: XYChart | undefined;\n\n\tprotected _toX?: number;\n\tprotected _toY?: number;\n\n\tprotected _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"xy\", \"cursor\"]);\n\t\tsuper._afterNew();\n\t\tthis.setAll({ \"width\": p100, height: p100, isMeasured: true, position: \"absolute\" });\n\t\tthis.states.create(\"hidden\", { visible: true, opacity: 0 });\n\t\tthis._drawLines();\n\t\tthis.setPrivateRaw(\"visible\", false);\n\n\t\tthis._disposers.push(this.setTimeout(() => {\n\t\t\tthis.setPrivate(\"visible\", true)\n\t\t}, 500));\n\n\t\tthis._disposers.push(this.lineX.events.on(\"positionchanged\", () => {\n\t\t\tthis._handleXLine();\n\t\t}));\n\n\t\tthis._disposers.push(this.lineY.events.on(\"positionchanged\", () => {\n\t\t\tthis._handleYLine();\n\t\t}));\n\n\t\tthis._disposers.push(this.lineX.events.on(\"focus\", (ev) => this._handleLineFocus(ev.target)));\n\t\tthis._disposers.push(this.lineX.events.on(\"blur\", (ev) => this._handleLineBlur(ev.target)));\n\n\t\tthis._disposers.push(this.lineY.events.on(\"focus\", (ev) => this._handleLineFocus(ev.target)));\n\t\tthis._disposers.push(this.lineY.events.on(\"blur\", (ev) => this._handleLineBlur(ev.target)));\n\n\t\tif ($utils.supports(\"keyboardevents\")) {\n\t\t\tthis._disposers.push($utils.addEventListener(document, \"keydown\", (ev: KeyboardEvent) => {\n\t\t\t\tthis._handleLineMove(ev.keyCode);\n\t\t\t}));\n\t\t}\n\t}\n\n\tprotected _setUpTouch(): void {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tchart.plotContainer._display.cancelTouch = this.get(\"behavior\") != \"none\" ? true : false;\n\t\t}\n\t}\n\n\tprotected _handleXLine() {\n\t\tlet x = this.lineX.x();\n\t\tlet visible = true;\n\t\tif (x < 0 || x > this.width()) {\n\t\t\tvisible = false;\n\t\t}\n\t\tthis.lineX.setPrivate(\"visible\", visible);\n\t}\n\n\tprotected _handleYLine() {\n\t\tlet y = this.lineY.y();\n\t\tlet visible = true;\n\t\tif (y < 0 || y > this.height()) {\n\t\t\tvisible = false;\n\t\t}\n\t\tthis.lineY.setPrivate(\"visible\", visible);\n\t}\n\n\tprotected _handleLineMove(keyCode: number) {\n\t\tlet dir: any = \"\";\n\t\tlet position = 0;\n\t\tlet increment = 0.1;\n\t\tconst chart = this.chart;\n\n\t\tif (this._root.focused(this.lineX)) {\n\t\t\tif (chart && chart.xAxes.length) {\n\t\t\t\tincrement = chart.xAxes.getIndex(0)!.getCellWidthPosition();\n\t\t\t}\n\t\t\tposition = this.getPrivate(\"positionX\", 0);\n\t\t\tdir = \"positionX\";\n\t\t\tif (keyCode == 37) {\n\t\t\t\tposition -= increment;\n\t\t\t}\n\t\t\telse if (keyCode == 39) {\n\t\t\t\tposition += increment;\n\t\t\t}\n\t\t}\n\t\telse if (this._root.focused(this.lineY)) {\n\t\t\tif (chart && chart.yAxes.length) {\n\t\t\t\tincrement = chart.yAxes.getIndex(0)!.getCellWidthPosition();\n\t\t\t}\n\t\t\tposition = this.getPrivate(\"positionY\", 0);\n\t\t\tdir = \"positionY\";\n\t\t\tif (keyCode == 38) {\n\t\t\t\tposition -= increment;\n\t\t\t}\n\t\t\telse if (keyCode == 40) {\n\t\t\t\tposition += increment;\n\t\t\t}\n\t\t}\n\n\t\tif (position < 0) {\n\t\t\tposition = 0;\n\t\t}\n\t\telse if (position > 1) {\n\t\t\tposition = 1;\n\t\t}\n\n\t\tif (dir != \"\") {\n\t\t\tthis.set(dir, position);\n\t\t}\n\t}\n\n\tprotected _handleLineFocus(_line: Grid) {\n\t\tthis.setAll({\n\t\t\tpositionX: this.getPrivate(\"positionX\"),\n\t\t\tpositionY: this.getPrivate(\"positionY\"),\n\t\t\talwaysShow: true\n\t\t});\n\t}\n\n\tprotected _handleLineBlur(_line: Grid) {\n\t\tthis.setAll({\n\t\t\tpositionX: undefined,\n\t\t\tpositionY: undefined,\n\t\t\talwaysShow: false\n\t\t});\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tif (this.isDirty(\"xAxis\")) {\n\t\t\tthis._tooltipX = false;\n\t\t\tconst xAxis = this.get(\"xAxis\");\n\n\t\t\tif (xAxis) {\n\t\t\t\tconst tooltip = xAxis.get(\"tooltip\");\n\t\t\t\tif (tooltip) {\n\t\t\t\t\tthis._tooltipX = true;\n\t\t\t\t\tthis._disposers.push(\n\t\t\t\t\t\ttooltip.on(\"pointTo\", () => {\n\t\t\t\t\t\t\tthis._updateXLine(tooltip);\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"yAxis\")) {\n\t\t\tthis._tooltipY = false;\n\t\t\tconst yAxis = this.get(\"yAxis\");\n\n\t\t\tif (yAxis) {\n\t\t\t\tconst tooltip = yAxis.get(\"tooltip\");\n\t\t\t\tif (tooltip) {\n\t\t\t\t\tthis._tooltipY = true;\n\t\t\t\t\tthis._disposers.push(\n\t\t\t\t\t\ttooltip.on(\"pointTo\", () => {\n\t\t\t\t\t\t\tthis._updateYLine(tooltip);\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _handleSyncWith() {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tconst syncWith = this.get(\"syncWith\");\n\t\t\tconst otherCharts: Array = [];\n\t\t\tif (syncWith) {\n\t\t\t\t$array.each(syncWith, (cursor) => {\n\t\t\t\t\tconst chart = cursor.chart;\n\t\t\t\t\tif (chart) {\n\t\t\t\t\t\totherCharts.push(chart)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t\tchart._otherCharts = otherCharts;\n\t\t}\n\t}\n\n\tpublic _updateChildren() {\n\t\tsuper._updateChildren();\n\t\tthis._handleSyncWith();\n\n\t\tif (this.isDirty(\"positionX\") || this.isDirty(\"positionY\")) {\n\t\t\tconst positionX = this.get(\"positionX\");\n\t\t\tconst positionY = this.get(\"positionY\");\n\n\t\t\tif (positionX == null && positionY == null) {\n\t\t\t\tthis.hide(0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._movePoint = this.toGlobal(this._getPoint(this.get(\"positionX\", 0), this.get(\"positionY\", 0)));\n\t\t\t\tthis.handleMove();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _updateXLine(tooltip: Tooltip) {\n\t\tlet x = $math.round(this._display.toLocal(tooltip.get(\"pointTo\", { x: 0, y: 0 })).x, 2);\n\t\tif (this._toX != x) {\n\t\t\tthis.lineX.animate({ key: \"x\", to: x, duration: tooltip.get(\"animationDuration\", 0), easing: tooltip.get(\"animationEasing\") });\n\t\t\tthis._toX = x;\n\t\t}\n\t}\n\n\tprotected _updateYLine(tooltip: Tooltip) {\n\t\tlet y = $math.round(this._display.toLocal(tooltip.get(\"pointTo\", { x: 0, y: 0 })).y, 2);\n\t\tif (this._toY != y) {\n\t\t\tthis.lineY.animate({ key: \"y\", to: y, duration: tooltip.get(\"animationDuration\", 0), easing: tooltip.get(\"animationEasing\") });\n\t\t\tthis._toY = y;\n\t\t}\n\t}\n\n\tprotected _drawLines() {\n\t\tthis.lineX.set(\"draw\", (display) => {\n\t\t\tdisplay.moveTo(0, 0);\n\t\t\tdisplay.lineTo(0, this.height());\n\t\t})\n\t\tthis.lineY.set(\"draw\", (display) => {\n\t\t\tdisplay.moveTo(0, 0);\n\t\t\tdisplay.lineTo(this.width(), 0);\n\t\t})\n\t}\n\n\tpublic _setChart(chart: XYChart): void {\n\t\tthis.chart = chart;\n\n\t\tthis._handleSyncWith();\n\n\t\tconst plotContainer = chart.plotContainer;\n\n\t\tthis.events.on(\"boundschanged\", () => {\n\t\t\tthis._disposers.push(this.setTimeout(() => {\n\t\t\t\tif (this.get(\"alwaysShow\")) {\n\t\t\t\t\tthis._movePoint = this.toGlobal(this._getPoint(this.get(\"positionX\", 0), this.get(\"positionY\", 0)));\n\t\t\t\t\tthis.handleMove();\n\t\t\t\t}\n\t\t\t}, 50))\n\t\t})\n\n\t\t//this._display.interactive = true;\n\t\tif ($utils.supports(\"touchevents\")) {\n\t\t\tthis._disposers.push(plotContainer.events.on(\"click\", (event) => {\n\t\t\t\tif ($utils.isTouchEvent(event.originalEvent)) {\n\t\t\t\t\tthis._handleMove(event.originalEvent);\n\t\t\t\t}\n\t\t\t}));\n\t\t\tthis._setUpTouch();\n\t\t}\n\n\t\tthis._disposers.push(plotContainer.events.on(\"pointerdown\", (event) => {\n\t\t\tthis._handleCursorDown(event.originalEvent);\n\t\t}));\n\n\t\tthis._disposers.push(plotContainer.events.on(\"globalpointerup\", (event) => {\n\t\t\tthis._handleCursorUp(event.originalEvent);\n\t\t\tif (!event.native && !this.isHidden()) {\n\t\t\t\tthis._handleMove(event.originalEvent);\n\t\t\t}\n\t\t}));\n\n\t\tthis._disposers.push(plotContainer.events.on(\"globalpointermove\", (event) => {\n\t\t\tif (!this.get(\"syncWith\")) {\n\t\t\t\tif ($object.keys(plotContainer._downPoints).length == 0 && !event.native && this.isHidden()) {\n\t\t\t\t\t// Ignore mouse movement if it originates on outside element and\n\t\t\t\t\t// we're not dragging.\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._handleMove(event.originalEvent);\n\t\t}));\n\n\t\tconst parent = this.parent;\n\t\tif (parent) {\n\t\t\tparent.children.moveValue(this.selection);\n\t\t}\n\t}\n\n\tprotected _inPlot(point: IPoint): boolean {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\treturn chart.inPlot(point);\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected _handleCursorDown(event: IPointerEvent) {\n\t\tif((event as any).button == 2){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tconst rootPoint = this._root.documentPointToRoot({ x: event.clientX, y: event.clientY });\n\t\tlet local = this._display.toLocal(rootPoint);\n\t\tconst chart = this.chart;\n\n\t\tthis.selection.set(\"draw\", () => { });\n\n\t\tif (chart && this._inPlot(local)) {\n\t\t\tthis._downPoint = local;\n\n\t\t\tif (this.get(\"behavior\") != \"none\") {\n\t\t\t\tthis.selection.show();\n\n\t\t\t\tconst type = \"selectstarted\";\n\t\t\t\tif (this.events.isEnabled(type)) {\n\t\t\t\t\tthis.events.dispatch(type, { type: type, target: this });\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet positionX = this._getPosition(local).x;\n\t\t\tlet positionY = this._getPosition(local).y;\n\n\t\t\tthis.setPrivate(\"downPositionX\", positionX);\n\t\t\tthis.setPrivate(\"downPositionY\", positionY);\n\t\t}\n\t}\n\n\tprotected _handleCursorUp(event: IPointerEvent) {\n\t\t// TODO: handle multitouch\n\t\tif (this._downPoint) {\n\t\t\tconst behavior = this.get(\"behavior\", \"none\");\n\t\t\tif (behavior != \"none\") {\n\t\t\t\tif (behavior.charAt(0) === \"z\") {\n\t\t\t\t\tthis.selection.hide();\n\t\t\t\t}\n\n\t\t\t\tconst rootPoint = this._root.documentPointToRoot({ x: event.clientX, y: event.clientY });\n\t\t\t\tlet local = this._display.toLocal(rootPoint);\n\n\t\t\t\tconst downPoint = this._downPoint;\n\t\t\t\tconst moveThreshold = this.get(\"moveThreshold\", 1);\n\t\t\t\tif (local && downPoint) {\n\t\t\t\t\tlet dispatch = false;\n\t\t\t\t\tif (behavior === \"zoomX\" || behavior === \"zoomXY\" || behavior === \"selectX\" || behavior === \"selectXY\") {\n\t\t\t\t\t\tif (Math.abs(local.x - downPoint.x) > moveThreshold) {\n\t\t\t\t\t\t\tdispatch = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (behavior === \"zoomY\" || behavior === \"zoomXY\" || behavior === \"selectY\" || behavior === \"selectXY\") {\n\t\t\t\t\t\tif (Math.abs(local.y - downPoint.y) > moveThreshold) {\n\t\t\t\t\t\t\tdispatch = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (dispatch) {\n\t\t\t\t\t\tconst type = \"selectended\";\n\t\t\t\t\t\tif (this.events.isEnabled(type)) {\n\t\t\t\t\t\t\tthis.events.dispatch(type, { type: type, target: this });\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis._downPoint = undefined;\n\t}\n\n\tprotected _handleMove(event: IPointerEvent) {\n\t\tif (this.getPrivate(\"visible\")) {\n\t\t\tconst chart = this.chart;\n\t\t\tif (chart && $object.keys(chart.plotContainer._downPoints).length > 1) {\n\t\t\t\tthis.set(\"forceHidden\", true)\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.set(\"forceHidden\", false)\n\t\t\t}\n\n\t\t\t// TODO: handle multitouch\n\t\t\tconst rootPoint = this._root.documentPointToRoot({ x: event.clientX, y: event.clientY });\n\n\t\t\tconst lastPoint = this._lastPoint;\n\n\t\t\tif (Math.round(lastPoint.x) === Math.round(rootPoint.x) && Math.round(lastPoint.y) === Math.round(rootPoint.y)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._lastPoint = rootPoint;\n\t\t\tthis.setPrivate(\"lastPoint\", rootPoint);\n\n\t\t\tthis.handleMove({ x: rootPoint.x, y: rootPoint.y });\n\t\t}\n\t}\n\n\tprotected _getPosition(point: IPoint): IPoint {\n\t\treturn { x: point.x / this.width(), y: point.y / this.height() };\n\t}\n\n\t/**\n\t * Moves the cursor to X/Y coordinates within chart container (`point`).\n\t *\n\t * If `skipEvent` parameter is set to `true`, the move will not invoke\n\t * the `\"cursormoved\"` event.\n\t * \n\t * @param point X/Y to move cursor to\n\t * @param skipEvent Do not fire \"cursormoved\" event\n\t */\n\tpublic handleMove(point?: IPoint, skipEvent?: boolean) {\n\t\tif (!point) {\n\t\t\tpoint = this._movePoint;\n\t\t}\n\n\t\tconst alwaysShow = this.get(\"alwaysShow\");\n\n\t\tif (!point) {\n\t\t\tthis.hide(0);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._movePoint = point;\n\t\tlet local = this._display.toLocal(point);\n\t\tlet chart = this.chart;\n\n\t\tif (chart && this._inPlot(local)) {\n\t\t\tchart._movePoint = point;\n\n\t\t\tif (this.isHidden()) {\n\t\t\t\tthis.show();\n\n\t\t\t\tconst behavior = this.get(\"behavior\", \"\");\n\t\t\t\tif (behavior.charAt(0) == \"z\") {\n\t\t\t\t\tthis.selection.set(\"draw\", () => { });\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet x = local.x;\n\t\t\tlet y = local.y;\n\n\t\t\tlet xyPos = this._getPosition(local);\n\n\t\t\tthis.setPrivate(\"point\", local);\n\n\t\t\tlet snapToSeries = this.get(\"snapToSeries\");\n\n\t\t\tif (this._downPoint) {\n\t\t\t\tsnapToSeries = undefined;\n\t\t\t}\n\n\t\t\tlet userPositionX = this.get(\"positionX\");\n\t\t\tlet positionX = xyPos.x;\n\n\t\t\tif ($type.isNumber(userPositionX)) {\n\t\t\t\tpositionX = userPositionX;\n\t\t\t}\n\n\t\t\tlet userPositionY = this.get(\"positionY\");\n\t\t\tlet positionY = xyPos.y;\n\n\t\t\tif ($type.isNumber(userPositionY)) {\n\t\t\t\tpositionY = userPositionY;\n\t\t\t}\n\n\t\t\tthis.setPrivate(\"positionX\", positionX);\n\t\t\tthis.setPrivate(\"positionY\", positionY);\n\n\t\t\tconst xy = this._getPoint(positionX, positionY);\n\t\t\tx = xy.x;\n\t\t\ty = xy.y;\n\n\t\t\tchart.xAxes.each((axis) => {\n\t\t\t\taxis._handleCursorPosition(positionX, snapToSeries);\n\t\t\t\tif (alwaysShow) {\n\t\t\t\t\taxis.handleCursorShow();\n\t\t\t\t}\n\t\t\t})\n\t\t\tchart.yAxes.each((axis) => {\n\t\t\t\taxis._handleCursorPosition(positionY, snapToSeries);\n\t\t\t\tif (alwaysShow) {\n\t\t\t\t\taxis.handleCursorShow();\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (!skipEvent) {\n\t\t\t\tchart._handleCursorPosition();\n\n\t\t\t\tconst type = \"cursormoved\";\n\t\t\t\tif (this.events.isEnabled(type)) {\n\t\t\t\t\tthis.events.dispatch(type, { type: type, target: this });\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._updateLines(x, y);\n\n\t\t\tchart.arrangeTooltips();\n\t\t}\n\t\telse if (!this._downPoint) {\n\t\t\tif (!alwaysShow) {\n\t\t\t\tthis.hide(0);\n\n\t\t\t\tconst type = \"cursorhidden\";\n\t\t\t\tif (this.events.isEnabled(type)) {\n\t\t\t\t\tthis.events.dispatch(type, { type: type, target: this });\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this._downPoint && this.get(\"behavior\") != \"none\") {\n\t\t\tthis._updateSelection(local)\n\t\t}\n\t}\n\n\tprotected _getPoint(positionX: number, positionY: number): IPoint {\n\t\treturn { x: this.width() * positionX, y: this.height() * positionY };\n\t}\n\n\n\tprotected _updateLines(x: number, y: number) {\n\t\tif (!this._tooltipX) {\n\t\t\tthis.lineX.set(\"x\", x);\n\t\t}\n\t\tif (!this._tooltipY) {\n\t\t\tthis.lineY.set(\"y\", y);\n\t\t}\n\n\t\tthis._drawLines();\n\t}\n\n\tprotected _updateSelection(point: IPoint) {\n\t\tconst selection = this.selection;\n\t\tconst behavior = this.get(\"behavior\");\n\t\tconst w = this.width();\n\t\tconst h = this.height();\n\n\t\tif (point.x < 0) {\n\t\t\tpoint.x = 0;\n\t\t}\n\n\t\tif (point.x > w) {\n\t\t\tpoint.x = w;\n\t\t}\n\n\t\tif (point.y < 0) {\n\t\t\tpoint.y = 0;\n\t\t}\n\n\t\tif (point.y > h) {\n\t\t\tpoint.y = h;\n\t\t}\n\n\t\tselection.set(\"draw\", (display) => {\n\t\t\tconst downPoint = this._downPoint;\n\t\t\tif (downPoint) {\n\t\t\t\tif (behavior === \"zoomXY\" || behavior === \"selectXY\") {\n\t\t\t\t\tdisplay.moveTo(downPoint.x, downPoint.y);\n\t\t\t\t\tdisplay.lineTo(downPoint.x, point.y);\n\t\t\t\t\tdisplay.lineTo(point.x, point.y);\n\t\t\t\t\tdisplay.lineTo(point.x, downPoint.y);\n\t\t\t\t\tdisplay.lineTo(downPoint.x, downPoint.y);\n\t\t\t\t}\n\t\t\t\telse if (behavior === \"zoomX\" || behavior === \"selectX\") {\n\t\t\t\t\tdisplay.moveTo(downPoint.x, 0);\n\t\t\t\t\tdisplay.lineTo(downPoint.x, h);\n\t\t\t\t\tdisplay.lineTo(point.x, h);\n\t\t\t\t\tdisplay.lineTo(point.x, 0);\n\t\t\t\t\tdisplay.lineTo(downPoint.x, 0);\n\t\t\t\t}\n\t\t\t\telse if (behavior === \"zoomY\" || behavior === \"selectY\") {\n\t\t\t\t\tdisplay.moveTo(0, downPoint.y);\n\t\t\t\t\tdisplay.lineTo(w, downPoint.y);\n\t\t\t\t\tdisplay.lineTo(w, point.y);\n\t\t\t\t\tdisplay.lineTo(0, point.y);\n\t\t\t\t\tdisplay.lineTo(0, downPoint.y);\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tprotected _onHide() {\n\t\tif (this.isHidden()) {\n\t\t\tlet chart = this.chart;\n\t\t\tif (chart) {\n\n\t\t\t\tchart.xAxes.each((axis) => {\n\t\t\t\t\taxis.handleCursorHide();\n\t\t\t\t})\n\t\t\t\tchart.yAxes.each((axis) => {\n\t\t\t\t\taxis.handleCursorHide();\n\t\t\t\t})\n\t\t\t\tchart.series.each((series) => {\n\t\t\t\t\tseries.handleCursorHide();\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t\tsuper._onHide();\n\t}\n\n\tprotected _onShow() {\n\t\tif (!this.isHidden()) {\n\t\t\tlet chart = this.chart;\n\t\t\tif (chart) {\n\t\t\t\tchart.xAxes.each((axis) => {\n\t\t\t\t\taxis.handleCursorShow();\n\t\t\t\t})\n\t\t\t\tchart.yAxes.each((axis) => {\n\t\t\t\t\taxis.handleCursorShow();\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t\tsuper._onShow();\n\t}\n\n\tprotected _dispose() {\n\t\tsuper._dispose();\n\t\tthis.selection.dispose();\n\t}\n}\n","import type { AxisRenderer } from \"./AxisRenderer\";\nimport type { AxisLabel } from \"./AxisLabel\";\nimport type { AxisTick } from \"./AxisTick\";\nimport type { Graphics } from \"../../../core/render/Graphics\";\nimport type { Grid } from \"./Grid\";\nimport type { AxisBullet } from \"./AxisBullet\";\nimport type { XYChart } from \"../XYChart\";\nimport type { XYSeries, IXYSeriesDataItem } from \"../series/XYSeries\";\nimport type { Animation } from \"../../../core/util/Entity\";\nimport type { Tooltip } from \"../../../core/render/Tooltip\";\nimport type { Root } from \"../../../core/Root\";\n\nimport { DataItem } from \"../../../core/render/Component\";\nimport { Component, IComponentSettings, IComponentPrivate, IComponentEvents, IComponentDataItem } from \"../../../core/render/Component\";\nimport { Container } from \"../../../core/render/Container\";\nimport { p100 } from \"../../../core/util/Percent\";\nimport { List } from \"../../../core/util/List\";\nimport { Rectangle } from \"../../../core/render/Rectangle\";\n\nimport * as $array from \"../../../core/util/Array\";\nimport * as $type from \"../../../core/util/Type\";\nimport * as $utils from \"../../../core/util/Utils\";\n\n\n\nexport interface IAxisSettings extends IComponentSettings {\n\t/**\n\t * A renderer object which is responsible of rendering visible axis elements.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/#Axis_renderer} for more info\n\t */\n\trenderer: R;\n\n\t/**\n\t * The initial relative zoom start position of the axis.\n\t *\n\t * E.g. stting it to `0.1` will pre-zoom axis to 10% from the start.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Pre_zooming_axes} for more info\n\t */\n\tstart?: number;\n\n\t/**\n\t * The initial relative zoom end position of the axis.\n\t *\n\t * E.g. stting it to `0.9` will pre-zoom axis to 10% from the end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Pre_zooming_axes} for more info\n\t */\n\tend?: number;\n\n\t/**\n\t * Maximum number of times the scope of the axis could auto-zoom-in.\n\t *\n\t * This is to prevent axis jumping too drastically when scrolling/zooming.\n\t *\n\t * @default 1000\n\t */\n\tmaxZoomFactor?: number | null;\n\n\t/**\n\t * Maximum number of axis elements to show at a time.\n\t *\n\t * E.g. for a [[CategoryAxis]] that would be number of categories.\n\t * For a [[DateAxis]] it would be number of `baseInterval`.\n\t *\n\t * The axis will not allow to be zoomed out beyond this number.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Limiting_zoom_scope} for more info\n\t */\n\tmaxZoomCount?: number;\n\n\t/**\n\t * Minimum number of axis elements to show at a time.\n\t *\n\t * E.g. for a [[CategoryAxis]] that would be number of categories.\n\t * For a [[DateAxis]] it would be number of `baseInterval`.\n\t *\n\t * The axis will not allow to be zoomed in beyond this number.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Limiting_zoom_scope} for more info\n\t */\n\tminZoomCount?: number;\n\n\t/**\n\t * Base value of the axis.\n\t */\n\tbaseValue?: number;\n\n\t/**\n\t * If set to `false` the axis will be exempt when chart is panned\n\t * horizontally, and will keep its current position.`\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Excluding_axes_from_pan_or_zoom} for more info\n\t */\n\tpanX?: boolean;\n\n\t/**\n\t * If set to `false` the axis will be exempt when chart is panned\n\t * vertically, and will keep its current position.`\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Excluding_axes_from_pan_or_zoom} for more info\n\t */\n\tpanY?: boolean;\n\n\t/**\n\t * If set to `false` the axis will be exempt when chart is zoomed\n\t * horizontally, and will keep its current zoom/position.`\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Excluding_axes_from_pan_or_zoom} for more info\n\t */\n\tzoomX?: boolean;\n\n\t/**\n\t * If set to `false` the axis will be exempt when chart is zoomed\n\t * vertically, and will keep its current zoom/position.`\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Excluding_axes_from_pan_or_zoom} for more info\n\t */\n\tzoomY?: boolean;\n\n\t/**\n\t * A relative distance the axis is allowed to be zoomed/panned beyond its\n\t * actual scope.\n\t *\n\t * @default 0.1\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/zoom-and-pan/#Over_zooming} for more info\n\t */\n\tmaxDeviation?: number;\n\n\t/**\n\t * [[Tooltip]] element to use for axis.\n\t */\n\ttooltip?: Tooltip;\n\n\t/**\n\t * `tooltipLocation` indicates\n\t * which relative place to snap to: `0` beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @default 0.5\n\t */\n\ttooltipLocation?: number;\n\n\t/**\n\t * Should tooltip snap to the `tooltipLocation` (`true`) or follow cursor.\n\t *\n\t * @default true\n\t */\n\tsnapTooltip?: boolean;\n\n\t/**\n\t * If set to `true` (default) the axis width will stay constant across all\n\t * zooms, even if actual length of all visible labels changes.\n\t *\n\t * @default true\n\t */\n\tfixAxisSize?: boolean;\n\n\t/**\n\t * A function that will be used to create bullets on each cell.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Axis_bullets} for more info\n\t */\n\tbullet?: (root: Root, axis: Axis, dataItem: DataItem) => AxisBullet;\n}\n\nexport interface IAxisEvents extends IComponentEvents {\n}\n\nexport interface IAxisPrivate extends IComponentPrivate {\n\n\t/**\n\t * @ignore\n\t */\n\tname?: \"value\" | \"date\" | \"category\";\n\n\t/**\n\t * @ignore\n\t */\n\tupdateScrollbar?: boolean;\n\n\t/**\n\t * @ignore\n\t */\n\tmaxZoomFactor?: number | null;\n\n\t/**\n\t * Saves position to which tooltip points.\n\t */\n\ttooltipPosition?: number;\n\n}\n\nexport interface IAxisDataItem extends IComponentDataItem {\n\n\t/**\n\t * Axis label element.\n\t */\n\tlabel?: AxisLabel;\n\n\t/**\n\t * Tick element.\n\t */\n\ttick?: AxisTick;\n\n\t/**\n\t * Grid line element.\n\t */\n\tgrid?: Grid;\n\n\t/**\n\t * Axis fill element.\n\t */\n\taxisFill?: Graphics;\n\n\t/**\n\t * Bullet element.\n\t */\n\tbullet?: AxisBullet;\n\n\t/**\n\t * Indicates if this data item represents an axis range.\n\t */\n\tisRange?: boolean;\n\n\t/**\n\t * If set to `true`, the grid and axis fill of this data item will be drawn\n\t * above series.\n\t *\n\t * NOTE: this needs to be set **before** crating an axis range. Updating this\n\t * dynamically won't have any effect.\n\t *\n\t * NOTE: if you need all grid to be drawn above series, you can brig it to\n\t * front with `chart.gridContainer.toFront();`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-ranges/#Grid_fill_above_series} for more info\n\t * @default false\n\t */\n\tabove?: boolean\n\n}\n\n/**\n * A base class for all axes.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/#Adding_axes} for more info\n */\nexport abstract class Axis extends Component {\n\tpublic static className: string = \"Axis\";\n\tpublic static classNames: Array = Component.classNames.concat([Axis.className]);\n\n\tdeclare public _settings: IAxisSettings;\n\tdeclare public _privateSettings: IAxisPrivate;\n\tdeclare public _dataItemSettings: IAxisDataItem;\n\tdeclare public _events: IAxisEvents;\n\n\tdeclare public _seriesType: XYSeries;\n\n\tprotected _series: Array = [];\n\n\tpublic _isPanning: boolean = false;\n\n\t/**\n\t * A [[Container]] that holds all the axis label elements.\n\t *\n\t * @default Container.new()\n\t */\n\tpublic readonly labelsContainer: Container = this.children.push(Container.new(this._root, {}));\n\n\t/**\n\t * A [[Container]] that holds all the axis grid and fill elements.\n\t *\n\t * @default Container.new()\n\t */\n\tpublic readonly gridContainer: Container = Container.new(this._root, { width: p100, height: p100 });\n\n\t/**\n\t * A [[Container]] that holds axis grid elements which goes above the series.\n\t *\n\t * @default Container.new()\n\t */\n\tpublic readonly topGridContainer: Container = Container.new(this._root, { width: p100, height: p100 });\n\n\t/**\n\t * A [[Container]] that holds all the axis bullet elements.\n\t *\n\t * @default new Container\n\t */\n\tpublic readonly bulletsContainer: Container = this.children.push(Container.new(this._root, { isMeasured: false, width: p100, height: p100, position: \"absolute\" }));\n\n\t/**\n\t * A referenece to the the chart the axis belongs to.\n\t */\n\tpublic chart: XYChart | undefined;\n\n\tprotected _rangesDirty: Boolean = false;\n\n\tpublic _panStart: number = 0;\n\tpublic _panEnd: number = 1;\n\n\tprotected _sAnimation?: Animation;\n\tprotected _eAnimation?: Animation;\n\n\tpublic _skipSync: boolean = false;\n\n\t/**\n\t * A list of axis ranges.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-ranges/} for more info\n\t * @default new List()\n\t */\n\tpublic readonly axisRanges: List> = new List();\n\n\tpublic _seriesAxisRanges: Array> = [];\n\n\t/**\n\t * A control label that is invisible but is used to keep width the width of\n\t * the axis constant.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Ghost_label} for more info\n\t */\n\tpublic ghostLabel!: AxisLabel;\n\n\tprotected _cursorPosition: number = -1;\n\n\tprotected _snapToSeries?: Array;\n\n\tpublic _seriesValuesDirty = false;\n\n\t/**\n\t * A container above the axis that can be used to add additional stuff into\n\t * it. For example a legend, label, or an icon.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-headers/} for more info\n\t * @default new Container\n\t */\n\tpublic axisHeader: Container = this.children.push(Container.new(this._root, {\n\t\tthemeTags: [\"axis\", \"header\"],\n\t\tposition: \"absolute\",\n\t\tbackground: Rectangle.new(this._root, {\n\t\t\tthemeTags: [\"header\", \"background\"],\n\t\t\tfill: this._root.interfaceColors.get(\"background\")\n\t\t})\n\t}));\n\n\tpublic _bullets: { [index: string]: AxisBullet } = {};\n\n\tprotected _dispose() {\n\t\t// these could be in other parents, so disposing just in case\n\t\tthis.gridContainer.dispose();\n\t\tthis.topGridContainer.dispose();\n\t\tthis.bulletsContainer.dispose();\n\t\tthis.labelsContainer.dispose();\n\t\tthis.axisHeader.dispose();\n\t\tsuper._dispose();\n\t}\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\n\t\tthis.setPrivate(\"updateScrollbar\", true);\n\n\t\tthis._disposers.push(this.axisRanges.events.onAll((change) => {\n\t\t\tif (change.type === \"clear\") {\n\t\t\t\t$array.each(change.oldValues, (dataItem) => {\n\t\t\t\t\tthis.disposeDataItem(dataItem);\n\t\t\t\t});\n\t\t\t} else if (change.type === \"push\") {\n\t\t\t\tthis._processAxisRange(change.newValue, [\"range\"]);\n\t\t\t} else if (change.type === \"setIndex\") {\n\t\t\t\tthis._processAxisRange(change.newValue, [\"range\"]);\n\t\t\t} else if (change.type === \"insertIndex\") {\n\t\t\t\tthis._processAxisRange(change.newValue, [\"range\"]);\n\t\t\t} else if (change.type === \"removeIndex\") {\n\t\t\t\tthis.disposeDataItem(change.oldValue);\n\t\t\t} else if (change.type === \"moveIndex\") {\n\t\t\t\tthis._processAxisRange(change.value, [\"range\"]);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unknown IStreamEvent type\");\n\t\t\t}\n\t\t}))\n\n\t\tconst renderer = this.get(\"renderer\");\n\t\tif (renderer) {\n\t\t\trenderer.axis = this;\n\t\t\trenderer.processAxis();\n\t\t}\n\t\tthis.children.push(renderer);\n\t\tthis.ghostLabel = renderer.makeLabel(new DataItem(this, undefined, {}), []);\n\t\tthis.ghostLabel.adapters.disable(\"text\");\n\t\tthis.ghostLabel.set(\"opacity\", 0);\n\t}\n\n\tprotected _updateFinals(_start:number, _end:number){\n\n\t}\n\n\t/**\n\t * Zooms the axis to relative locations.\n\t *\n\t * Both `start` and `end` are relative: 0 means start of the axis, 1 - end.\n\t *\n\t * @param start Relative start\n\t * @param end Relative end\n\t * @param duration Duration of the zoom animation in milliseconds\n\t * @return Zoom animation\n\t */\n\tpublic zoom(start: number, end: number, duration?: number, priority?: \"start\" | \"end\"): Animation | Animation | undefined {\n\t\tthis._updateFinals(start, end);\n\n\t\tif (this.get(\"start\") !== start || this.get(\"end\") != end) {\n\t\t\tlet sAnimation = this._sAnimation;\n\t\t\tlet eAnimation = this._eAnimation;\n\n\t\t\tlet maxDeviation = this.get(\"maxDeviation\", 0.5) * Math.min(1, (end - start));\n\n\t\t\tif (start < - maxDeviation) {\n\t\t\t\tstart = -maxDeviation;\n\t\t\t}\n\n\t\t\tif (end > 1 + maxDeviation) {\n\t\t\t\tend = 1 + maxDeviation;\n\t\t\t}\n\n\t\t\tif (start > end) {\n\t\t\t\t[start, end] = [end, start];\n\t\t\t}\n\n\t\t\tif (!$type.isNumber(duration)) {\n\t\t\t\tduration = this.get(\"interpolationDuration\", 0);\n\t\t\t}\n\n\t\t\tif (!priority) {\n\t\t\t\tpriority = \"end\";\n\t\t\t}\n\n\t\t\tlet maxZoomFactor = this.getPrivate(\"maxZoomFactor\", this.get(\"maxZoomFactor\", 100));\n\t\t\tlet maxZoomFactorReal = maxZoomFactor;\n\n\t\t\tif (end === 1 && start !== 0) {\n\t\t\t\tif (start < this.get(\"start\")) {\n\t\t\t\t\tpriority = \"start\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpriority = \"end\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (start === 0 && end !== 1) {\n\t\t\t\tif (end > this.get(\"end\")) {\n\t\t\t\t\tpriority = \"end\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpriority = \"start\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet minZoomCount = this.get(\"minZoomCount\");\n\t\t\tlet maxZoomCount = this.get(\"maxZoomCount\");\n\n\t\t\tif ($type.isNumber(minZoomCount)) {\n\t\t\t\tmaxZoomFactor = maxZoomFactorReal / minZoomCount;\n\t\t\t}\n\n\t\t\tlet minZoomFactor: number = 1;\n\n\t\t\tif ($type.isNumber(maxZoomCount)) {\n\t\t\t\tminZoomFactor = maxZoomFactorReal / maxZoomCount;\n\t\t\t}\n\n\t\t\t// most likely we are dragging left scrollbar grip here, so we tend to modify end\n\t\t\tif (priority === \"start\") {\n\t\t\t\tif (maxZoomCount > 0) {\n\t\t\t\t\t// add to the end\n\t\t\t\t\tif (1 / (end - start) < minZoomFactor) {\n\t\t\t\t\t\tend = start + 1 / minZoomFactor;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// add to the end\n\t\t\t\tif (1 / (end - start) > maxZoomFactor) {\n\t\t\t\t\tend = start + 1 / maxZoomFactor;\n\t\t\t\t}\n\t\t\t\t//unless end is > 0\n\t\t\t\tif (end > 1 && end - start < 1 / maxZoomFactor) {\n\t\t\t\t\t//end = 1;\n\t\t\t\t\tstart = end - 1 / maxZoomFactor;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// most likely we are dragging right, so we modify left\n\t\t\telse {\n\t\t\t\tif (maxZoomCount > 0) {\n\t\t\t\t\t// add to the end\n\t\t\t\t\tif (1 / (end - start) < minZoomFactor) {\n\t\t\t\t\t\tstart = end - 1 / minZoomFactor;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// remove from start\n\t\t\t\tif (1 / (end - start) > maxZoomFactor) {\n\t\t\t\t\tstart = end - 1 / maxZoomFactor;\n\t\t\t\t}\n\t\t\t\tif (start < 0 && end - start < 1 / maxZoomFactor) {\n\t\t\t\t\t//start = 0;\n\t\t\t\t\tend = start + 1 / maxZoomFactor;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (1 / (end - start) > maxZoomFactor) {\n\t\t\t\tend = start + 1 / maxZoomFactor;\n\t\t\t}\n\n\t\t\tif (1 / (end - start) > maxZoomFactor) {\n\t\t\t\tstart = end - 1 / maxZoomFactor;\n\t\t\t}\n\n\t\t\tif (maxZoomCount != null && minZoomCount != null && (start == this.get(\"start\") && end == this.get(\"end\"))) {\n\t\t\t\tconst chart = this.chart;\n\t\t\t\tif (chart) {\n\t\t\t\t\tchart._handleAxisSelection(this, true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (((sAnimation && sAnimation.playing && sAnimation.to == start) || this.get(\"start\") == start) && ((eAnimation && eAnimation.playing && eAnimation.to == end) || this.get(\"end\") == end)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\n\t\t\tif (duration > 0) {\n\t\t\t\tlet easing = this.get(\"interpolationEasing\");\n\t\t\t\tlet sAnimation, eAnimation;\n\t\t\t\tif (this.get(\"start\") != start) {\n\t\t\t\t\tsAnimation = this.animate({ key: \"start\", to: start, duration: duration, easing: easing });\n\t\t\t\t}\n\t\t\t\tif (this.get(\"end\") != end) {\n\t\t\t\t\teAnimation = this.animate({ key: \"end\", to: end, duration: duration, easing: easing });\n\t\t\t\t}\n\n\t\t\t\tthis._sAnimation = sAnimation;\n\t\t\t\tthis._eAnimation = eAnimation;\n\n\t\t\t\tif (sAnimation) {\n\t\t\t\t\treturn sAnimation;\n\t\t\t\t}\n\t\t\t\telse if (eAnimation) {\n\t\t\t\t\treturn eAnimation;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.set(\"start\", start);\n\t\t\t\tthis.set(\"end\", end);\n\t\t\t\t// otherwise bullets and line out of sync, as series is not redrawn\n\t\t\t\tthis._root.events.once(\"frameended\", () => {\n\t\t\t\t\tthis._markDirtyKey(\"start\");\n\t\t\t\t\tthis._root._markDirty();\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (this._sAnimation) {\n\t\t\t\tthis._sAnimation.stop();\n\t\t\t}\n\t\t\tif (this._eAnimation) {\n\t\t\t\tthis._eAnimation.stop();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * A list of series using this axis.\n\t *\n\t * @return Series\n\t */\n\tpublic get series(): Array {\n\t\treturn this._series;\n\t}\n\n\n\tpublic _processAxisRange(dataItem: DataItem, themeTags: Array) {\n\t\tdataItem.setRaw(\"isRange\", true);\n\t\tthis._createAssets(dataItem, themeTags);\n\t\tthis._rangesDirty = true;\n\t\tthis._prepareDataItem(dataItem);\n\n\t\tconst above = dataItem.get(\"above\");\n\t\tconst container = this.topGridContainer;\n\n\t\tconst grid = dataItem.get(\"grid\");\n\t\tif (above && grid) {\n\t\t\tcontainer.children.moveValue(grid);\n\t\t}\n\n\t\tconst fill = dataItem.get(\"axisFill\");\n\t\tif (above && fill) {\n\t\t\tcontainer.children.moveValue(fill);\n\t\t}\n\t}\n\n\tpublic _prepareDataItem(_dataItem: DataItem, _index?: number) { }\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract getX(_value: any, _location: number, baseValue?: any): number;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract getY(_value: any, _location: number, baseValue?: any): number;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract getDataItemCoordinateX(_dataItem: DataItem, _field: string, _cellLocation?: number, _axisLocation?: number): number;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract getDataItemCoordinateY(_dataItem: DataItem, _field: string, _cellLocation?: number, _axisLocation?: number): number;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract getDataItemPositionX(_dataItem: DataItem, _field: string, _cellLocation?: number, _axisLocation?: number): number;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract getDataItemPositionY(_dataItem: DataItem, _field: string, _cellLocation?: number, _axisLocation?: number): number;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtyExtremes() {\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtySelectionExtremes() {\n\t}\n\n\tpublic _calculateTotals() {\n\t}\n\n\tprotected _updateAxisRanges() {\n\t\tthis._bullets = {};\n\t\tthis.axisRanges.each((axisRange) => {\n\t\t\tthis._prepareDataItem(axisRange);\n\t\t})\n\n\t\t$array.each(this._seriesAxisRanges, (axisRange) => {\n\t\t\tthis._prepareDataItem(axisRange);\n\t\t})\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract baseValue(): any;\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tif (this.get(\"fixAxisSize\")) {\n\t\t\tthis.ghostLabel.set(\"visible\", true);\n\t\t}\n\t\telse {\n\t\t\tthis.ghostLabel.set(\"visible\", false);\n\t\t}\n\n\t\tif (this.isDirty(\"start\") || this.isDirty(\"end\")) {\n\t\t\tthis.chart!._updateCursor();\n\n\t\t\tlet start = this.get(\"start\", 0);\n\t\t\tlet end = this.get(\"end\", 1);\n\n\t\t\tlet maxDeviation = this.get(\"maxDeviation\", 0.5) * Math.min(1, (end - start));\n\n\t\t\tif (start < -maxDeviation) {\n\t\t\t\tlet delta = start + maxDeviation;\n\t\t\t\tstart = -maxDeviation;\n\t\t\t\tthis.setRaw(\"start\", start);\n\t\t\t\tif (this.isDirty(\"end\")) {\n\t\t\t\t\tthis.setRaw(\"end\", end - delta);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (end > 1 + maxDeviation) {\n\t\t\t\tlet delta = end - 1 - maxDeviation;\n\t\t\t\tend = 1 + maxDeviation;\n\t\t\t\tthis.setRaw(\"end\", end);\n\n\t\t\t\tif (this.isDirty(\"start\")) {\n\t\t\t\t\tthis.setRaw(\"start\", start - delta);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\tconst renderer = this.get(\"renderer\");\n\t\trenderer._start = this.get(\"start\")!;\n\t\trenderer._end = this.get(\"end\")!;\n\t\trenderer._inversed = renderer.get(\"inversed\", false);\n\t\trenderer._axisLength = renderer.axisLength() / (renderer._end - renderer._start);\n\t\trenderer._updateLC();\n\n\t\tif (this.isDirty(\"tooltip\")) {\n\t\t\tconst tooltip = this.get(\"tooltip\");\n\t\t\tif (tooltip) {\n\t\t\t\tconst rendererTags = renderer.get(\"themeTags\");\n\t\t\t\ttooltip.addTag(\"axis\");\n\t\t\t\ttooltip.addTag(this.className.toLowerCase());\n\t\t\t\ttooltip._applyThemes();\n\n\t\t\t\tif (rendererTags) {\n\t\t\t\t\ttooltip.set(\"themeTags\", $utils.mergeTags(tooltip.get(\"themeTags\"), rendererTags));\n\t\t\t\t\ttooltip.label._applyThemes();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateTooltipBounds() {\n\t\tconst tooltip = this.get(\"tooltip\")!;\n\t\tif (tooltip) {\n\t\t\tthis.get(\"renderer\").updateTooltipBounds(tooltip);\n\t\t}\n\t}\n\n\tpublic _updateBounds() {\n\t\tsuper._updateBounds();\n\t\tthis._updateTooltipBounds();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic processChart(chart: XYChart) {\n\t\tthis.chart = chart;\n\t\tconst renderer = this.get(\"renderer\");\n\n\t\trenderer.chart = chart;\n\t\tchart.gridContainer.children.push(this.gridContainer);\n\t\tchart.topGridContainer.children.push(this.topGridContainer);\n\n\t\tchart.axisHeadersContainer.children.push(this.axisHeader);\n\n\t\tthis.on(\"start\", () => {\n\t\t\tchart._handleAxisSelection(this);\n\t\t});\n\t\tthis.on(\"end\", () => {\n\t\t\tchart._handleAxisSelection(this);\n\t\t});\n\n\t\tchart.plotContainer.onPrivate(\"width\", () => {\n\t\t\tthis.markDirtySize();\n\t\t});\n\t\tchart.plotContainer.onPrivate(\"height\", () => {\n\t\t\tthis.markDirtySize();\n\t\t});\n\n\t\tchart.processAxis(this);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic hideDataItem(dataItem: DataItem): Promise {\n\t\tthis._toggleDataItem(dataItem, false);\n\t\treturn super.hideDataItem(dataItem);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic showDataItem(dataItem: DataItem): Promise {\n\t\tthis._toggleDataItem(dataItem, true);\n\t\treturn super.showDataItem(dataItem);\n\t}\n\n\n\tpublic _toggleDataItem(dataItem: DataItem, visible: boolean) {\n\t\tconst label = dataItem.get(\"label\");\n\t\tif (label) {\n\t\t\tlabel.setPrivate(\"visible\", visible);\n\t\t}\n\t\tconst grid = dataItem.get(\"grid\");\n\t\tif (grid) {\n\t\t\tgrid.setPrivate(\"visible\", visible);\n\t\t}\n\t\tconst tick = dataItem.get(\"tick\");\n\t\tif (tick) {\n\t\t\ttick.setPrivate(\"visible\", visible);\n\t\t}\n\t\tconst axisFill = dataItem.get(\"axisFill\");\n\t\tif (axisFill) {\n\t\t\taxisFill.setPrivate(\"visible\", visible);\n\t\t}\n\n\t\tconst bullet = dataItem.get(\"bullet\");\n\t\tif (bullet) {\n\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\tif (sprite) {\n\t\t\t\tsprite.setPrivate(\"visible\", visible);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract basePosition(): number;\n\n\tpublic _createAssets(dataItem: DataItem, tags: Array) {\n\t\tconst renderer = this.get(\"renderer\");\n\n\t\tif (!dataItem.get(\"label\")) {\n\t\t\trenderer.makeLabel(dataItem, tags);\n\t\t}\n\n\t\tif (!dataItem.get(\"grid\")) {\n\t\t\trenderer.makeGrid(dataItem, tags);\n\t\t}\n\n\t\tif (!dataItem.get(\"tick\")) {\n\t\t\trenderer.makeTick(dataItem, tags);\n\t\t}\n\n\t\tif (!dataItem.get(\"axisFill\")) {\n\t\t\trenderer.makeAxisFill(dataItem, tags);\n\t\t}\n\n\t\tthis._processBullet(dataItem);\n\t}\n\n\tprotected _processBullet(dataItem: DataItem) {\n\t\tlet bullet = dataItem.get(\"bullet\");\n\t\tlet axisBullet = this.get(\"bullet\");\n\n\t\tif (!bullet && axisBullet && !dataItem.get(\"isRange\")) {\n\t\t\tbullet = axisBullet(this._root, this, dataItem);\n\t\t}\n\n\t\tif (bullet) {\n\t\t\tbullet.axis = this;\n\t\t\tconst sprite = bullet.get(\"sprite\");\n\n\t\t\tif (sprite) {\n\t\t\t\tsprite._setDataItem(dataItem);\n\t\t\t\tdataItem.setRaw(\"bullet\", bullet);\n\t\t\t\tif (!sprite.parent) {\n\t\t\t\t\tthis.bulletsContainer.children.push(sprite);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _afterChanged() {\n\t\tsuper._afterChanged();\n\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tchart._updateChartLayout();\n\t\t\tchart.axisHeadersContainer.markDirtySize();\n\t\t}\n\n\t\tthis.get(\"renderer\")._updatePositions();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic disposeDataItem(dataItem: DataItem) {\n\t\tsuper.disposeDataItem(dataItem);\n\t\tconst renderer = this.get(\"renderer\");\n\t\tconst label = dataItem.get(\"label\");\n\t\tif (label) {\n\t\t\trenderer.labels.removeValue(label);\n\t\t\tlabel.dispose();\n\t\t}\n\t\tconst tick = dataItem.get(\"tick\");\n\t\tif (tick) {\n\t\t\trenderer.ticks.removeValue(tick);\n\t\t\ttick.dispose();\n\t\t}\n\t\tconst grid = dataItem.get(\"grid\");\n\t\tif (grid) {\n\t\t\trenderer.grid.removeValue(grid);\n\t\t\tgrid.dispose();\n\t\t}\n\t\tconst axisFill = dataItem.get(\"axisFill\");\n\t\tif (axisFill) {\n\t\t\trenderer.axisFills.removeValue(axisFill);\n\t\t\taxisFill.dispose();\n\t\t}\n\t\tconst bullet = dataItem.get(\"bullet\");\n\n\t\tif (bullet) {\n\t\t\tbullet.dispose();\n\t\t}\n\t}\n\n\tprotected _updateGhost() {\n\t\tconst ghostLabel = this.ghostLabel;\n\t\tif (!ghostLabel.isHidden()) {\n\t\t\tconst bounds = ghostLabel.localBounds();\n\t\t\tconst gWidth = bounds.right - bounds.left;\n\t\t\tlet text = ghostLabel.get(\"text\");\n\t\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\t\tconst label = dataItem.get(\"label\");\n\t\t\t\tif (label && !label.isHidden()) {\n\t\t\t\t\tconst bounds = label.localBounds();\n\t\t\t\t\tconst w = bounds.right - bounds.left;\n\n\t\t\t\t\tif (w > gWidth) {\n\t\t\t\t\t\ttext = label.text._getText();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tghostLabel.set(\"text\", text);\n\t\t}\n\t\tlet start = this.get(\"start\", 0);\n\t\tlet end = this.get(\"end\", 1);\n\t\tthis.get(\"renderer\").updateLabel(ghostLabel, start + (end - start) * 0.5);\n\t}\n\n\tpublic _handleCursorPosition(position: number, snapToSeries?: Array) {\n\t\tconst renderer = this.get(\"renderer\");\n\t\tposition = renderer.toAxisPosition(position);\n\n\t\tthis._cursorPosition = position;\n\t\tthis._snapToSeries = snapToSeries;\n\n\t\tthis.updateTooltip();\n\t}\n\n\t/**\n\t * Can be called when axis zoom changes and you need to update tooltip\n\t * position.\n\t */\n\tpublic updateTooltip() {\n\t\tconst snapToSeries = this._snapToSeries;\n\t\tlet position = this._cursorPosition;\n\t\tconst tooltip = this.get(\"tooltip\")!;\n\t\tconst renderer = this.get(\"renderer\");\n\n\t\tif ($type.isNumber(position)) {\n\n\t\t\t$array.each(this.series, (series) => {\n\t\t\t\tif (series.get(\"baseAxis\") === this) {\n\t\t\t\t\tconst dataItem = this.getSeriesItem(series, position!, this.get(\"tooltipLocation\"));\n\t\t\t\t\tseries.setRaw(\"tooltipDataItem\", dataItem);\n\t\t\t\t\tif (snapToSeries && snapToSeries.indexOf(series) != -1) {\n\t\t\t\t\t\tseries.updateLegendMarker(dataItem);\n\t\t\t\t\t\tseries.updateLegendValue(dataItem);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tseries.showDataItemTooltip(dataItem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\n\t\t\tif (tooltip) {\n\t\t\t\trenderer.updateTooltipBounds(tooltip);\n\n\t\t\t\tif (this.get(\"snapTooltip\")) {\n\t\t\t\t\tposition = this.roundAxisPosition(position, this.get(\"tooltipLocation\", 0.5));\n\t\t\t\t}\n\t\t\t\tif (!$type.isNaN(position)) {\n\t\t\t\t\tthis.setPrivateRaw(\"tooltipPosition\", position);\n\t\t\t\t\tthis._updateTooltipText(tooltip, position);\n\t\t\t\t\trenderer.positionTooltip(tooltip, position);\n\n\t\t\t\t\tif (position < this.get(\"start\") || position > this.get(\"end\")) {\n\t\t\t\t\t\ttooltip.hide(0);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttooltip.show(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttooltip.hide(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _updateTooltipText(tooltip: Tooltip, position: number) {\n\t\ttooltip.label.set(\"text\", this.getTooltipText(position));\n\t}\n\n\t/**\n\t * Returns text to be used in an axis tooltip for specific relative position.\n\t *\n\t * @param position Position\n\t * @return Tooltip text\n\t */\n\tpublic abstract getTooltipText(position: number): string | undefined;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic roundAxisPosition(position: number, _location: number): number {\n\t\treturn position;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic handleCursorShow() {\n\t\tlet tooltip = this.get(\"tooltip\");\n\t\tif (tooltip) {\n\t\t\ttooltip.show();\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic handleCursorHide() {\n\t\tlet tooltip = this.get(\"tooltip\");\n\t\tif (tooltip) {\n\t\t\ttooltip.hide();\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic processSeriesDataItem(_dataItem: DataItem, _fields: Array) {\n\n\t}\n\n\tpublic _clearDirty() {\n\t\tsuper._clearDirty();\n\t\tthis._sizeDirty = false;\n\t\tthis._rangesDirty = false;\n\t}\n\n\t/**\n\t * Converts pixel coordinate to a relative position on axis.\n\t *\n\t * @param coordinate Coordinate\n\t * @return Relative position\n\t */\n\tpublic coordinateToPosition(coordinate: number): number {\n\t\tconst renderer = this.get(\"renderer\");\n\t\treturn renderer.toAxisPosition(coordinate / renderer.axisLength());\n\t}\n\n\t/**\n\t * Converts relative position of the plot area to relative position of the\n\t * axis with zoom taken into account.\n\t *\n\t * @param position Position\n\t * @return Relative position\n\t */\n\tpublic toAxisPosition(position: number): number {\n\t\treturn this.get(\"renderer\").toAxisPosition(position);\n\t}\n\n\t/**\n\t * Adjusts position with inversed taken into account.\n\t *\n\t * @ignore\n\t */\n\tpublic fixPosition(position: number): number {\n\t\treturn this.get(\"renderer\").fixPosition(position);\n\t}\n\n\t/**\n\t * Returns a data item from series that is closest to the `position`.\n\t *\n\t * @param series Series\n\t * @param position Relative position\n\t * @return Data item\n\t */\n\tpublic abstract getSeriesItem(series: XYSeries, position: number, location?: number): DataItem | undefined\n\n\t/**\n\t * @ignore\n\t */\n\tpublic shouldGap(_dataItem: DataItem, _nextItem: DataItem, _autoGapCount: number, _fieldName: string): boolean {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Creates and returns an axis range object.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-ranges/} for more info\n\t * @param axisDataItem Axis data item\n\t * @return Axis range\n\t */\n\tpublic createAxisRange(axisDataItem: DataItem): DataItem {\n\t\treturn this.axisRanges.push(axisDataItem);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic _groupSeriesData(_series: XYSeries) { }\n\n\t/**\n\t * Returns position span between start and end of a single cell in axis.\n\t *\n\t * @since 5.2.30\n\t * @return Position\n\t * @ignore\n\t */\n\tpublic getCellWidthPosition(): number {\n\t\treturn 0.05;\n\t}\n}\n","import { Label, ILabelSettings, ILabelPrivate } from \"../../../core/render/Label\";\nimport type { IPoint } from \"../../../core/util/IPoint\";\n\nexport interface IAxisLabel extends Label {\n\n\t/**\n\t * Relative location of the label within the cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Location_of_axis_elements} for more info\n\t */\n\tlocation?: number;\n\n\t/**\n\t * Relative location of the label within the cell when it spans multiple\n\t * intervals.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Multi_location} for more info\n\t */\n\tmultiLocation?: number;\n\n\t/**\n\t * If set to `true` the label will be shown inside plot area.\n\t *\n\t * @default false\n\t */\n\tinside?: boolean | undefined;\n\n\t/**\n\t * The minimum relative position within visible axis scope the label can\n\t * appear on.\n\t *\n\t * E.g. `0.1` will mean that label will not be shown if it's closer to the\n\t * beginning of the axis than 10%.\n\t *\n\t * @default 0\n\t */\n\tminPosition?: number;\n\n\t/**\n\t * The maximum relative position within visible axis scope the label can\n\t * appear on.\n\t *\n\t * E.g. `0.9` will mean that label will not be shown if it's closer to the\n\t * end of the axis than 10%.\n\t *\n\t * @default 0\n\t */\n\tmaxPosition?: number;\n\n\t_tickPoints: Array;\n}\n\n\nexport interface IAxisLabelSettings extends ILabelSettings {\n\n\t/**\n\t * Relative location of the label within the cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Location_of_axis_elements} for more info\n\t */\n\tlocation?: number;\n\n\t/**\n\t * Relative location of the label within the cell when it spans multiple\n\t * intervals.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Multi_location} for more info\n\t */\n\tmultiLocation?: number;\n\n\t/**\n\t * If set to `true` the label will be shown inside plot area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Labels_ticks_inside_plot_area} for more info\n\t * @default false\n\t */\n\tinside?: boolean | undefined;\n\n\t/**\n\t * The minimum relative position within visible axis scope the label can\n\t * appear on.\n\t *\n\t * E.g. `0.1` will mean that label will not be shown if it's closer to the\n\t * beginning of the axis than 10%.\n\t *\n\t * @default 0\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Start_end_labels_and_ticks} for more info\n\t */\n\tminPosition?: number;\n\n\t/**\n\t * The maximum relative position within visible axis scope the label can\n\t * appear on.\n\t *\n\t * E.g. `0.9` will mean that label will not be shown if it's closer to the\n\t * end of the axis than 10%.\n\t *\n\t * @default 1\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Start_end_labels_and_ticks} for more info\n\t */\n\tmaxPosition?: number;\n\n}\n\nexport interface IAxisLabelPrivate extends ILabelPrivate {\n}\n\n/**\n * Draws an axis label.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Labels} for more info\n * @important\n */\nexport class AxisLabel extends Label implements IAxisLabel {\n\n\tdeclare public _settings: IAxisLabelSettings;\n\tdeclare public _privateSettings: IAxisLabelPrivate;\n\n\tpublic _tickPoints: Array = [];\n\n\tpublic static className: string = \"AxisLabel\";\n\tpublic static classNames: Array = Label.classNames.concat([AxisLabel.className]);\n}\n","import { RadialLabel, IRadialLabelSettings, IRadialLabelPrivate } from \"../../../core/render/RadialLabel\";\nimport type { IPoint } from \"../../../core/util/IPoint\";\n\nexport interface IAxisLabelRadialSettings extends IRadialLabelSettings {\n\n\t/**\n\t * Relative location of the label within the cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t */\n\tlocation?: number;\n\n\t/**\n\t * Relative location of the label within the cell when it spans multiple\n\t * intervals.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t */\n\tmultiLocation?: number;\n\n\t/**\n\t * The minimum relative position within visible axis scope the label can\n\t * appear on.\n\t *\n\t * E.g. `0.1` will mean that label will not be shown if it's closer to the\n\t * beginning of the axis than 10%.\n\t *\n\t * @default 0\n\t */\n\tminPosition?: number;\n\n\t/**\n\t * The maximum relative position within visible axis scope the label can\n\t * appear on.\n\t *\n\t * E.g. `0.9` will mean that label will not be shown if it's closer to the\n\t * end of the axis than 10%.\n\t *\n\t * @default 0\n\t */\n\tmaxPosition?: number;\n\n}\n\nexport interface IAxisLabelRadialPrivate extends IRadialLabelPrivate {\n}\n\n/**\n * Draws a label on a circular axis.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Labels} for more info\n */\nexport class AxisLabelRadial extends RadialLabel {\n\n\tdeclare public _settings: IAxisLabelRadialSettings;\n\tdeclare public _privateSettings: IAxisLabelRadialPrivate;\n\n\tpublic static className: string = \"AxisLabelRadial\";\n\tpublic static classNames: Array = RadialLabel.classNames.concat([AxisLabelRadial.className]);\n\n\tpublic _tickPoints: Array = [];\n\n}\n","import type { Sprite } from \"../../../core/render/Sprite\";\nimport { Graphics, IGraphicsSettings, IGraphicsPrivate } from \"../../../core/render/Graphics\";\nimport type { Axis, IAxisDataItem } from \"./Axis\";\nimport { Template } from \"../../../core/util/Template\";\nimport { ListTemplate } from \"../../../core/util/List\";\nimport { AxisTick } from \"./AxisTick\";\nimport { Grid } from \"./Grid\";\nimport { AxisLabel } from \"./AxisLabel\";\nimport type { IPoint } from \"../../../core/util/IPoint\";\nimport type { Tooltip } from \"../../../core/render/Tooltip\";\nimport type { AxisBullet } from \"./AxisBullet\";\nimport type { XYChart } from \"../XYChart\";\nimport type { DataItem } from \"../../../core/render/Component\";\nimport * as $utils from \"../../../core/util/Utils\";\nimport type { IPointerEvent } from \"../../../core/render/backend/Renderer\";\n\nexport interface IAxisRendererSettings extends IGraphicsSettings {\n\n\t/**\n\t * The minimum distance between grid lines in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Grid_density} for more info\n\t */\n\tminGridDistance?: number;\n\n\t/**\n\t * Set to `true` to invert direction of the axis.\n\t *\n\t * @default false\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Inversed_axes} for more info\n\t */\n\tinversed?: boolean;\n\n\t/**\n\t * Indicates relative position where \"usable\" space of the cell starts.\n\t *\n\t * `0` - beginning, `1` - end, or anything in-between.\n\t *\n\t * @default 0\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Cell_start_end_locations} for more info\n\t */\n\tcellStartLocation?: number;\n\n\t/**\n\t * Indicates relative position where \"usable\" space of the cell ends.\n\t *\n\t * `0` - beginning, `1` - end, or anything in-between.\n\t *\n\t * @default 1\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Cell_start_end_locations} for more info\n\t */\n\tcellEndLocation?: number;\n\n\t/**\n\t * If set to `\"zoom\"` will enable axis zoom by panning it in the axis label\n\t * area.\n\t *\n\t * Works on [[AxisRendererX]] and [[AxisRendererY]] only.\n\t * \n\t * For a better result, set `maxDeviation` to `1` or so on the Axis.\n\t * \n\t * Will not work if `inside` is set to `true`.\n\t *\n\t * @since 5.0.7\n\t * @default \"none\"\n\t */\n\tpan?: \"none\" | \"zoom\"\n\n}\n\nexport interface IAxisRendererPrivate extends IGraphicsPrivate {\n\t/**\n\t * @ignore\n\t */\n\tletter?: \"X\" | \"Y\";\n}\n\n/**\n * Base class for an axis renderer.\n *\n * Should not be used on its own.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/#Axis_renderer} for more info\n */\nexport abstract class AxisRenderer extends Graphics {\n\tpublic static className: string = \"AxisRenderer\";\n\tpublic static classNames: Array = Graphics.classNames.concat([AxisRenderer.className]);\n\n\t// save for quick access\n\tpublic _axisLength: number = 100;\n\tpublic _start: number = 0;\n\tpublic _end: number = 1;\n\tpublic _inversed: boolean = false;\n\n\tprotected _minSize: number = 0;\n\n\t/**\n\t * Chart the renderer is used in.\n\t */\n\tpublic chart: XYChart | undefined;\n\n\tprotected _lc = 1;\n\n\tprotected _ls = 0;\n\n\tprotected _thumbDownPoint?: IPoint;\n\n\tprotected _downStart?: number;\n\tprotected _downEnd?: number;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeTick(dataItem: DataItem, themeTags: Array): AxisTick {\n\t\tconst tick = this.ticks.make();\n\t\ttick._setDataItem(dataItem);\n\t\tdataItem.setRaw(\"tick\", tick);\n\t\ttick.set(\"themeTags\", $utils.mergeTags(tick.get(\"themeTags\"), themeTags));\n\t\tthis.axis.labelsContainer.children.push(tick);\n\t\tthis.ticks.push(tick);\n\t\treturn tick;\n\t}\n\n\t/**\n\t * A list of ticks in the axis.\n\t *\n\t * `ticks.template` can be used to configure ticks.\n\t *\n\t * @default new ListTemplate\n\t */\n\tpublic readonly ticks: ListTemplate = new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => AxisTick._new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.ticks.template.get(\"themeTags\", []), this.get(\"themeTags\", []))\n\t\t}, [this.ticks.template])\n\t);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeGrid(dataItem: DataItem, themeTags: Array): Grid {\n\t\tconst grid = this.grid.make();\n\t\tgrid._setDataItem(dataItem);\n\t\tdataItem.setRaw(\"grid\", grid);\n\t\tgrid.set(\"themeTags\", $utils.mergeTags(grid.get(\"themeTags\"), themeTags));\n\n\t\tthis.axis.gridContainer.children.push(grid);\n\t\tthis.grid.push(grid);\n\t\treturn grid;\n\t}\n\n\t/**\n\t * A list of grid elements in the axis.\n\t *\n\t * `grid.template` can be used to configure grid.\n\t *\n\t * @default new ListTemplate\n\t */\n\tpublic readonly grid: ListTemplate = new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => Grid._new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.grid.template.get(\"themeTags\", []), this.get(\"themeTags\", []))\n\t\t}, [this.grid.template])\n\t);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeAxisFill(dataItem: DataItem, themeTags: Array): Grid {\n\t\tconst axisFill = this.axisFills.make();\n\t\taxisFill._setDataItem(dataItem);\n\t\taxisFill.set(\"themeTags\", $utils.mergeTags(axisFill.get(\"themeTags\"), themeTags));\n\n\t\tthis.axis.gridContainer.children.push(axisFill);\n\t\tdataItem.setRaw(\"axisFill\", axisFill);\n\t\tthis.axisFills.push(axisFill);\n\t\treturn axisFill;\n\t}\n\n\t/**\n\t * A list of fills in the axis.\n\t *\n\t * `axisFills.template` can be used to configure axis fills.\n\t *\n\t * @default new ListTemplate\n\t */\n\tpublic readonly axisFills: ListTemplate = new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => Graphics._new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.axisFills.template.get(\"themeTags\", [\"axis\", \"fill\"]), this.get(\"themeTags\", []))\n\t\t}, [this.axisFills.template])\n\t);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeLabel(dataItem: DataItem, themeTags: Array): AxisLabel {\n\n\t\tconst label = this.labels.make();\n\n\t\tlabel.set(\"themeTags\", $utils.mergeTags(label.get(\"themeTags\"), themeTags));\n\t\tthis.axis.labelsContainer.children.moveValue(label, 0);\n\n\t\tlabel._setDataItem(dataItem);\n\t\tdataItem.setRaw(\"label\", label);\n\t\tthis.labels.push(label);\n\t\treturn label;\n\t}\n\n\t/**\n\t * A list of labels in the axis.\n\t *\n\t * `labels.template` can be used to configure axis labels.\n\t *\n\t * @default new ListTemplate\n\t */\n\tpublic readonly labels: ListTemplate = new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => AxisLabel._new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.labels.template.get(\"themeTags\", []), this.get(\"themeTags\", []))\n\t\t}, [this.labels.template])\n\t);\n\n\n\tdeclare public _settings: IAxisRendererSettings;\n\tdeclare public _privateSettings: IAxisRendererPrivate;\n\n\t/**\n\t * An [[Axis]] renderer is for.\n\t */\n\tpublic axis!: Axis;\n\n\tpublic axisLength(): number {\n\t\treturn 0;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic gridCount(): number {\n\t\treturn this.axisLength() / this.get(\"minGridDistance\", 50);\n\t}\n\n\tpublic _updatePositions() {\n\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract updateLabel(_label?: AxisLabel, _position?: number, _endPosition?: number, _count?: number): void;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract updateGrid(_grid?: Grid, _position?: number, _endPosition?: number): void;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract updateTick(_grid?: AxisTick, _position?: number, _endPosition?: number, _count?: number): void;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract updateFill(_fill?: Graphics, _position?: number, _endPosition?: number): void;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract updateBullet(_bullet?: AxisBullet, _position?: number, _endPosition?: number): void;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract positionToPoint(_position: number): IPoint;\n\n\n\tpublic readonly thumb?: Graphics;\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tthis.set(\"isMeasured\", false);\n\n\t\tconst thumb = this.thumb;\n\t\tif (thumb) {\n\t\t\tthis._disposers.push(thumb.events.on(\"pointerdown\", (event) => {\n\t\t\t\tthis._handleThumbDown(event.originalEvent);\n\t\t\t}));\n\n\t\t\tthis._disposers.push(thumb.events.on(\"globalpointerup\", (event) => {\n\t\t\t\tthis._handleThumbUp(event.originalEvent);\n\t\t\t}));\n\n\t\t\tthis._disposers.push(thumb.events.on(\"globalpointermove\", (event) => {\n\t\t\t\tthis._handleThumbMove(event.originalEvent);\n\t\t\t}));\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this.isDirty(\"pan\")) {\n\t\t\tconst thumb = this.thumb;\n\t\t\tif (thumb) {\n\t\t\t\tconst labelsContainer = this.axis.labelsContainer;\n\t\t\t\tconst pan = this.get(\"pan\");\n\t\t\t\tif (pan == \"zoom\") {\n\t\t\t\t\tlabelsContainer.children.push(thumb);\n\t\t\t\t}\n\t\t\t\telse if (pan == \"none\") {\n\t\t\t\t\tlabelsContainer.children.removeValue(thumb);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _handleThumbDown(event: IPointerEvent) {\n\t\tthis._thumbDownPoint = this.toLocal(this._root.documentPointToRoot({ x: event.clientX, y: event.clientY }));\n\t\tconst axis = this.axis;\n\t\tthis._downStart = axis.get(\"start\");\n\t\tthis._downEnd = axis.get(\"end\");\n\t}\n\n\tprotected _handleThumbUp(_event: IPointerEvent) {\n\t\tthis._thumbDownPoint = undefined;\n\t}\n\n\tprotected _handleThumbMove(event: IPointerEvent) {\n\t\tconst downPoint = this._thumbDownPoint;\n\t\tif (downPoint) {\n\t\t\tconst point = this.toLocal(this._root.documentPointToRoot({ x: event.clientX, y: event.clientY }));\n\n\t\t\tconst downStart = this._downStart!;\n\t\t\tconst downEnd = this._downEnd!;\n\t\t\tconst extra = this._getPan(point, downPoint) * Math.min(1, (downEnd - downStart)) / 2;\n\t\t\tthis.axis.setAll({ start: downStart - extra, end: downEnd + extra });\n\t\t}\n\t}\n\n\tprotected _getPan(_point1: IPoint, _point2: IPoint): number {\n\t\treturn 0;\n\t}\n\n\t/**\n\t * Converts relative position (0-1) on axis to a pixel coordinate.\n\t *\n\t * @param position Position (0-1)\n\t * @return Coordinate (px)\n\t */\n\tpublic positionToCoordinate(position: number): number {\n\t\tif (this._inversed) {\n\t\t\treturn (this._end - position) * this._axisLength;\n\t\t}\n\t\telse {\n\t\t\treturn (position - this._start) * this._axisLength;\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract positionTooltip(_tooltip: Tooltip, _position: number): void;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTooltipBounds(_tooltip: Tooltip) { }\n\n\tpublic _updateSize() {\n\t\tthis.markDirty()\n\t\tthis._clear = true;\n\t}\n\n\tpublic toAxisPosition(position: number): number {\n\t\tconst start = this._start || 0;\n\t\tconst end = this._end || 1;\n\n\t\tposition = position * (end - start);\n\t\tif (!this.get(\"inversed\")) {\n\t\t\tposition = start + position;\n\t\t}\n\t\telse {\n\t\t\tposition = end - position;\n\t\t}\n\n\t\treturn position;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic fixPosition(position: number) {\n\t\tif (this.get(\"inversed\")) {\n\t\t\treturn 1 - position;\n\t\t}\n\t\treturn position;\n\t}\n\n\tpublic _updateLC() {\n\n\t}\n\n\tprotected toggleVisibility(sprite: Sprite, position: number, minPosition: number, maxPosition: number): void {\n\t\tlet axis = this.axis;\n\n\t\tconst start = axis.get(\"start\", 0);\n\t\tconst end = axis.get(\"end\", 1);\n\n\t\tlet updatedStart = start + (end - start) * (minPosition - 0.0001);\n\t\tlet updatedEnd = start + (end - start) * (maxPosition + 0.0001);\n\n\t\tif (position < updatedStart || position > updatedEnd) {\n\t\t\tsprite.setPrivate(\"visible\", false);\n\t\t}\n\t\telse {\n\t\t\tsprite.setPrivate(\"visible\", true);\n\t\t}\n\t}\n\n\tprotected _positionTooltip(tooltip: Tooltip, point: IPoint) {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tif (chart.inPlot(point)) {\n\t\t\t\ttooltip.set(\"pointTo\", this._display.toGlobal(point));\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttooltip.hide();\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic processAxis() { }\n}\n","import { AxisRenderer, IAxisRendererSettings, IAxisRendererPrivate } from \"./AxisRenderer\";\nimport { p100 } from \"../../../core/util/Percent\";\nimport type { IPoint } from \"../../../core/util/IPoint\";\nimport * as $type from \"../../../core/util/Type\";\nimport * as $utils from \"../../../core/util/Utils\";\nimport type { AxisLabel } from \"./AxisLabel\";\nimport type { Grid } from \"./Grid\";\nimport type { AxisTick } from \"./AxisTick\";\nimport type { Graphics } from \"../../../core/render/Graphics\";\nimport type { Tooltip } from \"../../../core/render/Tooltip\";\nimport type { Template } from \"../../../core/util/Template\";\nimport type { AxisBullet } from \"./AxisBullet\";\nimport { Rectangle } from \"../../../core/render/Rectangle\";\n\n\nexport interface IAxisRendererXSettings extends IAxisRendererSettings {\n\n\t/**\n\t * If set to `true` the axis will be drawn on the opposite side of the plot\n\t * area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Axis_position} for more info\n\t * @default false\n\t */\n\topposite?: boolean;\n\n\t/**\n\t * If set to `true`, all axis elements (ticks, labels) will be drawn inside\n\t * plot area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Labels_ticks_inside_plot_area} for more info\n\t * @default false\n\t */\n\tinside?: boolean;\n}\n\nexport interface IAxisRendererXPrivate extends IAxisRendererPrivate {\n}\n\n/**\n * Used to render horizontal axis.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/#Axis_renderer} for more info\n * @important\n */\nexport class AxisRendererX extends AxisRenderer {\n\n\tpublic static className: string = \"AxisRendererX\";\n\tpublic static classNames: Array = AxisRenderer.classNames.concat([AxisRendererX.className]);\n\n\tdeclare public _settings: IAxisRendererXSettings;\n\tdeclare public _privateSettings: IAxisRendererXPrivate;\n\n\tdeclare public readonly labelTemplate: Template;\n\n\tpublic thumb: Rectangle = Rectangle.new(this._root, { width: p100, isMeasured: false, themeTags: [\"axis\", \"x\", \"thumb\"] });\n\n\tpublic _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"renderer\", \"x\"]);\n\n\t\tsuper._afterNew();\n\t\tthis.setPrivateRaw(\"letter\", \"X\");\n\n\t\tconst gridTemplate = this.grid.template;\n\t\tgridTemplate.set(\"height\", p100);\n\t\tgridTemplate.set(\"width\", 0);\n\t\tgridTemplate.set(\"draw\", (display, graphics) => {\n\t\t\tdisplay.moveTo(0, 0);\n\t\t\tdisplay.lineTo(0, graphics.height());\n\t\t});\n\n\t\tthis.set(\"draw\", (display, graphics) => {\n\t\t\tdisplay.moveTo(0, 0);\n\t\t\tdisplay.lineTo(graphics.width(), 0);\n\t\t});\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tconst axis = this.axis;\n\t\taxis.ghostLabel.setPrivate(\"visible\", !this.get(\"inside\"));\n\n\t\tconst opposite = \"opposite\"\n\t\tconst inside = \"inside\";\n\n\t\tif (this.isDirty(opposite) || this.isDirty(inside)) {\n\t\t\tconst chart = this.chart;\n\t\t\tconst axisChildren = axis.children;\n\n\t\t\tif (this.get(inside)) {\n\t\t\t\taxis.addTag(inside);\n\t\t\t}\n\t\t\telse {\n\t\t\t\taxis.removeTag(inside);\n\t\t\t}\n\n\t\t\tif (chart) {\n\t\t\t\tif (this.get(opposite)) {\n\t\t\t\t\tconst children = chart.topAxesContainer.children;\n\t\t\t\t\tif (children.indexOf(axis) == -1) {\n\t\t\t\t\t\tchildren.insertIndex(0, axis);\n\t\t\t\t\t}\n\t\t\t\t\taxis.addTag(opposite);\n\t\t\t\t\taxisChildren.moveValue(this);\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tconst children = chart.bottomAxesContainer.children;\n\t\t\t\t\tif (children.indexOf(axis) == -1) {\n\t\t\t\t\t\tchildren.moveValue(axis);\n\t\t\t\t\t}\n\t\t\t\t\taxis.removeTag(opposite);\n\n\t\t\t\t\taxisChildren.moveValue(this, 0);\n\n\t\t\t\t}\n\n\t\t\t\taxis.ghostLabel._applyThemes();\n\t\t\t\tthis.labels.each((label) => {\n\t\t\t\t\tlabel._applyThemes();\n\t\t\t\t})\n\t\t\t\tthis.root._markDirtyRedraw();\n\t\t\t}\n\t\t\taxis.markDirtySize();\n\t\t}\n\n\t\tthis.thumb.setPrivate(\"height\", axis.labelsContainer.height());\n\t}\n\n\n\tprotected _getPan(point1: IPoint, point2: IPoint): number {\n\t\treturn (point2.x - point1.x) / this.width();\n\t}\n\n\n\tpublic toAxisPosition(position: number): number {\n\t\tconst start = this._start || 0;\n\t\tconst end = this._end || 1;\n\n\t\tposition -= this._ls;\n\n\t\tposition = position * (end - start) / this._lc;\n\t\tif (!this.get(\"inversed\")) {\n\t\t\tposition = start + position;\n\t\t}\n\t\telse {\n\t\t\tposition = end - position;\n\t\t}\n\n\t\treturn position;\n\t}\n\n\n\tpublic _updateLC() {\n\t\tconst axis = this.axis;\n\t\tconst parent = axis.parent;\n\t\tif (parent) {\n\t\t\tconst w = parent.innerWidth();\n\t\t\tthis._lc = this.axisLength() / w;\n\t\t\tthis._ls = (axis.x() - parent.get(\"paddingLeft\", 0)) / w;\n\t\t}\n\t}\n\n\tpublic _updatePositions() {\n\t\tconst axis = this.axis;\n\t\taxis.gridContainer.set(\"x\", axis.x() - $utils.relativeToValue(axis.get(\"centerX\", 0), axis.width()) - axis.parent!.get(\"paddingLeft\", 0));\n\t\taxis.bulletsContainer.set(\"y\", this.y());\n\n\t\tconst chart = axis.chart;\n\t\tif (chart) {\n\t\t\tconst plotContainer = chart.plotContainer;\n\t\t\tconst axisHeader = axis.axisHeader;\n\t\t\tlet width = axis.get(\"marginLeft\", 0);\n\n\t\t\tlet x = axis.x() - width;\n\n\t\t\tconst parent = axis.parent;\n\t\t\tif (parent) {\n\t\t\t\tx -= parent.get(\"paddingLeft\", 0);\n\t\t\t}\n\n\t\t\tif (axisHeader.children.length > 0) {\n\t\t\t\twidth = axis.axisHeader.width();\n\t\t\t\taxis.set(\"marginLeft\", width + 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\taxisHeader.set(\"width\", width);\n\t\t\t}\n\t\t\taxisHeader.setAll({ x: x, y: -1, height: plotContainer.height() + 2 });\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic processAxis() {\n\t\tsuper.processAxis();\n\t\tconst axis = this.axis;\n\t\taxis.set(\"width\", p100);\n\t\tconst verticalLayout = this._root.verticalLayout;\n\t\taxis.set(\"layout\", verticalLayout);\n\t\taxis.labelsContainer.set(\"width\", p100);\n\t\taxis.axisHeader.setAll({ layout: verticalLayout });\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic axisLength(): number {\n\t\treturn this.axis.width();\n\t}\n\n\t/**\n\t * Converts axis relative position to actual coordinate in pixels.\n\t *\n\t * @param position Position\n\t * @return Point\n\t */\n\tpublic positionToPoint(position: number): IPoint {\n\t\treturn { x: this.positionToCoordinate(position), y: 0 };\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTick(tick?: AxisTick, position?: number, endPosition?: number, count?: number) {\n\t\tif (tick) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = 0.5;\n\t\t\tif ($type.isNumber(count) && count > 1) {\n\t\t\t\tlocation = tick.get(\"multiLocation\", location)\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlocation = tick.get(\"location\", location)\n\t\t\t}\n\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\ttick.set(\"x\", this.positionToCoordinate(position));\n\n\t\t\tlet length = tick.get(\"length\", 0);\n\t\t\tconst inside = tick.get(\"inside\", this.get(\"inside\", false));\n\n\t\t\tif (this.get(\"opposite\")) {\n\t\t\t\ttick.set(\"y\", p100);\n\t\t\t\tif (!inside) {\n\t\t\t\t\tlength *= -1\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttick.set(\"y\", 0);\n\t\t\t\tif (inside) {\n\t\t\t\t\tlength *= -1\n\t\t\t\t}\n\t\t\t}\n\t\t\ttick.set(\"draw\", (display) => {\n\t\t\t\tdisplay.moveTo(0, 0);\n\t\t\t\tdisplay.lineTo(0, length);\n\t\t\t})\n\n\t\t\tthis.toggleVisibility(tick, position, tick.get(\"minPosition\", 0), tick.get(\"maxPosition\", 1));\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLabel(label?: AxisLabel, position?: number, endPosition?: number, count?: number) {\n\t\tif (label) {\n\t\t\tlet location = 0.5;\n\t\t\tif ($type.isNumber(count) && count > 1) {\n\t\t\t\tlocation = label.get(\"multiLocation\", location)\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlocation = label.get(\"location\", location)\n\t\t\t}\n\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tconst inside = label.get(\"inside\", this.get(\"inside\", false));\n\n\t\t\tconst opposite = this.get(\"opposite\");\n\t\t\tif (opposite) {\n\t\t\t\tif (!inside) {\n\t\t\t\t\tlabel.set(\"position\", \"relative\");\n\t\t\t\t\tlabel.set(\"y\", p100);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlabel.set(\"position\", \"absolute\");\n\t\t\t\t\tlabel.set(\"y\", 0)\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!inside) {\n\t\t\t\t\tlabel.set(\"y\", undefined);\n\t\t\t\t\tlabel.set(\"position\", \"relative\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlabel.set(\"y\", 0)\n\t\t\t\t\tlabel.set(\"position\", \"absolute\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tlabel.set(\"x\", this.positionToCoordinate(position));\n\t\t\tthis.toggleVisibility(label, position, label.get(\"minPosition\", 0), label.get(\"maxPosition\", 1));\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateGrid(grid?: Grid, position?: number, endPosition?: number) {\n\t\tif (grid) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = grid.get(\"location\", 0.5);\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tgrid.set(\"x\", this.positionToCoordinate(position));\n\n\t\t\tthis.toggleVisibility(grid, position, 0, 1);\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateBullet(bullet?: AxisBullet, position?: number, endPosition?: number) {\n\t\tif (bullet) {\n\n\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\tif (sprite) {\n\t\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\t\tposition = 0;\n\t\t\t\t}\n\n\t\t\t\tlet location = bullet.get(\"location\", 0.5);\n\n\t\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t\t}\n\n\t\t\t\tlet bulletPosition = this.axis.roundAxisPosition(position, location);\n\t\t\t\tlet previousBullet = this.axis._bullets[bulletPosition];\n\t\t\t\tlet d = -1;\n\t\t\t\tif(this.get(\"opposite\")){\n\t\t\t\t\td = 1;\n\t\t\t\t}\n\n\t\t\t\tif (bullet.get(\"stacked\")) {\n\t\t\t\t\tif (previousBullet) {\n\t\t\t\t\t\tlet previousSprite = previousBullet.get(\"sprite\");\n\t\t\t\t\t\tif (previousSprite) {\n\t\t\t\t\t\t\tsprite.set(\"y\", previousSprite.y() + previousSprite.height() * d);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tsprite.set(\"y\", 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.axis._bullets[bulletPosition] = bullet;\n\t\t\t\tsprite.set(\"x\", this.positionToCoordinate(position));\n\t\t\t\tthis.toggleVisibility(sprite, position, 0, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateFill(fill?: Graphics, position?: number, endPosition?: number) {\n\t\tif (fill) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\t\t\tif (!$type.isNumber(endPosition)) {\n\t\t\t\tendPosition = 1;\n\t\t\t}\n\n\t\t\tlet x0 = this.positionToCoordinate(position);\n\t\t\tlet x1 = this.positionToCoordinate(endPosition);\n\n\t\t\tthis.fillDrawMethod(fill, x0, x1);\n\t\t}\n\t}\n\n\tprotected fillDrawMethod(fill: Graphics, x0: number, x1: number) {\n\t\tfill.set(\"draw\", (display) => {\n\t\t\t//display.drawRect(x0, 0, x1 - x0, this.axis!.gridContainer.height());\n\t\t\t// using for holes, so can not be rectangle\n\t\t\tconst h = this.axis!.gridContainer.height();\n\t\t\tconst w = this.width();\n\n\t\t\tif (x1 < x0) {\n\t\t\t\t[x1, x0] = [x0, x1];\n\t\t\t}\n\t\t\tif (x0 > w || x1 < 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/*\n\t\t\tconst limit = 10000;\n\n\t\t\tx0 = Math.max(-limit, x0);\n\t\t\tx1 = Math.min(limit, x1);\n\t\t\t*/\n\n\t\t\tdisplay.moveTo(x0, 0);\n\t\t\tdisplay.lineTo(x1, 0);\n\t\t\tdisplay.lineTo(x1, h);\n\t\t\tdisplay.lineTo(x0, h);\n\t\t\tdisplay.lineTo(x0, 0);\n\t\t})\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic positionTooltip(tooltip: Tooltip, position: number) {\n\t\tthis._positionTooltip(tooltip, { x: this.positionToCoordinate(position), y: 0 })\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTooltipBounds(tooltip: Tooltip) {\n\t\tconst inside = this.get(\"inside\");\n\t\tconst num = 100000;\n\n\t\tlet global = this._display.toGlobal({ x: 0, y: 0 });\n\t\tlet x = global.x;\n\t\tlet y = 0;\n\t\tlet w = this.axisLength();\n\t\tlet h = num;\n\n\t\tlet pointerOrientation: \"up\" | \"down\" = \"up\";\n\n\t\tif (this.get(\"opposite\")) {\n\t\t\tif (inside) {\n\t\t\t\tpointerOrientation = \"up\";\n\t\t\t\ty = global.y;\n\t\t\t\th = num;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpointerOrientation = \"down\";\n\t\t\t\ty = global.y - num;\n\t\t\t\th = num;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (inside) {\n\t\t\t\tpointerOrientation = \"down\";\n\t\t\t\ty = global.y - num;\n\t\t\t\th = num;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpointerOrientation = \"up\";\n\t\t\t\ty = global.y;\n\t\t\t\th = num;\n\t\t\t}\n\t\t}\n\n\t\tconst bounds = { left: x, right: x + w, top: y, bottom: y + h };\n\t\tconst oldBounds = tooltip.get(\"bounds\");\n\n\t\tif (!$utils.sameBounds(bounds, oldBounds)) {\n\t\t\ttooltip.set(\"bounds\", bounds);\n\t\t\ttooltip.set(\"pointerOrientation\", pointerOrientation);\n\t\t}\n\t}\n}\n","import { AxisRenderer, IAxisRendererSettings, IAxisRendererPrivate } from \"./AxisRenderer\";\nimport { p100 } from \"../../../core/util/Percent\";\nimport type { IPoint } from \"../../../core/util/IPoint\";\nimport * as $type from \"../../../core/util/Type\";\nimport * as $utils from \"../../../core/util/Utils\";\nimport type { Graphics } from \"../../../core/render/Graphics\";\nimport type { AxisLabel } from \"./AxisLabel\";\nimport type { AxisBullet } from \"./AxisBullet\";\nimport type { Grid } from \"./Grid\";\nimport type { AxisTick } from \"./AxisTick\";\nimport type { Tooltip } from \"../../../core/render/Tooltip\";\nimport type { Template } from \"../../../core/util/Template\";\nimport { Rectangle } from \"../../../core/render/Rectangle\";\n\nexport interface IAxisRendererYSettings extends IAxisRendererSettings {\n\n\t/**\n\t * If set to `true` the axis will be drawn on the opposite side of the plot\n\t * area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Axis_position} for more info\n\t * @default false\n\t */\n\topposite?: boolean;\n\n\t/**\n\t * If set to `true`, all axis elements (ticks, labels) will be drawn inside\n\t * plot area.\n\t *\n\t * @default false\n\t */\n\tinside?: boolean;\n}\n\nexport interface IAxisRendererYPrivate extends IAxisRendererPrivate {\n}\n\n/**\n * Used to render vertical axis.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/#Axis_renderer} for more info\n * @important\n */\nexport class AxisRendererY extends AxisRenderer {\n\n\tpublic static className: string = \"AxisRendererY\";\n\tpublic static classNames: Array = AxisRenderer.classNames.concat([AxisRendererY.className]);\n\n\tdeclare public _settings: IAxisRendererYSettings;\n\tdeclare public _privateSettings: IAxisRendererYPrivate;\n\n\tdeclare public readonly labelTemplate: Template;\n\n\tprotected _downY?: number;\n\n\tpublic thumb: Rectangle = Rectangle.new(this._root, { height: p100, isMeasured: false, themeTags: [\"axis\", \"y\", \"thumb\"] });\n\n\tpublic _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"renderer\", \"y\"]);\n\t\tif (this._settings.opposite) {\n\t\t\tthis._settings.themeTags.push(\"opposite\");\n\t\t}\n\n\t\tsuper._afterNew();\n\t\tthis.setPrivateRaw(\"letter\", \"Y\");\n\n\t\tconst gridTemplate = this.grid.template;\n\t\tgridTemplate.set(\"width\", p100);\n\t\tgridTemplate.set(\"height\", 0);\n\t\tgridTemplate.set(\"draw\", (display, graphics) => {\n\t\t\tdisplay.moveTo(0, 0);\n\t\t\tdisplay.lineTo(graphics.width(), 0);\n\t\t});\n\n\t\tthis.set(\"draw\", (display, renderer) => {\n\t\t\tdisplay.moveTo(0, 0);\n\t\t\tdisplay.lineTo(0, renderer.height());\n\t\t});\n\t}\n\n\tprotected _getPan(point1: IPoint, point2: IPoint): number {\n\t\treturn (point1.y - point2.y) / this.height();\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tconst axis = this.axis;\n\t\taxis.ghostLabel.setPrivate(\"visible\", !this.get(\"inside\"));\n\n\t\tconst thumb = this.thumb;\n\t\tconst opposite = \"opposite\";\n\t\tconst inside = \"inside\";\n\t\tconst chart = this.chart;\n\n\t\tif (this.isDirty(opposite) || this.isDirty(inside)) {\n\n\t\t\tconst axisChildren = axis.children;\n\n\t\t\tif (this.get(inside)) {\n\t\t\t\taxis.addTag(inside);\n\t\t\t}\n\t\t\telse {\n\t\t\t\taxis.removeTag(inside);\n\t\t\t}\n\n\t\t\tif (chart) {\n\t\t\t\tif (this.get(opposite)) {\n\t\t\t\t\tconst children = chart.rightAxesContainer.children;\n\t\t\t\t\tif (children.indexOf(axis) == -1) {\n\t\t\t\t\t\tchildren.moveValue(axis, 0);\n\t\t\t\t\t}\n\t\t\t\t\taxis.addTag(opposite);\n\t\t\t\t\taxisChildren.moveValue(this, 0);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tconst children = chart.leftAxesContainer.children;\n\t\t\t\t\tif (children.indexOf(axis) == -1) {\n\t\t\t\t\t\tchildren.moveValue(axis);\n\t\t\t\t\t}\n\t\t\t\t\taxis.removeTag(opposite);\n\n\t\t\t\t\taxisChildren.moveValue(this);\n\t\t\t\t}\n\n\t\t\t\taxis.ghostLabel._applyThemes();\n\t\t\t\tthis.labels.each((label) => {\n\t\t\t\t\tlabel._applyThemes();\n\t\t\t\t})\n\t\t\t\tthis.root._markDirtyRedraw();\n\t\t\t}\n\t\t\taxis.markDirtySize();\n\t\t}\n\n\t\tvar w = axis.labelsContainer.width();\n\n\t\tif (chart) {\n\t\t\tif (this.get(opposite)) {\n\t\t\t\tthumb.set(\"centerX\", 0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthumb.set(\"centerX\", w);\n\t\t\t}\n\t\t}\n\n\t\tthumb.setPrivate(\"width\", w);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic processAxis() {\n\t\tsuper.processAxis();\n\t\tconst axis = this.axis;\n\t\tif (axis.get(\"height\") == null) {\n\t\t\taxis.set(\"height\", p100);\n\t\t}\n\t\tconst horizontalLayout = this._root.horizontalLayout;\n\t\taxis.set(\"layout\", horizontalLayout);\n\t\taxis.labelsContainer.set(\"height\", p100);\n\t\taxis.axisHeader.set(\"layout\", horizontalLayout);\n\t}\n\n\tpublic _updatePositions() {\n\t\tconst axis = this.axis;\n\t\taxis.gridContainer.set(\"y\", axis.y() - $utils.relativeToValue(axis.get(\"centerY\", 0), axis.height()));\n\t\taxis.bulletsContainer.set(\"x\", this.x());\n\n\t\tconst chart = axis.chart;\n\t\tif (chart) {\n\t\t\tconst plotContainer = chart.plotContainer;\n\t\t\tconst axisHeader = axis.axisHeader;\n\t\t\tlet height = axis.get(\"marginTop\", 0);\n\n\t\t\tif (axisHeader.children.length > 0) {\n\t\t\t\theight = axis.axisHeader.height();\n\t\t\t\taxis.set(\"marginTop\", height + 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\taxisHeader.set(\"height\", height);\n\t\t\t}\n\t\t\taxisHeader.setAll({ y: axis.y() - height, x: -1, width: plotContainer.width() + 2 });\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic axisLength(): number {\n\t\treturn this.axis.innerHeight();\n\t}\n\n\t/**\n\t * Converts axis relative position to actual coordinate in pixels.\n\t *\n\t * @param position Position\n\t * @return Point\n\t */\n\tpublic positionToPoint(position: number): IPoint {\n\t\treturn { x: 0, y: this.positionToCoordinate(position) };\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLabel(label?: AxisLabel, position?: number, endPosition?: number, count?: number) {\n\t\tif (label) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = 0.5;\n\t\t\tif ($type.isNumber(count) && count > 1) {\n\t\t\t\tlocation = label.get(\"multiLocation\", location)\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlocation = label.get(\"location\", location)\n\t\t\t}\n\n\t\t\tconst opposite = this.get(\"opposite\");\n\t\t\tconst inside = label.get(\"inside\", this.get(\"inside\", false));\n\n\t\t\tif (opposite) {\n\t\t\t\tlabel.set(\"x\", 0);\n\n\t\t\t\tif (inside) {\n\t\t\t\t\tlabel.set(\"position\", \"absolute\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlabel.set(\"position\", \"relative\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (inside) {\n\t\t\t\t\tlabel.set(\"x\", 0);\n\t\t\t\t\tlabel.set(\"position\", \"absolute\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlabel.set(\"x\", undefined);\n\t\t\t\t\tlabel.set(\"position\", \"relative\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tlabel.set(\"y\", this.positionToCoordinate(position));\n\t\t\tthis.toggleVisibility(label, position, label.get(\"minPosition\", 0), label.get(\"maxPosition\", 1));\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateGrid(grid?: Grid, position?: number, endPosition?: number) {\n\t\tif (grid) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = grid.get(\"location\", 0.5);\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tgrid.set(\"y\", this.positionToCoordinate(position));\n\t\t\tthis.toggleVisibility(grid, position, 0, 1);\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTick(tick?: AxisTick, position?: number, endPosition?: number, count?: number) {\n\t\tif (tick) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = 0.5;\n\t\t\tif ($type.isNumber(count) && count > 1) {\n\t\t\t\tlocation = tick.get(\"multiLocation\", location);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlocation = tick.get(\"location\", location);\n\t\t\t}\n\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\ttick.set(\"y\", this.positionToCoordinate(position));\n\n\t\t\tlet length = tick.get(\"length\", 0);\n\t\t\tconst inside = tick.get(\"inside\", this.get(\"inside\", false));\n\n\t\t\tif (this.get(\"opposite\")) {\n\t\t\t\ttick.set(\"x\", 0);\n\t\t\t\tif (inside) {\n\t\t\t\t\tlength *= -1\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!inside) {\n\t\t\t\t\tlength *= -1\n\t\t\t\t}\n\t\t\t}\n\t\t\ttick.set(\"draw\", (display) => {\n\t\t\t\tdisplay.moveTo(0, 0);\n\t\t\t\tdisplay.lineTo(length, 0);\n\t\t\t})\n\n\t\t\tthis.toggleVisibility(tick, position, tick.get(\"minPosition\", 0), tick.get(\"maxPosition\", 1));\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateBullet(bullet?: AxisBullet, position?: number, endPosition?: number) {\n\t\tif (bullet) {\n\n\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\tif (sprite) {\n\n\t\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\t\tposition = 0;\n\t\t\t\t}\n\n\t\t\t\tlet location = bullet.get(\"location\", 0.5);\n\t\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t\t}\n\n\n\t\t\t\tlet bulletPosition = this.axis.roundAxisPosition(position, location);\n\t\t\t\tlet previousBullet = this.axis._bullets[bulletPosition];\n\t\t\t\tlet d = 1;\n\t\t\t\tif (this.get(\"opposite\")) {\n\t\t\t\t\td = -1;\n\t\t\t\t}\n\n\t\t\t\tif (bullet.get(\"stacked\")) {\n\t\t\t\t\tif (previousBullet) {\n\t\t\t\t\t\tlet previousSprite = previousBullet.get(\"sprite\");\n\t\t\t\t\t\tif (previousSprite) {\n\t\t\t\t\t\t\tsprite.set(\"x\", previousSprite.x() + previousSprite.width() * d);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tsprite.set(\"x\", 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.axis._bullets[bulletPosition] = bullet;\n\n\n\t\t\t\tsprite.set(\"y\", this.positionToCoordinate(position));\n\n\t\t\t\tthis.toggleVisibility(sprite, position, 0, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateFill(fill?: Graphics, position?: number, endPosition?: number) {\n\t\tif (fill) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\t\t\tif (!$type.isNumber(endPosition)) {\n\t\t\t\tendPosition = 1;\n\t\t\t}\n\n\t\t\tlet y0 = this.positionToCoordinate(position);\n\t\t\tlet y1 = this.positionToCoordinate(endPosition);\n\n\t\t\tthis.fillDrawMethod(fill, y0, y1);\n\t\t}\n\t}\n\n\tprotected fillDrawMethod(fill: Graphics, y0: number, y1: number) {\n\t\tfill.set(\"draw\", (display) => {\n\t\t\t// using for holes, so can not be rectangle\n\t\t\tconst w = this.axis!.gridContainer.width();\n\t\t\tconst h = this.height();\n\n\t\t\tif (y1 < y0) {\n\t\t\t\t[y1, y0] = [y0, y1];\n\t\t\t}\n\n\t\t\tif (y0 > h || y1 < 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//y0 = Math.max(0, y0);\n\t\t\t//y1 = Math.min(h, y1);\n\n\t\t\tdisplay.moveTo(0, y0);\n\t\t\tdisplay.lineTo(w, y0);\n\t\t\tdisplay.lineTo(w, y1);\n\t\t\tdisplay.lineTo(0, y1);\n\t\t\tdisplay.lineTo(0, y0);\n\t\t})\n\t}\n\n\t/**\n\t * Converts relative position (0-1) on axis to a pixel coordinate.\n\t *\n\t * @param position Position (0-1)\n\t * @return Coordinate (px)\n\t */\n\tpublic positionToCoordinate(position: number): number {\n\t\tif (!this._inversed) {\n\t\t\treturn (this._end - position) * this._axisLength;\n\t\t}\n\t\telse {\n\t\t\treturn (position - this._start) * this._axisLength;\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic positionTooltip(tooltip: Tooltip, position: number) {\n\t\tthis._positionTooltip(tooltip, { x: 0, y: this.positionToCoordinate(position) });\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTooltipBounds(tooltip: Tooltip) {\n\t\tconst inside = this.get(\"inside\");\n\t\tconst num = 100000;\n\n\t\tlet global = this._display.toGlobal({ x: 0, y: 0 });\n\t\tlet y = global.y;\n\t\tlet x = 0;\n\t\tlet h = this.axisLength();\n\t\tlet w = num;\n\n\t\tlet pointerOrientation: \"left\" | \"right\" = \"right\";\n\n\t\tif (this.get(\"opposite\")) {\n\t\t\tif (inside) {\n\t\t\t\tpointerOrientation = \"right\";\n\t\t\t\tx = global.x - num;\n\t\t\t\tw = num;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpointerOrientation = \"left\";\n\t\t\t\tx = global.x;\n\t\t\t\tw = num;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (inside) {\n\t\t\t\tpointerOrientation = \"left\";\n\t\t\t\tx = global.x;\n\t\t\t\tw = num;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpointerOrientation = \"right\";\n\t\t\t\tx = global.x - num;\n\t\t\t\tw = num;\n\t\t\t}\n\t\t}\n\n\t\tconst bounds = { left: x, right: x + w, top: y, bottom: y + h };\n\t\tconst oldBounds = tooltip.get(\"bounds\");\n\n\t\tif (!$utils.sameBounds(bounds, oldBounds)) {\n\t\t\ttooltip.set(\"bounds\", bounds);\n\t\t\ttooltip.set(\"pointerOrientation\", pointerOrientation);\n\t\t}\n\t}\n\n\tpublic _updateLC() {\n\t\tconst axis = this.axis;\n\t\tconst parent = axis.parent;\n\t\tif (parent) {\n\t\t\tconst h = parent.innerHeight();\n\t\t\tthis._lc = this.axisLength() / h;\n\t\t\tthis._ls = axis.y() / h;\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic toAxisPosition(position: number): number {\n\t\tconst start = this._start || 0;\n\t\tconst end = this._end || 1;\n\n\t\tposition -= this._ls;\n\n\t\tposition = position * (end - start) / this._lc;\n\n\t\tif (this.get(\"inversed\")) {\n\t\t\tposition = start + position;\n\t\t}\n\t\telse {\n\t\t\tposition = end - position;\n\t\t}\n\n\t\treturn position;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic fixPosition(position: number) {\n\t\tif (!this.get(\"inversed\")) {\n\t\t\treturn 1 - position;\n\t\t}\n\t\treturn position;\n\t}\n\n}\n","import type { IPoint } from \"../../../core/util/IPoint\";\n\nimport { Tick, ITickSettings, ITickPrivate } from \"../../../core/render/Tick\";\n\n\nexport interface IAxisTickSettings extends ITickSettings {\n\n\t/**\n\t * Relative location of the tick within the cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Location_of_axis_elements} for more info\n\t */\n\tlocation?: number;\n\n\t/**\n\t * Relative location of the tick within the cell when it spans multiple\n\t * intervals.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Multi_location} for more info\n\t */\n\tmultiLocation?: number;\n\n\t/**\n\t * If set to `true` the tick will be shown inside plot area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Labels_ticks_inside_plot_area} for more info\n\t * @default false\n\t */\n\tinside?: boolean | undefined;\n\n\t/**\n\t * The minimum relative position within visible axis scope the tick can\n\t * appear on.\n\t *\n\t * E.g. `0.1` will mean that tick will not be shown if it's closer to the\n\t * beginning of the axis than 10%.\n\t *\n\t * @default 0\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Start_end_labels_and_ticks} for more info\n\t */\n\tminPosition?: number;\n\n\t/**\n\t * The maximum relative position within visible axis scope the tick can\n\t * appear on.\n\t *\n\t * E.g. `0.9` will mean that tick will not be shown if it's closer to the\n\t * end of the axis than 10%.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Start_end_labels_and_ticks} for more info\n\t * @default 1\n\t */\n\tmaxPosition?: number;\n\n}\n\nexport interface IAxisTickPrivate extends ITickPrivate {\n}\n\n/**\n * Draws an axis tick.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Ticks} for more info\n * @important\n */\nexport class AxisTick extends Tick {\n\n\tdeclare public _settings: IAxisTickSettings;\n\tdeclare public _privateSettings: IAxisTickPrivate;\n\n\tprotected _tickPoints: Array = [];\n\n\tpublic static className: string = \"AxisTick\";\n\tpublic static classNames: Array = Tick.classNames.concat([AxisTick.className]);\n}\n","import { DataItem } from \"../../../core/render/Component\";\nimport type { AxisRenderer } from \"./AxisRenderer\";\nimport type { XYSeries, IXYSeriesDataItem } from \"../series/XYSeries\";\nimport { ValueAxis, IValueAxisSettings, IValueAxisPrivate, IValueAxisDataItem, IMinMaxStep, IValueAxisEvents } from \"./ValueAxis\";\nimport * as $type from \"../../../core/util/Type\";\nimport * as $order from \"../../../core/util/Order\";\nimport * as $array from \"../../../core/util/Array\";\nimport * as $object from \"../../../core/util/Object\";\nimport * as $utils from \"../../../core/util/Utils\";\nimport * as $time from \"../../../core/util/Time\";\nimport type { ITimeInterval } from \"../../../core/util/Time\";\nimport type { TimeUnit } from \"../../../core/util/Time\";\n\nexport interface IDateAxisSettings extends IValueAxisSettings {\n\n\t/**\n\t * Indicates granularity of data.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Data_granularity} for more info\n\t */\n\tbaseInterval: ITimeInterval;\n\n\t/**\n\t * Relative location of where axis cell starts: 0 - beginning, 1 - end.\n\t *\n\t * IMPORTANT: `startLocation` is not supported by [[GaplessDateAxis]].\n\t *\n\t * @default 0\n\t */\n\tstartLocation?: number;\n\n\t/**\n\t * Relative location of where axis cell ends: 0 - beginning, 1 - end.\n\t *\n\t * IMPORTANT: `endLocation` is not supported by [[GaplessDateAxis]].\n\t * \n\t * @default 1\n\t */\n\tendLocation?: number;\n\n\t/**\n\t * Should axis group data items togeter dynamically?\n\t *\n\t * @default false\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Dynamic_data_item_grouping} for more info\n\t */\n\tgroupData?: boolean;\n\n\t/**\n\t * Maximum number of data items in the view before data grouping kicks in.\n\t *\n\t * @default 500\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Dynamic_data_item_grouping} for more info\n\t */\n\tgroupCount?: number;\n\n\t/**\n\t * Force data item grouping to specific interval.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Dynamic_data_item_grouping} for more info\n\t */\n\tgroupInterval?: ITimeInterval;\n\n\t/**\n\t * A list of intervals the axis is allowed to group data items into.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Dynamic_data_item_grouping} for more info\n\t */\n\tgroupIntervals?: Array;\n\n\t/**\n\t * A list of intervals the axis is allowed to show grid/labels on.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Grid_granularity} for more info\n\t */\n\tgridIntervals?: Array;\n\n\t/**\n\t * Display \"period change\" labels using different format.\n\t *\n\t * If set to `true`, will use `periodChangeDateFormats` instead\n\t * of `dateFormats` for such labels, e.g. for month start.\n\t *\n\t * @default true\n\t */\n\tmarkUnitChange?: boolean;\n\n\t/**\n\t * Date formats used for intermediate labels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Date_formats} for more info\n\t */\n\tdateFormats?: { [index: string]: string | Intl.DateTimeFormatOptions };\n\n\t/**\n\t * Date formats used for \"period change\" labels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Date_formats} for more info\n\t */\n\tperiodChangeDateFormats?: { [index: string]: string | Intl.DateTimeFormatOptions };\n\n\t/**\n\t * A date format to use for axis tooltip.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Axis_tooltip} for more info\n\t */\n\ttooltipDateFormat?: string | Intl.DateTimeFormatOptions;\n\n\t/**\n\t * Time unit-specific formats to use for axis tooltip.\n\t * \n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Axis_tooltip} for more info\n\t * @since 5.1.4\n\t */\n\ttooltipDateFormats?: { [index: string]: string | Intl.DateTimeFormatOptions };\n\n\t/**\n\t * A value which indicates relative position within axis cell to get timestamp\n\t * for the tooltip from.\n\t *\n\t * Values are from `0` (zero) to `1` (one), meaning start and end of the cell.\n\t *\n\t * If not set, it will use cell's start tiemstamp.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Axis_tooltip} for more info\n\t * @since 5.1.4\n\t */\n\ttooltipIntervalOffset?: number;\n}\n\nexport interface IDateAxisDataItem extends IValueAxisDataItem {\n}\n\nexport interface IDateAxisPrivate extends IValueAxisPrivate {\n\n\t/**\n\t * Current group interval.\n\t */\n\tgroupInterval?: ITimeInterval;\n\n\t/**\n\t * Current base interval.\n\t */\n\tbaseInterval: ITimeInterval;\n\n\t/**\n\t * Current grid interval.\n\t */\n\tgridInterval: ITimeInterval;\n}\n\nexport interface IDateAxisEvents extends IValueAxisEvents {\n\n\t/**\n\t * Kicks in when data grouping is on, and current group interval changes, e.g. via zooming the chart.\n\t *\n\t * @since 5.2.43\n\t */\n\tgroupintervalchanged: {}\n\n}\n\n/**\n * Creates a date axis.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/} for more info\n * @important\n */\nexport class DateAxis extends ValueAxis {\n\tpublic static className: string = \"DateAxis\";\n\tpublic static classNames: Array = ValueAxis.classNames.concat([DateAxis.className]);\n\n\tdeclare public _settings: IDateAxisSettings;\n\tdeclare public _privateSettings: IDateAxisPrivate;\n\tdeclare public _dataItemSettings: IDateAxisDataItem;\n\tdeclare public _events: IDateAxisEvents;\n\n\tprotected _dataGrouped: boolean = false;\n\tprotected _seriesDataGrouped: boolean = false;\n\tprotected _groupingCalculated: boolean = false;\n\tprotected _intervalDuration: number = 1;\n\tprotected _baseDuration: number = 1;\n\n\tprotected _intervalMax: { [index: string]: number } = {};\n\tprotected _intervalMin: { [index: string]: number } = {};\n\n\tpublic _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"axis\"]);\n\t\tsuper._afterNew();\n\t\tthis._setBaseInterval(this.get(\"baseInterval\"));\n\t\tthis.on(\"baseInterval\", () => {\n\t\t\tthis._setBaseInterval(this.get(\"baseInterval\"));\n\t\t})\n\t}\n\n\tprotected _setBaseInterval(interval: ITimeInterval) {\n\t\tthis.setPrivateRaw(\"baseInterval\", interval);\n\t\tthis._baseDuration = $time.getIntervalDuration(interval);\n\t}\n\n\tprotected _fixZoomFactor() {\n\t\tvar maxZoomFactor = this.get(\"maxZoomFactor\");\n\t\tif (maxZoomFactor != null && maxZoomFactor != Infinity) {\n\t\t\tthis.setPrivateRaw(\"maxZoomFactor\", maxZoomFactor);\n\t\t}\n\t\telse {\n\t\t\tthis.setPrivateRaw(\"maxZoomFactor\", Math.round((this.getPrivate(\"max\", 0) - this.getPrivate(\"min\", 0)) / this.baseMainDuration()));\n\t\t}\n\t}\n\n\tprotected _groupData() {\n\t\tconst min = this.getPrivate(\"min\");\n\t\tconst max = this.getPrivate(\"max\");\n\n\t\tif (($type.isNumber(min) && $type.isNumber(max))) {\n\n\t\t\tthis._fixZoomFactor();\n\n\t\t\tconst groupInterval = this.getPrivate(\"groupInterval\")!;\n\t\t\tif (groupInterval) {\n\t\t\t\tthis._setBaseInterval(groupInterval);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._setBaseInterval(this.get(\"baseInterval\"));\n\t\t\t}\n\n\n\t\t\tif (this.isDirty(\"groupInterval\")) {\n\t\t\t\tlet groupInterval = this.get(\"groupInterval\")!;\n\t\t\t\tif (groupInterval) {\n\t\t\t\t\tthis.setRaw(\"groupIntervals\", [groupInterval]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.isDirty(\"groupData\")) {\n\t\t\t\tif (!this._dataGrouped) {\n\t\t\t\t\tif (this.get(\"groupData\")) {\n\t\t\t\t\t\t$array.each(this.series, (series) => {\n\t\t\t\t\t\t\tthis._groupSeriesData(series);\n\t\t\t\t\t\t})\n\n\t\t\t\t\t\tthis._handleRangeChange();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlet baseInterval = this.get(\"baseInterval\");\n\t\t\t\t\t\tlet mainDataSetId: string = baseInterval.timeUnit + baseInterval.count;\n\t\t\t\t\t\t$array.each(this.series, (series) => {\n\t\t\t\t\t\t\tseries.setDataSet(mainDataSetId);\n\t\t\t\t\t\t})\n\n\t\t\t\t\t\tthis._setBaseInterval(baseInterval);\n\t\t\t\t\t\tthis.setPrivateRaw(\"groupInterval\", undefined);\n\t\t\t\t\t\tthis.markDirtyExtremes();\n\t\t\t\t\t}\n\t\t\t\t\tthis._dataGrouped = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n\tpublic _groupSeriesData(series: XYSeries) {\n\t\tif (this.get(\"groupData\") && !series.get(\"groupDataDisabled\")) {\n\n\t\t\tthis._dataGrouped = true; // helps to avoid double grouping\n\n\t\t\tthis._seriesDataGrouped = true;\n\n\t\t\t// make array of intervals which will be used;\n\t\t\tlet intervals: ITimeInterval[] = [];\n\t\t\tlet baseDuration = this.baseMainDuration();\n\n\t\t\tlet groupIntervals = this.get(\"groupIntervals\")!;\n\t\t\tif (groupIntervals) { }\n\t\t\t$array.each(groupIntervals, (interval) => {\n\t\t\t\tlet intervalDuration = $time.getIntervalDuration(interval);\n\t\t\t\tif (intervalDuration > baseDuration) {\n\t\t\t\t\tintervals.push(interval);\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tseries._dataSets = {};\n\n\t\t\tconst key = this.getPrivate(\"name\")! + this.get(\"renderer\").getPrivate(\"letter\")!;\n\t\t\tlet fields: Array;\n\n\t\t\tconst baseAxis = series.get(\"baseAxis\");\n\n\t\t\tif (series.get(\"xAxis\") === baseAxis) {\n\t\t\t\tfields = series._valueYFields;\n\t\t\t}\n\t\t\telse if (series.get(\"yAxis\") === baseAxis) {\n\t\t\t\tfields = series._valueXFields;\n\t\t\t}\n\n\t\t\tlet dataItems = series._mainDataItems;\n\t\t\tlet baseInterval = this.get(\"baseInterval\");\n\t\t\tlet mainDataSetId: string = baseInterval.timeUnit + baseInterval.count;\n\n\t\t\tseries._dataSets[mainDataSetId] = dataItems;\n\n\t\t\tconst groupCallback = series.get(\"groupDataCallback\");\n\t\t\tlet groupOriginals = series.get(\"groupDataWithOriginals\", false);\n\t\t\tif (groupCallback) {\n\t\t\t\tgroupOriginals = true;\n\t\t\t}\n\n\t\t\tconst firstDay = this._root.locale.firstDayOfWeek;\n\t\t\tconst utc = this._root.utc;\n\t\t\tconst timezone = this._root.timezone;\t\t\t\n\n\t\t\t$array.each(intervals, (interval) => {\n\n\t\t\t\tlet previousTime = -Infinity;\n\t\t\t\tlet dataSetId = interval.timeUnit + interval.count;\n\t\t\t\tseries._dataSets[dataSetId] = [];\n\n\t\t\t\tlet newDataItem: DataItem;\n\n\t\t\t\tlet sum: { [index: string]: number } = {};\n\t\t\t\tlet count: { [index: string]: number } = {};\n\n\t\t\t\tlet groupFieldValues: { [index: string]: string } = {};\n\t\t\t\tlet workingFields: { [index: string]: string } = {};\n\n\t\t\t\t$array.each(fields, (field) => {\n\t\t\t\t\tsum[field] = 0;\n\t\t\t\t\tcount[field] = 0;\n\t\t\t\t\tgroupFieldValues[field] = series.get((field + \"Grouped\") as any);\n\t\t\t\t\tworkingFields[field] = field + \"Working\";\n\t\t\t\t})\n\n\t\t\t\tlet intervalDuration = $time.getDuration(interval.timeUnit);\n\n\t\t\t\tlet firstItem = dataItems[0];\n\t\t\t\tlet firstDate: Date;\n\t\t\t\tif (firstItem) {\n\t\t\t\t\tfirstDate = new Date(dataItems[0].get(key as any));\n\t\t\t\t}\n\n\t\t\t\tlet prevNewDataItem: DataItem | undefined;\n\t\t\t\t$array.each(dataItems, (dataItem) => {\n\t\t\t\t\tlet time = dataItem.get(key as any);\n\t\t\t\t\tlet roundedTime = $time.round(new Date(time), interval.timeUnit, interval.count, firstDay, utc, firstDate, timezone).getTime();\n\t\t\t\t\tlet dataContext: any;\n\n\t\t\t\t\tif (previousTime < roundedTime - intervalDuration / 24) {\n\t\t\t\t\t\tdataContext = $object.copy(dataItem.dataContext);\n\n\t\t\t\t\t\tnewDataItem = new DataItem(series, dataContext, series._makeDataItem(dataContext));\n\t\t\t\t\t\tnewDataItem.setRaw(key as any, roundedTime);\n\n\t\t\t\t\t\tseries._dataSets[dataSetId].push(newDataItem);\n\n\t\t\t\t\t\t$array.each(fields, (field) => {\n\t\t\t\t\t\t\tlet value = dataItem.get(field as any);\n\t\t\t\t\t\t\tif ($type.isNumber(value)) {\n\t\t\t\t\t\t\t\tnewDataItem.setRaw(field as any, value);\n\t\t\t\t\t\t\t\tnewDataItem.setRaw(workingFields[field] as any, value);\n\t\t\t\t\t\t\t\tcount[field] = 1;\n\t\t\t\t\t\t\t\tsum[field] = value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tsum[field] = 0;\n\t\t\t\t\t\t\t\tcount[field] = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\n\t\t\t\t\t\tif (groupOriginals) {\n\t\t\t\t\t\t\tnewDataItem.set(\"originals\", [dataItem]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (groupCallback && prevNewDataItem) {\n\t\t\t\t\t\t\tgroupCallback(prevNewDataItem, interval);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tprevNewDataItem = newDataItem;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$array.each(fields, (field) => {\n\t\t\t\t\t\t\tlet groupKey = groupFieldValues[field];\n\t\t\t\t\t\t\tlet value = dataItem.get(field as any);\n\n\t\t\t\t\t\t\tif (value !== undefined) {\n\n\t\t\t\t\t\t\t\tlet currentValue = newDataItem.get(field as any);\n\n\t\t\t\t\t\t\t\tswitch (groupKey) {\n\t\t\t\t\t\t\t\t\tcase \"close\":\n\t\t\t\t\t\t\t\t\t\tnewDataItem.setRaw(field as any, value);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase \"sum\":\n\t\t\t\t\t\t\t\t\t\tif(value != null){\n\t\t\t\t\t\t\t\t\t\t\tnewDataItem.setRaw(field as any, currentValue + value);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase \"open\":\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase \"low\":\n\t\t\t\t\t\t\t\t\t\tif (value < currentValue) {\n\t\t\t\t\t\t\t\t\t\t\tnewDataItem.setRaw(field as any, value);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase \"high\":\n\t\t\t\t\t\t\t\t\t\tif (value > currentValue) {\n\t\t\t\t\t\t\t\t\t\t\tnewDataItem.setRaw(field as any, value);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase \"average\":\n\t\t\t\t\t\t\t\t\t\tcount[field]++;\n\t\t\t\t\t\t\t\t\t\tsum[field] += value;\n\t\t\t\t\t\t\t\t\t\tlet average = sum[field] / count[field];\n\t\t\t\t\t\t\t\t\t\tnewDataItem.setRaw(field as any, average);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase \"extreme\":\n\t\t\t\t\t\t\t\t\t\tif (Math.abs(value) > Math.abs(currentValue)) {\n\t\t\t\t\t\t\t\t\t\t\tnewDataItem.setRaw(field as any, value);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tnewDataItem.setRaw(workingFields[field] as any, newDataItem.get(field as any));\n\t\t\t\t\t\t\t\tlet dataContext: any = $object.copy(dataItem.dataContext);\n\t\t\t\t\t\t\t\tdataContext[key as any] = roundedTime;\n\t\t\t\t\t\t\t\tnewDataItem.dataContext = dataContext;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\n\t\t\t\t\t\tif (groupOriginals) {\n\t\t\t\t\t\t\tnewDataItem.get(\"originals\")!.push(dataItem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpreviousTime = roundedTime;\n\t\t\t\t})\n\n\t\t\t\tif (groupCallback && prevNewDataItem) {\n\t\t\t\t\tgroupCallback(prevNewDataItem, interval);\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (series._dataSetId) {\n\t\t\t\tseries.setDataSet(series._dataSetId);\n\t\t\t}\n\t\t\tthis.markDirtySize();\n\t\t}\n\t}\n\n\tpublic _clearDirty() {\n\t\tsuper._clearDirty();\n\t\tthis._groupingCalculated = false;\n\t\tthis._dataGrouped = false;\n\t}\n\n\t/**\n\t * Returns a time interval axis would group data to for a specified duration.\n\t *\n\t * @since 5.2.1\n\t */\n\tpublic getGroupInterval(duration: number): ITimeInterval {\n\t\tlet baseInterval = this.get(\"baseInterval\");\n\t\tlet groupInterval = $time.chooseInterval(0, duration, this.get(\"groupCount\", Infinity), this.get(\"groupIntervals\")!);\n\t\tif ($time.getIntervalDuration(groupInterval) < $time.getIntervalDuration(baseInterval)) {\n\t\t\tgroupInterval = { ...baseInterval };\n\t\t}\n\t\treturn groupInterval;\n\t}\n\n\t/**\n\t * Return `max` of a specified time interval.\n\t * \n\t * Will work only if the axis was grouped to this interval at least once.\n\t * \n\t * @since 5.2.1\n\t * @param interval Interval\n\t * @return Max\n\t */\n\tpublic getIntervalMax(interval: ITimeInterval): number {\n\t\treturn this._intervalMax[interval.timeUnit + interval.count];\n\t}\n\n\t/**\n\t * Return `min` of a specified time interval.\n\t * \n\t * Will work only if the axis was grouped to this interval at least once.\n\t * \n\t * @since 5.2.1\n\t * @param interval Interval\n\t * @return Min\n\t */\n\tpublic getIntervalMin(interval: ITimeInterval): number {\n\t\treturn this._intervalMin[interval.timeUnit + interval.count];\n\t}\n\n\tprotected _handleRangeChange() {\n\t\tsuper._handleRangeChange();\n\n\t\tlet selectionMin = Math.round(this.getPrivate(\"selectionMin\")! as number);\n\t\tlet selectionMax = Math.round(this.getPrivate(\"selectionMax\")! as number);\n\n\t\tif ($type.isNumber(selectionMin) && $type.isNumber(selectionMax)) {\n\n\t\t\tif (this.get(\"endLocation\") == 0) {\n\t\t\t\tselectionMax += 1;\n\t\t\t}\n\n\t\t\tif (this.get(\"groupData\") && !this._groupingCalculated) {\n\t\t\t\tthis._groupingCalculated = true;\n\n\t\t\t\tlet modifiedDifference = (selectionMax - selectionMin) + (this.get(\"startLocation\", 0) + (1 - this.get(\"endLocation\", 1)) * this.baseDuration());\n\t\t\t\tlet groupInterval = this.get(\"groupInterval\");\n\n\t\t\t\tif (!groupInterval) {\n\t\t\t\t\tgroupInterval = this.getGroupInterval(modifiedDifference);\n\t\t\t\t}\n\n\t\t\t\tlet current = this.getPrivate(\"groupInterval\");\n\n\t\t\t\tif (groupInterval && (!current || (current.timeUnit !== groupInterval.timeUnit || current.count !== groupInterval.count) || this._seriesDataGrouped)) {\n\t\t\t\t\tthis._seriesDataGrouped = false;\n\t\t\t\t\tthis.setPrivateRaw(\"groupInterval\", groupInterval);\n\t\t\t\t\tthis._setBaseInterval(groupInterval)\n\n\n\t\t\t\t\tlet newId = groupInterval.timeUnit + groupInterval.count;\n\t\t\t\t\t$array.each(this.series, (series) => {\n\t\t\t\t\t\tif (series.get(\"baseAxis\") === this) {\n\t\t\t\t\t\t\tseries.setDataSet(newId);\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\tthis.markDirtyExtremes();\n\n\t\t\t\t\tthis._root.events.once(\"frameended\", () => {\n\t\t\t\t\t\tthis._root.events.once(\"frameended\", () => {\n\t\t\t\t\t\t\tconst type = \"groupintervalchanged\";\n\t\t\t\t\t\t\tif (this.events.isEnabled(type)) {\n\t\t\t\t\t\t\t\tthis.events.dispatch(type, { type: type, target: this });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$array.each(this.series, (series) => {\n\t\t\t\tif (series.get(\"baseAxis\") === this) {\n\t\t\t\t\tlet fieldName = (this.getPrivate(\"name\")! + this.get(\"renderer\").getPrivate(\"letter\")!);\n\n\t\t\t\t\tconst start = $array.getSortedIndex(series.dataItems, (dataItem) => {\n\t\t\t\t\t\treturn $order.compare(dataItem.get(fieldName), selectionMin);\n\t\t\t\t\t});\n\n\t\t\t\t\tlet startIndex = start.index;\n\n\t\t\t\t\tif (startIndex > 0) {\n\t\t\t\t\t\tstartIndex -= 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tselectionMax += this.baseDuration() * (1 - this.get(\"endLocation\", 1));\n\n\t\t\t\t\tconst end = $array.getSortedIndex(series.dataItems, (dataItem) => {\n\t\t\t\t\t\treturn $order.compare(dataItem.get(fieldName), selectionMax);\n\t\t\t\t\t});\n\n\t\t\t\t\tlet endIndex = end.index;\n\n\t\t\t\t\tlet endIndex2 = endIndex;\n\t\t\t\t\tif (endIndex2 > 0) {\n\t\t\t\t\t\tendIndex2--;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst firstDataItem = series.dataItems[startIndex];\n\t\t\t\t\tconst lastDataItem = series.dataItems[endIndex2];\n\n\t\t\t\t\tlet lastDate: number | undefined;\n\t\t\t\t\tlet firstDate: number | undefined;\n\t\t\t\t\tif (firstDataItem) {\n\t\t\t\t\t\tfirstDate = firstDataItem.get(fieldName);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (lastDataItem) {\n\t\t\t\t\t\tlastDate = lastDataItem.get(fieldName);\n\t\t\t\t\t}\n\n\t\t\t\t\tlet outOfSelection = false;\n\t\t\t\t\tif (lastDate != null && firstDate != null) {\n\t\t\t\t\t\tif (lastDate < selectionMin || firstDate > selectionMax) {\n\t\t\t\t\t\t\toutOfSelection = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tseries.setPrivate(\"outOfSelection\", outOfSelection);\n\t\t\t\t\tseries.setPrivate(\"startIndex\", startIndex);\n\t\t\t\t\tseries.setPrivate(\"endIndex\", endIndex);\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _adjustMinMax(min: number, max: number, gridCount: number, _strictMode?: boolean): IMinMaxStep {\n\t\treturn { min: min, max: max, step: (max - min) / gridCount };\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic intervalDuration(): number {\n\t\treturn this._intervalDuration;\n\t}\n\n\tprotected _saveMinMax(min: number, max: number) {\n\t\tlet groupInterval = this.getPrivate(\"groupInterval\");\n\n\t\tif (!groupInterval) {\n\t\t\tgroupInterval = this.get(\"baseInterval\");\n\t\t}\n\n\t\tlet id = groupInterval.timeUnit + groupInterval.count;\n\t\tthis._intervalMin[id] = min;\n\t\tthis._intervalMax[id] = max;\n\t}\n\n\tprotected _getM(timeUnit:TimeUnit){\n\t\tif(timeUnit == \"month\" || timeUnit == \"year\" || timeUnit == \"day\"){\n\t\t\treturn 1.05;\n\t\t}\n\t\treturn 1.01;\n\t}\n\n\tprotected _prepareAxisItems() {\n\t\tconst min = this.getPrivate(\"min\");\n\t\tconst max = this.getPrivate(\"max\");\n\n\t\tif ($type.isNumber(min) && $type.isNumber(max)) {\n\t\t\tconst selectionMin = Math.round(this.getPrivate(\"selectionMin\")! as number);\n\t\t\tconst selectionMax = Math.round(this.getPrivate(\"selectionMax\")! as number);\n\t\t\tconst renderer = this.get(\"renderer\");\n\t\t\tconst baseInterval = this.getPrivate(\"baseInterval\");\n\n\t\t\tlet value = selectionMin;\n\t\t\tlet i = 0;\n\n\t\t\tconst intervals = this.get(\"gridIntervals\")!;\n\t\t\tlet gridInterval = $time.chooseInterval(0, selectionMax - selectionMin, renderer.gridCount(), intervals);\n\n\t\t\tif ($time.getIntervalDuration(gridInterval) < this.baseDuration()) {\n\t\t\t\tgridInterval = { ...baseInterval };\n\t\t\t}\n\n\t\t\tconst intervalDuration = $time.getIntervalDuration(gridInterval);\n\t\t\tthis._intervalDuration = intervalDuration;\n\n\t\t\tconst nextGridUnit = $time.getNextUnit(gridInterval.timeUnit);\n\t\t\tconst firstDay = this._root.locale.firstDayOfWeek;\n\t\t\tconst utc = this._root.utc;\n\t\t\tconst timezone = this._root.timezone;\n\n\t\t\tvalue = $time.round(new Date(selectionMin - intervalDuration), gridInterval.timeUnit, gridInterval.count, firstDay, utc, new Date(min), timezone).getTime();\n\t\t\tlet previousValue = value - intervalDuration;\n\t\t\tlet format: string | Intl.DateTimeFormatOptions;\n\t\t\tconst formats = this.get(\"dateFormats\")!;\n\n\t\t\tthis.setPrivateRaw(\"gridInterval\", gridInterval);\n\n\t\t\twhile (value < selectionMax + intervalDuration) {\n\t\t\t\tlet dataItem: DataItem;\n\t\t\t\tif (this.dataItems.length < i + 1) {\n\t\t\t\t\tdataItem = new DataItem(this, undefined, {});\n\t\t\t\t\tthis._dataItems.push(dataItem);\n\t\t\t\t\tthis.processDataItem(dataItem);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdataItem = this.dataItems[i];\n\t\t\t\t}\n\n\t\t\t\tthis._createAssets(dataItem, []);\n\n\t\t\t\tif (dataItem.isHidden()) {\n\t\t\t\t\tdataItem.show();\n\t\t\t\t}\n\n\t\t\t\tdataItem.setRaw(\"value\", value);\n\n\n\n\t\t\t\tlet endValue = value + $time.getDuration(gridInterval.timeUnit, gridInterval.count * this._getM(gridInterval.timeUnit));\n\t\t\t\tendValue = $time.round(new Date(endValue), gridInterval.timeUnit, 1, firstDay, utc, undefined, timezone).getTime();\n\n\t\t\t\tdataItem.setRaw(\"endValue\", endValue);\n\n\t\t\t\tlet date = new Date(value);\n\n\t\t\t\tformat = formats[gridInterval.timeUnit];\n\t\t\t\tif (nextGridUnit && this.get(\"markUnitChange\") && $type.isNumber(previousValue)) {\n\t\t\t\t\tif (gridInterval.timeUnit != \"year\") {\n\t\t\t\t\t\tif ($time.checkChange(value, previousValue, nextGridUnit, utc, timezone)) {\n\t\t\t\t\t\t\tformat = this.get(\"periodChangeDateFormats\")![gridInterval.timeUnit];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst label = dataItem.get(\"label\");\n\t\t\t\tif (label) {\n\t\t\t\t\tlabel.set(\"text\", this._root.dateFormatter.format(date, format!));\n\t\t\t\t}\n\n\t\t\t\tthis._prepareDataItem(dataItem, gridInterval.count);\n\n\t\t\t\tpreviousValue = value;\n\t\t\t\tvalue = endValue;\n\n\t\t\t\tif (value == previousValue) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\tfor (let j = i; j < this.dataItems.length; j++) {\n\t\t\t\tthis.dataItems[j].hide();\n\t\t\t}\n\n\t\t\t$array.each(this.series, (series) => {\n\t\t\t\tif (series.inited) {\n\t\t\t\t\tseries._markDirtyAxes();\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tthis._updateGhost();\n\t}\n\n\tprotected _updateFinals(start:number, end:number){\n\t\tthis.setPrivateRaw(\"selectionMinFinal\", this.positionToValue(start));\n\t\tthis.setPrivateRaw(\"selectionMaxFinal\", this.positionToValue(end));\n\t}\t\n\n\tprotected _getDelta() {\n\t\tthis._deltaMinMax = this.baseDuration() / 2;\n\t}\n\n\tprotected _fixMin(min: number) {\n\t\tconst baseInterval = this.getPrivate(\"baseInterval\");\n\t\tconst firstDay = this._root.locale.firstDayOfWeek;\n\t\tconst timezone = this._root.timezone;\n\t\tconst utc = this._root.utc;\n\t\tconst timeUnit = baseInterval.timeUnit;\n\t\tlet startTime = $time.round(new Date(min), timeUnit, baseInterval.count, firstDay, utc, undefined, timezone).getTime();\n\t\tlet endTime = startTime + $time.getDuration(timeUnit, baseInterval.count * this._getM(timeUnit))\n\t\tendTime = $time.round(new Date(endTime), timeUnit, 1, firstDay, utc, undefined, timezone).getTime();\n\t\treturn startTime + (endTime - startTime) * this.get(\"startLocation\", 0);\n\t}\n\n\tprotected _fixMax(max: number) {\n\t\tconst baseInterval = this.getPrivate(\"baseInterval\");\n\t\tconst firstDay = this._root.locale.firstDayOfWeek;\n\t\tconst timezone = this._root.timezone;\n\t\tconst utc = this._root.utc;\n\t\tconst timeUnit = baseInterval.timeUnit;\n\t\tlet startTime = $time.round(new Date(max), timeUnit, baseInterval.count, firstDay, utc, undefined, timezone).getTime();\n\t\tlet endTime = startTime + $time.getDuration(timeUnit, baseInterval.count * this._getM(timeUnit))\n\t\tendTime = $time.round(new Date(endTime), timeUnit, 1, firstDay, utc, undefined, timezone).getTime();\n\n\t\treturn startTime + (endTime - startTime) * this.get(\"endLocation\", 1);\n\t}\n\n\tprotected _updateDates(_date: number) {\n\n\t}\n\n\t/**\n\t * Returns a duration of currently active `baseInterval` in milliseconds.\n\t * \n\t * @return Duration\n\t */\n\tpublic baseDuration(): number {\n\t\treturn this._baseDuration;\n\t\t//return $time.getIntervalDuration(this.getPrivate(\"baseInterval\"));\n\t}\n\n\t/**\n\t * Returns a duration of user-defined `baseInterval` in milliseconds.\n\t *\n\t * @return Duration\n\t */\n\tpublic baseMainDuration(): number {\n\t\treturn $time.getIntervalDuration(this.get(\"baseInterval\"));\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic processSeriesDataItem(dataItem: DataItem, fields: Array) {\n\t\tconst baseInterval = this.getPrivate(\"baseInterval\");\n\n\t\tif (!dataItem.open) {\n\t\t\tdataItem.open = {};\n\t\t}\n\t\tif (!dataItem.close) {\n\t\t\tdataItem.close = {};\n\t\t}\n\n\t\t$array.each(fields, (field) => {\n\t\t\tlet value = dataItem.get(field as any);\n\t\t\tif ($type.isNumber(value)) {\n\t\t\t\tlet startTime = dataItem.open![field];\n\t\t\t\tlet endTime = dataItem.close![field];\n\t\t\t\t// this is done to save cpu, as rounding is quite expensive, especially with timezone set. \n\t\t\t\t// if value is between prev start and end, it means it didn't change, all is fine.\n\t\t\t\tif (value >= startTime && value <= endTime) {\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tconst firstDay = this._root.locale.firstDayOfWeek;\n\t\t\t\t\tconst utc = this._root.utc;\n\t\t\t\t\tconst timezone = this._root.timezone\n\t\t\t\t\tconst timeUnit = baseInterval.timeUnit;\n\t\t\t\t\tconst count = baseInterval.count;\n\t\t\t\t\tstartTime = $time.round(new Date(value), timeUnit, count, firstDay, utc, undefined, timezone).getTime();\n\t\t\t\t\tendTime = startTime + $time.getDuration(timeUnit, count * this._getM(timeUnit));\n\t\t\t\t\tendTime = $time.round(new Date(endTime), timeUnit, 1, firstDay, utc, undefined, timezone).getTime();\n\n\t\t\t\t\tdataItem.open![field] = startTime;\n\t\t\t\t\tdataItem.close![field] = endTime;\n\t\t\t\t}\n\n\t\t\t\tthis._updateDates(startTime);\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemPositionX(dataItem: DataItem, field: string, cellLocation: number, axisLocation: number): number {\n\n\t\tlet openValue;\n\t\tlet closeValue;\n\n\t\tif (dataItem.open && dataItem.close) {\n\t\t\topenValue = dataItem.open[field];\n\t\t\tcloseValue = dataItem.close[field];\n\t\t}\n\t\telse {\n\t\t\topenValue = dataItem.get(field as any)\n\t\t\tcloseValue = openValue;\n\t\t}\n\n\t\tlet value = openValue + (closeValue - openValue) * cellLocation;\n\n\t\tvalue = this._baseValue + (value - this._baseValue) * axisLocation;\n\n\t\treturn this.valueToPosition(value);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemCoordinateX(dataItem: DataItem, field: string, cellLocation: number, axisLocation: number): number {\n\t\treturn this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(dataItem, field, cellLocation, axisLocation));\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemPositionY(dataItem: DataItem, field: string, cellLocation: number, axisLocation: number): number {\n\t\tlet openValue;\n\t\tlet closeValue;\n\n\t\tif (dataItem.open && dataItem.close) {\n\t\t\topenValue = dataItem.open[field];\n\t\t\tcloseValue = dataItem.close[field];\n\t\t}\n\t\telse {\n\t\t\topenValue = dataItem.get(field as any)\n\t\t\tcloseValue = openValue;\n\t\t}\n\n\t\tlet value = openValue + (closeValue - openValue) * cellLocation;\n\n\t\tvalue = this._baseValue + (value - this._baseValue) * axisLocation;\n\t\treturn this.valueToPosition(value);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemCoordinateY(dataItem: DataItem, field: string, cellLocation: number, axisLocation: number): number {\n\t\treturn this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(dataItem, field, cellLocation, axisLocation));\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic roundAxisPosition(position: number, location: number): number {\n\t\tlet value = this.positionToValue(position);\n\t\tvalue = value - (location - 0.5) * this.baseDuration();\n\n\t\tlet baseInterval = this.getPrivate(\"baseInterval\");\n\t\tif (!$type.isNaN(value)) {\n\t\t\tconst firstDay = this._root.locale.firstDayOfWeek;\n\t\t\tconst timeUnit = baseInterval.timeUnit;\n\t\t\tconst utc = this._root.utc;\n\t\t\tconst timezone = this._root.timezone;\n\t\t\tconst count = baseInterval.count;\n\n\t\t\tvalue = $time.round(new Date(value), timeUnit, count, firstDay, utc, new Date(this.getPrivate(\"min\", 0)), timezone).getTime();\n\n\t\t\tlet duration = $time.getDateIntervalDuration(baseInterval, new Date(value), firstDay, utc, timezone);\n\t\t\tif (timezone) {\n\t\t\t\tvalue = $time.round(new Date(value + this.baseDuration() * 0.05), timeUnit, count, firstDay, utc, new Date(this.getPrivate(\"min\", 0)), timezone).getTime();\n\t\t\t\tduration = $time.getDateIntervalDuration(baseInterval, new Date(value + duration * location), firstDay, utc, timezone);\n\t\t\t}\n\n\t\t\treturn this.valueToPosition(value + duration * location);\n\t\t}\n\t\treturn NaN;\n\t}\n\n\t/**\n\t * Returns text to be used in an axis tooltip for specific relative position.\n\t *\n\t * @param position Position\n\t * @return Tooltip text\n\t */\n\tpublic getTooltipText(position: number): string | undefined {\n\t\t//@todo number formatter + tag\n\t\tif (this.getPrivate(\"min\") != null) {\n\t\t\tlet format = this.get(\"tooltipDateFormats\")![this.getPrivate(\"baseInterval\").timeUnit];\n\t\t\tlet value = this.positionToValue(position);\n\t\t\tlet date = new Date(value);\n\n\t\t\tlet baseInterval = this.getPrivate(\"baseInterval\");\n\t\t\tlet duration = $time.getDateIntervalDuration(baseInterval, date, this._root.locale.firstDayOfWeek, this._root.utc, this._root.timezone);\n\t\t\treturn this._root.dateFormatter.format(new Date(value + this.get(\"tooltipIntervalOffset\", -this.get(\"tooltipLocation\", 0.5)) * duration), this.get(\"tooltipDateFormat\", format));\n\t\t}\n\t\treturn \"\";\n\t}\n\n\t/**\n\t * Returns a data item from series that is closest to the `position`.\n\t *\n\t * @param series Series\n\t * @param position Relative position\n\t * @return Data item\n\t */\n\tpublic getSeriesItem(series: XYSeries, position: number, location?: number): DataItem | undefined {\n\t\tlet fieldName = (this.getPrivate(\"name\")! + this.get(\"renderer\").getPrivate(\"letter\")!);\n\t\tlet value = this.positionToValue(position);\n\n\t\tif (location == null) {\n\t\t\tlocation = 0.5;\n\t\t}\n\n\t\tvalue = value - (location - 0.5) * this.baseDuration();\n\n\t\tconst result = $array.getSortedIndex(series.dataItems, (dataItem) => {\n\t\t\tvar diValue = 0;\n\t\t\tif (dataItem.open) {\n\t\t\t\tdiValue = dataItem.open[fieldName];\n\t\t\t}\n\n\t\t\treturn $order.compare(diValue, value);\n\t\t});\n\n\t\tif (series.get(\"snapTooltip\")) {\n\t\t\tlet first = series.dataItems[result.index - 1];\n\t\t\tlet second = series.dataItems[result.index];\n\n\t\t\tif (first && second) {\n\t\t\t\tif (first.open && second.close) {\n\t\t\t\t\tlet open = first.open[fieldName];\n\t\t\t\t\tlet close = second.close[fieldName];\n\n\t\t\t\t\tif (Math.abs(value - open) > Math.abs(value - close)) {\n\t\t\t\t\t\treturn second;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(first){\n\t\t\t\treturn first;\t\n\t\t\t}\n\n\t\t\tif(second){\n\t\t\t\treturn second;\t\n\t\t\t}\t\t\t\n\t\t}\n\t\telse {\n\t\t\t// @todo check if is in range\n\t\t\tconst dataItem = series.dataItems[result.index - 1];\n\n\t\t\tif (dataItem) {\n\t\t\t\tif (dataItem.open && dataItem.close) {\n\t\t\t\t\tlet open = dataItem.open[fieldName];\n\t\t\t\t\tlet close = dataItem.close[fieldName];\n\n\t\t\t\t\tif (value >= open && value <= close) {\n\t\t\t\t\t\treturn dataItem;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic shouldGap(dataItem: DataItem, nextItem: DataItem, autoGapCount: number, fieldName: string): boolean {\n\t\tconst value1 = dataItem.get(fieldName as any);\n\t\tconst value2 = nextItem.get(fieldName as any);\n\n\t\tif (value2 - value1 > this.baseDuration() * autoGapCount) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Zooms the axis to specific `start` and `end` dates.\n\t *\n\t * Optional `duration` specifies duration of zoom animation in milliseconds.\n\t *\n\t * @param start Start Date\n\t * @param end End Date\n\t * @param duration Duration in milliseconds\n\t */\n\tpublic zoomToDates(start: Date, end: Date, duration?: number) {\n\t\tthis.zoomToValues(start.getTime(), end.getTime(), duration);\n\t}\n\n\t/**\n\t * Returns a `Date` object corresponding to specific position within plot\n\t * area.\n\t *\n\t * @param position Pposition\n\t * @return Date\n\t */\n\tpublic positionToDate(position: number): Date {\n\t\treturn new Date(this.positionToValue(position));\n\t}\n\n\t/**\n\t * Returns a relative position within plot area that corresponds to specific\n\t * date.\n\t *\n\t * @param date Date\n\t * @return Position\n\t */\n\tpublic dateToPosition(date: Date): number {\n\t\treturn this.valueToPosition(date.getTime());\n\t}\n\n\t/**\n\t * Returns position span between start and end of a single cell in axis.\n\t *\n\t * @since 5.2.30\n\t * @return Position\n\t * @ignore\n\t */\n\tpublic getCellWidthPosition(): number {\n\t\tlet max = this.getPrivate(\"selectionMax\", this.getPrivate(\"max\"));\n\t\tlet min = this.getPrivate(\"selectionMin\", this.getPrivate(\"min\"));\n\n\t\tif ($type.isNumber(max) && $type.isNumber(min)) {\n\t\t\treturn this.baseDuration() / (max - min);\n\t\t}\n\t\treturn 0.05;\n\t}\n}\n","import type { AxisRenderer } from \"./AxisRenderer\";\r\n\r\nimport { DateAxis, IDateAxisSettings, IDateAxisPrivate, IDateAxisDataItem, IDateAxisEvents } from \"./DateAxis\";\r\nimport { DataItem } from \"../../../core/render/Component\";\r\n\r\nimport * as $array from \"../../../core/util/Array\"\r\nimport * as $order from \"../../../core/util/Order\";\r\nimport * as $time from \"../../../core/util/Time\";\r\nimport * as $type from \"../../../core/util/Type\";\r\n\r\nexport interface IGaplessDateAxisSettings extends IDateAxisSettings {\r\n\r\n}\r\n\r\nexport interface IGaplessDateAxisDataItem extends IDateAxisDataItem {\r\n\r\n\t/**\r\n\t * An index of a data item.\r\n\t */\r\n\tindex?: number\r\n\r\n}\r\n\r\nexport interface IGaplessDateAxisPrivate extends IDateAxisPrivate {\r\n\r\n}\r\n\r\nexport interface IGaplessDateAxisEvents extends IDateAxisEvents {\r\n}\r\n\r\n/**\r\n * A version of a [[DateAxis]] which removes intervals that don't have any data\r\n * items in them.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/gapless-date-axis/} for more info\r\n * @important\r\n */\r\nexport class GaplessDateAxis extends DateAxis {\r\n\tpublic static className: string = \"GaplessDateAxis\";\r\n\tpublic static classNames: Array = DateAxis.classNames.concat([GaplessDateAxis.className]);\r\n\r\n\tdeclare public _settings: IGaplessDateAxisSettings;\r\n\tdeclare public _privateSettings: IGaplessDateAxisPrivate;\r\n\tdeclare public _dataItemSettings: IGaplessDateAxisDataItem;\r\n\tdeclare public _events: IGaplessDateAxisEvents;\r\n\r\n\tprotected _frequency: number = 1;\r\n\r\n\tpublic _afterNew() {\r\n\t\tthis.valueFields.push(\"date\");\r\n\t\tsuper._afterNew();\r\n\t}\r\n\r\n\tprotected _dates: Array = [];\r\n\r\n\tprotected _updateDates(date: number) {\r\n\t\tconst dates = this._dates;\r\n\t\tconst result = $array.getSortedIndex(dates, (x) => $order.compare(x, date));\r\n\t\tif (!result.found) {\r\n\t\t\t$array.insertIndex(dates, result.index, date);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic _updateAllDates() {\r\n\t\tthis._dates.length = 0;\r\n\r\n\t\t$array.each(this.series, (series) => {\r\n\t\t\tlet field = \"valueX\";\r\n\t\t\tif (series.get(\"yAxis\") == this) {\r\n\t\t\t\tfield = \"valueY\"\r\n\t\t\t}\r\n\t\t\t$array.each(series.dataItems, (dataItem) => {\r\n\t\t\t\tlet value = dataItem.get(field as any);\r\n\t\t\t\tif ($type.isNumber(value)) {\r\n\t\t\t\t\tif (dataItem.open) {\r\n\t\t\t\t\t\tthis._updateDates(dataItem.open![field]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t})\r\n\t}\r\n\r\n\t/**\r\n\t * Convers value to a relative position on axis.\r\n\t *\r\n\t * @param value Value\r\n\t * @return Relative position\r\n\t */\r\n\tpublic valueToPosition(value: number): number {\r\n\t\tconst dates = this._dates;\r\n\t\tconst startLocation = this.get(\"startLocation\", 0);\r\n\t\tconst endLocation = this.get(\"endLocation\", 1);\r\n\t\tconst len = dates.length - startLocation - (1 - endLocation);\r\n\t\tconst result = $array.getSortedIndex(dates, (x) => $order.compare(x, value));\r\n\t\tlet index = result.index;\r\n\r\n\t\tif (result.found) {\r\n\t\t\treturn (index - startLocation) / len;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (index > 0) {\r\n\t\t\t\tindex -= 1;\r\n\t\t\t}\r\n\r\n\t\t\tlet itemValue = dates[index];\r\n\r\n\t\t\tlet d = 0;\r\n\t\t\tif (itemValue > value) {\r\n\t\t\t\td = itemValue - value;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\td = value - itemValue;\r\n\t\t\t}\r\n\r\n\t\t\treturn (index - startLocation) / len + d / this.baseDuration() / len;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Converts numeric value from axis scale to index.\r\n\t * \r\n\t * @param value Value\r\n\t * @return Index\r\n\t */\r\n\tpublic valueToIndex(value: number): number {\r\n\t\tconst dates = this._dates;\r\n\r\n\t\tconst result = $array.getSortedIndex(dates, (x) => $order.compare(x, value));\r\n\t\tlet index = result.index;\r\n\r\n\t\tif (result.found) {\r\n\t\t\treturn index;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (index > 0) {\r\n\t\t\t\tindex -= 1;\r\n\t\t\t}\r\n\r\n\t\t\treturn index;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Converts a relative position to a corresponding numeric value from axis\r\n\t * scale.\r\n\t *\r\n\t * @param position Relative position\r\n\t * @return Value\r\n\t */\r\n\tpublic positionToValue(position: number): number {\r\n\t\tconst startLocation = this.get(\"startLocation\", 0);\r\n\t\tconst endLocation = this.get(\"endLocation\", 1);\r\n\t\tlet len = Math.round(this._dates.length - startLocation - (1 - endLocation));\r\n\t\tlet index = position * len;\r\n\t\tlet findex = Math.floor(index);\r\n\t\tif (findex < 0) {\r\n\t\t\tfindex = 0;\r\n\t\t}\r\n\r\n\t\tif (findex > len - 1) {\r\n\t\t\tfindex = len - 1\r\n\t\t}\r\n\r\n\t\treturn this._dates[findex] + (index - findex + startLocation) * this.baseDuration();\r\n\t}\r\n\r\n\tprotected _fixZoomFactor() {\r\n\t\tthis.setPrivateRaw(\"maxZoomFactor\", this._dates.length - this.get(\"startLocation\", 0) - (1 - this.get(\"endLocation\", 1)));\r\n\t}\r\n\r\n\tprotected _prepareAxisItems() {\r\n\t\tlet startTime = this.getPrivate(\"selectionMin\", 0);\r\n\t\tlet endTime = this.getPrivate(\"selectionMax\", 0);\r\n\r\n\t\tif ($type.isNumber(startTime) && $type.isNumber(endTime)) {\r\n\r\n\t\t\tif (this._seriesValuesDirty) {\r\n\t\t\t\tthis._seriesValuesDirty = false;\r\n\t\t\t\tthis._updateAllDates();\r\n\t\t\t}\r\n\r\n\t\t\tconst dates = this._dates;\r\n\t\t\tconst renderer = this.get(\"renderer\");\r\n\t\t\tconst len = dates.length;\r\n\r\n\t\t\tlet startIndex = this.valueToIndex(startTime);\r\n\t\t\tif (startIndex > 0) {\r\n\t\t\t\tstartIndex--;\r\n\t\t\t}\r\n\r\n\t\t\tlet endIndex = this.valueToIndex(endTime);\r\n\t\t\tif (endIndex < len - 1) {\r\n\t\t\t\tendIndex++;\r\n\t\t\t}\r\n\t\t\tlet maxCount = renderer.axisLength() / Math.max(renderer.get(\"minGridDistance\")!, 1 / Number.MAX_SAFE_INTEGER);\r\n\t\t\tlet frequency = Math.min(len, Math.ceil((endIndex - startIndex) / maxCount));\r\n\t\t\tfrequency = Math.max(1, frequency);\r\n\r\n\t\t\tstartIndex = Math.floor(startIndex / frequency) * frequency;\r\n\r\n\t\t\tthis._frequency = frequency;\r\n\r\n\t\t\tfor (let j = 0, length = this.dataItems.length; j < length; j++) {\r\n\t\t\t\tthis.dataItems[j].hide();\r\n\t\t\t}\r\n\r\n\t\t\tlet realDuration = (endTime - startTime) - ((endTime - startTime) / this.baseDuration() - (endIndex - startIndex)) * this.baseDuration();\r\n\r\n\t\t\t// if all items are on axis\r\n\t\t\tlet gridInterval = $time.chooseInterval(0, realDuration, maxCount, this.get(\"gridIntervals\")!);\r\n\r\n\t\t\tconst baseInterval = this.getPrivate(\"baseInterval\");\r\n\t\t\tlet intervalDuration = $time.getIntervalDuration(gridInterval);\r\n\r\n\t\t\tif (intervalDuration < this.baseDuration()) {\r\n\t\t\t\tgridInterval = { ...baseInterval };\r\n\t\t\t\tintervalDuration = $time.getIntervalDuration(gridInterval);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tthis._intervalDuration = intervalDuration;\r\n\r\n\t\t\tconst formats = this.get(\"dateFormats\")!;\r\n\r\n\t\t\tlet selectedItems: Array = [];\r\n\t\t\tlet firstDate = new Date();\r\n\t\t\tif (this._dates[0]) {\r\n\t\t\t\tfirstDate = new Date(this._dates[0]);\r\n\t\t\t}\r\n\r\n\t\t\tlet startDate = $time.round(new Date(this.getPrivate(\"min\", 0)), gridInterval.timeUnit, gridInterval.count, this._root.locale.firstDayOfWeek, this._root.utc, firstDate, this._root.timezone);\r\n\t\t\tlet value = $time.add(startDate, gridInterval.timeUnit, -1, this._root.utc, this._root.timezone).getTime();\r\n\r\n\t\t\tlet selectionMax = this.getPrivate(\"selectionMax\")\r\n\r\n\t\t\tlet previousPosition = -Infinity;\r\n\t\t\tlet minDifference = (this.get(\"end\", 1) - this.get(\"start\", 0)) / maxCount;\r\n\r\n\t\t\twhile (value <= selectionMax) {\r\n\t\t\t\tlet index = this.valueToIndex(value);\r\n\t\t\t\tlet realValue = this._dates[index];\r\n\r\n\t\t\t\tif (realValue < value) {\r\n\t\t\t\t\tfor (let i = index, len = this._dates.length; i < len; i++) {\r\n\t\t\t\t\t\tlet realValue = this._dates[i];\r\n\t\t\t\t\t\tif (realValue >= value) {\r\n\t\t\t\t\t\t\tindex = i;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet position = this.valueToPosition(realValue);\r\n\t\t\t\tif (position - previousPosition >= minDifference * 0.95) {\r\n\t\t\t\t\t$array.move(selectedItems, index);\r\n\t\t\t\t\tpreviousPosition = position;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet previousValue = value;\r\n\t\t\t\tvalue += $time.getDuration(gridInterval.timeUnit, gridInterval.count * this._getM(gridInterval.timeUnit));\r\n\t\t\t\tvalue = $time.round(new Date(value), gridInterval.timeUnit, gridInterval.count, this._root.locale.firstDayOfWeek, this._root.utc, undefined, this._root.timezone).getTime();\r\n\r\n\t\t\t\tif (value == previousValue) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (selectedItems.length > 0) {\r\n\t\t\t\tlet i = 0;\r\n\t\t\t\tlet previousValue = value - intervalDuration * 10;\r\n\t\t\t\tconst nextGridUnit = $time.getNextUnit(gridInterval.timeUnit);\r\n\r\n\t\t\t\t$array.each(selectedItems, (index) => {\r\n\t\t\t\t\tlet dataItem: DataItem;\r\n\t\t\t\t\tif (this.dataItems.length < i + 1) {\r\n\t\t\t\t\t\tdataItem = new DataItem(this, undefined, {});\r\n\t\t\t\t\t\tthis._dataItems.push(dataItem);\r\n\t\t\t\t\t\tthis.processDataItem(dataItem);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tdataItem = this.dataItems[i];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet value = dates[index];\r\n\t\t\t\t\tlet date = new Date(value);\r\n\r\n\t\t\t\t\tlet endValue = value;\r\n\t\t\t\t\tif (i < selectedItems.length - 1) {\r\n\t\t\t\t\t\tendValue = dates[selectedItems[i + 1]];\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tendValue += intervalDuration;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdataItem.setRaw(\"value\", value);\r\n\t\t\t\t\tdataItem.setRaw(\"endValue\", endValue);\r\n\t\t\t\t\tdataItem.setRaw(\"index\", i);\r\n\r\n\t\t\t\t\tif (index > startIndex - 100 && index < endIndex + 100) {\r\n\r\n\t\t\t\t\t\tlet format = formats[gridInterval.timeUnit];\r\n\r\n\t\t\t\t\t\tformat = formats[gridInterval.timeUnit];\r\n\t\t\t\t\t\tif (nextGridUnit && this.get(\"markUnitChange\") && $type.isNumber(previousValue)) {\r\n\t\t\t\t\t\t\tif (gridInterval.timeUnit != \"year\") {\r\n\t\t\t\t\t\t\t\tif ($time.checkChange(value, previousValue, nextGridUnit, this._root.utc, this._root.timezone)) {\r\n\t\t\t\t\t\t\t\t\tformat = this.get(\"periodChangeDateFormats\")![gridInterval.timeUnit];\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tthis._createAssets(dataItem, []);\r\n\r\n\t\t\t\t\t\tconst label = dataItem.get(\"label\");\r\n\t\t\t\t\t\tif (label) {\r\n\t\t\t\t\t\t\tlabel.set(\"text\", this._root.dateFormatter.format(date, format!));\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (dataItem.isHidden()) {\r\n\t\t\t\t\t\t\tdataItem.show();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis._prepareDataItem(dataItem, gridInterval.count);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tpreviousValue = value;\r\n\t\t\t\t})\r\n\t\t\t}\r\n\r\n\t\t\t$array.each(this.series, (series) => {\r\n\t\t\t\tif (series.inited) {\r\n\t\t\t\t\tseries._markDirtyAxes();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tthis._updateGhost();\r\n\t}\r\n}","import { Graphics, IGraphicsPrivate, IGraphicsSettings } from \"../../../core/render/Graphics\";\n\nexport interface IGridSettings extends IGraphicsSettings {\n\n\t/**\n\t * Relative location of the grid line within the cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Location_of_axis_elements} for more info\n\t */\n\tlocation?: number;\n\n}\n\nexport interface IGridPrivate extends IGraphicsPrivate {\n}\n\n/**\n * Creates an axis grid line.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Grid} for more info\n * @important\n */\nexport class Grid extends Graphics {\n\n\tdeclare public _settings: IGridSettings;\n\tdeclare public _privateSettings: IGridPrivate;\n\n\tpublic static className: string = \"Grid\";\n\tpublic static classNames: Array = Graphics.classNames.concat([Grid.className]);\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isPrivateDirty(\"width\") || this.isPrivateDirty(\"height\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\t}\n}\n","import type { AxisRenderer } from \"./AxisRenderer\";\nimport type { IXYSeriesDataItem, XYSeries } from \"../series/XYSeries\";\n\nimport { DataItem } from \"../../../core/render/Component\";\nimport { Axis, IAxisSettings, IAxisPrivate, IAxisDataItem, IAxisEvents } from \"./Axis\";\nimport { MultiDisposer } from \"../../../core/util/Disposer\";\n\nimport * as $type from \"../../../core/util/Type\";\nimport * as $array from \"../../../core/util/Array\";\nimport * as $math from \"../../../core/util/Math\";\nimport * as $utils from \"../../../core/util/Utils\";\n\nexport interface IValueAxisSettings extends IAxisSettings {\n\n\t/**\n\t * Override minimum value for the axis scale.\n\t *\n\t * NOTE: the axis might modify the minimum value to fit into its scale better,\n\t * unless `strictMinMax` is set to `true`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Custom_scope} for more info\n\t */\n\tmin?: number;\n\n\t/**\n\t * Override maximum value for the axis scale.\n\t *\n\t * NOTE: the axis might modify the maximum value to fit into its scale better,\n\t * unless `strictMinMax` is set to `true`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Custom_scope} for more info\n\t */\n\tmax?: number;\n\n\t/**\n\t * Force axis scale to be precisely at values as set in `min` and/or `max`.\n\t *\n\t * In case `min` and/or `max` is not set, the axis will fix its scale to\n\t * precise lowest and highest values available through all of the series\n\t * attached to it.\n\t *\n\t * This effectively locks the axis from auto-zooming itself when chart\n\t * is zoomed in.\n\t *\n\t * If you need to zoom to actual low/high values within currently visible\n\t * scope, use `strictMinMaxSelection` instead.\n\t *\n\t * Use `extraMin` and `extraMax` to add extra \"padding\".\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Custom_scope} for more info\n\t */\n\tstrictMinMax?: boolean;\n\n\t/**\n\t * Force axis to auto-zoom to exact lowest and highest values from attached\n\t * series' data items within ucurrently visible range.\n\t * \n\t * This is a good feature when your series is plotted from derivative values,\n\t * like `valueYChangeSelection` as it helps to avoid frequent jumping of\n\t * series to adjusted min and max of the axis.\n\t * \n\t * Use `extraMin` and `extraMax` to add extra \"padding\".\n\t *\n\t * @since 5.1.11\n\t */\n\tstrictMinMaxSelection?: boolean;\n\n\t/**\n\t * If set to `true` axis will use logarithmic scale.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Logarithmic_scale} for more info\n\t */\n\tlogarithmic?: boolean;\n\n\t/**\n\t * Treat zero values as some other value.\n\t *\n\t * Useful in situations where zero would result in error, i.e. logarithmic\n\t * scale.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Logarithmic_scale} for more info\n\t */\n\ttreatZeroAs?: number;\n\n\t/**\n\t * Relative extension to the automatically-calculated minimum value of the\n\t * axis scale.\n\t *\n\t * E..g. `0.1` will extend the scale by 10%, so if max value is `1000` and\n\t * minimum value is `0`, the new minimum value will be `-100`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Relative_scope_extension} for more info\n\t */\n\textraMin?: number;\n\n\t/**\n\t * Relative extension to the automatically-calculated maximum value of the\n\t * axis scale.\n\t *\n\t * E..g. `0.1` will extend the scale by 10%, so if max value is `1000`, the\n\t * axis will now show maximum value of `1100`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Relative_scope_extension} for more info\n\t */\n\textraMax?: number;\n\n\t/**\n\t * Base value, which indicates the threshold between \"positive\" and \"negative\"\n\t * values.\n\t *\n\t * @default 0\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Base_value} for more info\n\t */\n\tbaseValue?: number;\n\n\t/**\n\t * Maximum number of decimals to allow in axis labels.\n\t *\n\t * This setting not only affects formatting of the labels, but also where and\n\t * how many grid/labels are placed on the axis.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Label_format} for more info\n\t */\n\tmaxPrecision?: number;\n\n\t/**\n\t * A function that can be used to specify how to configure axis fills.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Axis_fills} for more info\n\t */\n\tfillRule?: (dataItem: DataItem) => void;\n\n\t/**\n\t * Number format to use for axis labels.\n\t *\n\t * If not set, will use format set in global number formatter.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Label_format} for more info\n\t */\n\tnumberFormat?: string;\n\n\t/**\n\t * A numeric format used for numbers displayed in axis tooltip.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Tooltip_number_format} for more info\n\t */\n\ttooltipNumberFormat?: string | Intl.NumberFormatOptions;\n\n\t/**\n\t * If set, will use greater precision for the axis fooltip than the one for\n\t * axis' actual labels.\n\t *\n\t * E.g. if axis displays labels with one decimal (`1.0`, `1.1`, `1.2`) setting\n\t * this setting to `1` would allow two decimals in axis tooltip, e.g. `1.15`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Tooltip_number_format} for more info\n\t */\n\textraTooltipPrecision?: number;\n\n\t/**\n\t * If your series relies on dynamically calculated values, like value\n\t * changes, percents, or total sums, set this to `true`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Calculated_values} for more info\n\t */\n\tcalculateTotals?: boolean;\n\n\t/**\n\t * This setting can be set to an instance of another [[ValueAxis]].\n\t *\n\t * If set the grid of this axis will be synced with grid of the target axis.\n\t *\n\t * NOTE: this is not 100% guaranteed to work. In some rare cases perfect\n\t * sync might not be possible.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/#Syncing_grid} for more info\n\t */\n\tsyncWithAxis?: ValueAxis;\n\n\t/**\n\t * If set to `false`, the axis won't be auto-zoomed to a selection (this\n\t * works only if the other axis is a `DateAxis` or a `CategoryAxis`).\n\t * \n\t * IMPORTANT: This setting will be ignored if both X and Y axes are\n\t * a `ValueAxis`.\n\t *\n\t * @since 5.2.20\n\t * @default true\n\t */\n\tautoZoom?: boolean;\n\n}\n\nexport interface IValueAxisDataItem extends IAxisDataItem {\n\n\t/**\n\t * Value of the data item.\n\t */\n\tvalue?: number;\n\n\t/**\n\t * End value for axis items that span multiple values, like axis ranges.\n\t */\n\tendValue?: number;\n\n\t/**\n\t * If set to `true` the values fo this data item will be factored in when\n\t * calculating scale of the [[ValueAxis]]. Useful for axis ranges.\n\t * \n\t * @since 5.1.4\n\t */\n\taffectsMinMax?: boolean;\n\n}\n\nexport interface IMinMaxStep {\n\tmin: number;\n\tmax: number;\n\tstep: number;\n}\n\nexport interface IValueAxisPrivate extends IAxisPrivate {\n\n\t/**\n\t * Calculated current minimum value of the axis scale.\n\t * \n\t * @readonly\n\t */\n\tmin?: number;\n\n\t/**\n\t * Calculated current maximum value of the axis scale.\n\t * \n\t * @readonly\n\t */\n\tmax?: number;\n\n\t/**\n\t * A minimum value of the axis scale.\n\t *\n\t * Can be useful in cases where axis zoom is currently being animated, and\n\t * `min` is reflecting current intermediate value, whereas `minFinal` will\n\t * show target value.\n\t * \n\t * @readonly\n\t */\n\tminFinal?: number;\n\n\t/**\n\t * A maximum value of the axis scale.\n\t *\n\t * Can be useful in cases where axis zoom is currently being animated, and\n\t * `max` is reflecting current intermediate value, whereas `maxFinal` will\n\t * show target value.\n\t * \n\t * @readonly\n\t */\n\tmaxFinal?: number;\n\n\t/**\n\t * Calculated minimum value of the currently viewable (zoomed) scope.\n\t * \n\t * @readonly\n\t */\n\tselectionMin?: number;\n\n\t/**\n\t * Calculated maximum value of the currently viewable (zoomed) scope.\n\t * \n\t * @readonly\n\t */\n\tselectionMax?: number;\n\n\t/**\n\t * A target minimum value of the viewable value scope.\n\t *\n\t * Can be useful in cases where axis zoom is currently being animated, and\n\t * `selectionMin` is reflecting current intermediate value,\n\t * whereas `selectionMinFinal` will show target value.\n\t * \n\t * @readonly\n\t */\n\tselectionMinFinal?: number;\n\n\t/**\n\t * A target maximum value of the viewable value scope.\n\t *\n\t * Can be useful in cases where axis zoom is currently being animated, and\n\t * `selectionMax` is reflecting current intermediate value,\n\t * whereas `selectionMaxFinal` will show target value.\n\t * \n\t * @readonly\n\t */\n\tselectionMaxFinal?: number;\n\n\t/**\n\t * When selection step changes, it might change during axis zoom animation.\n\t *\n\t * `selectionStepFinal` will show what step will be when animation is\n\t * finished.\n\t * \n\t * @readonly\n\t */\n\tselectionStepFinal?: number;\n\n\t/**\n\t * Value step between grid lines.\n\t * \n\t * @readonly\n\t */\n\tstep?: number;\n\n\t/**\n\t * Decimal places used when formatting axis labels.\n\t * \n\t * @readonly\n\t */\n\tstepDecimalPlaces?: number;\n\n}\n\nexport interface IValueAxisEvents extends IAxisEvents {\n\n}\n\n/**\n * Creates a value axis.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/value-axis/} for more info\n * @important\n */\nexport class ValueAxis extends Axis {\n\tpublic static className: string = \"ValueAxis\";\n\tpublic static classNames: Array = Axis.classNames.concat([ValueAxis.className]);\n\n\tdeclare public _settings: IValueAxisSettings;\n\tdeclare public _privateSettings: IValueAxisPrivate;\n\tdeclare public _dataItemSettings: IValueAxisDataItem;\n\tdeclare public _events: IValueAxisEvents;\n\n\tprotected _dirtyExtremes: boolean = false;\n\tprotected _dirtySelectionExtremes: boolean = false;\n\tprotected _deltaMinMax: number = 1;\n\tprotected _minReal: number | undefined;\n\tprotected _maxReal: number | undefined;\n\n\tprotected _baseValue: number = 0;\n\tprotected _syncDp?: MultiDisposer;\n\tprotected _minLogAdjusted: number = 1;\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtyExtremes() {\n\t\tthis._dirtyExtremes = true;\n\t\tthis.markDirty();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirtySelectionExtremes() {\n\t\tthis._dirtySelectionExtremes = true;\n\t\tthis.markDirty();\n\t}\n\n\tprotected _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"axis\"]);\n\t\tthis.setPrivateRaw(\"name\", \"value\");\n\t\tthis.addTag(\"value\");\n\t\tsuper._afterNew();\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tif (this.isDirty(\"syncWithAxis\")) {\n\t\t\tlet previousValue = this._prevSettings.syncWithAxis;\n\t\t\tif (previousValue) {\n\t\t\t\tif (this._syncDp) {\n\t\t\t\t\tthis._syncDp.dispose();\n\t\t\t\t}\n\t\t\t}\n\t\t\tlet syncWithAxis = this.get(\"syncWithAxis\");\n\t\t\tif (syncWithAxis) {\n\t\t\t\tthis._syncDp = new MultiDisposer([\n\t\t\t\t\tsyncWithAxis.onPrivate(\"selectionMinFinal\", () => {\n\t\t\t\t\t\tthis._dirtySelectionExtremes = true;\n\t\t\t\t\t}),\n\t\t\t\t\tsyncWithAxis.onPrivate(\"selectionMaxFinal\", () => {\n\t\t\t\t\t\tthis._dirtySelectionExtremes = true;\n\t\t\t\t\t})\n\t\t\t\t])\n\t\t\t}\n\t\t}\n\n\t\t//if (this._dirtyExtremes || this.isPrivateDirty(\"width\") || this.isPrivateDirty(\"height\") || this.isDirty(\"min\") || this.isDirty(\"max\") || this.isDirty(\"extraMin\") || this.isDirty(\"extraMax\") || this.isDirty(\"logarithmic\") || this.isDirty(\"treatZeroAs\") || this.isDirty(\"baseValue\") || this.isDirty(\"strictMinMax\") || this.isDirty(\"maxPrecision\")) {\n\t\tif (this._sizeDirty || this._dirtyExtremes || this._valuesDirty || this.isPrivateDirty(\"width\") || this.isPrivateDirty(\"height\") || this.isDirty(\"min\") || this.isDirty(\"max\") || this.isDirty(\"extraMin\") || this.isDirty(\"extraMax\") || this.isDirty(\"logarithmic\") || this.isDirty(\"treatZeroAs\") || this.isDirty(\"baseValue\") || this.isDirty(\"strictMinMax\") || this.isDirty(\"strictMinMaxSelection\") || this.isDirty(\"maxPrecision\") || this.isDirty(\"numberFormat\")) {\n\t\t\tthis._getMinMax();\n\t\t\tthis.ghostLabel.set(\"text\", \"\");\n\t\t\tthis._dirtyExtremes = false;\n\t\t}\n\n\t\tif (this._dirtySelectionExtremes && !this._isPanning && this.get(\"autoZoom\", true)) {\n\t\t\tthis._getSelectionMinMax();\n\t\t\tthis._dirtySelectionExtremes = false;\n\t\t}\n\n\t\tthis._groupData();\n\n\t\tif (this._sizeDirty || this._valuesDirty || this.isDirty(\"start\") || this.isDirty(\"end\") || this.isPrivateDirty(\"min\") || this.isPrivateDirty(\"selectionMax\") || this.isPrivateDirty(\"selectionMin\") || this.isPrivateDirty(\"max\") || this.isPrivateDirty(\"step\") || this.isPrivateDirty(\"width\") || this.isPrivateDirty(\"height\") || this.isDirty(\"logarithmic\")) {\n\t\t\tthis._handleRangeChange();\n\t\t\tthis._prepareAxisItems();\n\t\t\tthis._updateAxisRanges();\n\t\t}\n\n\t\tthis._baseValue = this.baseValue();\n\n\t}\n\n\tprotected _groupData() {\n\n\t}\n\n\tprotected _formatText(value: number) {\n\t\tconst numberFormat = this.get(\"numberFormat\");\n\t\tconst formatter = this.getNumberFormatter();\n\n\t\tlet text = \"\";\n\n\t\tif (numberFormat) {\n\t\t\ttext = formatter.format(value, numberFormat);\n\t\t}\n\t\telse {\n\t\t\ttext = formatter.format(value, undefined, this.getPrivate(\"stepDecimalPlaces\"));\n\t\t}\n\t\treturn text;\n\t}\n\n\tprotected _prepareAxisItems() {\n\t\tconst min = this.getPrivate(\"min\");\n\t\tconst max = this.getPrivate(\"max\");\n\n\t\tif ($type.isNumber(min) && $type.isNumber(max)) {\n\n\t\t\tconst logarithmic = this.get(\"logarithmic\");\n\t\t\tconst step = this.getPrivate(\"step\")!;\n\t\t\tconst selectionMin = this.getPrivate(\"selectionMin\")!;\n\t\t\tconst selectionMax = this.getPrivate(\"selectionMax\")! + step;\n\n\t\t\tlet value = selectionMin - step;\n\t\t\tlet i = 0;\n\t\t\tlet differencePower = 1;\n\t\t\tlet minLog = min;\n\n\t\t\tif (logarithmic) {\n\t\t\t\tvalue = this._minLogAdjusted;\n\n\t\t\t\tif (value < selectionMin) {\n\t\t\t\t\twhile (value < selectionMin) {\n\t\t\t\t\t\tvalue += step;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tminLog = value;\n\n\t\t\t\tif (minLog <= 0) {\n\t\t\t\t\tminLog = 1;\n\t\t\t\t\tif (step < 1) {\n\t\t\t\t\t\tminLog = step;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdifferencePower = Math.log(selectionMax - step) * Math.LOG10E - Math.log(minLog) * Math.LOG10E;\n\n\t\t\t\tif (differencePower > 2) {\n\t\t\t\t\tvalue = Math.pow(10, Math.log(minLog) * Math.LOG10E - 5);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet previous = -Infinity;\n\t\t\twhile (value < selectionMax) {\n\t\t\t\tlet dataItem: DataItem;\n\t\t\t\tif (this.dataItems.length < i + 1) {\n\t\t\t\t\tdataItem = new DataItem(this, undefined, {});\n\t\t\t\t\tthis._dataItems.push(dataItem);\n\t\t\t\t\tthis.processDataItem(dataItem);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdataItem = this.dataItems[i];\n\t\t\t\t}\n\n\t\t\t\tthis._createAssets(dataItem, []);\n\n\t\t\t\tif (dataItem.isHidden()) {\n\t\t\t\t\tdataItem.show();\n\t\t\t\t}\n\n\t\t\t\tdataItem.setRaw(\"value\", value);\n\n\t\t\t\tconst label = dataItem.get(\"label\");\n\t\t\t\tif (label) {\n\t\t\t\t\tlabel.set(\"text\", this._formatText(value));\n\t\t\t\t}\n\n\t\t\t\tthis._prepareDataItem(dataItem);\n\n\t\t\t\tif (!logarithmic) {\n\t\t\t\t\tvalue += step;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (differencePower > 2) {\n\t\t\t\t\t\tvalue = Math.pow(10, Math.log(minLog) * Math.LOG10E + i - 5);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvalue += step;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (previous == value) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tlet stepPower = Math.pow(10, Math.floor(Math.log(Math.abs(step)) * Math.LOG10E));\n\t\t\t\tif (stepPower < 1) {\n\t\t\t\t\t// exponent is less then 1 too. Count decimals of exponent\n\t\t\t\t\tlet decCount = Math.round(Math.abs(Math.log(Math.abs(stepPower)) * Math.LOG10E)) + 2;\n\t\t\t\t\t// round value to avoid floating point issues\n\t\t\t\t\tvalue = $math.round(value, decCount);\n\t\t\t\t}\n\t\t\t\ti++;\n\n\t\t\t\tprevious = value;\n\t\t\t}\n\n\t\t\tfor (let j = i; j < this.dataItems.length; j++) {\n\t\t\t\tthis.dataItems[j].hide();\n\t\t\t}\n\n\t\t\t$array.each(this.series, (series) => {\n\t\t\t\tif (series.inited) {\n\t\t\t\t\tseries._markDirtyAxes();\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tthis._updateGhost();\n\t\t}\n\t}\n\n\n\tpublic _prepareDataItem(dataItem: DataItem, count?: number) {\n\t\tlet renderer = this.get(\"renderer\");\n\t\tlet value = dataItem.get(\"value\")!;\n\t\tlet endValue = dataItem.get(\"endValue\");\n\n\t\tlet position = this.valueToPosition(value);\n\n\t\tlet endPosition = position;\n\t\tlet fillEndPosition = this.valueToPosition(value + this.getPrivate(\"step\")!);\n\n\t\tif ($type.isNumber(endValue)) {\n\t\t\tendPosition = this.valueToPosition(endValue);\n\t\t\tfillEndPosition = endPosition;\n\t\t}\n\n\t\tif (dataItem.get(\"isRange\")) {\n\t\t\tif (endValue == null) {\n\t\t\t\tfillEndPosition = position;\n\t\t\t}\n\t\t}\n\n\t\trenderer.updateLabel(dataItem.get(\"label\"), position, endPosition, count);\n\n\t\tconst grid = dataItem.get(\"grid\");\n\t\trenderer.updateGrid(grid, position, endPosition);\n\t\tif (grid) {\n\t\t\tif (value == this.get(\"baseValue\", 0)) {\n\t\t\t\tgrid.addTag(\"base\");\n\t\t\t\tgrid._applyThemes();\n\t\t\t}\n\t\t\telse if (grid.hasTag(\"base\")) {\n\t\t\t\tgrid.removeTag(\"base\");\n\t\t\t\tgrid._applyThemes();\n\t\t\t}\n\t\t}\n\n\t\trenderer.updateTick(dataItem.get(\"tick\"), position, endPosition, count);\n\t\trenderer.updateFill(dataItem.get(\"axisFill\"), position, fillEndPosition);\n\n\t\tthis._processBullet(dataItem);\n\t\trenderer.updateBullet(dataItem.get(\"bullet\"), position, endPosition);\n\n\t\tif (!dataItem.get(\"isRange\")) {\n\t\t\tconst fillRule = this.get(\"fillRule\");\n\t\t\tif (fillRule) {\n\t\t\t\tfillRule(dataItem)\n\t\t\t}\n\t\t}\n\t}\n\n\n\tprotected _handleRangeChange() {\n\t\tlet selectionMin: number = this.positionToValue(this.get(\"start\", 0));\n\t\tlet selectionMax: number = this.positionToValue(this.get(\"end\", 1));\n\n\t\tconst gridCount = this.get(\"renderer\").gridCount();\n\t\tlet minMaxStep: IMinMaxStep = this._adjustMinMax(selectionMin, selectionMax, gridCount, true);\n\n\t\tlet stepDecimalPlaces = $utils.decimalPlaces(minMaxStep.step);\n\t\tthis.setPrivateRaw(\"stepDecimalPlaces\", stepDecimalPlaces);\n\n\t\tselectionMin = $math.round(selectionMin, stepDecimalPlaces);\n\t\tselectionMax = $math.round(selectionMax, stepDecimalPlaces);\n\n\t\tminMaxStep = this._adjustMinMax(selectionMin, selectionMax, gridCount, true);\n\n\t\tlet step = minMaxStep.step;\n\t\tselectionMin = minMaxStep.min;\n\t\tselectionMax = minMaxStep.max;\n\n\t\tif (this.getPrivate(\"selectionMin\") !== selectionMin || this.getPrivate(\"selectionMax\") !== selectionMax || this.getPrivate(\"step\") !== step) {\n\t\t\t// do not change to setPrivate, will cause SO\n\t\t\tthis.setPrivateRaw(\"selectionMin\", selectionMin);\n\t\t\tthis.setPrivateRaw(\"selectionMax\", selectionMax);\n\n\t\t\tthis.setPrivateRaw(\"step\", step);\n\t\t}\n\t}\n\n\t/**\n\t * Converts a relative position to a corresponding numeric value from axis\n\t * scale.\n\t *\n\t * @param position Relative position\n\t * @return Value\n\t */\n\tpublic positionToValue(position: number): number {\n\t\tconst min = this.getPrivate(\"min\")!;\n\t\tconst max = this.getPrivate(\"max\")!;\n\n\t\tif (!this.get(\"logarithmic\")) {\n\t\t\treturn position * (max - min) + min;\n\t\t}\n\t\telse {\n\t\t\treturn Math.pow(Math.E, (position * ((Math.log(max) * Math.LOG10E - Math.log(min) * Math.LOG10E)) + Math.log(min) * Math.LOG10E) / Math.LOG10E);\n\t\t}\n\t}\n\n\t/**\n\t * Convers value to a relative position on axis.\n\t *\n\t * @param value Value\n\t * @return Relative position\n\t */\n\tpublic valueToPosition(value: number): number {\n\n\t\tconst min = this.getPrivate(\"min\")!;\n\t\tconst max = this.getPrivate(\"max\")!;\n\n\t\tif (!this.get(\"logarithmic\")) {\n\t\t\treturn (value - min) / (max - min);\n\t\t}\n\t\telse {\n\t\t\tif (value <= 0) {\n\t\t\t\tlet treatZeroAs = this.get(\"treatZeroAs\");\n\t\t\t\tif ($type.isNumber(treatZeroAs)) {\n\t\t\t\t\tvalue = treatZeroAs;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn (Math.log(value) * Math.LOG10E - Math.log(min) * Math.LOG10E) / ((Math.log(max) * Math.LOG10E - Math.log(min) * Math.LOG10E));\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic valueToFinalPosition(value: number): number {\n\n\t\tconst min = this.getPrivate(\"minFinal\")!;\n\t\tconst max = this.getPrivate(\"maxFinal\")!;\n\n\t\tif (!this.get(\"logarithmic\")) {\n\t\t\treturn (value - min) / (max - min);\n\t\t}\n\t\telse {\n\t\t\tif (value <= 0) {\n\t\t\t\tlet treatZeroAs = this.get(\"treatZeroAs\");\n\t\t\t\tif ($type.isNumber(treatZeroAs)) {\n\t\t\t\t\tvalue = treatZeroAs;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn (Math.log(value) * Math.LOG10E - Math.log(min) * Math.LOG10E) / ((Math.log(max) * Math.LOG10E - Math.log(min) * Math.LOG10E));\n\t\t}\n\t}\n\n\t/**\n\t * Returns X coordinate in pixels corresponding to specific value.\n\t *\n\t * @param value Numeric value\n\t * @param location Location\n\t * @param baseValue Base value\n\t * @return X coordinate\n\t */\n\tpublic getX(value: number, location: number, baseValue: number) {\n\t\tvalue = baseValue + (value - baseValue) * location;\n\n\t\tconst position = this.valueToPosition(value);\n\t\treturn this._settings.renderer.positionToCoordinate(position);\n\t}\n\n\t/**\n\t * Returns X coordinate in pixels corresponding to specific value.\n\t *\n\t * @param value Numeric value\n\t * @param location Location\n\t * @param baseValue Base value\n\t * @return X coordinate\n\t */\n\tpublic getY(value: number, location: number, baseValue: number) {\n\t\tvalue = baseValue + (value - baseValue) * location;\n\n\t\tconst position = this.valueToPosition(value)\n\t\treturn this._settings.renderer.positionToCoordinate(position);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemCoordinateX(dataItem: DataItem, field: string, _cellLocation: number, axisLocation: number): number {\n\t\treturn this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(dataItem, field, _cellLocation, axisLocation));\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemPositionX(dataItem: DataItem, field: string, _cellLocation: number, axisLocation: number) {\n\t\tlet value = dataItem.get(field as any);\n\n\t\tconst stackToItem = dataItem.get(\"stackToItemX\");\n\t\tif (stackToItem) {\n\t\t\tconst series = dataItem.component as XYSeries;\n\t\t\tvalue = value * axisLocation + series.getStackedXValueWorking(dataItem, field);\n\t\t}\n\t\telse {\n\t\t\tvalue = this._baseValue + (value - this._baseValue) * axisLocation;\n\t\t}\n\n\t\treturn this.valueToPosition(value);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemCoordinateY(dataItem: DataItem, field: string, _cellLocation: number, axisLocation: number): number {\n\t\treturn this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(dataItem, field, _cellLocation, axisLocation));\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemPositionY(dataItem: DataItem, field: string, _cellLocation: number, axisLocation: number): number {\n\t\tlet value = dataItem.get(field as any);\n\n\t\tconst stackToItem = dataItem.get(\"stackToItemY\");\n\t\tif (stackToItem) {\n\t\t\tconst series = dataItem.component as XYSeries;\n\t\t\tvalue = value * axisLocation + series.getStackedYValueWorking(dataItem, field);\n\t\t}\n\t\telse {\n\t\t\tvalue = this._baseValue + (value - this._baseValue) * axisLocation;\n\t\t}\n\n\t\treturn this.valueToPosition(value);\n\t}\n\n\t/**\n\t * Returns relative position of axis' `baseValue`.\n\t *\n\t * @return Base value position\n\t */\n\tpublic basePosition(): number {\n\t\treturn this.valueToPosition(this.baseValue());\n\t}\n\n\t/**\n\t * Base value of the [[ValueAxis]], which determines positive and negative\n\t * values.\n\t *\n\t * @return Base value\n\t */\n\tpublic baseValue(): number {\n\t\tconst min = Math.min(this.getPrivate(\"minFinal\", -Infinity), this.getPrivate(\"selectionMin\", -Infinity));\n\t\tconst max = Math.max(this.getPrivate(\"maxFinal\", Infinity), this.getPrivate(\"selectionMax\", Infinity));\n\t\tlet baseValue = this.get(\"baseValue\", 0);\n\n\t\tif (baseValue < min) {\n\t\t\tbaseValue = min;\n\t\t}\n\n\t\tif (baseValue > max) {\n\t\t\tbaseValue = max\n\t\t}\n\n\t\treturn baseValue;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic cellEndValue(value: number): number {\n\t\treturn value;\n\t}\n\n\tprotected fixSmallStep(step: number): number {\n\t\t// happens because of floating point error\n\t\tif (1 + step === 1) {\n\t\t\tstep *= 2;\n\t\t\treturn this.fixSmallStep(step);\n\t\t}\n\t\treturn step;\n\t}\n\n\tprotected _fixMin(min: number) {\n\t\treturn min;\n\t}\n\n\tprotected _fixMax(max: number) {\n\t\treturn max;\n\t}\n\n\tpublic _calculateTotals() {\n\t\tif (this.get(\"calculateTotals\")) {\n\t\t\tlet series = this.series[0];\n\t\t\tif (series) {\n\t\t\t\tlet startIndex = series.startIndex();\n\n\t\t\t\tif (series.dataItems.length > 0) {\n\n\t\t\t\t\tif (startIndex > 0) {\n\t\t\t\t\t\tstartIndex--;\n\t\t\t\t\t}\n\t\t\t\t\tlet endIndex = series.endIndex();\n\t\t\t\t\tif (endIndex < series.dataItems.length) {\n\t\t\t\t\t\tendIndex++;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet field: string | undefined;\n\t\t\t\t\tlet vc: string | undefined;\n\n\t\t\t\t\tif (series.get(\"yAxis\") == this) {\n\t\t\t\t\t\tfield = \"valueY\";\n\t\t\t\t\t\tvc = \"vcy\";\n\t\t\t\t\t}\n\t\t\t\t\telse if (series.get(\"xAxis\") == this) {\n\t\t\t\t\t\tfield = \"valueX\";\n\t\t\t\t\t\tvc = \"vcx\";\n\t\t\t\t\t}\n\n\t\t\t\t\tlet fieldWorking = field + \"Working\";\n\n\t\t\t\t\tif (field) {\n\t\t\t\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\t\t\t\tlet sum = 0;\n\t\t\t\t\t\t\tlet total = 0;\n\n\t\t\t\t\t\t\t$array.each(this.series, (series) => {\n\t\t\t\t\t\t\t\tif (!series.get(\"excludeFromTotal\")) {\n\t\t\t\t\t\t\t\t\tlet dataItem = series.dataItems[i];\n\t\t\t\t\t\t\t\t\tif (dataItem) {\n\t\t\t\t\t\t\t\t\t\tlet value = dataItem.get(fieldWorking as any) * series.get(vc as any);\n\n\t\t\t\t\t\t\t\t\t\tif (!$type.isNaN(value)) {\n\t\t\t\t\t\t\t\t\t\t\tsum += value;\n\t\t\t\t\t\t\t\t\t\t\ttotal += Math.abs(value);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t$array.each(this.series, (series) => {\n\t\t\t\t\t\t\t\tif (!series.get(\"excludeFromTotal\")) {\n\t\t\t\t\t\t\t\t\tlet dataItem = series.dataItems[i];\n\t\t\t\t\t\t\t\t\tif (dataItem) {\n\t\t\t\t\t\t\t\t\t\tlet value = dataItem.get(fieldWorking as any) * series.get(vc as any);\n\n\t\t\t\t\t\t\t\t\t\tif (!$type.isNaN(value)) {\n\t\t\t\t\t\t\t\t\t\t\tdataItem.set((field + \"Total\") as any, total);\n\t\t\t\t\t\t\t\t\t\t\tdataItem.set((field + \"Sum\") as any, sum);\n\t\t\t\t\t\t\t\t\t\t\tdataItem.set((field + \"TotalPercent\") as any, value / total * 100);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _getSelectionMinMax() {\n\t\tconst min = this.getPrivate(\"minFinal\");\n\t\tconst max = this.getPrivate(\"maxFinal\");\n\n\t\tconst minDefined = this.get(\"min\");\n\t\tconst maxDefined = this.get(\"max\");\n\n\t\tlet extraMin = this.get(\"extraMin\", 0);\n\t\tlet extraMax = this.get(\"extraMax\", 0);\n\n\t\tif (this.get(\"logarithmic\")) {\n\t\t\tif (this.get(\"extraMin\") == null) {\n\t\t\t\textraMin = 0.1;\n\t\t\t}\n\t\t\tif (this.get(\"extraMax\") == null) {\n\t\t\t\textraMax = 0.2;\n\t\t\t}\n\t\t}\n\n\t\tconst gridCount = this.get(\"renderer\").gridCount();\n\t\tconst selectionStrictMinMax = this.get(\"strictMinMaxSelection\");\n\t\tconst strictMinMax = this.get(\"strictMinMax\");\n\n\t\tif ($type.isNumber(min) && $type.isNumber(max)) {\n\t\t\tlet selectionMin = max;\n\t\t\tlet selectionMax = min;\n\n\t\t\t$array.each(this.series, (series) => {\n\t\t\t\tif (!series.get(\"ignoreMinMax\")) {\n\t\t\t\t\tlet seriesMin: number | undefined;\n\t\t\t\t\tlet seriesMax: number | undefined;\n\t\t\t\t\tconst outOfSelection = series.getPrivate(\"outOfSelection\");\n\t\t\t\t\tif (series.get(\"xAxis\") === this) {\n\t\t\t\t\t\tif (!outOfSelection) {\n\t\t\t\t\t\t\tseriesMin = series.getPrivate(\"selectionMinX\", series.getPrivate(\"minX\"));\n\t\t\t\t\t\t\tseriesMax = series.getPrivate(\"selectionMaxX\", series.getPrivate(\"maxX\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (series.get(\"yAxis\") === this) {\n\t\t\t\t\t\tif (!outOfSelection) {\n\t\t\t\t\t\t\tseriesMin = series.getPrivate(\"selectionMinY\", series.getPrivate(\"minY\"));\n\t\t\t\t\t\t\tseriesMax = series.getPrivate(\"selectionMaxY\", series.getPrivate(\"maxY\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!series.isHidden() && !series.isShowing()) {\n\t\t\t\t\t\tif ($type.isNumber(seriesMin)) {\n\t\t\t\t\t\t\tselectionMin = Math.min(selectionMin, seriesMin);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($type.isNumber(seriesMax)) {\n\t\t\t\t\t\t\tselectionMax = Math.max(selectionMax, seriesMax);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tthis.axisRanges.each((range) => {\n\t\t\t\tif (range.get(\"affectsMinMax\")) {\n\t\t\t\t\tlet value = range.get(\"value\");\n\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\tselectionMin = Math.min(selectionMin, value);\n\t\t\t\t\t\tselectionMax = Math.max(selectionMax, value);\n\t\t\t\t\t}\n\t\t\t\t\tvalue = range.get(\"endValue\");\n\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\tselectionMin = Math.min(selectionMin, value);\n\t\t\t\t\t\tselectionMax = Math.max(selectionMax, value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (selectionMin > selectionMax) {\n\t\t\t\t[selectionMin, selectionMax] = [selectionMax, selectionMin]\n\t\t\t}\n\n\t\t\tif ($type.isNumber(minDefined)) {\n\t\t\t\tif (strictMinMax) {\n\t\t\t\t\tselectionMin = minDefined;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tselectionMin = min;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (strictMinMax) {\n\t\t\t\tif ($type.isNumber(this._minReal)) {\n\t\t\t\t\tselectionMin = this._minReal;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($type.isNumber(maxDefined)) {\n\t\t\t\tif (strictMinMax) {\n\t\t\t\t\tselectionMax = maxDefined;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tselectionMax = max;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (strictMinMax) {\n\t\t\t\tif ($type.isNumber(this._maxReal)) {\n\t\t\t\t\tselectionMax = this._maxReal;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (selectionMin === selectionMax) {\n\t\t\t\tselectionMin -= this._deltaMinMax;\n\t\t\t\tselectionMax += this._deltaMinMax;\n\n\t\t\t\tlet minMaxStep2 = this._adjustMinMax(selectionMin, selectionMax, gridCount, strictMinMax);\n\t\t\t\tselectionMin = minMaxStep2.min;\n\t\t\t\tselectionMax = minMaxStep2.max;\n\t\t\t}\n\n\t\t\tlet selectionMinReal = selectionMin;\n\t\t\tlet selectionMaxReal = selectionMax;\n\n\t\t\tselectionMin -= (selectionMax - selectionMin) * extraMin;\n\t\t\tselectionMax += (selectionMax - selectionMin) * extraMax;\n\n\t\t\tlet minMaxStep: IMinMaxStep = this._adjustMinMax(selectionMin, selectionMax, gridCount);\n\n\t\t\tselectionMin = minMaxStep.min;\n\t\t\tselectionMax = minMaxStep.max;\n\n\t\t\tselectionMin = $math.fitToRange(selectionMin, min, max);\n\t\t\tselectionMax = $math.fitToRange(selectionMax, min, max);\n\n\t\t\t// do it for the second time !important\t\t\t\n\t\t\tminMaxStep = this._adjustMinMax(selectionMin, selectionMax, gridCount, true);\n\n\t\t\tif (!strictMinMax) {\n\t\t\t\tselectionMin = minMaxStep.min;\n\t\t\t\tselectionMax = minMaxStep.max;\n\t\t\t}\n\n\t\t\tconst syncWithAxis = this.get(\"syncWithAxis\");\n\t\t\tif (syncWithAxis) {\n\t\t\t\tminMaxStep = this._syncAxes(selectionMin, selectionMax, minMaxStep.step, syncWithAxis.getPrivate(\"selectionMinFinal\", syncWithAxis.getPrivate(\"minFinal\", 0)), syncWithAxis.getPrivate(\"selectionMaxFinal\", syncWithAxis.getPrivate(\"maxFinal\", 1)), syncWithAxis.getPrivate(\"selectionStepFinal\", syncWithAxis.getPrivate(\"step\", 1)));\n\n\t\t\t\tselectionMin = minMaxStep.min;\n\t\t\t\tselectionMax = minMaxStep.max;\n\t\t\t}\n\n\t\t\tif (strictMinMax) {\n\t\t\t\tif ($type.isNumber(minDefined)) {\n\t\t\t\t\tselectionMin = Math.max(selectionMin, minDefined);\n\t\t\t\t}\n\n\t\t\t\tif ($type.isNumber(maxDefined)) {\n\t\t\t\t\tselectionMax = Math.min(selectionMax, maxDefined);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (selectionStrictMinMax) {\n\t\t\t\tselectionMin = selectionMinReal - (selectionMax - selectionMin) * extraMin;\n\t\t\t\tselectionMax = selectionMaxReal + (selectionMax - selectionMin) * extraMax;\n\t\t\t}\n\n\t\t\tif (this.get(\"logarithmic\")) {\n\n\t\t\t\tif (selectionMin <= 0) {\n\t\t\t\t\tselectionMin = selectionMinReal * (1 - Math.min(extraMin, 0.99));\n\t\t\t\t}\n\n\t\t\t\tif (selectionMin < min) {\n\t\t\t\t\tselectionMin = min;\n\t\t\t\t}\n\t\t\t\tif (selectionMax > max) {\n\t\t\t\t\tselectionMax = max;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet len = Math.min(20, Math.ceil(Math.log(this.getPrivate(\"maxZoomFactor\", 100) + 1) / Math.LN10) + 2);\n\n\t\t\tlet start = $math.round(this.valueToFinalPosition(selectionMin), len);\n\t\t\tlet end = $math.round(this.valueToFinalPosition(selectionMax), len);\n\n\t\t\tthis.setPrivateRaw(\"selectionMinFinal\", selectionMin);\n\t\t\tthis.setPrivateRaw(\"selectionMaxFinal\", selectionMax);\n\t\t\tthis.setPrivateRaw(\"selectionStepFinal\", minMaxStep.step);\n\n\t\t\tthis.zoom(start, end);\n\t\t}\n\t}\n\n\n\tprotected _getMinMax() {\n\t\tlet minDefined = this.get(\"min\");\n\t\tlet maxDefined = this.get(\"max\");\n\n\t\tlet min = Infinity;\n\t\tlet max = -Infinity;\n\n\t\tlet extraMin = this.get(\"extraMin\", 0);\n\t\tlet extraMax = this.get(\"extraMax\", 0);\n\n\t\tif (this.get(\"logarithmic\")) {\n\t\t\tif (this.get(\"extraMin\") == null) {\n\t\t\t\textraMin = 0.1;\n\t\t\t}\n\t\t\tif (this.get(\"extraMax\") == null) {\n\t\t\t\textraMax = 0.2;\n\t\t\t}\n\t\t}\n\n\t\tlet minDiff = Infinity;\n\n\t\t$array.each(this.series, (series) => {\n\t\t\tif (!series.get(\"ignoreMinMax\")) {\n\t\t\t\tlet seriesMin: number | undefined;\n\t\t\t\tlet seriesMax: number | undefined;\n\t\t\t\tif (series.get(\"xAxis\") === this) {\n\t\t\t\t\tseriesMin = series.getPrivate(\"minX\");\n\t\t\t\t\tseriesMax = series.getPrivate(\"maxX\");\n\t\t\t\t}\n\t\t\t\telse if (series.get(\"yAxis\") === this) {\n\t\t\t\t\tseriesMin = series.getPrivate(\"minY\");\n\t\t\t\t\tseriesMax = series.getPrivate(\"maxY\");\n\t\t\t\t}\n\n\t\t\t\tif ($type.isNumber(seriesMin) && $type.isNumber(seriesMax)) {\n\t\t\t\t\tmin = Math.min(min, seriesMin);\n\t\t\t\t\tmax = Math.max(max, seriesMax);\n\n\t\t\t\t\tlet diff = seriesMax - seriesMin;\n\n\t\t\t\t\tif (diff <= 0) {\n\t\t\t\t\t\tdiff = Math.abs(seriesMax / 100);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (diff < minDiff) {\n\t\t\t\t\t\tminDiff = diff;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tthis.axisRanges.each((range) => {\n\t\t\tif (range.get(\"affectsMinMax\")) {\n\t\t\t\tlet value = range.get(\"value\");\n\t\t\t\tif (value != null) {\n\t\t\t\t\tmin = Math.min(min, value);\n\t\t\t\t\tmax = Math.max(max, value);\n\t\t\t\t}\n\t\t\t\tvalue = range.get(\"endValue\");\n\t\t\t\tif (value != null) {\n\t\t\t\t\tmin = Math.min(min, value);\n\t\t\t\t\tmax = Math.max(max, value);\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tif (this.get(\"logarithmic\")) {\n\t\t\tlet treatZeroAs = this.get(\"treatZeroAs\");\n\t\t\tif ($type.isNumber(treatZeroAs)) {\n\t\t\t\tif (min <= 0) {\n\t\t\t\t\tmin = treatZeroAs;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (min <= 0) {\n\t\t\t\tnew Error(\"Logarithmic value axis can not have values <= 0.\");\n\t\t\t}\n\t\t}\n\n\t\tif (min === 0 && max === 0) {\n\t\t\tmax = 0.9;\n\t\t\tmin = -0.9;\n\t\t}\n\n\t\tif ($type.isNumber(minDefined)) {\n\t\t\tmin = minDefined;\n\t\t}\n\t\tif ($type.isNumber(maxDefined)) {\n\t\t\tmax = maxDefined;\n\t\t}\n\n\t\t// meaning no min/max found on series/ranges and no min/max was defined\n\t\tif (min === Infinity || max === -Infinity) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst initialMin = min;\n\t\tconst initialMax = max;\n\n\t\t// adapter\n\t\tlet minAdapted = this.adapters.fold(\"min\", min);\n\t\tlet maxAdapted = this.adapters.fold(\"max\", max);\n\n\t\tif ($type.isNumber(minAdapted)) {\n\t\t\tmin = minAdapted;\n\t\t}\n\n\t\tif ($type.isNumber(maxAdapted)) {\n\t\t\tmax = maxAdapted;\n\t\t}\n\n\t\t// DateAxis does some magic here\n\t\tmin = this._fixMin(min);\n\t\tmax = this._fixMax(max);\n\n\t\t// this happens if starLocation and endLocation are 0.5 and DateAxis has only one date\t\t\n\t\tif (max - min <= 1 / Math.pow(10, 15)) {\n\t\t\tif (max - min !== 0) {\n\t\t\t\tthis._deltaMinMax = (max - min) / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._getDelta(max);\n\t\t\t}\n\n\t\t\tmin -= this._deltaMinMax;\n\t\t\tmax += this._deltaMinMax;\n\t\t}\n\n\t\t// add extras\n\t\tmin -= (max - min) * extraMin;\n\t\tmax += (max - min) * extraMax;\n\n\t\tif (this.get(\"logarithmic\")) {\n\t\t\t// don't let min go below 0 if real min is >= 0\n\t\t\tif (min < 0 && initialMin >= 0) {\n\t\t\t\tmin = 0;\n\t\t\t}\n\t\t\t// don't let max go above 0 if real max is <= 0\n\t\t\tif (max > 0 && initialMax <= 0) {\n\t\t\t\tmax = 0;\n\t\t\t}\n\t\t}\n\n\t\tthis._minReal = min;\n\t\tthis._maxReal = max;\n\t\tlet strictMinMax = this.get(\"strictMinMax\");\n\t\tlet strictMinMaxSelection = this.get(\"strictMinMaxSelection\", false);\n\t\tif (strictMinMaxSelection) {\n\t\t\tstrictMinMax = strictMinMaxSelection;\n\t\t}\n\n\t\tlet strict = strictMinMax;\n\t\tif ($type.isNumber(maxDefined)) {\n\t\t\tstrict = true;\n\t\t}\n\n\t\tlet gridCount = this.get(\"renderer\").gridCount();\n\n\t\tlet minMaxStep: IMinMaxStep = this._adjustMinMax(min, max, gridCount, strict);\n\n\t\tmin = minMaxStep.min;\n\t\tmax = minMaxStep.max;\n\n\t\t// do it for the second time with strict true (importat!)\n\t\tminMaxStep = this._adjustMinMax(min, max, gridCount, true);\n\n\t\tmin = minMaxStep.min;\n\t\tmax = minMaxStep.max;\n\n\t\t// return min max if strict\n\t\tif (strictMinMax) {\n\t\t\tif ($type.isNumber(minDefined)) {\n\t\t\t\tmin = minDefined;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmin = this._minReal;\n\t\t\t}\n\n\t\t\tif ($type.isNumber(maxDefined)) {\n\t\t\t\tmax = maxDefined;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmax = this._maxReal;\n\t\t\t}\n\n\t\t\tif (max - min <= 0.00000001) {\n\t\t\t\tmin -= this._deltaMinMax;\n\t\t\t\tmax += this._deltaMinMax;\n\t\t\t}\n\n\t\t\tmin -= (max - min) * extraMin;\n\t\t\tmax += (max - min) * extraMax;\n\t\t}\n\n\t\tminAdapted = this.adapters.fold(\"min\", min);\n\t\tmaxAdapted = this.adapters.fold(\"max\", max);\n\n\t\tif ($type.isNumber(minAdapted)) {\n\t\t\tmin = minAdapted;\n\t\t}\n\n\t\tif ($type.isNumber(maxAdapted)) {\n\t\t\tmax = maxAdapted;\n\t\t}\n\n\t\tif (minDiff == Infinity) {\n\t\t\tminDiff = (max - min)\n\t\t}\n\n\t\t// this is to avoid floating point number error\n\t\tlet decCount = Math.round(Math.abs(Math.log(Math.abs(max - min)) * Math.LOG10E)) + 5;\n\n\t\tmin = $math.round(min, decCount);\n\t\tmax = $math.round(max, decCount);\n\n\t\tconst syncWithAxis = this.get(\"syncWithAxis\");\n\t\tif (syncWithAxis) {\n\t\t\tminMaxStep = this._syncAxes(min, max, minMaxStep.step, syncWithAxis.getPrivate(\"minFinal\", syncWithAxis.getPrivate(\"min\", 0)), syncWithAxis.getPrivate(\"maxFinal\", syncWithAxis.getPrivate(\"max\", 1)), syncWithAxis.getPrivate(\"step\", 1));\n\t\t\tmin = minMaxStep.min;\n\t\t\tmax = minMaxStep.max;\n\t\t}\n\n\t\tthis.setPrivateRaw(\"maxZoomFactor\", Math.max(1, Math.ceil((max - min) / minDiff * this.get(\"maxZoomFactor\", 100))));\n\t\tthis._fixZoomFactor();\n\n\t\tif (this.get(\"logarithmic\")) {\n\t\t\tthis._minLogAdjusted = min;\n\t\t\tmin = this._minReal;\n\t\t\tmax = this._maxReal;\n\n\t\t\tif (min <= 0) {\n\t\t\t\tmin = initialMin * (1 - Math.min(extraMin, 0.99));\n\t\t\t}\n\t\t}\n\n\n\t\tif ($type.isNumber(min) && $type.isNumber(max)) {\n\t\t\tif (this.getPrivate(\"minFinal\") !== min || this.getPrivate(\"maxFinal\") !== max) {\n\t\t\t\tthis.setPrivate(\"minFinal\", min);\n\t\t\t\tthis.setPrivate(\"maxFinal\", max);\n\t\t\t\tthis._saveMinMax(min, max);\n\n\t\t\t\tconst duration = this.get(\"interpolationDuration\", 0);\n\t\t\t\tconst easing = this.get(\"interpolationEasing\");\n\n\t\t\t\tthis.animatePrivate({ key: \"min\", to: min, duration, easing });\n\t\t\t\tthis.animatePrivate({ key: \"max\", to: max, duration, easing });\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _fixZoomFactor() {\n\t}\n\n\tprotected _getDelta(max: number) {\n\t\t// the number by which we need to raise 10 to get difference\n\t\tlet exponent: number = Math.log(Math.abs(max)) * Math.LOG10E;\n\n\t\t// here we find a number which is power of 10 and has the same count of numbers as difference has\n\t\tlet power = Math.pow(10, Math.floor(exponent));\n\n\t\t// reduce this number by 10 times\n\t\tpower = power / 10;\n\n\t\tthis._deltaMinMax = power;\n\t}\n\n\tprotected _saveMinMax(_min: number, _max: number) {\n\n\t}\n\n\n\tprotected _adjustMinMax(min: number, max: number, gridCount: number, strictMode?: boolean): IMinMaxStep {\n\t\t// will fail if 0\n\t\tif (gridCount <= 1) {\n\t\t\tgridCount = 1;\n\t\t}\n\n\t\tgridCount = Math.round(gridCount);\n\n\t\tlet initialMin: number = min;\n\t\tlet initialMax: number = max;\n\n\t\tlet difference = max - min;\n\n\t\t// in case min and max is the same, use max\n\t\tif (difference === 0) {\n\t\t\tdifference = Math.abs(max);\n\t\t}\n\n\t\t// the number by which we need to raise 10 to get difference\n\t\tlet exponent: number = Math.log(Math.abs(difference)) * Math.LOG10E;\n\n\t\t// here we find a number which is power of 10 and has the same count of numbers as difference has\n\t\tlet power = Math.pow(10, Math.floor(exponent));\n\n\t\t// reduce this number by 10 times\n\t\tpower = power / 10;\n\n\t\tlet extra: number = power;\n\t\tif (strictMode) {\n\t\t\textra = 0;\n\t\t}\n\n\t\t// round down min\n\t\tif (strictMode) {\n\t\t\tmin = Math.floor(min / power) * power;\n\t\t\t// round up max\n\t\t\tmax = Math.ceil(max / power) * power;\n\t\t}\n\t\telse {\n\t\t\tmin = Math.ceil(min / power) * power - extra;\n\t\t\t// round up max\n\t\t\tmax = Math.floor(max / power) * power + extra;\n\t\t}\n\n\t\t// don't let min go below 0 if real min is >= 0\n\t\tif (min < 0 && initialMin >= 0) {\n\t\t\tmin = 0;\n\t\t}\n\t\t// don't let max go above 0 if real max is <= 0\n\t\tif (max > 0 && initialMax <= 0) {\n\t\t\tmax = 0;\n\t\t}\n\n\t\texponent = Math.log(Math.abs(difference)) * Math.LOG10E;\n\t\tpower = Math.pow(10, Math.floor(exponent));\n\t\tpower = power / 100; // used to be 10 in v4, but this caused issue that there could be limited number of grids with even very small minGridDistance\n\n\t\t// approximate difference between two grid lines\n\t\tlet step = Math.ceil((difference / gridCount) / power) * power;\n\t\tlet stepPower = Math.pow(10, Math.floor(Math.log(Math.abs(step)) * Math.LOG10E));\n\n\t\t// the step should divide by 2, 5, and 10.\n\t\tlet stepDivisor: number = Math.ceil(step / stepPower); // number 0 - 10\n\n\t\tif (stepDivisor > 5) {\n\t\t\tstepDivisor = 10;\n\t\t}\n\t\telse if (stepDivisor <= 5 && stepDivisor > 2) {\n\t\t\tstepDivisor = 5;\n\t\t}\n\n\t\t// now get real step\n\t\tstep = Math.ceil(step / (stepPower * stepDivisor)) * stepPower * stepDivisor;\n\n\t\tlet maxPrecision = this.get(\"maxPrecision\");\n\t\tif ($type.isNumber(maxPrecision)) {\n\t\t\tlet ceiledStep = $math.ceil(step, maxPrecision);\n\t\t\tif (maxPrecision < Number.MAX_VALUE && step !== ceiledStep) {\n\t\t\t\tstep = ceiledStep;\n\t\t\t}\n\t\t}\n\n\t\tlet decCount: number = 0;\n\t\t// in case numbers are smaller than 1\n\t\tif (stepPower < 1) {\n\t\t\t// exponent is less then 1 too. Count decimals of exponent\n\t\t\tdecCount = Math.round(Math.abs(Math.log(Math.abs(stepPower)) * Math.LOG10E)) + 1;\n\t\t\t// round step\n\t\t\tstep = $math.round(step, decCount);\n\t\t}\n\n\t\t// final min and max\n\t\tlet minCount = Math.floor(min / step);\n\n\t\tmin = $math.round(step * minCount, decCount);\n\n\t\tlet maxCount: number;\n\n\t\tif (!strictMode) {\n\t\t\tmaxCount = Math.ceil(max / step);\n\t\t}\n\t\telse {\n\t\t\tmaxCount = Math.floor(max / step);\n\t\t}\n\n\t\tif (maxCount === minCount) {\n\t\t\tmaxCount++;\n\t\t}\n\n\t\tmax = $math.round(step * maxCount, decCount);\n\n\t\tif (max < initialMax) {\n\t\t\tmax = max + step;\n\t\t}\n\n\t\tif (min > initialMin) {\n\t\t\tmin = min - step;\n\t\t}\n\n\n\t\tstep = this.fixSmallStep(step);\n\n\t\treturn { min: min, max: max, step: step };\n\t}\n\n\t/**\n\t * Returns text to be used in an axis tooltip for specific relative position.\n\t *\n\t * @param position Position\n\t * @return Tooltip text\n\t */\n\tpublic getTooltipText(position: number): string | undefined {\n\t\tconst numberFormat = this.get(\"tooltipNumberFormat\", this.get(\"numberFormat\"));\n\t\tconst formatter = this.getNumberFormatter();\n\t\tconst extraDecimals = this.get(\"extraTooltipPrecision\", 0);\n\t\tconst decimals = this.getPrivate(\"stepDecimalPlaces\", 0) + extraDecimals;\n\t\tconst value = $math.round(this.positionToValue(position), decimals);\n\n\t\tif (numberFormat) {\n\t\t\treturn formatter.format(value, numberFormat);\n\t\t}\n\t\telse {\n\t\t\treturn formatter.format(value, undefined, decimals);\n\t\t\t//label.set(\"text\", this.getNumberFormatter().format(value, undefined, this.getPrivate(\"stepDecimalPlaces\")));\n\t\t}\n\n\t\t// //@todo number formatter + tag\n\t\t// return $math.round(this.positionToValue(position), this.getPrivate(\"stepDecimalPlaces\")).toString();\n\t}\n\n\t/**\n\t * Returns a data item from series that is closest to the `position`.\n\t *\n\t * @param series Series\n\t * @param position Relative position\n\t * @return Data item\n\t */\n\tpublic getSeriesItem(series: XYSeries, position: number): DataItem | undefined {\n\t\tlet fieldName = (this.getPrivate(\"name\")! + this.get(\"renderer\").getPrivate(\"letter\")!);\n\t\tlet value = this.positionToValue(position);\n\n\t\tlet index: number | undefined = undefined;\n\t\tlet oldDiff: number;\n\t\t$array.each(series.dataItems, (dataItem, i) => {\n\t\t\tconst diff = Math.abs(dataItem.get(fieldName) - value);\n\t\t\tif (index === undefined || diff < oldDiff) {\n\t\t\t\tindex = i;\n\t\t\t\toldDiff = diff;\n\t\t\t}\n\t\t});\n\n\t\tif (index != null) {\n\t\t\treturn series.dataItems[index];\n\t\t}\n\t}\n\n\t/**\n\t * Zooms the axis to specific `start` and `end` values.\n\t *\n\t * Optional `duration` specifies duration of zoom animation in milliseconds.\n\t *\n\t * @param start Start value\n\t * @param end End value\n\t * @param duration Duration in milliseconds\n\t */\n\tpublic zoomToValues(start: number, end: number, duration?: number) {\n\t\tconst min = this.getPrivate(\"minFinal\", 0);\n\t\tconst max = this.getPrivate(\"maxFinal\", 0);\n\t\tif (this.getPrivate(\"min\") != null && this.getPrivate(\"max\") != null) {\n\t\t\tthis.zoom((start - min) / (max - min), (end - min) / (max - min), duration);\n\t\t}\n\t}\n\n\n\t/**\n\t * Syncs with a target axis.\n\t *\n\t * @param min Min\n\t * @param max Max\n\t * @param step Step\n\t */\n\tprotected _syncAxes(min: number, max: number, step: number, syncMin: number, syncMax: number, syncStep: number) {\n\t\tlet axis = this.get(\"syncWithAxis\");\n\t\tif (axis) {\n\t\t\tlet count: number = Math.round(syncMax - syncMin) / syncStep;\n\t\t\tlet currentCount = Math.round((max - min) / step);\n\n\t\t\tlet gridCount = this.get(\"renderer\").gridCount();\n\n\t\t\tif ($type.isNumber(count) && $type.isNumber(currentCount)) {\n\t\t\t\tlet synced = false;\n\t\t\t\tlet c = 0\n\t\t\t\tlet diff = (max - min) * 0.01;\n\t\t\t\tlet omin = min;\n\t\t\t\tlet omax = max;\n\t\t\t\tlet ostep = step;\n\n\t\t\t\twhile (synced != true) {\n\t\t\t\t\tsynced = this._checkSync(omin, omax, ostep, count);\n\t\t\t\t\tc++;\n\t\t\t\t\tif (c > 500) {\n\t\t\t\t\t\tsynced = true;\n\t\t\t\t\t}\n\t\t\t\t\tif (!synced) {\n\t\t\t\t\t\tif (c / 3 == Math.round(c / 3)) {\n\t\t\t\t\t\t\tomin = min - diff * c;\n\t\t\t\t\t\t\tif (min >= 0 && omin < 0) {\n\t\t\t\t\t\t\t\tomin = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tomax = max + diff * c;\n\t\t\t\t\t\t\tif (omax <= 0 && omax > 0) {\n\t\t\t\t\t\t\t\tomax = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet minMaxStep = this._adjustMinMax(omin, omax, gridCount, true);\n\t\t\t\t\t\tomin = minMaxStep.min;\n\t\t\t\t\t\tomax = minMaxStep.max;\n\t\t\t\t\t\tostep = minMaxStep.step;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmin = omin;\n\t\t\t\t\t\tmax = omax;\n\t\t\t\t\t\tstep = ostep;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn { min: min, max: max, step: step };\n\t}\n\n\t/**\n\t * Returns `true` if axis needs to be resunced with some other axis.\n\t */\n\tprotected _checkSync(min: number, max: number, step: number, count: number): boolean {\n\t\tlet currentCount = (max - min) / step;\n\t\tfor (let i = 1; i < count; i++) {\n\t\t\tif ($math.round(currentCount / i, 1) == count || currentCount * i == count) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n}\n","import type { DataItem } from \"../../../core/render/Component\";\nimport type { Graphics } from \"../../../core/render/Graphics\";\nimport type { Template } from \"../../../core/util/Template\";\nimport type { ListTemplate } from \"../../../core/util/List\";\nimport type { CategoryAxis } from \"../axes/CategoryAxis\";\nimport type { DateAxis } from \"../axes/DateAxis\";\nimport type { ValueAxis } from \"../axes/ValueAxis\";\nimport type { ILegendDataItem } from \"../../../core/render/Legend\";\nimport type { Sprite } from \"../../../core/render/Sprite\";\n\nimport { XYSeries, IXYSeriesPrivate, IXYSeriesSettings, IXYSeriesDataItem, IXYSeriesAxisRange } from \"./XYSeries\";\nimport { Percent } from \"../../../core/util/Percent\";\nimport { visualSettings } from \"../../../core/render/Graphics\";\n\nimport * as $array from \"../../../core/util/Array\";\nimport * as $type from \"../../../core/util/Type\";\n\nexport interface IBaseColumnSeriesDataItem extends IXYSeriesDataItem {\n\n\t/**\n\t * An actual [[Graphics]] element (Column/Slice/Candlestick/OHLC).\n\t */\n\tgraphics?: Graphics;\n\n\t/**\n\t * In case axis ranges are added to the series, it creates a separate\n\t * element ([[Graphics]]) for each axis range. This array holds them all.\n\t */\n\trangeGraphics?: Array;\n\n\t/**\n\t * If data items from this series are used to feed a [[Legend]], this\n\t * will hold a reference to the equivalent Legend data item.\n\t * \n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/legend/#Data_item_list} for more info\n\t */\n\tlegendDataItem?: DataItem;\n}\n\nexport interface IBaseColumnSeriesSettings extends IXYSeriesSettings {\n\n\t/**\n\t * Indicates if series must divvy up available space with other column\n\t * series (`true`; default) or take up the whole available space (`false`).\n\t *\n\t * @default true\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/column-series/#Clustering} for more info\n\t */\n\tclustered?: boolean;\n\n\t/**\n\t * Whether positions of bullets should be calculated based on portion of\n\t * column currently visual (`true`) or the whole length/height of the\n\t * column (`false`).\n\t *\n\t * @default true\n\t */\n\tadjustBulletPosition?: boolean;\n\n\t/**\n\t * If set to `true` will use color of the last visible column for legend\n\t * marker. Otherwise, series `fill`/`stroke` will be used.\n\t *\n\t * @since 5.1.13\n\t */\n\tuseLastColorForLegendMarker?: boolean\n\n}\n\nexport interface IBaseColumnSeriesPrivate extends IXYSeriesPrivate { }\n\nexport interface IBaseColumnSeriesAxisRange extends IXYSeriesAxisRange {\n\n\t/**\n\t * A list of actual [[Graphics]] elements for an axis range.\n\t *\n\t * Can be used to ajust the look of the axis range columns.\n\t */\n\tcolumns: ListTemplate;\n\n}\n\n/**\n * Base class for all \"column-based\" series\n */\nexport abstract class BaseColumnSeries extends XYSeries {\n\n\tdeclare public _settings: IBaseColumnSeriesSettings;\n\tdeclare public _privateSettings: IBaseColumnSeriesPrivate;\n\tdeclare public _dataItemSettings: IBaseColumnSeriesDataItem;\n\tdeclare public _axisRangeType: IBaseColumnSeriesAxisRange;\n\n\tpublic static className: string = \"BaseColumnSeries\";\n\tpublic static classNames: Array = XYSeries.classNames.concat([BaseColumnSeries.className]);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract makeColumn(dataItem: DataItem, listTemplate: ListTemplate): Graphics\n\n\t/**\n\t * ListTemplate of columns in series.\n\t */\n\tpublic abstract columns: ListTemplate;\n\n\tprotected _makeGraphics(listTemplate: ListTemplate, dataItem: DataItem): Graphics {\n\t\treturn this.makeColumn(dataItem, listTemplate);\n\t}\n\n\tprotected _ph: number = 0;\n\tprotected _pw: number = 0;\n\n\tpublic _makeFieldNames() {\n\t\tsuper._makeFieldNames();\n\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\n\t\tconst categoryAxis = \"CategoryAxis\";\n\t\tconst valueAxis = \"ValueAxis\";\n\n\t\tif (xAxis.isType>(categoryAxis)) {\n\t\t\tif (!this.get(\"openCategoryXField\")) {\n\t\t\t\tthis._xOpenField = this._xField;\n\t\t\t}\n\t\t}\n\n\t\tif (xAxis.isType>(valueAxis)) {\n\t\t\tif (!this.get(\"openValueXField\")) {\n\t\t\t\tthis._xOpenField = this._xField;\n\t\t\t}\n\t\t}\n\n\t\tif (yAxis.isType>(categoryAxis)) {\n\t\t\tif (!this.get(\"openCategoryYField\")) {\n\t\t\t\tthis._yOpenField = this._yField;\n\t\t\t}\n\t\t}\n\n\t\tif (yAxis.isType>(valueAxis)) {\n\t\t\tif (!this.get(\"openValueYField\")) {\n\t\t\t\tthis._yOpenField = this._yField;\n\t\t\t}\n\t\t}\n\t}\n\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\n\t\tconst len = this.dataItems.length;\n\t\tconst startIndex = Math.max(0, this.startIndex() - 2);\n\t\tconst endIndex = Math.min(this.endIndex() + 2, len - 1);\n\n\t\tif (xAxis.inited && yAxis.inited) {\n\t\t\tfor (let i = startIndex; i <= endIndex; i++) {\n\t\t\t\tlet dataItem = this.dataItems[i];\n\t\t\t\tthis._createGraphics(dataItem);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateChildren() {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tthis._ph = chart.plotContainer.height();\n\t\t\tthis._pw = chart.plotContainer.width();\n\t\t}\n\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\t\tconst baseAxis = this.get(\"baseAxis\")!;\n\n\t\tconst columnsTemplate = this.columns.template;\n\t\tif (this.isDirty(\"fill\")) {\n\t\t\tif (columnsTemplate.get(\"fill\") == null) {\n\t\t\t\tcolumnsTemplate.set(\"fill\", this.get(\"fill\"));\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"stroke\")) {\n\t\t\tif (columnsTemplate.get(\"stroke\") == null) {\n\t\t\t\tcolumnsTemplate.set(\"stroke\", this.get(\"stroke\"));\n\t\t\t}\n\t\t}\n\n\t\tlet index = 0;\n\t\tlet clusterCount = 0;\n\t\tlet i = 0;\n\n\t\t$array.each(baseAxis.series, (series) => {\n\t\t\tif (series instanceof BaseColumnSeries) {\n\t\t\t\tconst stacked = series.get(\"stacked\");\n\n\t\t\t\tif (stacked && i == 0) {\n\t\t\t\t\tclusterCount++;\n\t\t\t\t}\n\n\t\t\t\tif (!stacked && series.get(\"clustered\")) {\n\t\t\t\t\tclusterCount++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (series === this) {\n\t\t\t\tindex = clusterCount - 1;\n\t\t\t}\n\t\t\ti++;\n\t\t})\n\n\t\tif (!this.get(\"clustered\")) {\n\t\t\tindex = 0;\n\t\t\tclusterCount = 1;\n\t\t}\n\n\t\tif (clusterCount === 0) {\n\t\t\tclusterCount = 1;\n\t\t\tindex = 0;\n\t\t}\n\n\t\tconst xRenderer = xAxis.get(\"renderer\");\n\t\tconst yRenderer = yAxis.get(\"renderer\");\n\n\t\tconst cellStartLocation = \"cellStartLocation\";\n\t\tconst cellEndLocation = \"cellEndLocation\";\n\n\t\tconst cellLocationX0 = xRenderer.get(cellStartLocation, 0);\n\t\tconst cellLocationX1 = xRenderer.get(cellEndLocation, 1);\n\n\t\tconst cellLocationY0 = yRenderer.get(cellStartLocation, 0);\n\t\tconst cellLocationY1 = yRenderer.get(cellEndLocation, 1);\n\n\t\tthis._aLocationX0 = cellLocationX0 + (index / clusterCount) * (cellLocationX1 - cellLocationX0);\n\t\tthis._aLocationX1 = cellLocationX0 + (index + 1) / clusterCount * (cellLocationX1 - cellLocationX0);;\n\n\t\tthis._aLocationY0 = cellLocationY0 + (index / clusterCount) * (cellLocationY1 - cellLocationY0);\n\t\tthis._aLocationY1 = cellLocationY0 + (index + 1) / clusterCount * (cellLocationY1 - cellLocationY0);\n\n\t\tif (xAxis.inited && yAxis.inited) {\n\t\t\tif (this._axesDirty || this._valuesDirty || this._stackDirty || this.isDirty(\"vcx\") || this.isDirty(\"vcy\") || this._sizeDirty) {\n\t\t\t\tconst len = this.dataItems.length;\n\n\t\t\t\tlet startIndex = Math.max(0, this.startIndex() - 2);\n\t\t\t\tlet endIndex = Math.min(this.endIndex() + 2, len - 1);\n\n\t\t\t\tfor (let i = 0; i < startIndex; i++) {\n\t\t\t\t\tthis._toggleColumn(this.dataItems[i], false);\n\t\t\t\t}\n\t\t\t\tlet previous = this.dataItems[startIndex];\n\n\t\t\t\tfor (let i = startIndex; i <= endIndex; i++) {\n\t\t\t\t\tlet dataItem = this.dataItems[i];\n\t\t\t\t\tif (dataItem.get(\"valueX\") != null && dataItem.get(\"valueY\") != null) {\n\t\t\t\t\t\tprevious = dataItem;\n\t\t\t\t\t\tif (i > 0 && startIndex > 0) {\n\t\t\t\t\t\t\tfor (let j = i - 1; j >= 0; j--) {\n\t\t\t\t\t\t\t\tlet dataItem = this.dataItems[j];\n\t\t\t\t\t\t\t\tif (dataItem.get(\"valueX\") != null && dataItem.get(\"valueY\") != null) {\n\t\t\t\t\t\t\t\t\tprevious = dataItem;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis._toggleColumn(dataItem, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (let i = startIndex; i <= endIndex; i++) {\n\t\t\t\t\tlet dataItem = this.dataItems[i];\n\t\t\t\t\tthis._updateGraphics(dataItem, previous);\n\t\t\t\t\tif (dataItem.get(\"valueX\") != null && dataItem.get(\"valueY\") != null) {\n\t\t\t\t\t\tprevious = dataItem;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (let i = endIndex + 1; i < len; i++) {\n\t\t\t\t\tthis._toggleColumn(this.dataItems[i], false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis._skipped = true;\n\t\t}\n\t\tthis.updateLegendMarker(this.get(\"tooltipDataItem\"));\n\t\tsuper._updateChildren();\n\t}\n\n\tprotected _createGraphics(dataItem: DataItem) {\n\t\tlet graphics = dataItem.get(\"graphics\");\n\t\tif (!graphics) {\n\t\t\tgraphics = this._makeGraphics(this.columns, dataItem);\n\t\t\tdataItem.set(\"graphics\", graphics);\n\t\t\tgraphics._setDataItem(dataItem);\n\n\t\t\tconst legendDataItem = dataItem.get(\"legendDataItem\");\n\t\t\tif (legendDataItem) {\n\t\t\t\tconst markerRectangle = legendDataItem.get(\"markerRectangle\");\n\t\t\t\tif (markerRectangle) {\n\t\t\t\t\tmarkerRectangle.setAll({ fill: graphics.get(\"fill\"), stroke: graphics.get(\"stroke\") });\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.axisRanges.each((axisRange) => {\n\t\t\t\tconst container = axisRange.container!;\n\t\t\t\tconst graphicsArray: Array = dataItem.get(\"rangeGraphics\", []);\n\t\t\t\tdataItem.set(\"rangeGraphics\", graphicsArray);\n\n\t\t\t\tconst rangeGraphics = this._makeGraphics(axisRange.columns, dataItem);\n\t\t\t\tgraphicsArray.push(rangeGraphics);\n\t\t\t\trangeGraphics.setPrivate(\"list\", axisRange.columns);\n\t\t\t\tcontainer.children.push(rangeGraphics);\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _updateGraphics(dataItem: DataItem, previousDataItem: DataItem) {\n\t\tlet graphics = dataItem.get(\"graphics\")!;\n\n\t\t//if (!graphics) {\n\t\t//\tthis._createGraphics(dataItem);\n\t\t//\tgraphics = dataItem.get(\"graphics\")!;\n\t\t//}\n\n\t\tconst xField = this._xField;\n\t\tconst yField = this._yField;\n\n\t\tconst valueX = dataItem.get(xField as any);\n\t\tconst valueY = dataItem.get(yField as any);\n\n\t\tif (valueX != null && valueY != null) {\n\t\t\tconst xOpenField = this._xOpenField;\n\t\t\tconst yOpenField = this._yOpenField;\n\n\t\t\tconst locationX = this.get(\"locationX\", dataItem.get(\"locationX\", 0.5));\n\t\t\tconst locationY = this.get(\"locationY\", dataItem.get(\"locationY\", 0.5));\n\n\t\t\tconst openLocationX = this.get(\"openLocationX\", dataItem.get(\"openLocationX\", locationX));\n\t\t\tconst openLocationY = this.get(\"openLocationY\", dataItem.get(\"openLocationY\", locationY));\n\n\t\t\tconst width = graphics.get(\"width\");\n\t\t\tconst height = graphics.get(\"height\");\n\n\t\t\tconst stacked = this.get(\"stacked\");\n\n\t\t\tconst xAxis = this.get(\"xAxis\");\n\t\t\tconst yAxis = this.get(\"yAxis\");\n\t\t\tconst baseAxis = this.get(\"baseAxis\");\n\n\t\t\tconst xStart = xAxis.get(\"start\");\n\t\t\tconst xEnd = xAxis.get(\"end\");\n\n\t\t\tconst yStart = yAxis.get(\"start\");\n\t\t\tconst yEnd = yAxis.get(\"end\");\n\n\t\t\tlet l!: number;\n\t\t\tlet r!: number;\n\t\t\tlet t!: number;\n\t\t\tlet b!: number;\n\n\t\t\tlet vcy = this.get(\"vcy\", 1);\n\t\t\tlet vcx = this.get(\"vcx\", 1);\n\n\t\t\tlet fitW = false;\n\t\t\tlet fitH = false;\n\n\t\t\tif (yAxis.isType>(\"CategoryAxis\") && xAxis.isType>(\"CategoryAxis\")) {\n\n\t\t\t\tlet startLocation = this._aLocationX0 + openLocationX - 0.5;\n\t\t\t\tlet endLocation = this._aLocationX1 + locationX - 0.5;\n\n\t\t\t\tif (width instanceof Percent) {\n\t\t\t\t\tlet offset: number = (endLocation - startLocation) * (1 - width.value) / 2;\n\t\t\t\t\tstartLocation += offset;\n\t\t\t\t\tendLocation -= offset;\n\t\t\t\t}\n\n\t\t\t\tl = xAxis.getDataItemPositionX(dataItem, xOpenField, startLocation, vcx);\n\t\t\t\tr = xAxis.getDataItemPositionX(dataItem, xField, endLocation, vcx);\n\n\t\t\t\tstartLocation = this._aLocationY0 + openLocationY - 0.5;\n\t\t\t\tendLocation = this._aLocationY1 + locationY - 0.5;\n\n\t\t\t\tif (height instanceof Percent) {\n\t\t\t\t\tlet offset: number = (endLocation - startLocation) * (1 - height.value) / 2;\n\t\t\t\t\tstartLocation += offset;\n\t\t\t\t\tendLocation -= offset;\n\t\t\t\t}\n\n\t\t\t\tt = yAxis.getDataItemPositionY(dataItem, yOpenField, startLocation, vcy);\n\t\t\t\tb = yAxis.getDataItemPositionY(dataItem, yField, endLocation, vcy);\n\n\t\t\t\tdataItem.setRaw(\"point\", { x: l + (r - l) / 2, y: t + (b - t) / 2 });\n\t\t\t}\n\t\t\telse if (xAxis === baseAxis) {\n\n\t\t\t\tlet startLocation = this._aLocationX0 + openLocationX - 0.5;\n\t\t\t\tlet endLocation = this._aLocationX1 + locationX - 0.5;\n\n\t\t\t\tif (width instanceof Percent) {\n\t\t\t\t\tlet offset: number = (endLocation - startLocation) * (1 - width.value) / 2;\n\t\t\t\t\tstartLocation += offset;\n\t\t\t\t\tendLocation -= offset;\n\t\t\t\t}\n\n\t\t\t\tl = xAxis.getDataItemPositionX(dataItem, xOpenField, startLocation, vcx);\n\t\t\t\tr = xAxis.getDataItemPositionX(dataItem, xField, endLocation, vcx);\n\t\t\t\tt = yAxis.getDataItemPositionY(dataItem, yField, locationY, vcy);\n\n\t\t\t\tif (this._yOpenField !== this._yField) {\n\t\t\t\t\tb = yAxis.getDataItemPositionY(dataItem, yOpenField, openLocationY, vcy);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (stacked) {\n\t\t\t\t\t\tlet stackToItemY = dataItem.get(\"stackToItemY\")!;\n\t\t\t\t\t\tif (stackToItemY) {\n\t\t\t\t\t\t\tb = yAxis.getDataItemPositionY(stackToItemY, yField, openLocationY, (stackToItemY.component as XYSeries).get(\"vcy\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tb = yAxis.basePosition();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tb = yAxis.basePosition();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdataItem.setRaw(\"point\", { x: l + (r - l) / 2, y: t });\n\n\t\t\t\tfitH = true;\n\t\t\t}\n\t\t\telse if (yAxis === baseAxis) {\n\t\t\t\tlet startLocation = this._aLocationY0 + openLocationY - 0.5;\n\t\t\t\tlet endLocation = this._aLocationY1 + locationY - 0.5;\n\n\t\t\t\tif (height instanceof Percent) {\n\t\t\t\t\tlet offset: number = (endLocation - startLocation) * (1 - height.value) / 2;\n\t\t\t\t\tstartLocation += offset;\n\t\t\t\t\tendLocation -= offset;\n\t\t\t\t}\n\n\t\t\t\tt = yAxis.getDataItemPositionY(dataItem, yOpenField, startLocation, vcy);\n\t\t\t\tb = yAxis.getDataItemPositionY(dataItem, yField, endLocation, vcy);\n\t\t\t\tr = xAxis.getDataItemPositionX(dataItem, xField, locationX, vcx);\n\n\t\t\t\tif (this._xOpenField !== this._xField) {\n\t\t\t\t\tl = xAxis.getDataItemPositionX(dataItem, xOpenField, openLocationX, vcx);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (stacked) {\n\t\t\t\t\t\tlet stackToItemX = dataItem.get(\"stackToItemX\")!;\n\t\t\t\t\t\tif (stackToItemX) {\n\t\t\t\t\t\t\tl = xAxis.getDataItemPositionX(stackToItemX, xField, openLocationX, (stackToItemX.component as XYSeries).get(\"vcx\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tl = xAxis.basePosition();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tl = xAxis.basePosition();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfitW = true;\n\n\t\t\t\tdataItem.setRaw(\"point\", { x: r, y: t + (b - t) / 2 });\n\t\t\t}\n\n\t\t\tthis._updateSeriesGraphics(dataItem, graphics!, l, r, t, b, fitW, fitH);\n\n\t\t\tif ((l < xStart && r < xStart) || (l > xEnd && r > xEnd) || (t < yStart && b < yStart) || (t > yEnd && b > yEnd) || $type.isNaN(l) || $type.isNaN(t)) {\n\t\t\t\tthis._toggleColumn(dataItem, false);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._toggleColumn(dataItem, true);\n\t\t\t}\n\n\t\t\tlet rangeGraphics = dataItem.get(\"rangeGraphics\")!;\n\t\t\tif (rangeGraphics) {\n\t\t\t\t$array.each(rangeGraphics, (graphics) => {\n\t\t\t\t\tthis._updateSeriesGraphics(dataItem, graphics, l, r, t, b, fitW, fitH);\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tthis._applyGraphicsStates(dataItem, previousDataItem);\n\t\t}\n\t}\n\n\tprotected _updateSeriesGraphics(dataItem: DataItem, graphics: Graphics, l: number, r: number, t: number, b: number, fitW: boolean, fitH: boolean) {\n\t\tconst width = graphics.get(\"width\");\n\t\tconst height = graphics.get(\"height\");\n\t\tconst maxWidth = graphics.get(\"maxWidth\");\n\t\tconst maxHeight = graphics.get(\"maxHeight\");\n\n\t\tconst ptl = this.getPoint(l, t);\n\t\tconst pbr = this.getPoint(r, b);\n\n\t\tconst tooltipPoint = dataItem.get(\"point\");\n\n\t\tif (tooltipPoint) {\n\t\t\tconst point = this.getPoint(tooltipPoint.x, tooltipPoint.y);\n\t\t\ttooltipPoint.x = point.x + this._x;\n\t\t\ttooltipPoint.y = point.y + this._y;\n\t\t}\n\n\t\tl = ptl.x;\n\t\tr = pbr.x;\n\n\t\tt = ptl.y;\n\t\tb = pbr.y;\n\n\t\tif ($type.isNumber(width)) {\n\t\t\tconst offset: number = ((r - l) - width) / 2;\n\t\t\tl += offset;\n\t\t\tr -= offset;\n\t\t}\n\n\t\tif ($type.isNumber(maxWidth) && maxWidth < Math.abs(r - l)) {\n\t\t\tconst offset: number = ((r - l) - maxWidth) / 2;\n\t\t\tl += offset;\n\t\t\tr -= offset;\n\t\t}\n\n\t\tif ($type.isNumber(height)) {\n\t\t\tconst offset: number = ((b - t) - height) / 2;\n\t\t\tt += offset;\n\t\t\tb -= offset;\n\t\t}\n\n\t\tif ($type.isNumber(maxHeight) && maxHeight < Math.abs(b - t)) {\n\t\t\tconst offset: number = ((b - t) - maxHeight) / 2;\n\t\t\tt += offset;\n\t\t\tb -= offset;\n\t\t}\n\n\t\tif (this.get(\"adjustBulletPosition\")) {\n\t\t\tif (fitW) {\n\t\t\t\tr = Math.min(Math.max(0, r), this._pw);\n\t\t\t\tl = Math.min(Math.max(0, l), this._pw);\n\t\t\t}\n\n\t\t\tif (fitH) {\n\t\t\t\tt = Math.min(Math.max(0, t), this._ph);\n\t\t\t\tb = Math.min(Math.max(0, b), this._ph);\n\t\t\t}\n\t\t}\n\n\t\tdataItem.setRaw(\"left\", l);\n\t\tdataItem.setRaw(\"right\", r);\n\t\tdataItem.setRaw(\"top\", t);\n\t\tdataItem.setRaw(\"bottom\", b);\n\n\t\tgraphics.setPrivate(\"width\", r - l);\n\t\tgraphics.setPrivate(\"height\", b - t);\n\t\tgraphics.set(\"x\", l);\n\t\tgraphics.set(\"y\", b - (b - t));\n\t}\n\n\tprotected _handleDataSetChange() {\n\t\tsuper._handleDataSetChange();\n\t\t$array.each(this._dataItems, (dataItem) => {\n\t\t\tthis._toggleColumn(dataItem, false);\n\t\t})\n\t}\n\n\tpublic _applyGraphicsStates(dataItem: DataItem, previousDataItem: DataItem) {\n\n\t\tconst graphics = dataItem.get(\"graphics\")!;\n\n\t\tconst dropFromOpen = graphics.states.lookup(\"dropFromOpen\");\n\t\tconst riseFromOpen = graphics.states.lookup(\"riseFromOpen\");\n\n\t\tconst dropFromPrevious = graphics.states.lookup(\"dropFromPrevious\");\n\t\tconst riseFromPrevious = graphics.states.lookup(\"riseFromPrevious\");\n\n\t\tif (dropFromOpen || dropFromPrevious || riseFromOpen || riseFromPrevious) {\n\t\t\tconst xAxis = this.get(\"xAxis\");\n\t\t\tconst yAxis = this.get(\"yAxis\");\n\t\t\tconst baseAxis = this.get(\"baseAxis\");\n\n\t\t\tlet open: number | undefined;\n\t\t\tlet close: number | undefined;\n\t\t\tlet previousClose: number | undefined;\n\n\t\t\tif (baseAxis === xAxis && yAxis.isType>(\"ValueAxis\")) {\n\t\t\t\topen = dataItem.get(this._yOpenField as any);\n\t\t\t\tclose = dataItem.get(this._yField as any);\n\n\t\t\t\tpreviousClose = previousDataItem.get(this._yField as any);\n\t\t\t}\n\t\t\telse if (baseAxis === yAxis && xAxis.isType>(\"ValueAxis\")) {\n\t\t\t\topen = dataItem.get(this._xOpenField as any);\n\t\t\t\tclose = dataItem.get(this._xField as any);\n\n\t\t\t\tpreviousClose = previousDataItem.get(this._xField as any);\n\t\t\t}\n\n\t\t\tif ($type.isNumber(open) && $type.isNumber(close)) {\n\t\t\t\tif (close < open) {\n\t\t\t\t\tif (dropFromOpen) {\n\t\t\t\t\t\tdropFromOpen.apply();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (riseFromOpen) {\n\t\t\t\t\t\triseFromOpen.apply();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($type.isNumber(previousClose)) {\n\t\t\t\t\tif (close < previousClose) {\n\t\t\t\t\t\tif (dropFromPrevious) {\n\t\t\t\t\t\t\tdropFromPrevious.apply();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (riseFromPrevious) {\n\t\t\t\t\t\t\triseFromPrevious.apply();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic disposeDataItem(dataItem: DataItem) {\n\t\tsuper.disposeDataItem(dataItem);\n\t\tconst graphics = dataItem.get(\"graphics\");\n\t\tif (graphics) {\n\t\t\tthis.columns.removeValue(graphics);\n\t\t\tgraphics.dispose();\n\t\t}\n\n\t\tconst rangeGraphics = dataItem.get(\"rangeGraphics\")!;\n\t\tif (rangeGraphics) {\n\t\t\t$array.each(rangeGraphics, (graphics) => {\n\t\t\t\tconst list = graphics.getPrivate(\"list\");\n\t\t\t\tif (list) {\n\t\t\t\t\tlist.removeValue(graphics);\n\t\t\t\t}\n\t\t\t\tgraphics.dispose();\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * Hides series's data item.\n\t * \n\t * @param dataItem Data item\n\t * @param duration Animation duration in milliseconds\n\t * @return Promise\n\t */\n\tpublic async hideDataItem(dataItem: DataItem, duration?: number): Promise {\n\t\tconst promises = [super.hideDataItem(dataItem, duration)];\n\t\tconst graphics = dataItem.get(\"graphics\");\n\t\tif (graphics) {\n\t\t\tpromises.push(graphics.hide(duration));\n\t\t}\n\n\t\tconst rangeGraphics = dataItem.get(\"rangeGraphics\")!;\n\t\tif (rangeGraphics) {\n\t\t\t$array.each(rangeGraphics, (graphics) => {\n\t\t\t\tpromises.push(graphics.hide(duration));\n\t\t\t})\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\tprotected _toggleColumn(dataItem: DataItem, visible: boolean) {\n\t\tconst graphics = dataItem.get(\"graphics\");\n\t\tif (graphics) {\n\t\t\tgraphics.setPrivate(\"visible\", visible);\n\t\t}\n\n\t\tconst rangeGraphics = dataItem.get(\"rangeGraphics\")!;\n\t\tif (rangeGraphics) {\n\t\t\t$array.each(rangeGraphics, (graphics) => {\n\t\t\t\tgraphics.setPrivate(\"visible\", visible);\n\t\t\t})\n\t\t}\n\n\t\tconst bullets = dataItem.bullets;\n\t\tif (bullets) {\n\t\t\t$array.each(bullets, (bullet) => {\n\t\t\t\tbullet.setPrivate(\"hidden\", !visible);\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * Shows series's data item.\n\t * \n\t * @param dataItem Data item\n\t * @param duration Animation duration in milliseconds\n\t * @return Promise\n\t */\n\tpublic async showDataItem(dataItem: DataItem, duration?: number): Promise {\n\t\tconst promises = [super.showDataItem(dataItem, duration)];\n\t\tconst graphics = dataItem.get(\"graphics\");\n\t\tif (graphics) {\n\t\t\tpromises.push(graphics.show(duration));\n\t\t}\n\n\t\tconst rangeGraphics = dataItem.get(\"rangeGraphics\")!;\n\t\tif (rangeGraphics) {\n\t\t\t$array.each(rangeGraphics, (graphics) => {\n\t\t\t\tpromises.push(graphics.show(duration));\n\t\t\t})\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLegendMarker(dataItem?: DataItem) {\n\t\tlet legendDataItem = this.get(\"legendDataItem\");\n\n\t\tif (this.get(\"useLastColorForLegendMarker\")) {\n\t\t\tif (!dataItem) {\n\t\t\t\tconst lastDataItem = this.dataItems[this.endIndex() - 1];\n\t\t\t\tif (lastDataItem) {\n\t\t\t\t\tdataItem = lastDataItem;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (legendDataItem) {\n\n\t\t\tlet graphics: Template | Graphics = this.columns.template;\n\t\t\tif (dataItem) {\n\t\t\t\tlet column = dataItem.get(\"graphics\");\n\t\t\t\tif (column) {\n\t\t\t\t\tgraphics = column;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst markerRectangle = legendDataItem.get(\"markerRectangle\");\n\n\t\t\tif (markerRectangle) {\n\t\t\t\tif (!legendDataItem.get(\"itemContainer\").get(\"disabled\")) {\n\t\t\t\t\t$array.each(visualSettings, (setting: any) => {\n\t\t\t\t\t\tmarkerRectangle.set(setting, graphics.get(setting, this.get(setting)));\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n\n\tprotected _getTooltipTarget(dataItem: DataItem): Sprite {\n\t\tif (this.get(\"seriesTooltipTarget\") == \"bullet\") {\n\t\t\treturn super._getTooltipTarget(dataItem);\n\t\t}\n\n\t\tlet column = dataItem.get(\"graphics\");\n\t\tif (column) {\n\t\t\treturn column;\n\t\t}\n\t\treturn this;\n\t}\n}\n","import { RoundedRectangle, IRoundedRectangleSettings, IRoundedRectanglePrivate } from \"../../../core/render/RoundedRectangle\";\n\n\nexport interface ICandlestickSettings extends IRoundedRectangleSettings {\n\n\t/**\n\t * X0 position of the low value in pixels.\n\t */\n\tlowX0?: number;\n\n\t/**\n\t * Y0 position of the low value in pixels.\n\t */\n\tlowY0?: number;\n\n\t/**\n\t * X2 position of the low value in pixels.\n\t */\n\tlowX1?: number;\n\n\t/**\n\t * Y1 position of the low value in pixels.\n\t */\n\tlowY1?: number;\n\n\t/**\n\t * X0 position of the high value in pixels.\n\t */\n\thighX0?: number;\n\n\t/**\n\t * Y0 position of the high value in pixels.\n\t */\n\thighY0?: number;\n\n\t/**\n\t * Xz position of the high value in pixels.\n\t */\n\thighX1?: number;\n\n\t/**\n\t * Y1 position of the high value in pixels.\n\t */\n\thighY1?: number;\n\n\t/**\n\t * Orientation of the cnadlestick.\n\t */\n\torientation?: \"horizontal\" | \"vertical\"\n\n}\n\nexport interface ICandlestickPrivate extends IRoundedRectanglePrivate {\n}\n\n/**\n * A candle element used in a [[CandlestickSeries]].\n */\nexport class Candlestick extends RoundedRectangle {\n\n\tdeclare public _settings: ICandlestickSettings;\n\tdeclare public _privateSettings: ICandlestickPrivate;\n\n\tpublic static className: string = \"Candlestick\";\n\tpublic static classNames: Array = RoundedRectangle.classNames.concat([Candlestick.className]);\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"lowX0\") || this.isDirty(\"lowY0\") || this.isDirty(\"lowX1\") || this.isDirty(\"lowY1\") || this.isDirty(\"highX0\") || this.isDirty(\"highX1\") || this.isDirty(\"highY0\") || this.isDirty(\"highY1\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\t}\n\n\tpublic _draw() {\n\t\tsuper._draw();\n\n\t\tconst display = this._display;\n\n\t\tdisplay.moveTo(this.get(\"lowX0\", 0), this.get(\"lowY0\", 0));\n\t\tdisplay.lineTo(this.get(\"lowX1\", 0), this.get(\"lowY1\", 0));\n\n\t\tdisplay.moveTo(this.get(\"highX0\", 0), this.get(\"highY0\", 0));\n\t\tdisplay.lineTo(this.get(\"highX1\", 0), this.get(\"highY1\", 0));\n\t}\n}\n","import type { DataItem } from \"../../../core/render/Component\";\n\nimport { ColumnSeries, IColumnSeriesPrivate, IColumnSeriesSettings, IColumnSeriesDataItem, IColumnSeriesAxisRange } from \"./ColumnSeries\";\nimport { Candlestick } from \"./Candlestick\";\nimport { Template } from \"../../../core/util/Template\";\nimport { ListTemplate } from \"../../../core/util/List\";\n\nimport * as $utils from \"../../../core/util/Utils\";\nimport * as $array from \"../../../core/util/Array\";\n\nexport interface ICandlestickSeriesDataItem extends IColumnSeriesDataItem {\n}\n\nexport interface ICandlestickSeriesSettings extends IColumnSeriesSettings {\n}\n\nexport interface ICandlestickSeriesPrivate extends IColumnSeriesPrivate {\n}\n\nexport interface ICandlestickSeriesAxisRange extends IColumnSeriesAxisRange {\n\n\t/**\n\t * A list of [[Candlestick]] element in series.\n\t *\n\t * @readonly\n\t */\n\tcolumns: ListTemplate\n\n}\n\n/**\n * Candlestick series.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/candlestick-series/} for more info\n * @important\n */\nexport class CandlestickSeries extends ColumnSeries {\n\n\tdeclare public _settings: ICandlestickSeriesSettings;\n\tdeclare public _privateSettings: ICandlestickSeriesPrivate;\n\tdeclare public _dataItemSettings: ICandlestickSeriesDataItem;\n\tdeclare public _axisRangeType: ICandlestickSeriesAxisRange;\n\n\tpublic static className: string = \"CandlestickSeries\";\n\tpublic static classNames: Array = ColumnSeries.classNames.concat([CandlestickSeries.className]);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeColumn(dataItem: DataItem, listTemplate: ListTemplate): Candlestick {\n\t\tconst column = this.mainContainer.children.push(listTemplate.make());\n\t\tcolumn._setDataItem(dataItem);\n\t\tlistTemplate.push(column);\n\t\treturn column;\n\t}\n\n\t/**\n\t * A list of candles in the series.\n\t *\n\t * `columns.template` can be used to configure candles.\n\t *\n\t * @default new ListTemplate\n\t */\n\tpublic readonly columns: ListTemplate = new ListTemplate(\n\t\tTemplate.new({\n\t\t\tthemeTags: [\"autocolor\"]\n\t\t}),\n\t\t() => Candlestick._new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.columns.template.get(\"themeTags\", []), [\"candlestick\", \"series\", \"column\"])\n\t\t}, [this.columns.template])\n\t);\n\n\tprotected _updateGraphics(dataItem: DataItem, previousDataItem: DataItem) {\n\t\tsuper._updateGraphics(dataItem, previousDataItem);\n\n\t\tconst xAxis = this.getRaw(\"xAxis\");\n\t\tconst yAxis = this.getRaw(\"yAxis\");\n\t\tconst baseAxis = this.getRaw(\"baseAxis\");\n\n\t\tlet vcy = this.get(\"vcy\", 1);\n\t\tlet vcx = this.get(\"vcx\", 1);\n\n\t\tlet lx0: number;\n\t\tlet lx1: number;\n\t\tlet ly0: number;\n\t\tlet ly1: number;\n\n\t\tlet hx0: number;\n\t\tlet hx1: number;\n\t\tlet hy0: number;\n\t\tlet hy1: number;\n\n\t\tlet locationX = this.get(\"locationX\", dataItem.get(\"locationX\", 0.5));\n\t\tlet locationY = this.get(\"locationY\", dataItem.get(\"locationY\", 0.5));\n\n\t\tlet openLocationX = this.get(\"openLocationX\", dataItem.get(\"openLocationX\", locationX));\n\t\tlet openLocationY = this.get(\"openLocationY\", dataItem.get(\"openLocationY\", locationY));\n\n\t\tlet orientation: \"horizontal\" | \"vertical\";\n\n\t\tif (yAxis === baseAxis) {\n\t\t\tlet open = xAxis.getDataItemPositionX(dataItem, this._xOpenField, 1, vcx);\n\t\t\tlet close = xAxis.getDataItemPositionX(dataItem, this._xField, 1, vcx);\n\n\t\t\tlx1 = xAxis.getDataItemPositionX(dataItem, this._xLowField, 1, vcx);\n\t\t\thx1 = xAxis.getDataItemPositionX(dataItem, this._xHighField, 1, vcx);\n\n\t\t\thx0 = Math.max(open, close);\n\t\t\tlx0 = Math.min(open, close);\n\n\t\t\tlet startLocation = this._aLocationY0 + openLocationY - 0.5;\n\t\t\tlet endLocation = this._aLocationY1 + locationY - 0.5;\n\n\t\t\tly0 = yAxis.getDataItemPositionY(dataItem, this._yField, startLocation + (endLocation - startLocation) / 2, vcy);\n\t\t\tly1 = ly0;\n\t\t\thy0 = ly0;\n\t\t\thy1 = ly0;\n\n\t\t\torientation = \"horizontal\";\n\t\t}\n\t\telse {\n\t\t\tlet open = yAxis.getDataItemPositionY(dataItem, this._yOpenField, 1, vcy);\n\t\t\tlet close = yAxis.getDataItemPositionY(dataItem, this._yField, 1, vcy);\n\n\t\t\tly1 = yAxis.getDataItemPositionY(dataItem, this._yLowField, 1, vcy);\n\t\t\thy1 = yAxis.getDataItemPositionY(dataItem, this._yHighField, 1, vcy);\n\n\t\t\thy0 = Math.max(open, close);\n\t\t\tly0 = Math.min(open, close);\n\n\t\t\tlet startLocation = this._aLocationX0 + openLocationX - 0.5;\n\t\t\tlet endLocation = this._aLocationX1 + locationX - 0.5;\n\n\t\t\tlx0 = xAxis.getDataItemPositionX(dataItem, this._xField, startLocation + (endLocation - startLocation) / 2, vcx);\n\t\t\tlx1 = lx0;\n\t\t\thx0 = lx0;\n\t\t\thx1 = lx0;\n\n\t\t\torientation = \"vertical\";\n\t\t}\n\n\t\tthis._updateCandleGraphics(dataItem, lx0, lx1, ly0, ly1, hx0, hx1, hy0, hy1, orientation)\n\t}\n\n\tprotected _updateCandleGraphics(dataItem: DataItem, lx0: number, lx1: number, ly0: number, ly1: number, hx0: number, hx1: number, hy0: number, hy1: number, orientation: \"horizontal\" | \"vertical\") {\n\t\tlet column = dataItem.get(\"graphics\") as Candlestick;\n\n\t\tif (column) {\n\t\t\tlet pl0 = this.getPoint(lx0, ly0);\n\t\t\tlet pl1 = this.getPoint(lx1, ly1);\n\n\t\t\tlet ph0 = this.getPoint(hx0, hy0);\n\t\t\tlet ph1 = this.getPoint(hx1, hy1);\n\n\t\t\tlet x = column.x();\n\t\t\tlet y = column.y();\n\n\t\t\tcolumn.set(\"lowX0\", pl0.x - x);\n\t\t\tcolumn.set(\"lowY0\", pl0.y - y);\n\n\t\t\tcolumn.set(\"lowX1\", pl1.x - x);\n\t\t\tcolumn.set(\"lowY1\", pl1.y - y);\n\n\t\t\tcolumn.set(\"highX0\", ph0.x - x);\n\t\t\tcolumn.set(\"highY0\", ph0.y - y);\n\n\t\t\tcolumn.set(\"highX1\", ph1.x - x);\n\t\t\tcolumn.set(\"highY1\", ph1.y - y);\n\n\t\t\tcolumn.set(\"orientation\", orientation);\n\n\t\t\tlet rangeGraphics = dataItem.get(\"rangeGraphics\")!;\n\t\t\tif (rangeGraphics) {\n\t\t\t\t$array.each(rangeGraphics, (column: any) => {\n\t\t\t\t\tcolumn.set(\"lowX0\", pl0.x - x);\n\t\t\t\t\tcolumn.set(\"lowY0\", pl0.y - y);\n\n\t\t\t\t\tcolumn.set(\"lowX1\", pl1.x - x);\n\t\t\t\t\tcolumn.set(\"lowY1\", pl1.y - y);\n\n\t\t\t\t\tcolumn.set(\"highX0\", ph0.x - x);\n\t\t\t\t\tcolumn.set(\"highY0\", ph0.y - y);\n\n\t\t\t\t\tcolumn.set(\"highX1\", ph1.x - x);\n\t\t\t\t\tcolumn.set(\"highY1\", ph1.y - y);\n\n\t\t\t\t\tcolumn.set(\"orientation\", orientation);\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _processAxisRange(axisRange: this[\"_axisRangeType\"]) {\n\t\tsuper._processAxisRange(axisRange);\n\t\taxisRange.columns = new ListTemplate(\n\t\t\tTemplate.new({}),\n\t\t\t() => Candlestick._new(this._root, {\n\t\t\t\tthemeTags: $utils.mergeTags(axisRange.columns.template.get(\"themeTags\", []), [\"candlestick\", \"series\", \"column\"]),\n\t\t\t}, [this.columns.template, axisRange.columns.template])\n\t\t);\n\t}\n}\n","import type { DataItem } from \"../../../core/render/Component\";\r\n\r\nimport { BaseColumnSeries, IBaseColumnSeriesPrivate, IBaseColumnSeriesSettings, IBaseColumnSeriesDataItem, IBaseColumnSeriesAxisRange } from \"./BaseColumnSeries\";\r\nimport { Template } from \"../../../core/util/Template\";\r\nimport { ListTemplate } from \"../../../core/util/List\";\r\nimport { RoundedRectangle } from \"../../../core/render/RoundedRectangle\";\r\n\r\nimport * as $utils from \"../../../core/util/Utils\";\r\n\r\nexport interface IColumnSeriesDataItem extends IBaseColumnSeriesDataItem { }\r\n\r\nexport interface IColumnSeriesSettings extends IBaseColumnSeriesSettings { }\r\n\r\nexport interface IColumnSeriesPrivate extends IBaseColumnSeriesPrivate { }\r\n\r\nexport interface IColumnSeriesAxisRange extends IBaseColumnSeriesAxisRange {\r\n\t/**\r\n\t * A list of actual columns in a range.\r\n\t */\r\n\tcolumns: ListTemplate\r\n}\r\n\r\nexport class ColumnSeries extends BaseColumnSeries {\r\n\r\n\tdeclare public _settings: IColumnSeriesSettings;\r\n\tdeclare public _privateSettings: IColumnSeriesPrivate;\r\n\tdeclare public _dataItemSettings: IColumnSeriesDataItem;\r\n\tdeclare public _axisRangeType: IColumnSeriesAxisRange;\r\n\r\n\t/**\r\n\t * @ignore\r\n\t */\r\n\tpublic makeColumn(dataItem: DataItem, listTemplate: ListTemplate): RoundedRectangle {\r\n\t\tconst column = this.mainContainer.children.push(listTemplate.make());\r\n\t\tcolumn._setDataItem(dataItem);\r\n\t\tlistTemplate.push(column);\r\n\t\treturn column;\r\n\t}\r\n\r\n\t/**\r\n\t * A [[TemplateList]] of all columns in series.\r\n\t *\r\n\t * `columns.template` can be used to set default settings for all columns,\r\n\t * or to change on existing ones.\r\n\t */\r\n\tpublic readonly columns: ListTemplate = new ListTemplate(\r\n\t\tTemplate.new({}),\r\n\t\t() => RoundedRectangle._new(this._root, {\r\n\t\t\tposition: \"absolute\",\r\n\t\t\tthemeTags: $utils.mergeTags(this.columns.template.get(\"themeTags\", []), [\"series\", \"column\"])\r\n\t\t}, [this.columns.template])\r\n\t);\r\n\r\n\tpublic static className: string = \"ColumnSeries\";\r\n\tpublic static classNames: Array = BaseColumnSeries.classNames.concat([ColumnSeries.className]);\r\n\r\n\r\n\tprotected _processAxisRange(axisRange: this[\"_axisRangeType\"]) {\r\n\t\tsuper._processAxisRange(axisRange);\r\n\t\taxisRange.columns = new ListTemplate(\r\n\t\t\tTemplate.new({}),\r\n\t\t\t() => RoundedRectangle._new(this._root, {\r\n\t\t\t\tposition: \"absolute\",\r\n\t\t\t\tthemeTags: $utils.mergeTags(axisRange.columns.template.get(\"themeTags\", []), [\"series\", \"column\"]),\r\n\t\t\t}, [this.columns.template, axisRange.columns.template])\r\n\t\t);\r\n\t}\r\n}\r\n","import type { Axis } from \"../axes/Axis\";\nimport type { AxisRenderer } from \"../axes/AxisRenderer\";\n\nimport { XYSeries, IXYSeriesPrivate, IXYSeriesSettings, IXYSeriesDataItem, IXYSeriesAxisRange } from \"./XYSeries\";\nimport { Graphics } from \"../../../core/render/Graphics\";\nimport { CurveFactory, line, area } from \"d3-shape\";\nimport { Template } from \"../../../core/util/Template\";\nimport { ListTemplate } from \"../../../core/util/List\";\nimport { color } from \"../../../core/util/Color\";\nimport { DataItem } from \"../../../core/render/Component\";\nimport { Rectangle } from \"../../../core/render/Rectangle\";\n\nimport * as $type from \"../../../core/util/Type\";\nimport * as $array from \"../../../core/util/Array\";\nimport * as $utils from \"../../../core/util/Utils\";\n\nexport interface IPointOptions {\n}\n\nexport interface ILineSeriesDataItem extends IXYSeriesDataItem {\n}\n\nexport interface ILineSeriesSettings extends IXYSeriesSettings {\n\n\t/**\n\t * If set to `true` the line will connect over \"gaps\" - categories or time\n\t * intervals with no data.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/line-series/#Gaps} for more info\n\t * @default true\n\t */\n\tconnect?: boolean;\n\n\t/**\n\t * If there are more than `autoGapCount` base time intervals (e.g. days) with\n\t * no data, the line will break and will display gap.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/line-series/#Auto_gaps_with_dates} for more info\n\t * @default 1.1\n\t */\n\tautoGapCount?: number;\n\n\t/**\n\t * @ignore\n\t */\n\tcurveFactory?: CurveFactory;\n\n\t/**\n\t * Allows simplifying the line with many points.\n\t *\n\t * If set, the series will skip points that are closer than X pixels to each\n\t * other.\n\t *\n\t * With many data points, this allows having smoother, less cluttered lines.\n\t *\n\t * @default 0\n\t * @since 5.2.7\n\t */\n\tminDistance?: number;\n\n}\n\nexport interface ILineSeriesPrivate extends IXYSeriesPrivate {\n}\n\n/**\n * Interface representing a [[LineSeries]] axis range.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-ranges/#Series_axis_ranges} for more info\n */\nexport interface ILineSeriesAxisRange extends IXYSeriesAxisRange {\n\n\t/**\n\t * A list template to use when applying line settings to the line segments covered\n\t * by an axis range.\n\t */\n\tstrokes?: ListTemplate;\n\n\t/**\n\t * A list template to use when applying fill settings to the fill segments covered\n\t * by an axis range.\n\t */\n\tfills?: ListTemplate;\n}\n\n/**\n * Used to plot line and/or area series.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/line-series/} for more info\n * @important\n */\nexport class LineSeries extends XYSeries {\n\n\tdeclare public _settings: ILineSeriesSettings;\n\tdeclare public _privateSettings: ILineSeriesPrivate;\n\tdeclare public _dataItemSettings: ILineSeriesDataItem;\n\tdeclare public _axisRangeType: ILineSeriesAxisRange;\n\n\tpublic static className: string = \"LineSeries\";\n\tpublic static classNames: Array = XYSeries.classNames.concat([LineSeries.className]);\n\n\tprotected _endIndex!: number;\n\n\tprotected _strokeGenerator = line();\n\tprotected _fillGenerator = area();\n\n\tprotected _legendStroke?: Graphics;\n\tprotected _legendFill?: Graphics;\n\n\tprotected _afterNew() {\n\t\tthis._fillGenerator.y0(function(p: number[]) {\n\t\t\treturn p[3];\n\t\t});\n\n\t\tthis._fillGenerator.x0(function(p: number[]) {\n\t\t\treturn p[2];\n\t\t});\n\n\t\tthis._fillGenerator.y1(function(p: number[]) {\n\t\t\treturn p[1];\n\t\t});\n\n\t\tthis._fillGenerator.x1(function(p: number[]) {\n\t\t\treturn p[0];\n\t\t});\n\n\t\tsuper._afterNew();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeStroke(strokes: ListTemplate): Graphics {\n\t\tconst stroke = this.mainContainer.children.push(strokes.make());\n\t\tstrokes.push(stroke);\n\t\treturn stroke;\n\t}\n\n\t/**\n\t * A [[TemplateList]] of all line segments in series.\n\t *\n\t * `strokes.template` can be used to set default settings for all line\n\t * segments, or to change on existing ones.\n\t *\n\t * @default new ListTemplate\n\t */\n\tpublic readonly strokes: ListTemplate = new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => Graphics._new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.strokes.template.get(\"themeTags\", []), [\"line\", \"series\", \"stroke\"])\n\t\t}, [this.strokes.template]),\n\t);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeFill(fills: ListTemplate): Graphics {\n\t\tconst fill = this.mainContainer.children.push(fills.make());\n\t\tfills.push(fill);\n\t\treturn fill;\n\t}\n\n\t/**\n\t * A [[TemplateList]] of all segment fills in series.\n\t *\n\t * `fills.template` can be used to set default settings for all segment\n\t * fills, or to change on existing ones.\n\t *\n\t * @default new ListTemplate\n\t */\n\tpublic readonly fills: ListTemplate = new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => Graphics._new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.strokes.template.get(\"themeTags\", []), [\"line\", \"series\", \"fill\"])\n\t\t}, [this.fills.template]),\n\t);\n\n\t// custom set from data\n\tprotected _fillTemplate: Template | undefined;\n\tprotected _strokeTemplate: Template | undefined;\n\n\tprotected _previousPoint: Array = [0, 0, 0, 0];\n\n\tprotected _dindex = 0;\n\tprotected _sindex = 0;\n\n\tpublic _updateChildren() {\n\n\t\tthis._strokeTemplate = undefined;\n\t\tthis._fillTemplate = undefined;\n\n\t\tlet xAxis = this.get(\"xAxis\");\n\t\tlet yAxis = this.get(\"yAxis\");\n\n\t\tif (this.isDirty(\"stroke\")) {\n\t\t\tconst stroke = this.get(\"stroke\");\n\t\t\tthis.strokes.template.set(\"stroke\", stroke);\n\t\t\tconst legendStroke = this._legendStroke;\n\t\t\tif (legendStroke) {\n\t\t\t\tlegendStroke.states.lookup(\"default\")!.set(\"stroke\", stroke);\n\t\t\t}\n\t\t}\n\t\tif (this.isDirty(\"fill\")) {\n\t\t\tconst fill = this.get(\"fill\");\n\t\t\tthis.fills.template.set(\"fill\", fill);\n\t\t\tconst legendFill = this._legendFill;\n\t\t\tif (legendFill) {\n\t\t\t\tlegendFill.states.lookup(\"default\")!.set(\"fill\", fill);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"curveFactory\")) {\n\t\t\tconst curveFactory = this.get(\"curveFactory\")!;\n\t\t\tif (curveFactory) {\n\t\t\t\tthis._strokeGenerator.curve(curveFactory);\n\t\t\t\tthis._fillGenerator.curve(curveFactory);\n\t\t\t}\n\t\t}\n\n\t\tif (xAxis.inited && yAxis.inited) {\n\t\t\tif (this._axesDirty || this._valuesDirty || this._stackDirty || this.isDirty(\"vcx\") || this.isDirty(\"vcy\") || this._sizeDirty || this.isDirty(\"connect\") || this.isDirty(\"curveFactory\")) {\n\n\t\t\t\tthis.fills.each((fill) => {\n\t\t\t\t\tfill.setPrivate(\"visible\", false);\n\t\t\t\t})\n\n\t\t\t\tthis.strokes.each((fill) => {\n\t\t\t\t\tfill.setPrivate(\"visible\", false);\n\t\t\t\t})\n\n\t\t\t\tthis.axisRanges.each((axisRange) => {\n\t\t\t\t\tlet fills = axisRange.fills;\n\t\t\t\t\tif (fills) {\n\t\t\t\t\t\tfills.each((fill) => {\n\t\t\t\t\t\t\tfill.setPrivate(\"visible\", false);\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\n\t\t\t\t\tlet strokes = axisRange.strokes;\n\t\t\t\t\tif (strokes) {\n\t\t\t\t\t\tstrokes.each((stroke) => {\n\t\t\t\t\t\t\tstroke.setPrivate(\"visible\", false);\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tlet startIndex = this.startIndex();\n\n\t\t\t\tlet strokeTemplateField = this.strokes.template.get(\"templateField\");\n\t\t\t\tlet fillTemplateField = this.fills.template.get(\"templateField\");\n\n\t\t\t\tlet strokeTemplateFound = true;\n\t\t\t\tlet fillTemplateFound = true;\n\n\t\t\t\tif (strokeTemplateField) {\n\t\t\t\t\tstrokeTemplateFound = false;\n\t\t\t\t}\n\t\t\t\tif (fillTemplateField) {\n\t\t\t\t\tfillTemplateFound = false;\n\t\t\t\t}\n\n\t\t\t\tfor (let i = startIndex - 1; i >= 0; i--) {\n\t\t\t\t\tlet dataItem = this.dataItems[i];\n\t\t\t\t\tlet hasValues = true;\n\t\t\t\t\tlet dataContext = dataItem.dataContext as any;\n\t\t\t\t\tif (strokeTemplateField) {\n\t\t\t\t\t\tif (dataContext[strokeTemplateField]) {\n\t\t\t\t\t\t\tstrokeTemplateFound = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (fillTemplateField) {\n\t\t\t\t\t\tif (dataContext[fillTemplateField]) {\n\t\t\t\t\t\t\tfillTemplateFound = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$array.each(this._valueFields, (field) => {\n\t\t\t\t\t\tif (!$type.isNumber(dataItem.get(field as any))) {\n\t\t\t\t\t\t\thasValues = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\tif (hasValues && strokeTemplateFound && fillTemplateFound) {\n\t\t\t\t\t\tstartIndex = i;\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlet len = this.dataItems.length;\n\t\t\t\tlet endIndex = this.endIndex();\n\n\t\t\t\tif (endIndex < len) {\n\t\t\t\t\tendIndex++;\n\t\t\t\t\tfor (let i = endIndex; i < len; i++) {\n\t\t\t\t\t\tlet dataItem = this.dataItems[i];\n\t\t\t\t\t\tlet hasValues = true;\n\t\t\t\t\t\t$array.each(this._valueFields, (field) => {\n\t\t\t\t\t\t\tif (!$type.isNumber(dataItem.get(field as any))) {\n\t\t\t\t\t\t\t\thasValues = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\tif (hasValues) {\n\t\t\t\t\t\t\tendIndex = i + 1;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (startIndex > 0) {\n\t\t\t\t\tstartIndex--\n\t\t\t\t}\n\n\t\t\t\tthis._endIndex = endIndex;\n\n\t\t\t\tthis._clearGraphics();\n\t\t\t\tthis._sindex = 0;\n\t\t\t\tthis._dindex = startIndex;\n\t\t\t\tif (this.dataItems.length == 1) {\n\t\t\t\t\tthis._startSegment(0);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// this is done to avoid recursion with a lot of segments \n\t\t\t\t\twhile (this._dindex < endIndex - 1) {\n\t\t\t\t\t\tthis._startSegment(this._dindex);\n\t\t\t\t\t\tthis._sindex++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis._skipped = true;\n\t\t}\n\n\t\tsuper._updateChildren();\n\t}\n\n\tprotected _clearGraphics() {\n\t\tthis.strokes.clear();\n\t\tthis.fills.clear();\n\t}\n\n\tprotected _startSegment(dataItemIndex: number) {\n\t\tlet endIndex = this._endIndex;\n\t\tlet currentEndIndex = endIndex;\n\n\t\tconst autoGapCount = this.get(\"autoGapCount\")!;\n\t\tconst connect = this.get(\"connect\");\n\n\t\tconst fill = this.makeFill(this.fills);\n\n\t\tconst fillTemplate = this._fillTemplate;\n\t\tconst originalTemplate = this.fills.template;\n\t\tif (fillTemplate && fillTemplate != originalTemplate) {\n\t\t\tfill.template = fillTemplate;\n\t\t}\n\n\t\tfill.setPrivate(\"visible\", true);\n\n\t\tconst stroke = this.makeStroke(this.strokes);\n\n\t\tconst strokeTemplate = this._strokeTemplate;\n\t\tif (strokeTemplate && strokeTemplate != this.strokes.template) {\n\t\t\tstroke.template = strokeTemplate;\n\t\t}\n\n\t\tstroke.setPrivate(\"visible\", true);\n\n\t\tlet xAxis = this.get(\"xAxis\");\n\t\tlet yAxis = this.get(\"yAxis\");\n\t\tlet baseAxis = this.get(\"baseAxis\")!;\n\n\t\tlet vcx = this.get(\"vcx\", 1);\n\t\tlet vcy = this.get(\"vcy\", 1);\n\n\t\tlet xField = this._xField;\n\t\tlet yField = this._yField;\n\n\t\tlet xOpenField = this._xOpenField;\n\t\tlet yOpenField = this._yOpenField;\n\n\t\tconst xOpenFieldValue = this.get(\"openValueXField\");\n\t\tconst yOpenFieldValue = this.get(\"openValueYField\");\n\n\t\tif (!xOpenFieldValue) {\n\t\t\txOpenField = this._xField;\n\t\t}\n\n\t\tif (!yOpenFieldValue) {\n\t\t\tyOpenField = this._yField;\n\t\t}\n\n\t\tconst stacked = this.get(\"stacked\");\n\n\t\tconst basePosX = xAxis.basePosition();\n\t\tconst basePosY = yAxis.basePosition();\n\n\t\tlet baseField: string;\n\t\tif (baseAxis === yAxis) {\n\t\t\tbaseField = this._yField;\n\t\t}\n\t\telse {\n\t\t\tbaseField = this._xField;\n\t\t}\n\n\t\tconst segments: Array>> = [];\n\t\tlet points: Array> = [];\n\t\tsegments.push(points);\n\n\t\tconst strokeTemplateField = this.strokes.template.get(\"templateField\");\n\t\tconst fillTemplateField = this.fills.template.get(\"templateField\");\n\n\t\tlet locationX = this.get(\"locationX\", 0.5);\n\t\tlet locationY = this.get(\"locationY\", 0.5);\n\n\t\tlet openLocationX = this.get(\"openLocationX\", locationX);\n\t\tlet openLocationY = this.get(\"openLocationY\", locationY);\n\n\t\tconst minDistance = this.get(\"minDistance\", 0);\n\n\t\tlet i: number;\n\n\t\tlet fillVisible = this.fills.template.get(\"visible\");\n\t\tif (this.axisRanges.length > 0) {\n\t\t\tfillVisible = true;\n\t\t}\n\n\t\tlet getOpen = false;\n\t\tif (stacked || xOpenFieldValue || yOpenFieldValue) {\n\t\t\tgetOpen = true;\n\t\t}\n\n\t\tconst o = {\n\t\t\tpoints, segments, stacked, getOpen, basePosX, basePosY, fillVisible, xField, yField, xOpenField, yOpenField, vcx, vcy, baseAxis, xAxis, yAxis, locationX, locationY, openLocationX, openLocationY, minDistance\n\t\t}\n\n\n\t\tfor (i = dataItemIndex; i < currentEndIndex; i++) {\n\t\t\tthis._dindex = i;\n\t\t\tconst dataItem = this._dataItems[i];\n\n\t\t\tlet valueX = dataItem.get(xField as any);\n\t\t\tlet valueY = dataItem.get(yField as any);\n\n\t\t\tif (valueX == null || valueY == null) {\n\t\t\t\tif (!connect) {\n\t\t\t\t\tpoints = [];\n\t\t\t\t\tsegments.push(points);\n\t\t\t\t\to.points = points;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._getPoints(dataItem, o);\n\t\t\t}\n\n\t\t\tif (strokeTemplateField) {\n\t\t\t\tlet strokeTemplate = (dataItem.dataContext as any)[strokeTemplateField]\n\t\t\t\tif (strokeTemplate) {\n\t\t\t\t\tif (!(strokeTemplate instanceof Template)) {\n\t\t\t\t\t\tstrokeTemplate = Template.new(strokeTemplate);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._strokeTemplate = strokeTemplate;\n\t\t\t\t\tif (i > dataItemIndex) {\n\t\t\t\t\t\tcurrentEndIndex = i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstroke.template = strokeTemplate;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (fillTemplateField) {\n\t\t\t\tlet fillTemplate = (dataItem.dataContext as any)[fillTemplateField]\n\t\t\t\tif (fillTemplate) {\n\t\t\t\t\tif (!(fillTemplate instanceof Template)) {\n\t\t\t\t\t\tfillTemplate = Template.new(fillTemplate);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._fillTemplate = fillTemplate;\n\t\t\t\t\tif (i > dataItemIndex) {\n\t\t\t\t\t\tcurrentEndIndex = i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tfill.template = fillTemplate;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!connect) {\n\t\t\t\tlet nextItem = this.dataItems[i + 1];\n\t\t\t\tif (nextItem) {\n\t\t\t\t\tif (baseAxis.shouldGap(dataItem, nextItem, autoGapCount, baseField)) {\n\t\t\t\t\t\tpoints = [];\n\t\t\t\t\t\tsegments.push(points);\n\t\t\t\t\t\to.points = points;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfill.setRaw(\"userData\", [dataItemIndex, i]);\n\t\tstroke.setRaw(\"userData\", [dataItemIndex, i]);\n\n\t\tif (i === endIndex) {\n\t\t\tthis._endLine(points, segments[0][0]);\n\t\t}\n\n\t\tif (stroke) {\n\t\t\tthis._drawStroke(stroke, segments);\n\t\t}\n\n\t\tif (fill) {\n\t\t\tthis._drawFill(fill, segments);\n\t\t}\n\n\t\tthis.axisRanges.each((axisRange) => {\n\t\t\tconst container = axisRange.container;\n\t\t\tconst fills = axisRange.fills!;\n\t\t\tconst fill = this.makeFill(fills);\n\n\t\t\tif (container) {\n\t\t\t\tcontainer.children.push(fill);\n\t\t\t}\n\n\t\t\tfill.setPrivate(\"visible\", true);\n\t\t\tthis._drawFill(fill, segments);\n\n\t\t\tconst strokes = axisRange.strokes!;\n\t\t\tconst stroke = this.makeStroke(strokes);\n\t\t\tif (container) {\n\t\t\t\tcontainer.children.push(stroke);\n\t\t\t}\n\n\t\t\tstroke.setPrivate(\"visible\", true);\n\t\t\tthis._drawStroke(stroke, segments);\n\n\t\t\tfill.setRaw(\"userData\", [dataItemIndex, i]);\n\t\t\tstroke.setRaw(\"userData\", [dataItemIndex, i]);\n\t\t})\n\t}\n\n\tprotected _getPoints(dataItem: DataItem, o: { points: Array>, segments: number[][][], stacked: boolean | undefined, getOpen: boolean, basePosX: number, basePosY: number, fillVisible: boolean | undefined, xField: string, yField: string, xOpenField: string, yOpenField: string, vcx: number, vcy: number, baseAxis: Axis, xAxis: Axis, yAxis: Axis, locationX: number, locationY: number, openLocationX: number, openLocationY: number, minDistance: number }) {\n\t\tlet points = o.points;\n\n\t\tlet itemLocationX = dataItem.get(\"locationX\", o.locationX);\n\t\tlet itemLocationY = dataItem.get(\"locationY\", o.locationY);\n\n\t\tlet xPos = o.xAxis.getDataItemPositionX(dataItem, o.xField, itemLocationX, o.vcx);\n\t\tlet yPos = o.yAxis.getDataItemPositionY(dataItem, o.yField, itemLocationY, o.vcy);\n\n\t\tif (this._shouldInclude(xPos)) {\n\n\t\t\tconst iPoint = this.getPoint(xPos, yPos);\n\t\t\tconst point = [iPoint.x, iPoint.y];\n\n\t\t\tiPoint.x += this._x;\n\t\t\tiPoint.y += this._y;\n\n\t\t\tdataItem.set(\"point\", iPoint);\n\n\t\t\tif (o.fillVisible) {\n\t\t\t\tlet xPos0: number = xPos;\n\t\t\t\tlet yPos0: number = yPos;\n\n\t\t\t\tif (o.baseAxis === o.xAxis) {\n\t\t\t\t\tyPos0 = o.basePosY;\n\t\t\t\t}\n\t\t\t\telse if (o.baseAxis === o.yAxis) {\n\t\t\t\t\txPos0 = o.basePosX;\n\t\t\t\t}\n\n\t\t\t\tif (o.getOpen) {\n\t\t\t\t\tlet valueX = dataItem.get(o.xOpenField as any);\n\t\t\t\t\tlet valueY = dataItem.get(o.yOpenField as any);\n\n\t\t\t\t\tif (valueX != null && valueY != null) {\n\t\t\t\t\t\tlet itemLocationX = dataItem.get(\"openLocationX\", o.openLocationX);\n\t\t\t\t\t\tlet itemLocationY = dataItem.get(\"openLocationY\", o.openLocationY);\n\n\t\t\t\t\t\tif (o.stacked) {\n\t\t\t\t\t\t\tlet stackToItemX = dataItem.get(\"stackToItemX\")!;\n\t\t\t\t\t\t\tlet stackToItemY = dataItem.get(\"stackToItemY\")!;\n\n\t\t\t\t\t\t\tif (stackToItemX) {\n\t\t\t\t\t\t\t\txPos0 = o.xAxis.getDataItemPositionX(stackToItemX, o.xField, itemLocationX, (stackToItemX.component as XYSeries).get(\"vcx\"));\n\t\t\t\t\t\t\t\tif ($type.isNaN(xPos0)) {\n\t\t\t\t\t\t\t\t\txPos0 = o.basePosX;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tif (o.yAxis === o.baseAxis) {\n\t\t\t\t\t\t\t\t\txPos0 = o.basePosX;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\txPos0 = o.xAxis.getDataItemPositionX(dataItem, o.xOpenField, itemLocationX, o.vcx);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (stackToItemY) {\n\t\t\t\t\t\t\t\tyPos0 = o.yAxis.getDataItemPositionY(stackToItemY, o.yField, itemLocationY, (stackToItemY.component as XYSeries).get(\"vcy\"));\n\t\t\t\t\t\t\t\tif ($type.isNaN(yPos0)) {\n\t\t\t\t\t\t\t\t\tyPos0 = o.basePosY;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tif (o.xAxis === o.baseAxis) {\n\t\t\t\t\t\t\t\t\tyPos0 = o.basePosY;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tyPos0 = o.yAxis.getDataItemPositionY(dataItem, o.yOpenField, itemLocationY, o.vcy);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\txPos0 = o.xAxis.getDataItemPositionX(dataItem, o.xOpenField, itemLocationX, o.vcx);\n\t\t\t\t\t\t\tyPos0 = o.yAxis.getDataItemPositionY(dataItem, o.yOpenField, itemLocationY, o.vcy);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlet closeIPoint = this.getPoint(xPos0, yPos0);\n\n\t\t\t\tpoint[2] = closeIPoint.x;\n\t\t\t\tpoint[3] = closeIPoint.y;\n\t\t\t}\n\n\t\t\tif (o.minDistance > 0) {\n\t\t\t\tconst p0 = point[0];\n\t\t\t\tconst p1 = point[1];\n\t\t\t\tconst p2 = point[2];\n\t\t\t\tconst p3 = point[3];\n\n\t\t\t\tconst prev = this._previousPoint;\n\n\t\t\t\tconst pp0 = prev[0];\n\t\t\t\tconst pp1 = prev[1];\n\t\t\t\tconst pp2 = prev[2];\n\t\t\t\tconst pp3 = prev[3];\n\n\t\t\t\tif (Math.hypot(p0 - pp0, p1 - pp1) > o.minDistance || (p2 && p3 && Math.hypot(p2 - pp2, p3 - pp3) > o.minDistance)) {\n\t\t\t\t\tpoints.push(point);\n\t\t\t\t\tthis._previousPoint = point;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoints.push(point);\n\t\t\t}\n\t\t}\n\t}\n\n\n\tprotected _endLine(_points: Array>, _firstPoint: Array) {\n\n\t}\n\n\tprotected _drawStroke(graphics: Graphics, segments: number[][][]) {\n\t\tif (graphics.get(\"visible\")) {\n\t\t\tgraphics.set(\"draw\", (display) => {\n\t\t\t\t$array.each(segments, (segment) => {\n\t\t\t\t\tthis._strokeGenerator.context(display as any);\n\t\t\t\t\tthis._strokeGenerator(segment as [number, number][]);\n\t\t\t\t})\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _drawFill(graphics: Graphics, segments: number[][][]) {\n\t\tif (graphics.get(\"visible\")) {\n\t\t\tgraphics.set(\"draw\", (display) => {\n\t\t\t\t$array.each(segments, (segment) => {\n\t\t\t\t\tthis._fillGenerator.context(display as any);\n\t\t\t\t\tthis._fillGenerator(segment as [number, number][]);\n\t\t\t\t})\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _processAxisRange(axisRange: this[\"_axisRangeType\"]) {\n\t\tsuper._processAxisRange(axisRange);\n\t\taxisRange.fills = new ListTemplate(\n\t\t\tTemplate.new({}),\n\t\t\t() => Graphics._new(this._root, {\n\t\t\t\tthemeTags: $utils.mergeTags(axisRange.fills!.template.get(\"themeTags\", []), [\"line\", \"series\", \"fill\"]),\n\t\t\t}, [this.fills.template, axisRange.fills!.template]),\n\t\t);\n\n\t\taxisRange.strokes = new ListTemplate(\n\t\t\tTemplate.new({}),\n\t\t\t() => Graphics._new(this._root, {\n\t\t\t\tthemeTags: $utils.mergeTags(axisRange.strokes!.template.get(\"themeTags\", []), [\"line\", \"series\", \"stroke\"]),\n\t\t\t}, [this.strokes.template, axisRange.strokes!.template])\n\t\t);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic createLegendMarker(_dataItem?: DataItem) {\n\n\t\tconst legendDataItem = this.get(\"legendDataItem\");\n\n\t\tif (legendDataItem) {\n\t\t\tconst marker = legendDataItem.get(\"marker\");\n\n\t\t\tconst markerRectangle = legendDataItem.get(\"markerRectangle\");\n\t\t\tif (markerRectangle) {\n\t\t\t\tmarkerRectangle.setPrivate(\"visible\", false);\n\t\t\t}\n\n\t\t\tmarker.set(\"background\", Rectangle.new(marker._root, { fillOpacity: 0, fill: color(0x000000) }))\n\n\t\t\tconst legendStroke = marker.children.push(Graphics._new(marker._root, {\n\t\t\t\tthemeTags: [\"line\", \"series\", \"legend\", \"marker\", \"stroke\"], interactive: false\n\t\t\t}, [this.strokes.template]));\n\n\t\t\tthis._legendStroke = legendStroke;\n\n\t\t\tconst legendFill = marker.children.push(Graphics._new(marker._root, {\n\t\t\t\tthemeTags: [\"line\", \"series\", \"legend\", \"marker\", \"fill\"]\n\t\t\t}, [this.fills.template]));\n\n\t\t\tthis._legendFill = legendFill;\n\n\t\t\tconst disabledColor = this._root.interfaceColors.get(\"disabled\");\n\n\t\t\tlegendStroke.states.create(\"disabled\", { fill: disabledColor, stroke: disabledColor });\n\t\t\tlegendFill.states.create(\"disabled\", { fill: disabledColor, stroke: disabledColor });\n\n\t\t\tif (this.bullets.length > 0) {\n\t\t\t\tconst bulletFunction = this.bullets.getIndex(0);\n\t\t\t\tif (bulletFunction) {\n\t\t\t\t\tconst bullet = bulletFunction(marker._root, this, new DataItem(this, {}, {}));\n\t\t\t\t\tif (bullet) {\n\t\t\t\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\t\t\t\tif (sprite instanceof Graphics) {\n\t\t\t\t\t\t\tsprite.states.create(\"disabled\", { fill: disabledColor, stroke: disabledColor });\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (sprite) {\n\t\t\t\t\t\t\tsprite.set(\"tooltipText\", undefined);\n\t\t\t\t\t\t\tsprite.set(\"tooltipHTML\", undefined);\n\n\t\t\t\t\t\t\tmarker.children.push(sprite);\n\t\t\t\t\t\t\tsprite.setAll({ x: marker.width() / 2, y: marker.height() / 2 });\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import type { Axis, IAxisPrivate, IAxisDataItem } from \"../axes/Axis\";\nimport type { AxisRenderer } from \"../axes/AxisRenderer\";\nimport type { IPoint } from \"../../../core/util/IPoint\";\nimport type { Sprite } from \"../../../core/render/Sprite\";\nimport type { Bullet } from \"../../../core/render/Bullet\";\nimport type { XYChart } from \"../XYChart\";\nimport type { CategoryAxis } from \"../axes/CategoryAxis\";\nimport type { DateAxis } from \"../axes/DateAxis\";\nimport type { ITimeInterval } from \"../../../core/util/Time\";\n\nimport { DataItem } from \"../../../core/render/Component\";\nimport { Series, ISeriesSettings, ISeriesDataItem, ISeriesPrivate, ISeriesEvents } from \"../../../core/render/Series\";\nimport { List } from \"../../../core/util/List\";\nimport { Container } from \"../../../core/render/Container\";\nimport { Graphics } from \"../../../core/render/Graphics\";\n\nimport * as $type from \"../../../core/util/Type\";\nimport * as $object from \"../../../core/util/Object\";\nimport * as $array from \"../../../core/util/Array\";\nimport * as $utils from \"../../../core/util/Utils\";\n\n/**\n * @ignore\n */\nfunction min(left: number | undefined, right: number | undefined): number | undefined {\n\tif (left == null) {\n\t\treturn right;\n\n\t} else if (right == null) {\n\t\treturn left;\n\n\t} else if (right < left) {\n\t\treturn right;\n\n\t} else {\n\t\treturn left;\n\t}\n}\n\n/**\n * @ignore\n */\nfunction max(left: number | undefined, right: number | undefined): number | undefined {\n\tif (left == null) {\n\t\treturn right;\n\n\t} else if (right == null) {\n\t\treturn left;\n\n\t} else if (right > left) {\n\t\treturn right;\n\n\t} else {\n\t\treturn left;\n\t}\n}\n\n/**\n * Interface representing a series axis range.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-ranges/#Series_axis_ranges} for more info\n */\nexport interface IXYSeriesAxisRange {\n\n\t/**\n\t * Related axis data item.\n\t */\n\taxisDataItem: DataItem;\n\n\t/**\n\t * A [[Container]] element that range's elements are placed in.\n\t */\n\tcontainer?: Container;\n\n\t/**\n\t * Target series.\n\t */\n\tseries?: XYSeries;\n\n}\n\nexport interface IXYAxisPrivate extends IAxisPrivate {\n\tmin?: number;\n\tmax?: number;\n}\n\nexport interface IXYAxis extends Axis {\n\t_privateSettings: IXYAxisPrivate;\n}\n\nexport interface IXYSeriesEvents extends ISeriesEvents {\n\n\t/**\n\t * Kicks in when axis starts using different data set, e.g. data\n\t * of different granularit on [[DateAxis]].\n\t *\n\t * @since 5.1.1\n\t */\n\tdatasetchanged: {\n\t\tid: string\n\t}\n}\n\n/**\n * XY chart series data item.\n */\nexport interface IXYSeriesDataItem extends ISeriesDataItem {\n\tvalueX?: number;\n\tvalueXWorking?: number;\n\tvalueXChange?: number;\n\tvalueXChangePercent?: number;\n\tvalueXChangeSelection?: number;\n\tvalueXChangeSelectionPercent?: number;\n\tvalueXChangePrevious?: number;\n\tvalueXChangePreviousPercent?: number;\n\tvalueXWorkingOpen?: number;\n\tvalueXWorkingClose?: number;\n\n\tvalueY?: number;\n\tvalueYChange?: number;\n\tvalueYWorking?: number;\n\tvalueYChangePercent?: number;\n\tvalueYChangeSelection?: number;\n\tvalueYChangeSelectionPercent?: number;\n\tvalueYChangePrevious?: number;\n\tvalueYChangePreviousPercent?: number;\n\tvalueYWorkingOpen?: number;\n\tvalueYWorkingClose?: number;\n\n\topenValueX?: number;\n\topenValueXWorking?: number;\n\topenValueXChange?: number;\n\topenValueXChangePercent?: number;\n\topenValueXChangeSelection?: number;\n\topenValueXChangeSelectionPercent?: number;\n\topenValueXChangePrevious?: number;\n\topenValueXChangePreviousPercent?: number;\n\topenValueXWorkingOpen?: number;\n\topenValueXWorkingClose?: number;\n\topenValueY?: number;\n\topenValueYWorking?: number;\n\topenValueYChange?: number;\n\topenValueYChangePercent?: number;\n\topenValueYChangeSelection?: number;\n\topenValueYChangeSelectionPercent?: number;\n\topenValueYChangePrevious?: number;\n\topenValueYChangePreviousPercent?: number;\n\topenValueYWorkingOpen?: number;\n\topenValueYWorkingClose?: number;\n\n\tlowValueX?: number;\n\tlowValueXWorking?: number;\n\tlowValueXChange?: number;\n\tlowValueXChangePercent?: number;\n\tlowValueXChangeSelection?: number;\n\tlowValueXChangeSelectionPercent?: number;\n\tlowValueXChangePrevious?: number;\n\tlowValueXChangePreviousPercent?: number;\n\tlowValueXWorkingOpen?: number;\n\tlowValueXWorkingClose?: number;\n\n\thighValueX?: number;\n\thighValueXWorking?: number;\n\thighValueXChange?: number;\n\thighValueXChangePercent?: number;\n\thighValueXChangeSelection?: number;\n\thighValueXChangeSelectionPercent?: number;\n\thighValueXChangePrevious?: number;\n\thighValueXChangePreviousPercent?: number;\n\thighValueXWorkingOpen?: number;\n\thighValueXWorkingClose?: number;\n\n\tlowValueY?: number;\n\tlowValueYWorking?: number;\n\tlowValueYChange?: number;\n\tlowValueYChangePercent?: number;\n\tlowValueYChangeSelection?: number;\n\tlowValueYChangeSelectionPercent?: number;\n\tlowValueYChangePrevious?: number;\n\tlowValueYChangePreviousPercent?: number;\n\tlowValueYWorkingOpen?: number;\n\tlowValueYWorkingClose?: number;\n\n\thighValueY?: number;\n\thighValueYWorking?: number;\n\thighValueYChange?: number;\n\thighValueYChangePercent?: number;\n\thighValueYChangeSelection?: number;\n\thighValueYChangeSelectionPercent?: number;\n\thighValueYChangePrevious?: number;\n\thighValueYChangePreviousPercent?: number;\n\thighValueYWorkingOpen?: number;\n\thighValueYWorkingClose?: number;\n\n\tcategoryX?: string;\n\tcategoryY?: string;\n\n\topenCategoryX?: string;\n\topenCategoryY?: string;\n\n\tlocationX?: number;\n\tlocationY?: number;\n\n\topenLocationX?: number;\n\topenLocationY?: number;\n\n\tstackToItemX?: DataItem;\n\tstackToItemY?: DataItem;\n\n\tleft?: number;\n\tright?: number;\n\ttop?: number;\n\tbottom?: number;\n\n\tpoint?: IPoint;\n\n\toriginals?: Array>;\n}\n\nexport interface IXYSeriesSettings extends ISeriesSettings {\n\n\t/**\n\t * Minimal distance between data items in pixels.\n\t *\n\t * If data items are closer than this, bullets are turned off to avoid\n\t * overcrowding.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Bullets} for more info\n\t */\n\tminBulletDistance?: number;\n\n\t/**\n\t * X axis series uses.\n\t */\n\txAxis: IXYAxis;\n\n\t/**\n\t * Y axis series uses.\n\t */\n\tyAxis: IXYAxis;\n\n\t/**\n\t * If set to `true` series will be stacked to other series that also have\n\t * this setting set to `true`.\n\t *\n\t * NOTE: for series stack properly, all stacked series must have same number\n\t * of data items with the same timestamp/category.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Stacked_series} for more info\n\t */\n\tstacked?: boolean;\n\n\t/**\n\t * Whether to stack negative values from zero (`true`) or from whatever\n\t * previous series value is (`false`).\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Negative_value_stacking} for more info\n\t */\n\tstackToNegative?: boolean;\n\n\t/**\n\t * Base axis for the series.\n\t *\n\t * A base axis will dictate direction series plot.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Base_axis} for more info\n\t */\n\tbaseAxis?: IXYAxis;\n\n\t/**\n\t * Input data field for X value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\tvalueXField?: string;\n\n\t/**\n\t * Input data field for Y value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\tvalueYField?: string;\n\n\t/**\n\t * Exclude series values when calculating totals for category/interval.\n\t *\n\t * @default false\n\t */\n\texcludeFromTotal?: boolean;\n\n\t/**\n\t * Display data field for X value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\tvalueXShow?: \"valueXWorking\" | \"valueXChange\" | \"valueXChangePercent\" | \"valueXChangeSelection\" | \"valueXChangeSelectionPercent\" | \"valueXChangePrevious\" | \"valueXChangePreviousPercent\" | \"valueXTotal\" | \"valueXTotalPercent\" | \"valueXSum\";\n\n\t/**\n\t * Display data field for Y value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\tvalueYShow?: \"valueYWorking\" | \"valueYChange\" | \"valueYChangePercent\" | \"valueYChangeSelection\" | \"valueYChangeSelectionPercent\" | \"valueYChangePrevious\" | \"valueYChangePreviousPercent\" | \"valueYTotal\" | \"valueYTotalPercent\" | \"valueYSum\";\n\n\t/**\n\t * Indicates what aggregate value to use for collective data item, when\n\t * aggregating X values from several data items.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Dynamic_data_item_grouping} for more info\n\t */\n\tvalueXGrouped?: \"open\" | \"close\" | \"low\" | \"high\" | \"average\" | \"sum\" | \"extreme\";\n\n\t/**\n\t * Indicates what aggregate value to use for collective data item, when\n\t * aggregating X values from several data items.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Dynamic_data_item_grouping} for more info\n\t */\n\tvalueYGrouped?: \"open\" | \"close\" | \"low\" | \"high\" | \"average\" | \"sum\" | \"extreme\";\n\n\t/**\n\t * Input data field for X open value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\topenValueXField?: string;\n\n\t/**\n\t * Input data field for X open value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\topenValueYField?: string;\n\n\t/**\n\t * Display data field for X open value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\topenValueXShow?: \"openValueXWorking\" | \"openValueXChange\" | \"openValueXChangePercent\" | \"openValueXChangeSelection\" | \"openValueXChangeSelectionPercent\" | \"openValueXChangePrevious\" | \"openValueXChangePreviousPercent\";\n\n\t/**\n\t * Display data field for Y open value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\topenValueYShow?: \"openValueYWorking\" | \"openValueYChange\" | \"openValueYChangePercent\" | \"openValueYChangeSelection\" | \"openValueYChangeSelectionPercent\" | \"openValueYChangePrevious\" | \"openValueYChangePreviousPercent\";\n\n\t/**\n\t * Display data field for Y open value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Dynamic_data_item_grouping} for more info\n\t */\n\topenValueXGrouped?: \"open\" | \"close\" | \"low\" | \"high\" | \"average\" | \"sum\" | \"extreme\";\n\n\t/**\n\t * Display data field for Y open value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Dynamic_data_item_grouping} for more info\n\t */\n\topenValueYGrouped?: \"open\" | \"close\" | \"low\" | \"high\" | \"average\" | \"sum\" | \"extreme\";\n\n\n\n\t/**\n\t * Input data field for X low value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/candlestick-series/} for more info\n\t */\n\tlowValueXField?: string;\n\n\t/**\n\t * Input data field for Y low value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/candlestick-series/} for more info\n\t */\n\tlowValueYField?: string;\n\n\t/**\n\t * Input data field for X high value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/candlestick-series/} for more info\n\t */\n\thighValueXField?: string;\n\n\t/**\n\t * Input data field for Y high value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/candlestick-series/} for more info\n\t */\n\thighValueYField?: string;\n\n\t/**\n\t * Display data field for X low value.\n\t */\n\tlowValueXShow?: \"lowValueXWorking\" | \"lowValueXChange\" | \"lowValueXChangePercent\" | \"lowValueXChangeSelection\" | \"lowValueXChangeSelectionPercent\" | \"lowValueXChangePrevious\" | \"lowValueXChangePreviousPercent\";\n\n\t/**\n\t * Display data field for Y low value.\n\t */\n\tlowValueYShow?: \"lowValueYWorking\" | \"lowValueYChange\" | \"lowValueYChangePercent\" | \"lowValueYChangeSelection\" | \"lowValueYChangeSelectionPercent\" | \"lowValueYChangePrevious\" | \"lowValueYChangePreviousPercent\";\n\n\t/**\n\t * Indicates what aggregate value to use for collective data item, when\n\t * aggregating X low values from several data items.\n\t */\n\tlowValueXGrouped?: \"open\" | \"close\" | \"low\" | \"high\" | \"average\" | \"sum\" | \"extreme\";\n\n\t/**\n\t * Indicates what aggregate value to use for collective data item, when\n\t * aggregating Y low values from several data items.\n\t */\n\tlowValueYGrouped?: \"open\" | \"close\" | \"low\" | \"high\" | \"average\" | \"sum\" | \"extreme\";\n\n\t/**\n\t * Display data field for X high value.\n\t */\n\thighValueXShow?: \"highValueXWorking\" | \"highValueXChange\" | \"highValueXChangePercent\" | \"highValueXChangeSelection\" | \"highValueXChangeSelectionPercent\" | \"highValueXChangePrevious\" | \"highValueXChangePreviousPercent\";\n\n\t/**\n\t * Display data field for Y low value.\n\t */\n\thighValueYShow?: \"highValueYWorking\" | \"highValueYChange\" | \"highValueYChangePercent\" | \"highValueYChangeSelection\" | \"highValueYChangeSelectionPercent\" | \"highValueYChangePrevious\" | \"highValueYChangePreviousPercent\";\n\n\t/**\n\t * Indicates what aggregate value to use for collective data item, when\n\t * aggregating X high values from several data items.\n\t */\n\thighValueXGrouped?: \"open\" | \"close\" | \"high\" | \"high\" | \"average\" | \"sum\" | \"extreme\";\n\n\t/**\n\t * Indicates what aggregate value to use for collective data item, when\n\t * aggregating X high values from several data items.\n\t */\n\thighValueYGrouped?: \"open\" | \"close\" | \"high\" | \"high\" | \"average\" | \"sum\" | \"extreme\";\n\n\t/**\n\t * Horizontal location of the low data point relative to its cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @default 0.5\n\t */\n\tlowLocationX?: number;\n\n\t/**\n\t * Vertical location of the low data point relative to its cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @default 0.5\n\t */\n\tlowLocationY?: number;\n\n\t/**\n\t * Horizontal location of the high data point relative to its cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @default 0.5\n\t */\n\thighLocationX?: number;\n\n\t/**\n\t * Vertical location of the high data point relative to its cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @default 0.5\n\t */\n\thighLocationY?: number;\n\n\n\t/**\n\t * Input data field for X category.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\tcategoryXField?: string;\n\n\t/**\n\t * Input data field for Y category.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\tcategoryYField?: string;\n\n\t/**\n\t * Display data field for X category.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\topenCategoryXField?: string;\n\n\t/**\n\t * Display data field for Y category.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/#Data_fields} for more info\n\t */\n\topenCategoryYField?: string;\n\n\t/**\n\t * If set to `true` this series will be ignored when calculating scale of the\n\t * related axes.\n\t *\n\t * @default false\n\t */\n\tignoreMinMax?: boolean;\n\n\t/**\n\t * @ignore\n\t */\n\tvcx?: number;\n\n\t/**\n\t * @ignore\n\t */\n\tvcy?: number;\n\n\t/**\n\t * Horizontal location of the data point relative to its cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/line-series/#Data_item_location} for more info\n\t * @default 0.5\n\t */\n\tlocationX?: number;\n\n\t/**\n\t * Vertical location of the data point relative to its cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/line-series/#Data_item_location} for more info\n\t * @default 0.5\n\t */\n\tlocationY?: number;\n\n\t/**\n\t * Horizontal location of the open data point relative to its cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @default 0.5\n\t */\n\topenLocationX?: number;\n\n\t/**\n\t * Vertical location of the open data point relative to its cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @default 0.5\n\t */\n\topenLocationY?: number;\n\n\t/**\n\t * If set to `true` [[XYCursor]] will show closest data item from series\n\t * even if it is outside currently hovered date axis interval.\n\t *\n\t * This setting is relevant only if `baseAxis` is a date axis.\n\t */\n\tsnapTooltip?: boolean;\n\n\t/**\n\t * Text to use for series legend label when no particular category/interval\n\t * is selected.\n\t */\n\tlegendRangeLabelText?: string;\n\n\t/**\n\t * Text to use for series legend value label when no particular\n\t * category/interval is selected.\n\t */\n\tlegendRangeValueText?: string;\n\n\n\t/**\n\t * If set to `true`, series bullets will be masked by plot area.\n\t */\n\tmaskBullets?: boolean;\n\n\t/**\n\t * Whether series' tooltip should inherit its color from series or its first\n\t * bullet.\n\t *\n\t * @default \"series\"\n\t */\n\tseriesTooltipTarget?: \"series\" | \"bullet\";\n\n\t/**\n\t * Indicates horizontal position at which to show series' tooltip at.\n\t *\n\t * @default \"value\"\n\t * @since 5.0.16\n\t */\n\ttooltipPositionX?: \"open\" | \"value\" | \"low\" | \"high\";\n\n\t/**\n\t * Indicates vertical position at which to show series' tooltip at.\n\t *\n\t * @default \"value\"\n\t * @since 5.0.16\n\t */\n\ttooltipPositionY?: \"open\" | \"value\" | \"low\" | \"high\";\n\n\n\t/**\n\t * If set to `true` data items for this series won't be grouped even if\n\t * the `groupData: true` is set on a related [[DateAxis]].\n\t * \n\t * @since 5.0.19\n\t */\n\tgroupDataDisabled?: boolean;\n\n\t/**\n\t * A [[DataItem]] that is being used for current tooltip, e.g. by a chart\n\t * cursor.\n\t *\n\t * @since 5.1.2\n\t */\n\ttooltipDataItem?: DataItem\n\n\t/**\n\t * If set to `true`, when data is grouped, the `originals` setting of the\n\t * group data items will be populated by the original (source) data items\n\t * that fall into the group.\n\t *\n\t * Please note that if `groupDataCallback` is set, this setting is ignored\n\t * as originals will always be included, regardless of the value.\n\t *\n\t * @since 5.1.11\n\t * @default false\n\t */\n\tgroupDataWithOriginals?: boolean;\n\n\t/**\n\t * A custom function to call when grouping data items.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Custom_aggregation_functions} for more info\n\t * @since 5.1.11\n\t */\n\tgroupDataCallback?: (dataItem: DataItem, interval: ITimeInterval) => void;\n\n}\n\nexport interface IXYSeriesPrivate extends ISeriesPrivate {\n\n\tminX?: number;\n\tmaxX?: number;\n\n\tminY?: number;\n\tmaxY?: number;\n\n\tselectionMinX?: number;\n\tselectionMaxX?: number;\n\n\tselectionMinY?: number;\n\tselectionMaxY?: number;\n\n\tvalueXAverage?: number;\n\tvalueXCount?: number;\n\tvalueXSum?: number;\n\tvalueXAbsoluteSum?: number;\n\tvalueXLow?: number;\n\tvalueXHigh?: number;\n\tvalueXOpen?: number;\n\tvalueXClose?: number;\n\n\tvalueYAverage?: number;\n\tvalueYCount?: number;\n\tvalueYSum?: number;\n\tvalueYAbsoluteSum?: number;\n\tvalueYLow?: number;\n\tvalueYHigh?: number;\n\tvalueYOpen?: number;\n\tvalueYClose?: number;\n\n\tvalueXAverageSelection?: number;\n\tvalueXCountSelection?: number;\n\tvalueXSumSelection?: number;\n\tvalueXAbsoluteSumSelection?: number;\n\tvalueXLowSelection?: number;\n\tvalueXHighSelection?: number;\n\tvalueXOpenSelection?: number;\n\tvalueXCloseSelection?: number;\n\n\tvalueYAverageSelection?: number;\n\tvalueYCountSelection?: number;\n\tvalueYSumSelection?: number;\n\tvalueYAbsoluteSumSelection?: number;\n\tvalueYLowSelection?: number;\n\tvalueYHighSelection?: number;\n\tvalueYOpenSelection?: number;\n\tvalueYCloseSelection?: number;\n\n\topenValueXAverage?: number;\n\topenValueXCount?: number;\n\topenValueXSum?: number;\n\topenValueXAbsoluteSum?: number;\n\topenValueXLow?: number;\n\topenValueXHigh?: number;\n\topenValueXOpen?: number;\n\topenValueXClose?: number;\n\n\topenValueYAverage?: number;\n\topenValueYCount?: number;\n\topenValueYSum?: number;\n\topenValueYAbsoluteSum?: number;\n\topenValueYLow?: number;\n\topenValueYHigh?: number;\n\topenValueYOpen?: number;\n\topenValueYClose?: number;\n\n\topenValueXAverageSelection?: number;\n\topenValueXCountSelection?: number;\n\topenValueXSumSelection?: number;\n\topenValueXAbsoluteSumSelection?: number;\n\topenValueXLowSelection?: number;\n\topenValueXHighSelection?: number;\n\topenValueXOpenSelection?: number;\n\topenValueXCloseSelection?: number;\n\n\topenValueYAverageSelection?: number;\n\topenValueYCountSelection?: number;\n\topenValueYSumSelection?: number;\n\topenValueYAbsoluteSumSelection?: number;\n\topenValueYLowSelection?: number;\n\topenValueYHighSelection?: number;\n\topenValueYOpenSelection?: number;\n\topenValueYCloseSelection?: number;\n\n\tlowValueXAverage?: number;\n\tlowValueXCount?: number;\n\tlowValueXSum?: number;\n\tlowValueXAbsoluteSum?: number;\n\tlowValueXLow?: number;\n\tlowValueXHigh?: number;\n\tlowValueXlow?: number;\n\tlowValueXClose?: number;\n\n\tlowValueYAverage?: number;\n\tlowValueYCount?: number;\n\tlowValueYSum?: number;\n\tlowValueYAbsoluteSum?: number;\n\tlowValueYLow?: number;\n\tlowValueYHigh?: number;\n\tlowValueYlow?: number;\n\tlowValueYClose?: number;\n\n\tlowValueXAverageSelection?: number;\n\tlowValueXCountSelection?: number;\n\tlowValueXSumSelection?: number;\n\tlowValueXAbsoluteSumSelection?: number;\n\tlowValueXLowSelection?: number;\n\tlowValueXHighSelection?: number;\n\tlowValueXlowSelection?: number;\n\tlowValueXCloseSelection?: number;\n\n\tlowValueYAverageSelection?: number;\n\tlowValueYCountSelection?: number;\n\tlowValueYSumSelection?: number;\n\tlowValueYAbsoluteSumSelection?: number;\n\tlowValueYLowSelection?: number;\n\tlowValueYHighSelection?: number;\n\tlowValueYlowSelection?: number;\n\tlowValueYCloseSelection?: number;\n\n\thighValueXAverage?: number;\n\thighValueXCount?: number;\n\thighValueXSum?: number;\n\thighValueXAbsoluteSum?: number;\n\thighValueXLow?: number;\n\thighValueXHigh?: number;\n\thighValueXhigh?: number;\n\thighValueXClose?: number;\n\n\thighValueYAverage?: number;\n\thighValueYCount?: number;\n\thighValueYSum?: number;\n\thighValueYAbsoluteSum?: number;\n\thighValueYLow?: number;\n\thighValueYHigh?: number;\n\thighValueYhigh?: number;\n\thighValueYClose?: number;\n\n\thighValueXAverageSelection?: number;\n\thighValueXCountSelection?: number;\n\thighValueXSumSelection?: number;\n\thighValueXAbsoluteSumSelection?: number;\n\thighValueXLowSelection?: number;\n\thighValueXHighSelection?: number;\n\thighValueXhighSelection?: number;\n\thighValueXCloseSelection?: number;\n\n\thighValueYAverageSelection?: number;\n\thighValueYCountSelection?: number;\n\thighValueYSumSelection?: number;\n\thighValueYAbsoluteSumSelection?: number;\n\thighValueYLowSelection?: number;\n\thighValueYHighSelection?: number;\n\thighValueYhighSelection?: number;\n\thighValueYCloseSelection?: number;\n\n\toutOfSelection?: boolean;\n}\n\n\n/**\n * A base class for all XY chart series.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/} for more info\n */\nexport abstract class XYSeries extends Series {\n\tpublic static className: string = \"XYSeries\";\n\tpublic static classNames: Array = Series.classNames.concat([XYSeries.className]);\n\n\tdeclare public _settings: IXYSeriesSettings;\n\tdeclare public _privateSettings: IXYSeriesPrivate;\n\tdeclare public _dataItemSettings: IXYSeriesDataItem;\n\tdeclare public _axisRangeType: IXYSeriesAxisRange;\n\tdeclare public _events: IXYSeriesEvents;\n\n\tprotected _xField!: string;\n\tprotected _yField!: string;\n\tprotected _xOpenField!: string;\n\tprotected _yOpenField!: string;\n\n\tprotected _xLowField!: string;\n\tprotected _xHighField!: string;\n\tprotected _yLowField!: string;\n\tprotected _yHighField!: string;\n\n\tprotected _axesDirty: boolean = false;\n\tpublic _stackDirty: boolean = false;\n\n\tprotected _selectionProcessed = false;\n\n\tdeclare public chart: XYChart | undefined;\n\n\tpublic _dataSets: { [index: string]: Array> } = {};\n\n\tpublic _mainContainerMask: Graphics | undefined;\n\n\tprotected _x: number = 0;\n\tprotected _y: number = 0;\n\n\t/**\n\t * A [[Container]] that us used to put series' elements in.\n\t *\n\t * @default Container.new()\n\t */\n\tpublic readonly mainContainer: Container = this.children.push(Container.new(this._root, {}));\n\n\t/**\n\t * A list of axis ranges that affect the series.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-ranges/} for more info\n\t */\n\tpublic readonly axisRanges: List = new List();\n\n\tprotected _skipped: boolean = false;\n\n\tprotected _couldStackTo: Array = [];\n\n\tprotected _reallyStackedTo: { [index: number]: XYSeries } = {};\n\n\tpublic _stackedSeries: { [index: number]: XYSeries } = {};\n\n\tprotected _aLocationX0: number = 0;\n\tprotected _aLocationX1: number = 1;\n\tprotected _aLocationY0: number = 0;\n\tprotected _aLocationY1: number = 1;\n\n\tprotected _showBullets: boolean = true;\n\n\tprotected valueXFields = [\n\t\t\"valueX\",\n\t\t\"openValueX\",\n\t\t\"lowValueX\",\n\t\t\"highValueX\"\n\t];\n\n\tprotected valueYFields = [\n\t\t\"valueY\",\n\t\t\"openValueY\",\n\t\t\"lowValueY\",\n\t\t\"highValueY\"\n\t];\n\n\tpublic _valueXFields!: Array;\n\tpublic _valueYFields!: Array;\n\n\t// used for full min/max\n\tprotected _valueXShowFields!: Array;\n\tprotected _valueYShowFields!: Array;\n\n\t// used for selection (uses working)\n\tpublic __valueXShowFields!: Array;\n\tpublic __valueYShowFields!: Array;\n\n\tprotected _emptyDataItem = new DataItem(this, undefined, {});\n\n\tpublic _dataSetId?: string;\n\n\tprotected _tooltipFieldX?: string;\n\tprotected _tooltipFieldY?: string;\n\n\tprotected _afterNew() {\n\t\tthis.fields.push(\"categoryX\", \"categoryY\", \"openCategoryX\", \"openCategoryY\");\n\t\tthis.valueFields.push(\"valueX\", \"valueY\", \"openValueX\", \"openValueY\", \"lowValueX\", \"lowValueY\", \"highValueX\", \"highValueY\");\n\n\t\tthis._setRawDefault(\"vcx\", 1);\n\t\tthis._setRawDefault(\"vcy\", 1);\n\t\t// this can't go to themes, as data might be parsed before theme\n\t\tthis._setRawDefault(\"valueXShow\", \"valueXWorking\");\n\t\tthis._setRawDefault(\"valueYShow\", \"valueYWorking\");\n\n\t\tthis._setRawDefault(\"openValueXShow\", \"openValueXWorking\");\n\t\tthis._setRawDefault(\"openValueYShow\", \"openValueYWorking\");\n\n\t\tthis._setRawDefault(\"lowValueXShow\", \"lowValueXWorking\");\n\t\tthis._setRawDefault(\"lowValueYShow\", \"lowValueYWorking\");\n\n\t\tthis._setRawDefault(\"highValueXShow\", \"highValueXWorking\");\n\t\tthis._setRawDefault(\"highValueYShow\", \"highValueYWorking\");\n\n\t\tthis._setRawDefault(\"lowValueXGrouped\", \"low\");\n\t\tthis._setRawDefault(\"lowValueYGrouped\", \"low\");\n\n\t\tthis._setRawDefault(\"highValueXGrouped\", \"high\");\n\t\tthis._setRawDefault(\"highValueYGrouped\", \"high\");\n\n\n\n\t\tsuper._afterNew();\n\n\t\tthis._settings.xAxis.series.push(this);\n\t\tthis._settings.yAxis.series.push(this);\n\n\t\tthis.set(\"maskContent\", true);\n\n\t\tthis._disposers.push(this.axisRanges.events.onAll((change) => {\n\t\t\tif (change.type === \"clear\") {\n\t\t\t\t$array.each(change.oldValues, (axisRange) => {\n\t\t\t\t\tthis._removeAxisRange(axisRange);\n\t\t\t\t});\n\t\t\t} else if (change.type === \"push\") {\n\t\t\t\tthis._processAxisRange(change.newValue);\n\t\t\t} else if (change.type === \"setIndex\") {\n\t\t\t\tthis._processAxisRange(change.newValue);\n\t\t\t} else if (change.type === \"insertIndex\") {\n\t\t\t\tthis._processAxisRange(change.newValue);\n\t\t\t} else if (change.type === \"removeIndex\") {\n\t\t\t\tthis._removeAxisRange(change.oldValue);\n\t\t\t} else if (change.type === \"moveIndex\") {\n\t\t\t\tthis._processAxisRange(change.value);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unknown IStreamEvent type\");\n\t\t\t}\n\t\t}))\n\n\t\tif (!this.get(\"baseAxis\")) {\n\t\t\tconst xAxis = this.get(\"xAxis\");\n\t\t\tconst yAxis = this.get(\"yAxis\");\n\n\t\t\tif (yAxis.isType>(\"CategoryAxis\") || yAxis.isType>(\"DateAxis\")) {\n\t\t\t\tthis.set(\"baseAxis\", yAxis);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.set(\"baseAxis\", xAxis);\n\t\t\t}\n\t\t}\n\n\t\tthis.states.create(\"hidden\", { opacity: 1, visible: false });\n\n\t\tthis._makeFieldNames();\n\t}\n\n\tprotected _processAxisRange(axisRange: this[\"_axisRangeType\"]) {\n\t\tconst container = Container.new(this._root, {});\n\t\taxisRange.container = container;\n\t\tthis.children.push(container);\n\n\t\taxisRange.series = this;\n\n\t\tconst axisDataItem = axisRange.axisDataItem;\n\t\taxisDataItem.setRaw(\"isRange\", true);\n\n\t\tconst axis = >axisDataItem.component;\n\t\tif (axis) {\n\t\t\taxis._processAxisRange(axisDataItem, [\"range\", \"series\"]);\n\n\t\t\tconst bullet = axisDataItem.get(\"bullet\");\n\t\t\tif (bullet) {\n\t\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\t\tif (sprite) {\n\t\t\t\t\tsprite.setPrivate(\"visible\", false);\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst axisFill = axisDataItem.get(\"axisFill\");\n\t\t\tif (axisFill) {\n\t\t\t\tcontainer.set(\"mask\", axisFill);\n\t\t\t}\n\t\t\taxis._seriesAxisRanges.push(axisDataItem);\n\t\t}\n\t}\n\n\tprotected _removeAxisRange(axisRange: this[\"_axisRangeType\"]) {\n\t\tconst axisDataItem = axisRange.axisDataItem;\n\t\tconst axis = >axisDataItem.component;\n\t\taxis.disposeDataItem(axisDataItem);\n\n\t\t$array.remove(axis._seriesAxisRanges, axisDataItem);\n\n\t\tconst container = axisRange.container;\n\t\tif (container) {\n\t\t\tcontainer.dispose();\n\t\t}\n\t}\n\n\tprotected _updateFields() {\n\t\tsuper._updateFields();\n\n\t\tthis._valueXFields = [];\n\t\tthis._valueYFields = [];\n\t\tthis._valueXShowFields = [];\n\t\tthis._valueYShowFields = [];\n\n\t\tthis.__valueXShowFields = [];\n\t\tthis.__valueYShowFields = [];\n\n\t\tif (this.valueXFields) {\n\t\t\t$array.each(this.valueXFields as Array, (key) => {\n\t\t\t\tconst field = this.get((key + \"Field\"));\n\t\t\t\tif (field) {\n\t\t\t\t\tthis._valueXFields.push(key);\n\t\t\t\t\tlet field = this.get((key + \"Show\"));\n\t\t\t\t\tthis.__valueXShowFields.push(field);\n\n\t\t\t\t\tif (field.indexOf(\"Working\") != -1) {\n\t\t\t\t\t\tthis._valueXShowFields.push(field.split(\"Working\")[0]);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis._valueXShowFields.push(field);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (this.valueYFields) {\n\t\t\t$array.each(this.valueYFields as Array, (key) => {\n\t\t\t\tconst field = this.get((key + \"Field\"));\n\n\t\t\t\tif (field) {\n\t\t\t\t\tthis._valueYFields.push(key);\n\t\t\t\t\tlet field = this.get((key + \"Show\"));\n\t\t\t\t\tthis.__valueYShowFields.push(field);\n\n\t\t\t\t\tif (field.indexOf(\"Working\") != -1) {\n\t\t\t\t\t\tthis._valueYShowFields.push(field.split(\"Working\")[0]);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis._valueYShowFields.push(field);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected _dispose() {\n\t\tsuper._dispose();\n\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tchart.series.removeValue(this);\n\t\t}\n\n\t\t$array.removeFirst(this.get(\"xAxis\").series, this);\n\t\t$array.removeFirst(this.get(\"yAxis\").series, this);\n\t}\n\n\t// TODO use SelectKeys\n\tprotected _min(key: Key, value: number | undefined) {\n\t\tlet newValue = min(this.getPrivate(key) as any, value);\n\t\tthis.setPrivate(key, newValue as any);\n\t}\n\n\t// TODO use SelectKeys\n\tprotected _max(key: Key, value: number | undefined) {\n\t\tlet newValue = max(this.getPrivate(key) as any, value);\n\t\tthis.setPrivate(key, newValue as any);\n\t}\n\n\tprotected _shouldMakeBullet(dataItem: DataItem): boolean {\n\t\tif (!this.get(\"xAxis\").inited || !this.get(\"yAxis\").inited) {\n\t\t\treturn false\n\t\t}\n\t\tif (dataItem.get(this._xField as any) != null && dataItem.get(this._yField as any) != null) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected _makeFieldNames() {\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\t\tconst xName = xAxis.getPrivate(\"name\")!;\n\t\tconst xCapName = $utils.capitalizeFirst(xName);\n\n\t\tconst yName = yAxis.getPrivate(\"name\")!;\n\t\tconst yCapName = $utils.capitalizeFirst(yName);\n\n\t\tconst xLetter = xAxis.get(\"renderer\").getPrivate(\"letter\")!\n\t\tconst yLetter = yAxis.get(\"renderer\").getPrivate(\"letter\")!\n\n\t\tconst open = \"open\";\n\t\tconst low = \"low\";\n\t\tconst high = \"high\";\n\t\tconst show = \"Show\";\n\n\t\tif (xAxis.className === \"ValueAxis\") {\n\t\t\tthis._xField = this.get((xName + xLetter! + show));\n\t\t\tthis._xOpenField = this.get((open + xCapName + xLetter! + show));\n\t\t\tthis._xLowField = this.get((low + xCapName + xLetter! + show));\n\t\t\tthis._xHighField = this.get((high + xCapName + xLetter! + show));\n\t\t}\n\t\telse {\n\t\t\tthis._xField = (xName + xLetter!);\n\t\t\tthis._xOpenField = (open + xCapName + xLetter!);\n\t\t\tthis._xLowField = (low + xCapName + xLetter!);\n\t\t\tthis._xHighField = (high + xCapName + xLetter!);\n\t\t}\n\n\t\tif (yAxis.className === \"ValueAxis\") {\n\t\t\tthis._yField = this.get((yName + yLetter! + show));\n\t\t\tthis._yOpenField = this.get((open + yCapName + yLetter! + show));\n\t\t\tthis._yLowField = this.get((low + yCapName + yLetter! + show));\n\t\t\tthis._yHighField = this.get((high + yCapName + yLetter! + show));\n\t\t}\n\t\telse {\n\t\t\tthis._yField = (yName + yLetter!);\n\t\t\tthis._yOpenField = (open + yCapName + yLetter!);\n\t\t\tthis._yLowField = (low + yCapName + yLetter!);\n\t\t\tthis._yHighField = (high + yCapName + yLetter!);\n\t\t}\n\t}\n\n\tprotected _fixVC() {\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\t\tconst baseAxis = this.get(\"baseAxis\");\n\t\tconst hiddenState = this.states.lookup(\"hidden\");\n\t\tconst sequencedInterpolation = this.get(\"sequencedInterpolation\");\n\n\t\tif (hiddenState) {\n\t\t\tlet value = 0;\n\t\t\tif (sequencedInterpolation) {\n\t\t\t\tvalue = 0.999999999999; // makes animate, good for stacked\n\t\t\t}\n\n\t\t\tif (xAxis === baseAxis) {\n\t\t\t\thiddenState.set(\"vcy\", value);\n\t\t\t}\n\t\t\telse if (yAxis === baseAxis) {\n\t\t\t\thiddenState.set(\"vcx\", value);\n\t\t\t}\n\t\t\telse {\n\t\t\t\thiddenState.set(\"vcy\", value);\n\t\t\t\thiddenState.set(\"vcx\", value);\n\t\t\t}\n\t\t}\n\t}\n\n\n\tprotected _handleMaskBullets() {\n\t\tif (this.isDirty(\"maskBullets\")) {\n\t\t\tthis.bulletsContainer.set(\"maskContent\", this.get(\"maskBullets\"));\n\t\t}\n\t}\n\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tif (this.isDirty(\"valueYShow\") || this.isDirty(\"valueXShow\" || this.isDirty(\"openValueYShow\") || this.isDirty(\"openValueXShow\") || this.isDirty(\"lowValueYShow\") || this.isDirty(\"lowValueXShow\") || this.isDirty(\"highValueYShow\") || this.isDirty(\"highValueXShow\"))) {\n\t\t\tthis._updateFields();\n\t\t\tthis._makeFieldNames();\n\t\t\tthis._valuesDirty = true;\n\t\t}\n\n\t\tthis.set(\"width\", this.get(\"xAxis\").width());\n\t\tthis.set(\"height\", this.get(\"yAxis\").height());\n\n\t\tthis._handleMaskBullets();\n\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\t\tconst baseAxis = this.get(\"baseAxis\");\n\n\t\tconst tooltipPositionX = this.get(\"tooltipPositionX\");\n\t\tlet tooltipFieldX: string;\n\n\t\tswitch (tooltipPositionX) {\n\t\t\tcase \"open\":\n\t\t\t\ttooltipFieldX = this._xOpenField;\n\t\t\t\tbreak;\n\t\t\tcase \"low\":\n\t\t\t\ttooltipFieldX = this._xLowField;\n\t\t\t\tbreak;\n\t\t\tcase \"high\":\n\t\t\t\ttooltipFieldX = this._xHighField;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\ttooltipFieldX = this._xField;\n\t\t}\n\t\tthis._tooltipFieldX = tooltipFieldX;\n\n\t\tconst tooltipPositionY = this.get(\"tooltipPositionY\");\n\t\tlet tooltipFieldY: string;\n\t\tswitch (tooltipPositionY) {\n\t\t\tcase \"open\":\n\t\t\t\ttooltipFieldY = this._yOpenField;\n\t\t\t\tbreak;\n\t\t\tcase \"low\":\n\t\t\t\ttooltipFieldY = this._yLowField;\n\t\t\t\tbreak;\n\t\t\tcase \"high\":\n\t\t\t\ttooltipFieldY = this._yHighField;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\ttooltipFieldY = this._yField;\n\t\t}\n\t\tthis._tooltipFieldY = tooltipFieldY;\n\n\t\tif (this.isDirty(\"baseAxis\")) {\n\t\t\tthis._fixVC();\n\t\t}\n\n\n\t\tthis.set(\"x\", xAxis.x() - $utils.relativeToValue(xAxis.get(\"centerX\", 0), xAxis.width()) - xAxis.parent!.get(\"paddingLeft\", 0));\n\t\tthis.set(\"y\", yAxis.y() - $utils.relativeToValue(yAxis.get(\"centerY\", 0), yAxis.height()) - yAxis.parent!.get(\"paddingTop\", 0));\n\t\tthis.bulletsContainer.set(\"y\", this.y());\n\t\tthis.bulletsContainer.set(\"x\", this.x());\n\n\t\tconst stacked = this.get(\"stacked\");\n\n\t\tif (this.isDirty(\"stacked\")) {\n\t\t\tif (stacked) {\n\t\t\t\tif (this._valuesDirty && !this._dataProcessed) {\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._stack();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._unstack();\n\t\t\t}\n\t\t}\n\n\t\tif (this._valuesDirty && !this._dataProcessed) {\n\t\t\tthis._dataProcessed = true;\n\n\t\t\tif (stacked) {\n\t\t\t\tthis._stack();\n\t\t\t}\n\n\t\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\t\t$array.each(this._valueXShowFields, (key) => {\n\t\t\t\t\tlet value = dataItem.get(key);\n\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\tif (stacked) {\n\t\t\t\t\t\t\tvalue += this.getStackedXValue(dataItem, key);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._min(\"minX\", value);\n\t\t\t\t\t\tthis._max(\"maxX\", value);\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\t$array.each(this._valueYShowFields, (key) => {\n\t\t\t\t\tlet value = dataItem.get(key);\n\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\tif (stacked) {\n\t\t\t\t\t\t\tvalue += this.getStackedYValue(dataItem, key);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._min(\"minY\", value);\n\t\t\t\t\t\tthis._max(\"maxY\", value);\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\txAxis.processSeriesDataItem(dataItem, this._valueXFields);\n\t\t\t\tyAxis.processSeriesDataItem(dataItem, this._valueYFields);\n\t\t\t})\n\n\t\t\txAxis._seriesValuesDirty = true;\n\t\t\tyAxis._seriesValuesDirty = true;\n\n\t\t\tif (!this.get(\"ignoreMinMax\")) {\n\t\t\t\tif (this.isPrivateDirty(\"minX\") || this.isPrivateDirty(\"maxX\")) {\n\t\t\t\t\txAxis.markDirtyExtremes();\n\t\t\t\t}\n\t\t\t\tif (this.isPrivateDirty(\"minY\") || this.isPrivateDirty(\"maxY\")) {\n\t\t\t\t\tyAxis.markDirtyExtremes();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._markStakedDirtyStack();\n\n\t\t\t//this.updateLegendMarker(undefined); // causes legend marker to change color instantly when on\n\t\t\tif(!this.get(\"tooltipDataItem\")){\n\t\t\t\tthis.updateLegendValue(undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"vcx\") || this.isDirty(\"vcy\")) {\n\t\t\tthis._markStakedDirtyStack();\n\t\t}\n\n\t\tif (!this._dataGrouped) {\n\t\t\txAxis._groupSeriesData(this);\n\t\t\tyAxis._groupSeriesData(this);\n\t\t\tthis._dataGrouped = true;\n\t\t}\n\n\t\tif (this._valuesDirty || this.isPrivateDirty(\"startIndex\") || this.isPrivateDirty(\"endIndex\") || this.isDirty(\"vcx\") || this.isDirty(\"vcy\") || this._stackDirty) {\n\n\t\t\tlet startIndex = this.startIndex();\n\t\t\tlet endIndex = this.endIndex();\n\t\t\tlet minBulletDistance = this.get(\"minBulletDistance\", 0);\n\t\t\tif (minBulletDistance > 0 && baseAxis) {\n\t\t\t\tif (baseAxis.get(\"renderer\").axisLength() / (endIndex - startIndex) > minBulletDistance) {\n\t\t\t\t\tthis._showBullets = true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._showBullets = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ((this._psi != startIndex || this._pei != endIndex || this.isDirty(\"vcx\") || this.isDirty(\"vcy\") || this._stackDirty || this._valuesDirty) && !this._selectionProcessed) {\n\t\t\t\tthis._selectionProcessed = true;\n\n\t\t\t\tconst vcx = this.get(\"vcx\", 1);\n\t\t\t\tconst vcy = this.get(\"vcy\", 1);\n\t\t\t\tconst stacked = this.get(\"stacked\", false);\n\t\t\t\tconst outOfSelection = this.getPrivate(\"outOfSelection\");\n\n\t\t\t\tif (baseAxis === xAxis) {\n\t\t\t\t\tyAxis._calculateTotals();\n\t\t\t\t\tthis.setPrivateRaw(\"selectionMinY\", undefined);\n\t\t\t\t\tthis.setPrivateRaw(\"selectionMaxY\", undefined);\n\t\t\t\t\tif (!outOfSelection) {\n\t\t\t\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\t\t\t\tthis.processYSelectionDataItem(this.dataItems[i], vcy, stacked);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tyAxis.markDirtySelectionExtremes();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (baseAxis === yAxis) {\n\t\t\t\t\txAxis._calculateTotals();\n\t\t\t\t\tthis.setPrivateRaw(\"selectionMinX\", undefined);\n\t\t\t\t\tthis.setPrivateRaw(\"selectionMaxX\", undefined);\n\t\t\t\t\tif (!outOfSelection) {\n\t\t\t\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\t\t\t\tthis.processXSelectionDataItem(this.dataItems[i], vcx, stacked);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tyAxis.markDirtySelectionExtremes();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (baseAxis === xAxis) {\n\t\t\t\t\tif (this.get(\"valueYShow\") !== \"valueYWorking\") {\n\t\t\t\t\t\tconst selectionMinY = this.getPrivate(\"selectionMinY\");\n\t\t\t\t\t\tif (selectionMinY != null) {\n\t\t\t\t\t\t\tthis.setPrivateRaw(\"minY\", selectionMinY);\n\t\t\t\t\t\t\tyAxis.markDirtyExtremes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst selectionMaxY = this.getPrivate(\"selectionMaxY\");\n\t\t\t\t\t\tif (selectionMaxY != null) {\n\t\t\t\t\t\t\tthis.setPrivateRaw(\"maxY\", selectionMaxY);\n\t\t\t\t\t\t\tyAxis.markDirtyExtremes();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (baseAxis === yAxis) {\n\t\t\t\t\tif (this.get(\"valueXShow\") !== \"valueXWorking\") {\n\t\t\t\t\t\tconst selectionMinX = this.getPrivate(\"selectionMinX\");\n\t\t\t\t\t\tif (selectionMinX != null) {\n\t\t\t\t\t\t\tthis.setPrivateRaw(\"minX\", selectionMinX);\n\t\t\t\t\t\t\tyAxis.markDirtyExtremes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst selectionMaxX = this.getPrivate(\"selectionMaxX\")\n\t\t\t\t\t\tif (selectionMaxX != null) {\n\t\t\t\t\t\t\tthis.setPrivateRaw(\"maxX\", selectionMaxX);\n\t\t\t\t\t\t\txAxis.markDirtyExtremes();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (this.isPrivateDirty(\"selectionMinX\") || this.isPrivateDirty(\"selectionMaxX\")) {\n\t\t\t\t\txAxis.markDirtySelectionExtremes();\n\t\t\t\t}\n\n\t\t\t\tif (this.isPrivateDirty(\"selectionMinY\") || this.isPrivateDirty(\"selectionMaxY\")) {\n\t\t\t\t\tyAxis.markDirtySelectionExtremes();\n\t\t\t\t}\n\t\t\t\t// this.updateLegendValue(undefined); flickers while panning\n\t\t\t}\n\t\t}\n\t}\n\n\n\tprotected _makeRangeMask() {\n\t\tif (this.axisRanges.length > 0) {\n\t\t\tlet mainContainerMask = this._mainContainerMask;\n\t\t\tif (mainContainerMask == null) {\n\t\t\t\tmainContainerMask = this.children.push(Graphics.new(this._root, {}));\n\t\t\t\tthis._mainContainerMask = mainContainerMask;\n\n\t\t\t\tmainContainerMask.set(\"draw\", (display, target) => {\n\t\t\t\t\tconst parent = this.parent;\n\t\t\t\t\tif (parent) {\n\t\t\t\t\t\tconst w = this._root.container.width();\n\t\t\t\t\t\tconst h = this._root.container.height();\n\t\t\t\t\t\tdisplay.moveTo(-w, -h);\n\t\t\t\t\t\tdisplay.lineTo(-w, h * 2);\n\t\t\t\t\t\tdisplay.lineTo(w * 2, h * 2);\n\t\t\t\t\t\tdisplay.lineTo(w * 2, -h);\n\t\t\t\t\t\tdisplay.lineTo(-w, -h);\n\n\n\t\t\t\t\t\tthis.axisRanges.each((axisRange) => {\n\t\t\t\t\t\t\tconst fill = axisRange.axisDataItem.get(\"axisFill\");\n\n\t\t\t\t\t\t\tif (parent) {\n\t\t\t\t\t\t\t\tif (fill) {\n\t\t\t\t\t\t\t\t\tlet draw = fill.get(\"draw\");\n\t\t\t\t\t\t\t\t\tif (draw) {\n\t\t\t\t\t\t\t\t\t\tdraw(display, target);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t\tthis.mainContainer._display.mask = mainContainerMask!._display;\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tmainContainerMask.markDirty();\n\t\t\tmainContainerMask._markDirtyKey(\"fill\");\n\t\t}\n\t\telse {\n\t\t\tthis.mainContainer._display.mask = null;\n\t\t}\n\t}\n\n\n\tpublic _updateChildren() {\n\t\tsuper._updateChildren();\n\t\t// save for performance\n\t\tthis._x = this.x();\n\t\tthis._y = this.y();\n\t\tthis._makeRangeMask();\n\t}\n\n\tprotected _stack() {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tconst seriesIndex = chart.series.indexOf(this);\n\n\t\t\tthis._couldStackTo = [];\n\n\t\t\tif (seriesIndex > 0) {\n\t\t\t\tlet series: XYSeries;\n\n\t\t\t\tfor (let i = seriesIndex - 1; i >= 0; i--) {\n\t\t\t\t\tseries = chart.series.getIndex(i)!;\n\t\t\t\t\tif (series.get(\"xAxis\") === this.get(\"xAxis\") && series.get(\"yAxis\") === this.get(\"yAxis\") && series.className === this.className) {\n\t\t\t\t\t\tthis._couldStackTo.push(series);\n\t\t\t\t\t\tif (!series.get(\"stacked\")) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._stackDataItems();\n\t\t}\n\t}\n\n\tprotected _unstack() {\n\t\t$object.each(this._reallyStackedTo, (_key, value) => {\n\t\t\tdelete (value._stackedSeries[this.uid]);\n\t\t})\n\n\t\tthis._reallyStackedTo = {};\n\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\tdataItem.setRaw(\"stackToItemY\", undefined);\n\t\t\tdataItem.setRaw(\"stackToItemX\", undefined);\n\t\t})\n\t}\n\n\tprotected _stackDataItems() {\n\t\t// this works only with the same number of data @todo: search by date/category?\n\t\tconst baseAxis = this.get(\"baseAxis\");\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\n\t\tlet field: \"valueX\" | \"valueY\";\n\t\tlet stackToItemKey: \"stackToItemX\" | \"stackToItemY\";\n\t\tif (baseAxis === xAxis) {\n\t\t\tfield = \"valueY\";\n\t\t\tstackToItemKey = \"stackToItemY\";\n\t\t}\n\t\telse if (baseAxis === yAxis) {\n\t\t\tfield = \"valueX\";\n\t\t\tstackToItemKey = \"stackToItemX\";\n\t\t}\n\n\t\tlet len = this._couldStackTo.length;\n\t\tlet index = 0;\n\t\tconst stackToNegative = this.get(\"stackToNegative\");\n\n\t\tthis._reallyStackedTo = {};\n\n\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\tfor (let s = 0; s < len; s++) {\n\t\t\t\tlet stackToSeries = this._couldStackTo[s];\n\t\t\t\tlet stackToItem = stackToSeries.dataItems[index];\n\t\t\t\tlet value = dataItem.get(field);\n\n\t\t\t\tif (stackToItem) {\n\t\t\t\t\tlet stackValue = stackToItem.get(field);\n\t\t\t\t\tif (stackToNegative) {\n\t\t\t\t\t\tif ($type.isNumber(value)) {\n\t\t\t\t\t\t\tif ($type.isNumber(stackValue)) {\n\t\t\t\t\t\t\t\tif (value >= 0 && stackValue >= 0) {\n\t\t\t\t\t\t\t\t\tdataItem.setRaw(stackToItemKey, stackToItem);\n\t\t\t\t\t\t\t\t\tthis._reallyStackedTo[stackToSeries.uid] = stackToSeries;\n\t\t\t\t\t\t\t\t\tstackToSeries._stackedSeries[this.uid] = this;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (value < 0 && stackValue < 0) {\n\t\t\t\t\t\t\t\t\tdataItem.setRaw(stackToItemKey, stackToItem);\n\t\t\t\t\t\t\t\t\tthis._reallyStackedTo[stackToSeries.uid] = stackToSeries;\n\t\t\t\t\t\t\t\t\tstackToSeries._stackedSeries[this.uid] = this;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif ($type.isNumber(value) && $type.isNumber(stackValue)) {\n\t\t\t\t\t\t\tdataItem.setRaw(stackToItemKey, stackToItem);\n\t\t\t\t\t\t\tthis._reallyStackedTo[stackToSeries.uid] = stackToSeries;\n\t\t\t\t\t\t\tstackToSeries._stackedSeries[this.uid] = this;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tindex++;\n\t\t})\n\t}\n\n\tprotected processXSelectionDataItem(dataItem: DataItem, vcx: number, stacked: boolean) {\n\t\t$array.each(this.__valueXShowFields, (key) => {\n\t\t\tlet value = dataItem.get(key);\n\t\t\tif (value != null) {\n\t\t\t\tif (stacked) {\n\t\t\t\t\tvalue += this.getStackedXValueWorking(dataItem, key);\n\t\t\t\t}\n\n\t\t\t\tthis._min(\"selectionMinX\", value);\n\t\t\t\tthis._max(\"selectionMaxX\", value * vcx);\n\t\t\t}\n\t\t})\n\t}\n\n\tprotected processYSelectionDataItem(dataItem: DataItem, vcy: number, stacked: boolean) {\n\t\t$array.each(this.__valueYShowFields, (key) => {\n\n\t\t\tlet value = dataItem.get(key);\n\t\t\tif (value != null) {\n\t\t\t\tif (stacked) {\n\t\t\t\t\tvalue += this.getStackedYValueWorking(dataItem, key);\n\t\t\t\t}\n\n\t\t\t\tthis._min(\"selectionMinY\", value);\n\t\t\t\tthis._max(\"selectionMaxY\", value * vcy);\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getStackedYValueWorking(dataItem: DataItem, key: string): number {\n\t\tconst stackToItem = dataItem.get(\"stackToItemY\");\n\n\t\tif (stackToItem) {\n\t\t\tconst stackedToSeries = stackToItem.component as XYSeries;\n\n\t\t\treturn stackToItem.get(key as any, 0) * stackedToSeries.get(\"vcy\", 1) + this.getStackedYValueWorking(stackToItem, key);\n\t\t}\n\t\treturn 0;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getStackedXValueWorking(dataItem: DataItem, key: string): number {\n\t\tconst stackToItem = dataItem.get(\"stackToItemX\");\n\n\t\tif (stackToItem) {\n\t\t\tconst stackedToSeries = stackToItem.component as XYSeries;\n\t\t\treturn stackToItem.get(key as any, 0) * stackedToSeries.get(\"vcx\", 1) + this.getStackedXValueWorking(stackToItem, key);\n\t\t}\n\t\treturn 0;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getStackedYValue(dataItem: DataItem, key: string): number {\n\t\tconst stackToItem = dataItem.get(\"stackToItemY\");\n\n\t\tif (stackToItem) {\n\t\t\treturn stackToItem.get(key as any, 0) + this.getStackedYValue(stackToItem, key);\n\t\t}\n\t\treturn 0;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getStackedXValue(dataItem: DataItem, key: string): number {\n\t\tconst stackToItem = dataItem.get(\"stackToItemX\");\n\n\t\tif (stackToItem) {\n\t\t\treturn stackToItem.get(key as any, 0) + this.getStackedXValue(stackToItem, key);\n\t\t}\n\t\treturn 0;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic createLegendMarker(_dataItem?: DataItem) {\n\t\tthis.updateLegendMarker();\n\t}\n\n\tpublic _markDirtyAxes() {\n\t\tthis._axesDirty = true;\n\t\tthis.markDirty();\n\t}\n\n\tpublic _markDataSetDirty() {\n\t\tthis._afterDataChange();\n\t\tthis._valuesDirty = true;\n\t\tthis._dataProcessed = false;\n\t\tthis._aggregatesCalculated = false;\n\t\tthis.markDirty();\n\t}\n\n\tpublic _clearDirty() {\n\t\tsuper._clearDirty();\n\t\tthis._axesDirty = false;\n\t\tthis._selectionProcessed = false;\n\t\tthis._stackDirty = false;\n\t\tthis._dataProcessed = false;\n\t}\n\n\tpublic _positionBullet(bullet: Bullet) {\n\n\t\tlet sprite = bullet.get(\"sprite\");\n\t\tif (sprite) {\n\t\t\tlet dataItem = sprite.dataItem as DataItem;\n\n\t\t\tlet locationX = bullet.get(\"locationX\", dataItem.get(\"locationX\", 0.5));\n\t\t\tlet locationY = bullet.get(\"locationY\", dataItem.get(\"locationY\", 0.5));\n\n\t\t\tlet xAxis = this.get(\"xAxis\");\n\t\t\tlet yAxis = this.get(\"yAxis\");\n\n\t\t\tconst positionX = xAxis.getDataItemPositionX(dataItem, this._xField, locationX, this.get(\"vcx\", 1));\n\t\t\tconst positionY = yAxis.getDataItemPositionY(dataItem, this._yField, locationY, this.get(\"vcy\", 1))\n\n\t\t\tlet point = this.getPoint(positionX, positionY);\n\n\t\t\tlet left = dataItem.get(\"left\", point.x);\n\t\t\tlet right = dataItem.get(\"right\", point.x);\n\t\t\tlet top = dataItem.get(\"top\", point.y);\n\t\t\tlet bottom = dataItem.get(\"bottom\", point.y);\n\n\t\t\tif (this._shouldShowBullet(positionX, positionY)) {\n\t\t\t\tif (!bullet.getPrivate(\"hidden\")) {\n\t\t\t\t\tsprite.setPrivate(\"visible\", true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsprite.setPrivate(\"visible\", false);\n\t\t\t\t}\n\n\t\t\t\tlet w = right - left;\n\t\t\t\tlet h = bottom - top;\n\n\t\t\t\tif (sprite.isType(\"Label\")) {\n\t\t\t\t\tsprite.setPrivate(\"maxWidth\", Math.abs(w));\n\t\t\t\t\tsprite.setPrivate(\"maxHeight\", Math.abs(h));\n\t\t\t\t}\n\n\t\t\t\tlet x = left + w * locationX;\n\t\t\t\tlet y = bottom - h * locationY;\n\n\t\t\t\tsprite.set(\"x\", x);\n\t\t\t\tsprite.set(\"y\", y);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsprite.setPrivate(\"visible\", false);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _shouldShowBullet(_positionX: number, _positionY: number): boolean {\n\t\treturn this._showBullets;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic setDataSet(id: string) {\n\t\tif (this._dataSets[id]) {\n\t\t\tthis._handleDataSetChange();\n\t\t\tthis._dataItems = this._dataSets[id];\n\t\t\tthis._markDataSetDirty();\n\t\t\tthis._dataSetId = id;\n\n\t\t\tconst type = \"datasetchanged\";\n\t\t\tif (this.events.isEnabled(type)) {\n\t\t\t\tthis.events.dispatch(type, { type: type, target: this, id: id });\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _handleDataSetChange() {\n\t\tif (this.bullets.length > 0) {\n\t\t\t$array.each(this._dataItems, (dataItem) => {\n\t\t\t\tlet bullets = dataItem.bullets;\n\t\t\t\tif (bullets) {\n\t\t\t\t\t$array.each(bullets, (bullet) => {\n\t\t\t\t\t\tif(bullet){\n\t\t\t\t\t\t\tlet sprite = bullet.get(\"sprite\");\n\t\t\t\t\t\t\tif (sprite) {\n\t\t\t\t\t\t\t\tsprite.setPrivate(\"visible\", false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tthis._selectionProcessed = false; // for totals to be calculated\n\t}\n\n\t/**\n\t * Shows hidden series.\n\t *\n\t * @param duration Duration of animation in milliseconds\n\t * @return Animation promise\n\t */\n\tpublic async show(duration?: number): Promise {\n\t\tthis._fixVC();\n\t\tlet promises: Array> = [];\n\t\tpromises.push(super.show(duration).then(() => {\n\t\t\tthis._isShowing = false;\n\t\t\tlet xAxis = this.get(\"xAxis\");\n\t\t\tlet yAxis = this.get(\"yAxis\");\n\t\t\tlet baseAxis = this.get(\"baseAxis\");\n\t\t\tif (yAxis !== baseAxis) {\n\t\t\t\tyAxis.markDirtySelectionExtremes();\n\t\t\t}\n\t\t\tif (xAxis !== baseAxis) {\n\t\t\t\txAxis.markDirtySelectionExtremes();\n\t\t\t}\n\t\t}));\n\t\tpromises.push(this.bulletsContainer.show(duration));\n\t\tpromises.push(this._sequencedShowHide(true, duration));\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * Hides series.\n\t *\n\t * @param duration Duration of animation in milliseconds\n\t * @return Animation promise\n\t */\n\tpublic async hide(duration?: number): Promise {\n\t\tthis._fixVC();\n\t\tlet promises: Promise[] = [];\n\t\tpromises.push(super.hide(duration).then(() => {\n\t\t\tthis._isHiding = false;\n\t\t}));\n\t\tpromises.push(this.bulletsContainer.hide(duration));\n\t\tpromises.push(this._sequencedShowHide(false, duration));\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * Shows series's data item.\n\t *\n\t * @param dataItem Data item\n\t * @param duration Animation duration in milliseconds\n\t * @return Promise\n\t */\n\tpublic async showDataItem(dataItem: DataItem, duration?: number): Promise {\n\t\tconst promises = [super.showDataItem(dataItem, duration)];\n\n\t\tif (!$type.isNumber(duration)) {\n\t\t\tduration = this.get(\"stateAnimationDuration\", 0);\n\t\t}\n\n\t\tconst easing = this.get(\"stateAnimationEasing\");\n\n\t\t$array.each(this._valueFields, (key) => {\n\t\t\tpromises.push(dataItem.animate({ key: key + \"Working\" as any, to: dataItem.get(key as any), duration: duration!, easing: easing }).waitForStop());\n\t\t})\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * Hides series's data item.\n\t *\n\t * @param dataItem Data item\n\t * @param duration Animation duration in milliseconds\n\t * @return Promise\n\t */\n\tpublic async hideDataItem(dataItem: DataItem, duration?: number): Promise {\n\t\tconst promises = [super.hideDataItem(dataItem, duration)];\n\n\t\tconst hiddenState = this.states.create(\"hidden\", {})\n\n\t\tif (!$type.isNumber(duration)) {\n\t\t\tduration = hiddenState.get(\"stateAnimationDuration\", this.get(\"stateAnimationDuration\", 0));\n\t\t}\n\n\t\tconst easing = hiddenState.get(\"stateAnimationEasing\", this.get(\"stateAnimationEasing\"));\n\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\t\tconst baseAxis = this.get(\"baseAxis\");\n\t\tconst stacked = this.get(\"stacked\");\n\n\t\tif (baseAxis === xAxis || !baseAxis) {\n\n\t\t\t$array.each(this._valueYFields, (key) => {\n\t\t\t\tlet min = yAxis.getPrivate(\"min\");\n\t\t\t\tlet baseValue = yAxis.baseValue();\n\n\t\t\t\tif ($type.isNumber(min) && min > baseValue) {\n\t\t\t\t\tbaseValue = min;\n\t\t\t\t}\n\t\t\t\tif (stacked) {\n\t\t\t\t\tbaseValue = 0;\n\t\t\t\t}\n\n\t\t\t\tlet value = dataItem.get(key as any);\n\t\t\t\tif (value != null) {\n\t\t\t\t\tpromises.push(dataItem.animate({ key: key + \"Working\" as any, to: baseValue, duration: duration!, easing: easing }).waitForStop());\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\tif (baseAxis === yAxis || !baseAxis) {\n\n\t\t\tlet min = xAxis.getPrivate(\"min\");\n\t\t\tlet baseValue = xAxis.baseValue();\n\t\t\tif ($type.isNumber(min) && min > baseValue) {\n\t\t\t\tbaseValue = min;\n\t\t\t}\n\t\t\tif (stacked) {\n\t\t\t\tbaseValue = 0;\n\t\t\t}\n\n\t\t\t$array.each(this._valueXFields, (key) => {\n\t\t\t\tlet value = dataItem.get(key as any);\n\t\t\t\tif (value != null) {\n\t\t\t\t\tpromises.push(dataItem.animate({ key: key + \"Working\" as any, to: baseValue, duration: duration!, easing: easing }).waitForStop());\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\tpublic _markDirtyStack() {\n\t\tthis._stackDirty = true;\n\t\tthis.markDirty();\n\t\tthis._markStakedDirtyStack();\n\t}\n\n\tprotected _markStakedDirtyStack() {\n\t\tconst stackedSeries = this._stackedSeries;\n\t\tif (stackedSeries) {\n\n\t\t\t$object.each(stackedSeries, (_key, value) => {\n\t\t\t\tif (!value._stackDirty) {\n\t\t\t\t\tvalue._markDirtyStack();\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\tpublic _afterChanged() {\n\t\tsuper._afterChanged();\n\t\tif (this._skipped) {\n\t\t\tthis._markDirtyAxes();\n\t\t\tthis._skipped = false;\n\t\t}\n\t}\n\n\t/**\n\t * Shows a tooltip for specific data item.\n\t *\n\t * @param dataItem Data item\n\t */\n\tpublic showDataItemTooltip(dataItem: DataItem | undefined) {\n\t\tthis.updateLegendMarker(dataItem);\n\t\tthis.updateLegendValue(dataItem);\n\n\t\tconst tooltip = this.get(\"tooltip\");\n\n\t\tif (tooltip) {\n\t\t\tif (!this.isHidden()) {\n\t\t\t\ttooltip._setDataItem(dataItem);\n\n\t\t\t\tif (dataItem) {\n\t\t\t\t\tlet locationX = this.get(\"locationX\", 0);\n\t\t\t\t\tlet locationY = this.get(\"locationY\", 1);\n\n\t\t\t\t\tlet itemLocationX = dataItem.get(\"locationX\", locationX);\n\t\t\t\t\tlet itemLocationY = dataItem.get(\"locationY\", locationY);\n\n\t\t\t\t\tconst xAxis = this.get(\"xAxis\");\n\t\t\t\t\tconst yAxis = this.get(\"yAxis\");\n\n\t\t\t\t\tconst vcx = this.get(\"vcx\", 1);\n\t\t\t\t\tconst vcy = this.get(\"vcy\", 1);\n\n\t\t\t\t\tconst xPos = xAxis.getDataItemPositionX(dataItem, this._tooltipFieldX!, this._aLocationX0 + (this._aLocationX1 - this._aLocationX0) * itemLocationX, vcx);\n\t\t\t\t\tconst yPos = yAxis.getDataItemPositionY(dataItem, this._tooltipFieldY!, this._aLocationY0 + (this._aLocationY1 - this._aLocationY0) * itemLocationY, vcy);\n\n\t\t\t\t\tconst point = this.getPoint(xPos, yPos);\n\n\t\t\t\t\tlet show = true;\n\t\t\t\t\t$array.each(this._valueFields, (field) => {\n\t\t\t\t\t\tif (dataItem.get(field as any) == null) {\n\t\t\t\t\t\t\tshow = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\n\t\t\t\t\tif (show) {\n\t\t\t\t\t\tconst chart = this.chart;\n\t\t\t\t\t\tif (chart && chart.inPlot(point)) {\n\t\t\t\t\t\t\ttooltip.label.text.markDirtyText();\n\t\t\t\t\t\t\ttooltip.set(\"tooltipTarget\", this._getTooltipTarget(dataItem));\n\t\t\t\t\t\t\ttooltip.set(\"pointTo\", this._display.toGlobal({ x: point.x, y: point.y }));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttooltip._setDataItem(undefined);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttooltip._setDataItem(undefined);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.hideTooltip();\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic hideTooltip(): Promise | undefined {\n\t\tconst tooltip = this.get(\"tooltip\");\n\t\tif(tooltip){\n\t\t\ttooltip.set(\"tooltipTarget\", this);\n\t\t}\n\t\treturn super.hideTooltip();\n\t}\t\n\n\tprotected _getTooltipTarget(dataItem: DataItem): Sprite {\n\t\tif (this.get(\"seriesTooltipTarget\") == \"bullet\") {\n\t\t\tconst bullets = dataItem.bullets;\n\t\t\tif (bullets && bullets.length > 0) {\n\t\t\t\tconst bullet = bullets[0];\n\t\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\t\tif (sprite) {\n\t\t\t\t\treturn sprite;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLegendValue(dataItem: DataItem | undefined) {\n\t\tconst legendDataItem = this.get(\"legendDataItem\");\n\n\t\tif (legendDataItem) {\n\n\t\t\tconst label = legendDataItem.get(\"label\");\n\t\t\tif (label) {\n\t\t\t\tlet txt = \"\";\n\t\t\t\tif (dataItem) {\n\t\t\t\t\tlabel._setDataItem(dataItem);\n\t\t\t\t\ttxt = this.get(\"legendLabelText\", label.get(\"text\", this.get(\"name\", \"\")));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlabel._setDataItem(this._emptyDataItem);\n\t\t\t\t\ttxt = this.get(\"legendRangeLabelText\", this.get(\"legendLabelText\", label.get(\"text\", this.get(\"name\", \"\"))));\n\t\t\t\t}\n\n\t\t\t\tlabel.set(\"text\", txt);\n\t\t\t}\n\n\t\t\tconst valueLabel = legendDataItem.get(\"valueLabel\");\n\t\t\tif (valueLabel) {\n\t\t\t\tlet txt = \"\";\n\t\t\t\tif (dataItem) {\n\t\t\t\t\tvalueLabel._setDataItem(dataItem);\n\t\t\t\t\ttxt = this.get(\"legendValueText\", valueLabel.get(\"text\", \"\"));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvalueLabel._setDataItem(this._emptyDataItem);\n\t\t\t\t\ttxt = this.get(\"legendRangeValueText\", valueLabel.get(\"text\", \"\"));\n\t\t\t\t}\n\n\t\t\t\tvalueLabel.set(\"text\", txt);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _getItemReaderLabel(): string {\n\t\tlet text = \"X: {\" + this._xField;\n\t\tif (this.get(\"xAxis\").isType>(\"DateAxis\")) {\n\t\t\ttext += \".formatDate()\";\n\t\t}\n\t\ttext += \"}; Y: {\" + this._yField;\n\t\tif (this.get(\"yAxis\").isType>(\"DateAxis\")) {\n\t\t\ttext += \".formatDate()\";\n\t\t}\n\t\ttext += \"}\";\n\t\treturn text;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getPoint(positionX: number, positionY: number): IPoint {\n\t\tlet x = this.get(\"xAxis\").get(\"renderer\").positionToCoordinate(positionX);\n\t\tlet y = this.get(\"yAxis\").get(\"renderer\").positionToCoordinate(positionY);\n\n\t\t// if coordinate is super big, canvas fails to draw line, capping to some big number (won't make any visual difference)\n\t\tlet max = 999999999;\n\t\tif (y < -max) {\n\t\t\ty = -max;\n\t\t}\n\t\tif (y > max) {\n\t\t\ty = max;\n\t\t}\n\n\t\tif (x < -max) {\n\t\t\tx = -max;\n\t\t}\n\t\tif (x > max) {\n\t\t\tx = max;\n\t\t}\n\n\t\treturn { x: x, y: y };\n\t}\n\n\tprotected _shouldInclude(_position: number): boolean {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic handleCursorHide() {\n\t\tthis.hideTooltip();\n\t\tthis.updateLegendValue(undefined);\n\t\tthis.updateLegendMarker(undefined);\n\t}\n\n\tprotected _afterDataChange() {\n\t\tsuper._afterDataChange();\n\t\tthis.get(\"xAxis\")._markDirtyKey(\"start\");\n\t\tthis.get(\"yAxis\")._markDirtyKey(\"start\");\n\t\tthis.resetExtremes();\n\t}\n\n\n\t// todo description\n\tpublic resetExtremes() {\n\t\tthis.setPrivate(\"selectionMinX\", undefined);\n\t\tthis.setPrivate(\"selectionMaxX\", undefined);\n\t\tthis.setPrivate(\"selectionMinY\", undefined);\n\t\tthis.setPrivate(\"selectionMaxY\", undefined);\n\n\t\tthis.setPrivate(\"minX\", undefined);\n\t\tthis.setPrivate(\"minY\", undefined);\n\t\tthis.setPrivate(\"maxX\", undefined);\n\t\tthis.setPrivate(\"maxY\", undefined);\n\t}\n\n\t/**\n\t * Creates and returns an axis range object.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-ranges/} for more info\n\t * @param axisDataItem Axis data item\n\t * @return Axis range\n\t */\n\tpublic createAxisRange(axisDataItem: DataItem): this[\"_axisRangeType\"] {\n\t\treturn this.axisRanges.push({\n\t\t\taxisDataItem: axisDataItem\n\t\t})\n\t}\n\n\t/**\n\t * A list of series's main (ungrouped) data items.\n\t *\n\t * @return Data items\n\t */\n\tpublic get mainDataItems(): Array> {\n\t\treturn this._mainDataItems;\n\t}\n}\n","import { Scrollbar, IScrollbarPrivate, IScrollbarSettings } from \"../../core/render/Scrollbar\";\nimport { XYChart } from \"./XYChart\";\nimport { Graphics } from \"../../core/render/Graphics\";\nimport * as $utils from \"../../core/util/Utils\";\n\nexport interface IXYChartScrollbarSettings extends IScrollbarSettings {\n\n}\n\nexport interface IXYChartScrollbarPrivate extends IScrollbarPrivate {\n}\n\n/**\n * Creates a scrollbar with chart preview in it.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/scrollbars/#Scrollbar_with_chart_preview} for more info\n * @important\n */\nexport class XYChartScrollbar extends Scrollbar {\n\n\tdeclare public _settings: IXYChartScrollbarSettings;\n\tdeclare public _privateSettings: IXYChartScrollbarPrivate;\n\n\tpublic static className: string = \"XYChartScrollbar\";\n\tpublic static classNames: Array = Scrollbar.classNames.concat([XYChartScrollbar.className]);\n\n\t/**\n\t * An instance of an [[XYChart]] that is used to plot chart preview in\n\t * scrollbar.\n\t */\n\tpublic readonly chart: XYChart = this.children.push(XYChart.new(this._root, {\n\t\tthemeTags: [\"chart\"],\n\t\tinteractive: false,\n\t\tinteractiveChildren: false,\n\t\tpanX: false,\n\t\tpanY: false,\n\t\twheelX: \"none\",\n\t\twheelY: \"none\"\n\t}));\n\n\t/**\n\t * A graphics element that is displayed over inactive portion of the\n\t * scrollbarpreview, to dim it down.\n\t */\n\tpublic readonly overlay: Graphics = this.children.push(Graphics.new(this._root, {\n\t\tthemeTags: [\"overlay\"],\n\t\tinteractive: false\n\t}));\n\n\tprotected _afterNew() {\n\t\tthis._addOrientationClass();\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"scrollbar\", \"xy\", \"chart\", this._settings.orientation]);\n\n\t\tconst children = this.children;\n\t\tchildren.moveValue(this.thumb);\n\t\tchildren.moveValue(this.startGrip);\n\t\tchildren.moveValue(this.endGrip);\n\n\t\tthis.thumb.set(\"opacity\", 0);\n\t\tthis.thumb.states.create(\"hover\", { opacity: 0.2 });\n\n\t\tconst plotContainer = this.chart.plotContainer;\n\t\tplotContainer.set(\"interactive\", false);\n\t\tplotContainer.remove(\"background\");\n\t\tplotContainer.children.removeValue(this.chart.zoomOutButton);\n\n\t\tsuper._afterNew();\n\t}\n\n\tprotected _updateThumb() {\n\t\tsuper._updateThumb();\n\n\t\tthis.overlay.set(\"draw\", (display) => {\n\t\t\tconst startGrip = this.startGrip;\n\t\t\tconst endGrip = this.endGrip;\n\n\t\t\tlet x0 = startGrip.x();\n\t\t\tlet y0 = startGrip.y();\n\n\t\t\tlet x1 = endGrip.x();\n\t\t\tlet y1 = endGrip.y();\n\n\t\t\tconst h = this.height();\n\t\t\tconst w = this.width();\n\n\t\t\tif (x0 > x1) {\n\t\t\t\t[x0, x1] = [x1, x0]\n\t\t\t}\n\n\t\t\tif (y0 > y1) {\n\t\t\t\t[y0, y1] = [y1, y0]\n\t\t\t}\n\n\t\t\tif (this.get(\"orientation\") === \"horizontal\") {\n\t\t\t\tdisplay.moveTo(0, 0);\n\t\t\t\tdisplay.lineTo(x0, 0);\n\t\t\t\tdisplay.lineTo(x0, h);\n\t\t\t\tdisplay.lineTo(0, h);\n\t\t\t\tdisplay.lineTo(0, 0);\n\n\t\t\t\tdisplay.moveTo(x1, 0);\n\t\t\t\tdisplay.lineTo(w, 0);\n\t\t\t\tdisplay.lineTo(w, h);\n\t\t\t\tdisplay.lineTo(x1, h);\n\t\t\t\tdisplay.lineTo(x1, 0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdisplay.moveTo(0, 0);\n\t\t\t\tdisplay.lineTo(0, y0);\n\t\t\t\tdisplay.lineTo(w, y0);\n\t\t\t\tdisplay.lineTo(w, 0);\n\t\t\t\tdisplay.lineTo(0, 0);\n\n\t\t\t\tdisplay.moveTo(0, y1);\n\t\t\t\tdisplay.lineTo(0, h);\n\t\t\t\tdisplay.lineTo(w, h);\n\t\t\t\tdisplay.lineTo(w, y1);\n\t\t\t\tdisplay.lineTo(0, y1);\n\t\t\t}\n\t\t})\n\t}\n}\n","import type { DataItem } from \"../../../core/render/Component\";\nimport type { AxisRenderer } from \"./AxisRenderer\";\nimport { Axis, IAxisSettings, IAxisPrivate, IAxisDataItem, IAxisEvents } from \"./Axis\";\nimport type { IXYSeriesDataItem, XYSeries } from \"../series/XYSeries\";\nimport * as $array from \"../../../core/util/Array\";\nimport * as $type from \"../../../core/util/Type\";\nimport * as $math from \"../../../core/util/Math\";\nimport * as $utils from \"../../../core/util/Utils\";\nimport { populateString } from \"../../../core/util/PopulateString\";\nimport type { Tooltip } from \"../../../core/render/Tooltip\";\n\nexport interface ICategoryAxisSettings extends IAxisSettings {\n\n\t/**\n\t * A function that can be used to specify how to configure axis fills.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Axis_fills} for more info\n\t */\n\tfillRule?: (dataItem: DataItem, index?: number) => void;\n\n\t/**\n\t * A field in data which holds categories.\n\t */\n\tcategoryField: string;\n\n\t/**\n\t * Relative location of where axis cell starts: 0 - beginning, 1 - end.\n\t *\n\t * @default 0\n\t */\n\tstartLocation?: number;\n\n\t/**\n\t * Relative location of where axis cell ends: 0 - beginning, 1 - end.\n\t *\n\t * @default 1\n\t */\n\tendLocation?: number;\n}\n\nexport interface ICategoryAxisDataItem extends IAxisDataItem {\n\n\t/**\n\t * Named category.\n\t */\n\tcategory?: string;\n\n\t/**\n\t * Named end category (for axis items that span multiple categories, like\n\t * axis ranges).\n\t */\n\tendCategory?: string;\n\n\t/**\n\t * Index of the data item.\n\t */\n\tindex?: number;\n\n\t/**\n\t * Relative location of the category within cell: 0 - start, 1 - end.\n\t */\n\tcategoryLocation?: number;\n\n\t/**\n\t * Relative location of the end category within cell: 0 - start, 1 - end.\n\t */\n\tendCategoryLocation?: number;\n\n\t/**\n\t * A distance to shift data item relative to its original position.\n\t *\n\t * The value is 0 to 1, where 1 is full witdth of the axis.\n\t *\n\t * Can be used to sort data items without modifying order of the actual data.\n\t */\n\tdeltaPosition?: number;\n\n}\n\nexport interface ICategoryAxisPrivate extends IAxisPrivate {\n\n\t/**\n\t * Start index of the current zoom scope.\n\t */\n\tstartIndex?: number;\n\n\t/**\n\t * End index of the current zoom scope.\n\t */\n\tendIndex?: number;\n\n}\n\nexport interface ICategoryAxisEvents extends IAxisEvents {\n\n}\n\n/**\n * Creates a category axis.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/category-axis/} for more info\n * @important\n */\nexport class CategoryAxis extends Axis {\n\tpublic static className: string = \"CategoryAxis\";\n\tpublic static classNames: Array = Axis.classNames.concat([CategoryAxis.className]);\n\n\tdeclare public _settings: ICategoryAxisSettings;\n\tdeclare public _privateSettings: ICategoryAxisPrivate;\n\tdeclare public _dataItemSettings: ICategoryAxisDataItem;\n\tdeclare public _events: ICategoryAxisEvents;\n\n\tprotected _frequency: number = 1;\n\n\tprotected _itemMap: { [index: string]: DataItem } = {};\n\n\tprotected _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"axis\"]);\n\t\tthis.fields.push(\"category\");\n\t\tthis.setPrivateRaw(\"name\", \"category\");\n\t\tthis.addTag(\"category\");\n\t\tsuper._afterNew();\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tconst len = this.dataItems.length;\n\t\tlet i = 0;\n\t\tif (this._valuesDirty) {\n\t\t\tthis._itemMap = {};\n\t\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\t\tdataItem.setRaw(\"index\", i);\n\t\t\t\tthis._itemMap[dataItem.get(\"category\") as string] = dataItem;\n\t\t\t\ti++;\n\t\t\t})\n\n\t\t\tthis.setPrivateRaw(\"maxZoomFactor\", len);\n\t\t}\n\n\t\tthis.setPrivateRaw(\"startIndex\", Math.max(Math.round(this.get(\"start\", 0) * len), 0));\n\t\tthis.setPrivateRaw(\"endIndex\", Math.min(Math.round(this.get(\"end\", 1) * len), len));\n\n\t\tif (this._sizeDirty || this._valuesDirty || (this.isDirty(\"start\") || this.isDirty(\"end\") || this.isPrivateDirty(\"endIndex\") || this.isPrivateDirty(\"startIndex\") || this.isPrivateDirty(\"width\") || this.isPrivateDirty(\"height\"))) {\n\t\t\tif (this.dataItems.length > 0) {\n\t\t\t\tthis._handleRangeChange();\n\t\t\t\tthis._prepareAxisItems();\n\t\t\t\tthis._updateAxisRanges();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _handleRangeChange() {\n\t\t$array.each(this.series, (series) => {\n\t\t\tlet startCategory = this.dataItems[this.startIndex()].get(\"category\");\n\t\t\tlet endCategory = this.dataItems[this.endIndex() - 1].get(\"category\");\n\n\t\t\tlet baseAxis = series.get(\"baseAxis\");\n\t\t\tlet xAxis = series.get(\"xAxis\");\n\t\t\tlet yAxis = series.get(\"yAxis\");\n\n\t\t\tif (xAxis instanceof CategoryAxis && yAxis instanceof CategoryAxis) {\n\t\t\t\tseries._markDirtyAxes();\n\t\t\t}\n\t\t\telse if (baseAxis === this) {\n\t\t\t\tlet key: string | undefined;\n\t\t\t\tlet openKey: string | undefined;\n\t\t\t\tlet otherAxis = yAxis;\n\t\t\t\tif (xAxis === baseAxis) {\n\t\t\t\t\tif (series.get(\"categoryXField\")) {\n\t\t\t\t\t\tkey = \"categoryX\";\n\t\t\t\t\t}\n\t\t\t\t\tif (series.get(\"openCategoryXField\")) {\n\t\t\t\t\t\topenKey = \"openCategoryX\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (yAxis === baseAxis) {\n\t\t\t\t\tif (series.get(\"categoryYField\")) {\n\t\t\t\t\t\tkey = \"categoryY\";\n\t\t\t\t\t}\n\t\t\t\t\tif (series.get(\"openCategoryYField\")) {\n\t\t\t\t\t\topenKey = \"openCategoryY\";\n\t\t\t\t\t}\n\t\t\t\t\totherAxis = xAxis;\n\t\t\t\t}\n\n\t\t\t\tif (otherAxis.className == \"ValueAxis\") {\n\n\t\t\t\t\tif (key || openKey) {\n\t\t\t\t\t\tlet startDataItem: DataItem | undefined;\n\t\t\t\t\t\tlet endDataItem: DataItem | undefined;\n\n\t\t\t\t\t\tfor (let i = 0, len = series.dataItems.length; i < len; i++) {\n\t\t\t\t\t\t\tlet dataItem = series.dataItems[i];\n\t\t\t\t\t\t\tif (key) {\n\t\t\t\t\t\t\t\tif (dataItem.get(key as any) === startCategory) {\n\t\t\t\t\t\t\t\t\tstartDataItem = dataItem;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (openKey) {\n\t\t\t\t\t\t\t\tif (dataItem.get(openKey as any) === startCategory) {\n\t\t\t\t\t\t\t\t\tstartDataItem = dataItem;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (let i = series.dataItems.length - 1; i >= 0; i--) {\n\t\t\t\t\t\t\tlet dataItem = series.dataItems[i];\n\t\t\t\t\t\t\tif (key) {\n\t\t\t\t\t\t\t\tif (dataItem.get(key as any) === endCategory) {\n\t\t\t\t\t\t\t\t\tendDataItem = dataItem;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (openKey) {\n\t\t\t\t\t\t\t\tif (dataItem.get(openKey as any) === endCategory) {\n\t\t\t\t\t\t\t\t\tendDataItem = dataItem;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet startIndex = 0;\n\t\t\t\t\t\tlet endIndex = series.dataItems.length;\n\n\t\t\t\t\t\tif (startDataItem) {\n\t\t\t\t\t\t\tstartIndex = series.dataItems.indexOf(startDataItem);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (endDataItem) {\n\t\t\t\t\t\t\tendIndex = series.dataItems.indexOf(endDataItem) + 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tseries.setPrivate(\"startIndex\", startIndex);\n\t\t\t\t\t\tseries.setPrivate(\"endIndex\", endIndex);\n\n\t\t\t\t\t\tlet hasValue = false;\n\t\t\t\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\t\t\t\tconst dataItem = series.dataItems[i];\n\n\t\t\t\t\t\t\t$array.each(series.__valueXShowFields, (key) => {\n\t\t\t\t\t\t\t\tlet value = dataItem.get(key);\n\t\t\t\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\t\t\t\thasValue = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t$array.each(series.__valueYShowFields, (key) => {\n\t\t\t\t\t\t\t\tlet value = dataItem.get(key);\n\t\t\t\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\t\t\t\thasValue = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\tif (hasValue) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tseries.setPrivate(\"outOfSelection\", !hasValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tseries._markDirtyAxes();\t// must be outside\n\t\t\t}\n\t\t})\n\t}\n\n\n\tprotected _prepareAxisItems() {\n\t\tconst renderer = this.get(\"renderer\");\n\t\tconst len = this.dataItems.length;\n\n\t\tlet startIndex = this.startIndex();\n\t\tif (startIndex > 0) {\n\t\t\tstartIndex--;\n\t\t}\n\n\t\tlet endIndex = this.endIndex();\n\t\tif (endIndex < len) {\n\t\t\tendIndex++;\n\t\t}\n\n\t\tlet maxCount = renderer.axisLength() / Math.max(renderer.get(\"minGridDistance\")!, 1 / Number.MAX_SAFE_INTEGER);\n\n\t\tlet frequency = Math.max(1, Math.min(len, Math.ceil((endIndex - startIndex) / maxCount)));\n\t\tstartIndex = Math.floor(startIndex / frequency) * frequency;\n\t\tthis._frequency = frequency;\n\n\t\tfor (let j = 0; j < len; j++) {\n\t\t\tthis.dataItems[j].hide();\n\t\t}\n\n\t\tlet f = this.dataItems[startIndex].get(\"index\", 0);\n\n\t\tfor (let i = startIndex; i < endIndex; i = i + frequency) {\n\t\t\tlet dataItem = this.dataItems[i];\n\n\t\t\tthis._createAssets(dataItem, []);\n\n\t\t\tif (dataItem.isHidden()) {\n\t\t\t\tdataItem.show();\n\t\t\t}\n\n\t\t\tthis._prepareDataItem(dataItem, f, frequency);\n\t\t\tf++;\n\t\t}\n\n\t\tthis._updateGhost();\n\t}\n\n\n\tpublic _prepareDataItem(dataItem: DataItem, fillIndex?: number, count?: number) {\n\t\tlet renderer = this.get(\"renderer\");\n\n\t\tlet categoryLocation = dataItem.get(\"categoryLocation\", 0);\n\t\tlet endCategoryLocation = dataItem.get(\"endCategoryLocation\", 1);\n\n\t\tlet index: number | undefined = dataItem.get(\"index\");\n\n\t\tif (!$type.isNumber(index)) {\n\t\t\tindex = this.categoryToIndex(dataItem.get(\"category\")!);\n\t\t}\n\n\t\tlet position = this.indexToPosition(index, categoryLocation);\n\n\t\tlet endCategory = dataItem.get(\"endCategory\")!;\n\t\tlet endIndex: number;\n\t\tif (endCategory) {\n\t\t\tendIndex = this.categoryToIndex(endCategory);\n\t\t\tif (!$type.isNumber(endIndex)) {\n\t\t\t\tendIndex = index;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tendIndex = index;\n\t\t}\n\n\t\tlet endPosition = this.indexToPosition(endIndex, endCategoryLocation);\n\n\t\tlet fillEndIndex: number;\n\t\tlet fillEndPosition: number;\n\n\t\tif (dataItem.get(\"isRange\")) {\n\t\t\tfillEndIndex = endIndex;\n\t\t}\n\t\telse {\n\t\t\tfillEndIndex = index + this._frequency - 1;\n\t\t}\n\n\t\tfillEndPosition = this.indexToPosition(fillEndIndex, endCategoryLocation);\n\n\t\trenderer.updateLabel(dataItem.get(\"label\"), position, endPosition, count);\n\t\trenderer.updateGrid(dataItem.get(\"grid\"), position, endPosition);\n\t\trenderer.updateTick(dataItem.get(\"tick\"), position, endPosition, count);\n\t\trenderer.updateFill(dataItem.get(\"axisFill\"), position, fillEndPosition);\n\n\t\tthis._processBullet(dataItem);\n\t\trenderer.updateBullet(dataItem.get(\"bullet\"), position, endPosition);\n\n\t\tconst fillRule = this.get(\"fillRule\");\n\t\tif (fillRule) {\n\t\t\tfillRule(dataItem, fillIndex)\n\t\t}\n\t}\n\n\tpublic startIndex() {\n\t\tlet len = this.dataItems.length;\n\t\treturn Math.min(Math.max(this.getPrivate(\"startIndex\", 0), 0), len - 1);\n\t}\n\n\tpublic endIndex() {\n\t\tlet len = this.dataItems.length;\n\t\treturn Math.max(1, Math.min(this.getPrivate(\"endIndex\", len), len));\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic baseValue(): any {\n\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic basePosition() {\n\t\treturn 0;\n\t}\n\n\t/**\n\t * Returns X coordinate in pixels corresponding to specific category index.\n\t *\n\t * @param value Index\n\t * @return X coordinate\n\t */\n\tpublic getX(value: string): number {\n\t\tlet axisDataItem = this._itemMap[value];\n\t\tif (axisDataItem) {\n\t\t\treturn this._settings.renderer.positionToCoordinate(this.indexToPosition(axisDataItem.get(\"index\", 0)));\n\t\t}\n\t\treturn NaN;\n\t}\n\n\t/**\n\t * Returns Y coordinate in pixels corresponding to specific category index.\n\t *\n\t * @param value Index\n\t * @return Y coordinate\n\t */\n\tpublic getY(value: string): number {\n\t\tlet axisDataItem = this._itemMap[value];\n\t\tif (axisDataItem) {\n\t\t\treturn this._settings.renderer.positionToCoordinate(this.indexToPosition(axisDataItem.get(\"index\", 0)));\n\t\t}\n\t\treturn NaN;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemPositionX(dataItem: DataItem, field: string, cellLocation: number, _axisLocation?: number): number {\n\t\tconst category = dataItem.get(field as any);\n\t\tconst axisDataItem = this._itemMap[category];\n\n\t\tif (axisDataItem) {\n\t\t\treturn this.indexToPosition(axisDataItem.get(\"index\", 0), cellLocation);\n\t\t}\n\t\treturn NaN;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemCoordinateX(dataItem: DataItem, field: string, cellLocation: number, _axisLocation?: number): number {\n\t\treturn this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(dataItem, field, cellLocation, _axisLocation));\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemPositionY(dataItem: DataItem, field: string, cellLocation: number, _axisLocation?: number): number {\n\t\tconst category = dataItem.get(field as any);\n\t\tconst axisDataItem = this._itemMap[category];\n\t\tif (axisDataItem) {\n\t\t\treturn this.indexToPosition(axisDataItem.get(\"index\", 0), cellLocation);\n\t\t}\n\t\treturn NaN;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemCoordinateY(dataItem: DataItem, field: string, cellLocation: number, _axisLocation?: number): number {\n\t\treturn this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(dataItem, field, cellLocation, _axisLocation));\n\t}\n\n\t/**\n\t * Converts category index to a relative position.\n\t *\n\t * `location` indicates relative position within category: 0 - start, 1 - end.\n\t *\n\t * If not set, will use middle (0.5) of the category.\n\t *\n\t * @param index Index\n\t * @param location Location\n\t * @return Index\n\t */\n\tpublic indexToPosition(index: number, location?: number): number {\n\t\tif (!$type.isNumber(location)) {\n\t\t\tlocation = 0.5;\n\t\t}\n\n\t\tlet len = this.dataItems.length;\n\n\t\tlet startLocation = this.get(\"startLocation\", 0);\n\t\tlet endLocation = this.get(\"endLocation\", 1);\n\n\t\tlen -= startLocation;\n\t\tlen -= (1 - endLocation);\n\n\t\tlet position = (index + location - startLocation) / len;\n\n\t\tlet dataItem = this.dataItems[index];\n\t\tif (dataItem) {\n\t\t\tposition += dataItem.get(\"deltaPosition\", 0);\n\t\t}\n\n\t\treturn position;\n\t}\n\n\t/**\n\t * Returns an index of a category.\n\t *\n\t * @param category Category to look up\n\t * @return Index\n\t */\n\tpublic categoryToIndex(category: string): number {\n\t\tlet dataItem = this._itemMap[category];\n\t\tif (dataItem) {\n\t\t\treturn dataItem.get(\"index\")!;\n\t\t}\n\t\treturn NaN;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic dataItemToPosition(dataItem: DataItem): number {\n\t\treturn this.indexToPosition(dataItem.get(\"index\")!);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic roundAxisPosition(position: number, location: number): number {\n\t\tposition += (0.5 - location) / this.dataItems.length;\n\t\treturn this.indexToPosition(this.axisPositionToIndex(position), location);\n\t}\n\n\t/**\n\t * Returns an index of the category that corresponds to specific pixel\n\t * position within axis.\n\t *\n\t * @param position Position (px)\n\t * @return Category index\n\t */\n\tpublic axisPositionToIndex(position: number): number {\n\t\tlet len = this.dataItems.length;\n\t\treturn $math.fitToRange(Math.floor(position * len), 0, len - 1);//$math.fitToRange(Math.floor((end - start) * len * position + len * start), 0, len - 1);\n\t}\n\n\t/**\n\t * Returns text to be used in an axis tooltip for specific relative position.\n\t *\n\t * @param position Position\n\t * @return Tooltip text\n\t */\n\tpublic getTooltipText(position: number): string | undefined {\n\t\t//@todo number formatter + tag\n\t\tconst dataItem = this.dataItems[this.axisPositionToIndex(position)];\n\t\tif (dataItem) {\n\t\t\tconst label = dataItem.get(\"label\")\n\t\t\tif (label) {\n\t\t\t\treturn populateString(label, this.get(\"tooltipText\", \"\"));\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _updateTooltipText(tooltip: Tooltip, position: number) {\n\t\ttooltip._setDataItem(this.dataItems[this.axisPositionToIndex(position)]);\n\t\ttooltip.label.text.markDirtyText();\n\t}\n\n\t/**\n\t * Returns a data item from series that is closest to the `position`.\n\t *\n\t * @param series Series\n\t * @param position Relative position\n\t * @return Data item\n\t */\n\tpublic getSeriesItem(series: XYSeries, position: number): DataItem | undefined {\n\t\tif (this.dataItems.length > 0) {\n\t\t\tlet fieldName = (this.getPrivate(\"name\")! + this.get(\"renderer\").getPrivate(\"letter\")!);\n\t\t\tlet index = this.axisPositionToIndex(position);\n\t\t\t// try simple first\n\t\t\tlet seriesDataItem = series.dataItems[index];\n\t\t\tlet axisDataItem = this.dataItems[index];\n\t\t\tlet category = axisDataItem.get(\"category\");\n\n\t\t\tif (seriesDataItem && axisDataItem) {\n\t\t\t\tif (seriesDataItem.get(fieldName) === category) {\n\t\t\t\t\treturn seriesDataItem;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if not found, try looking\n\t\t\tfor (let i = 0, len = series.dataItems.length; i < len; i++) {\n\t\t\t\tlet dataItem = series.dataItems[i];\n\t\t\t\tif (dataItem.get(fieldName) === category) {\n\t\t\t\t\treturn dataItem;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Zooms the axis to specific `start` and `end` indexes.\n\t *\n\t * Optional `duration` specifies duration of zoom animation in milliseconds.\n\t *\n\t * @param start Start index\n\t * @param end End index\n\t * @param duration Duration in milliseconds\n\t */\n\tpublic zoomToIndexes(start: number, end: number, duration?: number) {\n\t\tlet len = this.dataItems.length;\n\t\tthis.zoom(start / len, end / len, duration);\n\t}\n\n\tpublic zoomToCategories(startCategory: string, endCategory: string, duration?: number) {\n\t\tthis.zoomToIndexes(this.categoryToIndex(startCategory), this.categoryToIndex(endCategory) + 1, duration);\n\t}\n\n\t/**\n\t * Returns position span between start and end of a single cell in axis.\n\t *\n\t * @since 5.2.30\n\t * @return Position\n\t * @ignore\n\t */\n\tpublic getCellWidthPosition(): number {\n\t\treturn 1 / this.dataItems.length / (this.get(\"end\", 1) - this.get(\"start\", 0));\n\t}\n}\n","import type { DataItem } from \"../../../core/render/Component\";\nimport type { AxisRenderer } from \"./AxisRenderer\";\nimport { CategoryAxis, ICategoryAxisSettings, ICategoryAxisPrivate, ICategoryAxisDataItem, ICategoryAxisEvents } from \"./CategoryAxis\";\nimport type { ITimeInterval } from \"../../../core/util/Time\";\nimport * as $time from \"../../../core/util/Time\";\nimport * as $type from \"../../../core/util/Type\";\nimport * as $array from \"../../../core/util/Array\";\nimport * as $utils from \"../../../core/util/Utils\";\nimport type { Tooltip } from \"../../../core/render/Tooltip\";\n\nexport interface ICategoryDateAxisSettings extends ICategoryAxisSettings {\n\n\t/**\n\t * Indicates granularity of data.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Data_granularity} for more info\n\t */\n\tbaseInterval: ITimeInterval;\n\n\t/**\n\t * A list of intervals the axis is allowed to show grid/labels on.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Grid_granularity} for more info\n\t */\n\tgridIntervals?: Array;\n\n\t/**\n\t * Display \"period change\" labels using different format.\n\t *\n\t * If set to `true`, will use `periodChangeDateFormats` instead\n\t * of `dateFormats` for such labels, e.g. for month start.\n\t *\n\t * @default true\n\t */\n\tmarkUnitChange?: boolean;\n\n\t/**\n\t * Date formats used for intermediate labels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Date_formats} for more info\n\t */\n\tdateFormats?: { [index: string]: string };\n\n\t/**\n\t * Date formats used for \"period change\" labels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Date_formats} for more info\n\t */\n\tperiodChangeDateFormats?: { [index: string]: string };\n\n\t/**\n\t * A date format to use for axis tooltip.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-dates/} for more info\n\t */\n\ttooltipDateFormat?: string;\n\n}\n\nexport interface ICategoryDateAxisDataItem extends ICategoryAxisDataItem {\n}\n\nexport interface ICategoryDateAxisPrivate extends ICategoryAxisPrivate {\n\n\t/**\n\t * Current base interval.\n\t */\n\tbaseInterval: ITimeInterval;\n\n}\n\nexport interface ICategoryDateAxisEvents extends ICategoryAxisEvents {\n}\n\n\n/**\n * Category-based date axis.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/category-date-axis/} for more info\n * @important\n */\nexport class CategoryDateAxis extends CategoryAxis {\n\tpublic static className: string = \"CategoryDateAxis\";\n\tpublic static classNames: Array = CategoryAxis.classNames.concat([CategoryDateAxis.className]);\n\n\tdeclare public _settings: ICategoryDateAxisSettings;\n\tdeclare public _privateSettings: ICategoryDateAxisPrivate;\n\tdeclare public _dataItemSettings: ICategoryDateAxisDataItem;\n\tdeclare public _events: ICategoryDateAxisEvents;\n\n\tprotected _frequency: number = 1;\n\n\tprotected _itemMap: { [index: string]: DataItem } = {};\n\n\tprotected _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"axis\"]);\n\t\tthis.fields.push(\"category\");\n\t\tsuper._afterNew();\n\t}\n\n\n\tprotected _prepareAxisItems() {\n\t\t// temp\n\t\tthis.setPrivateRaw(\"baseInterval\", this.get(\"baseInterval\"));\n\n\t\tconst renderer = this.get(\"renderer\");\n\t\tconst len = this.dataItems.length;\n\n\t\tlet startIndex = this.startIndex();\n\t\tif (startIndex > 0) {\n\t\t\tstartIndex--;\n\t\t}\n\n\t\tlet endIndex = this.endIndex();\n\t\tif (endIndex < len) {\n\t\t\tendIndex++;\n\t\t}\n\n\t\tlet maxCount = renderer.axisLength() / Math.max(renderer.get(\"minGridDistance\")!, 1 / Number.MAX_SAFE_INTEGER);\n\n\t\tlet frequency = Math.min(len, Math.ceil((endIndex - startIndex) / maxCount));\n\t\tstartIndex = Math.floor(startIndex / frequency) * frequency;\n\t\tthis._frequency = frequency;\n\n\t\tfor (let j = 0; j < len; j++) {\n\t\t\tthis.dataItems[j].hide();\n\t\t}\n\n\t\tlet startTime = Number(this.dataItems[startIndex].get(\"category\"));\n\t\tlet endTime = Number(this.dataItems[endIndex - 1].get(\"category\"));\n\t\tlet realDuration = (endTime - startTime);\n\t\tif(endIndex - startIndex < maxCount){\n\t\t\trealDuration = (endTime - startTime) - ((endTime - startTime) / this.baseDuration() - (endIndex - startIndex)) * this.baseDuration();\n\t\t}\n\n\t\t// if all items are on axis\n\t\tlet gridInterval = $time.chooseInterval(0, realDuration, maxCount, this.get(\"gridIntervals\")!);\n\n\t\tconst nextGridUnit = $time.getNextUnit(gridInterval.timeUnit);\n\t\tconst baseInterval = this.getPrivate(\"baseInterval\");\n\n\t\tif ($time.getIntervalDuration(gridInterval) < this.baseDuration()) {\n\t\t\tgridInterval = { ...baseInterval };\n\t\t}\n\n\t\tconst formats = this.get(\"dateFormats\")!;\n\n\t\tlet previousValue = -Infinity;\n\t\tlet previousIndex = -Infinity;\n\t\tlet previousUnitValue = -Infinity;\n\t\tlet format: string;\n\n\t\tlet selectedItems: Array<{ format: string, dataItem: DataItem }> = [];\n\t\tlet changed = false;\n\n\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\tlet dataItem = this.dataItems[i];\n\t\t\tlet index = dataItem.get(\"index\")!;\n\t\t\tlet skip = false;\n\n\t\t\tlet value = Number(dataItem.get(\"category\"));\n\t\t\tlet date = new Date(value);\n\t\t\tlet unitValue = $time.getUnitValue(date, gridInterval.timeUnit);\n\n\t\t\tformat = formats[gridInterval.timeUnit];\n\t\t\tlet added = false;\n\n\t\t\tif (gridInterval.timeUnit != \"year\" && gridInterval.timeUnit != \"week\") {\n\t\t\t\tif (nextGridUnit && this.get(\"markUnitChange\") && $type.isNumber(previousValue)) {\n\n\t\t\t\t\tif ($time.checkChange(value, previousValue, nextGridUnit, this._root.utc)) {\n\t\t\t\t\t\tformat = this.get(\"periodChangeDateFormats\")![gridInterval.timeUnit];\n\n\t\t\t\t\t\tif (index - frequency * 0.5 < previousIndex) {\n\t\t\t\t\t\t\tselectedItems.pop();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tselectedItems.push({ format: format, dataItem: dataItem });\n\t\t\t\t\t\tchanged = true;\n\t\t\t\t\t\tadded = true;\n\t\t\t\t\t\tpreviousIndex = index;\n\t\t\t\t\t\tpreviousUnitValue = unitValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet shouldAdd = false;\n\t\t\tif (gridInterval.timeUnit === \"day\" || gridInterval.timeUnit === \"week\") {\n\t\t\t\tif (index - previousIndex >= frequency) {\n\t\t\t\t\tshouldAdd = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (unitValue % gridInterval.count === 0) {\n\t\t\t\t\tif (unitValue != previousUnitValue) {\n\t\t\t\t\t\tshouldAdd = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!added && shouldAdd) {\n\t\t\t\tif (index - frequency * 0.7 < previousIndex) {\n\t\t\t\t\tif (changed) {\n\t\t\t\t\t\tskip = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!skip) {\n\t\t\t\t\tselectedItems.push({ format: format, dataItem: dataItem });\n\t\t\t\t\tpreviousIndex = index;\n\t\t\t\t\tpreviousUnitValue = unitValue;\n\t\t\t\t}\n\t\t\t\tchanged = false;\n\n\t\t\t}\n\n\t\t\tpreviousValue = value;\n\n\t\t}\n\n\t\tif (selectedItems.length > 0) {\n\t\t\tlet f = selectedItems[0].dataItem.get(\"index\", 0);\n\n\t\t\t$array.each(selectedItems, (item) => {\n\t\t\t\tconst dataItem = item.dataItem;\n\t\t\t\tconst format = item.format;\n\t\t\t\tthis._createAssets(dataItem, []);\n\n\t\t\t\tif (dataItem.isHidden()) {\n\t\t\t\t\tdataItem.show();\n\t\t\t\t}\n\n\t\t\t\tlet value = Number(dataItem.get(\"category\"));\n\t\t\t\tlet date = new Date(value);\n\n\t\t\t\tconst label = dataItem.get(\"label\");\n\t\t\t\tif (label) {\n\t\t\t\t\tlabel.set(\"text\", this._root.dateFormatter.format(date, format!));\n\t\t\t\t}\n\t\t\t\tf++;\n\t\t\t\tthis._prepareDataItem(dataItem, f, frequency);\n\t\t\t})\n\n\t\t}\n\t}\n\n\t/**\n\t * Returns a duration of currently active `baseInterval` in milliseconds.\n\t *\n\t * @return Duration\n\t */\n\tpublic baseDuration(): number {\n\t\treturn $time.getIntervalDuration(this.getPrivate(\"baseInterval\"));\n\t}\n\n\n\t/**\n\t * Returns text to be used in an axis tooltip for specific relative position.\n\t *\n\t * @param position Position\n\t * @return Tooltip text\n\t */\n\tpublic getTooltipText(position: number): string | undefined {\n\t\t//@todo number formatter + tag\n\t\tlet dataItem = this.dataItems[this.axisPositionToIndex(position)];\n\n\t\tif (dataItem) {\n\t\t\tlet format = this.get(\"dateFormats\")![this.getPrivate(\"baseInterval\").timeUnit];\n\t\t\treturn this._root.dateFormatter.format(new Date(dataItem.get(\"category\", 0)), this.get(\"tooltipDateFormat\", format));\n\t\t}\n\t}\n\n\tprotected _updateTooltipText(tooltip: Tooltip, position: number) {\n\t\ttooltip.label.set(\"text\", this.getTooltipText(position));\n\t}\n\n}\n","import type { AxisRenderer } from \"./AxisRenderer\";\nimport type { TimeUnit } from \"../../../core/util/Time\"\n\nimport { ValueAxis, IValueAxisSettings, IValueAxisPrivate, IValueAxisDataItem, IValueAxisEvents, IMinMaxStep } from \"./ValueAxis\";\n\nimport * as $utils from \"../../../core/util/Utils\";\nimport * as $math from \"../../../core/util/Math\";\n\nexport interface IDurationAxisSettings extends IValueAxisSettings {\n\n\t/**\n\t * A base unit (granularity) of data.\n\t *\n\t * Used to indicate what are the base units of your data.\n\t *\n\t * Available options: `\"millisecond\"`, `\"second\"` (default), `\"minute\"`, `\"hour\"`, `\"day\"`, `\"week\"`, `\"month\"`, and `\"year\"`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-durations/#Base_unit} for more info\n\t * @default \"second\"\n\t */\n\tbaseUnit?: TimeUnit\n\n}\n\nexport interface IDurationAxisDataItem extends IValueAxisDataItem {\n}\n\nexport interface IDurationAxisPrivate extends IValueAxisPrivate {\n\n\t/**\n\t * A format to used by axis to format its labels.\n\t *\n\t * @readonly\n\t */\n\tdurationFormat: string;\n\n}\n\nexport interface IDurationAxisEvents extends IValueAxisEvents {\n}\n\n/**\n * Creates a duration axis.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/duration-axis/} for more info\n * @important\n */\nexport class DurationAxis extends ValueAxis {\n\tpublic static className: string = \"DurationAxis\";\n\tpublic static classNames: Array = ValueAxis.classNames.concat([DurationAxis.className]);\n\n\tdeclare public _settings: IDurationAxisSettings;\n\tdeclare public _privateSettings: IDurationAxisPrivate;\n\tdeclare public _dataItemSettings: IDurationAxisDataItem;\n\tdeclare public _events: IDurationAxisEvents;\n\n\tprotected _dataGrouped: boolean = false;\n\tprotected _groupingCalculated: boolean = false;\n\tprotected _intervalDuration: number = 1;\n\n\tpublic _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"axis\"]);\n\t\tsuper._afterNew();\n\t}\n\n\n\tprotected _adjustMinMax(min: number, max: number, gridCount: number, strictMode?: boolean): IMinMaxStep {\n\t\tlet minMaxStep: IMinMaxStep;\n\n\t\tconst durationFormatter = this.getDurationFormatter();\n\t\tconst baseUnit = this.get(\"baseUnit\");\n\t\t// we don't allow to go to smaller units, setting so to avoid invalidation\n\t\tthis.setRaw(\"maxPrecision\", 0);\n\n\t\tif (baseUnit == \"millisecond\" || baseUnit == \"second\" || baseUnit == \"minute\" || baseUnit == \"hour\") {\n\t\t\t// will fail if 0\n\t\t\tif (gridCount <= 1) {\n\t\t\t\tgridCount = 1;\n\t\t\t}\n\n\t\t\tgridCount = Math.round(gridCount);\n\n\t\t\t//let initialMin: number = min;\n\t\t\t//let initialMax: number = max;\n\n\t\t\tlet difference = max - min;\n\n\t\t\t// in case min and max is the same, use max\n\t\t\tif (difference === 0) {\n\t\t\t\tdifference = Math.abs(max);\n\t\t\t}\n\n\t\t\tlet step = difference / gridCount;\n\n\t\t\tlet divisors = [60, 30, 20, 15, 10, 2, 1];\n\t\t\tlet realDivisor = 1;\n\n\t\t\tif (baseUnit == \"hour\") {\n\t\t\t\tdivisors = [24, 12, 6, 4, 2, 1];\n\t\t\t}\n\n\t\t\tfor (let divisor of divisors) {\n\t\t\t\tif (difference / divisor > gridCount) {\n\t\t\t\t\trealDivisor = divisor;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlet count = Math.ceil(((max - min) / realDivisor) / gridCount);\n\n\t\t\tlet exponent: number = Math.log(Math.abs(count)) * Math.LOG10E;\n\t\t\tlet power = Math.pow(10, Math.floor(exponent)) / 10;\n\t\t\tlet reducedCount = count / power;\n\n\t\t\t// find closest to divisor\n\t\t\tlet closest = $math.closest(divisors, reducedCount);\n\t\t\tcount = closest * power;\n\n\t\t\tstep = realDivisor * count;\n\n\t\t\tmin = Math.floor(min / step) * step;\n\t\t\tmax = Math.ceil(max / step) * step;\n\n\t\t\t/*\n\t\t\tcausese SO with seconds\n\t\t\tif (strictMode) {\n\t\t\t\tmin -= step;\n\t\t\t\tif (min < 0 && initialMin >= 0) {\n\t\t\t\t\tmin = 0;\n\t\t\t\t}\n\t\t\t\tmax += step;\n\n\t\t\t\tif (max > 0 && initialMax <= 0) {\n\t\t\t\t\tmax = 0;\n\t\t\t\t}\n\t\t\t}*/\t\t\t\n\t\t\tminMaxStep = { min: min, max: max, step: step };\n\t\t}\n\t\telse {\n\t\t\tminMaxStep = super._adjustMinMax(min, max, gridCount, strictMode);\n\t\t}\n\n\t\t// choose duration formatter based on step\n\t\tthis.setPrivateRaw(\"durationFormat\", durationFormatter.getFormat(minMaxStep.step, minMaxStep.max, baseUnit));\n\n\t\treturn minMaxStep;\n\t}\n\n\tprotected _formatText(value: number) {\n\t\tconst formatter = this.getDurationFormatter();\n\t\treturn formatter.format(value, this.getPrivate(\"durationFormat\"), this.get(\"baseUnit\"));\n\t}\n\n\t/**\n\t * Returns text to be used in an axis tooltip for specific relative position.\n\t *\n\t * @param position Position\n\t * @return Tooltip text\n\t */\n\tpublic getTooltipText(position: number): string | undefined {\n\t\tconst formatter = this.getDurationFormatter();\n\t\tconst extraDecimals = this.get(\"extraTooltipPrecision\", 0);\n\t\tconst decimals = this.getPrivate(\"stepDecimalPlaces\", 0) + extraDecimals;\n\t\tconst value = $math.round(this.positionToValue(position), decimals);\n\n\t\treturn formatter.format(value, this.getPrivate(\"durationFormat\"), this.get(\"baseUnit\"));\n\t}\n}\n","import { Entity, IEntitySettings, IEntityPrivate } from \"../../../core/util/Entity\";\nimport type { Sprite } from \"../../../core/render/Sprite\";\nimport type { Axis } from \"./Axis\";\nimport type { AxisRenderer } from \"./AxisRenderer\";\n\nexport interface IAxisBulletSettings extends IEntitySettings {\n\n\t/**\n\t * Relative location of the bullet within the cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t */\n\tlocation?: number;\n\n\t/**\n\t * A visual element of the bullet.\n\t */\n\tsprite: Sprite;\n\n\t/**\n\t * Indicates if the bullet should be stacked on top of another bullet if it's\n\t * on the same position.\n\t * \n\t * Will work on horizontal or vertical axes only.\n\t *\n\t * @since 5.2.28\n\t * @default false\n\t */\n\tstacked?: boolean;\n\n}\n\nexport interface IAxisBulletPrivate extends IEntityPrivate {\n}\n\n/**\n * Draws a bullet on an axis.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Axis_bullets} for more info\n */\nexport class AxisBullet extends Entity {\n\n\t/**\n\t * Target axis object.\n\t */\n\tpublic axis: Axis | undefined;\n\n\tdeclare public _settings: IAxisBulletSettings;\n\tdeclare public _privateSettings: IAxisBulletPrivate;\n\n\tpublic static className: string = \"AxisBullet\";\n\tpublic static classNames: Array = Entity.classNames.concat([AxisBullet.className]);\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tconst sprite = this.get(\"sprite\");\n\n\t\tif (this.isDirty(\"sprite\")) {\n\t\t\tif (sprite) {\n\t\t\t\tsprite.setAll({ position: \"absolute\", role: \"figure\" });\n\t\t\t\tthis._disposers.push(sprite);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"location\")) {\n\t\t\tconst dataItem = sprite.dataItem;\n\t\t\tif (this.axis && sprite && dataItem) {\n\t\t\t\tthis.axis._prepareDataItem(dataItem as any)\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Candlestick, ICandlestickSettings, ICandlestickPrivate } from \"./Candlestick\";\n\n\nexport interface IOHLCSettings extends ICandlestickSettings {\n}\n\nexport interface IOHLCPrivate extends ICandlestickPrivate {\n}\n\nexport class OHLC extends Candlestick {\n\n\tdeclare public _settings: IOHLCSettings;\n\tdeclare public _privateSettings: IOHLCPrivate;\n\n\tpublic static className: string = \"OHLC\";\n\tpublic static classNames: Array = Candlestick.classNames.concat([OHLC.className]);\n\n\tpublic _draw() {\n\n\t\tconst display = this._display;\n\n\t\tdisplay.moveTo(this.get(\"lowX1\", 0), this.get(\"lowY1\", 0));\n\t\tdisplay.lineTo(this.get(\"highX1\", 0), this.get(\"highY1\", 0));\n\n\t\tlet w = this.width();\n\t\tlet h = this.height();\n\n\t\tif (this.get(\"orientation\") == \"vertical\") {\n\n\t\t\tlet lY = h;\n\t\t\tlet hY = 0;\n\t\t\tdisplay.moveTo(0, lY);\n\t\t\tdisplay.lineTo(w / 2, lY);\n\n\t\t\tdisplay.moveTo(w / 2, hY);\n\t\t\tdisplay.lineTo(w, hY);\n\t\t}\n\t\telse {\n\t\t\tlet lX = 0;\n\t\t\tlet hX = w;\n\n\t\t\tdisplay.moveTo(lX, 0);\n\t\t\tdisplay.lineTo(lX, h / 2);\n\n\t\t\tdisplay.moveTo(hX, h / 2);\n\t\t\tdisplay.lineTo(hX, h);\n\t\t}\n\t}\n}\n","import type { DataItem } from \"../../../core/render/Component\";\n\nimport { CandlestickSeries, ICandlestickSeriesPrivate, ICandlestickSeriesSettings, ICandlestickSeriesDataItem, ICandlestickSeriesAxisRange } from \"./CandlestickSeries\";\nimport { OHLC } from \"./OHLC\";\nimport { Template } from \"../../../core/util/Template\";\nimport { ListTemplate } from \"../../../core/util/List\";\n\nimport * as $utils from \"../../../core/util/Utils\";\n\nexport interface IOHLCSeriesDataItem extends ICandlestickSeriesDataItem {\n}\n\nexport interface IOHLCSeriesSettings extends ICandlestickSeriesSettings {\n}\n\nexport interface IOHLCSeriesPrivate extends ICandlestickSeriesPrivate {\n}\n\nexport interface IOHLCSeriesAxisRange extends ICandlestickSeriesAxisRange {\n\n\t/**\n\t * List of [[OHLC]] columns in a range.\n\t */\n\tcolumns: ListTemplate\n\n}\n\n/**\n * OHLC series.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/candlestick-series/} for more info\n * @important\n */\nexport class OHLCSeries extends CandlestickSeries {\n\n\tdeclare public _settings: IOHLCSeriesSettings;\n\tdeclare public _privateSettings: IOHLCSeriesPrivate;\n\tdeclare public _dataItemSettings: IOHLCSeriesDataItem;\n\tdeclare public _axisRangeType: IOHLCSeriesAxisRange;\n\n\tpublic static className: string = \"OHLCSeries\";\n\tpublic static classNames: Array = CandlestickSeries.classNames.concat([OHLCSeries.className]);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeColumn(dataItem: DataItem, listTemplate: ListTemplate): OHLC {\n\t\tconst column = this.mainContainer.children.push(listTemplate.make());\n\t\tcolumn._setDataItem(dataItem);\n\t\tlistTemplate.push(column);\n\t\treturn column;\n\t}\n\n\t/**\n\t * A list of OHLC bars in the series.\n\t *\n\t * `columns.template` can be used to configure OHLC bars.\n\t *\n\t * @default new ListTemplate\n\t */\n\tpublic readonly columns: ListTemplate = new ListTemplate(\n\t\tTemplate.new({\n\t\t\tthemeTags: [\"autocolor\"]\n\t\t}),\n\t\t() => OHLC._new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.columns.template.get(\"themeTags\", []), [\"ohlc\", \"series\", \"column\"])\n\t\t}, [this.columns.template])\n\t);\n\n\tprotected _processAxisRange(axisRange: this[\"_axisRangeType\"]) {\n\t\tsuper._processAxisRange(axisRange);\n\t\taxisRange.columns = new ListTemplate(\n\t\t\tTemplate.new({}),\n\t\t\t() => OHLC._new(this._root, {\n\t\t\t\tthemeTags: $utils.mergeTags(axisRange.columns.template.get(\"themeTags\", []), [\"ohlc\", \"series\", \"column\"]),\n\t\t\t}, [this.columns.template, axisRange.columns.template])\n\t\t);\n\t}\n}\n","import { LineSeries, ILineSeriesSettings, ILineSeriesPrivate, ILineSeriesDataItem } from \"./LineSeries\";\nimport { curveMonotoneYTension } from \"../../../core/render/MonotoneYTension\";\n\nexport interface ISmoothedYLineSeriesDataItem extends ILineSeriesDataItem {\n\n}\n\nexport interface ISmoothedYLineSeriesSettings extends ILineSeriesSettings {\n\n\t/**\n\t * A tension force for the smoothing (0-1). The smaller the value the more\n\t * curvy the line will be.\n\t *\n\t * @default 0.5\n\t */\n\ttension?: number;\n\n}\n\nexport interface ISmoothedYLineSeriesPrivate extends ILineSeriesPrivate {\n}\n\n/**\n * Smoothed line series suitable for vertical plots.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/smoothed-series/} for more info\n */\nexport class SmoothedYLineSeries extends LineSeries {\n\tpublic static className: string = \"SmoothedYLineSeries\";\n\tpublic static classNames: Array = LineSeries.classNames.concat([SmoothedYLineSeries.className]);\n\n\tdeclare public _settings: ISmoothedYLineSeriesSettings;\n\tdeclare public _privateSettings: ISmoothedYLineSeriesPrivate;\n\tdeclare public _dataItemSettings: ISmoothedYLineSeriesDataItem;\n\n\tprotected _afterNew() {\n\t\tthis._setDefault(\"curveFactory\", curveMonotoneYTension(this.get(\"tension\", 0.5)) as any);\n\t\tsuper._afterNew();\n\t}\n\n\tpublic _updateChildren() {\n\t\tif (this.isDirty(\"tension\")) {\n\t\t\tthis.set(\"curveFactory\", curveMonotoneYTension(this.get(\"tension\", 0.5)) as any);\n\t\t\tthis._valuesDirty = true;\n\t\t}\n\n\t\tsuper._updateChildren();\n\t}\n}\n","import { LineSeries, ILineSeriesSettings, ILineSeriesPrivate, ILineSeriesDataItem } from \"./LineSeries\";\nimport { curveMonotoneXTension } from \"../../../core/render/MonotoneXTension\";\n\n\nexport interface ISmoothedXLineSeriesDataItem extends ILineSeriesDataItem {\n\n}\n\nexport interface ISmoothedXLineSeriesSettings extends ILineSeriesSettings {\n\n\t/**\n\t * A tension force for the smoothing (0-1). The smaller the value the more\n\t * curvy the line will be.\n\t *\n\t * @default 0.5\n\t */\n\ttension?: number;\n\n}\n\nexport interface ISmoothedXLineSeriesPrivate extends ILineSeriesPrivate {\n}\n\n/**\n * Smoothed line series suitable for horizontal plots.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/smoothed-series/} for more info\n */\nexport class SmoothedXLineSeries extends LineSeries {\n\tpublic static className: string = \"SmoothedXLineSeries\";\n\tpublic static classNames: Array = LineSeries.classNames.concat([SmoothedXLineSeries.className]);\n\n\tdeclare public _settings: ISmoothedXLineSeriesSettings;\n\tdeclare public _privateSettings: ISmoothedXLineSeriesPrivate;\n\tdeclare public _dataItemSettings: ISmoothedXLineSeriesDataItem;\n\n\tprotected _afterNew() {\n\t\tthis._setDefault(\"curveFactory\", curveMonotoneXTension(this.get(\"tension\", 0.5)) as any);\n\t\tsuper._afterNew();\n\t}\n\n\tpublic _updateChildren() {\n\t\tif (this.isDirty(\"tension\")) {\n\t\t\tthis.set(\"curveFactory\", curveMonotoneXTension(this.get(\"tension\", 0.5)) as any);\n\t\t\tthis._valuesDirty = true;\n\t\t}\n\n\t\tsuper._updateChildren();\n\t}\n}\n","import { LineSeries, ILineSeriesSettings, ILineSeriesPrivate, ILineSeriesDataItem } from \"./LineSeries\";\nimport { curveCardinal, CurveCardinalFactory } from \"d3-shape\";\n\nexport interface SmoothedXYLineSeriesDataItem extends ILineSeriesDataItem {\n\n}\n\nexport interface ISmoothedXYLineSeriesDataItem extends ILineSeriesDataItem {\n\n}\n\nexport interface SmoothedXYLineSeriesProperties extends ILineSeriesSettings {\n\n\t/**\n\t * A tension force for the smoothing (0-1). The smaller the value the more\n\t * curvy the line will be.\n\t *\n\t * @default 0.5\n\t */\n\ttension?: number;\n\n\t/**\n\t * @ignore\n\t*/\n\tcurveFactory?: CurveCardinalFactory\n\n}\n\nexport interface SmoothedXYLineSeriesPrivate extends ILineSeriesPrivate {\n}\n\n/**\n * Smoothed line series suitable for XY (scatter) charts\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/smoothed-series/} for more info\n */\nexport class SmoothedXYLineSeries extends LineSeries {\n\tpublic static className: string = \"SmoothedXYLineSeries\";\n\tpublic static classNames: Array = LineSeries.classNames.concat([SmoothedXYLineSeries.className]);\n\n\tdeclare public _settings: SmoothedXYLineSeriesProperties;\n\tdeclare public _privateSettings: SmoothedXYLineSeriesPrivate;\n\tdeclare public _dataItemSettings: SmoothedXYLineSeriesDataItem;\n\n\tprotected _afterNew() {\n\t\tthis._setDefault(\"curveFactory\", curveCardinal.tension(this.get(\"tension\", 0.5)));\n\t\tsuper._afterNew();\n\t}\n\n\tpublic _updateChildren() {\n\t\tif (this.isDirty(\"tension\")) {\n\t\t\tthis.set(\"curveFactory\", curveCardinal.tension(this.get(\"tension\", 0.5)) as any);\n\t\t\tthis._valuesDirty = true;\n\t\t}\n\n\t\tsuper._updateChildren();\n\t}\n}\n","function Step(context, t) {\n this._context = context;\n this._t = t;\n}\n\nStep.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = this._y = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: {\n if (this._t <= 0) {\n this._context.lineTo(this._x, y);\n this._context.lineTo(x, y);\n } else {\n var x1 = this._x * (1 - this._t) + x * this._t;\n this._context.lineTo(x1, this._y);\n this._context.lineTo(x1, y);\n }\n break;\n }\n }\n this._x = x, this._y = y;\n }\n};\n\nexport default function(context) {\n return new Step(context, 0.5);\n}\n\nexport function stepBefore(context) {\n return new Step(context, 0);\n}\n\nexport function stepAfter(context) {\n return new Step(context, 1);\n}\n","import { LineSeries, ILineSeriesSettings, ILineSeriesPrivate, ILineSeriesDataItem } from \"./LineSeries\";\nimport type { AxisRenderer } from \"../axes/AxisRenderer\";\nimport type { Axis } from \"../axes/Axis\";\nimport { Percent, p100 } from \"../../../core/util/Percent\";\nimport type { DataItem } from \"../../../core/render/Component\";\nimport { curveStepAfter } from \"d3-shape\";\n\nexport interface IStepLineSeriesDataItem extends ILineSeriesDataItem {\n}\n\nexport interface IStepLineSeriesSettings extends ILineSeriesSettings {\n\n\t/**\n\t * Width of the step in percent relative to the cell width.\n\t *\n\t * NOTE: setting this to less than 100% makes sense only when risers are\n\t * disabled: `noRisers: true`\n\t *\n\t * @default 100%\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/step-line-series/#Step_width} for more info\n\t */\n\tstepWidth?: Percent;\n\n\t/**\n\t * Disables vertical connecting lines for the steps.\n\t *\n\t * @default false\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/step-line-series/#Disabling_risers} for more info\n\t */\n\tnoRisers?: boolean;\n\n}\n\nexport interface IStepLineSeriesPrivate extends ILineSeriesPrivate {\n}\n\nexport class StepLineSeries extends LineSeries {\n\tpublic static className: string = \"StepLineSeries\";\n\tpublic static classNames: Array = LineSeries.classNames.concat([StepLineSeries.className]);\n\n\tdeclare public _settings: IStepLineSeriesSettings;\n\tdeclare public _privateSettings: IStepLineSeriesPrivate;\n\tdeclare public _dataItemSettings: IStepLineSeriesDataItem;\n\n\tprotected _afterNew() {\n\t\tthis._setDefault(\"curveFactory\", curveStepAfter);\n\t\tsuper._afterNew();\n\t}\n\n\n\tprotected _getPoints(dataItem: DataItem, o: { points: Array>, segments: number[][][], stacked: boolean | undefined, getOpen: boolean, basePosX: number, basePosY: number, fillVisible: boolean | undefined, xField: string, yField: string, xOpenField: string, yOpenField: string, vcx: number, vcy: number, baseAxis: Axis, xAxis: Axis, yAxis: Axis, locationX: number, locationY: number, openLocationX: number, openLocationY: number }) {\n\t\tlet points = o.points;\n\n\t\tlet width = this.get(\"stepWidth\", p100).value / 2;\n\n\t\tlet itemLocationX0 = dataItem.get(\"locationX\", o.locationX);\n\t\tlet itemLocationY0 = dataItem.get(\"locationY\", o.locationY);\n\t\tlet itemLocationX1 = itemLocationX0;\n\t\tlet itemLocationY1 = itemLocationY0;\n\n\t\tif (o.baseAxis === o.xAxis) {\n\t\t\titemLocationX0 -= width;\n\t\t\titemLocationX1 += width;\n\t\t}\n\t\telse if (o.baseAxis === o.yAxis) {\n\t\t\titemLocationY0 -= width;\n\t\t\titemLocationY1 += width;\n\t\t}\n\n\t\tlet xPos0 = o.xAxis.getDataItemPositionX(dataItem, o.xField, itemLocationX0, o.vcx);\n\t\tlet yPos0 = o.yAxis.getDataItemPositionY(dataItem, o.yField, itemLocationY0, o.vcy);\n\n\t\tlet xPos1 = o.xAxis.getDataItemPositionX(dataItem, o.xField, itemLocationX1, o.vcx);\n\t\tlet yPos1 = o.yAxis.getDataItemPositionY(dataItem, o.yField, itemLocationY1, o.vcy);\n\n\t\tif (this._shouldInclude(xPos0)) {\n\n\t\t\tconst iPoint0 = this.getPoint(xPos0, yPos0);\n\t\t\tconst point0 = [iPoint0.x, iPoint0.y];\n\n\t\t\tconst iPoint1 = this.getPoint(xPos1, yPos1);\n\t\t\tconst point1 = [iPoint1.x, iPoint1.y];\n\n\t\t\tif (o.fillVisible) {\n\t\t\t\tlet xOpenPos0: number = xPos0;\n\t\t\t\tlet yOpenPos0: number = yPos0;\n\t\t\t\tlet xOpenPos1: number = xPos1;\n\t\t\t\tlet yOpenPos1: number = yPos1;\n\n\t\t\t\tif (o.baseAxis === o.xAxis) {\n\t\t\t\t\tyOpenPos0 = o.basePosY;\n\t\t\t\t\tyOpenPos1 = o.basePosY;\n\t\t\t\t}\n\t\t\t\telse if (o.baseAxis === o.yAxis) {\n\t\t\t\t\txOpenPos0 = o.basePosX;\n\t\t\t\t\txOpenPos1 = o.basePosX;\n\t\t\t\t}\n\n\t\t\t\tif (o.getOpen) {\n\t\t\t\t\tlet valueX = dataItem.get(o.xOpenField as any);\n\t\t\t\t\tlet valueY = dataItem.get(o.yOpenField as any);\n\n\t\t\t\t\tif (valueX != null && valueY != null) {\n\t\t\t\t\t\titemLocationX0 = dataItem.get(\"openLocationX\", o.openLocationX);\n\t\t\t\t\t\titemLocationY0 = dataItem.get(\"openLocationY\", o.openLocationY);\n\n\t\t\t\t\t\titemLocationX1 = itemLocationX0;\n\t\t\t\t\t\titemLocationY1 = itemLocationY0;\n\n\t\t\t\t\t\tif (o.baseAxis === o.xAxis) {\n\t\t\t\t\t\t\titemLocationX0 -= width;\n\t\t\t\t\t\t\titemLocationX1 += width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (o.baseAxis === o.yAxis) {\n\t\t\t\t\t\t\titemLocationY0 -= width;\n\t\t\t\t\t\t\titemLocationY1 += width;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (o.stacked) {\n\t\t\t\t\t\t\tlet stackToItemX = dataItem.get(\"stackToItemX\")!;\n\t\t\t\t\t\t\tlet stackToItemY = dataItem.get(\"stackToItemY\")!;\n\n\t\t\t\t\t\t\tif (stackToItemX) {\n\t\t\t\t\t\t\t\txOpenPos0 = o.xAxis.getDataItemPositionX(stackToItemX, o.xField, itemLocationX0, (stackToItemX.component as StepLineSeries).get(\"vcx\"));\n\t\t\t\t\t\t\t\txOpenPos1 = o.xAxis.getDataItemPositionX(stackToItemX, o.xField, itemLocationX1, (stackToItemX.component as StepLineSeries).get(\"vcx\"));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tif (o.yAxis === o.baseAxis) {\n\t\t\t\t\t\t\t\t\txOpenPos0 = o.basePosX;\n\t\t\t\t\t\t\t\t\txOpenPos1 = o.basePosX;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (o.baseAxis === o.yAxis) {\n\t\t\t\t\t\t\t\t\txOpenPos0 = o.xAxis.getDataItemPositionX(dataItem, o.xOpenField, itemLocationX0, o.vcx);\n\t\t\t\t\t\t\t\t\txOpenPos1 = o.xAxis.getDataItemPositionX(dataItem, o.xOpenField, itemLocationX1, o.vcx);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (stackToItemY) {\n\t\t\t\t\t\t\t\tyOpenPos0 = o.yAxis.getDataItemPositionY(stackToItemY, o.yField, itemLocationY0, (stackToItemY.component as StepLineSeries).get(\"vcy\"));\n\t\t\t\t\t\t\t\tyOpenPos1 = o.yAxis.getDataItemPositionY(stackToItemY, o.yField, itemLocationY1, (stackToItemY.component as StepLineSeries).get(\"vcy\"));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tif (o.xAxis === o.baseAxis) {\n\t\t\t\t\t\t\t\t\tyOpenPos0 = o.basePosY;\n\t\t\t\t\t\t\t\t\tyOpenPos1 = o.basePosY;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (o.baseAxis === o.yAxis) {\n\t\t\t\t\t\t\t\t\tyOpenPos0 = o.yAxis.getDataItemPositionY(dataItem, o.yOpenField, itemLocationY0, o.vcy);\n\t\t\t\t\t\t\t\t\tyOpenPos1 = o.yAxis.getDataItemPositionY(dataItem, o.yOpenField, itemLocationY1, o.vcy);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\txOpenPos0 = o.xAxis.getDataItemPositionX(dataItem, o.xOpenField, itemLocationX0, o.vcx);\n\t\t\t\t\t\t\tyOpenPos0 = o.yAxis.getDataItemPositionY(dataItem, o.yOpenField, itemLocationY0, o.vcy);\n\t\t\t\t\t\t\txOpenPos1 = o.xAxis.getDataItemPositionX(dataItem, o.xOpenField, itemLocationX1, o.vcx);\n\t\t\t\t\t\t\tyOpenPos1 = o.yAxis.getDataItemPositionY(dataItem, o.yOpenField, itemLocationY1, o.vcy);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlet closeIPoint0 = this.getPoint(xOpenPos0, yOpenPos0);\n\t\t\t\tlet closeIPoint1 = this.getPoint(xOpenPos1, yOpenPos1);\n\n\t\t\t\tpoint0[2] = closeIPoint0.x;\n\t\t\t\tpoint0[3] = closeIPoint0.y;\n\n\t\t\t\tpoint1[2] = closeIPoint1.x;\n\t\t\t\tpoint1[3] = closeIPoint1.y;\n\t\t\t}\n\n\t\t\tpoints.push(point0);\n\t\t\tpoints.push(point1);\n\n\t\t\tdataItem.set(\"point\", {x:point0[0] + (point1[0] - point0[0]) / 2, y:point0[1] + (point1[1] - point0[1]) / 2 });\n\t\t}\n\n\t\tif (this.get(\"noRisers\")) {\n\t\t\to.points = [];\n\t\t\to.segments.push(points);\n\t\t}\n\t}\n}\n","import * as m from \"./../../dist/es2015/xy.js\";\nexport const am5xy = m;","export function point(that, x, y) {\n that._context.bezierCurveTo(\n that._x1 + that._k * (that._x2 - that._x0),\n that._y1 + that._k * (that._y2 - that._y0),\n that._x2 + that._k * (that._x1 - x),\n that._y2 + that._k * (that._y1 - y),\n that._x2,\n that._y2\n );\n}\n\nexport function Cardinal(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: point(this, this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n case 2: this._point = 3; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new Cardinal(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n"],"names":["XYChart","this","chartContainer","children","push","_root","width","layout","verticalLayout","height","horizontalLayout","yAxesAndPlotContainer","maskContent","plotsContainer","plotContainer","isMeasured","topPlotContainer","themeTags","icon","x","y","_afterNew","_defaultThemes","super","_disposers","xAxes","yAxes","root","zoomOutButton","events","on","zoomOut","set","states","lookup","seriesContainer","_processAxis","bottomAxesContainer","leftAxesContainer","topGridContainer","bulletsContainer","fill","fillOpacity","event","_handlePlotDown","originalEvent","_handlePlotUp","_handlePlotMove","_maskGrid","_setUpTouch","_beforeChanged","isDirty","get","_display","cancelTouch","gridContainer","_removeSeries","series","xAxis","markDirtyExtremes","yAxis","cursor","snapToSeries","handleWheel","wheelX","wheelY","wheelEvent","preventDefault","plotPoint","toLocal","documentPointToRoot","clientX","clientY","wheelStep","shiftY","deltaY","shiftX","deltaX","wheelZoomPositionX","wheelZoomPositionY","each","axis","start","end","position","fixPosition","newStart","newEnd","getPrivate","Infinity","_handleWheelAnimation","zoom","delta","_getWheelSign","se","_fixWheel","_handleSetWheel","_wheelDp","dispose","sign","diff","button","local","pointerId","_downPoints","length","getIndex","_downStartX","_downEndX","_downStartY","_downEndY","_downPoint","panX","panY","_panStart","_panEnd","eventType","isEnabled","dispatch","type","target","animation","_dispatchWheelAnimation","downPoint","undefined","_isPanning","_movePoints","_handlePinch","scrollbarX","disableType","panStart","panEnd","enableType","scrollbarY","i","downPoints","movePoints","k","point","movePoint","w","h","downPoint0","downPoint1","movePoint0","movePoint1","downStartX","downEndX","downPos0","downPos1","movePos0","movePos1","d","Math","max","s","e","sa","ea","downStartY","downEndY","_handleCursorPosition","cursorPoint","snapToSeriesBy","dataItems","isHidden","isHiding","startIndex","endIndex","dataItem","tooltipDataItem","closestItem","minDistance","distance","abs","hypot","tooltip","_setDataItem","component","showDataItemTooltip","handleMove","toGlobal","_updateCursor","_addCursor","_prepareChildren","_colorize","previous","_prevSettings","_disposeProperty","_setChart","_pushPropertyDisposer","_handleCursorSelectEnd","parent","topAxesContainer","_handleScrollbar","grip","setPrivate","getTooltipText","rightAxesContainer","_handleZoomOut","_processSeries","colorSet","color","next","_setSoft","behavior","downPositionX","downPositionY","positionX","positionY","position0","toAxisPosition","position1","axes","priority","axisStart","axisEnd","zoomAnimation","updateScrollbar","setPrivateRaw","container","onAll","change","oldValues","_removeAxis","newValue","processChart","setIndex","index","insertIndex","oldValue","Error","moveValue","value","newIndex","isDisposed","axisParent","removeValue","gridParent","topGridParent","_updateChartLayout","left","right","processAxis","_axis","_handleAxisSelection","force","indexOf","setRaw","updateGrips","visible","show","hide","inPlot","otherCharts","_otherCharts","global","chart","chartPlotContainer","documentPoint","rootPointToDocument","chartRoot","arrangeTooltips","hh","plotT","plotB","tooltips","closest","closestPoint","sum","_movePoint","maxTooltipDistance","maxTooltipDistanceBy","tooltipSeries","hidden","_tooltipToLocal","tooltipContainer","count","sort","a","b","prevY","centerY","top","bottom","min","_fy","reverse","prevBottom","bounds","className","XYChartDefaultTheme","setupDefaultRules","ic","interfaceColors","language","r","rule","bind","setAll","colors","paddingLeft","paddingRight","paddingTop","paddingBottom","pinchZoomX","pinchZoomY","legendLabelText","saturation","cornerRadiusTR","cornerRadiusTL","cornerRadiusBR","cornerRadiusBL","focusable","create","strokeOpacity","inside","minGridDistance","opacity","minPosition","maxPosition","fontSize","text","populateText","centerX","layer","exportable","moveThreshold","strokeDasharray","ariaLabel","translate","minZoomCount","maxZoomCount","maxZoomFactor","maxDeviation","snapTooltip","tooltipLocation","zoomX","zoomY","fixAxisSize","location","multiLocation","crisp","opposite","inversed","cellStartLocation","cellEndLocation","cursorOverStyle","startLocation","endLocation","fillRule","axisFill","gridIntervals","timeUnit","dateFormats","periodChangeDateFormats","tooltipDateFormats","markUnitChange","strictMinMax","groupData","groupCount","groupIntervals","endValue","intervalDuration","baseInterval","gridInterval","Date","locale","firstDayOfWeek","utc","timezone","getTime","val","round","baseValue","logarithmic","autoZoom","step","baseUnit","maskBullets","stackToNegative","locationX","locationY","openValueXGrouped","openValueYGrouped","valueXGrouped","valueYGrouped","seriesTooltipTarget","adjustBulletPosition","clustered","strokeWidth","role","connect","autoGapCount","draw","display","sprite","moveTo","lineTo","tension","lowValueXGrouped","lowValueYGrouped","highValueXGrouped","highValueYGrouped","XYCursor","_settings","_drawLines","setTimeout","lineX","_handleXLine","lineY","_handleYLine","ev","_handleLineFocus","_handleLineBlur","document","_handleLineMove","keyCode","dir","increment","focused","getCellWidthPosition","_line","alwaysShow","_tooltipX","_updateXLine","_tooltipY","_updateYLine","_handleSyncWith","syncWith","_updateChildren","_getPoint","_toX","animate","key","to","duration","easing","_toY","_handleMove","_handleCursorDown","_handleCursorUp","native","selection","_inPlot","rootPoint","_getPosition","charAt","lastPoint","_lastPoint","skipEvent","xyPos","userPositionX","userPositionY","xy","handleCursorShow","_updateLines","_updateSelection","_onHide","handleCursorHide","_onShow","_dispose","Axis","background","labelsContainer","axisHeader","axisRanges","disposeDataItem","_processAxisRange","renderer","ghostLabel","makeLabel","adapters","disable","_updateFinals","_start","_end","sAnimation","_sAnimation","eAnimation","_eAnimation","maxZoomFactorReal","minZoomFactor","playing","once","_markDirtyKey","_markDirty","stop","_series","_createAssets","_rangesDirty","_prepareDataItem","above","grid","_dataItem","_index","markDirtySelectionExtremes","_calculateTotals","_updateAxisRanges","_bullets","axisRange","_seriesAxisRanges","_inversed","_axisLength","axisLength","_updateLC","rendererTags","addTag","toLowerCase","_applyThemes","label","_updateTooltipBounds","updateTooltipBounds","_updateBounds","axisHeadersContainer","onPrivate","markDirtySize","hideDataItem","_toggleDataItem","showDataItem","tick","bullet","tags","makeGrid","makeTick","makeAxisFill","_processBullet","axisBullet","_afterChanged","_updatePositions","labels","ticks","axisFills","_updateGhost","localBounds","gWidth","_getText","updateLabel","_cursorPosition","_snapToSeries","updateTooltip","getSeriesItem","updateLegendMarker","updateLegendValue","roundAxisPosition","_updateTooltipText","positionTooltip","_location","processSeriesDataItem","_fields","_clearDirty","_sizeDirty","coordinateToPosition","coordinate","shouldGap","_nextItem","_autoGapCount","_fieldName","createAxisRange","axisDataItem","_groupSeriesData","AxisLabel","AxisLabelRadial","AxisRenderer","template","make","gridCount","thumb","_handleThumbDown","_handleThumbUp","_handleThumbMove","_changed","pan","_thumbDownPoint","_downStart","_downEnd","_event","downStart","downEnd","extra","_getPan","_point1","_point2","positionToCoordinate","_tooltip","_updateSize","markDirty","_clear","toggleVisibility","_positionTooltip","AxisRendererX","gridTemplate","graphics","axisChildren","removeTag","_markDirtyRedraw","point1","point2","_ls","_lc","innerWidth","positionToPoint","updateTick","endPosition","updateGrid","updateBullet","bulletPosition","previousBullet","previousSprite","updateFill","x0","x1","fillDrawMethod","num","pointerOrientation","oldBounds","AxisRendererY","innerHeight","y0","y1","AxisTick","DateAxis","_setBaseInterval","interval","_baseDuration","_fixZoomFactor","baseMainDuration","_groupData","groupInterval","_dataGrouped","_handleRangeChange","mainDataSetId","setDataSet","_seriesDataGrouped","intervals","baseDuration","_dataSets","fields","baseAxis","_valueYFields","_valueXFields","_mainDataItems","groupCallback","groupOriginals","firstDay","newDataItem","previousTime","dataSetId","groupFieldValues","workingFields","field","firstDate","prevNewDataItem","dataContext","time","roundedTime","_makeDataItem","groupKey","currentValue","average","_dataSetId","_groupingCalculated","getGroupInterval","getIntervalMax","_intervalMax","getIntervalMin","_intervalMin","selectionMin","selectionMax","modifiedDifference","current","newId","fieldName","endIndex2","firstDataItem","lastDataItem","lastDate","outOfSelection","_adjustMinMax","_strictMode","_intervalDuration","_saveMinMax","id","_getM","_prepareAxisItems","nextGridUnit","format","previousValue","formats","_dataItems","processDataItem","date","dateFormatter","j","inited","_markDirtyAxes","positionToValue","_getDelta","_deltaMinMax","_fixMin","startTime","endTime","_fixMax","_updateDates","_date","open","close","getDataItemPositionX","cellLocation","axisLocation","openValue","closeValue","_baseValue","valueToPosition","getDataItemCoordinateX","getDataItemPositionY","getDataItemCoordinateY","NaN","result","diValue","first","second","nextItem","value1","zoomToDates","zoomToValues","positionToDate","dateToPosition","GaplessDateAxis","valueFields","dates","_dates","found","_updateAllDates","len","itemValue","valueToIndex","findex","floor","_seriesValuesDirty","maxCount","Number","MAX_SAFE_INTEGER","frequency","ceil","_frequency","realDuration","selectedItems","startDate","previousPosition","minDifference","realValue","Grid","isPrivateDirty","ValueAxis","_dirtyExtremes","_dirtySelectionExtremes","syncWithAxis","_syncDp","_valuesDirty","_getMinMax","_getSelectionMinMax","_formatText","numberFormat","formatter","getNumberFormatter","differencePower","minLog","_minLogAdjusted","log","LOG10E","pow","stepPower","decCount","fillEndPosition","hasTag","minMaxStep","stepDecimalPlaces","E","treatZeroAs","valueToFinalPosition","getX","getY","_cellLocation","getStackedXValueWorking","getStackedYValueWorking","basePosition","cellEndValue","fixSmallStep","vc","fieldWorking","total","minDefined","maxDefined","extraMin","extraMax","selectionStrictMinMax","seriesMin","seriesMax","isShowing","range","_minReal","_maxReal","minMaxStep2","selectionMinReal","selectionMaxReal","_syncAxes","LN10","minDiff","initialMin","initialMax","minAdapted","fold","maxAdapted","strictMinMaxSelection","strict","animatePrivate","exponent","power","_min","_max","strictMode","difference","stepDivisor","maxPrecision","ceiledStep","MAX_VALUE","minCount","extraDecimals","decimals","oldDiff","syncMin","syncMax","syncStep","currentCount","synced","c","omin","omax","ostep","_checkSync","BaseColumnSeries","_makeGraphics","listTemplate","makeColumn","_makeFieldNames","categoryAxis","valueAxis","isType","_xOpenField","_xField","_yOpenField","_yField","_createGraphics","_ph","_pw","columnsTemplate","columns","clusterCount","stacked","xRenderer","yRenderer","cellLocationX0","cellLocationX1","cellLocationY0","cellLocationY1","_aLocationX0","_aLocationX1","_aLocationY0","_aLocationY1","_axesDirty","_stackDirty","_toggleColumn","_updateGraphics","_skipped","legendDataItem","markerRectangle","stroke","graphicsArray","rangeGraphics","previousDataItem","xField","yField","valueX","valueY","xOpenField","yOpenField","openLocationX","openLocationY","xStart","xEnd","yStart","yEnd","l","t","vcy","vcx","fitW","fitH","offset","stackToItemY","stackToItemX","_updateSeriesGraphics","_applyGraphicsStates","maxWidth","maxHeight","ptl","getPoint","pbr","tooltipPoint","_x","_y","_handleDataSetChange","dropFromOpen","riseFromOpen","dropFromPrevious","riseFromPrevious","previousClose","apply","list","promises","Promise","all","bullets","column","setting","_getTooltipTarget","Candlestick","_draw","CandlestickSeries","mainContainer","getRaw","lx0","lx1","ly0","ly1","hx0","hx1","hy0","hy1","orientation","_xLowField","_xHighField","_yLowField","_yHighField","_updateCandleGraphics","pl0","pl1","ph0","ph1","ColumnSeries","LineSeries","strokes","fills","_fillGenerator","p","makeStroke","makeFill","_strokeTemplate","_fillTemplate","legendStroke","_legendStroke","legendFill","_legendFill","curveFactory","_strokeGenerator","curve","strokeTemplateField","fillTemplateField","strokeTemplateFound","fillTemplateFound","hasValues","_valueFields","_endIndex","_clearGraphics","_sindex","_dindex","_startSegment","clear","dataItemIndex","currentEndIndex","fillTemplate","originalTemplate","strokeTemplate","xOpenFieldValue","yOpenFieldValue","basePosX","basePosY","baseField","segments","points","fillVisible","getOpen","o","_getPoints","_endLine","_drawStroke","_drawFill","itemLocationX","itemLocationY","xPos","yPos","_shouldInclude","iPoint","xPos0","yPos0","closeIPoint","p0","p1","p2","p3","prev","_previousPoint","pp0","pp1","pp2","pp3","_points","_firstPoint","segment","context","createLegendMarker","marker","interactive","disabledColor","bulletFunction","XYSeries","_setRawDefault","_removeAxisRange","_updateFields","_valueXShowFields","_valueYShowFields","__valueXShowFields","__valueYShowFields","valueXFields","split","valueYFields","_shouldMakeBullet","xName","xCapName","yName","yCapName","xLetter","yLetter","low","high","_fixVC","hiddenState","sequencedInterpolation","_handleMaskBullets","tooltipFieldX","tooltipFieldY","_tooltipFieldX","_tooltipFieldY","_dataProcessed","_stack","_unstack","getStackedXValue","getStackedYValue","_markStakedDirtyStack","minBulletDistance","_showBullets","_psi","_pei","_selectionProcessed","processYSelectionDataItem","processXSelectionDataItem","selectionMinY","selectionMaxY","selectionMinX","selectionMaxX","_makeRangeMask","mainContainerMask","_mainContainerMask","mask","seriesIndex","_couldStackTo","_stackDataItems","_reallyStackedTo","_key","_stackedSeries","uid","stackToItemKey","stackToSeries","stackToItem","stackValue","stackedToSeries","_markDataSetDirty","_afterDataChange","_aggregatesCalculated","_positionBullet","_shouldShowBullet","_positionX","_positionY","then","_isShowing","_sequencedShowHide","_isHiding","waitForStop","_markDirtyStack","stackedSeries","hideTooltip","markDirtyText","txt","_emptyDataItem","valueLabel","_getItemReaderLabel","_position","resetExtremes","mainDataItems","XYChartScrollbar","Scrollbar","interactiveChildren","Graphics","_addOrientationClass","startGrip","endGrip","remove","_updateThumb","overlay","CategoryAxis","_itemMap","startCategory","endCategory","openKey","otherAxis","startDataItem","endDataItem","hasValue","f","fillIndex","categoryLocation","endCategoryLocation","categoryToIndex","indexToPosition","fillEndIndex","_axisLocation","category","dataItemToPosition","axisPositionToIndex","seriesDataItem","zoomToIndexes","zoomToCategories","CategoryDateAxis","previousIndex","previousUnitValue","changed","skip","unitValue","added","pop","shouldAdd","item","classNames","concat","DurationAxis","durationFormatter","getDurationFormatter","divisors","realDivisor","divisor","reducedCount","getFormat","AxisBullet","Entity","OHLC","lY","hY","lX","hX","OHLCSeries","List","Template","_new","SmoothedYLineSeries","_setDefault","SmoothedXLineSeries","SmoothedXYLineSeries","Step","_context","_t","stepAfter","prototype","areaStart","areaEnd","lineStart","_point","lineEnd","closePath","StepLineSeries","itemLocationX0","itemLocationY0","itemLocationX1","itemLocationY1","xPos1","yPos1","iPoint0","point0","iPoint1","xOpenPos0","yOpenPos0","xOpenPos1","yOpenPos1","closeIPoint0","closeIPoint1","am5xy","that","bezierCurveTo","_x1","_k","_x2","_x0","_y1","_y2","_y0","Cardinal","custom","cardinal"],"sourceRoot":""}