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AD,GAAKA,EAAGC,GAAKA,EACLC,KAAKgmC,QACX,KAAK,EAAGhmC,KAAKgmC,OAAS,EAAGhmC,KAAKoY,MAAQpY,KAAKylC,SAAS5uB,OAAO/W,EAAGC,GAAKC,KAAKylC,SAAS7uB,OAAO9W,EAAGC,GAAI,MAC/F,KAAK,EAAGC,KAAKgmC,OAAS,EAAGhmC,KAAKsnC,IAAMxnC,EAAGE,KAAK0nC,IAAM3nC,EAAG,MACrD,KAAK,EAAGC,KAAKgmC,OAAS,EACtB,QAAS7+B,EAAMnH,KAAMF,EAAGC,GAE1BC,KAAKynC,IAAMznC,KAAKsnC,IAAKtnC,KAAKsnC,IAAMtnC,KAAKwnC,IAAKxnC,KAAKwnC,IAAM1nC,EACrDE,KAAK4nC,IAAM5nC,KAAK0nC,IAAK1nC,KAAK0nC,IAAM1nC,KAAK2nC,IAAK3nC,KAAK2nC,IAAM5nC,IAIzD,KAAe,SAAU+nC,EAAOhxB,GAE9B,SAASixB,EAAS/L,GAChB,OAAO,IAAI6L,EAAS7L,EAASllB,GAO/B,OAJAixB,EAASjxB,QAAU,SAASA,GAC1B,OAAOgxB,GAAQhxB,IAGVixB,EAVT,CAWG,K","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\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\tcursor.handleMove(series.toGlobal(point), 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.1 && point.y >= -0.1 && point.x <= plotContainer.width() + 0.1 && point.y <= plotContainer.height() + 0.1) {\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\tconst tooltip = series.get(\"tooltip\");\n\t\t\t\tif (tooltip) {\n\t\t\t\t\tlet point = tooltip.get(\"pointTo\")!;\n\t\t\t\t\tif (point) {\n\t\t\t\t\t\tlet distance = Math.hypot(movePoint.x - point.x, movePoint.y - point.y);\n\t\t\t\t\t\tif (maxTooltipDistanceBy == \"x\") {\n\t\t\t\t\t\t\tdistance = Math.abs(movePoint.x - point.x);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (maxTooltipDistanceBy == \"y\") {\n\t\t\t\t\t\t\tdistance = Math.abs(movePoint.y - point.y);\n\t\t\t\t\t\t}\n\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\tclosest = series;\n\t\t\t\t\t\t\tclosestPoint = point;\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\t{\r\n\t\t\tconst rule = r(\"AxisRenderer\");\r\n\r\n\t\t\trule.setAll({\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});\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\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\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\t\t\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}\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.lineX.events.on(\"positionchanged\", () => {\n\t\t\tthis._handleXLine();\n\t\t});\n\n\t\tthis.lineY.events.on(\"positionchanged\", () => {\n\t\t\tthis._handleYLine();\n\t\t});\n\n\t\tthis.lineX.events.on(\"focus\", (ev) => this._handleLineFocus(ev.target));\n\t\tthis.lineX.events.on(\"blur\", (ev) => this._handleLineBlur(ev.target));\n\n\t\tthis.lineY.events.on(\"focus\", (ev) => this._handleLineFocus(ev.target));\n\t\tthis.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\ttooltip.on(\"pointTo\", () => {\n\t\t\t\t\t\tthis._updateXLine(tooltip);\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\ttooltip.on(\"pointTo\", () => {\n\t\t\t\t\t\tthis._updateYLine(tooltip);\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\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\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\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\n\t\tif (this.get(\"start\") !== start || this.get(\"end\") != end) {\n\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);\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\", Math.round(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);\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\tlet y = this.positionToCoordinate(position);\n\n\t\t\tgrid.set(\"y\", y);\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 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\";\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 * @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\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\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) {\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\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, this._root.locale.firstDayOfWeek, this._root.utc, firstDate, this._root.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\tnewDataItem.setRaw(field as any, currentValue + value);\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\t\t\t\t\tif (groupInterval) {\n\t\t\t\t\t\tlet newId = groupInterval.timeUnit + groupInterval.count;\n\t\t\t\t\t\t$array.each(this.series, (series) => {\n\t\t\t\t\t\t\tif (series.get(\"baseAxis\") === this) {\n\t\t\t\t\t\t\t\tseries.setDataSet(newId);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\tthis.markDirtyExtremes();\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\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\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 _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\n\t\t\tvalue = $time.round(new Date(selectionMin - intervalDuration), gridInterval.timeUnit, gridInterval.count, this._root.locale.firstDayOfWeek, this._root.utc, new Date(min), this._root.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\t\t\t\tlet endValue = value + $time.getDuration(gridInterval.timeUnit, gridInterval.count * 1.05);\n\t\t\t\tendValue = $time.round(new Date(endValue), gridInterval.timeUnit, 1, this._root.locale.firstDayOfWeek, this._root.utc, undefined, this._root.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, this._root.utc, this._root.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 _getDelta() {\n\t\tthis._deltaMinMax = this.baseDuration() / 2;\n\t}\n\n\tprotected _fixMin(min: number) {\n\t\tlet baseInterval = this.getPrivate(\"baseInterval\");\n\t\tlet startTime = $time.round(new Date(min), baseInterval.timeUnit, baseInterval.count, this._root.locale.firstDayOfWeek, this._root.utc, undefined, this._root.timezone).getTime();\n\t\tlet endTime = startTime + $time.getDuration(baseInterval.timeUnit, baseInterval.count * 1.05)\n\t\tendTime = $time.round(new Date(endTime), baseInterval.timeUnit, 1, this._root.locale.firstDayOfWeek, this._root.utc, undefined, this._root.timezone).getTime();\n\n\t\treturn startTime + (endTime - startTime) * this.get(\"startLocation\", 0);\n\t}\n\t/* goes up to the year\n\tprotected _getFormat(timeUnit: TimeUnit, value: number, previousValue: number) {\n\t\tconst formats = this.get(\"dateFormats\")!;\n\t\tlet format = formats[timeUnit];\n\n\t\tif (this.get(\"markUnitChange\")) {\n\t\t\tlet nextGridUnit = $time.getNextUnit(timeUnit);\n\n\t\t\twhile (nextGridUnit != undefined) {\n\n\t\t\t\tif (nextGridUnit) {\n\t\t\t\t\tif (timeUnit != \"year\") {\n\t\t\t\t\t\tif ($time.checkChange(value, previousValue, nextGridUnit, this._root.utc, this._root.timezone)) {\n\t\t\t\t\t\t\tformat = this.get(\"periodChangeDateFormats\")![timeUnit];\n\t\t\t\t\t\t\ttimeUnit = nextGridUnit;\n\t\t\t\t\t\t\tnextGridUnit = $time.getNextUnit(nextGridUnit);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tnextGridUnit = 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\tnextGridUnit = undefined;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn format;\n\t}\n\t*/\n\tprotected _fixMax(max: number) {\n\t\tlet baseInterval = this.getPrivate(\"baseInterval\");\n\t\tlet startTime = $time.round(new Date(max), baseInterval.timeUnit, baseInterval.count, this._root.locale.firstDayOfWeek, this._root.utc, undefined, this._root.timezone).getTime();\n\t\tlet endTime = startTime + $time.getDuration(baseInterval.timeUnit, baseInterval.count * 1.05)\n\t\tendTime = $time.round(new Date(endTime), baseInterval.timeUnit, 1, this._root.locale.firstDayOfWeek, this._root.utc, undefined, this._root.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\tstartTime = $time.round(new Date(value), baseInterval.timeUnit, baseInterval.count, this._root.locale.firstDayOfWeek, this._root.utc, undefined, this._root.timezone).getTime();\n\t\t\t\t\tendTime = startTime + $time.getDuration(baseInterval.timeUnit, baseInterval.count * 1.05);\n\t\t\t\t\tendTime = $time.round(new Date(endTime), baseInterval.timeUnit, 1, this._root.locale.firstDayOfWeek, this._root.utc, undefined, this._root.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 timeZone = this._root.timezone;\n\t\t\tconst firstDayOfWeek = this._root.locale.firstDayOfWeek;\n\t\t\tvalue = $time.round(new Date(value), baseInterval.timeUnit, baseInterval.count, firstDayOfWeek, this._root.utc, new Date(this.getPrivate(\"min\", 0)), timeZone).getTime();\n\n\t\t\tlet duration = $time.getDateIntervalDuration(baseInterval, new Date(value), firstDayOfWeek, this._root.utc, this._root.timezone);\n\t\t\tif (timeZone) {\n\t\t\t\tvalue = $time.round(new Date(value + this.baseDuration() * 0.05), baseInterval.timeUnit, baseInterval.count, firstDayOfWeek, this._root.utc, new Date(this.getPrivate(\"min\", 0)), timeZone).getTime();\n\t\t\t\tlet newValue = value + duration * location;\n\t\t\t\tduration = $time.getDateIntervalDuration(baseInterval, new Date(newValue), firstDayOfWeek, this._root.utc, this._root.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\t\t\treturn first;\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 len = dates.length;\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 / 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 / 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\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\r\n\t\tlet len = this._dates.length;\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) * this.baseDuration();\r\n\t}\r\n\r\n\tprotected _fixZoomFactor() {\r\n\t\tthis.setPrivateRaw(\"maxZoomFactor\", this._dates.length);\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 * 1.05);\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\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 start = this.valueToFinalPosition(selectionMin);\n\t\t\tlet end = this.valueToFinalPosition(selectionMax);\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\", (max - min) / minDiff * this.get(\"maxZoomFactor\", 100));\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 _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}\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();\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._valueYShowFields.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\tthis.updateLegendValue(undefined);\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\tlet sprite = bullet.get(\"sprite\");\n\t\t\t\t\t\tif (sprite) {\n\t\t\t\t\t\t\tsprite.setPrivate(\"visible\", false);\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\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\tpublic _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","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":["chartContainer","children","push","_root","width","layout","verticalLayout","height","horizontalLayout","yAxesAndPlotContainer","maskContent","plotsContainer","plotContainer","isMeasured","topPlotContainer","themeTags","icon","x","y","this","_defaultThemes","_afterNew","_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","series","xAxis","markDirtyExtremes","yAxis","cursor","snapToSeries","_removeSeries","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","_wheelDp","handleWheel","dispose","sign","diff","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","sa","ea","downStartY","downEndY","isHidden","isHiding","startIndex","endIndex","dataItem","dataItems","tooltipDataItem","distance","abs","hypot","tooltip","_setDataItem","component","showDataItemTooltip","handleMove","toGlobal","_prepareChildren","_colorize","_handleSetWheel","previous","_prevSettings","_disposeProperty","_setChart","_addCursor","_pushPropertyDisposer","_handleCursorSelectEnd","parent","topAxesContainer","e","_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","left","right","_axis","force","indexOf","setRaw","updateGrips","show","hide","otherCharts","_otherCharts","global","chart","chartPlotContainer","documentPoint","rootPointToDocument","chartRoot","closest","closestPoint","hh","plotT","plotB","tooltips","sum","minDistance","_movePoint","maxTooltipDistance","maxTooltipDistanceBy","tooltipSeries","hidden","inPlot","_tooltipToLocal","tooltipContainer","count","sort","a","b","centerY","top","bottom","min","_fy","reverse","bounds","XYChart","className","setupDefaultRules","ic","interfaceColors","language","r","rule","bind","setAll","colors","paddingLeft","paddingRight","paddingTop","paddingBottom","arrangeTooltips","pinchZoomX","pinchZoomY","legendLabelText","saturation","cornerRadiusTR","cornerRadiusTL","cornerRadiusBR","cornerRadiusBL","focusable","create","strokeOpacity","inside","minGridDistance","opacity","minPosition","maxPosition","fontSize","text","populateText","centerX","visible","layer","exportable","snapToSeriesBy","moveThreshold","strokeDasharray","ariaLabel","translate","minZoomCount","maxZoomCount","maxZoomFactor","maxDeviation","snapTooltip","tooltipLocation","zoomX","zoomY","fixAxisSize","location","multiLocation","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","_settings","_drawLines","setTimeout","lineX","_handleXLine","lineY","_handleYLine","ev","_handleLineFocus","_handleLineBlur","document","_handleLineMove","keyCode","dir","increment","focused","getCellWidthPosition","_line","alwaysShow","_tooltipX","_updateXLine","_tooltipY","_updateYLine","syncWith","_updateChildren","_handleSyncWith","_getPoint","_toX","animate","key","to","duration","easing","_toY","_handleMove","_handleCursorDown","_handleCursorUp","native","selection","rootPoint","_inPlot","_getPosition","charAt","lastPoint","_lastPoint","skipEvent","xyPos","userPositionX","userPositionY","xy","_handleCursorPosition","handleCursorShow","_updateLines","_updateSelection","handleCursorHide","_onHide","_onShow","_dispose","XYCursor","background","labelsContainer","axisHeader","axisRanges","disposeDataItem","_processAxisRange","renderer","processAxis","ghostLabel","makeLabel","adapters","disable","sAnimation","_sAnimation","eAnimation","_eAnimation","maxZoomFactorReal","minZoomFactor","_handleAxisSelection","playing","once","_markDirtyKey","_markDirty","stop","_series","_createAssets","_rangesDirty","_prepareDataItem","above","grid","_dataItem","_index","_bullets","axisRange","_seriesAxisRanges","_updateCursor","_start","_end","_inversed","_axisLength","axisLength","_updateLC","rendererTags","addTag","toLowerCase","_applyThemes","label","updateTooltipBounds","_updateBounds","_updateTooltipBounds","axisHeadersContainer","onPrivate","markDirtySize","_toggleDataItem","hideDataItem","showDataItem","tick","bullet","tags","makeGrid","makeTick","makeAxisFill","_processBullet","axisBullet","_afterChanged","_updateChartLayout","_updatePositions","labels","ticks","axisFills","localBounds","_getText","updateLabel","_cursorPosition","_snapToSeries","updateTooltip","getSeriesItem","updateLegendMarker","updateLegendValue","roundAxisPosition","_updateTooltipText","positionTooltip","_location","_fields","_clearDirty","_sizeDirty","coordinate","_nextItem","_autoGapCount","_fieldName","axisDataItem","Axis","AxisLabel","AxisLabelRadial","template","make","thumb","_handleThumbDown","_handleThumbUp","_handleThumbMove","_changed","pan","_thumbDownPoint","_downStart","_downEnd","_event","downStart","downEnd","extra","_getPan","_point1","_point2","_tooltip","markDirty","_clear","AxisRenderer","gridTemplate","graphics","axisChildren","removeTag","_markDirtyRedraw","point1","point2","_ls","_lc","innerWidth","positionToCoordinate","endPosition","toggleVisibility","bulletPosition","previousBullet","previousSprite","x0","x1","fillDrawMethod","_positionTooltip","num","pointerOrientation","oldBounds","AxisRendererX","innerHeight","y0","y1","AxisRendererY","AxisTick","_setBaseInterval","interval","_baseDuration","baseMainDuration","_fixZoomFactor","groupInterval","_dataGrouped","_groupSeriesData","_handleRangeChange","setDataSet","_seriesDataGrouped","_dataSets","baseAxis","_valueYFields","_valueXFields","_mainDataItems","mainDataSetId","newDataItem","previousTime","dataSetId","groupFieldValues","workingFields","field","firstDate","prevNewDataItem","dataContext","time","roundedTime","_makeDataItem","groupKey","currentValue","average","_dataSetId","_groupingCalculated","_intervalMax","_intervalMin","selectionMin","selectionMax","modifiedDifference","baseDuration","getGroupInterval","current","endIndex2","firstDataItem","lastDataItem","lastDate","outOfSelection","gridCount","_strictMode","_intervalDuration","id","intervals","nextGridUnit","previousValue","format","formats","_dataItems","processDataItem","date","dateFormatter","j","inited","_markDirtyAxes","_updateGhost","_deltaMinMax","startTime","endTime","_date","fields","open","close","_updateDates","cellLocation","axisLocation","openValue","closeValue","_baseValue","valueToPosition","getDataItemPositionX","getDataItemPositionY","positionToValue","timeZone","NaN","fieldName","result","diValue","first","second","nextItem","value1","zoomToValues","DateAxis","valueFields","dates","_dates","found","len","itemValue","findex","floor","_seriesValuesDirty","_updateAllDates","valueToIndex","maxCount","Number","MAX_SAFE_INTEGER","frequency","ceil","_frequency","realDuration","startDate","previousPosition","minDifference","realValue","GaplessDateAxis","isPrivateDirty","Grid","_dirtyExtremes","_dirtySelectionExtremes","syncWithAxis","_syncDp","_valuesDirty","_getMinMax","_getSelectionMinMax","_groupData","_prepareAxisItems","_updateAxisRanges","numberFormat","formatter","getNumberFormatter","differencePower","minLog","_minLogAdjusted","log","LOG10E","pow","_formatText","stepPower","decCount","fillEndPosition","updateGrid","hasTag","updateTick","updateFill","updateBullet","minMaxStep","_adjustMinMax","stepDecimalPlaces","E","treatZeroAs","_cellLocation","getStackedXValueWorking","getStackedYValueWorking","fixSmallStep","total","minDefined","maxDefined","extraMin","extraMax","selectionStrictMinMax","seriesMin","seriesMax","isShowing","range","_minReal","_maxReal","minMaxStep2","selectionMinReal","selectionMaxReal","_syncAxes","valueToFinalPosition","minDiff","initialMin","initialMax","minAdapted","fold","maxAdapted","_fixMin","_fixMax","_getDelta","strictMinMaxSelection","strict","_saveMinMax","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","ValueAxis","listTemplate","makeColumn","_makeFieldNames","categoryAxis","valueAxis","isType","_xOpenField","_xField","_yOpenField","_yField","_createGraphics","_ph","_pw","columnsTemplate","columns","clusterCount","BaseColumnSeries","stacked","xRenderer","yRenderer","cellLocationX0","cellLocationX1","cellLocationY0","cellLocationY1","_aLocationX0","_aLocationX1","_aLocationY0","_aLocationY1","_axesDirty","_stackDirty","_toggleColumn","_updateGraphics","_skipped","_makeGraphics","legendDataItem","markerRectangle","stroke","graphicsArray","rangeGraphics","previousDataItem","xField","yField","valueX","valueY","xOpenField","yOpenField","openLocationX","openLocationY","xStart","xEnd","yStart","yEnd","vcy","vcx","offset","stackToItemY","basePosition","stackToItemX","_updateSeriesGraphics","_applyGraphicsStates","l","t","fitW","fitH","maxWidth","maxHeight","ptl","getPoint","pbr","tooltipPoint","_x","_y","_handleDataSetChange","dropFromOpen","riseFromOpen","dropFromPrevious","riseFromPrevious","previousClose","apply","list","promises","Promise","all","bullets","column","setting","_getTooltipTarget","_draw","Candlestick","mainContainer","lx0","lx1","ly0","ly1","hx0","hx1","hy0","hy1","orientation","getRaw","_xLowField","_xHighField","_yLowField","_yHighField","_updateCandleGraphics","CandlestickSeries","ColumnSeries","strokes","fills","_fillGenerator","p","_strokeTemplate","_fillTemplate","legendStroke","_legendStroke","legendFill","_legendFill","curveFactory","_strokeGenerator","curve","strokeTemplateField","fillTemplateField","strokeTemplateFound","fillTemplateFound","hasValues","_valueFields","_endIndex","_clearGraphics","_sindex","_dindex","_startSegment","clear","dataItemIndex","currentEndIndex","makeFill","fillTemplate","originalTemplate","makeStroke","strokeTemplate","xOpenFieldValue","yOpenFieldValue","baseField","basePosX","basePosY","segments","points","fillVisible","getOpen","o","_getPoints","shouldGap","_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","marker","interactive","disabledColor","bulletFunction","LineSeries","_setRawDefault","_removeAxisRange","_updateFields","_valueXShowFields","_valueYShowFields","__valueXShowFields","__valueYShowFields","valueXFields","split","valueYFields","xName","xCapName","yName","yCapName","xLetter","yLetter","low","high","hiddenState","sequencedInterpolation","_handleMaskBullets","tooltipFieldX","tooltipFieldY","_tooltipFieldX","_tooltipFieldY","_fixVC","_dataProcessed","_stack","_unstack","getStackedXValue","getStackedYValue","processSeriesDataItem","_markStakedDirtyStack","minBulletDistance","_showBullets","_psi","_pei","_selectionProcessed","_calculateTotals","markDirtySelectionExtremes","processYSelectionDataItem","processXSelectionDataItem","selectionMinY","selectionMaxY","selectionMinX","selectionMaxX","_mainContainerMask","mask","_makeRangeMask","seriesIndex","_couldStackTo","_stackDataItems","_reallyStackedTo","_key","_stackedSeries","uid","stackToItemKey","s","stackToSeries","stackToItem","stackValue","stackedToSeries","_afterDataChange","_aggregatesCalculated","_shouldShowBullet","_positionX","_positionY","_markDataSetDirty","then","_isShowing","_sequencedShowHide","_isHiding","waitForStop","stackedSeries","_markDirtyStack","hideTooltip","markDirtyText","txt","_emptyDataItem","valueLabel","_position","resetExtremes","XYSeries","interactiveChildren","Graphics","_addOrientationClass","startGrip","endGrip","remove","_updateThumb","overlay","Scrollbar","XYChartScrollbar","_itemMap","startCategory","endCategory","CategoryAxis","openKey","otherAxis","startDataItem","endDataItem","f","fillIndex","categoryLocation","endCategoryLocation","categoryToIndex","indexToPosition","fillEndIndex","_axisLocation","category","axisPositionToIndex","seriesDataItem","zoomToIndexes","previousIndex","previousUnitValue","selectedItems","changed","skip","unitValue","added","pop","shouldAdd","item","classNames","concat","CategoryDateAxis","durationFormatter","getDurationFormatter","divisors","realDivisor","divisor","reducedCount","getFormat","DurationAxis","Entity","AxisBullet","lY","hX","OHLC","List","Template","OHLCSeries","_setDefault","SmoothedYLineSeries","SmoothedXLineSeries","SmoothedXYLineSeries","Step","_context","_t","stepAfter","prototype","areaStart","areaEnd","lineStart","_point","lineEnd","closePath","itemLocationX0","itemLocationY0","itemLocationX1","itemLocationY1","xPos1","yPos1","iPoint0","point0","iPoint1","xOpenPos0","yOpenPos0","xOpenPos1","yOpenPos1","closeIPoint0","closeIPoint1","StepLineSeries","am5xy","that","bezierCurveTo","_x1","_k","_x2","_x0","_y1","_y2","_y0","Cardinal","custom","cardinal"],"sourceRoot":""}