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,QAAS,WACP,OAAQhvC,KAAK+uC,QACX,KAAK,EAAG/uC,KAAKwuC,SAAS/0B,OAAOzZ,KAAKuwC,IAAKvwC,KAAK0wC,KAAM,MAClD,KAAK,EAAG7rC,EAAM7E,KAAMA,KAAKqwC,IAAKrwC,KAAKywC,MAEjCzwC,KAAKob,OAAyB,IAAfpb,KAAKob,OAA+B,IAAhBpb,KAAK+uC,SAAe/uC,KAAKwuC,SAASS,YACzEjvC,KAAKob,MAAQ,EAAIpb,KAAKob,KACxB,EACAvW,MAAO,SAAS1D,EAAGC,GAEjB,OADAD,GAAKA,EAAGC,GAAKA,EACLpB,KAAK+uC,QACX,KAAK,EAAG/uC,KAAK+uC,OAAS,EAAG/uC,KAAKob,MAAQpb,KAAKwuC,SAAS/0B,OAAOtY,EAAGC,GAAKpB,KAAKwuC,SAASh1B,OAAOrY,EAAGC,GAAI,MAC/F,KAAK,EAAGpB,KAAK+uC,OAAS,EAAG/uC,KAAKqwC,IAAMlvC,EAAGnB,KAAKywC,IAAMrvC,EAAG,MACrD,KAAK,EAAGpB,KAAK+uC,OAAS,EACtB,QAASlqC,EAAM7E,KAAMmB,EAAGC,GAE1BpB,KAAKwwC,IAAMxwC,KAAKqwC,IAAKrwC,KAAKqwC,IAAMrwC,KAAKuwC,IAAKvwC,KAAKuwC,IAAMpvC,EACrDnB,KAAK2wC,IAAM3wC,KAAKywC,IAAKzwC,KAAKywC,IAAMzwC,KAAK0wC,IAAK1wC,KAAK0wC,IAAMtvC,CACvD,GAGF,KAAe,SAAUyvC,EAAOn3B,GAE9B,SAASo3B,EAASlM,GAChB,OAAO,IAAIgM,EAAShM,EAASlrB,EAC/B,CAMA,OAJAo3B,EAASp3B,QAAU,SAASA,GAC1B,OAAOm3B,GAAQn3B,EACjB,EAEOo3B,CACR,CAXD,CAWG,E","sources":["webpack://@amcharts/amcharts5/./src/.internal/charts/xy/XYChart.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/XYChartDefaultTheme.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/XYCursor.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/axes/Axis.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/xy/axes/AxisBullet.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/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\";\nimport type { ISpritePointerEvent } from \"../../core/render/Sprite\";\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\";\nimport type { CategoryAxis } from \"./axes/CategoryAxis\";\nimport type { DateAxis } from \"./axes/DateAxis\";\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 * NOTE: set it to `-1` to ensure only one tooltip is displayed, even if there\n\t * are multiple data items in the same place.\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/#ooltips} 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\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.hide(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);\n\t\t}));\n\n\t\tthis._disposers.push(plotContainer.events.on(\"globalpointerup\", (event) => {\n\t\t\tthis._handlePlotUp(event);\n\t\t}));\n\n\t\tthis._disposers.push(plotContainer.events.on(\"globalpointermove\", (event) => {\n\t\t\tthis._handlePlotMove(event);\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\tseries._unstack();\n\n\t\tif (series._posXDp) {\n\t\t\tseries._posXDp.dispose();\n\t\t}\n\n\t\tif (series._posYDp) {\n\t\t\tseries._posYDp.dispose();\n\t\t}\n\n\t\tseries.set(\"baseAxis\", undefined);\n\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(event.point);\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\tconst wheelEvent = event.originalEvent;\n\t\t\t\tif ((wheelX !== \"none\" && Math.abs(wheelEvent.deltaX) != 0) || (wheelY !== \"none\" && Math.abs(wheelEvent.deltaY) != 0)) {\n\t\t\t\t\tthis.handleWheel(event);\n\t\t\t\t}\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: ISpritePointerEvent) {\n\t\tconst originalEvent = event.originalEvent as any;\n\n\t\tif (originalEvent.button == 2) {\n\t\t\treturn;\n\t\t}\n\t\tconst plotContainer = this.plotContainer;\n\t\tlet local = plotContainer.toLocal(event.point);\n\n\t\tif (this.get(\"pinchZoomX\") || this.get(\"pinchZoomY\")) {\n\t\t\tconst pointerId = originalEvent.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: originalEvent.clientX, y: originalEvent.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.originalEvent });\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: ISpritePointerEvent) {\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(event.point);\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.originalEvent });\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.originalEvent });\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: ISpritePointerEvent) {\n\t\tconst plotContainer = this.plotContainer;\n\n\t\tif (this.get(\"pinchZoomX\") || this.get(\"pinchZoomY\")) {\n\t\t\tconst touchEvent = event.originalEvent as any;\n\t\t\tconst pointerId = touchEvent.pointerId;\n\n\t\t\tif (pointerId) {\n\t\t\t\tthis._movePoints[pointerId] = event.point;\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(event.point);\n\n\t\t\tconst panX = this.get(\"panX\");\n\t\t\tconst panY = this.get(\"panY\");\n\n\t\t\tif (panX) {\n\n\t\t\t\tlet scrollbarX = this.get(\"scrollbarX\");\n\t\t\t\tif (scrollbarX) {\n\t\t\t\t\tscrollbarX.events.disableType(\"rangechanged\");\n\t\t\t\t}\n\n\t\t\t\tthis.xAxes.each((axis) => {\n\t\t\t\t\tif (axis.get(\"panX\")) {\n\t\t\t\t\t\taxis._isPanning = true;\n\t\t\t\t\t\t//const maxDeviation = axis.get(\"maxDeviation\", 0);\n\t\t\t\t\t\tlet panStart = axis._panStart;\n\t\t\t\t\t\tlet panEnd = axis._panEnd;\n\t\t\t\t\t\tlet difference = (panEnd - panStart);\n\t\t\t\t\t\tlet deltaX = difference * (downPoint.x - local.x) / plotContainer.width();\n\n\t\t\t\t\t\tif (axis.get(\"renderer\").get(\"inversed\")) {\n\t\t\t\t\t\t\tdeltaX *= -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet start = panStart + deltaX;\n\t\t\t\t\t\tlet end = panEnd + deltaX;\n\n\t\t\t\t\t\tif (end - start < 1 + axis.get(\"maxDeviation\", 1) * 2) {\n\t\t\t\t\t\t\taxis.set(\"start\", start);\n\t\t\t\t\t\t\taxis.set(\"end\", end);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tif (scrollbarX) {\n\t\t\t\t\tscrollbarX.events.enableType(\"rangechanged\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (panY) {\n\n\t\t\t\tlet scrollbarY = this.get(\"scrollbarY\");\n\t\t\t\tif (scrollbarY) {\n\t\t\t\t\tscrollbarY.events.disableType(\"rangechanged\");\n\t\t\t\t}\n\n\t\t\t\tthis.yAxes.each((axis) => {\n\t\t\t\t\tif (axis.get(\"panY\")) {\n\t\t\t\t\t\taxis._isPanning = true;\n\t\t\t\t\t\t//const maxDeviation = axis.get(\"maxDeviation\", 0);\n\n\t\t\t\t\t\tlet panStart = axis._panStart;\n\t\t\t\t\t\tlet panEnd = axis._panEnd;\n\t\t\t\t\t\tlet difference = (panEnd - panStart);\n\t\t\t\t\t\tlet deltaY = difference * (downPoint.y - local.y) / plotContainer.height();\n\t\t\t\t\t\tif (axis.get(\"renderer\").get(\"inversed\")) {\n\t\t\t\t\t\t\tdeltaY *= -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet start = panStart - deltaY;\n\t\t\t\t\t\tlet end = panEnd - deltaY;\n\n\t\t\t\t\t\tif (end - start < 1 + axis.get(\"maxDeviation\", 1) * 2) {\n\t\t\t\t\t\t\taxis.set(\"start\", start);\n\t\t\t\t\t\t\taxis.set(\"end\", end);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tif (scrollbarY) {\n\t\t\t\t\tscrollbarY.events.enableType(\"rangechanged\");\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\t}\n\n\tprotected _handlePinch() {\n\t\tconst plotContainer = this.plotContainer;\n\t\tlet i = 0;\n\t\tlet downPoints: Array = [];\n\t\tlet movePoints: Array = [];\n\n\t\t$object.each(plotContainer._downPoints, (k, point) => {\n\t\t\tdownPoints[i] = point;\n\t\t\tlet movePoint = this._movePoints[k];\n\t\t\tif (movePoint) {\n\t\t\t\tmovePoints[i] = movePoint;\n\t\t\t}\n\t\t\ti++;\n\t\t});\n\n\t\tif (downPoints.length > 1 && movePoints.length > 1) {\n\t\t\tconst w = plotContainer.width();\n\t\t\tconst h = plotContainer.height();\n\n\t\t\tlet downPoint0 = downPoints[0];\n\t\t\tlet downPoint1 = downPoints[1];\n\n\t\t\tlet movePoint0 = movePoints[0];\n\t\t\tlet movePoint1 = movePoints[1];\n\n\t\t\tif (downPoint0 && downPoint1 && movePoint0 && movePoint1) {\n\n\t\t\t\tmovePoint0 = plotContainer.toLocal(movePoint0)\n\t\t\t\tmovePoint1 = plotContainer.toLocal(movePoint1)\n\n\t\t\t\tdownPoint0 = plotContainer.toLocal(downPoint0)\n\t\t\t\tdownPoint1 = plotContainer.toLocal(downPoint1)\n\n\t\t\t\tif (this.get(\"pinchZoomX\")) {\n\t\t\t\t\tconst downStartX = this._downStartX;\n\t\t\t\t\tconst downEndX = this._downEndX;\n\n\t\t\t\t\tif (downStartX != null && downEndX != null) {\n\n\t\t\t\t\t\tif (downPoint0.x > downPoint1.x) {\n\t\t\t\t\t\t\t[downPoint0, downPoint1] = [downPoint1, downPoint0];\n\t\t\t\t\t\t\t[movePoint0, movePoint1] = [movePoint1, movePoint0];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet downPos0 = downStartX + (downPoint0.x / w) * (downEndX - downStartX);\n\t\t\t\t\t\tlet downPos1 = downStartX + (downPoint1.x / w) * (downEndX - downStartX);\n\n\t\t\t\t\t\tlet movePos0 = downStartX + (movePoint0.x / w) * (downEndX - downStartX);\n\t\t\t\t\t\tlet movePos1 = downStartX + (movePoint1.x / w) * (downEndX - downStartX);\n\n\t\t\t\t\t\tlet initialDistance = Math.max(0.001, downPos1 - downPos0);\n\t\t\t\t\t\tlet currentDistance = Math.max(0.001, movePos1 - movePos0);\n\n\n\t\t\t\t\t\tlet d = initialDistance / currentDistance;\n\n\t\t\t\t\t\tlet s = downStartX * d + downPos0 - movePos0 * d;\n\t\t\t\t\t\tlet e = downEndX * d + downPos1 - movePos1 * d;\n\n\t\t\t\t\t\tthis.xAxes.each((xAxis) => {\n\t\t\t\t\t\t\tlet sa = xAxis.fixPosition(s);\n\t\t\t\t\t\t\tlet ea = xAxis.fixPosition(e);\n\n\t\t\t\t\t\t\txAxis.zoom(sa, ea, 0);\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (this.get(\"pinchZoomY\")) {\n\t\t\t\t\tconst downStartY = this._downStartY;\n\t\t\t\t\tconst downEndY = this._downEndY;\n\n\t\t\t\t\tif (downStartY != null && downEndY != null) {\n\n\t\t\t\t\t\tif (downPoint0.y < downPoint1.y) {\n\t\t\t\t\t\t\t[downPoint0, downPoint1] = [downPoint1, downPoint0];\n\t\t\t\t\t\t\t[movePoint0, movePoint1] = [movePoint1, movePoint0];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet downPos0 = downStartY + (1 - downPoint0.y / h) * (downEndY - downStartY);\n\t\t\t\t\t\tlet downPos1 = downStartY + (1 - downPoint1.y / h) * (downEndY - downStartY);\n\n\t\t\t\t\t\tlet movePos0 = downStartY + (1 - movePoint0.y / h) * (downEndY - downStartY);\n\t\t\t\t\t\tlet movePos1 = downStartY + (1 - movePoint1.y / h) * (downEndY - downStartY);\n\n\t\t\t\t\t\tlet initialDistance = Math.max(0.001, downPos1 - downPos0);\n\t\t\t\t\t\tlet currentDistance = Math.max(0.001, movePos1 - movePos0);\n\n\t\t\t\t\t\tlet d = initialDistance / currentDistance;\n\n\t\t\t\t\t\tlet s = downStartY * d + downPos0 - movePos0 * d;\n\t\t\t\t\t\tlet e = downEndY * d + downPos1 - movePos1 * d;\n\n\t\t\t\t\t\tthis.yAxes.each((yAxis) => {\n\n\t\t\t\t\t\t\tlet sa = yAxis.fixPosition(s);\n\t\t\t\t\t\t\tlet ea = yAxis.fixPosition(e);\n\n\t\t\t\t\t\t\tyAxis.zoom(sa, ea, 0);\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _handleCursorPosition() {\n\t\tconst cursor = this.get(\"cursor\");\n\t\tif (cursor) {\n\t\t\tconst cursorPoint = cursor.getPrivate(\"point\");\n\n\t\t\tlet snapToSeries = cursor.get(\"snapToSeries\");\n\n\t\t\tif (cursor._downPoint) {\n\t\t\t\tsnapToSeries = undefined;\n\t\t\t}\n\n\t\t\tif (snapToSeries && cursorPoint) {\n\t\t\t\tconst snapToSeriesBy = cursor.get(\"snapToSeriesBy\");\n\t\t\t\tconst dataItems: Array> = [];\n\t\t\t\t$array.each(snapToSeries, (series) => {\n\t\t\t\t\tif (!series.isHidden() && !series.isHiding()) {\n\t\t\t\t\t\tif (snapToSeriesBy != \"x!\" && snapToSeriesBy != \"y!\") {\n\t\t\t\t\t\t\tconst startIndex = series.startIndex();\n\t\t\t\t\t\t\tconst endIndex = series.endIndex();\n\t\t\t\t\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\t\t\t\t\tconst dataItem = series.dataItems[i];\n\t\t\t\t\t\t\t\tif (dataItem && !dataItem.isHidden()) {\n\t\t\t\t\t\t\t\t\tdataItems.push(dataItem);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tconst tooltipDataItem = series.get(\"tooltipDataItem\");\n\t\t\t\t\t\t\tif (tooltipDataItem) {\n\t\t\t\t\t\t\t\tdataItems.push(tooltipDataItem);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tlet minDistance = Infinity;\n\t\t\t\tlet closestItem: DataItem | undefined;\n\n\t\t\t\t$array.each(dataItems, (dataItem) => {\n\t\t\t\t\tconst point = dataItem.get(\"point\");\n\n\t\t\t\t\tif (point) {\n\t\t\t\t\t\tlet distance = 0;\n\t\t\t\t\t\tif (snapToSeriesBy == \"x\" || snapToSeriesBy == \"x!\") {\n\t\t\t\t\t\t\tdistance = Math.abs(cursorPoint.x - point.x);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (snapToSeriesBy == \"y\" || snapToSeriesBy == \"y!\") {\n\t\t\t\t\t\t\tdistance = Math.abs(cursorPoint.y - point.y);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tdistance = Math.hypot(cursorPoint.x - point.x, cursorPoint.y - point.y);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (distance < minDistance) {\n\t\t\t\t\t\t\tminDistance = distance;\n\t\t\t\t\t\t\tclosestItem = dataItem;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\t$array.each(snapToSeries, (series) => {\n\t\t\t\t\tconst tooltip = series.get(\"tooltip\");\n\t\t\t\t\tif (tooltip) {\n\t\t\t\t\t\ttooltip._setDataItem(undefined);\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tif (closestItem) {\n\t\t\t\t\tlet series = closestItem.component as XYSeries;\n\t\t\t\t\tseries.showDataItemTooltip(closestItem);\n\t\t\t\t\tconst point = closestItem.get(\"point\");\n\t\t\t\t\tif (point) {\n\t\t\t\t\t\t// removing x and y to solve #72225\n\t\t\t\t\t\tcursor.handleMove(series.toGlobal({ x: point.x - series.x(), y: point.y - series.y() }), true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateCursor() {\n\t\tlet cursor = this.get(\"cursor\");\n\t\tif (cursor) {\n\t\t\tcursor.updateCursor();\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, false) || \"\" : \"\";\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, false) || \"\" : \"\";\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\n\t\tconst xAxis = series.get(\"xAxis\");\n\t\tconst yAxis = series.get(\"yAxis\");\n\n\t\t$array.move(xAxis.series, series);\n\t\t$array.move(yAxis.series, series);\n\n\t\tseries._posXDp = series.addDisposer(xAxis.events.on(\"positionchanged\", () => {\n\t\t\tseries._fixPosition();\n\t\t}))\n\n\t\tseries._posXDp = series.addDisposer(yAxis.events.on(\"positionchanged\", () => {\n\t\t\tseries._fixPosition();\n\t\t}))\n\n\t\tif (!series.get(\"baseAxis\")) {\n\t\t\tif (yAxis.isType>(\"CategoryAxis\") || yAxis.isType>(\"DateAxis\")) {\n\t\t\t\tseries.set(\"baseAxis\", yAxis);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tseries.set(\"baseAxis\", xAxis);\n\t\t\t}\n\t\t}\n\n\t\tif (series.get(\"stacked\")) {\n\t\t\tseries._markDirtyKey(\"stacked\");\n\t\t\t$array.each(series.dataItems, (dataItem) => {\n\t\t\t\tdataItem.set(\"stackToItemY\", undefined);\n\t\t\t\tdataItem.set(\"stackToItemX\", undefined);\n\t\t\t})\n\t\t}\n\t\tseries._markDirtyAxes();\n\t\tyAxis.markDirtyExtremes();\n\t\txAxis.markDirtyExtremes();\n\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 = Math.min(1, Math.max(0, cursor.getPrivate(\"positionX\", 0.5)));\n\t\tconst positionY = Math.min(1, Math.max(0, cursor.getPrivate(\"positionY\", 0.5)));\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\t\tvar cursor = this.get(\"cursor\");\n\t\tif (cursor) {\n\t\t\tthis.addDisposer(axis.on(\"start\", () => {\n\t\t\t\tthis._updateCursor();\n\t\t\t}))\n\n\t\t\tthis.addDisposer(axis.on(\"end\", () => {\n\t\t\t\tthis._updateCursor();\n\t\t\t}))\n\t\t}\n\t}\n\n\n\tpublic _handleAxisSelection(axis: Axis, force?: boolean) {\n\n\t\tlet start = axis.fixPosition(axis.get(\"start\", 0));\n\t\tlet end = axis.fixPosition(axis.get(\"end\", 1));\n\n\t\tif (start > end) {\n\t\t\t[start, end] = [end, start];\n\t\t}\n\n\t\tif (this.xAxes.indexOf(axis) != -1) {\n\t\t\tif (force || axis.getPrivate(\"updateScrollbar\")) {\n\t\t\t\tlet scrollbarX = this.get(\"scrollbarX\");\n\n\t\t\t\tif (scrollbarX && (!scrollbarX.getPrivate(\"isBusy\") || force)) {\n\t\t\t\t\tscrollbarX.setRaw(\"start\", start);\n\t\t\t\t\tscrollbarX.setRaw(\"end\", end);\n\t\t\t\t\tscrollbarX.updateGrips();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (this.yAxes.indexOf(axis) != -1) {\n\t\t\tif (force || axis.getPrivate(\"updateScrollbar\")) {\n\t\t\t\tlet scrollbarY = this.get(\"scrollbarY\");\n\n\t\t\t\tif (scrollbarY && (!scrollbarY.getPrivate(\"isBusy\") || force)) {\n\t\t\t\t\tscrollbarY.setRaw(\"start\", start);\n\t\t\t\t\tscrollbarY.setRaw(\"end\", end);\n\t\t\t\t\tscrollbarY.updateGrips();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._handleZoomOut();\n\t}\n\n\tprotected _handleZoomOut() {\n\t\tlet zoomOutButton = this.zoomOutButton;\n\t\tif (zoomOutButton && zoomOutButton.parent) {\n\t\t\tlet visible = false;\n\t\t\tthis.xAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"start\") != 0 || axis.get(\"end\") != 1) {\n\t\t\t\t\tvisible = true;\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.yAxes.each((axis) => {\n\t\t\t\tif (axis.get(\"start\") != 0 || axis.get(\"end\") != 1) {\n\t\t\t\t\tvisible = true;\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (visible) {\n\t\t\t\tif (zoomOutButton.isHidden()) {\n\t\t\t\t\tzoomOutButton.show();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tzoomOutButton.hide();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if point is within plot area.\n\t *\n\t * @param point Reference point\n\t * @return Is within plot area?\n\t */\n\tpublic inPlot(point: IPoint): boolean {\n\t\tconst plotContainer = this.plotContainer;\n\t\tconst otherCharts = this.getPrivate(\"otherCharts\", this._otherCharts);\n\t\tconst global = plotContainer.toGlobal(point);\n\n\t\tif (point.x >= -0.5 && point.y >= -0.5 && point.x <= plotContainer.width() + 0.5 && point.y <= plotContainer.height() + 0.5) {\n\t\t\treturn true;\n\t\t}\n\t\tif (otherCharts) {\n\n\t\t\tfor (let i = otherCharts.length - 1; i >= 0; i--) {\n\t\t\t\tconst chart = otherCharts[i];\n\n\t\t\t\tif (chart != this) {\n\t\t\t\t\tconst chartPlotContainer = chart.plotContainer;\n\t\t\t\t\tconst documentPoint = this._root.rootPointToDocument(global);\n\t\t\t\t\tconst chartRoot = chart._root.documentPointToRoot(documentPoint);\n\t\t\t\t\tconst local = chartPlotContainer.toLocal(chartRoot);\n\t\t\t\t\tif (local.x >= -0.1 && local.y >= -0.1 && local.x <= chartPlotContainer.width() + 0.1 && local.y <= chartPlotContainer.height() + 0.1) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic arrangeTooltips() {\n\t\tconst plotContainer = this.plotContainer;\n\n\t\tconst w = plotContainer.width();\n\t\tconst h = plotContainer.height();\n\n\t\tconst hh = this.height();\n\n\t\tlet plotT = plotContainer._display.toGlobal({ x: 0, y: 0 });\n\t\tlet plotB = plotContainer._display.toGlobal({ x: w, y: h });\n\n\t\tconst tooltips: Array = [];\n\t\tlet sum = 0;\n\n\t\tlet minDistance = Infinity;\n\t\tlet movePoint = this._movePoint;\n\t\tlet maxTooltipDistance = this.get(\"maxTooltipDistance\");\n\t\tlet maxTooltipDistanceBy = this.get(\"maxTooltipDistanceBy\", \"xy\");\n\t\tlet closest: XYSeries;\n\t\tlet closestPoint: IPoint;\n\n\t\tif ($type.isNumber(maxTooltipDistance)) {\n\t\t\tthis.series.each((series) => {\n\t\t\t\tif (!series.isHidden()) {\n\t\t\t\t\tconst tooltip = series.get(\"tooltip\");\n\t\t\t\t\tif (tooltip) {\n\t\t\t\t\t\tlet point = tooltip.get(\"pointTo\")!;\n\t\t\t\t\t\tif (point) {\n\t\t\t\t\t\t\tlet distance = Math.hypot(movePoint.x - point.x, movePoint.y - point.y);\n\t\t\t\t\t\t\tif (maxTooltipDistanceBy == \"x\") {\n\t\t\t\t\t\t\t\tdistance = Math.abs(movePoint.x - point.x);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (maxTooltipDistanceBy == \"y\") {\n\t\t\t\t\t\t\t\tdistance = Math.abs(movePoint.y - point.y);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (distance < minDistance) {\n\t\t\t\t\t\t\t\tminDistance = distance;\n\t\t\t\t\t\t\t\tclosest = series;\n\t\t\t\t\t\t\t\tclosestPoint = point;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\tconst tooltipSeries: Array = [];\n\n\t\tthis.series.each((series) => {\n\t\t\tconst tooltip = series.get(\"tooltip\")!;\n\n\t\t\tif (tooltip && !tooltip.get(\"forceHidden\")) {\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 && closestPoint) {\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\t\tr(\"AxisLabel\", [\"minor\"]).setAll({\r\n\t\t\tfontSize: \"0.6em\"\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\", [\"xy\", \"scrollbar\", \"y\"]).setAll({\r\n\t\t\tvisible: false\r\n\t\t});\r\n\r\n\t\t// Class: Grid\r\n\t\tr(\"Grid\", [\"xy\", \"scrollbar\", \"y\"]).setAll({\r\n\t\t\tvisible: false\r\n\t\t});\r\n\r\n\t\t// Class: Grid\r\n\t\tr(\"Grid\", [\"xy\", \"scrollbar\", \"x\"]).setAll({\r\n\t\t\topacity: 0.5\r\n\t\t});\r\n\r\n\r\n\r\n\r\n\t\t/**\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t * charts/xy: Cursor\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t */\r\n\r\n\t\tr(\"XYCursor\").setAll({\r\n\t\t\tbehavior: \"none\",\r\n\t\t\tlayer: 30,\r\n\t\t\texportable: false,\r\n\t\t\tsnapToSeriesBy: \"xy\",\r\n\t\t\tmoveThreshold: 1\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Grid\", [\"cursor\", \"x\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tstrokeOpacity: 0.8,\r\n\t\t\t\tstrokeDasharray: [2, 2],\r\n\t\t\t\tariaLabel: language.translate(\"Use left and right arrows to move selection\")\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"alternativeBackground\");\r\n\t\t}\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Grid\", [\"cursor\", \"y\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tstrokeOpacity: 0.8,\r\n\t\t\t\tstrokeDasharray: [2, 2],\r\n\t\t\t\tariaLabel: language.translate(\"Use up and down arrows to move selection\")\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"alternativeBackground\");\r\n\t\t}\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Graphics\", [\"cursor\", \"selection\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tfillOpacity: 0.15,\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"fill\", ic, \"alternativeBackground\");\r\n\t\t}\r\n\r\n\r\n\t\t/**\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t * charts/xy: Axes\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t */\r\n\r\n\t\tr(\"Axis\").setAll({\r\n\t\t\tstart: 0,\r\n\t\t\tend: 1,\r\n\t\t\tminZoomCount: 1,\r\n\t\t\tmaxZoomCount: Infinity,\r\n\t\t\tmaxZoomFactor: 1000,\r\n\t\t\tmaxDeviation: 0.1,\r\n\t\t\tsnapTooltip: true,\r\n\t\t\ttooltipLocation: 0.5,\r\n\t\t\tpanX: true,\r\n\t\t\tpanY: true,\r\n\t\t\tzoomX: true,\r\n\t\t\tzoomY: true,\r\n\t\t\tfixAxisSize: true\r\n\t\t});\r\n\r\n\t\tr(\"AxisLabel\").setAll({\r\n\t\t\tlocation: 0.5,\r\n\t\t\tmultiLocation: 0,\r\n\t\t\tcenterX: p50,\r\n\t\t\tcenterY: p50,\r\n\t\t\tpaddingTop: 3,\r\n\t\t\tpaddingBottom: 3,\r\n\t\t\tpaddingLeft: 5,\r\n\t\t\tpaddingRight: 5\r\n\t\t});\r\n\r\n\t\t// The following is deprecated following text measuring updates in 5.0.5\r\n\t\t// r(\"AxisLabel\", [\"y\"]).setAll({\r\n\t\t// \ttextAlign: \"right\"\r\n\t\t// });\r\n\r\n\t\t// r(\"AxisLabel\", [\"y\", \"opposite\"]).setAll({\r\n\t\t// \ttextAlign: \"left\"\r\n\t\t// });\r\n\r\n\t\tr(\"Container\", [\"axis\", \"header\"]).setAll({\r\n\t\t\tlayer: 30\r\n\t\t});\r\n\r\n\t\tr(\"Rectangle\", [\"axis\", \"header\", \"background\"]).setAll({\r\n\t\t\tcrisp: true\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"AxisRenderer\");\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tcrisp: true,\r\n\t\t\t\tstrokeOpacity: 0\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"grid\");\r\n\t\t}\r\n\r\n\t\tr(\"AxisRendererX\").setAll({\r\n\t\t\tminGridDistance: 120,\r\n\t\t\topposite: false,\r\n\t\t\tinversed: false,\r\n\t\t\tcellStartLocation: 0,\r\n\t\t\tcellEndLocation: 1,\r\n\t\t\twidth: p100\r\n\t\t});\r\n\r\n\t\tr(\"AxisRendererY\").setAll({\r\n\t\t\tminGridDistance: 40,\r\n\t\t\topposite: false,\r\n\t\t\tinversed: false,\r\n\t\t\tcellStartLocation: 0,\r\n\t\t\tcellEndLocation: 1,\r\n\t\t\theight: p100\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Rectangle\", [\"axis\", \"thumb\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tfillOpacity: 0\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"fill\", ic, \"alternativeBackground\");\r\n\r\n\t\t\trule.states.create(\"hover\", { fillOpacity: 0.1 })\r\n\t\t}\r\n\r\n\t\tr(\"Rectangle\", [\"axis\", \"thumb\", \"x\"]).setAll({\r\n\t\t\tcursorOverStyle: \"ew-resize\"\r\n\t\t});\r\n\r\n\t\tr(\"Rectangle\", [\"axis\", \"thumb\", \"y\"]).setAll({\r\n\t\t\tcursorOverStyle: \"ns-resize\"\r\n\t\t});\r\n\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Grid\");\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tlocation: 0,\r\n\t\t\t\tstrokeOpacity: 0.15,\r\n\t\t\t\tcrisp: true\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"grid\");\r\n\t\t}\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Grid\", [\"minor\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tlocation: 0,\r\n\t\t\t\tstrokeOpacity: 0.07,\r\n\t\t\t\tcrisp: true\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"grid\");\r\n\t\t}\r\n\r\n\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\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\r\n\t\t// AXIS RANGE GRIP\r\n\t\t{\r\n\t\t\tconst rule = r(\"RoundedRectangle\", [\"rangegrip\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tstrokeOpacity: 0,\r\n\t\t\t\tfillOpacity: 0,\r\n\t\t\t\tstrokeWidth: 1,\r\n\t\t\t\twidth: 12,\r\n\t\t\t\theight: 12\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Graphics\", [\"rangegrip\", \"button\", \"icon\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tinteractive: false,\r\n\t\t\t\tcrisp: true,\r\n\t\t\t\tstrokeOpacity: 0.5,\r\n\t\t\t\tdraw: (display: any) => {\r\n\t\t\t\t\tdisplay.moveTo(0, 0.5);\r\n\t\t\t\t\tdisplay.lineTo(0, 12.5);\r\n\r\n\t\t\t\t\tdisplay.moveTo(2, 0.5);\r\n\t\t\t\t\tdisplay.lineTo(2, 12.5);\r\n\r\n\t\t\t\t\tdisplay.moveTo(4, 0.5);\r\n\t\t\t\t\tdisplay.lineTo(4, 12.5);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"stroke\", ic, \"secondaryButtonText\");\r\n\t\t}\r\n\r\n\t\tr(\"Button\", [\"rangegrip\"]).setAll({\r\n\t\t\tdraggable: true,\r\n\t\t\tpaddingTop: 0,\r\n\t\t\tpaddingBottom: 0\r\n\t\t})\r\n\r\n\t\tr(\"Button\", [\"rangegrip\", \"vertical\"]).setAll({\r\n\t\t\trotation: 90,\r\n\t\t\tcursorOverStyle: \"ns-resize\",\r\n\t\t\tcenterX: p50\r\n\t\t});\r\n\r\n\t\tr(\"Button\", [\"rangegrip\", \"horizontal\"]).setAll({\r\n\t\t\tcursorOverStyle: \"ew-resize\",\r\n\t\t\tcenterX: p50\r\n\t\t});\r\n\r\n\t\tr(\"Button\", [\"rangegrip\", \"vertical\", \"left\"]).setAll({\r\n\t\t\tcenterY: p100\r\n\t\t});\r\n\r\n\t\tr(\"Button\", [\"rangegrip\", \"vertical\", \"right\"]).setAll({\r\n\t\t\tcenterY: 0\r\n\t\t});\r\n\r\n\t\tr(\"Button\", [\"rangegrip\", \"horizontal\", \"top\"]).setAll({\r\n\t\t\tcenterY: 0\r\n\t\t});\r\n\r\n\t\tr(\"Button\", [\"rangegrip\", \"horizontal\", \"bottom\"]).setAll({\r\n\t\t\tcenterY: p100\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 { ISpritePointerEvent } from \"../../core/render/Sprite\";\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\";\nimport type { IPointerEvent } from \"../../core/render/backend/Renderer\";\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\"`, `\"y\"`, `\"x!\"`, `\"y!\"`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/#snapping-to-series} for more info\n\t * @since 5.0.6\n\t * @default \"xy\"\n\t */\n\tsnapToSeriesBy?: \"xy\" | \"x\" | \"y\" | \"x!\" | \"y!\";\n\n\t/**\n\t * An array of other [[XYCursor]] objects to sync this cursor with.\n\t *\n\t * If set will automatically move synced cursors to the same position within\n\t * their respective axes as the this cursor assumin same XY coordinates of\n\t * the pointer.\n\t *\n\t * NOTE: Syncing is performed using actual X/Y coordinates of the point of\n\t * mouse cursor's position or touch. It means that they will not sync by axis\n\t * positions, but rather by screen coordinates. For example vertical lines\n\t * will not sync across horizontally laid out charts, and vice versa.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/#syncing-cursors} for more info\n\t * @since 5.1.4\n\t */\n\tsyncWith?: Array;\n\n\t/**\n\t * Minimum distance in pixels between down and up points.\n\t *\n\t * If a distance is less than the value of `moveThreshold`, the zoom or\n\t * selection won't happen.\n\t *\n\t * @since 5.2.20\n\t * @default 1\n\t */\n\tmoveThreshold?: number\n\n}\n\n\nexport interface IXYCursorPrivate extends IContainerPrivate {\n\n\t/**\n\t * Current X/Y coordinates of the cursor.\n\t */\n\tpoint?: IPoint;\n\n\t/**\n\t * Current horizontal position relative to the plot area (0-1).\n\t */\n\tpositionX?: number;\n\n\t/**\n\t * Current vertical position relative to the plot area (0-1).\n\t */\n\tpositionY?: number;\n\n\t/**\n\t * Horizontal cursor position on the moment when selection started.\n\t */\n\tdownPositionX?: number;\n\n\t/**\n\t * Vertical cursor position on the moment when selection started.\n\t */\n\tdownPositionY?: number;\n\n\t/**\n\t * Last global point to which cursor moved\n\t */\n\tlastPoint?: IPoint;\n}\n\nexport interface IXYCursorEvents extends IContainerEvents {\n\n\t/**\n\t * Kicks in when cursor selection ends.\n\t *\n\t * Only when `behavior` is set.\n\t */\n\tselectended: {\n\t\toriginalEvent: IPointerEvent,\n\t\ttarget: XYCursor\n\t};\n\n\t/**\n\t * Kicks in when cursor selection starts.\n\t *\n\t * Only when `behavior` is set.\n\t */\n\tselectstarted: {\n\t\toriginalEvent: IPointerEvent,\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\tpoint: IPoint,\n\t\ttarget: XYCursor,\n\t\toriginalEvent?: IPointerEvent\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\t/**\n\t * Invoked if pointer is pressed down on a plot area and released without\n\t * moving (only when behavior is `\"selectX\"`).\n\t *\n\t * @since 5.4.7\n\t */\n\tselectcancelled: {\n\t\toriginalEvent: IPointerEvent,\n\t\ttarget: XYCursor\n\t};\n\n}\n\n/**\n * Creates a chart cursor for an [[XYChart]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/} for more info\n * @important\n */\nexport class XYCursor extends Container {\n\tpublic static className: string = \"XYCursor\";\n\tpublic static classNames: Array = Container.classNames.concat([XYCursor.className]);\n\n\tdeclare public _settings: IXYCursorSettings;\n\tdeclare public _privateSettings: IXYCursorPrivate;\n\tdeclare public _events: IXYCursorEvents;\n\n\t/**\n\t * A [[Grid]] elment that used for horizontal line of the cursor crosshair.\n\t *\n\t * @default Grid.new()\n\t */\n\tpublic readonly lineX: Grid = this.children.push(Grid.new(this._root, {\n\t\tthemeTags: [\"x\"]\n\t}));\n\n\t/**\n\t * A [[Grid]] elment that used for horizontal line of the cursor crosshair.\n\t *\n\t * @default Grid.new()\n\t */\n\tpublic readonly lineY: Grid = this.children.push(Grid.new(this._root, {\n\t\tthemeTags: [\"y\"]\n\t}));\n\n\t/**\n\t * An element that represents current selection.\n\t *\n\t * @default Graphics.new()\n\t */\n\tpublic readonly selection: Graphics = this.children.push(Graphics.new(this._root, {\n\t\tthemeTags: [\"selection\", \"cursor\"], layer: 30\n\t}));\n\n\tprotected _movePoint: IPoint | undefined;\n\tprotected _lastPoint: IPoint = { x: 0, y: 0 };\n\n\tprotected _tooltipX: boolean = false;\n\tprotected _tooltipY: boolean = false;\n\n\t/**\n\t * A chart cursor is attached to.\n\t */\n\tpublic chart: XYChart | undefined;\n\n\tprotected _toX?: number;\n\tprotected _toY?: number;\n\n\tprotected _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"xy\", \"cursor\"]);\n\t\tsuper._afterNew();\n\t\tthis.setAll({ \"width\": p100, height: p100, isMeasured: true, position: \"absolute\" });\n\t\tthis.states.create(\"hidden\", { visible: true, opacity: 0 });\n\t\tthis._drawLines();\n\t\tthis.setPrivateRaw(\"visible\", false);\n\n\t\tthis._disposers.push(this.setTimeout(() => {\n\t\t\tthis.setPrivate(\"visible\", true)\n\t\t}, 500));\n\n\t\tthis._disposers.push(this.lineX.events.on(\"positionchanged\", () => {\n\t\t\tthis._handleXLine();\n\t\t}));\n\n\t\tthis._disposers.push(this.lineY.events.on(\"positionchanged\", () => {\n\t\t\tthis._handleYLine();\n\t\t}));\n\n\t\tthis._disposers.push(this.lineX.events.on(\"focus\", (ev) => this._handleLineFocus(ev.target)));\n\t\tthis._disposers.push(this.lineX.events.on(\"blur\", (ev) => this._handleLineBlur(ev.target)));\n\n\t\tthis._disposers.push(this.lineY.events.on(\"focus\", (ev) => this._handleLineFocus(ev.target)));\n\t\tthis._disposers.push(this.lineY.events.on(\"blur\", (ev) => this._handleLineBlur(ev.target)));\n\n\t\tif ($utils.supports(\"keyboardevents\")) {\n\t\t\tthis._disposers.push($utils.addEventListener(document, \"keydown\", (ev: KeyboardEvent) => {\n\t\t\t\tthis._handleLineMove(ev.keyCode);\n\t\t\t}));\n\t\t}\n\t}\n\n\tprotected _setUpTouch(): void {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tchart.plotContainer._display.cancelTouch = this.get(\"behavior\") != \"none\" ? true : false;\n\t\t}\n\t}\n\n\tprotected _handleXLine() {\n\t\tlet x = this.lineX.x();\n\t\tlet visible = true;\n\t\tif (x < 0 || x > this.width()) {\n\t\t\tvisible = false;\n\t\t}\n\t\tthis.lineX.setPrivate(\"visible\", visible);\n\t}\n\n\tprotected _handleYLine() {\n\t\tlet y = this.lineY.y();\n\t\tlet visible = true;\n\t\tif (y < 0 || y > this.height()) {\n\t\t\tvisible = false;\n\t\t}\n\t\tthis.lineY.setPrivate(\"visible\", visible);\n\t}\n\n\tprotected _handleLineMove(keyCode: number) {\n\t\tlet dir: any = \"\";\n\t\tlet position = 0;\n\t\tlet increment = 0.1;\n\t\tconst chart = this.chart;\n\n\t\tif (this._root.focused(this.lineX)) {\n\t\t\tif (chart && chart.xAxes.length) {\n\t\t\t\tincrement = chart.xAxes.getIndex(0)!.getCellWidthPosition();\n\t\t\t}\n\t\t\tposition = this.getPrivate(\"positionX\", 0);\n\t\t\tdir = \"positionX\";\n\t\t\tif (keyCode == 37) {\n\t\t\t\tposition -= increment;\n\t\t\t}\n\t\t\telse if (keyCode == 39) {\n\t\t\t\tposition += increment;\n\t\t\t}\n\t\t}\n\t\telse if (this._root.focused(this.lineY)) {\n\t\t\tif (chart && chart.yAxes.length) {\n\t\t\t\tincrement = chart.yAxes.getIndex(0)!.getCellWidthPosition();\n\t\t\t}\n\t\t\tposition = this.getPrivate(\"positionY\", 0);\n\t\t\tdir = \"positionY\";\n\t\t\tif (keyCode == 38) {\n\t\t\t\tposition -= increment;\n\t\t\t}\n\t\t\telse if (keyCode == 40) {\n\t\t\t\tposition += increment;\n\t\t\t}\n\t\t}\n\n\t\tif (position < 0) {\n\t\t\tposition = 0;\n\t\t}\n\t\telse if (position > 1) {\n\t\t\tposition = 1;\n\t\t}\n\n\t\tif (dir != \"\") {\n\t\t\tthis.set(dir, position);\n\t\t}\n\t}\n\n\tprotected _handleLineFocus(_line: Grid) {\n\t\tthis.setAll({\n\t\t\tpositionX: this.getPrivate(\"positionX\"),\n\t\t\tpositionY: this.getPrivate(\"positionY\"),\n\t\t\talwaysShow: true\n\t\t});\n\t}\n\n\tprotected _handleLineBlur(_line: Grid) {\n\t\tthis.setAll({\n\t\t\tpositionX: undefined,\n\t\t\tpositionY: undefined,\n\t\t\talwaysShow: false\n\t\t});\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tif (this.isDirty(\"xAxis\")) {\n\t\t\tthis._tooltipX = false;\n\t\t\tconst xAxis = this.get(\"xAxis\");\n\n\t\t\tif (xAxis) {\n\t\t\t\tconst tooltip = xAxis.get(\"tooltip\");\n\t\t\t\tif (tooltip) {\n\t\t\t\t\tthis._tooltipX = true;\n\t\t\t\t\tthis._disposers.push(\n\t\t\t\t\t\ttooltip.on(\"pointTo\", () => {\n\t\t\t\t\t\t\tthis._updateXLine(tooltip);\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"yAxis\")) {\n\t\t\tthis._tooltipY = false;\n\t\t\tconst yAxis = this.get(\"yAxis\");\n\n\t\t\tif (yAxis) {\n\t\t\t\tconst tooltip = yAxis.get(\"tooltip\");\n\t\t\t\tif (tooltip) {\n\t\t\t\t\tthis._tooltipY = true;\n\t\t\t\t\tthis._disposers.push(\n\t\t\t\t\t\ttooltip.on(\"pointTo\", () => {\n\t\t\t\t\t\t\tthis._updateYLine(tooltip);\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _handleSyncWith() {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tconst syncWith = this.get(\"syncWith\");\n\t\t\tconst otherCharts: Array = [];\n\t\t\tif (syncWith) {\n\t\t\t\t$array.each(syncWith, (cursor) => {\n\t\t\t\t\tconst chart = cursor.chart;\n\t\t\t\t\tif (chart) {\n\t\t\t\t\t\totherCharts.push(chart)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t\tchart._otherCharts = otherCharts;\n\t\t}\n\t}\n\n\tpublic _updateChildren() {\n\t\tsuper._updateChildren();\n\t\tthis._handleSyncWith();\n\n\t\tif (this.isDirty(\"positionX\") || this.isDirty(\"positionY\")) {\n\t\t\tconst positionX = this.get(\"positionX\");\n\t\t\tconst positionY = this.get(\"positionY\");\n\n\t\t\tif (positionX == null && positionY == null) {\n\t\t\t\tthis.hide(0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._movePoint = this.toGlobal(this._getPoint(this.get(\"positionX\", 0), this.get(\"positionY\", 0)));\n\t\t\t\tthis.handleMove();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _updateXLine(tooltip: Tooltip) {\n\t\tlet x = $math.round(this._display.toLocal(tooltip.get(\"pointTo\", { x: 0, y: 0 })).x, 2);\n\t\tif (this._toX != x) {\n\t\t\tthis.lineX.animate({ key: \"x\", to: x, duration: tooltip.get(\"animationDuration\", 0), easing: tooltip.get(\"animationEasing\") });\n\t\t\tthis._toX = x;\n\t\t}\n\t}\n\n\tprotected _updateYLine(tooltip: Tooltip) {\n\t\tlet y = $math.round(this._display.toLocal(tooltip.get(\"pointTo\", { x: 0, y: 0 })).y, 2);\n\t\tif (this._toY != y) {\n\t\t\tthis.lineY.animate({ key: \"y\", to: y, duration: tooltip.get(\"animationDuration\", 0), easing: tooltip.get(\"animationEasing\") });\n\t\t\tthis._toY = y;\n\t\t}\n\t}\n\n\tprotected _drawLines() {\n\t\tthis.lineX.set(\"draw\", (display) => {\n\t\t\tdisplay.moveTo(0, 0);\n\t\t\tdisplay.lineTo(0, this.height());\n\t\t})\n\t\tthis.lineY.set(\"draw\", (display) => {\n\t\t\tdisplay.moveTo(0, 0);\n\t\t\tdisplay.lineTo(this.width(), 0);\n\t\t})\n\t}\n\n\tpublic updateCursor() {\n\t\tif (this.get(\"alwaysShow\")) {\n\t\t\tthis._movePoint = this.toGlobal(this._getPoint(this.get(\"positionX\", 0), this.get(\"positionY\", 0)));\n\t\t}\n\t\tthis.handleMove();\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\tthis.updateCursor();\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);\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);\n\t\t}));\n\n\t\tthis._disposers.push(plotContainer.events.on(\"globalpointerup\", (event) => {\n\t\t\tthis._handleCursorUp(event);\n\t\t\tif (!event.native && !this.isHidden()) {\n\t\t\t\tthis._handleMove(event);\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);\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: ISpritePointerEvent) {\n\t\tif ((event.originalEvent as any).button == 2) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst rootPoint = event.point;\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, originalEvent: event.originalEvent });\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: ISpritePointerEvent) {\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 = event.point;\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, originalEvent: event.originalEvent });\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\tconst type = \"selectcancelled\";\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, originalEvent: event.originalEvent });\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: ISpritePointerEvent) {\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 = event.point;\n\t\t\tconst lastPoint = this._lastPoint;\n\n\t\t\tif (Math.round(lastPoint.x) === Math.round(rootPoint.x) && Math.round(lastPoint.y) === Math.round(rootPoint.y)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._lastPoint = rootPoint;\n\t\t\tthis.setPrivate(\"lastPoint\", rootPoint);\n\n\t\t\tthis.handleMove({ x: rootPoint.x, y: rootPoint.y }, false, event.originalEvent);\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, originalEvent?: IPointerEvent) {\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) || this._downPoint)) {\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, point: point, originalEvent: originalEvent });\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\n\t/**\n\t * @todo review\n\t * You can prevent axis to be zoomed if this is false.\n\t */\n\tzoomable?: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\t/**\n\t * Width in pixels between grid lines (read-only).\n\t * \n\t * It might not be exact, as [[DateAxis]] can have grids at irregular\n\t * intervals.\n\t * \n\t * Could be used to detect when size changes and to adjust labels for them\n\t * not to overlap.\n\t */\n\tcellWidth?: 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 * Array of minor data items.\n\t */\n\tpublic minorDataItems: Array> = [];\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.setAll({ opacity: 0, tooltipText: undefined, tooltipHTML: undefined, interactive: false });\n\t\tthis.ghostLabel.events.disable();\n\t}\n\n\tprotected _updateFinals(_start: number, _end: number) {\n\n\t}\n\n\t/**\n\t * Zooms the axis to relative locations.\n\t *\n\t * Both `start` and `end` are relative: 0 means start of the axis, 1 - end.\n\t *\n\t * @param start Relative start\n\t * @param end Relative end\n\t * @param duration Duration of the zoom animation in milliseconds\n\t * @return Zoom animation\n\t */\n\tpublic zoom(start: number, end: number, duration?: number, priority?: \"start\" | \"end\"): Animation | Animation | undefined {\n\t\tif(this.get(\"zoomable\", true)){\n\t\t\tthis._updateFinals(start, end);\n\n\t\t\tif (this.get(\"start\") !== start || this.get(\"end\") != end) {\n\t\t\t\tlet sAnimation = this._sAnimation;\n\t\t\t\tlet eAnimation = this._eAnimation;\n\n\t\t\t\tlet maxDeviation = this.get(\"maxDeviation\", 0.5) * Math.min(1, (end - start));\n\n\t\t\t\tif (start < - maxDeviation) {\n\t\t\t\t\tstart = -maxDeviation;\n\t\t\t\t}\n\n\t\t\t\tif (end > 1 + maxDeviation) {\n\t\t\t\t\tend = 1 + maxDeviation;\n\t\t\t\t}\n\n\t\t\t\tif (start > end) {\n\t\t\t\t\t[start, end] = [end, start];\n\t\t\t\t}\n\n\t\t\t\tif (!$type.isNumber(duration)) {\n\t\t\t\t\tduration = this.get(\"interpolationDuration\", 0);\n\t\t\t\t}\n\n\t\t\t\tif (!priority) {\n\t\t\t\t\tpriority = \"end\";\n\t\t\t\t}\n\n\t\t\t\tlet maxZoomFactor = this.getPrivate(\"maxZoomFactor\", this.get(\"maxZoomFactor\", 100));\n\t\t\t\tlet maxZoomFactorReal = maxZoomFactor;\n\n\t\t\t\tif (end === 1 && start !== 0) {\n\t\t\t\t\tif (start < this.get(\"start\")) {\n\t\t\t\t\t\tpriority = \"start\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tpriority = \"end\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (start === 0 && end !== 1) {\n\t\t\t\t\tif (end > this.get(\"end\")) {\n\t\t\t\t\t\tpriority = \"end\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tpriority = \"start\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlet minZoomCount = this.get(\"minZoomCount\");\n\t\t\t\tlet maxZoomCount = this.get(\"maxZoomCount\");\n\n\t\t\t\tif ($type.isNumber(minZoomCount)) {\n\t\t\t\t\tmaxZoomFactor = maxZoomFactorReal / minZoomCount;\n\t\t\t\t}\n\n\t\t\t\tlet minZoomFactor: number = 1;\n\n\t\t\t\tif ($type.isNumber(maxZoomCount)) {\n\t\t\t\t\tminZoomFactor = maxZoomFactorReal / maxZoomCount;\n\t\t\t\t}\n\n\t\t\t\t// most likely we are dragging left scrollbar grip here, so we tend to modify end\n\t\t\t\tif (priority === \"start\") {\n\t\t\t\t\tif (maxZoomCount > 0) {\n\t\t\t\t\t\t// add to the end\n\t\t\t\t\t\tif (1 / (end - start) < minZoomFactor) {\n\t\t\t\t\t\t\tend = start + 1 / minZoomFactor;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// add to the end\n\t\t\t\t\tif (1 / (end - start) > maxZoomFactor) {\n\t\t\t\t\t\tend = start + 1 / maxZoomFactor;\n\t\t\t\t\t}\n\t\t\t\t\t//unless end is > 0\n\t\t\t\t\tif (end > 1 && end - start < 1 / maxZoomFactor) {\n\t\t\t\t\t\t//end = 1;\n\t\t\t\t\t\tstart = end - 1 / maxZoomFactor;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// most likely we are dragging right, so we modify left\n\t\t\t\telse {\n\t\t\t\t\tif (maxZoomCount > 0) {\n\t\t\t\t\t\t// add to the end\n\t\t\t\t\t\tif (1 / (end - start) < minZoomFactor) {\n\t\t\t\t\t\t\tstart = end - 1 / minZoomFactor;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// remove from start\n\t\t\t\t\tif (1 / (end - start) > maxZoomFactor) {\n\t\t\t\t\t\tstart = end - 1 / maxZoomFactor;\n\t\t\t\t\t}\n\t\t\t\t\tif (start < 0 && end - start < 1 / maxZoomFactor) {\n\t\t\t\t\t\t//start = 0;\n\t\t\t\t\t\tend = start + 1 / maxZoomFactor;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (1 / (end - start) > maxZoomFactor) {\n\t\t\t\t\tend = start + 1 / maxZoomFactor;\n\t\t\t\t}\n\n\t\t\t\tif (1 / (end - start) > maxZoomFactor) {\n\t\t\t\t\tstart = end - 1 / maxZoomFactor;\n\t\t\t\t}\n\n\t\t\t\tif (maxZoomCount != null && minZoomCount != null && (start == this.get(\"start\") && end == this.get(\"end\"))) {\n\t\t\t\t\tconst chart = this.chart;\n\t\t\t\t\tif (chart) {\n\t\t\t\t\t\tchart._handleAxisSelection(this, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\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\t\treturn;\n\t\t\t\t}\n\n\n\t\t\t\tif (duration > 0) {\n\t\t\t\t\tlet easing = this.get(\"interpolationEasing\");\n\t\t\t\t\tlet sAnimation, eAnimation;\n\t\t\t\t\tif (this.get(\"start\") != start) {\n\t\t\t\t\t\tsAnimation = this.animate({ key: \"start\", to: start, duration: duration, easing: easing });\n\t\t\t\t\t}\n\t\t\t\t\tif (this.get(\"end\") != end) {\n\t\t\t\t\t\teAnimation = this.animate({ key: \"end\", to: end, duration: duration, easing: easing });\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._sAnimation = sAnimation;\n\t\t\t\t\tthis._eAnimation = eAnimation;\n\n\t\t\t\t\tif (sAnimation) {\n\t\t\t\t\t\treturn sAnimation;\n\t\t\t\t\t}\n\t\t\t\t\telse if (eAnimation) {\n\t\t\t\t\t\treturn eAnimation;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.set(\"start\", start);\n\t\t\t\t\tthis.set(\"end\", end);\n\t\t\t\t\t// otherwise bullets and line out of sync, as series is not redrawn\n\t\t\t\t\tthis._root.events.once(\"frameended\", () => {\n\t\t\t\t\t\tthis._markDirtyKey(\"start\");\n\t\t\t\t\t\tthis._root._markDirty();\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (this._sAnimation) {\n\t\t\t\t\tthis._sAnimation.stop();\n\t\t\t\t}\n\t\t\t\tif (this._eAnimation) {\n\t\t\t\t\tthis._eAnimation.stop();\n\t\t\t\t}\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\tconst chart = this.chart;\n\t\t\tif (chart) {\n\t\t\t\tchart._updateCursor();\n\t\t\t}\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._toggleFHDataItem(dataItem, true);\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._toggleFHDataItem(dataItem, false);\n\t\treturn super.showDataItem(dataItem);\n\t}\n\n\tpublic _toggleFHDataItem(dataItem: DataItem, forceHidden: boolean) {\n\t\tconst fh = \"forceHidden\";\n\t\tconst label = dataItem.get(\"label\");\n\t\tif (label) {\n\t\t\tlabel.set(fh, forceHidden);\n\t\t}\n\t\tconst grid = dataItem.get(\"grid\");\n\t\tif (grid) {\n\t\t\tgrid.set(fh, forceHidden);\n\t\t}\n\t\tconst tick = dataItem.get(\"tick\");\n\t\tif (tick) {\n\t\t\ttick.set(fh, forceHidden);\n\t\t}\n\t\tconst axisFill = dataItem.get(\"axisFill\");\n\t\tif (axisFill) {\n\t\t\taxisFill.set(fh, forceHidden);\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.set(fh, forceHidden);\n\t\t\t}\n\t\t}\n\t}\n\n\n\tpublic _toggleDataItem(dataItem: DataItem, visible: boolean) {\n\t\tconst label = dataItem.get(\"label\");\n\t\tconst v = \"visible\";\n\t\tif (label) {\n\t\t\tlabel.setPrivate(v, visible);\n\t\t}\n\t\tconst grid = dataItem.get(\"grid\");\n\t\tif (grid) {\n\t\t\tgrid.setPrivate(v, visible);\n\t\t}\n\t\tconst tick = dataItem.get(\"tick\");\n\t\tif (tick) {\n\t\t\ttick.setPrivate(v, visible);\n\t\t}\n\t\tconst axisFill = dataItem.get(\"axisFill\");\n\t\tif (axisFill) {\n\t\t\taxisFill.setPrivate(v, 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(v, 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, minor?: boolean) {\n\t\tconst renderer = this.get(\"renderer\");\n\t\tlet m = \"minor\";\n\n\t\tconst label = dataItem.get(\"label\");\n\t\tif (!label) {\n\t\t\trenderer.makeLabel(dataItem, tags);\n\t\t}\n\t\telse {\n\t\t\tlet themeTags = label.get(\"themeTags\");\n\t\t\tlet remove = false;\n\t\t\tif (minor) {\n\t\t\t\tif (themeTags?.indexOf(m) == -1) {\n\t\t\t\t\tremove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (themeTags?.indexOf(m) != -1) {\n\t\t\t\t\tremove = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (remove) {\n\t\t\t\tlabel.parent?.children.removeValue(label);\n\t\t\t\trenderer.makeLabel(dataItem, tags);\n\t\t\t\tlabel.dispose();\n\t\t\t\trenderer.labels.removeValue(label);\n\t\t\t}\n\t\t}\n\n\t\tconst grid = dataItem.get(\"grid\");\n\n\t\tif (!grid) {\n\t\t\trenderer.makeGrid(dataItem, tags);\n\t\t}\n\t\telse {\n\t\t\tlet themeTags = grid.get(\"themeTags\");\n\t\t\tlet remove = false;\n\t\t\tif (minor) {\n\t\t\t\tif (themeTags?.indexOf(m) == -1) {\n\t\t\t\t\tremove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (themeTags?.indexOf(m) != -1) {\n\t\t\t\t\tremove = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (remove) {\n\t\t\t\tgrid.parent?.children.removeValue(grid);\n\t\t\t\trenderer.makeGrid(dataItem, tags);\n\t\t\t\tgrid.dispose();\n\t\t\t\trenderer.grid.removeValue(grid);\n\t\t\t}\n\t\t}\n\n\t\tconst tick = dataItem.get(\"tick\");\n\t\tif (!tick) {\n\t\t\trenderer.makeTick(dataItem, tags);\n\t\t}\n\t\telse {\n\t\t\tlet remove = false;\n\t\t\tlet themeTags = tick.get(\"themeTags\");\n\t\t\tif (minor) {\n\t\t\t\tif (themeTags?.indexOf(m) == -1) {\n\t\t\t\t\tremove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (themeTags?.indexOf(m) != -1) {\n\t\t\t\t\tremove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (remove) {\n\t\t\t\ttick.parent?.children.removeValue(tick);\n\t\t\t\trenderer.makeTick(dataItem, tags);\n\t\t\t\ttick.dispose();\n\t\t\t\trenderer.ticks.removeValue(tick);\n\t\t\t}\n\t\t}\n\n\t\tif (!minor && !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\tthis.setPrivate(\"cellWidth\", this.getCellWidthPosition() * this.get(\"renderer\").axisLength());\n\t\tconst ghostLabel = this.ghostLabel;\n\t\tif (!ghostLabel.isHidden()) {\n\t\t\tconst bounds = ghostLabel.localBounds();\n\t\t\tconst gWidth = Math.ceil(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 = Math.ceil(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 * @param adjustPosition Adjust position\n\t * @return Tooltip text\n\t */\n\tpublic abstract getTooltipText(position: number, adjustPosition?: boolean): 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 * Converts relative position of the axis to a global position taking current\n\t * zoom into account (opposite to what `toAxisPosition` does).\n\t *\n\t * @since 5.4.2\n\t * @param position Position\n\t * @return Global position\n\t */\n\tpublic toGlobalPosition(position: number): number {\n\t\treturn this.get(\"renderer\").toGlobalPosition(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 relative position between two grid lines of the axis.\n\t *\n\t * @return Position\n\t */\n\tpublic getCellWidthPosition(): number {\n\t\treturn 0.05;\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\";\nimport * as $object from \"../../../core/util/Object\";\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\tpublic dispose() {\n\t\tconst axis = this.axis;\n\t\tif (axis) {\n\t\t\t$object.each(axis._bullets, (key, bullet) => {\n\t\t\t\tif (bullet.uid == this.uid) {\n\t\t\t\t\tdelete axis._bullets[key];\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tsuper.dispose();\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, ISpritePointerEvent } 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\";\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 * Re-enable display of skipped grid lines due to lack of space and as per\n\t * the `minGridDistance` setting. Not recommended for CategoryAxis with a lot of data items. \n\t *\n\t * @default false\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Minor_grid} for more info\n\t * @since 5.6.0\n\t */\n\tminorGridEnabled?: boolean;\n\n\t/**\n\t * Enable labels on minor grid. If you enable labels, grid will be enabled automatically.\n\t *\n\t * @default false\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Enabling_minor_grid_labels} for more info\n\t * @since 5.6.0\n\t */\n\tminorLabelsEnabled?: boolean;\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);\n\t\t\t}));\n\n\t\t\tthis._disposers.push(thumb.events.on(\"globalpointerup\", (event) => {\n\t\t\t\tthis._handleThumbUp(event);\n\t\t\t}));\n\n\t\t\tthis._disposers.push(thumb.events.on(\"globalpointermove\", (event) => {\n\t\t\t\tthis._handleThumbMove(event);\n\t\t\t}));\n\t\t}\n\t}\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\t\tif (this.isDirty(\"minGridDistance\")) {\n\t\t\tthis.root.events.once(\"frameended\", () => {\n\t\t\t\tthis.axis.markDirtySize();\n\t\t\t})\n\t\t}\n\t}\n\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: ISpritePointerEvent) {\n\t\tthis._thumbDownPoint = this.toLocal(event.point);\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: ISpritePointerEvent) {\n\t\tthis._thumbDownPoint = undefined;\n\t}\n\n\tprotected _handleThumbMove(event: ISpritePointerEvent) {\n\t\tconst downPoint = this._thumbDownPoint;\n\t\tif (downPoint) {\n\t\t\tconst point = this.toLocal(event.point);\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.zoom(downStart - extra, downEnd + extra, 0);\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\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 = 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 toGlobalPosition(position: number): number {\n\t\tconst start = this._start || 0;\n\t\tconst end = this._end || 1;\n\n\t\tif (!this.get(\"inversed\")) {\n\t\t\tposition = position - start;\n\t\t}\n\t\telse {\n\t\t\tposition = end - position;\n\t\t}\n\n\t\tposition = position / (end - start);\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\t/**\n\t * @ignore\n\t */\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\t\taxis.ghostLabel.set(\"x\", -1000);\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\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\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 toGlobalPosition(position: number): number {\n\t\tconst start = this._start || 0;\n\t\tconst end = this._end || 1;\n\n\t\tif (!this.get(\"inversed\")) {\n\t\t\tposition = position - start;\n\t\t}\n\t\telse {\n\t\t\tposition = end - position;\n\t\t}\n\n\t\tposition = position / (end - start) * this._lc\n\n\t\tposition += this._ls;\n\n\t\treturn position;\n\t}\n\n\t/**\n\t * @ignore\n\t */\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\t/**\n\t * @ignore\n\t */\n\tpublic _updatePositions() {\n\t\tconst axis = this.axis;\n\t\tconst x = axis.x() - $utils.relativeToValue(axis.get(\"centerX\", 0), axis.width()) - axis.parent!.get(\"paddingLeft\", 0);\n\t\taxis.gridContainer.set(\"x\", x);\n\t\taxis.topGridContainer.set(\"x\", x);\n\t\taxis.bulletsContainer.set(\"y\", this.y());\n\n\t\tconst chart = axis.chart;\n\t\tif (chart) {\n\t\t\tconst plotContainer = chart.plotContainer;\n\t\t\tconst axisHeader = axis.axisHeader;\n\t\t\tlet width = axis.get(\"marginLeft\", 0);\n\n\t\t\tlet x = axis.x() - width;\n\n\t\t\tconst parent = axis.parent;\n\t\t\tif (parent) {\n\t\t\t\tx -= parent.get(\"paddingLeft\", 0);\n\t\t\t}\n\n\t\t\tif (axisHeader.children.length > 0) {\n\t\t\t\twidth = axis.axisHeader.width();\n\t\t\t\taxis.set(\"marginLeft\", width + 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\taxisHeader.set(\"width\", width);\n\t\t\t}\n\t\t\taxisHeader.setAll({ x: x, y: -1, height: plotContainer.height() + 2 });\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic processAxis() {\n\t\tsuper.processAxis();\n\t\tconst axis = this.axis;\n\t\tif (axis.get(\"width\") == null) {\n\t\t\taxis.set(\"width\", p100);\n\t\t};\n\t\tconst verticalLayout = this._root.verticalLayout;\n\t\taxis.set(\"layout\", verticalLayout);\n\t\taxis.labelsContainer.set(\"width\", p100);\n\t\taxis.axisHeader.setAll({ layout: verticalLayout });\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic axisLength(): number {\n\t\treturn this.axis.width();\n\t}\n\n\t/**\n\t * Converts axis relative position to actual coordinate in pixels.\n\t *\n\t * @param position Position\n\t * @return Point\n\t */\n\tpublic positionToPoint(position: number): IPoint {\n\t\treturn { x: this.positionToCoordinate(position), y: 0 };\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTick(tick?: AxisTick, position?: number, endPosition?: number, count?: number) {\n\t\tif (tick) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = 0.5;\n\t\t\tif ($type.isNumber(count) && count > 1) {\n\t\t\t\tlocation = tick.get(\"multiLocation\", location)\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlocation = tick.get(\"location\", location)\n\t\t\t}\n\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\ttick.set(\"x\", this.positionToCoordinate(position));\n\n\t\t\tlet length = tick.get(\"length\", 0);\n\t\t\tconst inside = tick.get(\"inside\", this.get(\"inside\", false));\n\n\t\t\tif (this.get(\"opposite\")) {\n\t\t\t\ttick.set(\"y\", p100);\n\t\t\t\tif (!inside) {\n\t\t\t\t\tlength *= -1\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttick.set(\"y\", 0);\n\t\t\t\tif (inside) {\n\t\t\t\t\tlength *= -1\n\t\t\t\t}\n\t\t\t}\n\t\t\ttick.set(\"draw\", (display) => {\n\t\t\t\tdisplay.moveTo(0, 0);\n\t\t\t\tdisplay.lineTo(0, length);\n\t\t\t})\n\n\t\t\tthis.toggleVisibility(tick, position, tick.get(\"minPosition\", 0), tick.get(\"maxPosition\", 1));\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLabel(label?: AxisLabel, position?: number, endPosition?: number, count?: number) {\n\t\tif (label) {\n\t\t\tlet location = 0.5;\n\t\t\tif ($type.isNumber(count) && count > 1) {\n\t\t\t\tlocation = label.get(\"multiLocation\", location)\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlocation = label.get(\"location\", location)\n\t\t\t}\n\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tconst inside = label.get(\"inside\", this.get(\"inside\", false));\n\n\t\t\tconst opposite = this.get(\"opposite\");\n\t\t\tif (opposite) {\n\t\t\t\tif (!inside) {\n\t\t\t\t\tlabel.set(\"position\", \"relative\");\n\t\t\t\t\tlabel.set(\"y\", p100);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlabel.set(\"position\", \"absolute\");\n\t\t\t\t\tlabel.set(\"y\", 0)\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!inside) {\n\t\t\t\t\tlabel.set(\"y\", undefined);\n\t\t\t\t\tlabel.set(\"position\", \"relative\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlabel.set(\"y\", 0)\n\t\t\t\t\tlabel.set(\"position\", \"absolute\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tlabel.set(\"x\", this.positionToCoordinate(position));\n\t\t\tthis.toggleVisibility(label, position, label.get(\"minPosition\", 0), label.get(\"maxPosition\", 1));\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateGrid(grid?: Grid, position?: number, endPosition?: number) {\n\t\tif (grid) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = grid.get(\"location\", 0.5);\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tgrid.set(\"x\", this.positionToCoordinate(position));\n\n\t\t\tthis.toggleVisibility(grid, position, 0, 1);\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateBullet(bullet?: AxisBullet, position?: number, endPosition?: number) {\n\t\tif (bullet) {\n\n\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\tif (sprite) {\n\t\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\t\tposition = 0;\n\t\t\t\t}\n\n\t\t\t\tlet location = bullet.get(\"location\", 0.5);\n\n\t\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t\t}\n\n\t\t\t\tlet bulletPosition = this.axis.roundAxisPosition(position, location);\n\t\t\t\tlet previousBullet = this.axis._bullets[bulletPosition];\n\t\t\t\tlet d = -1;\n\t\t\t\tif (this.get(\"opposite\")) {\n\t\t\t\t\td = 1;\n\t\t\t\t}\n\n\t\t\t\tif (bullet.get(\"stacked\")) {\n\t\t\t\t\tif (previousBullet) {\n\t\t\t\t\t\tlet previousSprite = previousBullet.get(\"sprite\");\n\t\t\t\t\t\tif (previousSprite) {\n\t\t\t\t\t\t\tsprite.set(\"y\", previousSprite.y() + previousSprite.height() * d);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tsprite.set(\"y\", 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.axis._bullets[bulletPosition] = bullet;\n\t\t\t\tsprite.set(\"x\", this.positionToCoordinate(position));\n\t\t\t\tthis.toggleVisibility(sprite, position, 0, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateFill(fill?: Graphics, position?: number, endPosition?: number) {\n\t\tif (fill) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\t\t\tif (!$type.isNumber(endPosition)) {\n\t\t\t\tendPosition = 1;\n\t\t\t}\n\n\t\t\tlet x0 = this.positionToCoordinate(position);\n\t\t\tlet x1 = this.positionToCoordinate(endPosition);\n\n\t\t\tthis.fillDrawMethod(fill, x0, x1);\n\t\t}\n\t}\n\n\tprotected fillDrawMethod(fill: Graphics, x0: number, x1: number) {\n\t\tfill.set(\"draw\", (display) => {\n\t\t\t//display.drawRect(x0, 0, x1 - x0, this.axis!.gridContainer.height());\n\t\t\t// using for holes, so can not be rectangle\n\t\t\tconst h = this.axis!.gridContainer.height();\n\t\t\tconst w = this.width();\n\n\t\t\tif (x1 < x0) {\n\t\t\t\t[x1, x0] = [x0, x1];\n\t\t\t}\n\t\t\tif (x0 > w || x1 < 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/*\n\t\t\tconst limit = 10000;\n\n\t\t\tx0 = Math.max(-limit, x0);\n\t\t\tx1 = Math.min(limit, x1);\n\t\t\t*/\n\n\t\t\tdisplay.moveTo(x0, 0);\n\t\t\tdisplay.lineTo(x1, 0);\n\t\t\tdisplay.lineTo(x1, h);\n\t\t\tdisplay.lineTo(x0, h);\n\t\t\tdisplay.lineTo(x0, 0);\n\t\t})\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic positionTooltip(tooltip: Tooltip, position: number) {\n\t\tthis._positionTooltip(tooltip, { x: this.positionToCoordinate(position), y: 0 })\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTooltipBounds(tooltip: Tooltip) {\n\t\tconst inside = this.get(\"inside\");\n\t\tconst num = 100000;\n\n\t\tlet global = this._display.toGlobal({ x: 0, y: 0 });\n\t\tlet x = global.x;\n\t\tlet y = 0;\n\t\tlet w = this.axisLength();\n\t\tlet h = num;\n\n\t\tlet pointerOrientation: \"up\" | \"down\" = \"up\";\n\n\t\tif (this.get(\"opposite\")) {\n\t\t\tif (inside) {\n\t\t\t\tpointerOrientation = \"up\";\n\t\t\t\ty = global.y;\n\t\t\t\th = num;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpointerOrientation = \"down\";\n\t\t\t\ty = global.y - num;\n\t\t\t\th = num;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (inside) {\n\t\t\t\tpointerOrientation = \"down\";\n\t\t\t\ty = global.y - num;\n\t\t\t\th = num;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpointerOrientation = \"up\";\n\t\t\t\ty = global.y;\n\t\t\t\th = num;\n\t\t\t}\n\t\t}\n\n\t\tconst bounds = { left: x, right: x + w, top: y, bottom: y + h };\n\t\tconst oldBounds = tooltip.get(\"bounds\");\n\n\t\tif (!$utils.sameBounds(bounds, oldBounds)) {\n\t\t\ttooltip.set(\"bounds\", bounds);\n\t\t\ttooltip.set(\"pointerOrientation\", pointerOrientation);\n\t\t}\n\t}\n}\n","import { AxisRenderer, IAxisRendererSettings, IAxisRendererPrivate } from \"./AxisRenderer\";\nimport { p100 } from \"../../../core/util/Percent\";\nimport type { IPoint } from \"../../../core/util/IPoint\";\nimport * as $type from \"../../../core/util/Type\";\nimport * as $utils from \"../../../core/util/Utils\";\nimport type { Graphics } from \"../../../core/render/Graphics\";\nimport type { AxisLabel } from \"./AxisLabel\";\nimport type { AxisBullet } from \"./AxisBullet\";\nimport type { Grid } from \"./Grid\";\nimport type { AxisTick } from \"./AxisTick\";\nimport type { Tooltip } from \"../../../core/render/Tooltip\";\nimport type { Template } from \"../../../core/util/Template\";\nimport { Rectangle } from \"../../../core/render/Rectangle\";\n\nexport interface IAxisRendererYSettings extends IAxisRendererSettings {\n\n\t/**\n\t * If set to `true` the axis will be drawn on the opposite side of the plot\n\t * area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Axis_position} for more info\n\t * @default false\n\t */\n\topposite?: boolean;\n\n\t/**\n\t * If set to `true`, all axis elements (ticks, labels) will be drawn inside\n\t * plot area.\n\t *\n\t * @default false\n\t */\n\tinside?: boolean;\n}\n\nexport interface IAxisRendererYPrivate extends IAxisRendererPrivate {\n}\n\n/**\n * Used to render vertical axis.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/#Axis_renderer} for more info\n * @important\n */\nexport class AxisRendererY extends AxisRenderer {\n\n\tpublic static className: string = \"AxisRendererY\";\n\tpublic static classNames: Array = AxisRenderer.classNames.concat([AxisRendererY.className]);\n\n\tdeclare public _settings: IAxisRendererYSettings;\n\tdeclare public _privateSettings: IAxisRendererYPrivate;\n\n\tdeclare public readonly labelTemplate: Template;\n\n\tprotected _downY?: number;\n\n\tpublic thumb: Rectangle = Rectangle.new(this._root, { height: p100, isMeasured: false, themeTags: [\"axis\", \"y\", \"thumb\"] });\n\n\tpublic _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"renderer\", \"y\"]);\n\t\tif (this._settings.opposite) {\n\t\t\tthis._settings.themeTags.push(\"opposite\");\n\t\t}\n\n\t\tsuper._afterNew();\n\t\tthis.setPrivateRaw(\"letter\", \"Y\");\n\n\t\tconst gridTemplate = this.grid.template;\n\t\tgridTemplate.set(\"width\", p100);\n\t\tgridTemplate.set(\"height\", 0);\n\t\tgridTemplate.set(\"draw\", (display, graphics) => {\n\t\t\tdisplay.moveTo(0, 0);\n\t\t\tdisplay.lineTo(graphics.width(), 0);\n\t\t});\n\n\t\tthis.set(\"draw\", (display, renderer) => {\n\t\t\tdisplay.moveTo(0, 0);\n\t\t\tdisplay.lineTo(0, renderer.height());\n\t\t});\n\t}\n\n\tprotected _getPan(point1: IPoint, point2: IPoint): number {\n\t\treturn (point1.y - point2.y) / this.height();\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tconst axis = this.axis;\n\t\taxis.ghostLabel.setPrivate(\"visible\", !this.get(\"inside\"));\n\t\taxis.ghostLabel.set(\"y\", -1000);\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\tconst 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\tconst y = axis.y() - $utils.relativeToValue(axis.get(\"centerY\", 0), axis.height());\n\t\taxis.gridContainer.set(\"y\", y);\n\t\taxis.topGridContainer.set(\"y\", y);\n\t\taxis.bulletsContainer.set(\"x\", this.x());\n\n\t\tconst chart = axis.chart;\n\t\tif (chart) {\n\t\t\tconst plotContainer = chart.plotContainer;\n\t\t\tconst axisHeader = axis.axisHeader;\n\t\t\tlet height = axis.get(\"marginTop\", 0);\n\n\t\t\tif (axisHeader.children.length > 0) {\n\t\t\t\theight = axis.axisHeader.height();\n\t\t\t\taxis.set(\"marginTop\", height + 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\taxisHeader.set(\"height\", height);\n\t\t\t}\n\t\t\taxisHeader.setAll({ y: axis.y() - height, x: -1, width: plotContainer.width() + 2 });\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic axisLength(): number {\n\t\treturn this.axis.innerHeight();\n\t}\n\n\t/**\n\t * Converts axis relative position to actual coordinate in pixels.\n\t *\n\t * @param position Position\n\t * @return Point\n\t */\n\tpublic positionToPoint(position: number): IPoint {\n\t\treturn { x: 0, y: this.positionToCoordinate(position) };\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLabel(label?: AxisLabel, position?: number, endPosition?: number, count?: number) {\n\t\tif (label) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = 0.5;\n\t\t\tif ($type.isNumber(count) && count > 1) {\n\t\t\t\tlocation = label.get(\"multiLocation\", location)\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlocation = label.get(\"location\", location)\n\t\t\t}\n\n\t\t\tconst opposite = this.get(\"opposite\");\n\t\t\tconst inside = label.get(\"inside\", this.get(\"inside\", false));\n\n\t\t\tif (opposite) {\n\t\t\t\tlabel.set(\"x\", 0);\n\n\t\t\t\tif (inside) {\n\t\t\t\t\tlabel.set(\"position\", \"absolute\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlabel.set(\"position\", \"relative\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (inside) {\n\t\t\t\t\tlabel.set(\"x\", 0);\n\t\t\t\t\tlabel.set(\"position\", \"absolute\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlabel.set(\"x\", undefined);\n\t\t\t\t\tlabel.set(\"position\", \"relative\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tlabel.set(\"y\", this.positionToCoordinate(position));\n\t\t\tthis.toggleVisibility(label, position, label.get(\"minPosition\", 0), label.get(\"maxPosition\", 1));\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateGrid(grid?: Grid, position?: number, endPosition?: number) {\n\t\tif (grid) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = grid.get(\"location\", 0.5);\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\tgrid.set(\"y\", this.positionToCoordinate(position));\n\t\t\tthis.toggleVisibility(grid, position, 0, 1);\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTick(tick?: AxisTick, position?: number, endPosition?: number, count?: number) {\n\t\tif (tick) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\n\t\t\tlet location = 0.5;\n\t\t\tif ($type.isNumber(count) && count > 1) {\n\t\t\t\tlocation = tick.get(\"multiLocation\", location);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlocation = tick.get(\"location\", location);\n\t\t\t}\n\n\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t}\n\n\t\t\ttick.set(\"y\", this.positionToCoordinate(position));\n\n\t\t\tlet length = tick.get(\"length\", 0);\n\t\t\tconst inside = tick.get(\"inside\", this.get(\"inside\", false));\n\n\t\t\tif (this.get(\"opposite\")) {\n\t\t\t\ttick.set(\"x\", 0);\n\t\t\t\tif (inside) {\n\t\t\t\t\tlength *= -1\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!inside) {\n\t\t\t\t\tlength *= -1\n\t\t\t\t}\n\t\t\t}\n\t\t\ttick.set(\"draw\", (display) => {\n\t\t\t\tdisplay.moveTo(0, 0);\n\t\t\t\tdisplay.lineTo(length, 0);\n\t\t\t})\n\n\t\t\tthis.toggleVisibility(tick, position, tick.get(\"minPosition\", 0), tick.get(\"maxPosition\", 1));\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateBullet(bullet?: AxisBullet, position?: number, endPosition?: number) {\n\t\tif (bullet) {\n\n\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\tif (sprite) {\n\n\t\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\t\tposition = 0;\n\t\t\t\t}\n\n\t\t\t\tlet location = bullet.get(\"location\", 0.5);\n\t\t\t\tif ($type.isNumber(endPosition) && endPosition != position) {\n\t\t\t\t\tposition = position + (endPosition - position) * location;\n\t\t\t\t}\n\n\n\t\t\t\tlet bulletPosition = this.axis.roundAxisPosition(position, location);\n\t\t\t\tlet previousBullet = this.axis._bullets[bulletPosition];\n\t\t\t\tlet d = 1;\n\t\t\t\tif (this.get(\"opposite\")) {\n\t\t\t\t\td = -1;\n\t\t\t\t}\n\n\t\t\t\tif (bullet.get(\"stacked\")) {\n\t\t\t\t\tif (previousBullet) {\n\t\t\t\t\t\tlet previousSprite = previousBullet.get(\"sprite\");\n\t\t\t\t\t\tif (previousSprite) {\n\t\t\t\t\t\t\tsprite.set(\"x\", previousSprite.x() + previousSprite.width() * d);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tsprite.set(\"x\", 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.axis._bullets[bulletPosition] = bullet;\n\n\n\t\t\t\tsprite.set(\"y\", this.positionToCoordinate(position));\n\n\t\t\t\tthis.toggleVisibility(sprite, position, 0, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateFill(fill?: Graphics, position?: number, endPosition?: number) {\n\t\tif (fill) {\n\t\t\tif (!$type.isNumber(position)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\t\t\tif (!$type.isNumber(endPosition)) {\n\t\t\t\tendPosition = 1;\n\t\t\t}\n\n\t\t\tlet y0 = this.positionToCoordinate(position);\n\t\t\tlet y1 = this.positionToCoordinate(endPosition);\n\n\t\t\tthis.fillDrawMethod(fill, y0, y1);\n\t\t}\n\t}\n\n\tprotected fillDrawMethod(fill: Graphics, y0: number, y1: number) {\n\t\tfill.set(\"draw\", (display) => {\n\t\t\t// using for holes, so can not be rectangle\n\t\t\tconst w = this.axis!.gridContainer.width();\n\t\t\tconst h = this.height();\n\n\t\t\tif (y1 < y0) {\n\t\t\t\t[y1, y0] = [y0, y1];\n\t\t\t}\n\n\t\t\tif (y0 > h || y1 < 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//y0 = Math.max(0, y0);\n\t\t\t//y1 = Math.min(h, y1);\n\n\t\t\tdisplay.moveTo(0, y0);\n\t\t\tdisplay.lineTo(w, y0);\n\t\t\tdisplay.lineTo(w, y1);\n\t\t\tdisplay.lineTo(0, y1);\n\t\t\tdisplay.lineTo(0, y0);\n\t\t})\n\t}\n\n\t/**\n\t * Converts relative position (0-1) on axis to a pixel coordinate.\n\t *\n\t * @param position Position (0-1)\n\t * @return Coordinate (px)\n\t */\n\tpublic positionToCoordinate(position: number): number {\n\t\tif (!this._inversed) {\n\t\t\treturn (this._end - position) * this._axisLength;\n\t\t}\n\t\telse {\n\t\t\treturn (position - this._start) * this._axisLength;\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic positionTooltip(tooltip: Tooltip, position: number) {\n\t\tthis._positionTooltip(tooltip, { x: 0, y: this.positionToCoordinate(position) });\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTooltipBounds(tooltip: Tooltip) {\n\t\tconst inside = this.get(\"inside\");\n\t\tconst num = 100000;\n\n\t\tlet global = this._display.toGlobal({ x: 0, y: 0 });\n\t\tlet y = global.y;\n\t\tlet x = 0;\n\t\tlet h = this.axisLength();\n\t\tlet w = num;\n\n\t\tlet pointerOrientation: \"left\" | \"right\" = \"right\";\n\n\t\tif (this.get(\"opposite\")) {\n\t\t\tif (inside) {\n\t\t\t\tpointerOrientation = \"right\";\n\t\t\t\tx = global.x - num;\n\t\t\t\tw = num;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpointerOrientation = \"left\";\n\t\t\t\tx = global.x;\n\t\t\t\tw = num;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (inside) {\n\t\t\t\tpointerOrientation = \"left\";\n\t\t\t\tx = global.x;\n\t\t\t\tw = num;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpointerOrientation = \"right\";\n\t\t\t\tx = global.x - num;\n\t\t\t\tw = num;\n\t\t\t}\n\t\t}\n\n\t\tconst bounds = { left: x, right: x + w, top: y, bottom: y + h };\n\t\tconst oldBounds = tooltip.get(\"bounds\");\n\n\t\tif (!$utils.sameBounds(bounds, oldBounds)) {\n\t\t\ttooltip.set(\"bounds\", bounds);\n\t\t\ttooltip.set(\"pointerOrientation\", pointerOrientation);\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\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 toGlobalPosition(position: number): number {\n\t\tconst start = this._start || 0;\n\t\tconst end = this._end || 1;\n\n\t\tif (this.get(\"inversed\")) {\n\t\t\tposition = position - start;\n\t\t}\n\t\telse {\n\t\t\tposition = end - position;\n\t\t}\n\n\t\tposition = position / (end - start) * this._lc\n\n\t\tposition += this._ls;\n\n\t\treturn position;\n\t}\n\n\n\t/**\n\t * @ignore\n\t */\n\tpublic fixPosition(position: number) {\n\t\tif (!this.get(\"inversed\")) {\n\t\t\treturn 1 - position;\n\t\t}\n\t\treturn position;\n\t}\n\n}\n","import type { IPoint } from \"../../../core/util/IPoint\";\n\nimport { Tick, ITickSettings, ITickPrivate } from \"../../../core/render/Tick\";\n\n\nexport interface IAxisTickSettings extends ITickSettings {\n\n\t/**\n\t * Relative location of the tick within the cell.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Location_of_axis_elements} for more info\n\t */\n\tlocation?: number;\n\n\t/**\n\t * Relative location of the tick within the cell when it spans multiple\n\t * intervals.\n\t *\n\t * `0` - beginning, `0.5` - middle, `1` - end.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Multi_location} for more info\n\t */\n\tmultiLocation?: number;\n\n\t/**\n\t * If set to `true` the tick will be shown inside plot area.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Labels_ticks_inside_plot_area} for more info\n\t * @default false\n\t */\n\tinside?: boolean | undefined;\n\n\t/**\n\t * The minimum relative position within visible axis scope the tick can\n\t * appear on.\n\t *\n\t * E.g. `0.1` will mean that tick will not be shown if it's closer to the\n\t * beginning of the axis than 10%.\n\t *\n\t * @default 0\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Start_end_labels_and_ticks} for more info\n\t */\n\tminPosition?: number;\n\n\t/**\n\t * The maximum relative position within visible axis scope the tick can\n\t * appear on.\n\t *\n\t * E.g. `0.9` will mean that tick will not be shown if it's closer to the\n\t * end of the axis than 10%.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Start_end_labels_and_ticks} for more info\n\t * @default 1\n\t */\n\tmaxPosition?: number;\n\n}\n\nexport interface IAxisTickPrivate extends ITickPrivate {\n}\n\n/**\n * Draws an axis tick.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Ticks} for more info\n * @important\n */\nexport class AxisTick extends Tick {\n\n\tdeclare public _settings: IAxisTickSettings;\n\tdeclare public _privateSettings: IAxisTickPrivate;\n\n\tprotected _tickPoints: Array = [];\n\n\tpublic static className: string = \"AxisTick\";\n\tpublic static classNames: Array = Tick.classNames.concat([AxisTick.className]);\n}\n","import { DataItem } from \"../../../core/render/Component\";\nimport type { AxisRenderer } from \"./AxisRenderer\";\nimport type { XYSeries, IXYSeriesDataItem } from \"../series/XYSeries\";\nimport { ValueAxis, IValueAxisSettings, IValueAxisPrivate, IValueAxisDataItem, IMinMaxStep, IValueAxisEvents } from \"./ValueAxis\";\nimport * as $type from \"../../../core/util/Type\";\nimport * as $order from \"../../../core/util/Order\";\nimport * as $array from \"../../../core/util/Array\";\nimport * as $object from \"../../../core/util/Object\";\nimport * as $utils from \"../../../core/util/Utils\";\nimport * as $time from \"../../../core/util/Time\";\nimport type { ITimeInterval } from \"../../../core/util/Time\";\nimport type { TimeUnit } from \"../../../core/util/Time\";\n\nexport interface IDateAxisSettings extends IValueAxisSettings {\n\n\t/**\n\t * Indicates granularity of data.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Data_granularity} for more info\n\t */\n\tbaseInterval: ITimeInterval;\n\n\t/**\n\t * Relative location of where axis cell starts: 0 - beginning, 1 - end.\n\t *\n\t * IMPORTANT: `startLocation` is not supported by [[GaplessDateAxis]].\n\t *\n\t * @default 0\n\t */\n\tstartLocation?: number;\n\n\t/**\n\t * Relative location of where axis cell ends: 0 - beginning, 1 - end.\n\t *\n\t * IMPORTANT: `endLocation` is not supported by [[GaplessDateAxis]].\n\t * \n\t * @default 1\n\t */\n\tendLocation?: number;\n\n\t/**\n\t * Should axis group data items togeter dynamically?\n\t *\n\t * @default false\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Dynamic_data_item_grouping} for more info\n\t */\n\tgroupData?: boolean;\n\n\t/**\n\t * Maximum number of data items in the view before data grouping kicks in.\n\t *\n\t * @default 500\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Dynamic_data_item_grouping} for more info\n\t */\n\tgroupCount?: number;\n\n\t/**\n\t * Force data item grouping to specific interval. This interval must be within groupIntervals array for this to work.\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 minor grid labels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Minor_grid_formats} for more info\n\t * @since 5.6.0\n\t */\n\tminorDateFormats?: { [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 `-1` to `1`.\n\t *\n\t * If not set, it will use `tooltipLocation` value, if `tooltipLocation`` is\n\t * not set, it will use -0.5.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/#Axis_tooltip} for more info\n\t * @since 5.1.4\n\t */\n\ttooltipIntervalOffset?: number;\n}\n\nexport interface IDateAxisDataItem extends IValueAxisDataItem {\n}\n\nexport interface IDateAxisPrivate extends IValueAxisPrivate {\n\n\t/**\n\t * Current group interval.\n\t */\n\tgroupInterval?: ITimeInterval;\n\n\t/**\n\t * Current base interval.\n\t */\n\tbaseInterval: ITimeInterval;\n\n\t/**\n\t * Current grid interval.\n\t */\n\tgridInterval: ITimeInterval;\n}\n\nexport interface IDateAxisEvents extends IValueAxisEvents {\n\n\t/**\n\t * Kicks in when data grouping is on, and current group interval changes, e.g. via zooming the chart.\n\t *\n\t * @since 5.2.43\n\t */\n\tgroupintervalchanged: {}\n\n}\n\n/**\n * Creates a date axis.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/date-axis/} for more info\n * @important\n */\nexport class DateAxis extends ValueAxis {\n\tpublic static className: string = \"DateAxis\";\n\tpublic static classNames: Array = ValueAxis.classNames.concat([DateAxis.className]);\n\n\tdeclare public _settings: IDateAxisSettings;\n\tdeclare public _privateSettings: IDateAxisPrivate;\n\tdeclare public _dataItemSettings: IDateAxisDataItem;\n\tdeclare public _events: IDateAxisEvents;\n\n\tprotected _dataGrouped: boolean = false;\n\tprotected _seriesDataGrouped: boolean = false;\n\tprotected _groupingCalculated: boolean = false;\n\tprotected _intervalDuration: number = 1;\n\tprotected _baseDuration: number = 1;\n\n\tprotected _intervalMax: { [index: string]: number } = {};\n\tprotected _intervalMin: { [index: string]: number } = {};\n\n\tpublic _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"axis\"]);\n\t\tsuper._afterNew();\n\t\tthis._setBaseInterval(this.get(\"baseInterval\"));\n\t\tthis.on(\"baseInterval\", () => {\n\t\t\tthis._setBaseInterval(this.get(\"baseInterval\"));\n\t\t})\n\t}\n\n\tprotected _setBaseInterval(interval: ITimeInterval) {\n\t\tthis.setPrivateRaw(\"baseInterval\", interval);\n\t\tthis._baseDuration = $time.getIntervalDuration(interval);\n\t}\n\n\tprotected _fixZoomFactor() {\n\t\tconst maxZoomFactor = this.get(\"maxZoomFactor\");\n\t\tif (maxZoomFactor != null && maxZoomFactor != Infinity) {\n\t\t\tthis.setPrivateRaw(\"maxZoomFactor\", maxZoomFactor);\n\t\t}\n\t\telse {\n\t\t\tthis.setPrivateRaw(\"maxZoomFactor\", Math.round((this.getPrivate(\"max\", 0) - this.getPrivate(\"min\", 0)) / this.baseMainDuration()));\n\t\t}\n\t}\n\n\tprotected _groupData() {\n\t\tconst min = this.getPrivate(\"min\");\n\t\tconst max = this.getPrivate(\"max\");\n\n\t\tif (($type.isNumber(min) && $type.isNumber(max))) {\n\n\t\t\tthis._fixZoomFactor();\n\n\t\t\tconst groupInterval = this.getPrivate(\"groupInterval\")!;\n\t\t\tif (groupInterval) {\n\t\t\t\tthis._setBaseInterval(groupInterval);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._setBaseInterval(this.get(\"baseInterval\"));\n\t\t\t}\n\n\n\t\t\tif (this.isDirty(\"groupInterval\")) {\n\t\t\t\tlet groupInterval = this.get(\"groupInterval\")!;\n\t\t\t\tif (groupInterval) {\n\t\t\t\t\tthis.setRaw(\"groupIntervals\", [groupInterval]);\n\t\t\t\t\tthis._handleRangeChange();\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\tseries.resetGrouping();\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 firstTime: any;\n\t\t\t\tif (firstItem) {\n\t\t\t\t\tfirstTime = 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\t//let roundedTime = $time.round(new Date(time), interval.timeUnit, interval.count, firstDay, utc, firstDate, timezone).getTime();\n\t\t\t\t\tlet roundedTime = $time.roun(time, interval.timeUnit, interval.count, this._root, firstTime);\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 != null) {\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 groupInterval = this.get(\"groupInterval\");\n\t\t\t\tlet current = this.getPrivate(\"groupInterval\");\n\n\t\t\t\tlet modifiedDifference = (selectionMax - selectionMin) + (this.get(\"startLocation\", 0) + (1 - this.get(\"endLocation\", 1)) * this.baseDuration());\n\n\t\t\t\tif (current) {\n\t\t\t\t\tlet duration = $time.getIntervalDuration(current);\n\t\t\t\t\tmodifiedDifference = Math.ceil(modifiedDifference / duration) * duration;\n\t\t\t\t}\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\tif (groupInterval && (!current || (current.timeUnit !== groupInterval.timeUnit || current.count !== groupInterval.count) || this._seriesDataGrouped)) {\n\t\t\t\t\tthis._seriesDataGrouped = false;\n\t\t\t\t\tthis.setPrivateRaw(\"groupInterval\", groupInterval);\n\t\t\t\t\tthis._setBaseInterval(groupInterval)\n\n\n\t\t\t\t\tlet newId = groupInterval.timeUnit + groupInterval.count;\n\t\t\t\t\t$array.each(this.series, (series) => {\n\t\t\t\t\t\tif (series.get(\"baseAxis\") === this) {\n\t\t\t\t\t\t\tseries.setDataSet(newId);\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\n\t\t\t\t\tthis.markDirtyExtremes();\n\n\t\t\t\t\tthis._root.events.once(\"frameended\", () => {\n\t\t\t\t\t\tthis._root.events.once(\"frameended\", () => {\n\t\t\t\t\t\t\tconst type = \"groupintervalchanged\";\n\t\t\t\t\t\t\tif (this.events.isEnabled(type)) {\n\t\t\t\t\t\t\t\tthis.events.dispatch(type, { type: type, target: this });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$array.each(this.series, (series) => {\n\t\t\t\tif (series.get(\"baseAxis\") === this) {\n\t\t\t\t\tlet fieldName = (this.getPrivate(\"name\")! + this.get(\"renderer\").getPrivate(\"letter\")!);\n\n\t\t\t\t\tconst start = $array.getFirstSortedIndex(series.dataItems, (dataItem) => {\n\t\t\t\t\t\treturn $order.compare(dataItem.get(fieldName), selectionMin);\n\t\t\t\t\t});\n\n\t\t\t\t\tlet startIndex = start.index;\n\n\t\t\t\t\tif (startIndex > 0) {\n\t\t\t\t\t\tstartIndex -= 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tselectionMax += this.baseDuration() * (1 - this.get(\"endLocation\", 1));\n\n\t\t\t\t\tconst end = $array.getSortedIndex(series.dataItems, (dataItem) => {\n\t\t\t\t\t\treturn $order.compare(dataItem.get(fieldName), selectionMax);\n\t\t\t\t\t});\n\n\t\t\t\t\tlet endIndex = end.index;\n\t\t\t\t\tlet endIndex2 = endIndex;\n\n\t\t\t\t\tif (endIndex2 > 1) {\n\t\t\t\t\t\tendIndex2--;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst firstDataItem = series.dataItems[startIndex];\n\t\t\t\t\tconst lastDataItem = series.dataItems[endIndex2];\n\n\t\t\t\t\tlet lastDate: number | undefined;\n\t\t\t\t\tlet firstDate: number | undefined;\n\t\t\t\t\tif (firstDataItem) {\n\t\t\t\t\t\tfirstDate = firstDataItem.get(fieldName);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (lastDataItem) {\n\t\t\t\t\t\tlastDate = lastDataItem.get(fieldName);\n\t\t\t\t\t}\n\n\t\t\t\t\tlet outOfSelection = false;\n\t\t\t\t\tif (lastDate != null && firstDate != null) {\n\t\t\t\t\t\tif (lastDate < selectionMin || firstDate > selectionMax) {\n\t\t\t\t\t\t\toutOfSelection = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tseries.setPrivate(\"outOfSelection\", outOfSelection);\n\t\t\t\t\tseries.setPrivate(\"startIndex\", startIndex);\n\t\t\t\t\tseries.setPrivate(\"endIndex\", endIndex);\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _adjustMinMax(min: number, max: number, gridCount: number, _strictMode?: boolean): IMinMaxStep {\n\t\treturn { min: min, max: max, step: (max - min) / gridCount };\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic intervalDuration(): number {\n\t\treturn this._intervalDuration;\n\t}\n\n\tprotected _saveMinMax(min: number, max: number) {\n\t\tlet groupInterval = this.getPrivate(\"groupInterval\");\n\n\t\tif (!groupInterval) {\n\t\t\tgroupInterval = this.get(\"baseInterval\");\n\t\t}\n\n\t\tlet id = groupInterval.timeUnit + groupInterval.count;\n\t\tthis._intervalMin[id] = min;\n\t\tthis._intervalMax[id] = max;\n\t}\n\n\tprotected _getM(timeUnit: TimeUnit) {\n\t\tif (timeUnit == \"month\" || timeUnit == \"year\" || timeUnit == \"day\") {\n\t\t\treturn 1.05;\n\t\t}\n\t\treturn 1.01;\n\t}\n\n\tprotected _getMinorInterval(interval: ITimeInterval): ITimeInterval | undefined {\n\t\tlet minorGridInterval: ITimeInterval | undefined;\n\t\tlet count = interval.count;\n\t\tlet timeUnit = interval.timeUnit;\n\t\tif (count > 1) {\n\t\t\tif (count == 10) {\n\t\t\t\tcount = 5;\n\t\t\t}\n\t\t\telse if (count == 15) {\n\t\t\t\tcount = 5;\n\t\t\t}\n\t\t\telse if (count == 12) {\n\t\t\t\tcount = 2;\n\t\t\t}\n\t\t\telse if (count == 6) {\n\t\t\t\tcount = 1;\n\t\t\t}\n\t\t\telse if (count == 30) {\n\t\t\t\tcount = 10;\n\t\t\t}\n\t\t\telse if (count < 10) {\n\t\t\t\tcount = 1;\n\t\t\t}\n\t\t\tminorGridInterval = { timeUnit: timeUnit, count: count };\n\t\t}\n\t\tif (timeUnit == \"week\") {\n\t\t\tif (this.getPrivate(\"baseInterval\")?.timeUnit != \"week\") {\n\t\t\t\tminorGridInterval = { timeUnit: \"day\", count: 1 };\n\t\t\t}\n\t\t}\n\t\treturn minorGridInterval;\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 root = this._root;\n\t\t\tconst selectionMin = Math.round(this.getPrivate(\"selectionMin\")! as number);\n\t\t\tconst selectionMax = Math.round(this.getPrivate(\"selectionMax\")! as number);\n\t\t\tconst renderer = this.get(\"renderer\");\n\t\t\tconst baseInterval = this.getPrivate(\"baseInterval\");\n\n\t\t\tlet value = selectionMin;\n\t\t\tlet i = 0;\n\n\t\t\tconst intervals = this.get(\"gridIntervals\")!;\n\t\t\tlet gridInterval = $time.chooseInterval(0, selectionMax - selectionMin, renderer.gridCount(), intervals);\n\n\t\t\tif ($time.getIntervalDuration(gridInterval) < this.baseDuration()) {\n\t\t\t\tgridInterval = { ...baseInterval };\n\t\t\t}\n\n\t\t\tconst intervalDuration = $time.getIntervalDuration(gridInterval);\n\t\t\tthis._intervalDuration = intervalDuration;\n\n\t\t\tconst nextGridUnit = $time.getNextUnit(gridInterval.timeUnit);\n\t\t\tconst utc = root.utc;\n\t\t\tconst timezone = root.timezone;\n\n\t\t\t//value = $time.round(new Date(selectionMin - intervalDuration), gridInterval.timeUnit, gridInterval.count, firstDay, utc, new Date(min), timezone).getTime();\n\t\t\tvalue = $time.roun(selectionMin - intervalDuration, gridInterval.timeUnit, gridInterval.count, root, min);\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\tconst minorLabelsEnabled = renderer.get(\"minorLabelsEnabled\");\n\t\t\tconst minorGridEnabled = renderer.get(\"minorGridEnabled\", minorLabelsEnabled);\n\n\t\t\tlet minorGridInterval: ITimeInterval | undefined;\n\t\t\tlet minorDuration = 0;\n\n\t\t\tif (minorGridEnabled) {\n\t\t\t\tminorGridInterval = this._getMinorInterval(gridInterval);\n\t\t\t\tminorDuration = $time.getIntervalDuration(minorGridInterval);\n\t\t\t}\n\n\t\t\tlet m = 0;\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\tthis._toggleDataItem(dataItem, true);\n\n\t\t\t\tdataItem.setRaw(\"value\", value);\n\t\t\t\tdataItem.setRaw(\"labelEndValue\", undefined);\n\n\t\t\t\tlet endValue = value + $time.getDuration(gridInterval.timeUnit, gridInterval.count * this._getM(gridInterval.timeUnit));\n\t\t\t\t//endValue = $time.round(new Date(endValue), gridInterval.timeUnit, 1, firstDay, utc, undefined, timezone).getTime();\n\t\t\t\tendValue = $time.roun(endValue, gridInterval.timeUnit, 1, root);\n\n\t\t\t\tdataItem.setRaw(\"endValue\", endValue);\n\n\t\t\t\tlet date = new Date(value);\n\n\t\t\t\tformat = formats[gridInterval.timeUnit];\n\t\t\t\tif (nextGridUnit && this.get(\"markUnitChange\") && $type.isNumber(previousValue)) {\n\t\t\t\t\tif (gridInterval.timeUnit != \"year\") {\n\t\t\t\t\t\tif ($time.checkChange(value, previousValue, nextGridUnit, utc, timezone)) {\n\t\t\t\t\t\t\tformat = this.get(\"periodChangeDateFormats\")![gridInterval.timeUnit];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst label = dataItem.get(\"label\");\n\t\t\t\tif (label) {\n\t\t\t\t\tlabel.set(\"text\", root.dateFormatter.format(date, format!));\n\t\t\t\t}\n\n\t\t\t\tlet count = gridInterval.count;\n\t\t\t\t// so that labels of week would always be at the beginning of the grid\n\t\t\t\tif (gridInterval.timeUnit == \"week\") {\n\t\t\t\t\tdataItem.setRaw(\"labelEndValue\", value);\n\t\t\t\t}\n\n\t\t\t\tif (minorGridEnabled) {\n\t\t\t\t\tcount = 1;\n\t\t\t\t\tlet timeUnit = gridInterval.timeUnit;\n\t\t\t\t\tif (timeUnit == \"week\") {\n\t\t\t\t\t\ttimeUnit = \"day\";\n\t\t\t\t\t}\n\n\t\t\t\t\tlet labelEndValue = value + $time.getDuration(timeUnit, this._getM(timeUnit));\n\t\t\t\t\t//labelEndValue = $time.round(new Date(labelEndValue), timeUnit, 1, firstDay, utc, undefined, timezone).getTime();\n\t\t\t\t\tlabelEndValue = $time.roun(labelEndValue, timeUnit, 1, root);\n\t\t\t\t\tdataItem.setRaw(\"labelEndValue\", labelEndValue);\n\t\t\t\t}\n\n\t\t\t\tthis._prepareDataItem(dataItem, count);\n\n\t\t\t\tpreviousValue = value;\n\t\t\t\tvalue = endValue;\n\n\t\t\t\t// min grid\n\t\t\t\tif (minorGridInterval) {\n\t\t\t\t\tconst minorTimeUnit = minorGridInterval.timeUnit;\n\t\t\t\t\tconst minorCount = minorGridInterval.count;\n\t\t\t\t\tconst mmm = this._getM(minorTimeUnit);\n\n\t\t\t\t\t//let minorValue = $time.round(new Date(previousValue + minorDuration * this._getM(minorGridInterval.timeUnit)), minorGridInterval.timeUnit, minorGridInterval.count, firstDay, utc, new Date(previousValue), timezone).getTime();\n\t\t\t\t\tlet minorValue = $time.roun(previousValue + minorDuration * mmm, minorTimeUnit, minorCount, root, previousValue);\n\n\t\t\t\t\tlet previousMinorValue: number | undefined;\n\t\t\t\t\tlet minorFormats = this.get(\"minorDateFormats\", this.get(\"dateFormats\"))!;\n\n\t\t\t\t\twhile (minorValue < value - 0.01 * minorDuration) {\n\t\t\t\t\t\tlet minorDataItem: DataItem;\n\t\t\t\t\t\tif (this.minorDataItems.length < m + 1) {\n\t\t\t\t\t\t\tminorDataItem = new DataItem(this, undefined, {});\n\t\t\t\t\t\t\tthis.minorDataItems.push(minorDataItem);\n\t\t\t\t\t\t\tthis.processDataItem(minorDataItem);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tminorDataItem = this.minorDataItems[m];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._createAssets(minorDataItem, [\"minor\"], true);\n\n\t\t\t\t\t\tthis._toggleDataItem(minorDataItem, true);\n\n\t\t\t\t\t\tminorDataItem.setRaw(\"value\", minorValue);\n\n\t\t\t\t\t\tlet minorEndValue = minorValue + $time.getDuration(minorTimeUnit, minorCount * mmm);\n\t\t\t\t\t\t//minorEndValue = $time.round(new Date(minorEndValue), minorGridInterval.timeUnit, 1, firstDay, utc, undefined, timezone).getTime();\n\t\t\t\t\t\tminorEndValue = $time.roun(minorEndValue, minorTimeUnit, 1, root);\n\n\t\t\t\t\t\tminorDataItem.setRaw(\"endValue\", minorEndValue);\n\n\t\t\t\t\t\tlet date = new Date(minorValue);\n\n\t\t\t\t\t\tformat = minorFormats[minorTimeUnit];\n\n\t\t\t\t\t\tconst minorLabel = minorDataItem.get(\"label\");\n\n\t\t\t\t\t\tif (minorLabel) {\n\t\t\t\t\t\t\tif (minorLabelsEnabled) {\n\t\t\t\t\t\t\t\tminorLabel.set(\"text\", root.dateFormatter.format(date, format!));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tminorLabel.setPrivate(\"visible\", false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._prepareDataItem(minorDataItem, 1);\n\n\t\t\t\t\t\tif (minorValue == previousMinorValue) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpreviousMinorValue = minorValue;\n\t\t\t\t\t\tminorValue = minorEndValue;\n\t\t\t\t\t\tm++;\n\t\t\t\t\t}\n\t\t\t\t}\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._toggleDataItem(this.dataItems[j], false);\n\t\t\t}\n\n\t\t\tfor (let j = m; j < this.minorDataItems.length; j++) {\n\t\t\t\tthis._toggleDataItem(this.minorDataItems[j], false);\n\t\t\t}\n\n\t\t\t$array.each(this.series, (series) => {\n\t\t\t\tif (series.inited) {\n\t\t\t\t\tseries._markDirtyAxes();\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tthis._updateGhost();\n\t}\n\n\tprotected _updateFinals(start: number, end: number) {\n\t\tthis.setPrivateRaw(\"selectionMinFinal\", this.positionToValue(start));\n\t\tthis.setPrivateRaw(\"selectionMaxFinal\", this.positionToValue(end));\n\t}\n\n\tprotected _getDelta() {\n\t\tthis._deltaMinMax = this.baseDuration() / 2;\n\t}\n\n\tprotected _fixMin(min: number) {\n\t\tconst baseInterval = this.getPrivate(\"baseInterval\");\n\t\tconst timeUnit = baseInterval.timeUnit;\n\t\t//let startTime = $time.round(new Date(min), timeUnit, baseInterval.count, firstDay, utc, undefined, timezone).getTime();\n\t\tlet startTime = $time.roun(min, timeUnit, baseInterval.count, this._root);\n\n\t\tlet endTime = startTime + $time.getDuration(timeUnit, baseInterval.count * this._getM(timeUnit))\n\t\t//endTime = $time.round(new Date(endTime), timeUnit, 1, firstDay, utc, undefined, timezone).getTime();\n\t\tendTime = $time.roun(endTime, timeUnit, 1, this._root);\n\t\treturn startTime + (endTime - startTime) * this.get(\"startLocation\", 0);\n\t}\n\n\tprotected _fixMax(max: number) {\n\t\tconst baseInterval = this.getPrivate(\"baseInterval\");\n\t\tconst timeUnit = baseInterval.timeUnit;\n\t\t//let startTime = $time.round(new Date(max), timeUnit, baseInterval.count, firstDay, utc, undefined, timezone).getTime();\n\t\tlet startTime = $time.roun(max, timeUnit, baseInterval.count, this._root);\n\t\tlet endTime = startTime + $time.getDuration(timeUnit, baseInterval.count * this._getM(timeUnit))\n\t\t//endTime = $time.round(new Date(endTime), timeUnit, 1, firstDay, utc, undefined, timezone).getTime();\n\t\tendTime = $time.roun(endTime, timeUnit, 1, this._root);\n\n\t\treturn startTime + (endTime - startTime) * this.get(\"endLocation\", 1);\n\t}\n\n\tprotected _updateDates(_date: number, _series: XYSeries) {\n\n\t}\n\n\t/**\n\t * Returns a duration of currently active `baseInterval` in milliseconds.\n\t * \n\t * @return Duration\n\t */\n\tpublic baseDuration(): number {\n\t\treturn this._baseDuration;\n\t\t//return $time.getIntervalDuration(this.getPrivate(\"baseInterval\"));\n\t}\n\n\t/**\n\t * Returns a duration of user-defined `baseInterval` in milliseconds.\n\t *\n\t * @return Duration\n\t */\n\tpublic baseMainDuration(): number {\n\t\treturn $time.getIntervalDuration(this.get(\"baseInterval\"));\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic processSeriesDataItem(dataItem: DataItem, fields: Array) {\n\t\tconst baseInterval = this.getPrivate(\"baseInterval\");\n\n\t\tif (!dataItem.open) {\n\t\t\tdataItem.open = {};\n\t\t}\n\t\tif (!dataItem.close) {\n\t\t\tdataItem.close = {};\n\t\t}\n\n\t\t$array.each(fields, (field) => {\n\t\t\tlet value = dataItem.get(field as any);\n\t\t\tif ($type.isNumber(value)) {\n\t\t\t\tlet startTime = dataItem.open![field];\n\t\t\t\tlet endTime = dataItem.close![field];\n\t\t\t\t// this is done to save cpu, as rounding is quite expensive, especially with timezone set. \n\t\t\t\t// if value is between prev start and end, it means it didn't change, all is fine.\n\t\t\t\tif (value >= startTime && value <= endTime) {\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tconst timeUnit = baseInterval.timeUnit;\n\t\t\t\t\tconst count = baseInterval.count;\n\t\t\t\t\t//startTime = $time.round(new Date(value), timeUnit, count, firstDay, utc, undefined, timezone).getTime();\n\t\t\t\t\tstartTime = $time.roun(value, timeUnit, count, this._root);\n\t\t\t\t\tendTime = startTime + $time.getDuration(timeUnit, count * this._getM(timeUnit));\n\t\t\t\t\t//endTime = $time.round(new Date(endTime), timeUnit, 1, firstDay, utc, undefined, timezone).getTime();\n\t\t\t\t\tendTime = $time.roun(endTime, timeUnit, 1, this._root);\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, dataItem.component as XYSeries);\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemPositionX(dataItem: DataItem, field: string, cellLocation: number, axisLocation: number): number {\n\n\t\tlet openValue;\n\t\tlet closeValue;\n\n\t\tif (dataItem.open && dataItem.close) {\n\t\t\topenValue = dataItem.open[field];\n\t\t\tcloseValue = dataItem.close[field];\n\t\t}\n\t\telse {\n\t\t\topenValue = dataItem.get(field as any)\n\t\t\tcloseValue = openValue;\n\t\t}\n\n\t\tlet value = openValue + (closeValue - openValue) * cellLocation;\n\n\t\tvalue = this._baseValue + (value - this._baseValue) * axisLocation;\n\n\t\treturn this.valueToPosition(value);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemCoordinateX(dataItem: DataItem, field: string, cellLocation: number, axisLocation: number): number {\n\t\treturn this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(dataItem, field, cellLocation, axisLocation));\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemPositionY(dataItem: DataItem, field: string, cellLocation: number, axisLocation: number): number {\n\t\tlet openValue;\n\t\tlet closeValue;\n\n\t\tif (dataItem.open && dataItem.close) {\n\t\t\topenValue = dataItem.open[field];\n\t\t\tcloseValue = dataItem.close[field];\n\t\t}\n\t\telse {\n\t\t\topenValue = dataItem.get(field as any)\n\t\t\tcloseValue = openValue;\n\t\t}\n\n\t\tlet value = openValue + (closeValue - openValue) * cellLocation;\n\n\t\tvalue = this._baseValue + (value - this._baseValue) * axisLocation;\n\t\treturn this.valueToPosition(value);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemCoordinateY(dataItem: DataItem, field: string, cellLocation: number, axisLocation: number): number {\n\t\treturn this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(dataItem, field, cellLocation, axisLocation));\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic roundAxisPosition(position: number, location: number): number {\n\t\tlet value = this.positionToValue(position);\n\t\tvalue = value - (location - 0.5) * this.baseDuration();\n\n\t\tlet baseInterval = this.getPrivate(\"baseInterval\");\n\t\tif (!$type.isNaN(value)) {\n\t\t\tconst firstDay = this._root.locale.firstDayOfWeek;\n\t\t\tconst timeUnit = baseInterval.timeUnit;\n\t\t\tconst utc = this._root.utc;\n\t\t\tconst timezone = this._root.timezone;\n\t\t\tconst count = baseInterval.count;\n\n\t\t\t//value = $time.round(new Date(value), timeUnit, count, firstDay, utc, new Date(this.getPrivate(\"min\", 0)), timezone).getTime();\n\t\t\tvalue = $time.roun(value, timeUnit, count, this._root, this.getPrivate(\"min\", 0));\n\n\t\t\tlet duration = $time.getDateIntervalDuration(baseInterval, new Date(value), firstDay, utc, timezone);\n\t\t\tif (timezone) {\n\t\t\t\t//value = $time.round(new Date(value + this.baseDuration() * 0.05), timeUnit, count, firstDay, utc, new Date(this.getPrivate(\"min\", 0)), timezone).getTime();\n\t\t\t\tvalue = $time.roun(value + this.baseDuration() * 0.05, timeUnit, count, this._root, this.getPrivate(\"min\", 0));\n\t\t\t\tduration = $time.getDateIntervalDuration(baseInterval, new Date(value + duration * location), firstDay, utc, timezone);\n\t\t\t}\n\n\t\t\treturn this.valueToPosition(value + duration * location);\n\t\t}\n\t\treturn NaN;\n\t}\n\n\t/**\n\t * Returns text to be used in an axis tooltip for specific relative position.\n\t *\n\t * NOTE: Unless `adjustPosition` (2nd parameter) is set to `false`, the method\n\t * will adjust position by `tooltipIntervalOffset`.\n\t *\n\t * @param position Position\n\t * @param adjustPosition Adjust position\n\t * @return Tooltip text\n\t */\n\tpublic getTooltipText(position: number, adjustPosition?: boolean): 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\tif ($type.isNumber(value)) {\n\t\t\t\tlet date = new Date(value);\n\n\t\t\t\tlet baseInterval = this.getPrivate(\"baseInterval\");\n\t\t\t\tlet duration = $time.getDateIntervalDuration(baseInterval, date, this._root.locale.firstDayOfWeek, this._root.utc, this._root.timezone);\n\n\t\t\t\tif (adjustPosition !== false) {\n\t\t\t\t\tdate = new Date(value + this.get(\"tooltipIntervalOffset\", -this.get(\"tooltipLocation\", 0.5)) * duration)\n\t\t\t\t}\n\n\t\t\t\treturn this._root.dateFormatter.format(date, this.get(\"tooltipDateFormat\", format));\n\t\t\t}\n\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, snap?: boolean): 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\tlet 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 (snap || series.get(\"snapTooltip\")) {\n\t\t\tlet first = series.dataItems[result.index - 1];\n\t\t\tlet second = series.dataItems[result.index];\n\n\t\t\tif (first && second) {\n\t\t\t\tif (first.open && second.close) {\n\t\t\t\t\tlet open = first.open[fieldName];\n\t\t\t\t\tlet close = second.close[fieldName];\n\n\t\t\t\t\tif (Math.abs(value - open) > Math.abs(value - close)) {\n\t\t\t\t\t\treturn second;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (first) {\n\t\t\t\treturn first;\n\t\t\t}\n\n\t\t\tif (second) {\n\t\t\t\treturn second;\n\t\t\t}\n\t\t}\n\t\telse {\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 relative position between two grid lines of the axis.\n\t *\n\t * @since 5.2.30\n\t * @return Position\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._intervalDuration / (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\nimport type { XYSeries } from \"../../xy/series/XYSeries\";\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\nimport * as $math from \"../../../core/util/Math\";\r\nimport type { ITimeInterval } from \"../../../core/util/Time\";\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\tprotected _m: number = 0;\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\tpublic _dates: Array = [];\r\n\tpublic _customDates?: Array;\r\n\r\n\r\n\tpublic _getDates(): Array {\r\n\t\tif (this._customDates) {\r\n\t\t\treturn this._customDates;\r\n\t\t}\r\n\t\treturn this._dates;\r\n\t}\r\n\r\n\tprotected _updateDates(date: number, series: XYSeries) {\r\n\t\tif (!series.get(\"ignoreMinMax\")) {\r\n\t\t\tconst dates = this._getDates();\r\n\t\t\tconst result = $array.getSortedIndex(dates, (x) => $order.compare(x, date));\r\n\t\t\tif (!result.found) {\r\n\t\t\t\t$array.insertIndex(dates, result.index, date);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tpublic _updateAllDates() {\r\n\t\tif (!this._customDates) {\r\n\t\t\tconst dates = this._dates;\r\n\t\t\tdates.length = 0;\r\n\r\n\t\t\t$array.each(this.series, (series) => {\r\n\t\t\t\tlet field = \"valueX\";\r\n\t\t\t\tif (series.get(\"yAxis\") == this) {\r\n\t\t\t\t\tfield = \"valueY\"\r\n\t\t\t\t}\r\n\t\t\t\t$array.each(series.dataItems, (dataItem) => {\r\n\t\t\t\t\tlet value = dataItem.get(field as any);\r\n\t\t\t\t\tif ($type.isNumber(value)) {\r\n\t\t\t\t\t\tif (dataItem.open) {\r\n\t\t\t\t\t\t\tthis._updateDates(dataItem.open![field], series);\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\r\n\t\t\tconst extraMax = this.get(\"extraMax\", 0);\r\n\t\t\tconst extraMin = this.get(\"extraMin\", 0);\r\n\r\n\t\t\tlet len = dates.length;\r\n\r\n\t\t\tconst baseInterval = this.getPrivate(\"baseInterval\");\r\n\t\t\tconst baseCount = baseInterval.count;\r\n\t\t\tconst timeUnit = baseInterval.timeUnit;\r\n\r\n\t\t\tif (extraMax > 0) {\r\n\t\t\t\tconst extra = len * extraMax;\r\n\t\t\t\tlet time = dates[len - 1];\r\n\t\t\t\tif ($type.isNumber(time)) {\r\n\t\t\t\t\tfor (let i = len - 1; i < len + extra; i++) {\r\n\t\t\t\t\t\ttime += $time.getDuration(timeUnit, baseCount * this._getM(timeUnit));\r\n\t\t\t\t\t\t//time = $time.round(new Date(time), timeUnit, baseInterval.count, firstDay, utc, undefined, timezone).getTime();\r\n\t\t\t\t\t\ttime = $time.roun(time, timeUnit, baseCount, this._root);\r\n\t\t\t\t\t\tdates.push(time);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (extraMin > 0) {\r\n\t\t\t\tconst extra = len * extraMin;\r\n\t\t\t\tlet time = dates[0];\r\n\t\t\t\tif ($type.isNumber(time)) {\r\n\t\t\t\t\tfor (let i = 0; i < extra; i++) {\r\n\t\t\t\t\t\ttime -= $time.getDuration(timeUnit, baseCount);\r\n\t\t\t\t\t\t//time = $time.round(new Date(time), timeUnit, baseCount, firstDay, utc, undefined, timezone).getTime();\r\n\t\t\t\t\t\ttime = $time.roun(time, timeUnit, baseCount, this._root);\r\n\t\t\t\t\t\tdates.unshift(time);\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._getDates();\r\n\t\tconst startLocation = this.get(\"startLocation\", 0);\r\n\t\tconst endLocation = this.get(\"endLocation\", 1);\r\n\t\tconst len = dates.length - startLocation - (1 - endLocation);\r\n\t\tconst result = $array.getSortedIndex(dates, (x) => $order.compare(x, value));\r\n\t\tlet index = result.index;\r\n\r\n\t\tif (result.found) {\r\n\t\t\treturn (index - startLocation) / len;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (index > 0) {\r\n\t\t\t\tindex -= 1;\r\n\t\t\t}\r\n\r\n\t\t\tlet itemValue = dates[index];\r\n\r\n\t\t\tlet d = 0;\r\n\t\t\tif (itemValue > value && value > this.getPrivate(\"min\", 0)) {\r\n\t\t\t\td = itemValue - value;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\td = value - itemValue;\r\n\t\t\t}\r\n\r\n\t\t\treturn (index - startLocation) / len + d / this.baseDuration() / len;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Converts numeric value from axis scale to index.\r\n\t * \r\n\t * @param value Value\r\n\t * @return Index\r\n\t */\r\n\tpublic valueToIndex(value: number): number {\r\n\t\tconst dates = this._getDates();\r\n\r\n\t\tconst result = $array.getSortedIndex(dates, (x) => $order.compare(x, value));\r\n\t\tlet index = result.index;\r\n\r\n\t\tif (result.found) {\r\n\t\t\treturn index;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (index > 0) {\r\n\t\t\t\tindex -= 1;\r\n\t\t\t}\r\n\t\t\treturn index;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Converts a relative position to a corresponding numeric value from axis\r\n\t * scale.\r\n\t *\r\n\t * @param position Relative position\r\n\t * @return Value\r\n\t */\r\n\tpublic positionToValue(position: number): number {\r\n\t\tconst startLocation = this.get(\"startLocation\", 0);\r\n\t\tconst endLocation = this.get(\"endLocation\", 1);\r\n\t\tconst dates = this._getDates();\r\n\t\tlet len = Math.round(dates.length - startLocation - (1 - endLocation));\r\n\t\tlet index = position * len;\r\n\t\tlet findex = Math.floor(index);\r\n\t\tif (findex < 0) {\r\n\t\t\tfindex = 0;\r\n\t\t}\r\n\r\n\t\tif (findex > len - 1) {\r\n\t\t\tfindex = len - 1\r\n\t\t}\r\n\r\n\t\treturn dates[findex] + (index - findex + startLocation) * this.baseDuration();\r\n\t}\r\n\r\n\tprotected _fixZoomFactor() {\r\n\t\tthis.setPrivateRaw(\"maxZoomFactor\", this._getDates().length - this.get(\"startLocation\", 0) - (1 - this.get(\"endLocation\", 1)));\r\n\t}\r\n\r\n\t/**\r\n\t * Zooms the axis to specific `start` and `end` dates.\r\n\t *\r\n\t * Optional `duration` specifies duration of zoom animation in milliseconds.\r\n\t *\r\n\t * @param start Start Date\r\n\t * @param end End Date\r\n\t * @param duration Duration in milliseconds\r\n\t */\r\n\r\n\tpublic zoomToDates(start: Date, end: Date, duration?: number) {\r\n\t\tconst dates = this._getDates();\r\n\t\tconst len = dates.length;\r\n\t\tlet result = $array.getSortedIndex(dates, (x) => $order.compare(x, start.getTime()));\r\n\t\t\r\n\t\tlet startValue = dates[Math.min(result.index, len - 1)];\r\n\r\n\t\tresult = $array.getSortedIndex(dates, (x) => $order.compare(x, end.getTime()));\r\n\t\tlet endValue = dates[result.index];\r\n\r\n\t\tif(result.index >= len){\r\n\t\t\tendValue = dates[len - 1] + this.baseDuration();\r\n\t\t}\r\n\r\n\t\tthis.zoomToValues(startValue, endValue, duration);\r\n\t}\r\n\r\n\t/**\r\n\t * Zooms the axis to specific `start` and `end` values.\r\n\t *\r\n\t * Optional `duration` specifies duration of zoom animation in milliseconds.\r\n\t *\r\n\t * @param start Start value\r\n\t * @param end End value\r\n\t * @param duration Duration in milliseconds\r\n\t */\r\n\tpublic zoomToValues(start: number, end: number, duration?: number) {\r\n\t\tconst min = this.getPrivate(\"min\", 0);\r\n\t\tconst max = this.getPrivate(\"max\", 0);\r\n\t\tstart = $math.fitToRange(start, min, max);\r\n\t\tend = $math.fitToRange(end, min, max);\r\n\t\tthis.zoom(this.valueToPosition(start), this.valueToPosition(end), duration);\r\n\t}\r\n\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 root = this._root;\r\n\t\t\tconst utc = root.utc;\r\n\t\t\tconst timezone = root.timezone;\r\n\t\t\tconst dates = this._getDates();\r\n\t\t\tconst renderer = this.get(\"renderer\");\r\n\t\t\tconst len = dates.length;\r\n\t\t\tconst baseDuration = this.baseDuration();\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\t$array.each(this.dataItems, (dataItem) => {\r\n\t\t\t\tthis._toggleDataItem(dataItem, false);\r\n\t\t\t})\r\n\r\n\t\t\t$array.each(this.minorDataItems, (dataItem) => {\r\n\t\t\t\tthis._toggleDataItem(dataItem, false);\r\n\t\t\t})\r\n\r\n\t\t\tlet realDuration = (endTime - startTime) - ((endTime - startTime) / baseDuration - (endIndex - startIndex)) * 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 < 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\t\t\tthis._intervalDuration = intervalDuration;\r\n\r\n\t\t\tconst timeUnit = gridInterval.timeUnit;\r\n\t\t\tconst formats = this.get(\"dateFormats\")!;\r\n\r\n\t\t\tlet firstTime = Date.now();\r\n\r\n\t\t\tif (dates[0]) {\r\n\t\t\t\tfirstTime = dates[0];\r\n\t\t\t}\r\n\r\n\t\t\t//let value = $time.round(new Date(this.getPrivate(\"selectionMin\", 0)), timeUnit, gridInterval.count, firstDay, utc, firstDate, timezone).getTime();\r\n\t\t\tlet value = $time.roun(this.getPrivate(\"selectionMin\", 0), timeUnit, gridInterval.count, root, firstTime);\r\n\r\n\t\t\tconst minorLabelsEnabled = renderer.get(\"minorLabelsEnabled\");\r\n\t\t\tconst minorGridEnabled = renderer.get(\"minorGridEnabled\", minorLabelsEnabled);\r\n\r\n\t\t\tlet minorGridInterval: ITimeInterval | undefined;\r\n\t\t\tlet minorDuration = 0;\r\n\t\t\tlet previousDataItem: DataItem | undefined;\r\n\r\n\t\t\tif (minorGridEnabled) {\r\n\t\t\t\tminorGridInterval = this._getMinorInterval(gridInterval);\r\n\t\t\t\tminorDuration = $time.getIntervalDuration(minorGridInterval);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tlet selectedItems: Array = this._getIndexes(value, this.getPrivate(\"selectionMax\", value) + intervalDuration, gridInterval, this.getPrivate(\"min\", value));\r\n\t\t\tif (selectedItems.length > 0) {\r\n\t\t\t\tlet i = 0;\r\n\t\t\t\tthis._m = 0;\r\n\t\t\t\tlet previousValue = value - intervalDuration * 10;\r\n\t\t\t\tconst nextGridUnit = $time.getNextUnit(timeUnit);\r\n\r\n\t\t\t\t// MINOR GRID\r\n\t\t\t\tif (minorGridInterval) {\r\n\t\t\t\t\tlet first = dates[selectedItems[0]];\r\n\t\t\t\t\tthis._addMinorGrid(first - intervalDuration, first, minorDuration, minorGridInterval);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet minDistance = renderer.axisLength() / renderer.gridCount() * 0.5;\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\t\t\t\t\tdataItem.setRaw(\"labelEndValue\", undefined);\r\n\r\n\t\t\t\t\tlet format = formats[timeUnit];\r\n\t\t\t\t\tif (nextGridUnit && this.get(\"markUnitChange\") && $type.isNumber(previousValue)) {\r\n\t\t\t\t\t\tif (timeUnit != \"year\") {\r\n\t\t\t\t\t\t\tif ($time.checkChange(value, previousValue, nextGridUnit, utc, timezone)) {\r\n\t\t\t\t\t\t\t\tformat = this.get(\"periodChangeDateFormats\")![timeUnit];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._createAssets(dataItem, []);\r\n\r\n\t\t\t\t\tconst label = dataItem.get(\"label\");\r\n\t\t\t\t\tif (label) {\r\n\t\t\t\t\t\tlabel.set(\"text\", root.dateFormatter.format(date, format!));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._toggleDataItem(dataItem, true);\r\n\r\n\t\t\t\t\tlet count = gridInterval.count;\r\n\r\n\t\t\t\t\t// so that labels of week would always be at the beginning of the grid\r\n\t\t\t\t\tif (timeUnit == \"week\") {\r\n\t\t\t\t\t\tdataItem.setRaw(\"labelEndValue\", value);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (minorGridEnabled) {\r\n\t\t\t\t\t\tlet timeUnit2 = gridInterval.timeUnit;\r\n\t\t\t\t\t\tif (timeUnit2 == \"week\") {\r\n\t\t\t\t\t\t\ttimeUnit2 = \"day\";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (count > 1 || gridInterval.timeUnit == \"week\") {\r\n\t\t\t\t\t\t\t//let labelEndValue = $time.round(new Date(value), timeUnit2, 1, firstDay, utc, undefined, timezone).getTime() + $time.getDuration(timeUnit2, this._getM(timeUnit2));\r\n\t\t\t\t\t\t\tlet labelEndValue = $time.roun(value, timeUnit2, 1, root) + $time.getDuration(timeUnit2, this._getM(timeUnit2));\r\n\t\t\t\t\t\t\tlet index = this.valueToIndex(labelEndValue)\r\n\t\t\t\t\t\t\tlabelEndValue = dates[index];\r\n\t\t\t\t\t\t\tif (labelEndValue == value) {\r\n\t\t\t\t\t\t\t\tlet next = dates[index + 1];\r\n\t\t\t\t\t\t\t\tif (next) {\r\n\t\t\t\t\t\t\t\t\tlabelEndValue = next;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\tlabelEndValue += minorDuration;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tdataItem.setRaw(\"labelEndValue\", labelEndValue);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount = 1;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._prepareDataItem(dataItem, count);\r\n\r\n\t\t\t\t\tif (label && previousDataItem) {\r\n\t\t\t\t\t\tif (renderer.getPrivate(\"letter\") == \"X\") {\r\n\t\t\t\t\t\t\tlet previousLabel = previousDataItem.get(\"label\");\r\n\t\t\t\t\t\t\tif (previousLabel) {\r\n\t\t\t\t\t\t\t\tlet x = label.x();\r\n\t\t\t\t\t\t\t\tlet previousX = previousLabel.x();\r\n\r\n\t\t\t\t\t\t\t\tif (x - previousX < minDistance) {\r\n\t\t\t\t\t\t\t\t\tlet worse = this._pickWorse(previousDataItem, dataItem, gridInterval)\r\n\t\t\t\t\t\t\t\t\tif (worse) {\r\n\t\t\t\t\t\t\t\t\t\tworse.get(\"label\")?.setPrivate(\"visible\", false);\r\n\t\t\t\t\t\t\t\t\t}\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\t// todo y?\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// MINOR GRID\r\n\t\t\t\t\tif (minorGridInterval) {\r\n\t\t\t\t\t\tthis._addMinorGrid(value, endValue, minorDuration, minorGridInterval);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ti++;\r\n\r\n\t\t\t\t\tif (label && label.getPrivate(\"visible\")) {\r\n\t\t\t\t\t\tpreviousDataItem = dataItem;\r\n\t\t\t\t\t}\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\r\n\tprotected _pickWorse(dataItemA: DataItem, dataItemB: DataItem, interval: ITimeInterval): DataItem {\r\n\t\tconst timeUnit = interval.timeUnit;\r\n\r\n\t\tconst valueA = dataItemA.get(\"value\", 0);\r\n\t\tconst valueB = dataItemB.get(\"value\", 0);\r\n\r\n\t\tif (timeUnit == \"hour\") {\r\n\t\t\tif (new Date(valueA).getDate() != new Date(valueB).getDate()) {\r\n\t\t\t\treturn dataItemA;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn dataItemB;\r\n\t}\r\n\r\n\tprotected _addMinorGrid(startValue: number, endValue: number, minorDuration: number, gridInterval: ITimeInterval) {\r\n\t\tconst minorFormats = this.get(\"minorDateFormats\", this.get(\"dateFormats\"))!;\r\n\t\tconst mTimeUnit = gridInterval.timeUnit;\r\n\t\tlet value = startValue + $time.getDuration(mTimeUnit, this._getM(mTimeUnit));\r\n\t\t//value = $time.round(new Date(value), mTimeUnit, 1, firstDay, utc, undefined, timezone).getTime();\r\n\t\tvalue = $time.roun(value, mTimeUnit, 1, this._root);\r\n\r\n\t\tlet maxValue = endValue - minorDuration * 0.5;\r\n\r\n\t\tlet minorSelectedItems: Array = this._getIndexes(value, maxValue, gridInterval, value);\r\n\t\tconst dates = this._getDates();\r\n\r\n\t\t$array.each(minorSelectedItems, (index) => {\r\n\t\t\tlet minorDataItem: DataItem;\r\n\t\t\tif (this.minorDataItems.length < this._m + 1) {\r\n\t\t\t\tminorDataItem = new DataItem(this, undefined, {});\r\n\t\t\t\tthis.minorDataItems.push(minorDataItem);\r\n\t\t\t\tthis.processDataItem(minorDataItem);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tminorDataItem = this.minorDataItems[this._m];\r\n\t\t\t}\r\n\r\n\t\t\tvalue = dates[index];\r\n\t\t\tminorDataItem.setRaw(\"value\", value);\r\n\t\t\tminorDataItem.setRaw(\"endValue\", value + minorDuration);\r\n\t\t\tminorDataItem.setRaw(\"index\", index);\r\n\r\n\t\t\tthis._createAssets(minorDataItem, [\"minor\"], true);\r\n\r\n\t\t\tconst label = minorDataItem.get(\"label\");\r\n\t\t\tif (label) {\r\n\t\t\t\tif (this.get(\"renderer\").get(\"minorLabelsEnabled\")) {\r\n\t\t\t\t\tlet date = new Date(value);\r\n\t\t\t\t\tlet format = minorFormats[mTimeUnit];\r\n\t\t\t\t\tlabel.set(\"text\", this._root.dateFormatter.format(date, format!));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tlabel.setPrivate(\"visible\", false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis._toggleDataItem(minorDataItem, true);\r\n\t\t\tthis._prepareDataItem(minorDataItem, 1);\r\n\t\t\tthis._m++;\r\n\t\t})\r\n\t}\r\n\r\n\r\n\tprotected _getIndexes(value: number, maxValue: number, interval: ITimeInterval, firstValue: number): Array {\r\n\t\tconst items: Array = [];\r\n\t\tconst timeUnit = interval.timeUnit;\r\n\t\tconst count = interval.count;\r\n\t\tconst mmm = this._getM(timeUnit);\r\n\r\n\t\tconst baseInterval = this.getPrivate(\"baseInterval\");\r\n\r\n\t\tconst root = this._root;\r\n\t\tconst dates = this._getDates();\r\n\r\n\t\tlet c = count - 1;\r\n\t\tlet previousValue = -Infinity;\r\n\r\n\t\tlet duration = $time.getDuration(timeUnit, mmm);\r\n\t\tlet fullDuration = $time.getDuration(timeUnit, count * mmm);\r\n\t\tlet originalValue = value;\r\n\r\n\t\tif (timeUnit == \"day\") {\r\n\t\t\tvalue = firstValue;\r\n\t\t}\r\n\r\n\t\twhile (value <= maxValue) {\r\n\t\t\t//value = $time.round(new Date(value), timeUnit, count, firstDay, utc, undefined, timezone).getTime();\r\n\t\t\tvalue = $time.roun(value, timeUnit, count, root);\r\n\r\n\t\t\tlet index = this.valueToIndex(value);\r\n\t\t\tlet realValue = dates[index];\r\n\r\n\t\t\tif (timeUnit == \"day\" && baseInterval.timeUnit == \"day\") {\r\n\t\t\t\tif (this._hasDate(value)) {\r\n\t\t\t\t\tc++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (c == count) {\r\n\t\t\t\t\tif (value >= originalValue - fullDuration * 2) {\r\n\t\t\t\t\t\t$array.move(items, index);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tc = 0;\r\n\t\t\t\t}\r\n\t\t\t\tvalue += duration;\r\n\t\t\t\t//value = $time.round(new Date(value), timeUnit, 1, firstDay, utc, undefined, timezone).getTime();\r\n\t\t\t\tvalue = $time.roun(value, timeUnit, 1, root);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (realValue < value) {\r\n\t\t\t\t\tfor (let i = index, len = dates.length; i < len; i++) {\r\n\t\t\t\t\t\trealValue = 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\t$array.move(items, index);\r\n\r\n\t\t\t\tvalue += fullDuration;\r\n\t\t\t\t//value = $time.round(new Date(value), timeUnit, count, firstDay, utc, undefined, timezone).getTime();\r\n\t\t\t\tvalue = $time.roun(value, timeUnit, count, root);\r\n\t\t\t}\r\n\r\n\t\t\tif (value == previousValue) {\r\n\t\t\t\tvalue += fullDuration + duration;\r\n\t\t\t\t//value = $time.round(new Date(value), timeUnit, count, firstDay, utc, undefined, timezone).getTime();\r\n\t\t\t\tvalue = $time.roun(value, timeUnit, count, root);\r\n\t\t\t}\r\n\t\t\tif (value == previousValue) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tpreviousValue = value;\r\n\t\t}\r\n\r\n\t\treturn items;\r\n\t}\r\n\r\n\tprotected _hasDate(time: number) {\r\n\t\tconst result = $array.getSortedIndex(this._getDates(), (date) => {\r\n\t\t\treturn $order.compareNumber(date, time);\r\n\t\t});\r\n\r\n\t\treturn result.found;\r\n\t}\r\n\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 tooltip 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 * @ignore\n\t */\n\tlabelEndValue?: 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\tlet someDirty = false;\n\t\tif (this.isDirty(\"min\") || this.isDirty(\"max\") || this.isDirty(\"maxPrecision\") || this.isDirty(\"numberFormat\")) {\n\t\t\tsomeDirty = true;\n\t\t\tthis.ghostLabel.set(\"text\", \"\");\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 || someDirty || this.isPrivateDirty(\"width\") || this.isPrivateDirty(\"height\") || this.isDirty(\"extraMin\") || this.isDirty(\"extraMax\") || this.isDirty(\"logarithmic\") || this.isDirty(\"treatZeroAs\") || this.isDirty(\"baseValue\") || this.isDirty(\"strictMinMax\") || this.isDirty(\"strictMinMaxSelection\")) {\n\t\t\tthis._getMinMax();\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 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\t/// minor grid\n\t\t\tconst renderer = this.get(\"renderer\");\n\t\t\tconst minorLabelsEnabled = renderer.get(\"minorLabelsEnabled\");\n\t\t\tconst minorGridEnabled = renderer.get(\"minorGridEnabled\", minorLabelsEnabled);\n\n\t\t\tlet stepPower = Math.pow(10, Math.floor(Math.log(Math.abs(step)) * Math.LOG10E));\n\n\t\t\tconst stepAdjusted = Math.round(step / stepPower);\n\n\t\t\tlet minorGridCount = 2;\n\n\t\t\tif ($math.round(stepAdjusted / 5, 10) % 1 == 0) {\n\t\t\t\tminorGridCount = 5;\n\t\t\t}\n\n\t\t\tif ($math.round(stepAdjusted / 10, 10) % 1 == 0) {\n\t\t\t\tminorGridCount = 10;\n\t\t\t}\n\n\t\t\tlet minorStep = step / minorGridCount;\n\n\t\t\t// end of minor grid\n\t\t\tlet i = 0;\n\t\t\tlet m = 0;\n\t\t\tlet previous = -Infinity;\n\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\t\t\t\tthis._toggleDataItem(dataItem, true);\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\tlet nextValue = value;\n\t\t\t\tif (!logarithmic) {\n\t\t\t\t\tnextValue += 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\tnextValue = 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\tnextValue += step;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// minor grid\n\t\t\t\tif (minorGridEnabled) {\n\t\t\t\t\tlet minorValue = value + minorStep;\n\n\t\t\t\t\tif (logarithmic) {\n\t\t\t\t\t\tif (differencePower > 2) {\n\t\t\t\t\t\t\tlet minorMinMaxStep = this._adjustMinMax(value, nextValue, 10);\n\t\t\t\t\t\t\tminorStep = minorMinMaxStep.step;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tminorValue = value + minorStep;\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (minorValue < nextValue - step * 0.00000000001) {\n\t\t\t\t\t\tlet minorDataItem: DataItem;\n\t\t\t\t\t\tif (this.minorDataItems.length < m + 1) {\n\t\t\t\t\t\t\tminorDataItem = new DataItem(this, undefined, {});\n\t\t\t\t\t\t\tthis.minorDataItems.push(minorDataItem);\n\t\t\t\t\t\t\tthis.processDataItem(minorDataItem);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tminorDataItem = this.minorDataItems[m];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._createAssets(minorDataItem, [\"minor\"], true);\n\t\t\t\t\t\tthis._toggleDataItem(minorDataItem, true);\n\t\t\t\t\t\tminorDataItem.setRaw(\"value\", minorValue);\n\n\t\t\t\t\t\tconst minorLabel = minorDataItem.get(\"label\");\n\t\t\t\t\t\tif (minorLabel) {\n\t\t\t\t\t\t\tif (minorLabelsEnabled) {\n\t\t\t\t\t\t\t\tminorLabel.set(\"text\", this._formatText(minorValue));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tminorLabel.setPrivate(\"visible\", false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._prepareDataItem(minorDataItem);\n\t\t\t\t\t\tminorValue += minorStep;\n\t\t\t\t\t\tm++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvalue = nextValue;\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._toggleDataItem(this.dataItems[j], false);\n\t\t\t}\n\n\t\t\tfor (let j = m; j < this.minorDataItems.length; j++) {\n\t\t\t\tthis._toggleDataItem(this.minorDataItems[j], false);\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\tlet labelEndPosition = endPosition;\t\t\n\n\t\tlet labelEndValue = dataItem.get(\"labelEndValue\");\n\t\tif (labelEndValue != null) {\n\t\t\tlabelEndPosition = this.valueToPosition(labelEndValue);\n\t\t}\t\t\n\n\t\trenderer.updateLabel(dataItem.get(\"label\"), position, labelEndPosition, 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, labelEndPosition, count);\n\t\trenderer.updateFill(dataItem.get(\"axisFill\"), position, fillEndPosition);\n\n\t\tthis._processBullet(dataItem);\n\t\trenderer.updateBullet(dataItem.get(\"bullet\"), position, endPosition);\n\n\t\tif (!dataItem.get(\"isRange\")) {\n\t\t\tconst fillRule = this.get(\"fillRule\");\n\t\t\tif (fillRule) {\n\t\t\t\tfillRule(dataItem)\n\t\t\t}\n\t\t}\n\t}\n\n\n\tprotected _handleRangeChange() {\n\t\tlet selectionMin: number = this.positionToValue(this.get(\"start\", 0));\n\t\tlet selectionMax: number = this.positionToValue(this.get(\"end\", 1));\n\n\t\tconst gridCount = this.get(\"renderer\").gridCount();\n\t\tlet minMaxStep: IMinMaxStep = this._adjustMinMax(selectionMin, selectionMax, gridCount, true);\n\n\t\tlet stepDecimalPlaces = $utils.decimalPlaces(minMaxStep.step);\n\t\tthis.setPrivateRaw(\"stepDecimalPlaces\", stepDecimalPlaces);\n\n\t\tselectionMin = $math.round(selectionMin, stepDecimalPlaces);\n\t\tselectionMax = $math.round(selectionMax, stepDecimalPlaces);\n\n\t\tminMaxStep = this._adjustMinMax(selectionMin, selectionMax, gridCount, true);\n\n\t\tlet step = minMaxStep.step;\n\t\tselectionMin = minMaxStep.min;\n\t\tselectionMax = minMaxStep.max;\n\n\t\tif (this.getPrivate(\"selectionMin\") !== selectionMin || this.getPrivate(\"selectionMax\") !== selectionMax || this.getPrivate(\"step\") !== step) {\n\t\t\t// do not change to setPrivate, will cause SO\n\t\t\tthis.setPrivateRaw(\"selectionMin\", selectionMin);\n\t\t\tthis.setPrivateRaw(\"selectionMax\", selectionMax);\n\n\t\t\tthis.setPrivateRaw(\"step\", step);\n\t\t}\n\t}\n\n\t/**\n\t * Converts a relative position to a corresponding numeric value from axis\n\t * scale.\n\t *\n\t * @param position Relative position\n\t * @return Value\n\t */\n\tpublic positionToValue(position: number): number {\n\t\tconst min = this.getPrivate(\"min\")!;\n\t\tconst max = this.getPrivate(\"max\")!;\n\n\t\tif (!this.get(\"logarithmic\")) {\n\t\t\treturn position * (max - min) + min;\n\t\t}\n\t\telse {\n\t\t\treturn Math.pow(Math.E, (position * ((Math.log(max) * Math.LOG10E - Math.log(min) * Math.LOG10E)) + Math.log(min) * Math.LOG10E) / Math.LOG10E);\n\t\t}\n\t}\n\n\t/**\n\t * Convers value to a relative position on axis.\n\t *\n\t * @param value Value\n\t * @return Relative position\n\t */\n\tpublic valueToPosition(value: number): number {\n\n\t\tconst min = this.getPrivate(\"min\")!;\n\t\tconst max = this.getPrivate(\"max\")!;\n\n\t\tif (!this.get(\"logarithmic\")) {\n\t\t\treturn (value - min) / (max - min);\n\t\t}\n\t\telse {\n\t\t\tif (value <= 0) {\n\t\t\t\tlet treatZeroAs = this.get(\"treatZeroAs\");\n\t\t\t\tif ($type.isNumber(treatZeroAs)) {\n\t\t\t\t\tvalue = treatZeroAs;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn (Math.log(value) * Math.LOG10E - Math.log(min) * Math.LOG10E) / ((Math.log(max) * Math.LOG10E - Math.log(min) * Math.LOG10E));\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic valueToFinalPosition(value: number): number {\n\n\t\tconst min = this.getPrivate(\"minFinal\")!;\n\t\tconst max = this.getPrivate(\"maxFinal\")!;\n\n\t\tif (!this.get(\"logarithmic\")) {\n\t\t\treturn (value - min) / (max - min);\n\t\t}\n\t\telse {\n\t\t\tif (value <= 0) {\n\t\t\t\tlet treatZeroAs = this.get(\"treatZeroAs\");\n\t\t\t\tif ($type.isNumber(treatZeroAs)) {\n\t\t\t\t\tvalue = treatZeroAs;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn (Math.log(value) * Math.LOG10E - Math.log(min) * Math.LOG10E) / ((Math.log(max) * Math.LOG10E - Math.log(min) * Math.LOG10E));\n\t\t}\n\t}\n\n\t/**\n\t * Returns X coordinate in pixels corresponding to specific value.\n\t *\n\t * @param value Numeric value\n\t * @param location Location\n\t * @param baseValue Base value\n\t * @return X coordinate\n\t */\n\tpublic getX(value: number, location: number, baseValue: number) {\n\t\tvalue = baseValue + (value - baseValue) * location;\n\n\t\tconst position = this.valueToPosition(value);\n\t\treturn this._settings.renderer.positionToCoordinate(position);\n\t}\n\n\t/**\n\t * Returns X coordinate in pixels corresponding to specific value.\n\t *\n\t * @param value Numeric value\n\t * @param location Location\n\t * @param baseValue Base value\n\t * @return X coordinate\n\t */\n\tpublic getY(value: number, location: number, baseValue: number) {\n\t\tvalue = baseValue + (value - baseValue) * location;\n\n\t\tconst position = this.valueToPosition(value)\n\t\treturn this._settings.renderer.positionToCoordinate(position);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemCoordinateX(dataItem: DataItem, field: string, _cellLocation: number, axisLocation: number): number {\n\t\treturn this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(dataItem, field, _cellLocation, axisLocation));\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemPositionX(dataItem: DataItem, field: string, _cellLocation: number, axisLocation: number) {\n\t\tlet value = dataItem.get(field as any);\n\n\t\tconst stackToItem = dataItem.get(\"stackToItemX\");\n\t\tif (stackToItem) {\n\t\t\tconst series = dataItem.component as XYSeries;\n\t\t\tvalue = value * axisLocation + series.getStackedXValueWorking(dataItem, field);\n\t\t}\n\t\telse {\n\t\t\tvalue = this._baseValue + (value - this._baseValue) * axisLocation;\n\t\t}\n\n\t\treturn this.valueToPosition(value);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemCoordinateY(dataItem: DataItem, field: string, _cellLocation: number, axisLocation: number): number {\n\t\treturn this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(dataItem, field, _cellLocation, axisLocation));\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getDataItemPositionY(dataItem: DataItem, field: string, _cellLocation: number, axisLocation: number): number {\n\t\tlet value = dataItem.get(field as any);\n\n\t\tconst stackToItem = dataItem.get(\"stackToItemY\");\n\t\tif (stackToItem) {\n\t\t\tconst series = dataItem.component as XYSeries;\n\t\t\tvalue = value * axisLocation + series.getStackedYValueWorking(dataItem, field);\n\t\t}\n\t\telse {\n\t\t\tvalue = this._baseValue + (value - this._baseValue) * axisLocation;\n\t\t}\n\n\t\treturn this.valueToPosition(value);\n\t}\n\n\t/**\n\t * Returns relative position of axis' `baseValue`.\n\t *\n\t * @return Base value position\n\t */\n\tpublic basePosition(): number {\n\t\treturn this.valueToPosition(this.baseValue());\n\t}\n\n\t/**\n\t * Base value of the [[ValueAxis]], which determines positive and negative\n\t * values.\n\t *\n\t * @return Base value\n\t */\n\tpublic baseValue(): number {\n\t\tconst min = Math.min(this.getPrivate(\"minFinal\", -Infinity), this.getPrivate(\"selectionMin\", -Infinity));\n\t\tconst max = Math.max(this.getPrivate(\"maxFinal\", Infinity), this.getPrivate(\"selectionMax\", Infinity));\n\t\tlet baseValue = this.get(\"baseValue\", 0);\n\n\t\tif (baseValue < min) {\n\t\t\tbaseValue = min;\n\t\t}\n\n\t\tif (baseValue > max) {\n\t\t\tbaseValue = max\n\t\t}\n\n\t\treturn baseValue;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic cellEndValue(value: number): number {\n\t\treturn value;\n\t}\n\n\tprotected fixSmallStep(step: number): number {\n\t\t// happens because of floating point error\n\t\tif (1 + step === 1) {\n\t\t\tstep *= 2;\n\t\t\treturn this.fixSmallStep(step);\n\t\t}\n\t\treturn step;\n\t}\n\n\tprotected _fixMin(min: number) {\n\t\treturn min;\n\t}\n\n\tprotected _fixMax(max: number) {\n\t\treturn max;\n\t}\n\n\tpublic _calculateTotals() {\n\t\tif (this.get(\"calculateTotals\")) {\n\t\t\tlet series = this.series[0];\n\t\t\tif (series) {\n\t\t\t\tlet startIndex = series.startIndex();\n\n\t\t\t\tif (series.dataItems.length > 0) {\n\n\t\t\t\t\tif (startIndex > 0) {\n\t\t\t\t\t\tstartIndex--;\n\t\t\t\t\t}\n\t\t\t\t\tlet endIndex = series.endIndex();\n\t\t\t\t\tif (endIndex < series.dataItems.length) {\n\t\t\t\t\t\tendIndex++;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet field: string | undefined;\n\t\t\t\t\tlet vc: string | undefined;\n\n\t\t\t\t\tif (series.get(\"yAxis\") == this) {\n\t\t\t\t\t\tfield = \"valueY\";\n\t\t\t\t\t\tvc = \"vcy\";\n\t\t\t\t\t}\n\t\t\t\t\telse if (series.get(\"xAxis\") == this) {\n\t\t\t\t\t\tfield = \"valueX\";\n\t\t\t\t\t\tvc = \"vcx\";\n\t\t\t\t\t}\n\n\t\t\t\t\tlet fieldWorking = field + \"Working\";\n\n\t\t\t\t\tif (field) {\n\t\t\t\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\t\t\t\tlet sum = 0;\n\t\t\t\t\t\t\tlet total = 0;\n\n\t\t\t\t\t\t\t$array.each(this.series, (series) => {\n\t\t\t\t\t\t\t\tif (!series.get(\"excludeFromTotal\")) {\n\t\t\t\t\t\t\t\t\tlet dataItem = series.dataItems[i];\n\t\t\t\t\t\t\t\t\tif (dataItem) {\n\t\t\t\t\t\t\t\t\t\tlet value = dataItem.get(fieldWorking as any) * series.get(vc as any);\n\n\t\t\t\t\t\t\t\t\t\tif (!$type.isNaN(value)) {\n\t\t\t\t\t\t\t\t\t\t\tsum += value;\n\t\t\t\t\t\t\t\t\t\t\ttotal += Math.abs(value);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t$array.each(this.series, (series) => {\n\t\t\t\t\t\t\t\tif (!series.get(\"excludeFromTotal\")) {\n\t\t\t\t\t\t\t\t\tlet dataItem = series.dataItems[i];\n\t\t\t\t\t\t\t\t\tif (dataItem) {\n\t\t\t\t\t\t\t\t\t\tlet value = dataItem.get(fieldWorking as any) * series.get(vc as any);\n\n\t\t\t\t\t\t\t\t\t\tif (!$type.isNaN(value)) {\n\t\t\t\t\t\t\t\t\t\t\tdataItem.set((field + \"Total\") as any, total);\n\t\t\t\t\t\t\t\t\t\t\tdataItem.set((field + \"Sum\") as any, sum);\n\t\t\t\t\t\t\t\t\t\t\tdataItem.set((field + \"TotalPercent\") as any, value / total * 100);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _getSelectionMinMax() {\n\t\tconst min = this.getPrivate(\"minFinal\");\n\t\tconst max = this.getPrivate(\"maxFinal\");\n\n\t\tconst minDefined = this.get(\"min\");\n\t\tconst maxDefined = this.get(\"max\");\n\n\t\tlet extraMin = this.get(\"extraMin\", 0);\n\t\tlet extraMax = this.get(\"extraMax\", 0);\n\n\t\tif (this.get(\"logarithmic\")) {\n\t\t\tif (this.get(\"extraMin\") == null) {\n\t\t\t\textraMin = 0.1;\n\t\t\t}\n\t\t\tif (this.get(\"extraMax\") == null) {\n\t\t\t\textraMax = 0.2;\n\t\t\t}\n\t\t}\n\n\t\tconst gridCount = this.get(\"renderer\").gridCount();\n\t\tconst selectionStrictMinMax = this.get(\"strictMinMaxSelection\");\n\t\tlet 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\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\tlet minX = series.getPrivate(\"minX\");\n\t\t\t\t\t\t\tlet maxX = series.getPrivate(\"maxX\");\n\n\t\t\t\t\t\t\t// solves #90085\n\t\t\t\t\t\t\tif (series.startIndex() != 0 || series.endIndex() != series.dataItems.length) {\n\t\t\t\t\t\t\t\tminX = undefined;\n\t\t\t\t\t\t\t\tmaxX = undefined;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tseriesMin = series.getPrivate(\"selectionMinX\", minX);\n\t\t\t\t\t\t\tseriesMax = series.getPrivate(\"selectionMaxX\", 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\n\t\t\t\t\t\t\tlet minY = series.getPrivate(\"minY\");\n\t\t\t\t\t\t\tlet maxY = series.getPrivate(\"maxY\");\n\n\t\t\t\t\t\t\t// solves #90085\n\t\t\t\t\t\t\tif (series.startIndex() != 0 || series.endIndex() != series.dataItems.length) {\n\t\t\t\t\t\t\t\tminY = undefined;\n\t\t\t\t\t\t\t\tmaxY = undefined;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tseriesMin = series.getPrivate(\"selectionMinY\", minY);\n\t\t\t\t\t\t\tseriesMax = series.getPrivate(\"selectionMaxY\", maxY);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\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\tlet smin = selectionMin;\n\t\t\t\tselectionMin -= this._deltaMinMax;\n\t\t\t\tselectionMax += this._deltaMinMax;\n\n\t\t\t\tif(selectionMin < min){\n\t\t\t\t\tlet d = smin - min;\n\t\t\t\t\tif(d == 0){\n\t\t\t\t\t\td = this._deltaMinMax;\n\t\t\t\t\t}\n\n\t\t\t\t\tselectionMin = smin - d;\n\t\t\t\t\tselectionMax = smin + d;\n\n\t\t\t\t\tstrictMinMax = true;\n\t\t\t\t}\n\n\t\t\t\tlet minMaxStep2 = this._adjustMinMax(selectionMin, selectionMax, gridCount, strictMinMax);\n\t\t\t\tselectionMin = minMaxStep2.min;\n\t\t\t\tselectionMax = minMaxStep2.max;\n\t\t\t}\n\n\t\t\tlet selectionMinReal = selectionMin;\n\t\t\tlet selectionMaxReal = selectionMax;\n\n\t\t\tselectionMin -= (selectionMax - selectionMin) * extraMin;\n\t\t\tselectionMax += (selectionMax - selectionMin) * extraMax;\n\n\t\t\tlet minMaxStep: IMinMaxStep = this._adjustMinMax(selectionMin, selectionMax, gridCount);\n\n\t\t\tselectionMin = minMaxStep.min;\n\t\t\tselectionMax = minMaxStep.max;\n\n\t\t\tselectionMin = $math.fitToRange(selectionMin, min, max);\n\t\t\tselectionMax = $math.fitToRange(selectionMax, min, max);\n\n\t\t\t// do it for the second time !important\t\t\t\n\t\t\tminMaxStep = this._adjustMinMax(selectionMin, selectionMax, gridCount, true);\n\n\t\t\tif (!strictMinMax) {\n\t\t\t\tselectionMin = minMaxStep.min;\n\t\t\t\tselectionMax = minMaxStep.max;\n\t\t\t}\n\n\t\t\tconst syncWithAxis = this.get(\"syncWithAxis\");\n\t\t\tif (syncWithAxis) {\n\t\t\t\tminMaxStep = this._syncAxes(selectionMin, selectionMax, minMaxStep.step, syncWithAxis.getPrivate(\"selectionMinFinal\", syncWithAxis.getPrivate(\"minFinal\", 0)), syncWithAxis.getPrivate(\"selectionMaxFinal\", syncWithAxis.getPrivate(\"maxFinal\", 1)), syncWithAxis.getPrivate(\"selectionStepFinal\", syncWithAxis.getPrivate(\"step\", 1)));\n\n\t\t\t\tselectionMin = minMaxStep.min;\n\t\t\t\tselectionMax = minMaxStep.max;\n\t\t\t}\n\n\t\t\tif (strictMinMax) {\n\t\t\t\tif ($type.isNumber(minDefined)) {\n\t\t\t\t\tselectionMin = Math.max(selectionMin, minDefined);\n\t\t\t\t}\n\n\t\t\t\tif ($type.isNumber(maxDefined)) {\n\t\t\t\t\tselectionMax = Math.min(selectionMax, maxDefined);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (selectionStrictMinMax) {\n\t\t\t\tselectionMin = selectionMinReal - (selectionMax - selectionMin) * extraMin;\n\t\t\t\tselectionMax = selectionMaxReal + (selectionMax - selectionMin) * extraMax;\n\t\t\t}\n\n\t\t\tif (this.get(\"logarithmic\")) {\n\n\t\t\t\tif (selectionMin <= 0) {\n\t\t\t\t\tselectionMin = selectionMinReal * (1 - Math.min(extraMin, 0.99));\n\t\t\t\t}\n\n\t\t\t\tif (selectionMin < min) {\n\t\t\t\t\tselectionMin = min;\n\t\t\t\t}\n\t\t\t\tif (selectionMax > max) {\n\t\t\t\t\tselectionMax = max;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet len = Math.min(20, Math.ceil(Math.log(this.getPrivate(\"maxZoomFactor\", 100) + 1) / Math.LN10) + 2);\n\n\t\t\tlet start = $math.round(this.valueToFinalPosition(selectionMin), len);\n\t\t\tlet end = $math.round(this.valueToFinalPosition(selectionMax), len);\n\n\t\t\tthis.setPrivateRaw(\"selectionMinFinal\", selectionMin);\n\t\t\tthis.setPrivateRaw(\"selectionMaxFinal\", selectionMax);\n\t\t\tthis.setPrivateRaw(\"selectionStepFinal\", minMaxStep.step);\n\n\t\t\tthis.zoom(start, end);\n\t\t}\n\t}\n\n\n\tprotected _getMinMax() {\n\t\tlet minDefined = this.get(\"min\");\n\t\tlet maxDefined = this.get(\"max\");\n\n\t\tlet min = Infinity;\n\t\tlet max = -Infinity;\n\n\t\tlet extraMin = this.get(\"extraMin\", 0);\n\t\tlet extraMax = this.get(\"extraMax\", 0);\n\n\t\tif (this.get(\"logarithmic\")) {\n\t\t\tif (this.get(\"extraMin\") == null) {\n\t\t\t\textraMin = 0.1;\n\t\t\t}\n\t\t\tif (this.get(\"extraMax\") == null) {\n\t\t\t\textraMax = 0.2;\n\t\t\t}\n\t\t}\n\n\t\tlet minDiff = Infinity;\n\n\t\t$array.each(this.series, (series) => {\n\t\t\tif (!series.get(\"ignoreMinMax\")) {\n\t\t\t\tlet seriesMin: number | undefined;\n\t\t\t\tlet seriesMax: number | undefined;\n\t\t\t\tif (series.get(\"xAxis\") === this) {\n\t\t\t\t\tseriesMin = series.getPrivate(\"minX\");\n\t\t\t\t\tseriesMax = series.getPrivate(\"maxX\");\n\t\t\t\t}\n\t\t\t\telse if (series.get(\"yAxis\") === this) {\n\t\t\t\t\tseriesMin = series.getPrivate(\"minY\");\n\t\t\t\t\tseriesMax = series.getPrivate(\"maxY\");\n\t\t\t\t}\n\n\t\t\t\tif ($type.isNumber(seriesMin) && $type.isNumber(seriesMax)) {\n\t\t\t\t\tmin = Math.min(min, seriesMin);\n\t\t\t\t\tmax = Math.max(max, seriesMax);\n\n\t\t\t\t\tlet diff = seriesMax - seriesMin;\n\n\t\t\t\t\tif (diff <= 0) {\n\t\t\t\t\t\tdiff = Math.abs(seriesMax / 100);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (diff < minDiff) {\n\t\t\t\t\t\tminDiff = diff;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tthis.axisRanges.each((range) => {\n\t\t\tif (range.get(\"affectsMinMax\")) {\n\t\t\t\tlet value = range.get(\"value\");\n\t\t\t\tif (value != null) {\n\t\t\t\t\tmin = Math.min(min, value);\n\t\t\t\t\tmax = Math.max(max, value);\n\t\t\t\t}\n\t\t\t\tvalue = range.get(\"endValue\");\n\t\t\t\tif (value != null) {\n\t\t\t\t\tmin = Math.min(min, value);\n\t\t\t\t\tmax = Math.max(max, value);\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tif (this.get(\"logarithmic\")) {\n\t\t\tlet treatZeroAs = this.get(\"treatZeroAs\");\n\t\t\tif ($type.isNumber(treatZeroAs)) {\n\t\t\t\tif (min <= 0) {\n\t\t\t\t\tmin = treatZeroAs;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (min <= 0) {\n\t\t\t\tnew Error(\"Logarithmic value axis can not have values <= 0.\");\n\t\t\t}\n\t\t}\n\n\t\tif (min === 0 && max === 0) {\n\t\t\tmax = 0.9;\n\t\t\tmin = -0.9;\n\t\t}\n\n\t\tif ($type.isNumber(minDefined)) {\n\t\t\tmin = minDefined;\n\t\t}\n\t\tif ($type.isNumber(maxDefined)) {\n\t\t\tmax = maxDefined;\n\t\t}\n\n\t\t// meaning no min/max found on series/ranges and no min/max was defined\n\t\tif (min === Infinity || max === -Infinity) {\n\t\t\tthis.setPrivate(\"minFinal\", undefined);\n\t\t\tthis.setPrivate(\"maxFinal\", undefined);\n\t\t\treturn;\n\t\t}\n\n\t\tconst initialMin = min;\n\t\tconst initialMax = max;\n\n\t\t// adapter\n\t\tlet minAdapted = this.adapters.fold(\"min\", min);\n\t\tlet maxAdapted = this.adapters.fold(\"max\", max);\n\n\t\tif ($type.isNumber(minAdapted)) {\n\t\t\tmin = minAdapted;\n\t\t}\n\n\t\tif ($type.isNumber(maxAdapted)) {\n\t\t\tmax = maxAdapted;\n\t\t}\n\n\t\t// DateAxis does some magic here\n\t\tmin = this._fixMin(min);\n\t\tmax = this._fixMax(max);\n\n\t\t// this happens if starLocation and endLocation are 0.5 and DateAxis has only one date\t\t\n\t\tif (max - min <= 1 / Math.pow(10, 15)) {\n\t\t\tif (max - min !== 0) {\n\t\t\t\tthis._deltaMinMax = (max - min) / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._getDelta(max);\n\t\t\t}\n\n\t\t\tmin -= this._deltaMinMax;\n\t\t\tmax += this._deltaMinMax;\n\t\t}\n\n\t\t// add extras\n\t\tmin -= (max - min) * extraMin;\n\t\tmax += (max - min) * extraMax;\n\n\t\tif (this.get(\"logarithmic\")) {\n\t\t\t// don't let min go below 0 if real min is >= 0\n\t\t\tif (min < 0 && initialMin >= 0) {\n\t\t\t\tmin = 0;\n\t\t\t}\n\t\t\t// don't let max go above 0 if real max is <= 0\n\t\t\tif (max > 0 && initialMax <= 0) {\n\t\t\t\tmax = 0;\n\t\t\t}\n\t\t}\n\n\t\tthis._minReal = min;\n\t\tthis._maxReal = max;\n\t\tlet strictMinMax = this.get(\"strictMinMax\");\n\t\tlet strictMinMaxSelection = this.get(\"strictMinMaxSelection\", false);\n\t\tif (strictMinMaxSelection) {\n\t\t\tstrictMinMax = strictMinMaxSelection;\n\t\t}\n\n\t\tlet strict = strictMinMax;\n\t\tif ($type.isNumber(maxDefined)) {\n\t\t\tstrict = true;\n\t\t}\n\n\t\tlet gridCount = this.get(\"renderer\").gridCount();\n\n\t\tlet minMaxStep: IMinMaxStep = this._adjustMinMax(min, max, gridCount, strict);\n\n\t\tmin = minMaxStep.min;\n\t\tmax = minMaxStep.max;\n\n\t\t// do it for the second time with strict true (importat!)\n\t\tminMaxStep = this._adjustMinMax(min, max, gridCount, true);\n\n\t\tmin = minMaxStep.min;\n\t\tmax = minMaxStep.max;\n\n\t\t// return min max if strict\n\t\tif (strictMinMax) {\n\t\t\tif ($type.isNumber(minDefined)) {\n\t\t\t\tmin = minDefined;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmin = this._minReal;\n\t\t\t}\n\n\t\t\tif ($type.isNumber(maxDefined)) {\n\t\t\t\tmax = maxDefined;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmax = this._maxReal;\n\t\t\t}\n\n\t\t\tif (max - min <= 0.00000001) {\n\t\t\t\tmin -= this._deltaMinMax;\n\t\t\t\tmax += this._deltaMinMax;\n\t\t\t}\n\n\t\t\tmin -= (max - min) * extraMin;\n\t\t\tmax += (max - min) * extraMax;\n\t\t}\n\n\t\tminAdapted = this.adapters.fold(\"min\", min);\n\t\tmaxAdapted = this.adapters.fold(\"max\", max);\n\n\t\tif ($type.isNumber(minAdapted)) {\n\t\t\tmin = minAdapted;\n\t\t}\n\n\t\tif ($type.isNumber(maxAdapted)) {\n\t\t\tmax = maxAdapted;\n\t\t}\n\n\t\tif (minDiff == Infinity) {\n\t\t\tminDiff = (max - min)\n\t\t}\n\n\t\t// this is to avoid floating point number error\n\t\tlet decCount = Math.round(Math.abs(Math.log(Math.abs(max - min)) * Math.LOG10E)) + 5;\n\n\t\tmin = $math.round(min, decCount);\n\t\tmax = $math.round(max, decCount);\n\n\t\tconst syncWithAxis = this.get(\"syncWithAxis\");\n\t\tif (syncWithAxis) {\n\t\t\tminMaxStep = this._syncAxes(min, max, minMaxStep.step, syncWithAxis.getPrivate(\"minFinal\", syncWithAxis.getPrivate(\"min\", 0)), syncWithAxis.getPrivate(\"maxFinal\", syncWithAxis.getPrivate(\"max\", 1)), syncWithAxis.getPrivate(\"step\", 1));\n\t\t\tmin = minMaxStep.min;\n\t\t\tmax = minMaxStep.max;\n\t\t}\n\n\t\tthis.setPrivateRaw(\"maxZoomFactor\", Math.max(1, Math.ceil((max - min) / minDiff * this.get(\"maxZoomFactor\", 100))));\n\t\tthis._fixZoomFactor();\n\n\t\tif (this.get(\"logarithmic\")) {\n\t\t\tthis._minLogAdjusted = min;\n\t\t\tmin = this._minReal;\n\t\t\tmax = this._maxReal;\n\n\t\t\tif (min <= 0) {\n\t\t\t\tmin = initialMin * (1 - Math.min(extraMin, 0.99));\n\t\t\t}\n\t\t}\n\n\n\t\tif ($type.isNumber(min) && $type.isNumber(max)) {\n\t\t\tif (this.getPrivate(\"minFinal\") !== min || this.getPrivate(\"maxFinal\") !== max) {\n\t\t\t\tthis.setPrivate(\"minFinal\", min);\n\t\t\t\tthis.setPrivate(\"maxFinal\", max);\n\t\t\t\tthis._saveMinMax(min, max);\n\n\t\t\t\tconst duration = this.get(\"interpolationDuration\", 0);\n\t\t\t\tconst easing = this.get(\"interpolationEasing\");\n\n\t\t\t\tthis.animatePrivate({ key: \"min\", to: min, duration, easing });\n\t\t\t\tthis.animatePrivate({ key: \"max\", to: max, duration, easing });\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _fixZoomFactor() {\n\t}\n\n\tprotected _getDelta(max: number) {\n\t\t// the number by which we need to raise 10 to get difference\n\t\tlet exponent: number = Math.log(Math.abs(max)) * Math.LOG10E;\n\n\t\t// here we find a number which is power of 10 and has the same count of numbers as difference has\n\t\tlet power = Math.pow(10, Math.floor(exponent));\n\n\t\t// reduce this number by 10 times\n\t\tpower = power / 10;\n\n\t\tthis._deltaMinMax = power;\n\t}\n\n\tprotected _saveMinMax(_min: number, _max: number) {\n\n\t}\n\n\n\tprotected _adjustMinMax(min: number, max: number, gridCount: number, strictMode?: boolean): IMinMaxStep {\n\t\t// will fail if 0\n\t\tif (gridCount <= 1) {\n\t\t\tgridCount = 1;\n\t\t}\n\n\t\tgridCount = Math.round(gridCount);\n\n\t\tlet initialMin: number = min;\n\t\tlet initialMax: number = max;\n\n\t\tlet difference = max - min;\n\n\t\t// in case min and max is the same, use max\n\t\tif (difference === 0) {\n\t\t\tdifference = Math.abs(max);\n\t\t}\n\n\t\t// the number by which we need to raise 10 to get difference\n\t\tlet exponent: number = Math.log(Math.abs(difference)) * Math.LOG10E;\n\n\t\t// here we find a number which is power of 10 and has the same count of numbers as difference has\n\t\tlet power = Math.pow(10, Math.floor(exponent));\n\n\t\t// reduce this number by 10 times\n\t\tpower = power / 10;\n\n\t\tlet extra: number = power;\n\t\tif (strictMode) {\n\t\t\textra = 0;\n\t\t}\n\n\t\t// round down min\n\t\tif (strictMode) {\n\t\t\tmin = Math.floor(min / power) * power;\n\t\t\t// round up max\n\t\t\tmax = Math.ceil(max / power) * power;\n\t\t}\n\t\telse {\n\t\t\tmin = Math.ceil(min / power) * power - extra;\n\t\t\t// round up max\n\t\t\tmax = Math.floor(max / power) * power + extra;\n\t\t}\n\n\t\t// don't let min go below 0 if real min is >= 0\n\t\tif (min < 0 && initialMin >= 0) {\n\t\t\tmin = 0;\n\t\t}\n\t\t// don't let max go above 0 if real max is <= 0\n\t\tif (max > 0 && initialMax <= 0) {\n\t\t\tmax = 0;\n\t\t}\n\n\t\texponent = Math.log(Math.abs(difference)) * Math.LOG10E;\n\t\tpower = Math.pow(10, Math.floor(exponent));\n\t\tpower = power / 100; // used to be 10 in v4, but this caused issue that there could be limited number of grids with even very small minGridDistance\n\n\t\t// approximate difference between two grid lines\n\t\tlet step = Math.ceil((difference / gridCount) / power) * power;\n\t\tlet stepPower = Math.pow(10, Math.floor(Math.log(Math.abs(step)) * Math.LOG10E));\n\n\t\t// the step should divide by 2, 5, and 10.\n\t\tlet stepDivisor: number = Math.ceil(step / stepPower); // number 0 - 10\n\n\t\tif (stepDivisor > 5) {\n\t\t\tstepDivisor = 10;\n\t\t}\n\t\telse if (stepDivisor <= 5 && stepDivisor > 2) {\n\t\t\tstepDivisor = 5;\n\t\t}\n\n\t\t// now get real step\n\t\tstep = Math.ceil(step / (stepPower * stepDivisor)) * stepPower * stepDivisor;\n\n\t\tlet maxPrecision = this.get(\"maxPrecision\");\n\t\tif ($type.isNumber(maxPrecision)) {\n\t\t\tlet ceiledStep = $math.ceil(step, maxPrecision);\n\t\t\tif (maxPrecision < Number.MAX_VALUE && step !== ceiledStep) {\n\t\t\t\tstep = ceiledStep;\n\t\t\t}\n\t\t}\n\n\t\tlet decCount: number = 0;\n\t\t// in case numbers are smaller than 1\n\t\tif (stepPower < 1) {\n\t\t\t// exponent is less then 1 too. Count decimals of exponent\n\t\t\tdecCount = Math.round(Math.abs(Math.log(Math.abs(stepPower)) * Math.LOG10E)) + 1;\n\t\t\t// round step\n\t\t\tstep = $math.round(step, decCount);\n\t\t}\n\n\t\t// final min and max\n\t\tlet minCount = Math.floor(min / step);\n\n\t\tmin = $math.round(step * minCount, decCount);\n\n\t\tlet maxCount: number;\n\n\t\tif (!strictMode) {\n\t\t\tmaxCount = Math.ceil(max / step);\n\t\t}\n\t\telse {\n\t\t\tmaxCount = Math.floor(max / step);\n\t\t}\n\n\t\tif (maxCount === minCount) {\n\t\t\tmaxCount++;\n\t\t}\n\n\t\tmax = $math.round(step * maxCount, decCount);\n\n\t\tif (max < initialMax) {\n\t\t\tmax = max + step;\n\t\t}\n\n\t\tif (min > initialMin) {\n\t\t\tmin = min - step;\n\t\t}\n\n\n\t\tstep = this.fixSmallStep(step);\n\n\t\treturn { min: min, max: max, step: step };\n\t}\n\n\t/**\n\t * Returns text to be used in an axis tooltip for specific relative position.\n\t *\n\t * @param position Position\n\t * @return Tooltip text\n\t */\n\tpublic getTooltipText(position: number, _adjustPosition?: boolean): 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}\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\t/**\n\t * Returns relative position between two grid lines of the axis.\n\t *\n\t * @return Position\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.getPrivate(\"step\", 1) / (max - min);\n\t\t}\n\t\treturn 0.05;\n\t}\n\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 { IAxisDataItem } from \"../axes/Axis\";\nimport type { ILegendDataItem } from \"../../../core/render/Legend\";\nimport type { Sprite } from \"../../../core/render/Sprite\";\n\nimport { XYSeries, IXYSeriesPrivate, IXYSeriesSettings, IXYSeriesDataItem, IXYSeriesAxisRange } from \"./XYSeries\";\nimport { Percent } from \"../../../core/util/Percent\";\nimport { visualSettings } from \"../../../core/render/Graphics\";\n\nimport * as $array from \"../../../core/util/Array\";\nimport * as $type from \"../../../core/util/Type\";\n\nexport interface IBaseColumnSeriesDataItem extends IXYSeriesDataItem {\n\n\t/**\n\t * An actual [[Graphics]] element (Column/Slice/Candlestick/OHLC).\n\t */\n\tgraphics?: Graphics;\n\n\t/**\n\t * In case axis ranges are added to the series, it creates a separate\n\t * element ([[Graphics]]) for each axis range. This array holds them all.\n\t */\n\trangeGraphics?: Array;\n\n\t/**\n\t * If data items from this series are used to feed a [[Legend]], this\n\t * will hold a reference to the equivalent Legend data item.\n\t * \n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/legend/#Data_item_list} for more info\n\t */\n\tlegendDataItem?: DataItem;\n}\n\nexport interface IBaseColumnSeriesSettings extends IXYSeriesSettings {\n\n\t/**\n\t * Indicates if series must divvy up available space with other column\n\t * series (`true`; default) or take up the whole available space (`false`).\n\t *\n\t * @default true\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/column-series/#Clustering} for more info\n\t */\n\tclustered?: boolean;\n\n\t/**\n\t * Whether positions of bullets should be calculated based on portion of\n\t * column currently visual (`true`) or the whole length/height of the\n\t * column (`false`).\n\t *\n\t * @default true\n\t */\n\tadjustBulletPosition?: boolean;\n\n\t/**\n\t * If set to `true` will use color of the last visible column for legend\n\t * marker. Otherwise, series `fill`/`stroke` will be used.\n\t *\n\t * @since 5.1.13\n\t */\n\tuseLastColorForLegendMarker?: boolean\n\n}\n\nexport interface IBaseColumnSeriesPrivate extends IXYSeriesPrivate { }\n\nexport interface IBaseColumnSeriesAxisRange extends IXYSeriesAxisRange {\n\n\t/**\n\t * A list of actual [[Graphics]] elements for an axis range.\n\t *\n\t * Can be used to ajust the look of the axis range columns.\n\t */\n\tcolumns: ListTemplate;\n\n}\n\n/**\n * Base class for all \"column-based\" series\n */\nexport abstract class BaseColumnSeries extends XYSeries {\n\n\tdeclare public _settings: IBaseColumnSeriesSettings;\n\tdeclare public _privateSettings: IBaseColumnSeriesPrivate;\n\tdeclare public _dataItemSettings: IBaseColumnSeriesDataItem;\n\tdeclare public _axisRangeType: IBaseColumnSeriesAxisRange;\n\n\tpublic static className: string = \"BaseColumnSeries\";\n\tpublic static classNames: Array = XYSeries.classNames.concat([BaseColumnSeries.className]);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract makeColumn(dataItem: DataItem, listTemplate: ListTemplate): Graphics\n\n\t/**\n\t * ListTemplate of columns in series.\n\t */\n\tpublic abstract columns: ListTemplate;\n\n\tprotected _makeGraphics(listTemplate: ListTemplate, dataItem: DataItem): Graphics {\n\t\treturn this.makeColumn(dataItem, listTemplate);\n\t}\n\n\tprotected _ph: number = 0;\n\tprotected _pw: number = 0;\n\n\tpublic _makeFieldNames() {\n\t\tsuper._makeFieldNames();\n\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\n\t\tconst categoryAxis = \"CategoryAxis\";\n\t\tconst valueAxis = \"ValueAxis\";\n\n\t\tif (xAxis.isType>(categoryAxis)) {\n\t\t\tif (!this.get(\"openCategoryXField\")) {\n\t\t\t\tthis._xOpenField = this._xField;\n\t\t\t}\n\t\t}\n\n\t\tif (xAxis.isType>(valueAxis)) {\n\t\t\tif (!this.get(\"openValueXField\")) {\n\t\t\t\tthis._xOpenField = this._xField;\n\t\t\t}\n\t\t}\n\n\t\tif (yAxis.isType>(categoryAxis)) {\n\t\t\tif (!this.get(\"openCategoryYField\")) {\n\t\t\t\tthis._yOpenField = this._yField;\n\t\t\t}\n\t\t}\n\n\t\tif (yAxis.isType>(valueAxis)) {\n\t\t\tif (!this.get(\"openValueYField\")) {\n\t\t\t\tthis._yOpenField = this._yField;\n\t\t\t}\n\t\t}\n\t}\n\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\n\t\tconst len = this.dataItems.length;\n\t\tconst startIndex = Math.max(0, this.startIndex() - 2);\n\t\tconst endIndex = Math.min(this.endIndex() + 2, len - 1);\n\n\t\tif (xAxis.inited && yAxis.inited) {\n\t\t\tfor (let i = startIndex; i <= endIndex; i++) {\n\t\t\t\tlet dataItem = this.dataItems[i];\n\t\t\t\tthis._createGraphics(dataItem);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateChildren() {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tthis._ph = chart.plotContainer.height();\n\t\t\tthis._pw = chart.plotContainer.width();\n\t\t}\n\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\t\tconst baseAxis = this.get(\"baseAxis\")!;\n\n\t\tconst columnsTemplate = this.columns.template;\n\t\tif (this.isDirty(\"fill\")) {\n\t\t\tif (columnsTemplate.get(\"fill\") == null) {\n\t\t\t\tcolumnsTemplate.set(\"fill\", this.get(\"fill\"));\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"stroke\")) {\n\t\t\tif (columnsTemplate.get(\"stroke\") == null) {\n\t\t\t\tcolumnsTemplate.set(\"stroke\", this.get(\"stroke\"));\n\t\t\t}\n\t\t}\n\n\t\tlet index = 0;\n\t\tlet clusterCount = 0;\n\t\tlet i = 0;\n\n\t\t$array.each(baseAxis.series, (series) => {\n\t\t\tif (series instanceof BaseColumnSeries) {\n\t\t\t\tconst stacked = series.get(\"stacked\");\n\n\t\t\t\tif (stacked && i == 0) {\n\t\t\t\t\tclusterCount++;\n\t\t\t\t}\n\n\t\t\t\tif (!stacked && series.get(\"clustered\")) {\n\t\t\t\t\tclusterCount++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (series === this) {\n\t\t\t\tindex = clusterCount - 1;\n\t\t\t}\n\t\t\ti++;\n\t\t})\n\n\t\tif (!this.get(\"clustered\")) {\n\t\t\tindex = 0;\n\t\t\tclusterCount = 1;\n\t\t}\n\n\t\tif (clusterCount === 0) {\n\t\t\tclusterCount = 1;\n\t\t\tindex = 0;\n\t\t}\n\n\t\tconst xRenderer = xAxis.get(\"renderer\");\n\t\tconst yRenderer = yAxis.get(\"renderer\");\n\n\t\tconst cellStartLocation = \"cellStartLocation\";\n\t\tconst cellEndLocation = \"cellEndLocation\";\n\n\t\tconst cellLocationX0 = xRenderer.get(cellStartLocation, 0);\n\t\tconst cellLocationX1 = xRenderer.get(cellEndLocation, 1);\n\n\t\tconst cellLocationY0 = yRenderer.get(cellStartLocation, 0);\n\t\tconst cellLocationY1 = yRenderer.get(cellEndLocation, 1);\n\n\t\tthis._aLocationX0 = cellLocationX0 + (index / clusterCount) * (cellLocationX1 - cellLocationX0);\n\t\tthis._aLocationX1 = cellLocationX0 + (index + 1) / clusterCount * (cellLocationX1 - cellLocationX0);;\n\n\t\tthis._aLocationY0 = cellLocationY0 + (index / clusterCount) * (cellLocationY1 - cellLocationY0);\n\t\tthis._aLocationY1 = cellLocationY0 + (index + 1) / clusterCount * (cellLocationY1 - cellLocationY0);\n\n\t\tif (xAxis.inited && yAxis.inited) {\n\t\t\tif (this._axesDirty || this._valuesDirty || this._stackDirty || this.isDirty(\"vcx\") || this.isDirty(\"vcy\") || this._sizeDirty) {\n\t\t\t\tconst len = this.dataItems.length;\n\n\t\t\t\tlet startIndex = Math.max(0, this.startIndex() - 2);\n\t\t\t\tlet endIndex = Math.min(this.endIndex() + 2, len - 1);\n\n\t\t\t\tfor (let i = 0; i < startIndex; i++) {\n\t\t\t\t\tthis._toggleColumn(this.dataItems[i], false);\n\t\t\t\t}\n\t\t\t\tlet previous = this.dataItems[startIndex];\n\n\t\t\t\tfor (let i = startIndex; i <= endIndex; i++) {\n\t\t\t\t\tlet dataItem = this.dataItems[i];\n\t\t\t\t\tif (dataItem.get(\"valueX\") != null && dataItem.get(\"valueY\") != null) {\n\t\t\t\t\t\tprevious = dataItem;\n\t\t\t\t\t\tif (i > 0 && startIndex > 0) {\n\t\t\t\t\t\t\tfor (let j = i - 1; j >= 0; j--) {\n\t\t\t\t\t\t\t\tlet dataItem = this.dataItems[j];\n\t\t\t\t\t\t\t\tif (dataItem.get(\"valueX\") != null && dataItem.get(\"valueY\") != null) {\n\t\t\t\t\t\t\t\t\tprevious = dataItem;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis._toggleColumn(dataItem, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (let i = startIndex; i <= endIndex; i++) {\n\t\t\t\t\tlet dataItem = this.dataItems[i];\n\t\t\t\t\tthis._updateGraphics(dataItem, previous);\n\t\t\t\t\tif (dataItem.get(\"valueX\") != null && dataItem.get(\"valueY\") != null) {\n\t\t\t\t\t\tprevious = dataItem;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (let i = endIndex + 1; i < len; i++) {\n\t\t\t\t\tthis._toggleColumn(this.dataItems[i], false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis._skipped = true;\n\t\t}\n\t\tthis.updateLegendMarker(this.get(\"tooltipDataItem\"));\n\t\tsuper._updateChildren();\n\t}\n\n\n\tprotected _createGraphics(dataItem: DataItem) {\n\t\tlet graphics = dataItem.get(\"graphics\");\n\t\tif (!graphics) {\n\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\tconst ds = markerRectangle.states.lookup(\"default\")!;\n\t\t\t\t\t$array.each(visualSettings, (setting: any) => {\n\t\t\t\t\t\tconst value = graphics!.get(setting, this.get(setting));\n\t\t\t\t\t\tmarkerRectangle.set(setting, value);\n\t\t\t\t\t\tds.set(setting, value);\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet graphicsArray: Array | undefined = dataItem.get(\"rangeGraphics\");\n\t\t\tif (graphicsArray) {\n\t\t\t\t$array.each(graphicsArray, (graphics) => {\n\t\t\t\t\tgraphics.dispose();\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tgraphicsArray = [];\n\t\t\tdataItem.setRaw(\"rangeGraphics\", graphicsArray);\n\n\t\t\tthis.axisRanges.each((axisRange) => {\n\t\t\t\tconst container = axisRange.container!;\n\t\t\t\tconst rangeGraphics = this._makeGraphics(axisRange.columns, dataItem);\n\t\t\t\tif (graphicsArray) {\n\t\t\t\t\tgraphicsArray.push(rangeGraphics);\n\t\t\t\t}\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\tpublic createAxisRange(axisDataItem: DataItem): this[\"_axisRangeType\"] {\n\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\tconst graphics = dataItem.get(\"graphics\");\n\t\t\tif (graphics) {\n\t\t\t\tgraphics.dispose();\n\t\t\t\tdataItem.set(\"graphics\", undefined);\n\t\t\t}\n\t\t})\n\n\t\treturn super.createAxisRange(axisDataItem);\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\tconst ds = markerRectangle.states.lookup(\"default\")!;\n\t\t\t\t\t$array.each(visualSettings, (setting: any) => {\n\t\t\t\t\t\tconst value = graphics.get(setting, this.get(setting));\n\t\t\t\t\t\tmarkerRectangle.set(setting, value);\n\t\t\t\t\t\tds.set(setting, value);\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\";\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}\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\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\") && !graphics.get(\"forceHidden\")) {\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\") && !graphics.get(\"forceHidden\")) {\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, { legend: true }, {}));\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\n\t\t\t\t\t\t\tmarker.events.on(\"boundschanged\", ()=>{\n\t\t\t\t\t\t\t\tsprite.setAll({ x: marker.width() / 2, y: marker.height() / 2 });\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","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\";\n//import 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 type { IDisposer } from \"../../../core/util/Disposer\";\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\t * **IMPORTANT:** `xAxis` needs to be set when creating the series. Updating\n\t * this setting on previously created series object will not work.\n\t */\n\txAxis: IXYAxis;\n\n\t/**\n\t * Y axis series uses.\n\t *\n\t * **IMPORTANT:** `yAxis` needs to be set when creating the series. Updating\n\t * this setting on previously created series object will not work.\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\tdoNotUpdateLegend?: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\tpublic _bullets: { [index: string]: Sprite } = {};\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\tpublic _posXDp?: IDisposer;\n\tpublic _posYDp?: IDisposer;\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.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\tthis.states.create(\"hidden\", { opacity: 1, visible: false });\n\n\t\tthis._makeFieldNames();\n\t}\n\n\tprotected _processAxisRange(axisRange: this[\"_axisRangeType\"]) {\n\t\tconst container = Container.new(this._root, {});\n\t\taxisRange.container = container;\n\t\tthis.children.push(container);\n\n\t\taxisRange.series = this;\n\n\t\tconst axisDataItem = axisRange.axisDataItem;\n\t\taxisDataItem.setRaw(\"isRange\", true);\n\n\t\tconst axis = >axisDataItem.component;\n\t\tif (axis) {\n\t\t\taxis._processAxisRange(axisDataItem, [\"range\", \"series\"]);\n\n\t\t\tconst bullet = axisDataItem.get(\"bullet\");\n\t\t\tif (bullet) {\n\t\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\t\tif (sprite) {\n\t\t\t\t\tsprite.setPrivate(\"visible\", false);\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst axisFill = axisDataItem.get(\"axisFill\");\n\t\t\tif (axisFill) {\n\t\t\t\tcontainer.set(\"mask\", axisFill);\n\t\t\t}\n\t\t\taxis._seriesAxisRanges.push(axisDataItem);\n\t\t}\n\t}\n\n\tprotected _removeAxisRange(axisRange: this[\"_axisRangeType\"]) {\n\t\tconst axisDataItem = axisRange.axisDataItem;\n\t\tconst axis = >axisDataItem.component;\n\t\taxis.disposeDataItem(axisDataItem);\n\n\t\t$array.remove(axis._seriesAxisRanges, axisDataItem);\n\n\t\tconst container = axisRange.container;\n\t\tif (container) {\n\t\t\tcontainer.dispose();\n\t\t}\n\t}\n\n\tprotected _updateFields() {\n\t\tsuper._updateFields();\n\n\t\tthis._valueXFields = [];\n\t\tthis._valueYFields = [];\n\t\tthis._valueXShowFields = [];\n\t\tthis._valueYShowFields = [];\n\n\t\tthis.__valueXShowFields = [];\n\t\tthis.__valueYShowFields = [];\n\n\t\tif (this.valueXFields) {\n\t\t\t$array.each(this.valueXFields as Array, (key) => {\n\t\t\t\tconst field = this.get((key + \"Field\"));\n\t\t\t\tif (field) {\n\t\t\t\t\tthis._valueXFields.push(key);\n\t\t\t\t\tlet field = this.get((key + \"Show\"));\n\t\t\t\t\tthis.__valueXShowFields.push(field);\n\n\t\t\t\t\tif (field.indexOf(\"Working\") != -1) {\n\t\t\t\t\t\tthis._valueXShowFields.push(field.split(\"Working\")[0]);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis._valueXShowFields.push(field);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (this.valueYFields) {\n\t\t\t$array.each(this.valueYFields as Array, (key) => {\n\t\t\t\tconst field = this.get((key + \"Field\"));\n\n\t\t\t\tif (field) {\n\t\t\t\t\tthis._valueYFields.push(key);\n\t\t\t\t\tlet field = this.get((key + \"Show\"));\n\t\t\t\t\tthis.__valueYShowFields.push(field);\n\n\t\t\t\t\tif (field.indexOf(\"Working\") != -1) {\n\t\t\t\t\t\tthis._valueYShowFields.push(field.split(\"Working\")[0]);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis._valueYShowFields.push(field);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected _dispose() {\n\t\tsuper._dispose();\n\n\t\tthis._bullets = {};\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\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\n\t\tconst baseAxis = this.get(\"baseAxis\");\n\n\t\tif (!xAxis.inited || !yAxis.inited) {\n\t\t\treturn false\n\t\t}\n\t\tconst minBulletDistance = this.get(\"minBulletDistance\", 0);\n\t\tif (minBulletDistance > 0) {\n\t\t\tlet startIndex = this.startIndex();\n\t\t\tlet endIndex = this.endIndex();\n\n\t\t\tlet count = endIndex - startIndex;\n\n\t\t\tif (xAxis == baseAxis) {\n\t\t\t\tif (xAxis.get(\"renderer\").axisLength() / count < minBulletDistance / 5) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (yAxis == baseAxis) {\n\t\t\t\tif (yAxis.get(\"renderer\").axisLength() / count < minBulletDistance / 5) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\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\tpublic _fixPosition() {\n\t\tconst xAxis = this.get(\"xAxis\");\n\t\tconst yAxis = this.get(\"yAxis\");\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\n\t\tthis.bulletsContainer.set(\"y\", this.y());\n\t\tthis.bulletsContainer.set(\"x\", this.x());\n\t}\n\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tthis._bullets = {};\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\tif (this.isDirty(\"xAxis\") || this.isDirty(\"yAxis\")) {\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._fixPosition();\n\n\t\tconst stacked = this.get(\"stacked\");\n\n\t\tif (this.isDirty(\"stacked\")) {\n\t\t\tif (stacked) {\n\t\t\t\tif (this._valuesDirty && !this._dataProcessed) {\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._stack();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._unstack();\n\t\t\t}\n\t\t}\n\n\t\tif (this._valuesDirty && !this._dataProcessed) {\n\t\t\tthis._dataProcessed = true;\n\n\t\t\tif (stacked) {\n\t\t\t\tthis._stack();\n\t\t\t}\n\n\t\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\t\t$array.each(this._valueXShowFields, (key) => {\n\t\t\t\t\tlet value = dataItem.get(key);\n\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\tif (stacked) {\n\t\t\t\t\t\t\tvalue += this.getStackedXValue(dataItem, key);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._min(\"minX\", value);\n\t\t\t\t\t\tthis._max(\"maxX\", value);\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\t$array.each(this._valueYShowFields, (key) => {\n\t\t\t\t\tlet value = dataItem.get(key);\n\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\tif (stacked) {\n\t\t\t\t\t\t\tvalue += this.getStackedYValue(dataItem, key);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._min(\"minY\", value);\n\t\t\t\t\t\tthis._max(\"maxY\", value);\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\txAxis.processSeriesDataItem(dataItem, this._valueXFields);\n\t\t\t\tyAxis.processSeriesDataItem(dataItem, this._valueYFields);\n\t\t\t})\n\n\t\t\txAxis._seriesValuesDirty = true;\n\t\t\tyAxis._seriesValuesDirty = true;\n\n\t\t\tif (!this.get(\"ignoreMinMax\")) {\n\t\t\t\tif (this.isPrivateDirty(\"minX\") || this.isPrivateDirty(\"maxX\")) {\n\t\t\t\t\txAxis.markDirtyExtremes();\n\t\t\t\t}\n\t\t\t\tif (this.isPrivateDirty(\"minY\") || this.isPrivateDirty(\"maxY\")) {\n\t\t\t\t\tyAxis.markDirtyExtremes();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._markStakedDirtyStack();\n\n\t\t\t//this.updateLegendMarker(undefined); // causes legend marker to change color instantly when on\n\t\t\tif (!this.get(\"tooltipDataItem\")) {\n\t\t\t\tthis.updateLegendValue(undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"vcx\") || this.isDirty(\"vcy\")) {\n\t\t\tthis._markStakedDirtyStack();\n\t\t}\n\n\t\tif (!this._dataGrouped) {\n\t\t\txAxis._groupSeriesData(this);\n\t\t\tyAxis._groupSeriesData(this);\n\t\t\tthis._dataGrouped = true;\n\t\t}\n\n\t\tif (this._valuesDirty || this.isPrivateDirty(\"startIndex\") || this.isPrivateDirty(\"endIndex\") || this.isDirty(\"vcx\") || this.isDirty(\"vcy\") || this._stackDirty || this._sizeDirty) {\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 || !baseAxis) {\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\tif (baseAxis === yAxis || !baseAxis) {\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 || !baseAxis) {\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\tif (baseAxis === yAxis || !baseAxis) {\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\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\t\t\tthis._stackDataItems();\n\t\t}\n\t}\n\n\tpublic _unstack() {\n\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\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\tlet positionX = xAxis.getDataItemPositionX(dataItem, this._xField, locationX, this.get(\"vcx\", 1));\n\t\t\tlet 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\tlet x = 0;\n\t\t\tlet y = 0;\n\n\t\t\tlet w = right - left;\n\t\t\tlet h = bottom - top;\n\n\t\t\tif (this._shouldShowBullet(positionX, positionY)) {\n\t\t\t\tsprite.setPrivate(\"visible\", !bullet.getPrivate(\"hidden\"));\n\n\t\t\t\tlet field = bullet.get(\"field\");\n\n\t\t\t\tconst baseAxis = this.get(\"baseAxis\");\n\t\t\t\tconst xAxis = this.get(\"xAxis\");\n\t\t\t\tconst yAxis = this.get(\"yAxis\");\n\n\t\t\t\tif (field != undefined) {\n\t\t\t\t\tlet realField: string | undefined;\n\n\t\t\t\t\tif (baseAxis == xAxis) {\n\t\t\t\t\t\tif (field == \"value\") {\n\t\t\t\t\t\t\trealField = this._yField;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (field == \"open\") {\n\t\t\t\t\t\t\trealField = this._yOpenField;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (field == \"high\") {\n\t\t\t\t\t\t\trealField = this._yHighField;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (field == \"low\") {\n\t\t\t\t\t\t\trealField = this._yLowField;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (realField) {\n\t\t\t\t\t\t\tpositionY = yAxis.getDataItemPositionY(dataItem, realField as any, 0, this.get(\"vcy\", 1))\n\n\t\t\t\t\t\t\tpoint = yAxis.get(\"renderer\").positionToPoint(positionY);\n\n\t\t\t\t\t\t\ty = point.y;\n\t\t\t\t\t\t\tx = left + w * locationX;\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 (field == \"value\") {\n\t\t\t\t\t\t\trealField = this._xField;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (field == \"open\") {\n\t\t\t\t\t\t\trealField = this._xOpenField;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (field == \"high\") {\n\t\t\t\t\t\t\trealField = this._xHighField;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (field == \"low\") {\n\t\t\t\t\t\t\trealField = this._xLowField;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (realField) {\n\t\t\t\t\t\t\tpositionX = xAxis.getDataItemPositionX(dataItem, realField as any, 0, this.get(\"vcx\", 1));\n\n\t\t\t\t\t\t\tpoint = xAxis.get(\"renderer\").positionToPoint(positionX);\n\n\t\t\t\t\t\t\tx = point.x;\n\t\t\t\t\t\t\ty = bottom - h * locationY;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tx = left + w * locationX;\n\t\t\t\t\ty = bottom - h * locationY;\n\t\t\t\t}\n\n\t\t\t\tconst stacked = bullet.get(\"stacked\");\n\t\t\t\tif (stacked) {\n\t\t\t\t\tconst chart = this.chart;\n\t\t\t\t\tif (baseAxis == xAxis) {\n\t\t\t\t\t\tlet previousBullet = this._bullets[positionX + \"_\" + positionY];\n\t\t\t\t\t\tif (previousBullet) {\n\t\t\t\t\t\t\tlet previousBounds = previousBullet.bounds();\n\t\t\t\t\t\t\tlet bounds = sprite.localBounds();\n\t\t\t\t\t\t\tlet yo = y;\n\t\t\t\t\t\t\ty = previousBounds.top;\n\n\t\t\t\t\t\t\tif (stacked == \"down\") {\n\t\t\t\t\t\t\t\ty = previousBounds.bottom - bounds.top;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (stacked == \"auto\") {\n\t\t\t\t\t\t\t\tif (chart) {\n\t\t\t\t\t\t\t\t\tif (yo < chart.plotContainer.height() / 2) {\n\t\t\t\t\t\t\t\t\t\ty = previousBounds.bottom - bounds.top;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\ty += bounds.bottom;\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\telse {\n\t\t\t\t\t\t\t\ty += bounds.bottom;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._bullets[positionX + \"_\" + positionY] = sprite;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlet previousBullet = this._bullets[positionX + \"_\" + positionY];\n\t\t\t\t\t\tif (previousBullet) {\n\t\t\t\t\t\t\tlet previousBounds = previousBullet.bounds();\n\t\t\t\t\t\t\tlet bounds = sprite.localBounds();\n\t\t\t\t\t\t\tlet xo = x;\n\t\t\t\t\t\t\tx = previousBounds.right;\n\n\t\t\t\t\t\t\tif (stacked == \"down\") {\n\t\t\t\t\t\t\t\tx = previousBounds.left - bounds.right;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (stacked == \"auto\") {\n\t\t\t\t\t\t\t\tif (chart) {\n\t\t\t\t\t\t\t\t\tif (xo < chart.plotContainer.width() / 2) {\n\t\t\t\t\t\t\t\t\t\tx = previousBounds.left - bounds.right;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tx -= bounds.left;\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\telse {\n\t\t\t\t\t\t\t\tx -= bounds.left;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._bullets[positionX + \"_\" + positionY] = sprite;\n\t\t\t\t\t}\n\t\t\t\t}\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\tsprite.setAll({ x, 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\t/**\n\t * @ignore\n\t */\n\tpublic resetGrouping() {\n\t\t$object.each(this._dataSets, (_key, dataSet) => {\n\t\t\tif (dataSet != this._mainDataItems) {\n\t\t\t\t$array.each(dataSet, (dataItem) => {\n\t\t\t\t\tthis.disposeDataItem(dataItem);\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t\tthis._dataSets = {};\n\t\tthis._dataItems = this.mainDataItems;\n\t}\n\n\tprotected _handleDataSetChange() {\n\t\t$array.each(this._dataItems, (dataItem) => {\n\t\t\tlet bullets = dataItem.bullets;\n\t\t\tif (bullets) {\n\t\t\t\t$array.each(bullets, (bullet) => {\n\t\t\t\t\tif (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\tif(!this.getPrivate(\"doNotUpdateLegend\")){\n\t\t\tthis.updateLegendMarker(dataItem);\n\t\t\tthis.updateLegendValue(dataItem);\n\t\t}\n\n\t\tconst tooltip = this.get(\"tooltip\");\n\n\t\tif (tooltip) {\n\t\t\tif (!this.isHidden()) {\n\t\t\t\ttooltip._setDataItem(dataItem);\n\n\t\t\t\tif (dataItem) {\n\t\t\t\t\tlet locationX = this.get(\"locationX\", 0);\n\t\t\t\t\tlet locationY = this.get(\"locationY\", 1);\n\n\t\t\t\t\tlet itemLocationX = dataItem.get(\"locationX\", locationX);\n\t\t\t\t\tlet itemLocationY = dataItem.get(\"locationY\", locationY);\n\n\t\t\t\t\tconst xAxis = this.get(\"xAxis\");\n\t\t\t\t\tconst yAxis = this.get(\"yAxis\");\n\n\t\t\t\t\tconst vcx = this.get(\"vcx\", 1);\n\t\t\t\t\tconst vcy = this.get(\"vcy\", 1);\n\n\t\t\t\t\tconst xPos = xAxis.getDataItemPositionX(dataItem, this._tooltipFieldX!, this._aLocationX0 + (this._aLocationX1 - this._aLocationX0) * itemLocationX, vcx);\n\t\t\t\t\tconst yPos = yAxis.getDataItemPositionY(dataItem, this._tooltipFieldY!, this._aLocationY0 + (this._aLocationY1 - this._aLocationY0) * itemLocationY, vcy);\n\n\t\t\t\t\tconst point = this.getPoint(xPos, yPos);\n\n\t\t\t\t\tlet show = true;\n\t\t\t\t\t$array.each(this._valueFields, (field) => {\n\t\t\t\t\t\tif (dataItem.get(field as any) == null) {\n\t\t\t\t\t\t\tshow = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\n\t\t\t\t\tif (show) {\n\t\t\t\t\t\tconst chart = this.chart;\n\t\t\t\t\t\tif (chart && chart.inPlot(point)) {\n\t\t\t\t\t\t\ttooltip.label.text.markDirtyText();\n\t\t\t\t\t\t\ttooltip.set(\"tooltipTarget\", this._getTooltipTarget(dataItem));\n\t\t\t\t\t\t\ttooltip.set(\"pointTo\", this._display.toGlobal({ x: point.x, y: point.y }));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttooltip._setDataItem(undefined);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttooltip._setDataItem(undefined);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.hideTooltip();\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic hideTooltip(): Promise | undefined {\n\t\tconst tooltip = this.get(\"tooltip\");\n\t\tif (tooltip) {\n\t\t\ttooltip.set(\"tooltipTarget\", this);\n\t\t}\n\t\treturn super.hideTooltip();\n\t}\n\n\tprotected _getTooltipTarget(dataItem: DataItem): Sprite {\n\t\tif (this.get(\"seriesTooltipTarget\") == \"bullet\") {\n\t\t\tconst bullets = dataItem.bullets;\n\t\t\tif (bullets && bullets.length > 0) {\n\t\t\t\tconst bullet = bullets[0];\n\t\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\t\tif (sprite) {\n\t\t\t\t\treturn sprite;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLegendValue(dataItem?: DataItem | undefined) {\n\t\tconst legendDataItem = this.get(\"legendDataItem\");\n\n\t\tif (legendDataItem) {\n\n\t\t\tconst label = legendDataItem.get(\"label\");\n\t\t\tif (label) {\n\t\t\t\tlet txt = \"\";\n\t\t\t\tif (dataItem) {\n\t\t\t\t\tlabel._setDataItem(dataItem);\n\t\t\t\t\ttxt = this.get(\"legendLabelText\", label.get(\"text\", this.get(\"name\", \"\")));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlabel._setDataItem(this._emptyDataItem);\n\t\t\t\t\ttxt = this.get(\"legendRangeLabelText\", this.get(\"legendLabelText\", label.get(\"text\", this.get(\"name\", \"\"))));\n\t\t\t\t}\n\n\t\t\t\tlabel.set(\"text\", txt);\n\t\t\t}\n\n\t\t\tconst valueLabel = legendDataItem.get(\"valueLabel\");\n\t\t\tif (valueLabel) {\n\t\t\t\tlet txt = \"\";\n\t\t\t\tif (dataItem) {\n\t\t\t\t\tvalueLabel._setDataItem(dataItem);\n\t\t\t\t\ttxt = this.get(\"legendValueText\", valueLabel.get(\"text\", \"\"));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvalueLabel._setDataItem(this._emptyDataItem);\n\t\t\t\t\ttxt = this.get(\"legendRangeValueText\", valueLabel.get(\"text\", \"\"));\n\t\t\t\t}\n\n\t\t\t\tvalueLabel.set(\"text\", txt);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _getItemReaderLabel(): string {\n\t\tlet text = \"X: {\" + this._xField;\n\t\tif (this.get(\"xAxis\").isType>(\"DateAxis\")) {\n\t\t\ttext += \".formatDate()\";\n\t\t}\n\t\ttext += \"}; Y: {\" + this._yField;\n\t\tif (this.get(\"yAxis\").isType>(\"DateAxis\")) {\n\t\t\ttext += \".formatDate()\";\n\t\t}\n\t\ttext += \"}\";\n\t\treturn text;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getPoint(positionX: number, positionY: number): IPoint {\n\t\tlet x = this.get(\"xAxis\").get(\"renderer\").positionToCoordinate(positionX);\n\t\tlet y = this.get(\"yAxis\").get(\"renderer\").positionToCoordinate(positionY);\n\n\t\t// if coordinate is super big, canvas fails to draw line, capping to some big number (won't make any visual difference)\n\t\tlet max = 999999999;\n\t\tif (y < -max) {\n\t\t\ty = -max;\n\t\t}\n\t\tif (y > max) {\n\t\t\ty = max;\n\t\t}\n\n\t\tif (x < -max) {\n\t\t\tx = -max;\n\t\t}\n\t\tif (x > max) {\n\t\t\tx = max;\n\t\t}\n\n\t\treturn { x: x, y: y };\n\t}\n\n\tprotected _shouldInclude(_position: number): boolean {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic handleCursorHide() {\n\t\tthis.hideTooltip();\n\t\tthis.updateLegendValue(undefined);\n\t\tthis.updateLegendMarker(undefined);\n\t}\n\n\tprotected _afterDataChange() {\n\t\tsuper._afterDataChange();\n\t\tthis.get(\"xAxis\")._markDirtyKey(\"start\");\n\t\tthis.get(\"yAxis\")._markDirtyKey(\"start\");\n\t\tthis.resetExtremes();\n\t}\n\n\n\t/**\n\t * Resets cached axis scale values.\n\t */\n\tpublic resetExtremes() {\n\t\tthis.setPrivate(\"selectionMinX\", undefined);\n\t\tthis.setPrivate(\"selectionMaxX\", undefined);\n\t\tthis.setPrivate(\"selectionMinY\", undefined);\n\t\tthis.setPrivate(\"selectionMaxY\", undefined);\n\n\t\tthis.setPrivate(\"minX\", undefined);\n\t\tthis.setPrivate(\"minY\", undefined);\n\t\tthis.setPrivate(\"maxX\", undefined);\n\t\tthis.setPrivate(\"maxY\", undefined);\n\t}\n\n\t/**\n\t * Creates and returns an axis range object.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/axis-ranges/} for more info\n\t * @param axisDataItem Axis data item\n\t * @return Axis range\n\t */\n\tpublic createAxisRange(axisDataItem: DataItem): this[\"_axisRangeType\"] {\n\t\treturn this.axisRanges.push({\n\t\t\taxisDataItem: axisDataItem\n\t\t})\n\t}\n\n\t/**\n\t * A list of series's main (ungrouped) data items.\n\t *\n\t * @return Data items\n\t */\n\tpublic get mainDataItems(): Array> {\n\t\treturn this._mainDataItems;\n\t}\n}\n","import { Scrollbar, IScrollbarPrivate, IScrollbarSettings } from \"../../core/render/Scrollbar\";\nimport { XYChart } from \"./XYChart\";\nimport { Graphics } from \"../../core/render/Graphics\";\nimport * as $utils from \"../../core/util/Utils\";\n\nexport interface IXYChartScrollbarSettings extends IScrollbarSettings {\n\n}\n\nexport interface IXYChartScrollbarPrivate extends IScrollbarPrivate {\n}\n\n/**\n * Creates a scrollbar with chart preview in it.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/scrollbars/#Scrollbar_with_chart_preview} for more info\n * @important\n */\nexport class XYChartScrollbar extends Scrollbar {\n\n\tdeclare public _settings: IXYChartScrollbarSettings;\n\tdeclare public _privateSettings: IXYChartScrollbarPrivate;\n\n\tpublic static className: string = \"XYChartScrollbar\";\n\tpublic static classNames: Array = Scrollbar.classNames.concat([XYChartScrollbar.className]);\n\n\t/**\n\t * An instance of an [[XYChart]] that is used to plot chart preview in\n\t * scrollbar.\n\t */\n\tpublic readonly chart: XYChart = this.children.push(XYChart.new(this._root, {\n\t\tthemeTags: [\"chart\"],\n\t\tinteractive: false,\n\t\tinteractiveChildren: false,\n\t\tpanX: false,\n\t\tpanY: false,\n\t\twheelX: \"none\",\n\t\twheelY: \"none\"\n\t}));\n\n\t/**\n\t * A graphics element that is displayed over inactive portion of the\n\t * scrollbarpreview, to dim it down.\n\t */\n\tpublic readonly overlay: Graphics = this.children.push(Graphics.new(this._root, {\n\t\tthemeTags: [\"overlay\"],\n\t\tinteractive: false\n\t}));\n\n\tprotected _afterNew() {\n\t\tthis._addOrientationClass();\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"scrollbar\", \"xy\", \"chart\", this._settings.orientation]);\n\n\t\tconst children = this.children;\n\t\tchildren.moveValue(this.thumb);\n\t\tchildren.moveValue(this.startGrip);\n\t\tchildren.moveValue(this.endGrip);\n\n\t\tthis.thumb.set(\"opacity\", 0);\n\t\tthis.thumb.states.create(\"hover\", { opacity: 0.2 });\n\n\t\tconst plotContainer = this.chart.plotContainer;\n\t\tplotContainer.set(\"interactive\", false);\n\t\tplotContainer.remove(\"background\");\n\t\tplotContainer.children.removeValue(this.chart.zoomOutButton);\n\n\t\tsuper._afterNew();\n\t}\n\n\tprotected _updateThumb() {\n\t\tsuper._updateThumb();\n\n\t\tthis.overlay.set(\"draw\", (display) => {\n\t\t\tconst startGrip = this.startGrip;\n\t\t\tconst endGrip = this.endGrip;\n\n\t\t\tlet x0 = startGrip.x();\n\t\t\tlet y0 = startGrip.y();\n\n\t\t\tlet x1 = endGrip.x();\n\t\t\tlet y1 = endGrip.y();\n\n\t\t\tconst h = this.height();\n\t\t\tconst w = this.width();\n\n\t\t\tif (x0 > x1) {\n\t\t\t\t[x0, x1] = [x1, x0]\n\t\t\t}\n\n\t\t\tif (y0 > y1) {\n\t\t\t\t[y0, y1] = [y1, y0]\n\t\t\t}\n\n\t\t\tif (this.get(\"orientation\") === \"horizontal\") {\n\t\t\t\tdisplay.moveTo(0, 0);\n\t\t\t\tdisplay.lineTo(x0, 0);\n\t\t\t\tdisplay.lineTo(x0, h);\n\t\t\t\tdisplay.lineTo(0, h);\n\t\t\t\tdisplay.lineTo(0, 0);\n\n\t\t\t\tdisplay.moveTo(x1, 0);\n\t\t\t\tdisplay.lineTo(w, 0);\n\t\t\t\tdisplay.lineTo(w, h);\n\t\t\t\tdisplay.lineTo(x1, h);\n\t\t\t\tdisplay.lineTo(x1, 0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdisplay.moveTo(0, 0);\n\t\t\t\tdisplay.lineTo(0, y0);\n\t\t\t\tdisplay.lineTo(w, y0);\n\t\t\t\tdisplay.lineTo(w, 0);\n\t\t\t\tdisplay.lineTo(0, 0);\n\n\t\t\t\tdisplay.moveTo(0, y1);\n\t\t\t\tdisplay.lineTo(0, h);\n\t\t\t\tdisplay.lineTo(w, h);\n\t\t\t\tdisplay.lineTo(w, y1);\n\t\t\t\tdisplay.lineTo(0, y1);\n\t\t\t}\n\t\t})\n\t}\n}\n","import type { DataItem } from \"../../../core/render/Component\";\nimport type { AxisRenderer } from \"./AxisRenderer\";\nimport { Axis, IAxisSettings, IAxisPrivate, IAxisDataItem, IAxisEvents } from \"./Axis\";\nimport type { IXYSeriesDataItem, XYSeries } from \"../series/XYSeries\";\nimport * as $array from \"../../../core/util/Array\";\nimport * as $type from \"../../../core/util/Type\";\nimport * as $math from \"../../../core/util/Math\";\nimport * as $utils from \"../../../core/util/Utils\";\nimport { populateString } from \"../../../core/util/PopulateString\";\nimport type { Tooltip } from \"../../../core/render/Tooltip\";\n\nexport interface ICategoryAxisSettings extends IAxisSettings {\n\n\t/**\n\t * A function that can be used to specify how to configure axis fills.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Axis_fills} for more info\n\t */\n\tfillRule?: (dataItem: DataItem, index?: number) => void;\n\n\t/**\n\t * A field in data which holds categories.\n\t */\n\tcategoryField: string;\n\n\t/**\n\t * Relative location of where axis cell starts: 0 - beginning, 1 - end.\n\t *\n\t * @default 0\n\t */\n\tstartLocation?: number;\n\n\t/**\n\t * Relative location of where axis cell ends: 0 - beginning, 1 - end.\n\t *\n\t * @default 1\n\t */\n\tendLocation?: number;\n}\n\nexport interface ICategoryAxisDataItem extends IAxisDataItem {\n\n\t/**\n\t * Named category.\n\t */\n\tcategory?: string;\n\n\t/**\n\t * Named end category (for axis items that span multiple categories, like\n\t * axis ranges).\n\t */\n\tendCategory?: string;\n\n\t/**\n\t * Index of the data item.\n\t */\n\tindex?: number;\n\n\t/**\n\t * Relative location of the category within cell: 0 - start, 1 - end.\n\t */\n\tcategoryLocation?: number;\n\n\t/**\n\t * Relative location of the end category within cell: 0 - start, 1 - end.\n\t */\n\tendCategoryLocation?: number;\n\n\t/**\n\t * A distance to shift data item relative to its original position.\n\t *\n\t * The value is 0 to 1, where 1 is full witdth of the axis.\n\t *\n\t * Can be used to sort data items without modifying order of the actual data.\n\t */\n\tdeltaPosition?: number;\n\n}\n\nexport interface ICategoryAxisPrivate extends IAxisPrivate {\n\n\t/**\n\t * Start index of the current zoom scope.\n\t */\n\tstartIndex?: number;\n\n\t/**\n\t * End index of the current zoom scope.\n\t */\n\tendIndex?: number;\n\n}\n\nexport interface ICategoryAxisEvents extends IAxisEvents {\n\n}\n\n/**\n * Creates a category axis.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/axes/category-axis/} for more info\n * @important\n */\nexport class CategoryAxis extends Axis {\n\tpublic static className: string = \"CategoryAxis\";\n\tpublic static classNames: Array = Axis.classNames.concat([CategoryAxis.className]);\n\n\tdeclare public _settings: ICategoryAxisSettings;\n\tdeclare public _privateSettings: ICategoryAxisPrivate;\n\tdeclare public _dataItemSettings: ICategoryAxisDataItem;\n\tdeclare public _events: ICategoryAxisEvents;\n\n\tprotected _frequency: number = 1;\n\n\tprotected _itemMap: { [index: string]: DataItem } = {};\n\n\tprotected _afterNew() {\n\t\tthis._settings.themeTags = $utils.mergeTags(this._settings.themeTags, [\"axis\"]);\n\t\tthis.fields.push(\"category\");\n\t\tthis.setPrivateRaw(\"name\", \"category\");\n\t\tthis.addTag(\"category\");\n\t\tsuper._afterNew();\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tconst len = this.dataItems.length;\n\t\tlet i = 0;\n\t\tif (this._valuesDirty) {\n\t\t\tthis._itemMap = {};\n\t\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\t\tdataItem.setRaw(\"index\", i);\n\t\t\t\tthis._itemMap[dataItem.get(\"category\") as string] = dataItem;\n\t\t\t\ti++;\n\t\t\t})\n\n\t\t\tthis.setPrivateRaw(\"maxZoomFactor\", len);\n\t\t}\n\n\t\tthis.setPrivateRaw(\"startIndex\", Math.max(Math.round(this.get(\"start\", 0) * len), 0));\n\t\tthis.setPrivateRaw(\"endIndex\", Math.min(Math.round(this.get(\"end\", 1) * len), len));\n\n\t\tif (this._sizeDirty || this._valuesDirty || (this.isDirty(\"start\") || this.isDirty(\"end\") || this.isPrivateDirty(\"endIndex\") || this.isPrivateDirty(\"startIndex\") || this.isPrivateDirty(\"width\") || this.isPrivateDirty(\"height\"))) {\n\t\t\tif (this.dataItems.length > 0) {\n\t\t\t\tthis._handleRangeChange();\n\t\t\t\tthis._prepareAxisItems();\n\t\t\t\tthis._updateAxisRanges();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _handleRangeChange() {\n\t\t$array.each(this.series, (series) => {\n\t\t\tlet startCategory = this.dataItems[this.startIndex()].get(\"category\");\n\t\t\tlet endCategory = this.dataItems[this.endIndex() - 1].get(\"category\");\n\n\t\t\tlet baseAxis = series.get(\"baseAxis\");\n\t\t\tlet xAxis = series.get(\"xAxis\");\n\t\t\tlet yAxis = series.get(\"yAxis\");\n\n\t\t\tif (xAxis instanceof CategoryAxis && yAxis instanceof CategoryAxis) {\n\t\t\t\tseries._markDirtyAxes();\n\t\t\t}\n\t\t\telse if (baseAxis === this) {\n\t\t\t\tlet key: string | undefined;\n\t\t\t\tlet openKey: string | undefined;\n\t\t\t\tlet otherAxis = yAxis;\n\t\t\t\tif (xAxis === baseAxis) {\n\t\t\t\t\tif (series.get(\"categoryXField\")) {\n\t\t\t\t\t\tkey = \"categoryX\";\n\t\t\t\t\t}\n\t\t\t\t\tif (series.get(\"openCategoryXField\")) {\n\t\t\t\t\t\topenKey = \"openCategoryX\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (yAxis === baseAxis) {\n\t\t\t\t\tif (series.get(\"categoryYField\")) {\n\t\t\t\t\t\tkey = \"categoryY\";\n\t\t\t\t\t}\n\t\t\t\t\tif (series.get(\"openCategoryYField\")) {\n\t\t\t\t\t\topenKey = \"openCategoryY\";\n\t\t\t\t\t}\n\t\t\t\t\totherAxis = xAxis;\n\t\t\t\t}\n\n\t\t\t\tif (otherAxis.className == \"ValueAxis\") {\n\n\t\t\t\t\tif (key || openKey) {\n\t\t\t\t\t\tlet startDataItem: DataItem | undefined;\n\t\t\t\t\t\tlet endDataItem: DataItem | undefined;\n\n\t\t\t\t\t\tfor (let i = 0, len = series.dataItems.length; i < len; i++) {\n\t\t\t\t\t\t\tlet dataItem = series.dataItems[i];\n\t\t\t\t\t\t\tif (key) {\n\t\t\t\t\t\t\t\tif (dataItem.get(key as any) === startCategory) {\n\t\t\t\t\t\t\t\t\tstartDataItem = dataItem;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (openKey) {\n\t\t\t\t\t\t\t\tif (dataItem.get(openKey as any) === startCategory) {\n\t\t\t\t\t\t\t\t\tstartDataItem = dataItem;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (let i = series.dataItems.length - 1; i >= 0; i--) {\n\t\t\t\t\t\t\tlet dataItem = series.dataItems[i];\n\t\t\t\t\t\t\tif (key) {\n\t\t\t\t\t\t\t\tif (dataItem.get(key as any) === endCategory) {\n\t\t\t\t\t\t\t\t\tendDataItem = dataItem;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (openKey) {\n\t\t\t\t\t\t\t\tif (dataItem.get(openKey as any) === endCategory) {\n\t\t\t\t\t\t\t\t\tendDataItem = dataItem;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet startIndex = 0;\n\t\t\t\t\t\tlet endIndex = series.dataItems.length;\n\n\t\t\t\t\t\tif (startDataItem) {\n\t\t\t\t\t\t\tstartIndex = series.dataItems.indexOf(startDataItem);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (endDataItem) {\n\t\t\t\t\t\t\tendIndex = series.dataItems.indexOf(endDataItem) + 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tseries.setPrivate(\"startIndex\", startIndex);\n\t\t\t\t\t\tseries.setPrivate(\"endIndex\", endIndex);\n\n\t\t\t\t\t\tlet hasValue = false;\n\t\t\t\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\t\t\t\tconst dataItem = series.dataItems[i];\n\n\t\t\t\t\t\t\t$array.each(series.__valueXShowFields, (key) => {\n\t\t\t\t\t\t\t\tlet value = dataItem.get(key);\n\t\t\t\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\t\t\t\thasValue = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t$array.each(series.__valueYShowFields, (key) => {\n\t\t\t\t\t\t\t\tlet value = dataItem.get(key);\n\t\t\t\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\t\t\t\thasValue = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\tif (hasValue) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tseries.setPrivate(\"outOfSelection\", !hasValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tseries._markDirtyAxes();\t// must be outside\n\t\t\t}\n\t\t})\n\t}\n\n\n\tprotected _prepareAxisItems() {\n\t\tconst renderer = this.get(\"renderer\");\n\t\tconst len = this.dataItems.length;\n\n\t\tlet startIndex = this.startIndex();\n\t\tif (startIndex > 0) {\n\t\t\tstartIndex--;\n\t\t}\n\n\t\tlet endIndex = this.endIndex();\n\t\tif (endIndex < len) {\n\t\t\tendIndex++;\n\t\t}\n\n\t\tconst minorLabelsEnabled = renderer.get(\"minorLabelsEnabled\");\n\t\tconst minorGridEnabled = renderer.get(\"minorGridEnabled\", minorLabelsEnabled);\n\n\t\tlet maxCount = renderer.axisLength() / Math.max(renderer.get(\"minGridDistance\")!, 1);\n\t\tlet frequency = Math.max(1, Math.min(len, Math.ceil((endIndex - startIndex) / maxCount)));\n\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._toggleDataItem(this.dataItems[j], false);\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\t\t\tthis._toggleDataItem(dataItem, true);\n\n\t\t\tlet count = frequency;\n\t\t\tif (minorGridEnabled) {\n\t\t\t\tcount = 1;\n\t\t\t}\n\n\t\t\tthis._prepareDataItem(dataItem, f, count);\n\n\t\t\tf++;\n\t\t}\n\n\t\tif (renderer.get(\"minorGridEnabled\")) {\n\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\tlet dataItem = this.dataItems[i];\n\t\t\t\tif (i % frequency != 0) {\n\t\t\t\t\tthis._createAssets(dataItem, [\"minor\"], true);\n\t\t\t\t\tthis._toggleDataItem(dataItem, true);\n\t\t\t\t\tthis._prepareDataItem(dataItem, 0, 1);\n\n\t\t\t\t\tif (!minorLabelsEnabled) {\n\t\t\t\t\t\tdataItem.get(\"label\")?.setPrivate(\"visible\", false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\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, _adjustPosition?: boolean): 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 */\n\tpublic getCellWidthPosition(): number {\n\t\treturn this._frequency / 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._toggleDataItem(this.dataItems[j], false);\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\tthis._toggleDataItem(dataItem, true);\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, _adjustPosition?: boolean): 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}*/\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, _adjustPosition?: boolean): 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 { Candlestick, ICandlestickSettings, ICandlestickPrivate } from \"./Candlestick\";\n\n\nexport interface IOHLCSettings extends ICandlestickSettings {\n}\n\nexport interface IOHLCPrivate extends ICandlestickPrivate {\n}\n\nexport class OHLC extends Candlestick {\n\n\tdeclare public _settings: IOHLCSettings;\n\tdeclare public _privateSettings: IOHLCPrivate;\n\n\tpublic static className: string = \"OHLC\";\n\tpublic static classNames: Array = Candlestick.classNames.concat([OHLC.className]);\n\n\tpublic _draw() {\n\n\t\tconst display = this._display;\n\n\t\tdisplay.moveTo(this.get(\"lowX1\", 0), this.get(\"lowY1\", 0));\n\t\tdisplay.lineTo(this.get(\"highX1\", 0), this.get(\"highY1\", 0));\n\n\t\tlet w = this.width();\n\t\tlet h = this.height();\n\n\t\tif (this.get(\"orientation\") == \"vertical\") {\n\n\t\t\tlet lY = h;\n\t\t\tlet hY = 0;\n\t\t\tdisplay.moveTo(0, lY);\n\t\t\tdisplay.lineTo(w / 2, lY);\n\n\t\t\tdisplay.moveTo(w / 2, hY);\n\t\t\tdisplay.lineTo(w, hY);\n\t\t}\n\t\telse {\n\t\t\tlet lX = 0;\n\t\t\tlet hX = w;\n\n\t\t\tdisplay.moveTo(lX, 0);\n\t\t\tdisplay.lineTo(lX, h / 2);\n\n\t\t\tdisplay.moveTo(hX, h / 2);\n\t\t\tdisplay.lineTo(hX, h);\n\t\t}\n\t}\n}\n","import type { DataItem } from \"../../../core/render/Component\";\n\nimport { CandlestickSeries, ICandlestickSeriesPrivate, ICandlestickSeriesSettings, ICandlestickSeriesDataItem, ICandlestickSeriesAxisRange } from \"./CandlestickSeries\";\nimport { OHLC } from \"./OHLC\";\nimport { Template } from \"../../../core/util/Template\";\nimport { ListTemplate } from \"../../../core/util/List\";\n\nimport * as $utils from \"../../../core/util/Utils\";\n\nexport interface IOHLCSeriesDataItem extends ICandlestickSeriesDataItem {\n}\n\nexport interface IOHLCSeriesSettings extends ICandlestickSeriesSettings {\n}\n\nexport interface IOHLCSeriesPrivate extends ICandlestickSeriesPrivate {\n}\n\nexport interface IOHLCSeriesAxisRange extends ICandlestickSeriesAxisRange {\n\n\t/**\n\t * List of [[OHLC]] columns in a range.\n\t */\n\tcolumns: ListTemplate\n\n}\n\n/**\n * OHLC series.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/candlestick-series/} for more info\n * @important\n */\nexport class OHLCSeries extends CandlestickSeries {\n\n\tdeclare public _settings: IOHLCSeriesSettings;\n\tdeclare public _privateSettings: IOHLCSeriesPrivate;\n\tdeclare public _dataItemSettings: IOHLCSeriesDataItem;\n\tdeclare public _axisRangeType: IOHLCSeriesAxisRange;\n\n\tpublic static className: string = \"OHLCSeries\";\n\tpublic static classNames: Array = CandlestickSeries.classNames.concat([OHLCSeries.className]);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeColumn(dataItem: DataItem, listTemplate: ListTemplate): OHLC {\n\t\tconst column = this.mainContainer.children.push(listTemplate.make());\n\t\tcolumn._setDataItem(dataItem);\n\t\tlistTemplate.push(column);\n\t\treturn column;\n\t}\n\n\t/**\n\t * A list of OHLC bars in the series.\n\t *\n\t * `columns.template` can be used to configure OHLC bars.\n\t *\n\t * @default new ListTemplate\n\t */\n\tpublic readonly columns: ListTemplate = new ListTemplate(\n\t\tTemplate.new({\n\t\t\tthemeTags: [\"autocolor\"]\n\t\t}),\n\t\t() => OHLC._new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.columns.template.get(\"themeTags\", []), [\"ohlc\", \"series\", \"column\"])\n\t\t}, [this.columns.template])\n\t);\n\n\tprotected _processAxisRange(axisRange: this[\"_axisRangeType\"]) {\n\t\tsuper._processAxisRange(axisRange);\n\t\taxisRange.columns = new ListTemplate(\n\t\t\tTemplate.new({}),\n\t\t\t() => OHLC._new(this._root, {\n\t\t\t\tthemeTags: $utils.mergeTags(axisRange.columns.template.get(\"themeTags\", []), [\"ohlc\", \"series\", \"column\"]),\n\t\t\t}, [this.columns.template, axisRange.columns.template])\n\t\t);\n\t}\n}\n","import { LineSeries, ILineSeriesSettings, ILineSeriesPrivate, ILineSeriesDataItem } from \"./LineSeries\";\nimport { curveMonotoneYTension } from \"../../../core/render/MonotoneYTension\";\n\nexport interface ISmoothedYLineSeriesDataItem extends ILineSeriesDataItem {\n\n}\n\nexport interface ISmoothedYLineSeriesSettings extends ILineSeriesSettings {\n\n\t/**\n\t * A tension force for the smoothing (0-1). The smaller the value the more\n\t * curvy the line will be.\n\t *\n\t * @default 0.5\n\t */\n\ttension?: number;\n\n}\n\nexport interface ISmoothedYLineSeriesPrivate extends ILineSeriesPrivate {\n}\n\n/**\n * Smoothed line series suitable for vertical plots.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/smoothed-series/} for more info\n */\nexport class SmoothedYLineSeries extends LineSeries {\n\tpublic static className: string = \"SmoothedYLineSeries\";\n\tpublic static classNames: Array = LineSeries.classNames.concat([SmoothedYLineSeries.className]);\n\n\tdeclare public _settings: ISmoothedYLineSeriesSettings;\n\tdeclare public _privateSettings: ISmoothedYLineSeriesPrivate;\n\tdeclare public _dataItemSettings: ISmoothedYLineSeriesDataItem;\n\n\tprotected _afterNew() {\n\t\tthis._setDefault(\"curveFactory\", curveMonotoneYTension(this.get(\"tension\", 0.5)) as any);\n\t\tsuper._afterNew();\n\t}\n\n\tpublic _updateChildren() {\n\t\tif (this.isDirty(\"tension\")) {\n\t\t\tthis.set(\"curveFactory\", curveMonotoneYTension(this.get(\"tension\", 0.5)) as any);\n\t\t\tthis._valuesDirty = true;\n\t\t}\n\n\t\tsuper._updateChildren();\n\t}\n}\n","import { LineSeries, ILineSeriesSettings, ILineSeriesPrivate, ILineSeriesDataItem } from \"./LineSeries\";\nimport { curveMonotoneXTension } from \"../../../core/render/MonotoneXTension\";\n\n\nexport interface ISmoothedXLineSeriesDataItem extends ILineSeriesDataItem {\n\n}\n\nexport interface ISmoothedXLineSeriesSettings extends ILineSeriesSettings {\n\n\t/**\n\t * A tension force for the smoothing (0-1). The smaller the value the more\n\t * curvy the line will be.\n\t *\n\t * @default 0.5\n\t */\n\ttension?: number;\n\n}\n\nexport interface ISmoothedXLineSeriesPrivate extends ILineSeriesPrivate {\n}\n\n/**\n * Smoothed line series suitable for horizontal plots.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/smoothed-series/} for more info\n */\nexport class SmoothedXLineSeries extends LineSeries {\n\tpublic static className: string = \"SmoothedXLineSeries\";\n\tpublic static classNames: Array = LineSeries.classNames.concat([SmoothedXLineSeries.className]);\n\n\tdeclare public _settings: ISmoothedXLineSeriesSettings;\n\tdeclare public _privateSettings: ISmoothedXLineSeriesPrivate;\n\tdeclare public _dataItemSettings: ISmoothedXLineSeriesDataItem;\n\n\tprotected _afterNew() {\n\t\tthis._setDefault(\"curveFactory\", curveMonotoneXTension(this.get(\"tension\", 0.5)) as any);\n\t\tsuper._afterNew();\n\t}\n\n\tpublic _updateChildren() {\n\t\tif (this.isDirty(\"tension\")) {\n\t\t\tthis.set(\"curveFactory\", curveMonotoneXTension(this.get(\"tension\", 0.5)) as any);\n\t\t\tthis._valuesDirty = true;\n\t\t}\n\n\t\tsuper._updateChildren();\n\t}\n}\n","import { LineSeries, ILineSeriesSettings, ILineSeriesPrivate, ILineSeriesDataItem } from \"./LineSeries\";\nimport { curveCardinal, CurveCardinalFactory } from \"d3-shape\";\n\nexport interface SmoothedXYLineSeriesDataItem extends ILineSeriesDataItem {\n\n}\n\nexport interface ISmoothedXYLineSeriesDataItem extends ILineSeriesDataItem {\n\n}\n\nexport interface SmoothedXYLineSeriesProperties extends ILineSeriesSettings {\n\n\t/**\n\t * A tension force for the smoothing (0-1). The smaller the value the more\n\t * curvy the line will be.\n\t *\n\t * @default 0.5\n\t */\n\ttension?: number;\n\n\t/**\n\t * @ignore\n\t*/\n\tcurveFactory?: CurveCardinalFactory\n\n}\n\nexport interface SmoothedXYLineSeriesPrivate extends ILineSeriesPrivate {\n}\n\n/**\n * Smoothed line series suitable for XY (scatter) charts\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/smoothed-series/} for more info\n */\nexport class SmoothedXYLineSeries extends LineSeries {\n\tpublic static className: string = \"SmoothedXYLineSeries\";\n\tpublic static classNames: Array = LineSeries.classNames.concat([SmoothedXYLineSeries.className]);\n\n\tdeclare public _settings: SmoothedXYLineSeriesProperties;\n\tdeclare public _privateSettings: SmoothedXYLineSeriesPrivate;\n\tdeclare public _dataItemSettings: SmoothedXYLineSeriesDataItem;\n\n\tprotected _afterNew() {\n\t\tthis._setDefault(\"curveFactory\", curveCardinal.tension(this.get(\"tension\", 0.5)));\n\t\tsuper._afterNew();\n\t}\n\n\tpublic _updateChildren() {\n\t\tif (this.isDirty(\"tension\")) {\n\t\t\tthis.set(\"curveFactory\", curveCardinal.tension(this.get(\"tension\", 0.5)) as any);\n\t\t\tthis._valuesDirty = true;\n\t\t}\n\n\t\tsuper._updateChildren();\n\t}\n}\n","function Step(context, t) {\n this._context = context;\n this._t = t;\n}\n\nStep.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = this._y = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: {\n if (this._t <= 0) {\n this._context.lineTo(this._x, y);\n this._context.lineTo(x, y);\n } else {\n var x1 = this._x * (1 - this._t) + x * this._t;\n this._context.lineTo(x1, this._y);\n this._context.lineTo(x1, y);\n }\n break;\n }\n }\n this._x = x, this._y = y;\n }\n};\n\nexport default function(context) {\n return new Step(context, 0.5);\n}\n\nexport function stepBefore(context) {\n return new Step(context, 0);\n}\n\nexport function stepAfter(context) {\n return new Step(context, 1);\n}\n","import { LineSeries, ILineSeriesSettings, ILineSeriesPrivate, ILineSeriesDataItem } from \"./LineSeries\";\nimport type { AxisRenderer } from \"../axes/AxisRenderer\";\nimport type { Axis } from \"../axes/Axis\";\nimport { Percent, p100 } from \"../../../core/util/Percent\";\nimport type { DataItem } from \"../../../core/render/Component\";\nimport { curveStepAfter } from \"d3-shape\";\n\nexport interface IStepLineSeriesDataItem extends ILineSeriesDataItem {\n}\n\nexport interface IStepLineSeriesSettings extends ILineSeriesSettings {\n\n\t/**\n\t * Width of the step in percent relative to the cell width.\n\t *\n\t * NOTE: setting this to less than 100% makes sense only when risers are\n\t * disabled: `noRisers: true`\n\t *\n\t * @default 100%\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/step-line-series/#Step_width} for more info\n\t */\n\tstepWidth?: Percent;\n\n\t/**\n\t * Disables vertical connecting lines for the steps.\n\t *\n\t * @default false\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/step-line-series/#Disabling_risers} for more info\n\t */\n\tnoRisers?: boolean;\n\n}\n\nexport interface IStepLineSeriesPrivate extends ILineSeriesPrivate {\n}\n\nexport class StepLineSeries extends LineSeries {\n\tpublic static className: string = \"StepLineSeries\";\n\tpublic static classNames: Array = LineSeries.classNames.concat([StepLineSeries.className]);\n\n\tdeclare public _settings: IStepLineSeriesSettings;\n\tdeclare public _privateSettings: IStepLineSeriesPrivate;\n\tdeclare public _dataItemSettings: IStepLineSeriesDataItem;\n\n\tprotected _afterNew() {\n\t\tthis._setDefault(\"curveFactory\", curveStepAfter);\n\t\tsuper._afterNew();\n\t}\n\n\n\tprotected _getPoints(dataItem: DataItem, o: { points: Array>, segments: number[][][], stacked: boolean | undefined, getOpen: boolean, basePosX: number, basePosY: number, fillVisible: boolean | undefined, xField: string, yField: string, xOpenField: string, yOpenField: string, vcx: number, vcy: number, baseAxis: Axis, xAxis: Axis, yAxis: Axis, locationX: number, locationY: number, openLocationX: number, openLocationY: number }) {\n\t\tlet points = o.points;\n\n\t\tlet width = this.get(\"stepWidth\", p100).value / 2;\n\n\t\tlet itemLocationX0 = dataItem.get(\"locationX\", o.locationX);\n\t\tlet itemLocationY0 = dataItem.get(\"locationY\", o.locationY);\n\t\tlet itemLocationX1 = itemLocationX0;\n\t\tlet itemLocationY1 = itemLocationY0;\n\n\t\tif (o.baseAxis === o.xAxis) {\n\t\t\titemLocationX0 -= width;\n\t\t\titemLocationX1 += width;\n\t\t}\n\t\telse if (o.baseAxis === o.yAxis) {\n\t\t\titemLocationY0 -= width;\n\t\t\titemLocationY1 += width;\n\t\t}\n\n\t\tlet xPos0 = o.xAxis.getDataItemPositionX(dataItem, o.xField, itemLocationX0, o.vcx);\n\t\tlet yPos0 = o.yAxis.getDataItemPositionY(dataItem, o.yField, itemLocationY0, o.vcy);\n\n\t\tlet xPos1 = o.xAxis.getDataItemPositionX(dataItem, o.xField, itemLocationX1, o.vcx);\n\t\tlet yPos1 = o.yAxis.getDataItemPositionY(dataItem, o.yField, itemLocationY1, o.vcy);\n\n\t\tif (this._shouldInclude(xPos0)) {\n\n\t\t\tconst iPoint0 = this.getPoint(xPos0, yPos0);\n\t\t\tconst point0 = [iPoint0.x, iPoint0.y];\n\n\t\t\tconst iPoint1 = this.getPoint(xPos1, yPos1);\n\t\t\tconst point1 = [iPoint1.x, iPoint1.y];\n\n\t\t\tif (o.fillVisible) {\n\t\t\t\tlet xOpenPos0: number = xPos0;\n\t\t\t\tlet yOpenPos0: number = yPos0;\n\t\t\t\tlet xOpenPos1: number = xPos1;\n\t\t\t\tlet yOpenPos1: number = yPos1;\n\n\t\t\t\tif (o.baseAxis === o.xAxis) {\n\t\t\t\t\tyOpenPos0 = o.basePosY;\n\t\t\t\t\tyOpenPos1 = o.basePosY;\n\t\t\t\t}\n\t\t\t\telse if (o.baseAxis === o.yAxis) {\n\t\t\t\t\txOpenPos0 = o.basePosX;\n\t\t\t\t\txOpenPos1 = o.basePosX;\n\t\t\t\t}\n\n\t\t\t\tif (o.getOpen) {\n\t\t\t\t\tlet valueX = dataItem.get(o.xOpenField as any);\n\t\t\t\t\tlet valueY = dataItem.get(o.yOpenField as any);\n\n\t\t\t\t\tif (valueX != null && valueY != null) {\n\t\t\t\t\t\titemLocationX0 = dataItem.get(\"openLocationX\", o.openLocationX);\n\t\t\t\t\t\titemLocationY0 = dataItem.get(\"openLocationY\", o.openLocationY);\n\n\t\t\t\t\t\titemLocationX1 = itemLocationX0;\n\t\t\t\t\t\titemLocationY1 = itemLocationY0;\n\n\t\t\t\t\t\tif (o.baseAxis === o.xAxis) {\n\t\t\t\t\t\t\titemLocationX0 -= width;\n\t\t\t\t\t\t\titemLocationX1 += width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (o.baseAxis === o.yAxis) {\n\t\t\t\t\t\t\titemLocationY0 -= width;\n\t\t\t\t\t\t\titemLocationY1 += width;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (o.stacked) {\n\t\t\t\t\t\t\tlet stackToItemX = dataItem.get(\"stackToItemX\")!;\n\t\t\t\t\t\t\tlet stackToItemY = dataItem.get(\"stackToItemY\")!;\n\n\t\t\t\t\t\t\tif (stackToItemX) {\n\t\t\t\t\t\t\t\txOpenPos0 = o.xAxis.getDataItemPositionX(stackToItemX, o.xField, itemLocationX0, (stackToItemX.component as StepLineSeries).get(\"vcx\"));\n\t\t\t\t\t\t\t\txOpenPos1 = o.xAxis.getDataItemPositionX(stackToItemX, o.xField, itemLocationX1, (stackToItemX.component as StepLineSeries).get(\"vcx\"));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tif (o.yAxis === o.baseAxis) {\n\t\t\t\t\t\t\t\t\txOpenPos0 = o.basePosX;\n\t\t\t\t\t\t\t\t\txOpenPos1 = o.basePosX;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (o.baseAxis === o.yAxis) {\n\t\t\t\t\t\t\t\t\txOpenPos0 = o.xAxis.getDataItemPositionX(dataItem, o.xOpenField, itemLocationX0, o.vcx);\n\t\t\t\t\t\t\t\t\txOpenPos1 = o.xAxis.getDataItemPositionX(dataItem, o.xOpenField, itemLocationX1, o.vcx);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (stackToItemY) {\n\t\t\t\t\t\t\t\tyOpenPos0 = o.yAxis.getDataItemPositionY(stackToItemY, o.yField, itemLocationY0, (stackToItemY.component as StepLineSeries).get(\"vcy\"));\n\t\t\t\t\t\t\t\tyOpenPos1 = o.yAxis.getDataItemPositionY(stackToItemY, o.yField, itemLocationY1, (stackToItemY.component as StepLineSeries).get(\"vcy\"));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tif (o.xAxis === o.baseAxis) {\n\t\t\t\t\t\t\t\t\tyOpenPos0 = o.basePosY;\n\t\t\t\t\t\t\t\t\tyOpenPos1 = o.basePosY;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (o.baseAxis === o.yAxis) {\n\t\t\t\t\t\t\t\t\tyOpenPos0 = o.yAxis.getDataItemPositionY(dataItem, o.yOpenField, itemLocationY0, o.vcy);\n\t\t\t\t\t\t\t\t\tyOpenPos1 = o.yAxis.getDataItemPositionY(dataItem, o.yOpenField, itemLocationY1, o.vcy);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\txOpenPos0 = o.xAxis.getDataItemPositionX(dataItem, o.xOpenField, itemLocationX0, o.vcx);\n\t\t\t\t\t\t\tyOpenPos0 = o.yAxis.getDataItemPositionY(dataItem, o.yOpenField, itemLocationY0, o.vcy);\n\t\t\t\t\t\t\txOpenPos1 = o.xAxis.getDataItemPositionX(dataItem, o.xOpenField, itemLocationX1, o.vcx);\n\t\t\t\t\t\t\tyOpenPos1 = o.yAxis.getDataItemPositionY(dataItem, o.yOpenField, itemLocationY1, o.vcy);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlet closeIPoint0 = this.getPoint(xOpenPos0, yOpenPos0);\n\t\t\t\tlet closeIPoint1 = this.getPoint(xOpenPos1, yOpenPos1);\n\n\t\t\t\tpoint0[2] = closeIPoint0.x;\n\t\t\t\tpoint0[3] = closeIPoint0.y;\n\n\t\t\t\tpoint1[2] = closeIPoint1.x;\n\t\t\t\tpoint1[3] = closeIPoint1.y;\n\t\t\t}\n\n\t\t\tpoints.push(point0);\n\t\t\tpoints.push(point1);\n\n\t\t\tdataItem.set(\"point\", {x:point0[0] + (point1[0] - point0[0]) / 2, y:point0[1] + (point1[1] - point0[1]) / 2 });\n\t\t}\n\n\t\tif (this.get(\"noRisers\")) {\n\t\t\to.points = [];\n\t\t\to.segments.push(points);\n\t\t}\n\t}\n}\n","import * as m from \"./../../dist/es2015/xy.js\";\nexport const am5xy = m;","export function point(that, x, y) {\n that._context.bezierCurveTo(\n that._x1 + that._k * (that._x2 - that._x0),\n that._y1 + that._k * (that._y2 - that._y0),\n that._x2 + that._k * (that._x1 - x),\n that._y2 + that._k * (that._y1 - y),\n that._x2,\n that._y2\n );\n}\n\nexport function Cardinal(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: point(this, this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n case 2: this._point = 3; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new Cardinal(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n"],"names":["XYChart","this","chartContainer","children","push","new","_root","width","layout","verticalLayout","height","horizontalLayout","yAxesAndPlotContainer","maskContent","plotsContainer","plotContainer","isMeasured","topPlotContainer","themeTags","icon","x","y","_afterNew","_defaultThemes","super","_disposers","xAxes","yAxes","root","zoomOutButton","events","on","zoomOut","hide","states","lookup","set","seriesContainer","_processAxis","bottomAxesContainer","leftAxesContainer","topGridContainer","bulletsContainer","fill","fromHex","fillOpacity","event","_handlePlotDown","_handlePlotUp","_handlePlotMove","_maskGrid","_setUpTouch","_beforeChanged","isDirty","get","_display","cancelTouch","gridContainer","_removeSeries","series","_unstack","_posXDp","dispose","_posYDp","undefined","xAxis","markDirtyExtremes","yAxis","cursor","snapToSeries","handleWheel","wheelX","wheelY","wheelEvent","originalEvent","preventDefault","plotPoint","toLocal","point","wheelStep","shiftY","deltaY","shiftX","deltaX","wheelZoomPositionX","wheelZoomPositionY","each","axis","start","end","position","fixPosition","newStart","newEnd","getPrivate","Infinity","_handleWheelAnimation","zoom","delta","_getWheelSign","se","_fixWheel","_handleSetWheel","_wheelDp","Math","abs","sign","diff","button","local","pointerId","_downPoints","length","getIndex","_downStartX","_downEndX","_downStartY","_downEndY","_downPoint","clientX","clientY","panX","panY","_panStart","_panEnd","eventType","isEnabled","dispatch","type","target","animation","_dispatchWheelAnimation","downPoint","_isPanning","_movePoints","_handlePinch","documentPointToRoot","scrollbarX","disableType","panStart","panEnd","enableType","scrollbarY","i","downPoints","movePoints","k","movePoint","w","h","downPoint0","downPoint1","movePoint0","movePoint1","downStartX","downEndX","downPos0","downPos1","movePos0","movePos1","d","max","s","e","sa","ea","downStartY","downEndY","_handleCursorPosition","cursorPoint","snapToSeriesBy","dataItems","isHidden","isHiding","startIndex","endIndex","dataItem","tooltipDataItem","closestItem","minDistance","distance","hypot","tooltip","_setDataItem","component","showDataItemTooltip","handleMove","toGlobal","_updateCursor","updateCursor","_addCursor","_prepareChildren","_colorize","previous","_prevSettings","_disposeProperty","_setChart","_pushPropertyDisposer","_handleCursorSelectEnd","parent","topAxesContainer","_handleScrollbar","grip","setPrivate","getTooltipText","rightAxesContainer","_handleZoomOut","_processSeries","addDisposer","_fixPosition","isType","_markDirtyKey","_markDirtyAxes","colorSet","color","next","_setSoft","behavior","downPositionX","downPositionY","positionX","min","positionY","position0","toAxisPosition","position1","axes","priority","axisStart","axisEnd","zoomAnimation","updateScrollbar","setPrivateRaw","container","onAll","change","oldValues","_removeAxis","newValue","processChart","setIndex","index","insertIndex","oldValue","Error","moveValue","value","newIndex","isDisposed","axisParent","removeValue","gridParent","topGridParent","_updateChartLayout","left","right","processAxis","_handleAxisSelection","force","indexOf","setRaw","updateGrips","visible","show","inPlot","otherCharts","_otherCharts","global","chart","chartPlotContainer","documentPoint","rootPointToDocument","chartRoot","arrangeTooltips","hh","plotT","plotB","tooltips","closest","closestPoint","sum","_movePoint","maxTooltipDistance","maxTooltipDistanceBy","tooltipSeries","hidden","_tooltipToLocal","tooltipContainer","count","sort","a","b","prevY","centerY","top","bottom","_fy","reverse","prevBottom","bounds","classNames","concat","className","XYChartDefaultTheme","setupDefaultRules","ic","interfaceColors","language","r","rule","bind","setAll","colors","paddingLeft","paddingRight","paddingTop","paddingBottom","pinchZoomX","pinchZoomY","legendLabelText","saturation","cornerRadiusTR","cornerRadiusTL","cornerRadiusBR","cornerRadiusBL","focusable","create","strokeOpacity","inside","minGridDistance","opacity","minPosition","maxPosition","fontSize","text","populateText","centerX","layer","exportable","moveThreshold","strokeDasharray","ariaLabel","translate","minZoomCount","maxZoomCount","maxZoomFactor","maxDeviation","snapTooltip","tooltipLocation","zoomX","zoomY","fixAxisSize","location","multiLocation","crisp","opposite","inversed","cellStartLocation","cellEndLocation","cursorOverStyle","startLocation","endLocation","fillRule","axisFill","gridIntervals","timeUnit","dateFormats","periodChangeDateFormats","tooltipDateFormats","markUnitChange","strictMinMax","groupData","groupCount","groupIntervals","endValue","intervalDuration","baseInterval","gridInterval","Date","locale","firstDayOfWeek","utc","timezone","getTime","val","round","baseValue","logarithmic","autoZoom","step","baseUnit","maskBullets","stackToNegative","locationX","locationY","openValueXGrouped","openValueYGrouped","valueXGrouped","valueYGrouped","seriesTooltipTarget","adjustBulletPosition","clustered","strokeWidth","role","connect","autoGapCount","draw","display","sprite","moveTo","lineTo","tension","lowValueXGrouped","lowValueYGrouped","highValueXGrouped","highValueYGrouped","interactive","draggable","rotation","XYCursor","_settings","_drawLines","setTimeout","lineX","_handleXLine","lineY","_handleYLine","ev","_handleLineFocus","_handleLineBlur","document","_handleLineMove","keyCode","dir","increment","focused","getCellWidthPosition","_line","alwaysShow","_tooltipX","_updateXLine","_tooltipY","_updateYLine","_handleSyncWith","syncWith","_updateChildren","_getPoint","_toX","animate","key","to","duration","easing","_toY","_handleMove","_handleCursorDown","_handleCursorUp","native","selection","_inPlot","rootPoint","_getPosition","charAt","lastPoint","_lastPoint","skipEvent","xyPos","userPositionX","userPositionY","xy","handleCursorShow","_updateLines","_updateSelection","_onHide","handleCursorHide","_onShow","_dispose","Axis","background","labelsContainer","axisHeader","axisRanges","disposeDataItem","_processAxisRange","renderer","ghostLabel","makeLabel","adapters","disable","tooltipText","tooltipHTML","_updateFinals","_start","_end","sAnimation","_sAnimation","eAnimation","_eAnimation","maxZoomFactorReal","minZoomFactor","playing","once","_markDirty","stop","_series","_createAssets","_rangesDirty","_prepareDataItem","above","grid","_dataItem","_index","markDirtySelectionExtremes","_calculateTotals","_updateAxisRanges","_bullets","axisRange","_seriesAxisRanges","_inversed","_axisLength","axisLength","_updateLC","rendererTags","addTag","toLowerCase","_applyThemes","label","_updateTooltipBounds","updateTooltipBounds","_updateBounds","axisHeadersContainer","onPrivate","markDirtySize","hideDataItem","_toggleFHDataItem","showDataItem","forceHidden","fh","tick","bullet","_toggleDataItem","v","tags","minor","m","remove","labels","makeGrid","makeTick","ticks","makeAxisFill","_processBullet","axisBullet","_afterChanged","_updatePositions","axisFills","_updateGhost","localBounds","gWidth","ceil","_getText","updateLabel","_cursorPosition","_snapToSeries","updateTooltip","getSeriesItem","updateLegendMarker","updateLegendValue","roundAxisPosition","_updateTooltipText","positionTooltip","_location","processSeriesDataItem","_fields","_clearDirty","_sizeDirty","coordinateToPosition","coordinate","toGlobalPosition","shouldGap","_nextItem","_autoGapCount","_fieldName","createAxisRange","axisDataItem","_groupSeriesData","AxisBullet","uid","AxisLabel","AxisLabelRadial","AxisRenderer","_new","template","make","gridCount","thumb","_handleThumbDown","_handleThumbUp","_handleThumbMove","_changed","pan","_thumbDownPoint","_downStart","_downEnd","_event","downStart","downEnd","extra","_getPan","_point1","_point2","positionToCoordinate","_tooltip","_updateSize","markDirty","_clear","toggleVisibility","_positionTooltip","AxisRendererX","gridTemplate","graphics","axisChildren","removeTag","_markDirtyRedraw","point1","point2","_ls","_lc","innerWidth","positionToPoint","updateTick","endPosition","updateGrid","updateBullet","bulletPosition","previousBullet","previousSprite","updateFill","x0","x1","fillDrawMethod","num","pointerOrientation","oldBounds","AxisRendererY","innerHeight","y0","y1","AxisTick","DateAxis","_setBaseInterval","interval","_baseDuration","_fixZoomFactor","baseMainDuration","_groupData","groupInterval","_handleRangeChange","_dataGrouped","mainDataSetId","setDataSet","resetGrouping","_seriesDataGrouped","intervals","baseDuration","_dataSets","fields","baseAxis","_valueYFields","_valueXFields","_mainDataItems","groupCallback","groupOriginals","newDataItem","previousTime","dataSetId","groupFieldValues","workingFields","field","firstTime","prevNewDataItem","dataContext","time","roundedTime","_makeDataItem","groupKey","currentValue","average","_dataSetId","_groupingCalculated","getGroupInterval","getIntervalMax","_intervalMax","getIntervalMin","_intervalMin","selectionMin","selectionMax","current","modifiedDifference","newId","fieldName","endIndex2","firstDataItem","lastDataItem","lastDate","firstDate","outOfSelection","_adjustMinMax","_strictMode","_intervalDuration","_saveMinMax","id","_getM","_getMinorInterval","minorGridInterval","_prepareAxisItems","nextGridUnit","format","previousValue","formats","minorLabelsEnabled","minorGridEnabled","minorDuration","_dataItems","processDataItem","date","dateFormatter","labelEndValue","minorTimeUnit","minorCount","mmm","previousMinorValue","minorValue","minorFormats","minorDataItem","minorDataItems","minorEndValue","minorLabel","j","inited","positionToValue","_getDelta","_deltaMinMax","_fixMin","startTime","endTime","_fixMax","_updateDates","_date","open","close","getDataItemPositionX","cellLocation","axisLocation","openValue","closeValue","_baseValue","valueToPosition","getDataItemCoordinateX","getDataItemPositionY","getDataItemCoordinateY","firstDay","NaN","adjustPosition","snap","result","diValue","first","second","nextItem","value1","zoomToDates","zoomToValues","positionToDate","dateToPosition","GaplessDateAxis","valueFields","_getDates","_customDates","_dates","dates","found","_updateAllDates","extraMax","extraMin","len","baseCount","unshift","itemValue","valueToIndex","findex","floor","startValue","_seriesValuesDirty","maxCount","Number","MAX_SAFE_INTEGER","frequency","_frequency","realDuration","now","previousDataItem","selectedItems","_getIndexes","_m","_addMinorGrid","timeUnit2","previousLabel","worse","_pickWorse","dataItemA","dataItemB","valueA","valueB","getDate","mTimeUnit","maxValue","minorSelectedItems","firstValue","items","c","fullDuration","originalValue","realValue","_hasDate","Grid","isPrivateDirty","ValueAxis","_dirtyExtremes","_dirtySelectionExtremes","syncWithAxis","_syncDp","someDirty","_valuesDirty","_getMinMax","_getSelectionMinMax","_formatText","numberFormat","formatter","getNumberFormatter","differencePower","minLog","_minLogAdjusted","log","LOG10E","pow","stepPower","stepAdjusted","minorGridCount","minorStep","nextValue","decCount","fillEndPosition","labelEndPosition","hasTag","minMaxStep","stepDecimalPlaces","E","treatZeroAs","valueToFinalPosition","getX","getY","_cellLocation","getStackedXValueWorking","getStackedYValueWorking","basePosition","cellEndValue","fixSmallStep","vc","fieldWorking","total","minDefined","maxDefined","selectionStrictMinMax","seriesMin","seriesMax","minX","maxX","minY","maxY","isShowing","range","_minReal","_maxReal","smin","minMaxStep2","selectionMinReal","selectionMaxReal","_syncAxes","LN10","minDiff","initialMin","initialMax","minAdapted","fold","maxAdapted","strictMinMaxSelection","strict","animatePrivate","exponent","power","_min","_max","strictMode","difference","stepDivisor","maxPrecision","ceiledStep","MAX_VALUE","minCount","_adjustPosition","extraDecimals","decimals","oldDiff","syncMin","syncMax","syncStep","currentCount","synced","omin","omax","ostep","_checkSync","BaseColumnSeries","_makeGraphics","listTemplate","makeColumn","_makeFieldNames","categoryAxis","valueAxis","_xOpenField","_xField","_yOpenField","_yField","_createGraphics","_ph","_pw","columnsTemplate","columns","clusterCount","stacked","xRenderer","yRenderer","cellLocationX0","cellLocationX1","cellLocationY0","cellLocationY1","_aLocationX0","_aLocationX1","_aLocationY0","_aLocationY1","_axesDirty","_stackDirty","_toggleColumn","_updateGraphics","_skipped","legendDataItem","markerRectangle","ds","setting","graphicsArray","rangeGraphics","xField","yField","valueX","valueY","xOpenField","yOpenField","openLocationX","openLocationY","xStart","xEnd","yStart","yEnd","l","t","vcy","vcx","fitW","fitH","offset","stackToItemY","stackToItemX","_updateSeriesGraphics","_applyGraphicsStates","maxWidth","maxHeight","ptl","getPoint","pbr","tooltipPoint","_x","_y","_handleDataSetChange","dropFromOpen","riseFromOpen","dropFromPrevious","riseFromPrevious","previousClose","apply","list","promises","Promise","all","bullets","column","_getTooltipTarget","Candlestick","_draw","CandlestickSeries","mainContainer","getRaw","lx0","lx1","ly0","ly1","hx0","hx1","hy0","hy1","orientation","_xLowField","_xHighField","_yLowField","_yHighField","_updateCandleGraphics","pl0","pl1","ph0","ph1","ColumnSeries","LineSeries","strokes","fills","_fillGenerator","p","makeStroke","stroke","makeFill","_strokeTemplate","_fillTemplate","legendStroke","_legendStroke","legendFill","_legendFill","curveFactory","_strokeGenerator","curve","strokeTemplateField","fillTemplateField","strokeTemplateFound","fillTemplateFound","hasValues","_valueFields","_endIndex","_clearGraphics","_sindex","_dindex","_startSegment","clear","dataItemIndex","currentEndIndex","fillTemplate","originalTemplate","strokeTemplate","xOpenFieldValue","yOpenFieldValue","basePosX","basePosY","baseField","segments","points","fillVisible","getOpen","o","_getPoints","_endLine","_drawStroke","_drawFill","itemLocationX","itemLocationY","xPos","yPos","_shouldInclude","iPoint","xPos0","yPos0","closeIPoint","p0","p1","p2","p3","prev","_previousPoint","pp0","pp1","pp2","pp3","_points","_firstPoint","segment","context","createLegendMarker","marker","disabledColor","bulletFunction","legend","XYSeries","_setRawDefault","_removeAxisRange","_updateFields","_valueXShowFields","_valueYShowFields","__valueXShowFields","__valueYShowFields","valueXFields","split","valueYFields","_shouldMakeBullet","minBulletDistance","xName","xCapName","yName","yCapName","xLetter","yLetter","low","high","_fixVC","hiddenState","sequencedInterpolation","_handleMaskBullets","tooltipFieldX","tooltipFieldY","_tooltipFieldX","_tooltipFieldY","_dataProcessed","_stack","getStackedXValue","getStackedYValue","_markStakedDirtyStack","_showBullets","_psi","_pei","_selectionProcessed","processYSelectionDataItem","processXSelectionDataItem","selectionMinY","selectionMaxY","selectionMinX","selectionMaxX","_makeRangeMask","mainContainerMask","_mainContainerMask","mask","seriesIndex","_couldStackTo","_stackDataItems","_reallyStackedTo","_key","_stackedSeries","stackToItemKey","stackToSeries","stackToItem","stackValue","stackedToSeries","_markDataSetDirty","_afterDataChange","_aggregatesCalculated","_positionBullet","_shouldShowBullet","realField","previousBounds","yo","xo","_positionX","_positionY","dataSet","mainDataItems","then","_isShowing","_sequencedShowHide","_isHiding","waitForStop","_markDirtyStack","stackedSeries","hideTooltip","markDirtyText","txt","_emptyDataItem","valueLabel","_getItemReaderLabel","_position","resetExtremes","XYChartScrollbar","Scrollbar","interactiveChildren","Graphics","_addOrientationClass","startGrip","endGrip","_updateThumb","overlay","CategoryAxis","_itemMap","startCategory","endCategory","openKey","otherAxis","startDataItem","endDataItem","hasValue","f","fillIndex","categoryLocation","endCategoryLocation","categoryToIndex","indexToPosition","fillEndIndex","_axisLocation","category","dataItemToPosition","axisPositionToIndex","seriesDataItem","zoomToIndexes","zoomToCategories","CategoryDateAxis","previousIndex","previousUnitValue","changed","skip","unitValue","added","pop","shouldAdd","item","DurationAxis","durationFormatter","getDurationFormatter","divisors","realDivisor","divisor","reducedCount","getFormat","OHLC","lY","hY","lX","hX","OHLCSeries","List","Template","SmoothedYLineSeries","_setDefault","SmoothedXLineSeries","SmoothedXYLineSeries","Step","_context","_t","stepAfter","prototype","areaStart","areaEnd","lineStart","_point","lineEnd","closePath","StepLineSeries","itemLocationX0","itemLocationY0","itemLocationX1","itemLocationY1","xPos1","yPos1","iPoint0","point0","iPoint1","xOpenPos0","yOpenPos0","xOpenPos1","yOpenPos1","closeIPoint0","closeIPoint1","am5xy","that","bezierCurveTo","_x1","_k","_x2","_x0","_y1","_y2","_y0","Cardinal","custom","cardinal"],"sourceRoot":""}