@highcharts/grid-pro 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -0
- package/css/grid-pro.css +1756 -0
- package/es-modules/Accessibility/A11yI18n.d.ts +95 -0
- package/es-modules/Accessibility/A11yI18n.js +290 -0
- package/es-modules/Accessibility/Accessibility.d.ts +116 -0
- package/es-modules/Accessibility/Accessibility.js +402 -0
- package/es-modules/Accessibility/AccessibilityComponent.d.ts +97 -0
- package/es-modules/Accessibility/AccessibilityComponent.js +147 -0
- package/es-modules/Accessibility/Components/AnnotationsA11y.d.ts +43 -0
- package/es-modules/Accessibility/Components/AnnotationsA11y.js +160 -0
- package/es-modules/Accessibility/Components/ContainerComponent.d.ts +48 -0
- package/es-modules/Accessibility/Components/ContainerComponent.js +142 -0
- package/es-modules/Accessibility/Components/InfoRegionsComponent.d.ts +144 -0
- package/es-modules/Accessibility/Components/InfoRegionsComponent.js +555 -0
- package/es-modules/Accessibility/Components/LegendComponent.d.ts +124 -0
- package/es-modules/Accessibility/Components/LegendComponent.js +474 -0
- package/es-modules/Accessibility/Components/MenuComponent.d.ts +93 -0
- package/es-modules/Accessibility/Components/MenuComponent.js +430 -0
- package/es-modules/Accessibility/Components/NavigatorComponent.d.ts +57 -0
- package/es-modules/Accessibility/Components/NavigatorComponent.js +235 -0
- package/es-modules/Accessibility/Components/RangeSelectorComponent.d.ts +126 -0
- package/es-modules/Accessibility/Components/RangeSelectorComponent.js +473 -0
- package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.d.ts +18 -0
- package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +234 -0
- package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.d.ts +87 -0
- package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +309 -0
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.d.ts +53 -0
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +130 -0
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.d.ts +28 -0
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +415 -0
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.d.ts +114 -0
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +721 -0
- package/es-modules/Accessibility/Components/ZoomComponent.d.ts +96 -0
- package/es-modules/Accessibility/Components/ZoomComponent.js +314 -0
- package/es-modules/Accessibility/FocusBorder.d.ts +40 -0
- package/es-modules/Accessibility/FocusBorder.js +301 -0
- package/es-modules/Accessibility/HighContrastMode.d.ts +35 -0
- package/es-modules/Accessibility/HighContrastMode.js +100 -0
- package/es-modules/Accessibility/HighContrastTheme.d.ts +11 -0
- package/es-modules/Accessibility/HighContrastTheme.js +212 -0
- package/es-modules/Accessibility/KeyboardNavigation.d.ts +133 -0
- package/es-modules/Accessibility/KeyboardNavigation.js +450 -0
- package/es-modules/Accessibility/KeyboardNavigationHandler.d.ts +48 -0
- package/es-modules/Accessibility/KeyboardNavigationHandler.js +126 -0
- package/es-modules/Accessibility/Options/A11yDefaults.d.ts +68 -0
- package/es-modules/Accessibility/Options/A11yDefaults.js +971 -0
- package/es-modules/Accessibility/Options/DeprecatedOptions.d.ts +22 -0
- package/es-modules/Accessibility/Options/DeprecatedOptions.js +265 -0
- package/es-modules/Accessibility/Options/LangDefaults.d.ts +4 -0
- package/es-modules/Accessibility/Options/LangDefaults.js +440 -0
- package/es-modules/Accessibility/ProxyElement.d.ts +78 -0
- package/es-modules/Accessibility/ProxyElement.js +223 -0
- package/es-modules/Accessibility/ProxyProvider.d.ts +90 -0
- package/es-modules/Accessibility/ProxyProvider.js +315 -0
- package/es-modules/Accessibility/Utils/Announcer.d.ts +26 -0
- package/es-modules/Accessibility/Utils/Announcer.js +90 -0
- package/es-modules/Accessibility/Utils/ChartUtilities.d.ts +90 -0
- package/es-modules/Accessibility/Utils/ChartUtilities.js +298 -0
- package/es-modules/Accessibility/Utils/DOMElementProvider.d.ts +20 -0
- package/es-modules/Accessibility/Utils/DOMElementProvider.js +69 -0
- package/es-modules/Accessibility/Utils/EventProvider.d.ts +26 -0
- package/es-modules/Accessibility/Utils/EventProvider.js +65 -0
- package/es-modules/Accessibility/Utils/HTMLUtilities.d.ts +108 -0
- package/es-modules/Accessibility/Utils/HTMLUtilities.js +319 -0
- package/es-modules/Core/Animation/AnimationUtilities.d.ts +107 -0
- package/es-modules/Core/Animation/AnimationUtilities.js +200 -0
- package/es-modules/Core/Animation/Fx.d.ts +130 -0
- package/es-modules/Core/Animation/Fx.js +388 -0
- package/es-modules/Core/Chart/Chart.d.ts +1009 -0
- package/es-modules/Core/Chart/Chart.js +3008 -0
- package/es-modules/Core/Chart/Chart3D.d.ts +276 -0
- package/es-modules/Core/Chart/Chart3D.js +1686 -0
- package/es-modules/Core/Chart/ChartDefaults.d.ts +8 -0
- package/es-modules/Core/Chart/ChartDefaults.js +1304 -0
- package/es-modules/Core/Chart/ChartNavigationComposition.d.ts +55 -0
- package/es-modules/Core/Chart/ChartNavigationComposition.js +90 -0
- package/es-modules/Core/Chart/GanttChart.d.ts +74 -0
- package/es-modules/Core/Chart/GanttChart.js +189 -0
- package/es-modules/Core/Chart/MapChart.d.ts +132 -0
- package/es-modules/Core/Chart/MapChart.js +232 -0
- package/es-modules/Core/Chart/StockChart.d.ts +117 -0
- package/es-modules/Core/Chart/StockChart.js +641 -0
- package/es-modules/Core/Color/Color.d.ts +112 -0
- package/es-modules/Core/Color/Color.js +418 -0
- package/es-modules/Core/Color/Palettes.d.ts +84 -0
- package/es-modules/Core/Color/Palettes.js +23 -0
- package/es-modules/Core/Defaults.d.ts +42 -0
- package/es-modules/Core/Defaults.js +2977 -0
- package/es-modules/Core/Foundation.d.ts +19 -0
- package/es-modules/Core/Foundation.js +63 -0
- package/es-modules/Core/Geometry/CircleUtilities.d.ts +189 -0
- package/es-modules/Core/Geometry/CircleUtilities.js +388 -0
- package/es-modules/Core/Geometry/GeometryUtilities.d.ts +48 -0
- package/es-modules/Core/Geometry/GeometryUtilities.js +105 -0
- package/es-modules/Core/Geometry/PolygonClip.d.ts +19 -0
- package/es-modules/Core/Geometry/PolygonClip.js +96 -0
- package/es-modules/Core/Globals.d.ts +110 -0
- package/es-modules/Core/Globals.js +127 -0
- package/es-modules/Core/HttpUtilities.d.ts +61 -0
- package/es-modules/Core/HttpUtilities.js +214 -0
- package/es-modules/Core/MSPointer.d.ts +74 -0
- package/es-modules/Core/MSPointer.js +218 -0
- package/es-modules/Core/Math3D.d.ts +117 -0
- package/es-modules/Core/Math3D.js +250 -0
- package/es-modules/Core/Pointer.d.ts +590 -0
- package/es-modules/Core/Pointer.js +1631 -0
- package/es-modules/Core/Renderer/HTML/AST.d.ts +163 -0
- package/es-modules/Core/Renderer/HTML/AST.js +562 -0
- package/es-modules/Core/Renderer/HTML/HTMLElement.d.ts +76 -0
- package/es-modules/Core/Renderer/HTML/HTMLElement.js +471 -0
- package/es-modules/Core/Renderer/RendererRegistry.d.ts +29 -0
- package/es-modules/Core/Renderer/RendererRegistry.js +76 -0
- package/es-modules/Core/Renderer/RendererUtilities.d.ts +26 -0
- package/es-modules/Core/Renderer/RendererUtilities.js +172 -0
- package/es-modules/Core/Responsive.d.ts +55 -0
- package/es-modules/Core/Responsive.js +260 -0
- package/es-modules/Core/Templating.d.ts +125 -0
- package/es-modules/Core/Templating.js +428 -0
- package/es-modules/Core/Time.d.ts +69 -0
- package/es-modules/Core/Time.js +172 -0
- package/es-modules/Core/Tooltip.d.ts +297 -0
- package/es-modules/Core/Tooltip.js +1377 -0
- package/es-modules/Core/Utilities.d.ts +770 -0
- package/es-modules/Core/Utilities.js +1989 -0
- package/es-modules/Data/ColumnUtils.d.ts +87 -0
- package/es-modules/Data/ColumnUtils.js +140 -0
- package/es-modules/Data/Connectors/CSVConnector.d.ts +63 -0
- package/es-modules/Data/Connectors/CSVConnector.js +149 -0
- package/es-modules/Data/Connectors/CSVConnectorOptions.d.ts +149 -0
- package/es-modules/Data/Connectors/DataConnector.d.ts +204 -0
- package/es-modules/Data/Connectors/DataConnector.js +345 -0
- package/es-modules/Data/Connectors/DataConnectorOptions.d.ts +87 -0
- package/es-modules/Data/Connectors/DataConnectorType.d.ts +45 -0
- package/es-modules/Data/Connectors/GoogleSheetsConnector.d.ts +65 -0
- package/es-modules/Data/Connectors/GoogleSheetsConnector.js +226 -0
- package/es-modules/Data/Connectors/GoogleSheetsConnectorOptions.d.ts +167 -0
- package/es-modules/Data/Connectors/HTMLTableConnector.d.ts +77 -0
- package/es-modules/Data/Connectors/HTMLTableConnector.js +119 -0
- package/es-modules/Data/Connectors/HTMLTableConnectorOptions.d.ts +49 -0
- package/es-modules/Data/Connectors/JSONConnector.d.ts +64 -0
- package/es-modules/Data/Connectors/JSONConnector.js +156 -0
- package/es-modules/Data/Connectors/JSONConnectorOptions.d.ts +185 -0
- package/es-modules/Data/Converters/CSVConverter.d.ts +64 -0
- package/es-modules/Data/Converters/CSVConverter.js +374 -0
- package/es-modules/Data/Converters/CSVConverterOptions.d.ts +53 -0
- package/es-modules/Data/Converters/DataConverter.d.ts +168 -0
- package/es-modules/Data/Converters/DataConverter.js +387 -0
- package/es-modules/Data/Converters/DataConverterType.d.ts +40 -0
- package/es-modules/Data/Converters/DataConverterUtils.d.ts +82 -0
- package/es-modules/Data/Converters/DataConverterUtils.js +216 -0
- package/es-modules/Data/Converters/GoogleSheetsConverter.d.ts +46 -0
- package/es-modules/Data/Converters/GoogleSheetsConverter.js +135 -0
- package/es-modules/Data/Converters/GoogleSheetsConverterOptions.d.ts +52 -0
- package/es-modules/Data/Converters/HTMLTableConverter.d.ts +72 -0
- package/es-modules/Data/Converters/HTMLTableConverter.js +362 -0
- package/es-modules/Data/Converters/HTMLTableConverterOptions.d.ts +51 -0
- package/es-modules/Data/Converters/JSONConverter.d.ts +99 -0
- package/es-modules/Data/Converters/JSONConverter.js +239 -0
- package/es-modules/Data/Converters/JSONConverterOptions.d.ts +52 -0
- package/es-modules/Data/DataCursor.d.ts +176 -0
- package/es-modules/Data/DataCursor.js +379 -0
- package/es-modules/Data/DataEvent.d.ts +81 -0
- package/es-modules/Data/DataEvent.js +14 -0
- package/es-modules/Data/DataPool.d.ts +130 -0
- package/es-modules/Data/DataPool.js +257 -0
- package/es-modules/Data/DataPoolOptions.d.ts +66 -0
- package/es-modules/Data/DataTable.d.ts +563 -0
- package/es-modules/Data/DataTable.js +930 -0
- package/es-modules/Data/DataTableCore.d.ts +165 -0
- package/es-modules/Data/DataTableCore.js +316 -0
- package/es-modules/Data/DataTableOptions.d.ts +25 -0
- package/es-modules/Data/DataTableOptions.js +15 -0
- package/es-modules/Data/Formula/Formula.d.ts +21 -0
- package/es-modules/Data/Formula/Formula.js +54 -0
- package/es-modules/Data/Formula/FormulaParser.d.ts +31 -0
- package/es-modules/Data/Formula/FormulaParser.js +488 -0
- package/es-modules/Data/Formula/FormulaProcessor.d.ts +155 -0
- package/es-modules/Data/Formula/FormulaProcessor.js +529 -0
- package/es-modules/Data/Formula/FormulaTypes.d.ts +138 -0
- package/es-modules/Data/Formula/FormulaTypes.js +135 -0
- package/es-modules/Data/Formula/Functions/ABS.d.ts +19 -0
- package/es-modules/Data/Formula/Functions/ABS.js +67 -0
- package/es-modules/Data/Formula/Functions/AND.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/AND.js +59 -0
- package/es-modules/Data/Formula/Functions/AVERAGE.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/AVERAGE.js +74 -0
- package/es-modules/Data/Formula/Functions/AVERAGEA.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/AVERAGEA.js +90 -0
- package/es-modules/Data/Formula/Functions/COUNT.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/COUNT.js +65 -0
- package/es-modules/Data/Formula/Functions/COUNTA.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/COUNTA.js +71 -0
- package/es-modules/Data/Formula/Functions/IF.d.ts +21 -0
- package/es-modules/Data/Formula/Functions/IF.js +54 -0
- package/es-modules/Data/Formula/Functions/ISNA.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/ISNA.js +52 -0
- package/es-modules/Data/Formula/Functions/MAX.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/MAX.js +69 -0
- package/es-modules/Data/Formula/Functions/MEDIAN.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/MEDIAN.js +78 -0
- package/es-modules/Data/Formula/Functions/MIN.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/MIN.js +69 -0
- package/es-modules/Data/Formula/Functions/MOD.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/MOD.js +63 -0
- package/es-modules/Data/Formula/Functions/MODE.d.ts +41 -0
- package/es-modules/Data/Formula/Functions/MODE.js +149 -0
- package/es-modules/Data/Formula/Functions/NOT.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/NOT.js +60 -0
- package/es-modules/Data/Formula/Functions/OR.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/OR.js +62 -0
- package/es-modules/Data/Formula/Functions/PRODUCT.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/PRODUCT.js +68 -0
- package/es-modules/Data/Formula/Functions/SUM.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/SUM.js +65 -0
- package/es-modules/Data/Formula/Functions/XOR.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/XOR.js +81 -0
- package/es-modules/Data/Modifiers/ChainModifier.d.ts +128 -0
- package/es-modules/Data/Modifiers/ChainModifier.js +231 -0
- package/es-modules/Data/Modifiers/ChainModifierOptions.d.ts +20 -0
- package/es-modules/Data/Modifiers/ChainModifierOptions.js +14 -0
- package/es-modules/Data/Modifiers/DataModifier.d.ts +117 -0
- package/es-modules/Data/Modifiers/DataModifier.js +202 -0
- package/es-modules/Data/Modifiers/DataModifierEvent.d.ts +28 -0
- package/es-modules/Data/Modifiers/DataModifierEvent.js +15 -0
- package/es-modules/Data/Modifiers/DataModifierOptions.d.ts +11 -0
- package/es-modules/Data/Modifiers/DataModifierOptions.js +15 -0
- package/es-modules/Data/Modifiers/DataModifierType.d.ts +44 -0
- package/es-modules/Data/Modifiers/FilterModifier.d.ts +53 -0
- package/es-modules/Data/Modifiers/FilterModifier.js +172 -0
- package/es-modules/Data/Modifiers/FilterModifierOptions.d.ts +110 -0
- package/es-modules/Data/Modifiers/FilterModifierOptions.js +14 -0
- package/es-modules/Data/Modifiers/InvertModifier.d.ts +48 -0
- package/es-modules/Data/Modifiers/InvertModifier.js +116 -0
- package/es-modules/Data/Modifiers/InvertModifierOptions.d.ts +11 -0
- package/es-modules/Data/Modifiers/InvertModifierOptions.js +15 -0
- package/es-modules/Data/Modifiers/MathModifier.d.ts +68 -0
- package/es-modules/Data/Modifiers/MathModifier.js +165 -0
- package/es-modules/Data/Modifiers/MathModifierOptions.d.ts +50 -0
- package/es-modules/Data/Modifiers/MathModifierOptions.js +14 -0
- package/es-modules/Data/Modifiers/RangeModifier.d.ts +46 -0
- package/es-modules/Data/Modifiers/RangeModifier.js +96 -0
- package/es-modules/Data/Modifiers/RangeModifierOptions.d.ts +22 -0
- package/es-modules/Data/Modifiers/RangeModifierOptions.js +15 -0
- package/es-modules/Data/Modifiers/SortModifier.d.ts +54 -0
- package/es-modules/Data/Modifiers/SortModifier.js +144 -0
- package/es-modules/Data/Modifiers/SortModifierOptions.d.ts +44 -0
- package/es-modules/Data/Modifiers/SortModifierOptions.js +14 -0
- package/es-modules/Grid/Core/Accessibility/A11yOptions.d.ts +148 -0
- package/es-modules/Grid/Core/Accessibility/A11yOptions.js +17 -0
- package/es-modules/Grid/Core/Accessibility/Accessibility.d.ts +115 -0
- package/es-modules/Grid/Core/Accessibility/Accessibility.js +231 -0
- package/es-modules/Grid/Core/Credits.d.ts +57 -0
- package/es-modules/Grid/Core/Credits.js +125 -0
- package/es-modules/Grid/Core/Defaults.d.ts +20 -0
- package/es-modules/Grid/Core/Defaults.js +148 -0
- package/es-modules/Grid/Core/Globals.d.ts +103 -0
- package/es-modules/Grid/Core/Globals.js +134 -0
- package/es-modules/Grid/Core/Grid.d.ts +295 -0
- package/es-modules/Grid/Core/Grid.js +730 -0
- package/es-modules/Grid/Core/GridUtils.d.ts +110 -0
- package/es-modules/Grid/Core/GridUtils.js +191 -0
- package/es-modules/Grid/Core/Options.d.ts +599 -0
- package/es-modules/Grid/Core/Options.js +16 -0
- package/es-modules/Grid/Core/Pagination/Icons.d.ts +7 -0
- package/es-modules/Grid/Core/Pagination/Icons.js +7 -0
- package/es-modules/Grid/Core/Pagination/Pagination.d.ts +278 -0
- package/es-modules/Grid/Core/Pagination/Pagination.js +842 -0
- package/es-modules/Grid/Core/Pagination/PaginationOptions.d.ts +228 -0
- package/es-modules/Grid/Core/Querying/FilteringController.d.ts +66 -0
- package/es-modules/Grid/Core/Querying/FilteringController.js +256 -0
- package/es-modules/Grid/Core/Querying/PaginationController.d.ts +50 -0
- package/es-modules/Grid/Core/Querying/PaginationController.js +101 -0
- package/es-modules/Grid/Core/Querying/QueryingController.d.ts +58 -0
- package/es-modules/Grid/Core/Querying/QueryingController.js +127 -0
- package/es-modules/Grid/Core/Querying/SortingController.d.ts +67 -0
- package/es-modules/Grid/Core/Querying/SortingController.js +136 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/ColumnFiltering.d.ts +114 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/ColumnFiltering.js +351 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.d.ts +14 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.js +86 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.d.ts +19 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.js +80 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilteringTypes.d.ts +52 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilteringTypes.js +81 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnSorting.d.ts +56 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnSorting.js +170 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnsResizer.d.ts +55 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnsResizer.js +182 -0
- package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.d.ts +87 -0
- package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.js +346 -0
- package/es-modules/Grid/Core/Table/Body/TableCell.d.ts +88 -0
- package/es-modules/Grid/Core/Table/Body/TableCell.js +231 -0
- package/es-modules/Grid/Core/Table/Body/TableRow.d.ts +79 -0
- package/es-modules/Grid/Core/Table/Body/TableRow.js +177 -0
- package/es-modules/Grid/Core/Table/Cell.d.ts +92 -0
- package/es-modules/Grid/Core/Table/Cell.js +223 -0
- package/es-modules/Grid/Core/Table/CellContent/CellContent.d.ts +30 -0
- package/es-modules/Grid/Core/Table/CellContent/CellContent.js +40 -0
- package/es-modules/Grid/Core/Table/CellContent/TextContent.d.ts +19 -0
- package/es-modules/Grid/Core/Table/CellContent/TextContent.js +98 -0
- package/es-modules/Grid/Core/Table/Column.d.ts +136 -0
- package/es-modules/Grid/Core/Table/Column.js +230 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/AdjacentResizingMode.d.ts +7 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/AdjacentResizingMode.js +62 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/ColumnResizing.d.ts +32 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/ColumnResizing.js +68 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/DistributedResizingMode.d.ts +7 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/DistributedResizingMode.js +53 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/IndependentResizingMode.d.ts +7 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/IndependentResizingMode.js +63 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/ResizingMode.d.ts +92 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/ResizingMode.js +194 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.d.ts +68 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.js +187 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/FilterPopup.d.ts +29 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/FilterPopup.js +77 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/FilterMenuButton.d.ts +13 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/FilterMenuButton.js +79 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/SortMenuButton.d.ts +12 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/SortMenuButton.js +71 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuPopup.d.ts +12 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuPopup.js +66 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/StateHelpers.d.ts +25 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/StateHelpers.js +65 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/FilterToolbarButton.d.ts +12 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/FilterToolbarButton.js +81 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/MenuToolbarButton.d.ts +12 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/MenuToolbarButton.js +80 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.d.ts +11 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.js +81 -0
- package/es-modules/Grid/Core/Table/Header/HeaderCell.d.ts +70 -0
- package/es-modules/Grid/Core/Table/Header/HeaderCell.js +225 -0
- package/es-modules/Grid/Core/Table/Header/HeaderRow.d.ts +53 -0
- package/es-modules/Grid/Core/Table/Header/HeaderRow.js +182 -0
- package/es-modules/Grid/Core/Table/Header/TableHeader.d.ts +65 -0
- package/es-modules/Grid/Core/Table/Header/TableHeader.js +159 -0
- package/es-modules/Grid/Core/Table/Row.d.ts +76 -0
- package/es-modules/Grid/Core/Table/Row.js +131 -0
- package/es-modules/Grid/Core/Table/Table.d.ts +181 -0
- package/es-modules/Grid/Core/Table/Table.js +399 -0
- package/es-modules/Grid/Core/UI/Button.d.ts +31 -0
- package/es-modules/Grid/Core/UI/Button.js +16 -0
- package/es-modules/Grid/Core/UI/ContextMenu.d.ts +38 -0
- package/es-modules/Grid/Core/UI/ContextMenu.js +132 -0
- package/es-modules/Grid/Core/UI/ContextMenuButton.d.ts +126 -0
- package/es-modules/Grid/Core/UI/ContextMenuButton.js +183 -0
- package/es-modules/Grid/Core/UI/Popup.d.ts +149 -0
- package/es-modules/Grid/Core/UI/Popup.js +271 -0
- package/es-modules/Grid/Core/UI/SvgIcons.d.ts +53 -0
- package/es-modules/Grid/Core/UI/SvgIcons.js +158 -0
- package/es-modules/Grid/Core/UI/Toolbar.d.ts +16 -0
- package/es-modules/Grid/Core/UI/Toolbar.js +16 -0
- package/es-modules/Grid/Core/UI/ToolbarButton.d.ts +135 -0
- package/es-modules/Grid/Core/UI/ToolbarButton.js +191 -0
- package/es-modules/Grid/Pro/CellEditing/CellEditMode.d.ts +112 -0
- package/es-modules/Grid/Pro/CellEditing/CellEditing.d.ts +80 -0
- package/es-modules/Grid/Pro/CellEditing/CellEditing.js +211 -0
- package/es-modules/Grid/Pro/CellEditing/CellEditingComposition.d.ts +123 -0
- package/es-modules/Grid/Pro/CellEditing/CellEditingComposition.js +198 -0
- package/es-modules/Grid/Pro/CellRendering/CellContentPro.d.ts +23 -0
- package/es-modules/Grid/Pro/CellRendering/CellContentPro.js +45 -0
- package/es-modules/Grid/Pro/CellRendering/CellRenderer.d.ts +50 -0
- package/es-modules/Grid/Pro/CellRendering/CellRenderer.js +41 -0
- package/es-modules/Grid/Pro/CellRendering/CellRendererRegistry.d.ts +18 -0
- package/es-modules/Grid/Pro/CellRendering/CellRendererRegistry.js +58 -0
- package/es-modules/Grid/Pro/CellRendering/CellRendererType.d.ts +48 -0
- package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.d.ts +18 -0
- package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.js +79 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/CheckboxContent.d.ts +30 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/CheckboxContent.js +122 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContent.d.ts +12 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContent.js +39 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContentBase.d.ts +66 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContentBase.js +145 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateTimeInputContent.d.ts +12 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateTimeInputContent.js +38 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/NumberInputContent.d.ts +58 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/NumberInputContent.js +158 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/SelectContent.d.ts +58 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/SelectContent.js +173 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.d.ts +28 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.js +157 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.d.ts +58 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.js +168 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/TimeInputContent.d.ts +13 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/TimeInputContent.js +41 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/CheckboxRenderer.d.ts +50 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/CheckboxRenderer.js +65 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRenderer.d.ts +37 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRenderer.js +65 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRendererBase.d.ts +26 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRendererBase.js +16 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateTimeInputRenderer.d.ts +37 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateTimeInputRenderer.js +64 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/NumberInputRenderer.d.ts +52 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/NumberInputRenderer.js +64 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/SelectRenderer.d.ts +74 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/SelectRenderer.js +66 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.d.ts +45 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.js +89 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/TextInputRenderer.d.ts +54 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/TextInputRenderer.js +65 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/TextRenderer.d.ts +43 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/TextRenderer.js +74 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/TimeInputRenderer.d.ts +37 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/TimeInputRenderer.js +64 -0
- package/es-modules/Grid/Pro/ColumnTypes/ColumnDataType.d.ts +29 -0
- package/es-modules/Grid/Pro/ColumnTypes/Validator.d.ts +118 -0
- package/es-modules/Grid/Pro/ColumnTypes/Validator.js +270 -0
- package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.d.ts +32 -0
- package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.js +63 -0
- package/es-modules/Grid/Pro/Credits/CreditsPro.d.ts +35 -0
- package/es-modules/Grid/Pro/Credits/CreditsPro.js +112 -0
- package/es-modules/Grid/Pro/Credits/CreditsProComposition.d.ts +28 -0
- package/es-modules/Grid/Pro/Credits/CreditsProComposition.js +61 -0
- package/es-modules/Grid/Pro/Export/Exporting.d.ts +68 -0
- package/es-modules/Grid/Pro/Export/Exporting.js +202 -0
- package/es-modules/Grid/Pro/Export/ExportingComposition.d.ts +68 -0
- package/es-modules/Grid/Pro/Export/ExportingComposition.js +55 -0
- package/es-modules/Grid/Pro/GridEvents.d.ts +119 -0
- package/es-modules/Grid/Pro/GridEvents.js +107 -0
- package/es-modules/Grid/Pro/Pagination/PaginationComposition.d.ts +75 -0
- package/es-modules/Grid/Pro/Pagination/PaginationComposition.js +76 -0
- package/es-modules/Grid/Pro/highcharts.d.ts +7 -0
- package/es-modules/Grid/index.d.ts +5 -0
- package/es-modules/Grid/index.js +19 -0
- package/es-modules/Shared/BaseForm.d.ts +49 -0
- package/es-modules/Shared/BaseForm.js +126 -0
- package/es-modules/Shared/DownloadURL.d.ts +85 -0
- package/es-modules/Shared/DownloadURL.js +198 -0
- package/es-modules/Shared/LangOptionsCore.d.ts +27 -0
- package/es-modules/Shared/TimeBase.d.ts +353 -0
- package/es-modules/Shared/TimeBase.js +830 -0
- package/es-modules/Shared/Types.d.ts +48 -0
- package/es-modules/masters/grid-pro.src.d.ts +99 -0
- package/es-modules/masters/grid-pro.src.js +129 -0
- package/grid-pro.d.ts +50 -0
- package/grid-pro.js +12 -0
- package/grid-pro.js.map +1 -0
- package/grid-pro.src.d.ts +50 -0
- package/grid-pro.src.js +26623 -0
- package/package.json +21 -0
|
@@ -0,0 +1,1631 @@
|
|
|
1
|
+
/* *
|
|
2
|
+
*
|
|
3
|
+
* (c) 2010-2025 Torstein Honsi
|
|
4
|
+
*
|
|
5
|
+
* License: www.highcharts.com/license
|
|
6
|
+
*
|
|
7
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
8
|
+
*
|
|
9
|
+
* */
|
|
10
|
+
'use strict';
|
|
11
|
+
import Color from './Color/Color.js';
|
|
12
|
+
const { parse: color } = Color;
|
|
13
|
+
import H from './Globals.js';
|
|
14
|
+
const { charts, composed, isTouchDevice } = H;
|
|
15
|
+
import U from './Utilities.js';
|
|
16
|
+
const { addEvent, attr, css, extend, find, fireEvent, isNumber, isObject, objectEach, offset, pick, pushUnique, splat } = U;
|
|
17
|
+
/* *
|
|
18
|
+
*
|
|
19
|
+
* Class
|
|
20
|
+
*
|
|
21
|
+
* */
|
|
22
|
+
/**
|
|
23
|
+
* The mouse and touch tracker object. Each {@link Chart} item has one
|
|
24
|
+
* associated Pointer item that can be accessed from the {@link Chart.pointer}
|
|
25
|
+
* property.
|
|
26
|
+
*
|
|
27
|
+
* @class
|
|
28
|
+
* @name Highcharts.Pointer
|
|
29
|
+
*
|
|
30
|
+
* @param {Highcharts.Chart} chart
|
|
31
|
+
* The chart instance.
|
|
32
|
+
*
|
|
33
|
+
* @param {Highcharts.Options} options
|
|
34
|
+
* The root options object. The pointer uses options from the chart and tooltip
|
|
35
|
+
* structures.
|
|
36
|
+
*/
|
|
37
|
+
class Pointer {
|
|
38
|
+
/* *
|
|
39
|
+
*
|
|
40
|
+
* Functions
|
|
41
|
+
*
|
|
42
|
+
* */
|
|
43
|
+
/**
|
|
44
|
+
* Set inactive state to all series that are not currently hovered,
|
|
45
|
+
* or, if `inactiveOtherPoints` is set to true, set inactive state to
|
|
46
|
+
* all points within that series.
|
|
47
|
+
*
|
|
48
|
+
* @private
|
|
49
|
+
* @function Highcharts.Pointer#applyInactiveState
|
|
50
|
+
*
|
|
51
|
+
* @param {Array<Highcharts.Point>} points
|
|
52
|
+
* Currently hovered points
|
|
53
|
+
*/
|
|
54
|
+
applyInactiveState(points = []) {
|
|
55
|
+
const activeSeries = [];
|
|
56
|
+
// Get all active series from the hovered points
|
|
57
|
+
points.forEach((item) => {
|
|
58
|
+
const series = item.series;
|
|
59
|
+
// Include itself
|
|
60
|
+
activeSeries.push(series);
|
|
61
|
+
// Include parent series
|
|
62
|
+
if (series.linkedParent) {
|
|
63
|
+
activeSeries.push(series.linkedParent);
|
|
64
|
+
}
|
|
65
|
+
// Include all child series
|
|
66
|
+
if (series.linkedSeries) {
|
|
67
|
+
activeSeries.push.apply(activeSeries, series.linkedSeries);
|
|
68
|
+
}
|
|
69
|
+
// Include navigator series
|
|
70
|
+
if (series.navigatorSeries) {
|
|
71
|
+
activeSeries.push(series.navigatorSeries);
|
|
72
|
+
}
|
|
73
|
+
// Include boosed series when they share markerGroup
|
|
74
|
+
if (series.boosted && series.markerGroup) {
|
|
75
|
+
activeSeries.push.apply(activeSeries, this.chart.series.filter((otherSeries) => otherSeries.markerGroup === series.markerGroup));
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
for (const series of this.chart.series) {
|
|
79
|
+
const seriesOptions = series.options;
|
|
80
|
+
if (seriesOptions.states?.inactive?.enabled === false) {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
if (activeSeries.indexOf(series) === -1) {
|
|
84
|
+
// Inactive series
|
|
85
|
+
series.setState('inactive', true);
|
|
86
|
+
}
|
|
87
|
+
else if (seriesOptions.inactiveOtherPoints) {
|
|
88
|
+
// Active series, but other points should be inactivated
|
|
89
|
+
series.setAllPointsToState('inactive');
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Destroys the Pointer object and disconnects DOM events.
|
|
95
|
+
*
|
|
96
|
+
* @function Highcharts.Pointer#destroy
|
|
97
|
+
*/
|
|
98
|
+
destroy() {
|
|
99
|
+
const pointer = this;
|
|
100
|
+
this.eventsToUnbind.forEach((unbind) => unbind());
|
|
101
|
+
this.eventsToUnbind = [];
|
|
102
|
+
if (!H.chartCount) {
|
|
103
|
+
Pointer.unbindDocumentMouseUp.forEach((el) => el.unbind());
|
|
104
|
+
Pointer.unbindDocumentMouseUp.length = 0;
|
|
105
|
+
if (Pointer.unbindDocumentTouchEnd) {
|
|
106
|
+
Pointer.unbindDocumentTouchEnd = (Pointer.unbindDocumentTouchEnd());
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
objectEach(pointer, function (_val, prop) {
|
|
110
|
+
pointer[prop] = void 0;
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Calculate attrs for selection marker.
|
|
115
|
+
* @private
|
|
116
|
+
* @function Highcharts.Pointer#getSelectionMarkerAttrs
|
|
117
|
+
* @emits getSelectionMarkerAttrs
|
|
118
|
+
*/
|
|
119
|
+
getSelectionMarkerAttrs(chartX, chartY) {
|
|
120
|
+
const e = {
|
|
121
|
+
args: { chartX, chartY },
|
|
122
|
+
attrs: {},
|
|
123
|
+
shapeType: 'rect'
|
|
124
|
+
};
|
|
125
|
+
fireEvent(this, 'getSelectionMarkerAttrs', e, (e) => {
|
|
126
|
+
const { chart, zoomHor, zoomVert } = this, { mouseDownX = 0, mouseDownY = 0 } = chart, attrs = e.attrs;
|
|
127
|
+
let size;
|
|
128
|
+
attrs.x = chart.plotLeft;
|
|
129
|
+
attrs.y = chart.plotTop;
|
|
130
|
+
attrs.width = zoomHor ? 1 : chart.plotWidth;
|
|
131
|
+
attrs.height = zoomVert ? 1 : chart.plotHeight;
|
|
132
|
+
// Adjust the width of the selection marker. Firefox needs at
|
|
133
|
+
// least one pixel width or height in order to return a bounding
|
|
134
|
+
// box.
|
|
135
|
+
if (zoomHor) {
|
|
136
|
+
size = chartX - mouseDownX;
|
|
137
|
+
attrs.width = Math.max(1, Math.abs(size));
|
|
138
|
+
attrs.x = (size > 0 ? 0 : size) + mouseDownX;
|
|
139
|
+
}
|
|
140
|
+
// Adjust the height of the selection marker
|
|
141
|
+
if (zoomVert) {
|
|
142
|
+
size = chartY - mouseDownY;
|
|
143
|
+
attrs.height = Math.max(1, Math.abs(size));
|
|
144
|
+
attrs.y = (size > 0 ? 0 : size) + mouseDownY;
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
return e;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Perform a drag operation in response to a mousemove event while the mouse
|
|
151
|
+
* is down.
|
|
152
|
+
* @private
|
|
153
|
+
* @function Highcharts.Pointer#drag
|
|
154
|
+
*/
|
|
155
|
+
drag(e) {
|
|
156
|
+
const { chart } = this, { mouseDownX = 0, mouseDownY = 0 } = chart, { panning, panKey, selectionMarkerFill } = chart.options.chart, plotLeft = chart.plotLeft, plotTop = chart.plotTop, plotWidth = chart.plotWidth, plotHeight = chart.plotHeight, panningEnabled = isObject(panning) ?
|
|
157
|
+
panning.enabled :
|
|
158
|
+
panning, panKeyPressed = panKey && e[`${panKey}Key`];
|
|
159
|
+
let chartX = e.chartX, chartY = e.chartY, clickedInside, selectionMarker = this.selectionMarker;
|
|
160
|
+
// If the device supports both touch and mouse (like IE11), and we are
|
|
161
|
+
// touch-dragging inside the plot area, don't handle the mouse event.
|
|
162
|
+
// #4339.
|
|
163
|
+
if (selectionMarker && selectionMarker.touch) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
// If the mouse is outside the plot area, adjust to coordinates
|
|
167
|
+
// inside to prevent the selection marker from going outside
|
|
168
|
+
if (chartX < plotLeft) {
|
|
169
|
+
chartX = plotLeft;
|
|
170
|
+
}
|
|
171
|
+
else if (chartX > plotLeft + plotWidth) {
|
|
172
|
+
chartX = plotLeft + plotWidth;
|
|
173
|
+
}
|
|
174
|
+
if (chartY < plotTop) {
|
|
175
|
+
chartY = plotTop;
|
|
176
|
+
}
|
|
177
|
+
else if (chartY > plotTop + plotHeight) {
|
|
178
|
+
chartY = plotTop + plotHeight;
|
|
179
|
+
}
|
|
180
|
+
// Determine if the mouse has moved more than 10px
|
|
181
|
+
this.hasDragged = Math.sqrt(Math.pow(mouseDownX - chartX, 2) +
|
|
182
|
+
Math.pow(mouseDownY - chartY, 2));
|
|
183
|
+
if (this.hasDragged > 10) {
|
|
184
|
+
clickedInside = chart.isInsidePlot(mouseDownX - plotLeft, mouseDownY - plotTop, {
|
|
185
|
+
visiblePlotOnly: true
|
|
186
|
+
});
|
|
187
|
+
const { shapeType, attrs } = this.getSelectionMarkerAttrs(chartX, chartY);
|
|
188
|
+
// Make a selection
|
|
189
|
+
if (this.hasZoom &&
|
|
190
|
+
clickedInside &&
|
|
191
|
+
!panKeyPressed) {
|
|
192
|
+
if (!selectionMarker) {
|
|
193
|
+
this.selectionMarker = selectionMarker =
|
|
194
|
+
chart.renderer[shapeType]();
|
|
195
|
+
selectionMarker
|
|
196
|
+
.attr({
|
|
197
|
+
'class': 'highcharts-selection-marker',
|
|
198
|
+
zIndex: 7
|
|
199
|
+
})
|
|
200
|
+
.add();
|
|
201
|
+
if (!chart.styledMode) {
|
|
202
|
+
selectionMarker.attr({
|
|
203
|
+
fill: selectionMarkerFill ||
|
|
204
|
+
color("#334eff" /* Palette.highlightColor80 */)
|
|
205
|
+
.setOpacity(0.25).get()
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
if (selectionMarker) {
|
|
211
|
+
selectionMarker.attr(attrs);
|
|
212
|
+
}
|
|
213
|
+
// Panning
|
|
214
|
+
if (clickedInside && !selectionMarker && panningEnabled) {
|
|
215
|
+
chart.pan(e, panning);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Start a drag operation.
|
|
221
|
+
* @private
|
|
222
|
+
* @function Highcharts.Pointer#dragStart
|
|
223
|
+
*/
|
|
224
|
+
dragStart(e) {
|
|
225
|
+
const chart = this.chart;
|
|
226
|
+
// Record the start position
|
|
227
|
+
chart.mouseIsDown = e.type;
|
|
228
|
+
chart.cancelClick = false;
|
|
229
|
+
chart.mouseDownX = e.chartX;
|
|
230
|
+
chart.mouseDownY = e.chartY;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Get selection box to calculate extremes
|
|
234
|
+
* @private
|
|
235
|
+
* @function Highcharts.Pointer#getSelectionBox
|
|
236
|
+
* @emits getSelectionBox
|
|
237
|
+
*/
|
|
238
|
+
getSelectionBox(marker) {
|
|
239
|
+
const e = {
|
|
240
|
+
args: { marker },
|
|
241
|
+
result: marker.getBBox()
|
|
242
|
+
};
|
|
243
|
+
fireEvent(this, 'getSelectionBox', e);
|
|
244
|
+
return e.result;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* On mouse up or touch end across the entire document, drop the selection.
|
|
248
|
+
* @private
|
|
249
|
+
* @function Highcharts.Pointer#drop
|
|
250
|
+
*/
|
|
251
|
+
drop(e) {
|
|
252
|
+
const { chart, selectionMarker } = this;
|
|
253
|
+
// During a mouse, touch or mousewheel pan, the `startOnTick` and
|
|
254
|
+
// `endOnTick` options are ignored. Otherwise the zooming or panning
|
|
255
|
+
// would be jumpy, or even not performed because the end ticks would
|
|
256
|
+
// block it. After the touch has ended, we undo this and render again.
|
|
257
|
+
let redraw;
|
|
258
|
+
for (const axis of chart.axes) {
|
|
259
|
+
if (axis.isPanning) {
|
|
260
|
+
axis.isPanning = false;
|
|
261
|
+
if (axis.options.startOnTick ||
|
|
262
|
+
axis.options.endOnTick ||
|
|
263
|
+
axis.series.some((s) => s.boosted)) {
|
|
264
|
+
axis.forceRedraw = true;
|
|
265
|
+
axis.setExtremes(axis.userMin, axis.userMax, false);
|
|
266
|
+
redraw = true;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
if (redraw) {
|
|
271
|
+
chart.redraw();
|
|
272
|
+
}
|
|
273
|
+
if (selectionMarker && e) {
|
|
274
|
+
// A selection has been made
|
|
275
|
+
if (this.hasDragged) {
|
|
276
|
+
const from = this.getSelectionBox(selectionMarker);
|
|
277
|
+
chart.transform({
|
|
278
|
+
axes: chart.axes.filter((a) => a.zoomEnabled &&
|
|
279
|
+
((a.coll === 'xAxis' && this.zoomX) ||
|
|
280
|
+
(a.coll === 'yAxis' && this.zoomY))),
|
|
281
|
+
selection: {
|
|
282
|
+
originalEvent: e, // #4890
|
|
283
|
+
xAxis: [],
|
|
284
|
+
yAxis: [],
|
|
285
|
+
...from
|
|
286
|
+
},
|
|
287
|
+
from
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
if (isNumber(chart.index)) {
|
|
291
|
+
this.selectionMarker = selectionMarker.destroy();
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
// Reset all. Check isNumber because it may be destroyed on mouse up
|
|
295
|
+
// (#877)
|
|
296
|
+
if (chart && isNumber(chart.index)) {
|
|
297
|
+
css(chart.container, { cursor: chart._cursor });
|
|
298
|
+
chart.cancelClick = this.hasDragged > 10; // #370
|
|
299
|
+
chart.mouseIsDown = false;
|
|
300
|
+
this.hasDragged = 0;
|
|
301
|
+
this.pinchDown = [];
|
|
302
|
+
this.hasPinchMoved = false;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Finds the closest point to a set of coordinates, using the k-d-tree
|
|
307
|
+
* algorithm.
|
|
308
|
+
*
|
|
309
|
+
* @function Highcharts.Pointer#findNearestKDPoint
|
|
310
|
+
*
|
|
311
|
+
* @param {Array<Highcharts.Series>} series
|
|
312
|
+
* All the series to search in.
|
|
313
|
+
*
|
|
314
|
+
* @param {boolean|undefined} shared
|
|
315
|
+
* Whether it is a shared tooltip or not.
|
|
316
|
+
*
|
|
317
|
+
* @param {Highcharts.PointerEventObject} e
|
|
318
|
+
* The pointer event object, containing chart coordinates of the pointer.
|
|
319
|
+
*
|
|
320
|
+
* @return {Highcharts.Point|undefined}
|
|
321
|
+
* The point closest to given coordinates.
|
|
322
|
+
*/
|
|
323
|
+
findNearestKDPoint(series, shared, e) {
|
|
324
|
+
let closest;
|
|
325
|
+
/** @private */
|
|
326
|
+
function sort(p1, p2) {
|
|
327
|
+
const isCloserX = p1.distX - p2.distX, isCloser = p1.dist - p2.dist, isAbove = (p2.series.group?.zIndex -
|
|
328
|
+
p1.series.group?.zIndex);
|
|
329
|
+
let result;
|
|
330
|
+
// We have two points which are not in the same place on xAxis
|
|
331
|
+
// and shared tooltip:
|
|
332
|
+
if (isCloserX !== 0 && shared) { // #5721
|
|
333
|
+
result = isCloserX;
|
|
334
|
+
// Points are not exactly in the same place on x/yAxis:
|
|
335
|
+
}
|
|
336
|
+
else if (isCloser !== 0) {
|
|
337
|
+
result = isCloser;
|
|
338
|
+
// The same xAxis and yAxis position, sort by z-index:
|
|
339
|
+
}
|
|
340
|
+
else if (isAbove !== 0) {
|
|
341
|
+
result = isAbove;
|
|
342
|
+
// The same zIndex, sort by array index:
|
|
343
|
+
}
|
|
344
|
+
else {
|
|
345
|
+
result =
|
|
346
|
+
p1.series.index > p2.series.index ?
|
|
347
|
+
-1 :
|
|
348
|
+
1;
|
|
349
|
+
}
|
|
350
|
+
return result;
|
|
351
|
+
}
|
|
352
|
+
series.forEach(function (s) {
|
|
353
|
+
const noSharedTooltip = s.noSharedTooltip && shared, compareX = (!noSharedTooltip &&
|
|
354
|
+
s.options.findNearestPointBy.indexOf('y') < 0), point = s.searchPoint(e, compareX);
|
|
355
|
+
if ( // Check that we actually found a point on the series.
|
|
356
|
+
isObject(point, true) && point.series &&
|
|
357
|
+
// Use the new point if it is closer.
|
|
358
|
+
(!isObject(closest, true) ||
|
|
359
|
+
(sort(closest, point) > 0))) {
|
|
360
|
+
closest = point;
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
return closest;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* @private
|
|
367
|
+
* @function Highcharts.Pointer#getChartCoordinatesFromPoint
|
|
368
|
+
*/
|
|
369
|
+
getChartCoordinatesFromPoint(point, inverted) {
|
|
370
|
+
const { xAxis, yAxis } = point.series, shapeArgs = point.shapeArgs;
|
|
371
|
+
if (xAxis && yAxis) {
|
|
372
|
+
let x = point.clientX ?? point.plotX ?? 0, y = point.plotY || 0;
|
|
373
|
+
if (point.isNode &&
|
|
374
|
+
shapeArgs &&
|
|
375
|
+
isNumber(shapeArgs.x) &&
|
|
376
|
+
isNumber(shapeArgs.y)) {
|
|
377
|
+
x = shapeArgs.x;
|
|
378
|
+
y = shapeArgs.y;
|
|
379
|
+
}
|
|
380
|
+
return inverted ? {
|
|
381
|
+
chartX: yAxis.len + yAxis.pos - y,
|
|
382
|
+
chartY: xAxis.len + xAxis.pos - x
|
|
383
|
+
} : {
|
|
384
|
+
chartX: x + xAxis.pos,
|
|
385
|
+
chartY: y + yAxis.pos
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
if (shapeArgs?.x && shapeArgs.y) {
|
|
389
|
+
// E.g. pies do not have axes
|
|
390
|
+
return {
|
|
391
|
+
chartX: shapeArgs.x,
|
|
392
|
+
chartY: shapeArgs.y
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Return the cached chartPosition if it is available on the Pointer,
|
|
398
|
+
* otherwise find it. Running offset is quite expensive, so it should be
|
|
399
|
+
* avoided when we know the chart hasn't moved.
|
|
400
|
+
*
|
|
401
|
+
* @function Highcharts.Pointer#getChartPosition
|
|
402
|
+
*
|
|
403
|
+
* @return {Highcharts.ChartPositionObject}
|
|
404
|
+
* The offset of the chart container within the page
|
|
405
|
+
*/
|
|
406
|
+
getChartPosition() {
|
|
407
|
+
if (this.chartPosition) {
|
|
408
|
+
return this.chartPosition;
|
|
409
|
+
}
|
|
410
|
+
const { container } = this.chart;
|
|
411
|
+
const pos = offset(container);
|
|
412
|
+
this.chartPosition = {
|
|
413
|
+
left: pos.left,
|
|
414
|
+
top: pos.top,
|
|
415
|
+
scaleX: 1,
|
|
416
|
+
scaleY: 1
|
|
417
|
+
};
|
|
418
|
+
const { offsetHeight, offsetWidth } = container;
|
|
419
|
+
// #13342 - tooltip was not visible in Chrome, when chart
|
|
420
|
+
// updates height.
|
|
421
|
+
if (offsetWidth > 2 && // #13342
|
|
422
|
+
offsetHeight > 2 // #13342
|
|
423
|
+
) {
|
|
424
|
+
this.chartPosition.scaleX = pos.width / offsetWidth;
|
|
425
|
+
this.chartPosition.scaleY = pos.height / offsetHeight;
|
|
426
|
+
}
|
|
427
|
+
return this.chartPosition;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Get the click position in terms of axis values.
|
|
431
|
+
*
|
|
432
|
+
* @function Highcharts.Pointer#getCoordinates
|
|
433
|
+
*
|
|
434
|
+
* @param {Highcharts.PointerEventObject} e
|
|
435
|
+
* Pointer event, extended with `chartX` and `chartY` properties.
|
|
436
|
+
*
|
|
437
|
+
* @return {Highcharts.PointerAxisCoordinatesObject}
|
|
438
|
+
* Axis coordinates.
|
|
439
|
+
*/
|
|
440
|
+
getCoordinates(e) {
|
|
441
|
+
const coordinates = {
|
|
442
|
+
xAxis: [],
|
|
443
|
+
yAxis: []
|
|
444
|
+
};
|
|
445
|
+
for (const axis of this.chart.axes) {
|
|
446
|
+
coordinates[axis.isXAxis ? 'xAxis' : 'yAxis'].push({
|
|
447
|
+
axis,
|
|
448
|
+
value: axis.toValue(e[axis.horiz ? 'chartX' : 'chartY'])
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
return coordinates;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Calculates what is the current hovered point/points and series.
|
|
455
|
+
*
|
|
456
|
+
* @private
|
|
457
|
+
* @function Highcharts.Pointer#getHoverData
|
|
458
|
+
*
|
|
459
|
+
* @param {Highcharts.Point|undefined} existingHoverPoint
|
|
460
|
+
* The point currently being hovered.
|
|
461
|
+
*
|
|
462
|
+
* @param {Highcharts.Series|undefined} existingHoverSeries
|
|
463
|
+
* The series currently being hovered.
|
|
464
|
+
*
|
|
465
|
+
* @param {Array<Highcharts.Series>} series
|
|
466
|
+
* All the series in the chart.
|
|
467
|
+
*
|
|
468
|
+
* @param {boolean} isDirectTouch
|
|
469
|
+
* Is the pointer directly hovering the point.
|
|
470
|
+
*
|
|
471
|
+
* @param {boolean|undefined} shared
|
|
472
|
+
* Whether it is a shared tooltip or not.
|
|
473
|
+
*
|
|
474
|
+
* @param {Highcharts.PointerEventObject} [e]
|
|
475
|
+
* The triggering event, containing chart coordinates of the pointer.
|
|
476
|
+
*
|
|
477
|
+
* @return {Object}
|
|
478
|
+
* Object containing resulting hover data: hoverPoint, hoverSeries, and
|
|
479
|
+
* hoverPoints.
|
|
480
|
+
*/
|
|
481
|
+
getHoverData(existingHoverPoint, existingHoverSeries, series, isDirectTouch, shared, e) {
|
|
482
|
+
const hoverPoints = [], useExisting = !!(isDirectTouch && existingHoverPoint), filter = function (s) {
|
|
483
|
+
return (s.visible &&
|
|
484
|
+
!(!shared && s.directTouch) && // #3821
|
|
485
|
+
pick(s.options.enableMouseTracking, true));
|
|
486
|
+
};
|
|
487
|
+
let hoverSeries = existingHoverSeries,
|
|
488
|
+
// Which series to look in for the hover point
|
|
489
|
+
searchSeries,
|
|
490
|
+
// Parameters needed for beforeGetHoverData event.
|
|
491
|
+
eventArgs = {
|
|
492
|
+
chartX: e ? e.chartX : void 0,
|
|
493
|
+
chartY: e ? e.chartY : void 0,
|
|
494
|
+
shared: shared
|
|
495
|
+
};
|
|
496
|
+
// Find chart.hoverPane and update filter method in polar.
|
|
497
|
+
fireEvent(this, 'beforeGetHoverData', eventArgs);
|
|
498
|
+
const notSticky = hoverSeries && !hoverSeries.stickyTracking;
|
|
499
|
+
searchSeries = notSticky ?
|
|
500
|
+
// Only search on hovered series if it has stickyTracking false
|
|
501
|
+
[hoverSeries] :
|
|
502
|
+
// Filter what series to look in.
|
|
503
|
+
series.filter((s) => s.stickyTracking &&
|
|
504
|
+
(eventArgs.filter || filter)(s));
|
|
505
|
+
// Use existing hovered point or find the one closest to coordinates.
|
|
506
|
+
const hoverPoint = useExisting || !e ?
|
|
507
|
+
existingHoverPoint :
|
|
508
|
+
this.findNearestKDPoint(searchSeries, shared, e);
|
|
509
|
+
// Assign hover series
|
|
510
|
+
hoverSeries = hoverPoint?.series;
|
|
511
|
+
// If we have a hoverPoint, assign hoverPoints.
|
|
512
|
+
if (hoverPoint) {
|
|
513
|
+
// When tooltip is shared, it displays more than one point
|
|
514
|
+
if (shared && !hoverSeries.noSharedTooltip) {
|
|
515
|
+
searchSeries = series.filter(function (s) {
|
|
516
|
+
return eventArgs.filter ?
|
|
517
|
+
eventArgs.filter(s) : filter(s) && !s.noSharedTooltip;
|
|
518
|
+
});
|
|
519
|
+
// Get all points with the same x value as the hoverPoint
|
|
520
|
+
searchSeries.forEach(function (s) {
|
|
521
|
+
const nullInteraction = s.options?.nullInteraction;
|
|
522
|
+
let point = find(s.points, function (p) {
|
|
523
|
+
return (p.x === hoverPoint.x && (!p.isNull ||
|
|
524
|
+
!!nullInteraction));
|
|
525
|
+
});
|
|
526
|
+
if (isObject(point)) {
|
|
527
|
+
/*
|
|
528
|
+
* Boost returns a minimal point. Convert it to a usable
|
|
529
|
+
* point for tooltip and states.
|
|
530
|
+
*/
|
|
531
|
+
if (s.boosted && s.boost) {
|
|
532
|
+
point = s.boost.getPoint(point);
|
|
533
|
+
}
|
|
534
|
+
hoverPoints.push(point);
|
|
535
|
+
}
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
else {
|
|
539
|
+
hoverPoints.push(hoverPoint);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
// Check whether the hoverPoint is inside pane we are hovering over.
|
|
543
|
+
eventArgs = { hoverPoint: hoverPoint };
|
|
544
|
+
fireEvent(this, 'afterGetHoverData', eventArgs);
|
|
545
|
+
return {
|
|
546
|
+
hoverPoint: eventArgs.hoverPoint,
|
|
547
|
+
hoverSeries: hoverSeries,
|
|
548
|
+
hoverPoints: hoverPoints
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* @private
|
|
553
|
+
* @function Highcharts.Pointer#getPointFromEvent
|
|
554
|
+
*/
|
|
555
|
+
getPointFromEvent(e) {
|
|
556
|
+
let target = e.target, point;
|
|
557
|
+
while (target && !point) {
|
|
558
|
+
point = target.point;
|
|
559
|
+
target = target.parentNode;
|
|
560
|
+
}
|
|
561
|
+
return point;
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* @private
|
|
565
|
+
* @function Highcharts.Pointer#onTrackerMouseOut
|
|
566
|
+
*/
|
|
567
|
+
onTrackerMouseOut(e) {
|
|
568
|
+
const chart = this.chart;
|
|
569
|
+
const relatedTarget = e.relatedTarget;
|
|
570
|
+
const series = chart.hoverSeries;
|
|
571
|
+
this.isDirectTouch = false;
|
|
572
|
+
if (series &&
|
|
573
|
+
relatedTarget &&
|
|
574
|
+
!series.stickyTracking &&
|
|
575
|
+
!this.inClass(relatedTarget, 'highcharts-tooltip') &&
|
|
576
|
+
(!this.inClass(relatedTarget, 'highcharts-series-' + series.index) || // #2499, #4465, #5553
|
|
577
|
+
!this.inClass(relatedTarget, 'highcharts-tracker'))) {
|
|
578
|
+
series.onMouseOut();
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Utility to detect whether an element has, or has a parent with, a
|
|
583
|
+
* specific class name. Used on detection of tracker objects and on deciding
|
|
584
|
+
* whether hovering the tooltip should cause the active series to mouse out.
|
|
585
|
+
*
|
|
586
|
+
* @function Highcharts.Pointer#inClass
|
|
587
|
+
*
|
|
588
|
+
* @param {Highcharts.SVGDOMElement|Highcharts.HTMLDOMElement} element
|
|
589
|
+
* The element to investigate.
|
|
590
|
+
*
|
|
591
|
+
* @param {string} className
|
|
592
|
+
* The class name to look for.
|
|
593
|
+
*
|
|
594
|
+
* @return {boolean|undefined}
|
|
595
|
+
* True if either the element or one of its parents has the given class
|
|
596
|
+
* name.
|
|
597
|
+
*/
|
|
598
|
+
inClass(element, className) {
|
|
599
|
+
let elem = element, elemClassName;
|
|
600
|
+
while (elem) {
|
|
601
|
+
elemClassName = attr(elem, 'class');
|
|
602
|
+
if (elemClassName) {
|
|
603
|
+
if (elemClassName.indexOf(className) !== -1) {
|
|
604
|
+
return true;
|
|
605
|
+
}
|
|
606
|
+
if (elemClassName.indexOf('highcharts-container') !== -1) {
|
|
607
|
+
return false;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
elem = elem.parentElement;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Initialize the Pointer.
|
|
615
|
+
*
|
|
616
|
+
* @private
|
|
617
|
+
* @function Highcharts.Pointer#init
|
|
618
|
+
*
|
|
619
|
+
* @param {Highcharts.Chart} chart
|
|
620
|
+
* The Chart instance.
|
|
621
|
+
*
|
|
622
|
+
* @param {Highcharts.Options} options
|
|
623
|
+
* The root options object. The pointer uses options from the chart and
|
|
624
|
+
* tooltip structures.
|
|
625
|
+
*/
|
|
626
|
+
constructor(chart, options) {
|
|
627
|
+
this.hasDragged = 0;
|
|
628
|
+
this.pointerCaptureEventsToUnbind = [];
|
|
629
|
+
this.eventsToUnbind = [];
|
|
630
|
+
// Store references
|
|
631
|
+
this.options = options;
|
|
632
|
+
this.chart = chart;
|
|
633
|
+
// Do we need to handle click on a touch device?
|
|
634
|
+
this.runChartClick = Boolean(options.chart.events?.click);
|
|
635
|
+
this.pinchDown = [];
|
|
636
|
+
this.setDOMEvents();
|
|
637
|
+
fireEvent(this, 'afterInit');
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Takes a browser event object and extends it with custom Highcharts
|
|
641
|
+
* properties `chartX` and `chartY` in order to work on the internal
|
|
642
|
+
* coordinate system.
|
|
643
|
+
*
|
|
644
|
+
* On map charts, the properties `lon` and `lat` are added to the event
|
|
645
|
+
* object given that the chart has projection information.
|
|
646
|
+
*
|
|
647
|
+
* @function Highcharts.Pointer#normalize
|
|
648
|
+
*
|
|
649
|
+
* @param {global.MouseEvent|global.PointerEvent|global.TouchEvent} e
|
|
650
|
+
* Event object in standard browsers.
|
|
651
|
+
*
|
|
652
|
+
* @param {Highcharts.OffsetObject} [chartPosition]
|
|
653
|
+
* Additional chart offset.
|
|
654
|
+
*
|
|
655
|
+
* @return {Highcharts.PointerEventObject}
|
|
656
|
+
* A browser event with extended properties `chartX` and `chartY`.
|
|
657
|
+
*/
|
|
658
|
+
normalize(e, chartPosition) {
|
|
659
|
+
const touches = e.touches;
|
|
660
|
+
// Position for iOS (#2757)
|
|
661
|
+
const ePos = (touches ?
|
|
662
|
+
touches.length ?
|
|
663
|
+
touches.item(0) :
|
|
664
|
+
(pick(// #13534
|
|
665
|
+
touches.changedTouches, e.changedTouches))[0] :
|
|
666
|
+
e);
|
|
667
|
+
// Get mouse position
|
|
668
|
+
if (!chartPosition) {
|
|
669
|
+
chartPosition = this.getChartPosition();
|
|
670
|
+
}
|
|
671
|
+
let chartX = ePos.pageX - chartPosition.left, chartY = ePos.pageY - chartPosition.top;
|
|
672
|
+
// #11329 - when there is scaling on a parent element, we need to take
|
|
673
|
+
// this into account
|
|
674
|
+
chartX /= chartPosition.scaleX;
|
|
675
|
+
chartY /= chartPosition.scaleY;
|
|
676
|
+
return extend(e, {
|
|
677
|
+
chartX: Math.round(chartX),
|
|
678
|
+
chartY: Math.round(chartY)
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* @private
|
|
683
|
+
* @function Highcharts.Pointer#onContainerClick
|
|
684
|
+
*/
|
|
685
|
+
onContainerClick(e) {
|
|
686
|
+
const chart = this.chart;
|
|
687
|
+
const hoverPoint = chart.hoverPoint;
|
|
688
|
+
const pEvt = this.normalize(e);
|
|
689
|
+
const plotLeft = chart.plotLeft;
|
|
690
|
+
const plotTop = chart.plotTop;
|
|
691
|
+
if (!chart.cancelClick) {
|
|
692
|
+
// On tracker click, fire the series and point events. #783, #1583
|
|
693
|
+
if (hoverPoint &&
|
|
694
|
+
this.inClass(pEvt.target, 'highcharts-tracker')) {
|
|
695
|
+
// The series click event
|
|
696
|
+
fireEvent(hoverPoint.series, 'click', extend(pEvt, {
|
|
697
|
+
point: hoverPoint
|
|
698
|
+
}));
|
|
699
|
+
// The point click event
|
|
700
|
+
if (chart.hoverPoint) { // It may be destroyed (#1844)
|
|
701
|
+
hoverPoint.firePointEvent('click', pEvt);
|
|
702
|
+
}
|
|
703
|
+
// When clicking outside a tracker, fire a chart event
|
|
704
|
+
}
|
|
705
|
+
else {
|
|
706
|
+
extend(pEvt, this.getCoordinates(pEvt));
|
|
707
|
+
// Fire a click event in the chart
|
|
708
|
+
if (chart.isInsidePlot(pEvt.chartX - plotLeft, pEvt.chartY - plotTop, {
|
|
709
|
+
visiblePlotOnly: true
|
|
710
|
+
})) {
|
|
711
|
+
fireEvent(chart, 'click', pEvt);
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* @private
|
|
718
|
+
* @function Highcharts.Pointer#onContainerMouseDown
|
|
719
|
+
*/
|
|
720
|
+
onContainerMouseDown(e) {
|
|
721
|
+
const isPrimaryButton = ((e.buttons || e.button) & 1) === 1;
|
|
722
|
+
e = this.normalize(e);
|
|
723
|
+
// #11635, Firefox does not reliably fire move event after click scroll
|
|
724
|
+
if (H.isFirefox &&
|
|
725
|
+
e.button !== 0) {
|
|
726
|
+
this.onContainerMouseMove(e);
|
|
727
|
+
}
|
|
728
|
+
// #11635, limiting to primary button
|
|
729
|
+
if (typeof e.button === 'undefined' ||
|
|
730
|
+
isPrimaryButton) {
|
|
731
|
+
this.zoomOption(e);
|
|
732
|
+
// #295, #13737 solve conflict between container drag and chart zoom
|
|
733
|
+
if (isPrimaryButton) {
|
|
734
|
+
e.preventDefault?.();
|
|
735
|
+
}
|
|
736
|
+
this.dragStart(e);
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* When mouse leaves the container, hide the tooltip.
|
|
741
|
+
* @private
|
|
742
|
+
* @function Highcharts.Pointer#onContainerMouseLeave
|
|
743
|
+
*/
|
|
744
|
+
onContainerMouseLeave(e) {
|
|
745
|
+
const { pointer } = charts[pick(Pointer.hoverChartIndex, -1)] || {};
|
|
746
|
+
e = this.normalize(e);
|
|
747
|
+
this.onContainerMouseMove(e);
|
|
748
|
+
// #4886, MS Touch end fires mouseleave but with no related target
|
|
749
|
+
if (pointer &&
|
|
750
|
+
!this.inClass(e.relatedTarget, 'highcharts-tooltip')) {
|
|
751
|
+
pointer.reset();
|
|
752
|
+
// Also reset the chart position, used in #149 fix
|
|
753
|
+
pointer.chartPosition = void 0;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* When mouse enters the container, delete pointer's chartPosition.
|
|
758
|
+
* @private
|
|
759
|
+
* @function Highcharts.Pointer#onContainerMouseEnter
|
|
760
|
+
*/
|
|
761
|
+
onContainerMouseEnter() {
|
|
762
|
+
delete this.chartPosition;
|
|
763
|
+
}
|
|
764
|
+
/**
|
|
765
|
+
* The mousemove, touchmove and touchstart event handler
|
|
766
|
+
* @private
|
|
767
|
+
* @function Highcharts.Pointer#onContainerMouseMove
|
|
768
|
+
*/
|
|
769
|
+
onContainerMouseMove(e) {
|
|
770
|
+
const chart = this.chart, tooltip = chart.tooltip, pEvt = this.normalize(e);
|
|
771
|
+
this.setHoverChartIndex(e);
|
|
772
|
+
if (chart.mouseIsDown === 'mousedown' || this.touchSelect(pEvt)) {
|
|
773
|
+
this.drag(pEvt);
|
|
774
|
+
}
|
|
775
|
+
// Show the tooltip and run mouse over events (#977)
|
|
776
|
+
if (!chart.exporting?.openMenu &&
|
|
777
|
+
(this.inClass(pEvt.target, 'highcharts-tracker') ||
|
|
778
|
+
chart.isInsidePlot(pEvt.chartX - chart.plotLeft, pEvt.chartY - chart.plotTop, {
|
|
779
|
+
visiblePlotOnly: true
|
|
780
|
+
})) &&
|
|
781
|
+
// If the tooltip has stickOnContact enabled, do nothing. This
|
|
782
|
+
// applies regardless of any combinations of the `split` and
|
|
783
|
+
// `useHTML` options.
|
|
784
|
+
!tooltip?.shouldStickOnContact(pEvt)) {
|
|
785
|
+
if (this.inClass(pEvt.target, 'highcharts-no-tooltip')) {
|
|
786
|
+
this.reset(false, 0);
|
|
787
|
+
}
|
|
788
|
+
else {
|
|
789
|
+
this.runPointActions(pEvt);
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
/**
|
|
794
|
+
* @private
|
|
795
|
+
* @function Highcharts.Pointer#onDocumentTouchEnd
|
|
796
|
+
*/
|
|
797
|
+
onDocumentTouchEnd(e) {
|
|
798
|
+
this.onDocumentMouseUp(e);
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* @private
|
|
802
|
+
* @function Highcharts.Pointer#onContainerTouchMove
|
|
803
|
+
*/
|
|
804
|
+
onContainerTouchMove(e) {
|
|
805
|
+
if (this.touchSelect(e)) {
|
|
806
|
+
this.onContainerMouseMove(e);
|
|
807
|
+
}
|
|
808
|
+
else {
|
|
809
|
+
this.touch(e);
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* @private
|
|
814
|
+
* @function Highcharts.Pointer#onContainerTouchStart
|
|
815
|
+
*/
|
|
816
|
+
onContainerTouchStart(e) {
|
|
817
|
+
if (this.touchSelect(e)) {
|
|
818
|
+
this.onContainerMouseDown(e);
|
|
819
|
+
}
|
|
820
|
+
else {
|
|
821
|
+
this.zoomOption(e);
|
|
822
|
+
this.touch(e, true);
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* Special handler for mouse move that will hide the tooltip when the mouse
|
|
827
|
+
* leaves the plotarea. Issue #149 workaround. The mouseleave event does not
|
|
828
|
+
* always fire.
|
|
829
|
+
* @private
|
|
830
|
+
* @function Highcharts.Pointer#onDocumentMouseMove
|
|
831
|
+
*/
|
|
832
|
+
onDocumentMouseMove(e) {
|
|
833
|
+
const chart = this.chart;
|
|
834
|
+
const tooltip = chart.tooltip;
|
|
835
|
+
const chartPosition = this.chartPosition;
|
|
836
|
+
const pEvt = this.normalize(e, chartPosition);
|
|
837
|
+
// If we're outside, hide the tooltip
|
|
838
|
+
if (chartPosition &&
|
|
839
|
+
!chart.isInsidePlot(pEvt.chartX - chart.plotLeft, pEvt.chartY - chart.plotTop, {
|
|
840
|
+
visiblePlotOnly: true
|
|
841
|
+
}) &&
|
|
842
|
+
!tooltip?.shouldStickOnContact(pEvt) && (pEvt.target === chart.container.ownerDocument ||
|
|
843
|
+
!this.inClass(pEvt.target, 'highcharts-tracker'))) {
|
|
844
|
+
this.reset();
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
/**
|
|
848
|
+
* @private
|
|
849
|
+
* @function Highcharts.Pointer#onDocumentMouseUp
|
|
850
|
+
*/
|
|
851
|
+
onDocumentMouseUp(e) {
|
|
852
|
+
// #17852, IOS devices sometimes reverts back to previous point when
|
|
853
|
+
// dragging between points
|
|
854
|
+
if (e?.touches && this.hasPinchMoved) {
|
|
855
|
+
e?.preventDefault?.();
|
|
856
|
+
}
|
|
857
|
+
charts[pick(Pointer.hoverChartIndex, -1)]
|
|
858
|
+
?.pointer
|
|
859
|
+
?.drop(e);
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* Handle touch events with two touches
|
|
863
|
+
* @private
|
|
864
|
+
* @function Highcharts.Pointer#pinch
|
|
865
|
+
*/
|
|
866
|
+
pinch(e) {
|
|
867
|
+
const pointer = this, { chart, hasZoom, lastTouches } = pointer, touches = [].map.call(e.touches || [],
|
|
868
|
+
// Normalize each touch
|
|
869
|
+
(touch) => pointer.normalize(touch)), touchesLength = touches.length, fireClickEvent = touchesLength === 1 && ((pointer.inClass(e.target, 'highcharts-tracker') &&
|
|
870
|
+
chart.runTrackerClick) ||
|
|
871
|
+
pointer.runChartClick), tooltip = chart.tooltip, followTouchMove = touchesLength === 1 &&
|
|
872
|
+
pick(tooltip?.options.followTouchMove, true);
|
|
873
|
+
// Don't initiate panning until the user has pinched. This prevents us
|
|
874
|
+
// from blocking page scrolling as users scroll down a long page
|
|
875
|
+
// (#4210).
|
|
876
|
+
if (touchesLength > 1) {
|
|
877
|
+
pointer.initiated = true;
|
|
878
|
+
}
|
|
879
|
+
else if (followTouchMove) {
|
|
880
|
+
// #16119: Prevent blocking scroll when single-finger panning is
|
|
881
|
+
// not enabled
|
|
882
|
+
pointer.initiated = false;
|
|
883
|
+
}
|
|
884
|
+
// On touch devices, only proceed to trigger click if a handler is
|
|
885
|
+
// defined
|
|
886
|
+
if (hasZoom &&
|
|
887
|
+
pointer.initiated &&
|
|
888
|
+
!fireClickEvent &&
|
|
889
|
+
e.cancelable !== false) {
|
|
890
|
+
e.preventDefault();
|
|
891
|
+
}
|
|
892
|
+
// Register the touch start position
|
|
893
|
+
if (e.type === 'touchstart') {
|
|
894
|
+
pointer.pinchDown = touches;
|
|
895
|
+
pointer.res = true; // Reset on next move
|
|
896
|
+
chart.mouseDownX = e.chartX;
|
|
897
|
+
// Optionally move the tooltip on touchmove
|
|
898
|
+
}
|
|
899
|
+
else if (followTouchMove) {
|
|
900
|
+
this.runPointActions(pointer.normalize(e));
|
|
901
|
+
// Event type is touchmove, handle panning and pinching. The length can
|
|
902
|
+
// be 0 when releasing, if touchend fires first
|
|
903
|
+
}
|
|
904
|
+
else if (lastTouches) {
|
|
905
|
+
fireEvent(chart, 'touchpan', {
|
|
906
|
+
originalEvent: e,
|
|
907
|
+
touches
|
|
908
|
+
}, () => {
|
|
909
|
+
const boxFromTouches = (touches) => {
|
|
910
|
+
const finger0 = touches[0], finger1 = touches[1] || finger0;
|
|
911
|
+
return {
|
|
912
|
+
x: finger0.chartX,
|
|
913
|
+
y: finger0.chartY,
|
|
914
|
+
width: finger1.chartX - finger0.chartX,
|
|
915
|
+
height: finger1.chartY - finger0.chartY
|
|
916
|
+
};
|
|
917
|
+
};
|
|
918
|
+
chart.transform({
|
|
919
|
+
axes: chart.axes
|
|
920
|
+
.filter((axis) => axis.zoomEnabled &&
|
|
921
|
+
((this.zoomHor && axis.horiz) ||
|
|
922
|
+
(this.zoomVert && !axis.horiz))),
|
|
923
|
+
to: boxFromTouches(touches),
|
|
924
|
+
from: boxFromTouches(lastTouches),
|
|
925
|
+
trigger: e.type
|
|
926
|
+
});
|
|
927
|
+
});
|
|
928
|
+
if (pointer.res) {
|
|
929
|
+
pointer.res = false;
|
|
930
|
+
this.reset(false, 0);
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
pointer.lastTouches = touches;
|
|
934
|
+
}
|
|
935
|
+
/**
|
|
936
|
+
* Run translation operations
|
|
937
|
+
* @private
|
|
938
|
+
* @function Highcharts.Pointer#pinchTranslate
|
|
939
|
+
* /
|
|
940
|
+
public pinchTranslate(
|
|
941
|
+
pinchDown: Array<any>,
|
|
942
|
+
touches: Array<PointerEvent>,
|
|
943
|
+
transform: any,
|
|
944
|
+
selectionMarker: any,
|
|
945
|
+
clip: any,
|
|
946
|
+
lastValidTouch: any
|
|
947
|
+
): void {
|
|
948
|
+
if (this.zoomHor) {
|
|
949
|
+
this.pinchTranslateDirection(
|
|
950
|
+
true,
|
|
951
|
+
pinchDown,
|
|
952
|
+
touches,
|
|
953
|
+
transform,
|
|
954
|
+
selectionMarker,
|
|
955
|
+
clip,
|
|
956
|
+
lastValidTouch
|
|
957
|
+
);
|
|
958
|
+
}
|
|
959
|
+
if (this.zoomVert) {
|
|
960
|
+
this.pinchTranslateDirection(
|
|
961
|
+
false,
|
|
962
|
+
pinchDown,
|
|
963
|
+
touches,
|
|
964
|
+
transform,
|
|
965
|
+
selectionMarker,
|
|
966
|
+
clip,
|
|
967
|
+
lastValidTouch
|
|
968
|
+
);
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
*/
|
|
972
|
+
/**
|
|
973
|
+
* Run translation operations for each direction (horizontal and vertical)
|
|
974
|
+
* independently.
|
|
975
|
+
* @private
|
|
976
|
+
* @function Highcharts.Pointer#pinchTranslateDirection
|
|
977
|
+
* /
|
|
978
|
+
public pinchTranslateDirection(
|
|
979
|
+
horiz: boolean,
|
|
980
|
+
pinchDown: Array<any>,
|
|
981
|
+
touches: Array<PointerEvent>,
|
|
982
|
+
transform: any,
|
|
983
|
+
selectionMarker: any,
|
|
984
|
+
clip: any,
|
|
985
|
+
lastValidTouch: any,
|
|
986
|
+
forcedScale?: number
|
|
987
|
+
): void {
|
|
988
|
+
const chart = this.chart,
|
|
989
|
+
xy: ('x'|'y') = horiz ? 'x' : 'y',
|
|
990
|
+
XY: ('X'|'Y') = horiz ? 'X' : 'Y',
|
|
991
|
+
sChartXY: ('chartX'|'chartY') = ('chart' + XY) as any,
|
|
992
|
+
wh = horiz ? 'width' : 'height',
|
|
993
|
+
plotLeftTop = (chart as any)['plot' + (horiz ? 'Left' : 'Top')],
|
|
994
|
+
inverted = chart.inverted,
|
|
995
|
+
bounds = chart.bounds[horiz ? 'h' : 'v'],
|
|
996
|
+
singleTouch = pinchDown.length === 1,
|
|
997
|
+
touch0Start = pinchDown[0][sChartXY],
|
|
998
|
+
touch1Start = !singleTouch && pinchDown[1][sChartXY],
|
|
999
|
+
setScale = function (): void {
|
|
1000
|
+
// Don't zoom if fingers are too close on this axis
|
|
1001
|
+
if (
|
|
1002
|
+
typeof touch1Now === 'number' &&
|
|
1003
|
+
Math.abs(touch0Start - touch1Start) > 20
|
|
1004
|
+
) {
|
|
1005
|
+
scale = forcedScale ||
|
|
1006
|
+
Math.abs(touch0Now - touch1Now) /
|
|
1007
|
+
Math.abs(touch0Start - touch1Start);
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
clipXY = ((plotLeftTop - touch0Now) / scale) + touch0Start;
|
|
1011
|
+
selectionWH = (chart as any)[
|
|
1012
|
+
'plot' + (horiz ? 'Width' : 'Height')
|
|
1013
|
+
] / scale;
|
|
1014
|
+
};
|
|
1015
|
+
|
|
1016
|
+
let selectionWH: any,
|
|
1017
|
+
selectionXY,
|
|
1018
|
+
clipXY: any,
|
|
1019
|
+
scale = forcedScale || 1,
|
|
1020
|
+
touch0Now = touches[0][sChartXY],
|
|
1021
|
+
touch1Now = !singleTouch && touches[1][sChartXY],
|
|
1022
|
+
outOfBounds;
|
|
1023
|
+
|
|
1024
|
+
// Set the scale, first pass
|
|
1025
|
+
setScale();
|
|
1026
|
+
|
|
1027
|
+
// The clip position (x or y) is altered if out of bounds, the selection
|
|
1028
|
+
// position is not
|
|
1029
|
+
selectionXY = clipXY;
|
|
1030
|
+
|
|
1031
|
+
// Out of bounds
|
|
1032
|
+
if (selectionXY < bounds.min) {
|
|
1033
|
+
selectionXY = bounds.min;
|
|
1034
|
+
outOfBounds = true;
|
|
1035
|
+
} else if (selectionXY + selectionWH > bounds.max) {
|
|
1036
|
+
selectionXY = bounds.max - selectionWH;
|
|
1037
|
+
outOfBounds = true;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
// Is the chart dragged off its bounds, determined by dataMin and
|
|
1041
|
+
// dataMax?
|
|
1042
|
+
if (outOfBounds) {
|
|
1043
|
+
|
|
1044
|
+
// Modify the touchNow position in order to create an elastic drag
|
|
1045
|
+
// movement. This indicates to the user that the chart is responsive
|
|
1046
|
+
// but can't be dragged further.
|
|
1047
|
+
touch0Now -= 0.8 * (touch0Now - lastValidTouch[xy][0]);
|
|
1048
|
+
if (typeof touch1Now === 'number') {
|
|
1049
|
+
touch1Now -= 0.8 * (touch1Now - lastValidTouch[xy][1]);
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
// Set the scale, second pass to adapt to the modified touchNow
|
|
1053
|
+
// positions
|
|
1054
|
+
setScale();
|
|
1055
|
+
|
|
1056
|
+
} else {
|
|
1057
|
+
lastValidTouch[xy] = [touch0Now, touch1Now];
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
// Set geometry for clipping, selection and transformation
|
|
1061
|
+
if (!inverted) {
|
|
1062
|
+
clip[xy] = clipXY - plotLeftTop;
|
|
1063
|
+
clip[wh] = selectionWH;
|
|
1064
|
+
}
|
|
1065
|
+
const scaleKey = inverted ?
|
|
1066
|
+
(horiz ? 'scaleY' : 'scaleX') : 'scale' + XY;
|
|
1067
|
+
const transformScale = inverted ? 1 / scale : scale;
|
|
1068
|
+
|
|
1069
|
+
selectionMarker[wh] = selectionWH;
|
|
1070
|
+
selectionMarker[xy] = selectionXY;
|
|
1071
|
+
// Invert scale if needed (#19217)
|
|
1072
|
+
transform[scaleKey] = scale * (inverted && !horiz ? -1 : 1);
|
|
1073
|
+
transform['translate' + XY] = (transformScale * plotLeftTop) +
|
|
1074
|
+
(touch0Now - (transformScale * touch0Start));
|
|
1075
|
+
}
|
|
1076
|
+
*/
|
|
1077
|
+
/**
|
|
1078
|
+
* Reset the tracking by hiding the tooltip, the hover series state and the
|
|
1079
|
+
* hover point.
|
|
1080
|
+
*
|
|
1081
|
+
* @function Highcharts.Pointer#reset
|
|
1082
|
+
*
|
|
1083
|
+
* @param {boolean} [allowMove]
|
|
1084
|
+
* Instead of destroying the tooltip altogether, allow moving it if
|
|
1085
|
+
* possible.
|
|
1086
|
+
*
|
|
1087
|
+
* @param {number} [delay]
|
|
1088
|
+
* The tooltip hide delay in ms.
|
|
1089
|
+
*/
|
|
1090
|
+
reset(allowMove, delay) {
|
|
1091
|
+
const pointer = this, chart = pointer.chart, hoverSeries = chart.hoverSeries, hoverPoint = chart.hoverPoint, hoverPoints = chart.hoverPoints, tooltip = chart.tooltip, tooltipPoints = tooltip?.shared ?
|
|
1092
|
+
hoverPoints :
|
|
1093
|
+
hoverPoint;
|
|
1094
|
+
// Check if the points have moved outside the plot area (#1003, #4736,
|
|
1095
|
+
// #5101)
|
|
1096
|
+
if (allowMove && tooltipPoints) {
|
|
1097
|
+
splat(tooltipPoints).forEach(function (point) {
|
|
1098
|
+
if (point.series.isCartesian &&
|
|
1099
|
+
typeof point.plotX === 'undefined') {
|
|
1100
|
+
allowMove = false;
|
|
1101
|
+
}
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
// Just move the tooltip, #349
|
|
1105
|
+
if (allowMove) {
|
|
1106
|
+
if (tooltip && tooltipPoints && splat(tooltipPoints).length) {
|
|
1107
|
+
tooltip.refresh(tooltipPoints);
|
|
1108
|
+
if (tooltip.shared && hoverPoints) { // #8284
|
|
1109
|
+
hoverPoints.forEach(function (point) {
|
|
1110
|
+
point.setState(point.state, true);
|
|
1111
|
+
if (point.series.isCartesian) {
|
|
1112
|
+
if (point.series.xAxis.crosshair) {
|
|
1113
|
+
point.series.xAxis
|
|
1114
|
+
.drawCrosshair(null, point);
|
|
1115
|
+
}
|
|
1116
|
+
if (point.series.yAxis.crosshair) {
|
|
1117
|
+
point.series.yAxis
|
|
1118
|
+
.drawCrosshair(null, point);
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
});
|
|
1122
|
+
}
|
|
1123
|
+
else if (hoverPoint) { // #2500
|
|
1124
|
+
hoverPoint.setState(hoverPoint.state, true);
|
|
1125
|
+
chart.axes.forEach(function (axis) {
|
|
1126
|
+
if (axis.crosshair &&
|
|
1127
|
+
hoverPoint.series[axis.coll] === axis) {
|
|
1128
|
+
axis.drawCrosshair(null, hoverPoint);
|
|
1129
|
+
}
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
// Full reset
|
|
1134
|
+
}
|
|
1135
|
+
else {
|
|
1136
|
+
if (hoverPoint) {
|
|
1137
|
+
hoverPoint.onMouseOut();
|
|
1138
|
+
}
|
|
1139
|
+
if (hoverPoints) {
|
|
1140
|
+
hoverPoints.forEach(function (point) {
|
|
1141
|
+
point.setState();
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
if (hoverSeries) {
|
|
1145
|
+
hoverSeries.onMouseOut();
|
|
1146
|
+
}
|
|
1147
|
+
if (tooltip) {
|
|
1148
|
+
tooltip.hide(delay);
|
|
1149
|
+
}
|
|
1150
|
+
if (pointer.unDocMouseMove) {
|
|
1151
|
+
pointer.unDocMouseMove = pointer.unDocMouseMove();
|
|
1152
|
+
}
|
|
1153
|
+
// Remove crosshairs
|
|
1154
|
+
chart.axes.forEach(function (axis) {
|
|
1155
|
+
axis.hideCrosshair();
|
|
1156
|
+
});
|
|
1157
|
+
chart.hoverPoints = chart.hoverPoint = void 0;
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
/**
|
|
1161
|
+
* With line type charts with a single tracker, get the point closest to the
|
|
1162
|
+
* mouse. Run Point.onMouseOver and display tooltip for the point or points.
|
|
1163
|
+
*
|
|
1164
|
+
* @private
|
|
1165
|
+
* @function Highcharts.Pointer#runPointActions
|
|
1166
|
+
*
|
|
1167
|
+
* @emits Highcharts.Point#event:mouseOut
|
|
1168
|
+
* @emits Highcharts.Point#event:mouseOver
|
|
1169
|
+
*/
|
|
1170
|
+
runPointActions(e, p, force) {
|
|
1171
|
+
const pointer = this, chart = pointer.chart, series = chart.series, tooltip = (chart.tooltip?.options.enabled ?
|
|
1172
|
+
chart.tooltip :
|
|
1173
|
+
void 0), shared = (tooltip ?
|
|
1174
|
+
tooltip.shared :
|
|
1175
|
+
false);
|
|
1176
|
+
let hoverPoint = p || chart.hoverPoint, hoverSeries = hoverPoint?.series || chart.hoverSeries;
|
|
1177
|
+
const // `onMouseOver` or already hovering a series with directTouch
|
|
1178
|
+
isDirectTouch = (!e || e.type !== 'touchmove') && (!!p || ((hoverSeries?.directTouch) &&
|
|
1179
|
+
pointer.isDirectTouch)), hoverData = this.getHoverData(hoverPoint, hoverSeries, series, isDirectTouch, shared, e);
|
|
1180
|
+
// Update variables from hoverData.
|
|
1181
|
+
hoverPoint = hoverData.hoverPoint;
|
|
1182
|
+
hoverSeries = hoverData.hoverSeries;
|
|
1183
|
+
const points = hoverData.hoverPoints, followPointer = hoverSeries?.tooltipOptions.followPointer &&
|
|
1184
|
+
!hoverSeries.tooltipOptions.split, useSharedTooltip = (shared &&
|
|
1185
|
+
hoverSeries &&
|
|
1186
|
+
!hoverSeries.noSharedTooltip);
|
|
1187
|
+
// Refresh tooltip for kdpoint if new hover point or tooltip was hidden
|
|
1188
|
+
// #3926, #4200
|
|
1189
|
+
if (hoverPoint &&
|
|
1190
|
+
(force ||
|
|
1191
|
+
hoverPoint !== chart.hoverPoint ||
|
|
1192
|
+
tooltip?.isHidden)) {
|
|
1193
|
+
(chart.hoverPoints || []).forEach(function (p) {
|
|
1194
|
+
if (points.indexOf(p) === -1) {
|
|
1195
|
+
p.setState();
|
|
1196
|
+
}
|
|
1197
|
+
});
|
|
1198
|
+
// Set normal state to previous series
|
|
1199
|
+
if (chart.hoverSeries !== hoverSeries) {
|
|
1200
|
+
hoverSeries.onMouseOver();
|
|
1201
|
+
}
|
|
1202
|
+
pointer.applyInactiveState(points);
|
|
1203
|
+
// Do mouseover on all points (#3919, #3985, #4410, #5622)
|
|
1204
|
+
(points || []).forEach(function (p) {
|
|
1205
|
+
p.setState('hover');
|
|
1206
|
+
});
|
|
1207
|
+
// If tracking is on series in stead of on each point,
|
|
1208
|
+
// fire mouseOver on hover point. // #4448
|
|
1209
|
+
if (chart.hoverPoint) {
|
|
1210
|
+
chart.hoverPoint.firePointEvent('mouseOut');
|
|
1211
|
+
}
|
|
1212
|
+
// Hover point may have been destroyed in the event handlers (#7127)
|
|
1213
|
+
if (!hoverPoint.series) {
|
|
1214
|
+
return;
|
|
1215
|
+
}
|
|
1216
|
+
/**
|
|
1217
|
+
* Contains all hovered points.
|
|
1218
|
+
*
|
|
1219
|
+
* @name Highcharts.Chart#hoverPoints
|
|
1220
|
+
* @type {Array<Highcharts.Point>|null}
|
|
1221
|
+
*/
|
|
1222
|
+
chart.hoverPoints = points;
|
|
1223
|
+
/**
|
|
1224
|
+
* Contains the original hovered point.
|
|
1225
|
+
*
|
|
1226
|
+
* @name Highcharts.Chart#hoverPoint
|
|
1227
|
+
* @type {Highcharts.Point|null}
|
|
1228
|
+
*/
|
|
1229
|
+
chart.hoverPoint = hoverPoint;
|
|
1230
|
+
/**
|
|
1231
|
+
* Hover state should not be lost when axis is updated (#12569)
|
|
1232
|
+
* Axis.update runs pointer.reset which uses chart.hoverPoint.state
|
|
1233
|
+
* to apply state which does not exist in hoverPoint yet.
|
|
1234
|
+
* The mouseOver event should be triggered when hoverPoint
|
|
1235
|
+
* is correct.
|
|
1236
|
+
*/
|
|
1237
|
+
hoverPoint.firePointEvent('mouseOver', void 0, () => {
|
|
1238
|
+
// Draw tooltip if necessary
|
|
1239
|
+
if (tooltip && hoverPoint) {
|
|
1240
|
+
tooltip.refresh(useSharedTooltip ? points : hoverPoint, e);
|
|
1241
|
+
}
|
|
1242
|
+
});
|
|
1243
|
+
// Update positions (regardless of kdpoint or hoverPoint)
|
|
1244
|
+
}
|
|
1245
|
+
else if (followPointer && tooltip && !tooltip.isHidden) {
|
|
1246
|
+
const anchor = tooltip.getAnchor([{}], e);
|
|
1247
|
+
if (chart.isInsidePlot(anchor[0], anchor[1], {
|
|
1248
|
+
visiblePlotOnly: true
|
|
1249
|
+
})) {
|
|
1250
|
+
tooltip.updatePosition({ plotX: anchor[0], plotY: anchor[1] });
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
// Start the event listener to pick up the tooltip and crosshairs
|
|
1254
|
+
if (!pointer.unDocMouseMove) {
|
|
1255
|
+
pointer.unDocMouseMove = addEvent(chart.container.ownerDocument, 'mousemove', (e) => charts[Pointer.hoverChartIndex ?? -1]
|
|
1256
|
+
?.pointer
|
|
1257
|
+
?.onDocumentMouseMove(e));
|
|
1258
|
+
pointer.eventsToUnbind.push(pointer.unDocMouseMove);
|
|
1259
|
+
}
|
|
1260
|
+
// Issues related to crosshair #4927, #5269 #5066, #5658
|
|
1261
|
+
chart.axes.forEach(function drawAxisCrosshair(axis) {
|
|
1262
|
+
const snap = axis.crosshair?.snap ?? true;
|
|
1263
|
+
let point;
|
|
1264
|
+
if (snap) {
|
|
1265
|
+
point = chart.hoverPoint; // #13002
|
|
1266
|
+
if (!point || point.series[axis.coll] !== axis) {
|
|
1267
|
+
point = find(points, (p) => p.series?.[axis.coll] === axis);
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
// Axis has snapping crosshairs, and one of the hover points belongs
|
|
1271
|
+
// to axis. Always call drawCrosshair when it is not snap.
|
|
1272
|
+
if (point || !snap) {
|
|
1273
|
+
axis.drawCrosshair(e, point);
|
|
1274
|
+
// Axis has snapping crosshairs, but no hover point belongs to axis
|
|
1275
|
+
}
|
|
1276
|
+
else {
|
|
1277
|
+
axis.hideCrosshair();
|
|
1278
|
+
}
|
|
1279
|
+
});
|
|
1280
|
+
}
|
|
1281
|
+
/**
|
|
1282
|
+
* Set the JS DOM events on the container and document. This method should
|
|
1283
|
+
* contain a one-to-one assignment between methods and their handlers. Any
|
|
1284
|
+
* advanced logic should be moved to the handler reflecting the event's
|
|
1285
|
+
* name.
|
|
1286
|
+
* @private
|
|
1287
|
+
* @function Highcharts.Pointer#setDOMEvents
|
|
1288
|
+
*/
|
|
1289
|
+
setDOMEvents() {
|
|
1290
|
+
const container = this.chart.container, ownerDoc = container.ownerDocument,
|
|
1291
|
+
// Get the parent element, including handling Shadow DOM (#23450)
|
|
1292
|
+
getParent = (el) => el.parentElement || el.getRootNode()?.host?.parentElement;
|
|
1293
|
+
container.onmousedown = this.onContainerMouseDown.bind(this);
|
|
1294
|
+
container.onmousemove = this.onContainerMouseMove.bind(this);
|
|
1295
|
+
container.onclick = this.onContainerClick.bind(this);
|
|
1296
|
+
this.eventsToUnbind.push(addEvent(container, 'mouseenter', this.onContainerMouseEnter.bind(this)), addEvent(container, 'mouseleave', this.onContainerMouseLeave.bind(this)));
|
|
1297
|
+
if (!Pointer.unbindDocumentMouseUp.some((el) => el.doc === ownerDoc)) {
|
|
1298
|
+
Pointer.unbindDocumentMouseUp.push({
|
|
1299
|
+
doc: ownerDoc,
|
|
1300
|
+
unbind: addEvent(ownerDoc, 'mouseup', this.onDocumentMouseUp.bind(this))
|
|
1301
|
+
});
|
|
1302
|
+
}
|
|
1303
|
+
// In case we are dealing with overflow, reset the chart position when
|
|
1304
|
+
// scrolling parent elements
|
|
1305
|
+
let parent = getParent(this.chart.renderTo);
|
|
1306
|
+
while (parent && parent.tagName !== 'BODY') {
|
|
1307
|
+
this.eventsToUnbind.push(addEvent(parent, 'scroll', () => {
|
|
1308
|
+
delete this.chartPosition;
|
|
1309
|
+
}));
|
|
1310
|
+
parent = getParent(parent);
|
|
1311
|
+
}
|
|
1312
|
+
this.eventsToUnbind.push(addEvent(container, 'touchstart', this.onContainerTouchStart.bind(this), { passive: false }), addEvent(container, 'touchmove', this.onContainerTouchMove.bind(this), { passive: false }));
|
|
1313
|
+
if (!Pointer.unbindDocumentTouchEnd) {
|
|
1314
|
+
Pointer.unbindDocumentTouchEnd = addEvent(ownerDoc, 'touchend', this.onDocumentTouchEnd.bind(this), { passive: false });
|
|
1315
|
+
}
|
|
1316
|
+
this.setPointerCapture();
|
|
1317
|
+
addEvent(this.chart, 'redraw', this.setPointerCapture.bind(this));
|
|
1318
|
+
}
|
|
1319
|
+
/**
|
|
1320
|
+
* Sets, or removes on update, pointer events using pointer capture for
|
|
1321
|
+
* tooltip.followTouchMove if any series has findNearestPointBy that
|
|
1322
|
+
* includes the y dimension.
|
|
1323
|
+
* @private
|
|
1324
|
+
* @function Highcharts.Pointer#setPointerCapture
|
|
1325
|
+
*/
|
|
1326
|
+
setPointerCapture() {
|
|
1327
|
+
// Only for touch
|
|
1328
|
+
if (!isTouchDevice) {
|
|
1329
|
+
return;
|
|
1330
|
+
}
|
|
1331
|
+
const pointer = this, events = pointer.pointerCaptureEventsToUnbind, chart = pointer.chart, container = chart.container, followTouchMove = pick(chart.options.tooltip?.followTouchMove, true), shouldHave = followTouchMove && chart.series.some((series) => series.options.findNearestPointBy
|
|
1332
|
+
.indexOf('y') > -1);
|
|
1333
|
+
if (!pointer.hasPointerCapture && shouldHave) {
|
|
1334
|
+
// Add
|
|
1335
|
+
// Bind
|
|
1336
|
+
events.push(addEvent(container, 'pointerdown', (e) => {
|
|
1337
|
+
if (e.target?.hasPointerCapture(e.pointerId)) {
|
|
1338
|
+
e.target?.releasePointerCapture(e.pointerId);
|
|
1339
|
+
}
|
|
1340
|
+
}), addEvent(container, 'pointermove', (e) => {
|
|
1341
|
+
chart.pointer?.getPointFromEvent(e)?.onMouseOver(e);
|
|
1342
|
+
}));
|
|
1343
|
+
if (!chart.styledMode) {
|
|
1344
|
+
css(container, { 'touch-action': 'none' });
|
|
1345
|
+
}
|
|
1346
|
+
// Mostly for styled mode
|
|
1347
|
+
container.className += ' highcharts-no-touch-action';
|
|
1348
|
+
pointer.hasPointerCapture = true;
|
|
1349
|
+
}
|
|
1350
|
+
else if (pointer.hasPointerCapture && !shouldHave) {
|
|
1351
|
+
// Remove
|
|
1352
|
+
// Unbind
|
|
1353
|
+
events.forEach((e) => e());
|
|
1354
|
+
events.length = 0;
|
|
1355
|
+
if (!chart.styledMode) {
|
|
1356
|
+
css(container, {
|
|
1357
|
+
'touch-action': pick(chart.options.chart.style?.['touch-action'], 'manipulation')
|
|
1358
|
+
});
|
|
1359
|
+
}
|
|
1360
|
+
// Mostly for styled mode
|
|
1361
|
+
container.className = container.className.replace(' highcharts-no-touch-action', '');
|
|
1362
|
+
pointer.hasPointerCapture = false;
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
/**
|
|
1366
|
+
* Sets the index of the hovered chart and leaves the previous hovered
|
|
1367
|
+
* chart, to reset states like tooltip.
|
|
1368
|
+
* @private
|
|
1369
|
+
* @function Highcharts.Pointer#setHoverChartIndex
|
|
1370
|
+
*/
|
|
1371
|
+
setHoverChartIndex(e) {
|
|
1372
|
+
const chart = this.chart;
|
|
1373
|
+
const hoverChart = H.charts[pick(Pointer.hoverChartIndex, -1)];
|
|
1374
|
+
if (hoverChart &&
|
|
1375
|
+
hoverChart !== chart) {
|
|
1376
|
+
const relatedTargetObj = { relatedTarget: chart.container };
|
|
1377
|
+
if (e && !e?.relatedTarget) {
|
|
1378
|
+
// #17192, Non-enumerable properties of "e" are dropped with
|
|
1379
|
+
// spreading (...e). Using Object.assign ensures integrity.
|
|
1380
|
+
Object.assign({}, e, relatedTargetObj);
|
|
1381
|
+
}
|
|
1382
|
+
hoverChart.pointer?.onContainerMouseLeave(e || relatedTargetObj);
|
|
1383
|
+
}
|
|
1384
|
+
if (!hoverChart?.mouseIsDown) {
|
|
1385
|
+
Pointer.hoverChartIndex = chart.index;
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
/**
|
|
1389
|
+
* General touch handler shared by touchstart and touchmove.
|
|
1390
|
+
* @private
|
|
1391
|
+
* @function Highcharts.Pointer#touch
|
|
1392
|
+
*/
|
|
1393
|
+
touch(e, start) {
|
|
1394
|
+
const { chart, pinchDown = [] } = this;
|
|
1395
|
+
let hasMoved, isInside;
|
|
1396
|
+
this.setHoverChartIndex();
|
|
1397
|
+
e = this.normalize(e);
|
|
1398
|
+
if (e.touches.length === 1) {
|
|
1399
|
+
isInside = chart.isInsidePlot(e.chartX - chart.plotLeft, e.chartY - chart.plotTop, {
|
|
1400
|
+
visiblePlotOnly: true
|
|
1401
|
+
});
|
|
1402
|
+
if (isInside && !chart.exporting?.openMenu) {
|
|
1403
|
+
// Run mouse events and display tooltip etc
|
|
1404
|
+
if (start) {
|
|
1405
|
+
this.runPointActions(e);
|
|
1406
|
+
}
|
|
1407
|
+
// Android fires touchmove events after the touchstart even if
|
|
1408
|
+
// the finger hasn't moved, or moved only a pixel or two. In iOS
|
|
1409
|
+
// however, the touchmove doesn't fire unless the finger moves
|
|
1410
|
+
// more than ~4px. So we emulate this behaviour in Android by
|
|
1411
|
+
// checking how much it moved, and cancelling on small
|
|
1412
|
+
// distances. #3450. Tested and still relevant as of 2024.
|
|
1413
|
+
if (e.type === 'touchmove') {
|
|
1414
|
+
this.hasPinchMoved = hasMoved = pinchDown[0] ? // #5266
|
|
1415
|
+
(Math.pow(pinchDown[0].chartX - e.chartX, 2) +
|
|
1416
|
+
Math.pow(pinchDown[0].chartY - e.chartY, 2)) >= 16 :
|
|
1417
|
+
false;
|
|
1418
|
+
}
|
|
1419
|
+
if (pick(hasMoved, true)) {
|
|
1420
|
+
this.pinch(e);
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
else if (start) {
|
|
1424
|
+
// Hide the tooltip on touching outside the plot area (#1203)
|
|
1425
|
+
this.reset();
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
else if (e.touches.length === 2) {
|
|
1429
|
+
this.pinch(e);
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
/**
|
|
1433
|
+
* Returns true if the chart is set up for zooming by single touch and the
|
|
1434
|
+
* event is capable
|
|
1435
|
+
* @private
|
|
1436
|
+
* @function Highcharts.Pointer#touchSelect
|
|
1437
|
+
*/
|
|
1438
|
+
touchSelect(e) {
|
|
1439
|
+
return Boolean(this.chart.zooming.singleTouch &&
|
|
1440
|
+
e.touches &&
|
|
1441
|
+
e.touches.length === 1);
|
|
1442
|
+
}
|
|
1443
|
+
/**
|
|
1444
|
+
* Resolve the zoomType option, this is reset on all touch start and mouse
|
|
1445
|
+
* down events.
|
|
1446
|
+
* @private
|
|
1447
|
+
* @function Highcharts.Pointer#zoomOption
|
|
1448
|
+
*/
|
|
1449
|
+
zoomOption(e) {
|
|
1450
|
+
const chart = this.chart, inverted = chart.inverted;
|
|
1451
|
+
let zoomType = chart.zooming.type || '', zoomX, zoomY;
|
|
1452
|
+
// Look for the pinchType option
|
|
1453
|
+
if (/touch/.test(e.type)) {
|
|
1454
|
+
zoomType = pick(chart.zooming.pinchType, zoomType);
|
|
1455
|
+
}
|
|
1456
|
+
this.zoomX = zoomX = /x/.test(zoomType);
|
|
1457
|
+
this.zoomY = zoomY = /y/.test(zoomType);
|
|
1458
|
+
this.zoomHor = (zoomX && !inverted) || (zoomY && inverted);
|
|
1459
|
+
this.zoomVert = (zoomY && !inverted) || (zoomX && inverted);
|
|
1460
|
+
this.hasZoom = zoomX || zoomY;
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
Pointer.unbindDocumentMouseUp = [];
|
|
1464
|
+
/* *
|
|
1465
|
+
*
|
|
1466
|
+
* Class Namespace
|
|
1467
|
+
*
|
|
1468
|
+
* */
|
|
1469
|
+
(function (Pointer) {
|
|
1470
|
+
/* *
|
|
1471
|
+
*
|
|
1472
|
+
* Declarations
|
|
1473
|
+
*
|
|
1474
|
+
* */
|
|
1475
|
+
/* *
|
|
1476
|
+
*
|
|
1477
|
+
* Functions
|
|
1478
|
+
*
|
|
1479
|
+
* */
|
|
1480
|
+
/**
|
|
1481
|
+
* @private
|
|
1482
|
+
*/
|
|
1483
|
+
function compose(ChartClass) {
|
|
1484
|
+
if (pushUnique(composed, 'Core.Pointer')) {
|
|
1485
|
+
addEvent(ChartClass, 'beforeRender', function () {
|
|
1486
|
+
/**
|
|
1487
|
+
* The Pointer that keeps track of mouse and touch
|
|
1488
|
+
* interaction.
|
|
1489
|
+
*
|
|
1490
|
+
* @memberof Highcharts.Chart
|
|
1491
|
+
* @name pointer
|
|
1492
|
+
* @type {Highcharts.Pointer}
|
|
1493
|
+
* @instance
|
|
1494
|
+
*/
|
|
1495
|
+
this.pointer = new Pointer(this, this.options);
|
|
1496
|
+
});
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
Pointer.compose = compose;
|
|
1500
|
+
})(Pointer || (Pointer = {}));
|
|
1501
|
+
/* *
|
|
1502
|
+
*
|
|
1503
|
+
* Default Export
|
|
1504
|
+
*
|
|
1505
|
+
* */
|
|
1506
|
+
export default Pointer;
|
|
1507
|
+
/* *
|
|
1508
|
+
*
|
|
1509
|
+
* API Declarations
|
|
1510
|
+
*
|
|
1511
|
+
* */
|
|
1512
|
+
/**
|
|
1513
|
+
* Chart position and scale.
|
|
1514
|
+
*
|
|
1515
|
+
* @interface Highcharts.ChartPositionObject
|
|
1516
|
+
*/ /**
|
|
1517
|
+
* @name Highcharts.ChartPositionObject#left
|
|
1518
|
+
* @type {number}
|
|
1519
|
+
*/ /**
|
|
1520
|
+
* @name Highcharts.ChartPositionObject#scaleX
|
|
1521
|
+
* @type {number}
|
|
1522
|
+
*/ /**
|
|
1523
|
+
* @name Highcharts.ChartPositionObject#scaleY
|
|
1524
|
+
* @type {number}
|
|
1525
|
+
*/ /**
|
|
1526
|
+
* @name Highcharts.ChartPositionObject#top
|
|
1527
|
+
* @type {number}
|
|
1528
|
+
*/
|
|
1529
|
+
/**
|
|
1530
|
+
* One position in relation to an axis.
|
|
1531
|
+
*
|
|
1532
|
+
* @interface Highcharts.PointerAxisCoordinateObject
|
|
1533
|
+
*/ /**
|
|
1534
|
+
* Related axis.
|
|
1535
|
+
*
|
|
1536
|
+
* @name Highcharts.PointerAxisCoordinateObject#axis
|
|
1537
|
+
* @type {Highcharts.Axis}
|
|
1538
|
+
*/ /**
|
|
1539
|
+
* Axis value.
|
|
1540
|
+
*
|
|
1541
|
+
* @name Highcharts.PointerAxisCoordinateObject#value
|
|
1542
|
+
* @type {number}
|
|
1543
|
+
*/
|
|
1544
|
+
/**
|
|
1545
|
+
* Positions in terms of axis values.
|
|
1546
|
+
*
|
|
1547
|
+
* @interface Highcharts.PointerAxisCoordinatesObject
|
|
1548
|
+
*/ /**
|
|
1549
|
+
* Positions on the x-axis.
|
|
1550
|
+
* @name Highcharts.PointerAxisCoordinatesObject#xAxis
|
|
1551
|
+
* @type {Array<Highcharts.PointerAxisCoordinateObject>}
|
|
1552
|
+
*/ /**
|
|
1553
|
+
* Positions on the y-axis.
|
|
1554
|
+
* @name Highcharts.PointerAxisCoordinatesObject#yAxis
|
|
1555
|
+
* @type {Array<Highcharts.PointerAxisCoordinateObject>}
|
|
1556
|
+
*/
|
|
1557
|
+
/**
|
|
1558
|
+
* Pointer coordinates.
|
|
1559
|
+
*
|
|
1560
|
+
* @interface Highcharts.PointerCoordinatesObject
|
|
1561
|
+
*/ /**
|
|
1562
|
+
* @name Highcharts.PointerCoordinatesObject#chartX
|
|
1563
|
+
* @type {number}
|
|
1564
|
+
*/ /**
|
|
1565
|
+
* @name Highcharts.PointerCoordinatesObject#chartY
|
|
1566
|
+
* @type {number}
|
|
1567
|
+
*/
|
|
1568
|
+
/**
|
|
1569
|
+
* A native browser mouse or touch event, extended with position information
|
|
1570
|
+
* relative to the {@link Chart.container}.
|
|
1571
|
+
*
|
|
1572
|
+
* @interface Highcharts.PointerEventObject
|
|
1573
|
+
* @extends global.PointerEvent
|
|
1574
|
+
*/ /**
|
|
1575
|
+
* The X coordinate of the pointer interaction relative to the chart.
|
|
1576
|
+
*
|
|
1577
|
+
* @name Highcharts.PointerEventObject#chartX
|
|
1578
|
+
* @type {number}
|
|
1579
|
+
*/ /**
|
|
1580
|
+
* The Y coordinate of the pointer interaction relative to the chart.
|
|
1581
|
+
*
|
|
1582
|
+
* @name Highcharts.PointerEventObject#chartY
|
|
1583
|
+
* @type {number}
|
|
1584
|
+
*/
|
|
1585
|
+
/**
|
|
1586
|
+
* Axis-specific data of a selection.
|
|
1587
|
+
*
|
|
1588
|
+
* @interface Highcharts.SelectDataObject
|
|
1589
|
+
*/ /**
|
|
1590
|
+
* The selected Axis.
|
|
1591
|
+
* @name Highcharts.SelectDataObject#axis
|
|
1592
|
+
* @type {Highcharts.Axis}
|
|
1593
|
+
*/ /**
|
|
1594
|
+
* The maximum axis value, either automatic or set manually.
|
|
1595
|
+
* @name Highcharts.SelectDataObject#max
|
|
1596
|
+
* @type {number}
|
|
1597
|
+
*/ /**
|
|
1598
|
+
* The minimum axis value, either automatic or set manually.
|
|
1599
|
+
* @name Highcharts.SelectDataObject#min
|
|
1600
|
+
* @type {number}
|
|
1601
|
+
*/
|
|
1602
|
+
/**
|
|
1603
|
+
* Object for select events.
|
|
1604
|
+
* The primary axes are `xAxis[0]` and `yAxis[0]`. Remember the unit of a
|
|
1605
|
+
* datetime axis is milliseconds since 1970-01-01 00:00:00.
|
|
1606
|
+
*
|
|
1607
|
+
* @interface Highcharts.SelectEventObject
|
|
1608
|
+
*/ /**
|
|
1609
|
+
* The related browser event.
|
|
1610
|
+
* @name Highcharts.SelectEventObject#originalEvent
|
|
1611
|
+
* @type {global.Event}
|
|
1612
|
+
*/ /**
|
|
1613
|
+
* Prevents the default action for the event, if called.
|
|
1614
|
+
* @name Highcharts.SelectEventObject#preventDefault
|
|
1615
|
+
* @type {Function}
|
|
1616
|
+
*/ /**
|
|
1617
|
+
* Indicates a reset event to restore default state.
|
|
1618
|
+
* @name Highcharts.SelectEventObject#resetSelection
|
|
1619
|
+
* @type {boolean|undefined}
|
|
1620
|
+
*/ /**
|
|
1621
|
+
* Arrays containing the axes of each dimension and each axis' min and max
|
|
1622
|
+
* values.
|
|
1623
|
+
* @name Highcharts.SelectEventObject#xAxis
|
|
1624
|
+
* @type {Array<Highcharts.SelectDataObject>}
|
|
1625
|
+
*/ /**
|
|
1626
|
+
* Arrays containing the axes of each dimension and each axis' min and max
|
|
1627
|
+
* values.
|
|
1628
|
+
* @name Highcharts.SelectEventObject#yAxis
|
|
1629
|
+
* @type {Array<Highcharts.SelectDataObject>}
|
|
1630
|
+
*/
|
|
1631
|
+
''; // Keeps doclets above in JS file
|