@highcharts/grid-pro 2.2.0 → 2.3.1
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/LICENSE.txt +6 -0
- package/README.md +15 -9
- package/css/grid-pro.css +1262 -1122
- package/css/modules/grid-base-variables.css +131 -0
- package/css/modules/grid-button-variables.css +140 -0
- package/css/modules/grid-caption-variables.css +11 -0
- package/css/modules/grid-description-variables.css +11 -0
- package/css/modules/grid-input-variables.css +114 -0
- package/css/modules/grid-link-variables.css +18 -0
- package/css/modules/grid-menu-variables.css +50 -0
- package/css/modules/grid-pagination-variables.css +12 -0
- package/css/modules/grid-popup-variables.css +24 -0
- package/css/modules/grid-pro.css +234 -0
- package/css/modules/grid-table-variables.css +385 -0
- package/css/modules/grid-theme-default.css +55 -0
- package/es-modules/Accessibility/A11yI18n.js +1 -2
- package/es-modules/Accessibility/Accessibility.js +1 -2
- package/es-modules/Accessibility/AccessibilityComponent.d.ts +2 -2
- package/es-modules/Accessibility/Components/ContainerComponent.js +0 -1
- package/es-modules/Accessibility/Components/InfoRegionsComponent.js +6 -8
- package/es-modules/Accessibility/Components/LegendComponent.js +1 -2
- package/es-modules/Accessibility/Components/MenuComponent.js +1 -3
- package/es-modules/Accessibility/Components/NavigatorComponent.js +3 -4
- package/es-modules/Accessibility/Components/RangeSelectorComponent.js +1 -3
- package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +22 -11
- package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +3 -7
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +0 -1
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +3 -5
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +1 -4
- package/es-modules/Accessibility/Components/ZoomComponent.js +1 -2
- package/es-modules/Accessibility/FocusBorder.js +6 -7
- package/es-modules/Accessibility/KeyboardNavigation.js +1 -2
- package/es-modules/Accessibility/KeyboardNavigationHandler.js +1 -2
- package/es-modules/Accessibility/Options/A11yDefaults.d.ts +11 -0
- package/es-modules/Accessibility/Options/A11yDefaults.js +11 -0
- package/es-modules/Accessibility/Options/DeprecatedOptions.d.ts +58 -0
- package/es-modules/Accessibility/Options/DeprecatedOptions.js +8 -4
- package/es-modules/Accessibility/Options/LangDefaults.js +9 -0
- package/es-modules/Accessibility/ProxyElement.d.ts +2 -2
- package/es-modules/Accessibility/ProxyElement.js +4 -7
- package/es-modules/Accessibility/ProxyProvider.js +1 -2
- package/es-modules/Accessibility/Utils/Announcer.js +2 -3
- package/es-modules/Accessibility/Utils/ChartUtilities.js +1 -3
- package/es-modules/Accessibility/Utils/EventProvider.d.ts +2 -2
- package/es-modules/Accessibility/Utils/EventProvider.js +6 -2
- package/es-modules/Accessibility/Utils/HTMLUtilities.js +1 -3
- package/es-modules/Core/Animation/AnimationUtilities.js +1 -2
- package/es-modules/Core/Animation/Fx.js +1 -2
- package/es-modules/Core/Callback.d.ts +9 -2
- package/es-modules/Core/Chart/Chart.js +56 -42
- package/es-modules/Core/Chart/Chart3D.js +1 -2
- package/es-modules/Core/Chart/ChartDefaults.js +11 -0
- package/es-modules/Core/Chart/ChartNavigationComposition.js +0 -1
- package/es-modules/Core/Chart/ChartOptions.d.ts +8 -0
- package/es-modules/Core/Chart/GanttChart.js +1 -2
- package/es-modules/Core/Chart/MapChart.js +3 -2
- package/es-modules/Core/Chart/StockChart.js +2 -3
- package/es-modules/Core/Color/Color.js +1 -3
- package/es-modules/Core/Defaults.js +36 -10
- package/es-modules/Core/Delaunay.d.ts +1 -0
- package/es-modules/Core/Delaunay.js +312 -0
- package/es-modules/Core/Foundation.js +1 -3
- package/es-modules/Core/Geometry/CircleUtilities.js +1 -2
- package/es-modules/Core/Globals.js +1 -1
- package/es-modules/Core/HttpUtilities.js +1 -2
- package/es-modules/Core/MSPointer.js +1 -3
- package/es-modules/Core/Math3D.js +1 -2
- package/es-modules/Core/Options.d.ts +6 -2
- package/es-modules/Core/Pointer.js +23 -4
- package/es-modules/Core/PointerEvent.d.ts +2 -0
- package/es-modules/Core/Renderer/HTML/AST.js +2 -2
- package/es-modules/Core/Renderer/HTML/HTMLAttributes.d.ts +3 -0
- package/es-modules/Core/Renderer/HTML/HTMLElement.js +1 -2
- package/es-modules/Core/Renderer/RendererUtilities.js +34 -20
- package/es-modules/Core/Renderer/SVG/SVGRenderer.d.ts +1 -1
- package/es-modules/Core/Renderer/SVG/Symbols.d.ts +2 -2
- package/es-modules/Core/Responsive.d.ts +4 -2
- package/es-modules/Core/Responsive.js +10 -4
- package/es-modules/Core/Templating.d.ts +1 -1
- package/es-modules/Core/Templating.js +3 -4
- package/es-modules/Core/Time.d.ts +8 -0
- package/es-modules/Core/Time.js +2 -2
- package/es-modules/Core/Tooltip.d.ts +4 -8
- package/es-modules/Core/Tooltip.js +100 -81
- package/es-modules/Core/TooltipOptions.d.ts +44 -1
- package/es-modules/Core/Utilities.d.ts +25 -665
- package/es-modules/Core/Utilities.js +21 -1400
- package/es-modules/Data/ColumnUtils.d.ts +83 -80
- package/es-modules/Data/ColumnUtils.js +103 -113
- package/es-modules/Data/Connectors/CSVConnector.d.ts +9 -14
- package/es-modules/Data/Connectors/CSVConnector.js +3 -4
- package/es-modules/Data/Connectors/DataConnector.d.ts +56 -58
- package/es-modules/Data/Connectors/DataConnector.js +37 -56
- package/es-modules/Data/Connectors/GoogleSheetsConnector.d.ts +40 -42
- package/es-modules/Data/Connectors/GoogleSheetsConnector.js +73 -88
- package/es-modules/Data/Connectors/GoogleSheetsConnectorOptions.d.ts +4 -2
- package/es-modules/Data/Connectors/HTMLTableConnector.d.ts +23 -28
- package/es-modules/Data/Connectors/HTMLTableConnector.js +3 -4
- package/es-modules/Data/Connectors/JSONConnector.d.ts +9 -14
- package/es-modules/Data/Connectors/JSONConnector.js +3 -4
- package/es-modules/Data/Converters/CSVConverter.d.ts +5 -5
- package/es-modules/Data/Converters/CSVConverter.js +3 -4
- package/es-modules/Data/Converters/CSVConverterOptions.d.ts +2 -2
- package/es-modules/Data/Converters/DataConverter.d.ts +76 -78
- package/es-modules/Data/Converters/DataConverter.js +26 -53
- package/es-modules/Data/Converters/DataConverterUtils.d.ts +88 -81
- package/es-modules/Data/Converters/DataConverterUtils.js +169 -181
- package/es-modules/Data/Converters/GoogleSheetsConverter.d.ts +4 -4
- package/es-modules/Data/Converters/GoogleSheetsConverter.js +3 -3
- package/es-modules/Data/Converters/GoogleSheetsConverterOptions.d.ts +2 -2
- package/es-modules/Data/Converters/HTMLTableConverter.d.ts +4 -4
- package/es-modules/Data/Converters/HTMLTableConverter.js +2 -3
- package/es-modules/Data/Converters/HTMLTableConverterOptions.d.ts +2 -2
- package/es-modules/Data/Converters/JSONConverter.d.ts +7 -7
- package/es-modules/Data/Converters/JSONConverter.js +6 -6
- package/es-modules/Data/Converters/JSONConverterOptions.d.ts +2 -2
- package/es-modules/Data/DataCursor.d.ts +65 -70
- package/es-modules/Data/DataCursor.js +119 -139
- package/es-modules/Data/DataEvent.d.ts +55 -57
- package/es-modules/Data/DataPool.d.ts +10 -17
- package/es-modules/Data/DataPool.js +21 -10
- package/es-modules/Data/DataTable.d.ts +111 -113
- package/es-modules/Data/DataTable.js +3 -3
- package/es-modules/Data/DataTableCore.d.ts +9 -9
- package/es-modules/Data/DataTableCore.js +2 -2
- package/es-modules/Data/Formula/FormulaParser.js +1 -2
- package/es-modules/Data/Formula/FormulaProcessor.js +1 -2
- package/es-modules/Data/Modifiers/ChainModifier.d.ts +29 -34
- package/es-modules/Data/Modifiers/ChainModifier.js +7 -8
- package/es-modules/Data/Modifiers/DataModifier.d.ts +36 -41
- package/es-modules/Data/Modifiers/DataModifier.js +31 -53
- package/es-modules/Data/Modifiers/FilterModifier.d.ts +4 -4
- package/es-modules/Data/Modifiers/FilterModifier.js +3 -4
- package/es-modules/Data/Modifiers/FilterModifierOptions.d.ts +3 -2
- package/es-modules/Data/Modifiers/InvertModifier.d.ts +4 -4
- package/es-modules/Data/Modifiers/InvertModifier.js +3 -4
- package/es-modules/Data/Modifiers/MathModifier.d.ts +5 -4
- package/es-modules/Data/Modifiers/RangeModifier.d.ts +4 -4
- package/es-modules/Data/Modifiers/RangeModifier.js +3 -4
- package/es-modules/Data/Modifiers/SortModifier.d.ts +6 -11
- package/es-modules/Data/Modifiers/SortModifier.js +3 -4
- package/es-modules/Data/Modifiers/SortModifierOptions.d.ts +3 -3
- package/es-modules/Grid/Core/Accessibility/Accessibility.d.ts +1 -1
- package/es-modules/Grid/Core/Accessibility/Accessibility.js +5 -6
- package/es-modules/Grid/Core/Data/DataProvider.d.ts +97 -0
- package/es-modules/Grid/Core/Data/DataProvider.js +89 -0
- package/es-modules/Grid/Core/Data/DataProviderRegistry.d.ts +20 -0
- package/es-modules/Grid/Core/Data/DataProviderRegistry.js +52 -0
- package/es-modules/Grid/Core/Data/DataProviderType.d.ts +19 -0
- package/es-modules/Grid/Core/Data/DataProviderType.js +15 -0
- package/es-modules/Grid/Core/Data/LocalDataProvider.d.ts +165 -0
- package/es-modules/Grid/Core/Data/LocalDataProvider.js +341 -0
- package/es-modules/Grid/Core/Defaults.js +4 -2
- package/es-modules/Grid/Core/Globals.d.ts +20 -16
- package/es-modules/Grid/Core/Globals.js +10 -8
- package/es-modules/Grid/Core/Grid.d.ts +31 -22
- package/es-modules/Grid/Core/Grid.js +217 -139
- package/es-modules/Grid/Core/GridUtils.d.ts +33 -0
- package/es-modules/Grid/Core/GridUtils.js +50 -3
- package/es-modules/Grid/Core/Options.d.ts +145 -4
- package/es-modules/Grid/Core/Pagination/Pagination.d.ts +3 -0
- package/es-modules/Grid/Core/Pagination/Pagination.js +68 -28
- package/es-modules/Grid/Core/Pagination/PaginationOptions.d.ts +4 -0
- package/es-modules/Grid/Core/Querying/FilteringController.js +1 -2
- package/es-modules/Grid/Core/Querying/PaginationController.d.ts +3 -3
- package/es-modules/Grid/Core/Querying/PaginationController.js +7 -6
- package/es-modules/Grid/Core/Querying/QueryingController.d.ts +1 -1
- package/es-modules/Grid/Core/Querying/QueryingController.js +2 -26
- package/es-modules/Grid/Core/Responsive/ResponsiveComposition.d.ts +53 -0
- package/es-modules/Grid/Core/Responsive/ResponsiveComposition.js +272 -0
- package/es-modules/Grid/Core/Responsive/ResponsiveOptions.d.ts +58 -0
- package/es-modules/Grid/Core/Responsive/ResponsiveOptions.js +15 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/ColumnFiltering.js +2 -3
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.d.ts +1 -1
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.js +3 -4
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.d.ts +1 -1
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.js +2 -2
- package/es-modules/Grid/Core/Table/Actions/ColumnSorting.d.ts +17 -1
- package/es-modules/Grid/Core/Table/Actions/ColumnSorting.js +58 -15
- package/es-modules/Grid/Core/Table/Actions/ColumnsResizer.js +1 -3
- package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.d.ts +57 -3
- package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.js +411 -118
- package/es-modules/Grid/Core/Table/Body/CellContextMenu.d.ts +11 -0
- package/es-modules/Grid/Core/Table/Body/CellContextMenu.js +84 -0
- package/es-modules/Grid/Core/Table/Body/TableCell.d.ts +27 -13
- package/es-modules/Grid/Core/Table/Body/TableCell.js +74 -25
- package/es-modules/Grid/Core/Table/Body/TableRow.d.ts +7 -15
- package/es-modules/Grid/Core/Table/Body/TableRow.js +24 -19
- package/es-modules/Grid/Core/Table/Cell.d.ts +16 -3
- package/es-modules/Grid/Core/Table/Cell.js +36 -3
- package/es-modules/Grid/Core/Table/CellContent/TextContent.js +3 -8
- package/es-modules/Grid/Core/Table/Column.d.ts +10 -4
- package/es-modules/Grid/Core/Table/Column.js +23 -34
- package/es-modules/Grid/Core/Table/ColumnResizing/IndependentResizingMode.js +9 -8
- package/es-modules/Grid/Core/Table/ColumnResizing/ResizingMode.js +4 -3
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.d.ts +5 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.js +7 -2
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/FilterPopup.js +1 -2
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/FilterMenuButton.js +1 -2
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/SortMenuButton.js +2 -3
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/FilterToolbarButton.js +1 -2
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/MenuToolbarButton.js +1 -2
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.d.ts +0 -1
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.js +4 -14
- package/es-modules/Grid/Core/Table/Header/HeaderCell.d.ts +6 -1
- package/es-modules/Grid/Core/Table/Header/HeaderCell.js +33 -13
- package/es-modules/Grid/Core/Table/Header/HeaderRow.js +4 -5
- package/es-modules/Grid/Core/Table/Header/TableHeader.d.ts +1 -1
- package/es-modules/Grid/Core/Table/Header/TableHeader.js +3 -3
- package/es-modules/Grid/Core/Table/Row.d.ts +1 -1
- package/es-modules/Grid/Core/Table/Row.js +2 -2
- package/es-modules/Grid/Core/Table/Table.d.ts +38 -12
- package/es-modules/Grid/Core/Table/Table.js +184 -91
- package/es-modules/Grid/Core/UI/ContextMenuButton.d.ts +6 -7
- package/es-modules/Grid/Core/UI/ContextMenuButton.js +5 -3
- package/es-modules/Grid/Core/UI/Popup.js +7 -9
- package/es-modules/Grid/Core/UI/SvgIcons.d.ts +42 -7
- package/es-modules/Grid/Core/UI/SvgIcons.js +206 -33
- package/es-modules/Grid/Core/UI/Toolbar.d.ts +5 -0
- package/es-modules/Grid/Core/UI/ToolbarButton.d.ts +4 -12
- package/es-modules/Grid/Core/UI/ToolbarButton.js +8 -26
- package/es-modules/Grid/Pro/CellEditing/CellEditMode.d.ts +2 -2
- package/es-modules/Grid/Pro/CellEditing/CellEditing.js +10 -10
- package/es-modules/Grid/Pro/CellEditing/CellEditingComposition.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.d.ts +1 -1
- package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.js +4 -2
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/CheckboxContent.d.ts +2 -2
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/NumberInputContent.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/SelectContent.d.ts +2 -2
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.d.ts +2 -2
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/CheckboxRenderer.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRenderer.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateTimeInputRenderer.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/NumberInputRenderer.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/SelectRenderer.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.d.ts +2 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/TextInputRenderer.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/TextRenderer.js +1 -2
- package/es-modules/Grid/Pro/CellRendering/Renderers/TimeInputRenderer.js +1 -2
- package/es-modules/Grid/Pro/ColumnTypes/Validator.js +34 -32
- package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.d.ts +1 -1
- package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.js +3 -4
- package/es-modules/Grid/Pro/Credits/CreditsProComposition.d.ts +1 -1
- package/es-modules/Grid/Pro/Credits/CreditsProComposition.js +1 -3
- package/es-modules/Grid/Pro/Data/DataSourceHelper.d.ts +74 -0
- package/es-modules/Grid/Pro/Data/DataSourceHelper.js +256 -0
- package/es-modules/Grid/Pro/Data/QuerySerializer.d.ts +46 -0
- package/es-modules/Grid/Pro/Data/QuerySerializer.js +169 -0
- package/es-modules/Grid/Pro/Data/RemoteDataProvider.d.ts +187 -0
- package/es-modules/Grid/Pro/Data/RemoteDataProvider.js +500 -0
- package/es-modules/Grid/Pro/Export/Exporting.js +1 -2
- package/es-modules/Grid/Pro/Export/ExportingComposition.js +1 -2
- package/es-modules/Grid/Pro/GridEvents.js +1 -2
- package/es-modules/Grid/Pro/Pagination/PaginationComposition.d.ts +0 -1
- package/es-modules/Grid/Pro/Pagination/PaginationComposition.js +1 -2
- package/es-modules/Shared/BaseForm.js +1 -2
- package/es-modules/Shared/DownloadURL.js +1 -2
- package/es-modules/Shared/TimeBase.js +3 -3
- package/es-modules/Shared/Types.d.ts +7 -0
- package/es-modules/Shared/Utilities.d.ts +576 -0
- package/es-modules/Shared/Utilities.js +1360 -0
- package/es-modules/masters/grid-pro.src.d.ts +15 -11
- package/es-modules/masters/grid-pro.src.js +12 -5
- package/grid-pro.d.ts +15 -11
- package/grid-pro.js +3 -3
- package/grid-pro.js.map +1 -1
- package/grid-pro.src.d.ts +15 -11
- package/grid-pro.src.js +13854 -11395
- package/package.json +1 -1
- package/es-modules/Grid/Core/Pagination/Icons.d.ts +0 -7
- package/es-modules/Grid/Core/Pagination/Icons.js +0 -7
|
@@ -14,8 +14,7 @@ import H from './Globals.js';
|
|
|
14
14
|
const { isTouchDevice } = H;
|
|
15
15
|
import Palettes from './Color/Palettes.js';
|
|
16
16
|
import Time from './Time.js';
|
|
17
|
-
import
|
|
18
|
-
const { fireEvent, merge } = U;
|
|
17
|
+
import { fireEvent, merge } from '../Shared/Utilities.js';
|
|
19
18
|
/* *
|
|
20
19
|
*
|
|
21
20
|
* API Options
|
|
@@ -990,6 +989,9 @@ const defaultOptions = {
|
|
|
990
989
|
* columns. Setting this to `false` makes room for more items, but will
|
|
991
990
|
* look more messy.
|
|
992
991
|
*
|
|
992
|
+
* @sample highcharts/legend/aligncolumns
|
|
993
|
+
* Align columns
|
|
994
|
+
*
|
|
993
995
|
* @since 6.1.0
|
|
994
996
|
*/
|
|
995
997
|
alignColumns: true,
|
|
@@ -1120,16 +1122,21 @@ const defaultOptions = {
|
|
|
1120
1122
|
* for each legend label. Available variables relates to properties on
|
|
1121
1123
|
* the series, or the point in case of pies.
|
|
1122
1124
|
*
|
|
1125
|
+
* @sample {highcharts} highcharts/legend/labelformat/
|
|
1126
|
+
* Add text
|
|
1127
|
+
*
|
|
1123
1128
|
* @type {string}
|
|
1124
1129
|
* @default {name}
|
|
1125
1130
|
* @since 1.3
|
|
1126
1131
|
* @apioption legend.labelFormat
|
|
1127
1132
|
*/
|
|
1128
|
-
/* eslint-disable valid-jsdoc */
|
|
1129
1133
|
/**
|
|
1130
1134
|
* Callback function to format each of the series' labels. The `this`
|
|
1131
1135
|
* keyword refers to the series object, or the point object in case of
|
|
1132
|
-
* pie charts. By default the series or point name is printed.
|
|
1136
|
+
* pie charts. By default the series or point name is printed. Since
|
|
1137
|
+
* v12.5.0, the callback also receives `ctx` as the first argument, so
|
|
1138
|
+
* that arrow functions can access the same context as regular
|
|
1139
|
+
* functions using `this`.
|
|
1133
1140
|
*
|
|
1134
1141
|
* @productdesc {highmaps}
|
|
1135
1142
|
* In Highmaps the context can also be a data class in case of a
|
|
@@ -2025,13 +2032,18 @@ const defaultOptions = {
|
|
|
2025
2032
|
* @sample {highmaps} maps/tooltip/formatter/
|
|
2026
2033
|
* String formatting
|
|
2027
2034
|
*
|
|
2035
|
+
* Since v12.5.0, the callback also receives `ctx` as the second
|
|
2036
|
+
* argument, so that arrow functions can access the same context as
|
|
2037
|
+
* regular functions using `this`.
|
|
2038
|
+
*
|
|
2028
2039
|
* @type {Highcharts.TooltipFormatterCallbackFunction}
|
|
2029
2040
|
* @apioption tooltip.formatter
|
|
2030
2041
|
*/
|
|
2031
2042
|
/**
|
|
2032
2043
|
* Callback function to format the text of the tooltip for
|
|
2033
2044
|
* visible null points.
|
|
2034
|
-
* Works analogously to [formatter](#tooltip.formatter)
|
|
2045
|
+
* Works analogously to [formatter](#tooltip.formatter), including the
|
|
2046
|
+
* `ctx` callback argument added in v12.5.0.
|
|
2035
2047
|
*
|
|
2036
2048
|
* @sample highcharts/plotoptions/series-nullformat
|
|
2037
2049
|
* Format data label and tooltip for null point.
|
|
@@ -2065,7 +2077,9 @@ const defaultOptions = {
|
|
|
2065
2077
|
/**
|
|
2066
2078
|
* A callback function for formatting the HTML output for a single point
|
|
2067
2079
|
* in the tooltip. Like the `pointFormat` string, but with more
|
|
2068
|
-
* flexibility.
|
|
2080
|
+
* flexibility. Since v12.5.0, the callback also receives `ctx` as the
|
|
2081
|
+
* first argument, so that arrow functions can access the same context
|
|
2082
|
+
* as regular functions using `this`.
|
|
2069
2083
|
*
|
|
2070
2084
|
* @type {Highcharts.FormatterCallbackFunction<Highcharts.Point>}
|
|
2071
2085
|
* @since 4.1.0
|
|
@@ -2074,10 +2088,13 @@ const defaultOptions = {
|
|
|
2074
2088
|
*/
|
|
2075
2089
|
/**
|
|
2076
2090
|
* A callback function to place the tooltip in a custom position. The
|
|
2077
|
-
* callback receives
|
|
2078
|
-
* `point`, where point contains values for `plotX` and
|
|
2079
|
-
* where the reference point is in the plot area
|
|
2080
|
-
*
|
|
2091
|
+
* callback receives four parameters: `labelWidth`, `labelHeight`,
|
|
2092
|
+
* `point`, and `ctx`, where point contains values for `plotX` and
|
|
2093
|
+
* `plotY` telling where the reference point is in the plot area, and
|
|
2094
|
+
* `ctx` is the tooltip context (so that arrow-functions can access the
|
|
2095
|
+
* same context as a normal function using `this`). Add
|
|
2096
|
+
* `chart.plotLeft` and `chart.plotTop` to get the full coordinates.
|
|
2097
|
+
* Since v12.5.0, the callback receives `ctx`.
|
|
2081
2098
|
*
|
|
2082
2099
|
* To find the actual hovered `Point` instance, use
|
|
2083
2100
|
* `this.chart.hoverPoint`. For shared or split tooltips, all the hover
|
|
@@ -2301,6 +2318,15 @@ const defaultOptions = {
|
|
|
2301
2318
|
* @since 3.0
|
|
2302
2319
|
*/
|
|
2303
2320
|
hideDelay: 500,
|
|
2321
|
+
/**
|
|
2322
|
+
* The number of milliseconds to wait until the tooltip is shown when
|
|
2323
|
+
* mouse over a point. Works on initial hover.
|
|
2324
|
+
*
|
|
2325
|
+
* @sample {highcharts|highstock} highcharts/tooltip/showdelay/
|
|
2326
|
+
*
|
|
2327
|
+
* @since next
|
|
2328
|
+
*/
|
|
2329
|
+
showDelay: 0,
|
|
2304
2330
|
/**
|
|
2305
2331
|
* Padding inside the tooltip, in pixels.
|
|
2306
2332
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default Delaunay;
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
/* *
|
|
2
|
+
*
|
|
3
|
+
* (c) 2009-2026 Highsoft AS
|
|
4
|
+
*
|
|
5
|
+
* A commercial license may be required depending on use.
|
|
6
|
+
* See www.highcharts.com/license
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* Authors:
|
|
10
|
+
* - Dawid Dragula
|
|
11
|
+
*
|
|
12
|
+
* */
|
|
13
|
+
'use strict';
|
|
14
|
+
/* *
|
|
15
|
+
*
|
|
16
|
+
* Class
|
|
17
|
+
*
|
|
18
|
+
* */
|
|
19
|
+
/**
|
|
20
|
+
* Delaunay triangulation of a 2D point set.
|
|
21
|
+
*
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
class Delaunay {
|
|
25
|
+
/* *
|
|
26
|
+
*
|
|
27
|
+
* Constructor
|
|
28
|
+
*
|
|
29
|
+
* */
|
|
30
|
+
/**
|
|
31
|
+
* Create a new Delaunay triangulation.
|
|
32
|
+
*
|
|
33
|
+
* @param {Float32Array|Float64Array} points
|
|
34
|
+
* A 1D array of points in the format [x0, y0, x1, y1, ...].
|
|
35
|
+
*/
|
|
36
|
+
constructor(points) {
|
|
37
|
+
this.points = points;
|
|
38
|
+
const n = points.length >>> 1;
|
|
39
|
+
// Floating-point error multiplier used by geometric predicates.
|
|
40
|
+
this.epsilon = 4 * Number.EPSILON;
|
|
41
|
+
let minX = Infinity, maxX = -Infinity, minY = Infinity, maxY = -Infinity;
|
|
42
|
+
for (let i = 0; i < n; i++) {
|
|
43
|
+
const px = points[i << 1], py = points[(i << 1) + 1];
|
|
44
|
+
if (px < minX) {
|
|
45
|
+
minX = px;
|
|
46
|
+
}
|
|
47
|
+
if (px > maxX) {
|
|
48
|
+
maxX = px;
|
|
49
|
+
}
|
|
50
|
+
if (py < minY) {
|
|
51
|
+
minY = py;
|
|
52
|
+
}
|
|
53
|
+
if (py > maxY) {
|
|
54
|
+
maxY = py;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const rangeX = maxX - minX || 1, rangeY = maxY - minY || 1;
|
|
58
|
+
this.minX = minX;
|
|
59
|
+
this.minY = minY;
|
|
60
|
+
this.invScaleX = 1 / rangeX;
|
|
61
|
+
this.invScaleY = 1 / rangeY;
|
|
62
|
+
const ids = new Uint32Array(n), x = (i) => (points[i << 1] - minX) * this.invScaleX, y = (i) => (points[(i << 1) + 1] - minY) * this.invScaleY;
|
|
63
|
+
for (let i = 0; i < n; i++) {
|
|
64
|
+
ids[i] = i;
|
|
65
|
+
}
|
|
66
|
+
ids.sort((a, b) => (x(a) - x(b)) || (y(a) - y(b)));
|
|
67
|
+
let m = n ? 1 : 0, pa, pb;
|
|
68
|
+
for (let i = 1; i < n; ++i) {
|
|
69
|
+
pa = ids[m - 1],
|
|
70
|
+
pb = ids[i];
|
|
71
|
+
if (x(pa) !== x(pb) || y(pa) !== y(pb)) {
|
|
72
|
+
ids[m++] = pb;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
this.ids = ids.subarray(0, m);
|
|
76
|
+
this.triangles = this.triangulate();
|
|
77
|
+
}
|
|
78
|
+
/* *
|
|
79
|
+
*
|
|
80
|
+
* Methods
|
|
81
|
+
*
|
|
82
|
+
* */
|
|
83
|
+
/**
|
|
84
|
+
* Triangulate the points.
|
|
85
|
+
*
|
|
86
|
+
* @return {Uint32Array}
|
|
87
|
+
* A 1D array of triangle vertex indices.
|
|
88
|
+
*/
|
|
89
|
+
triangulate() {
|
|
90
|
+
const count = this.ids.length;
|
|
91
|
+
if (count < 3) {
|
|
92
|
+
return new Uint32Array(0);
|
|
93
|
+
}
|
|
94
|
+
const points = this.points, { minX, minY, invScaleX, invScaleY } = this, x = (i) => (points[i << 1] - minX) * invScaleX, y = (i) => (points[(i << 1) + 1] - minY) * invScaleY;
|
|
95
|
+
// Determine if three points are in counter-clockwise order.
|
|
96
|
+
const orient = (a, b, c) => {
|
|
97
|
+
const ax = x(a), ay = y(a), bx = x(b) - ax, by = y(b) - ay, cx = x(c) - ax, cy = y(c) - ay, det = bx * cy - by * cx, err = (Math.abs(bx * cy) + Math.abs(by * cx)) * this.epsilon;
|
|
98
|
+
return det > err;
|
|
99
|
+
};
|
|
100
|
+
// Determine if a point (d) is inside the circumcircle of a triangle
|
|
101
|
+
// (a, b, c).
|
|
102
|
+
const inCircle = (a, b, c, d) => {
|
|
103
|
+
if (a === d || b === d || c === d) {
|
|
104
|
+
// Skip if d is one of the triangle vertices.
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
const ax = x(a) - x(d), ay = y(a) - y(d), bx = x(b) - x(d), by = y(b) - y(d), cx = x(c) - x(d), cy = y(c) - y(d), aa = ax * ax + ay * ay, bb = bx * bx + by * by, cc = cx * cx + cy * cy, term1 = by * cc - bb * cy, term2 = bx * cc - bb * cx, term3 = bx * cy - by * cx, det = ax * term1 - ay * term2 + aa * term3, err = (Math.abs(ax * term1) +
|
|
108
|
+
Math.abs(ay * term2) +
|
|
109
|
+
Math.abs(aa * term3)) * this.epsilon;
|
|
110
|
+
return det > err;
|
|
111
|
+
};
|
|
112
|
+
// Data structures for the quad-edge data structure.
|
|
113
|
+
let cap = Math.max(32, ((8 * count + 7) & ~3)), // Capacity (% 4 = 0)
|
|
114
|
+
on = new Int32Array(cap), // Next edge in same face
|
|
115
|
+
rt = new Int32Array(cap), // Rotation of edge (90 degrees)
|
|
116
|
+
vtx = new Uint32Array(cap), // Origin vertex of edge
|
|
117
|
+
seen = new Uint8Array(cap), // Visited flag for edge traversal
|
|
118
|
+
top = 0; // Next free edge id (% 4 = 0)
|
|
119
|
+
// Ensure the data structures have enough capacity for the required
|
|
120
|
+
// number of edges.
|
|
121
|
+
const ensure = (need) => {
|
|
122
|
+
// If the capacity is sufficient, return.
|
|
123
|
+
if (need <= cap) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
// Double capacity until sufficient.
|
|
127
|
+
let ncap = cap << 1;
|
|
128
|
+
while (ncap < need) {
|
|
129
|
+
ncap <<= 1;
|
|
130
|
+
}
|
|
131
|
+
const on2 = new Int32Array(ncap), rt2 = new Int32Array(ncap), v2 = new Uint32Array(ncap), s2 = new Uint8Array(ncap);
|
|
132
|
+
on2.set(on);
|
|
133
|
+
rt2.set(rt);
|
|
134
|
+
v2.set(vtx);
|
|
135
|
+
s2.set(seen);
|
|
136
|
+
on = on2;
|
|
137
|
+
rt = rt2;
|
|
138
|
+
vtx = v2;
|
|
139
|
+
seen = s2;
|
|
140
|
+
cap = ncap;
|
|
141
|
+
};
|
|
142
|
+
const sym = (e) => rt[rt[e]], rotSym = (e) => sym(rt[e]), dest = (e) => vtx[sym(e)], lnext = (e) => rt[on[rotSym(e)]], oprev = (e) => rt[on[rt[e]]], rprev = (e) => on[sym(e)], leftOf = (p, e) => orient(p, vtx[e], dest(e)), rightOf = (p, e) => orient(p, dest(e), vtx[e]), admissible = (e, base) => rightOf(dest(e), base);
|
|
143
|
+
// Create a new edge between two vertices.
|
|
144
|
+
const makeEdge = (a, b) => {
|
|
145
|
+
ensure(top + 4);
|
|
146
|
+
const e0 = top, e1 = top + 1, e2 = top + 2, e3 = top + 3;
|
|
147
|
+
top += 4;
|
|
148
|
+
// Rot cycle
|
|
149
|
+
rt[e0] = e1;
|
|
150
|
+
rt[e1] = e2;
|
|
151
|
+
rt[e2] = e3;
|
|
152
|
+
rt[e3] = e0;
|
|
153
|
+
// Onext initial
|
|
154
|
+
on[e0] = e0;
|
|
155
|
+
on[e2] = e2;
|
|
156
|
+
on[e1] = e3;
|
|
157
|
+
on[e3] = e1;
|
|
158
|
+
// Origins
|
|
159
|
+
vtx[e0] = a;
|
|
160
|
+
vtx[e2] = b;
|
|
161
|
+
vtx[e1] = 0xffffffff;
|
|
162
|
+
vtx[e3] = 0xffffffff;
|
|
163
|
+
return e0;
|
|
164
|
+
};
|
|
165
|
+
// Splice two edges.
|
|
166
|
+
const splice = (a, b) => {
|
|
167
|
+
const alpha = rt[on[a]];
|
|
168
|
+
const beta = rt[on[b]];
|
|
169
|
+
const t2 = on[a];
|
|
170
|
+
const t3 = on[beta];
|
|
171
|
+
const t4 = on[alpha];
|
|
172
|
+
on[a] = on[b];
|
|
173
|
+
on[b] = t2;
|
|
174
|
+
on[alpha] = t3;
|
|
175
|
+
on[beta] = t4;
|
|
176
|
+
};
|
|
177
|
+
// Connect two edges.
|
|
178
|
+
const connect = (a, b) => {
|
|
179
|
+
const q = makeEdge(dest(a), vtx[b]);
|
|
180
|
+
splice(q, lnext(a));
|
|
181
|
+
splice(sym(q), b);
|
|
182
|
+
return q;
|
|
183
|
+
};
|
|
184
|
+
// Removes an edge from both sides.
|
|
185
|
+
const drop = (e) => {
|
|
186
|
+
splice(e, oprev(e));
|
|
187
|
+
const es = sym(e);
|
|
188
|
+
splice(es, oprev(es));
|
|
189
|
+
};
|
|
190
|
+
const A = this.ids;
|
|
191
|
+
// Recursively triangulate a range [lo, hi) of points. Returns the
|
|
192
|
+
// two endpoints [left, right] of the lower common tangent.
|
|
193
|
+
const solve = (lo, hi) => {
|
|
194
|
+
const len = hi - lo;
|
|
195
|
+
// If there are only two points, create a single edge.
|
|
196
|
+
if (len === 2) {
|
|
197
|
+
const a = makeEdge(A[lo], A[lo + 1]);
|
|
198
|
+
return [a, sym(a)];
|
|
199
|
+
}
|
|
200
|
+
// If there are three points, create two edges and connect them.
|
|
201
|
+
if (len === 3) {
|
|
202
|
+
const a = makeEdge(A[lo], A[lo + 1]), b = makeEdge(A[lo + 1], A[lo + 2]);
|
|
203
|
+
splice(sym(a), b);
|
|
204
|
+
const p0 = A[lo], p1 = A[lo + 1], p2 = A[lo + 2];
|
|
205
|
+
if (orient(p0, p1, p2)) {
|
|
206
|
+
connect(b, a);
|
|
207
|
+
return [a, sym(b)];
|
|
208
|
+
}
|
|
209
|
+
if (orient(p0, p2, p1)) {
|
|
210
|
+
const c = connect(b, a);
|
|
211
|
+
return [sym(c), c];
|
|
212
|
+
}
|
|
213
|
+
return [a, sym(b)];
|
|
214
|
+
}
|
|
215
|
+
// Find the midpoint of the range.
|
|
216
|
+
const mid = lo + ((len + 1) >>> 1);
|
|
217
|
+
const L = solve(lo, mid);
|
|
218
|
+
const R = solve(mid, hi);
|
|
219
|
+
let ldo = L[0], ldi = L[1], rdi = R[0], rdo = R[1];
|
|
220
|
+
// Lower common tangent
|
|
221
|
+
for (;;) {
|
|
222
|
+
if (leftOf(vtx[rdi], ldi)) {
|
|
223
|
+
ldi = lnext(ldi);
|
|
224
|
+
}
|
|
225
|
+
else if (rightOf(vtx[ldi], rdi)) {
|
|
226
|
+
rdi = rprev(rdi);
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
break;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
let base = connect(sym(rdi), ldi);
|
|
233
|
+
if (vtx[ldi] === vtx[ldo]) {
|
|
234
|
+
ldo = sym(base);
|
|
235
|
+
}
|
|
236
|
+
if (vtx[rdi] === vtx[rdo]) {
|
|
237
|
+
rdo = base;
|
|
238
|
+
}
|
|
239
|
+
// Merge loop - removing bad edges (inCircle) and adding new edges.
|
|
240
|
+
for (;;) {
|
|
241
|
+
// Left candidate
|
|
242
|
+
let lc = on[sym(base)];
|
|
243
|
+
if (admissible(lc, base)) {
|
|
244
|
+
while (inCircle(dest(base), vtx[base], dest(lc), dest(on[lc]))) {
|
|
245
|
+
const t = on[lc];
|
|
246
|
+
drop(lc);
|
|
247
|
+
lc = t;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
// Right candidate
|
|
251
|
+
let rc = oprev(base);
|
|
252
|
+
if (admissible(rc, base)) {
|
|
253
|
+
while (inCircle(dest(base), vtx[base], dest(rc), dest(oprev(rc)))) {
|
|
254
|
+
const t = oprev(rc);
|
|
255
|
+
drop(rc);
|
|
256
|
+
rc = t;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
if (!admissible(lc, base) && !admissible(rc, base)) {
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
if (!admissible(lc, base) || (admissible(rc, base) &&
|
|
263
|
+
inCircle(dest(lc), vtx[lc], vtx[rc], dest(rc)))) {
|
|
264
|
+
base = connect(rc, sym(base));
|
|
265
|
+
}
|
|
266
|
+
else {
|
|
267
|
+
base = connect(sym(base), sym(lc));
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return [ldo, rdo];
|
|
271
|
+
};
|
|
272
|
+
let e0 = solve(0, count)[0];
|
|
273
|
+
while (leftOf(dest(on[e0]), e0)) {
|
|
274
|
+
e0 = on[e0];
|
|
275
|
+
}
|
|
276
|
+
const Q = [e0];
|
|
277
|
+
let qi = 0;
|
|
278
|
+
{
|
|
279
|
+
let c = e0;
|
|
280
|
+
do {
|
|
281
|
+
Q.push(sym(c));
|
|
282
|
+
seen[c] = 1;
|
|
283
|
+
c = lnext(c);
|
|
284
|
+
} while (c !== e0);
|
|
285
|
+
}
|
|
286
|
+
const faces = [];
|
|
287
|
+
let cur, t;
|
|
288
|
+
while (qi < Q.length) {
|
|
289
|
+
const e = Q[qi++];
|
|
290
|
+
if (seen[e]) {
|
|
291
|
+
continue;
|
|
292
|
+
}
|
|
293
|
+
cur = e;
|
|
294
|
+
do {
|
|
295
|
+
faces.push(vtx[cur]);
|
|
296
|
+
t = sym(cur);
|
|
297
|
+
if (!seen[t]) {
|
|
298
|
+
Q.push(t);
|
|
299
|
+
}
|
|
300
|
+
seen[cur] = 1;
|
|
301
|
+
cur = lnext(cur);
|
|
302
|
+
} while (cur !== e);
|
|
303
|
+
}
|
|
304
|
+
return new Uint32Array(faces);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
/* *
|
|
308
|
+
*
|
|
309
|
+
* Default Export
|
|
310
|
+
*
|
|
311
|
+
* */
|
|
312
|
+
export default Delaunay;
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* */
|
|
11
11
|
'use strict';
|
|
12
|
-
import
|
|
13
|
-
const { addEvent, isFunction, objectEach, removeEvent } = U;
|
|
12
|
+
import { addEvent, isFunction, objectEach, removeEvent } from '../Shared/Utilities.js';
|
|
14
13
|
/* *
|
|
15
14
|
*
|
|
16
15
|
* Class Namespace
|
|
@@ -24,7 +23,6 @@ var Foundation;
|
|
|
24
23
|
* Functions
|
|
25
24
|
*
|
|
26
25
|
* */
|
|
27
|
-
/* eslint-disable valid-jsdoc */
|
|
28
26
|
/**
|
|
29
27
|
* Register event options. If an event handler is set on the options, it
|
|
30
28
|
* should be subject to Chart.update, Axis.update and Series.update. This is
|
|
@@ -9,9 +9,8 @@
|
|
|
9
9
|
* */
|
|
10
10
|
'use strict';
|
|
11
11
|
import Geometry from './GeometryUtilities.js';
|
|
12
|
-
import
|
|
12
|
+
import { correctFloat } from '../../Shared/Utilities.js';
|
|
13
13
|
const { getAngleBetweenPoints, getCenterOfPoints, getDistanceBetweenPoints } = Geometry;
|
|
14
|
-
const { correctFloat } = Utilities;
|
|
15
14
|
/* *
|
|
16
15
|
*
|
|
17
16
|
* Namespace
|
|
@@ -25,7 +25,7 @@ var Globals;
|
|
|
25
25
|
* Constants
|
|
26
26
|
*
|
|
27
27
|
* */
|
|
28
|
-
Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '2.
|
|
28
|
+
Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '2.3.1', Globals.win = (typeof window !== 'undefined' ?
|
|
29
29
|
window :
|
|
30
30
|
{}), // eslint-disable-line node/no-unsupported-features/es-builtins
|
|
31
31
|
Globals.doc = Globals.win.document, Globals.svg = !!Globals.doc?.createElementNS?.(Globals.SVG_NS, 'svg')?.createSVGRect, Globals.pageLang = Globals.doc?.documentElement?.closest('[lang]')?.lang, Globals.userAgent = Globals.win.navigator?.userAgent || '', Globals.isChrome = Globals.win.chrome, Globals.isFirefox = Globals.userAgent.indexOf('Firefox') !== -1, Globals.isMS = /(edge|msie|trident)/i.test(Globals.userAgent) && !Globals.win.opera, Globals.isSafari = !Globals.isChrome && Globals.userAgent.indexOf('Safari') !== -1, Globals.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(Globals.userAgent), Globals.isWebKit = Globals.userAgent.indexOf('AppleWebKit') !== -1, Globals.deg2rad = Math.PI * 2 / 360, Globals.marginNames = [
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
'use strict';
|
|
12
12
|
import G from '../Core/Globals.js';
|
|
13
13
|
const { win } = G;
|
|
14
|
-
import
|
|
15
|
-
const { discardElement, objectEach } = U;
|
|
14
|
+
import { discardElement, objectEach } from '../Shared/Utilities.js';
|
|
16
15
|
/* *
|
|
17
16
|
*
|
|
18
17
|
* Functions
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
import H from './Globals.js';
|
|
13
13
|
const { charts, composed, doc, noop, win } = H;
|
|
14
14
|
import Pointer from './Pointer.js';
|
|
15
|
-
import
|
|
16
|
-
const { addEvent, attr, css, defined, objectEach, pick, pushUnique, removeEvent } = U;
|
|
15
|
+
import { addEvent, attr, css, defined, objectEach, pick, pushUnique, removeEvent } from '../Shared/Utilities.js';
|
|
17
16
|
/* *
|
|
18
17
|
*
|
|
19
18
|
* Constants
|
|
@@ -27,7 +26,6 @@ const hasPointerEvent = !!win.PointerEvent;
|
|
|
27
26
|
* Functions
|
|
28
27
|
*
|
|
29
28
|
* */
|
|
30
|
-
/* eslint-disable valid-jsdoc */
|
|
31
29
|
/** @internal */
|
|
32
30
|
function getWebkitTouches() {
|
|
33
31
|
const fake = [];
|
|
@@ -194,7 +194,7 @@ export interface LoadingOptions {
|
|
|
194
194
|
* @sample highcharts/loading/hideduration/
|
|
195
195
|
* Fade in and out over a second
|
|
196
196
|
*
|
|
197
|
-
* @default
|
|
197
|
+
* @default 0
|
|
198
198
|
* @since 1.2.0
|
|
199
199
|
*/
|
|
200
200
|
showDuration?: number;
|
|
@@ -233,11 +233,15 @@ export interface LoadingOptions {
|
|
|
233
233
|
* The thousands separator, defaults to the one given in the lang options, or a
|
|
234
234
|
* space character.
|
|
235
235
|
*
|
|
236
|
+
* @param {Highcharts.Chart} [ctx]
|
|
237
|
+
* Since v12.5.0, the chart context passed as an extra argument for arrow
|
|
238
|
+
* functions.
|
|
239
|
+
*
|
|
236
240
|
* @return {string}
|
|
237
241
|
* The formatted number.
|
|
238
242
|
*/
|
|
239
243
|
export interface NumberFormatterCallbackFunction {
|
|
240
|
-
(this: Chart | object | void, number: number, decimals: number, decimalPoint?: string, thousandsSep?: string): string;
|
|
244
|
+
(this: Chart | object | void, number: number, decimals: number, decimalPoint?: string, thousandsSep?: string, ctx?: Chart): string;
|
|
241
245
|
}
|
|
242
246
|
/**
|
|
243
247
|
* Global options for all charts.
|
|
@@ -13,8 +13,25 @@ import Color from './Color/Color.js';
|
|
|
13
13
|
const { parse: color } = Color;
|
|
14
14
|
import H from './Globals.js';
|
|
15
15
|
const { charts, composed, isTouchDevice } = H;
|
|
16
|
-
import
|
|
17
|
-
|
|
16
|
+
import { addEvent, attr, css, defined, extend, find, fireEvent, isNumber, isObject, objectEach, offset, pick, pushUnique, splat } from '../Shared/Utilities.js';
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* Functions
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Check whether the configured action key allows the interaction.
|
|
24
|
+
*
|
|
25
|
+
* @internal
|
|
26
|
+
* @param {Event} e
|
|
27
|
+
* A mouse event.
|
|
28
|
+
* @param {string | undefined} key
|
|
29
|
+
* Zoom or pan key.
|
|
30
|
+
* @return {boolean}
|
|
31
|
+
* True if the key is undefined
|
|
32
|
+
* or if the action key is pressed. False otherwise.
|
|
33
|
+
*/
|
|
34
|
+
const checkActionKey = (e, key) => !defined(key) || e[`${key}Key`];
|
|
18
35
|
/* *
|
|
19
36
|
*
|
|
20
37
|
* Class
|
|
@@ -212,7 +229,8 @@ class Pointer {
|
|
|
212
229
|
selectionMarker.attr(attrs);
|
|
213
230
|
}
|
|
214
231
|
// Panning
|
|
215
|
-
if (clickedInside && !selectionMarker && panningEnabled
|
|
232
|
+
if (clickedInside && !selectionMarker && panningEnabled &&
|
|
233
|
+
(checkActionKey(e, panKey))) {
|
|
216
234
|
chart.pan(e, panning);
|
|
217
235
|
}
|
|
218
236
|
}
|
|
@@ -1444,7 +1462,8 @@ class Pointer {
|
|
|
1444
1462
|
this.zoomY = zoomY = /y/.test(zoomType);
|
|
1445
1463
|
this.zoomHor = (zoomX && !inverted) || (zoomY && inverted);
|
|
1446
1464
|
this.zoomVert = (zoomY && !inverted) || (zoomX && inverted);
|
|
1447
|
-
this.hasZoom = zoomX || zoomY
|
|
1465
|
+
this.hasZoom = (zoomX || zoomY) &&
|
|
1466
|
+
(checkActionKey(e, chart.zooming.key));
|
|
1448
1467
|
}
|
|
1449
1468
|
}
|
|
1450
1469
|
/** @internal */
|
|
@@ -8,10 +8,12 @@ export interface PointerEvent extends globalThis.PointerEvent {
|
|
|
8
8
|
accumulate?: boolean;
|
|
9
9
|
chartX: number;
|
|
10
10
|
chartY: number;
|
|
11
|
+
DOMType?: string;
|
|
11
12
|
lat?: number;
|
|
12
13
|
lon?: number;
|
|
13
14
|
point?: Point;
|
|
14
15
|
touches?: Array<Touch>;
|
|
16
|
+
trigger?: string;
|
|
15
17
|
xAxis?: Array<Pointer.AxisCoordinateObject>;
|
|
16
18
|
yAxis?: Array<Pointer.AxisCoordinateObject>;
|
|
17
19
|
}
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
'use strict';
|
|
12
12
|
import H from '../../Globals.js';
|
|
13
13
|
const { SVG_NS, win } = H;
|
|
14
|
-
import
|
|
15
|
-
|
|
14
|
+
import { attr, createElement, css, isFunction, isString, objectEach, splat } from '../../../Shared/Utilities.js';
|
|
15
|
+
import { error } from '../../Utilities.js';
|
|
16
16
|
const { trustedTypes } = win;
|
|
17
17
|
/* *
|
|
18
18
|
*
|
|
@@ -13,6 +13,8 @@ export interface HTMLAttributes {
|
|
|
13
13
|
href?: string;
|
|
14
14
|
htmlFor?: string;
|
|
15
15
|
id?: string;
|
|
16
|
+
min?: string;
|
|
17
|
+
max?: string;
|
|
16
18
|
name?: string;
|
|
17
19
|
onclick?: any;
|
|
18
20
|
onload?: any;
|
|
@@ -24,6 +26,7 @@ export interface HTMLAttributes {
|
|
|
24
26
|
rel?: string;
|
|
25
27
|
role?: string;
|
|
26
28
|
src?: string;
|
|
29
|
+
step?: string;
|
|
27
30
|
rowspan?: number;
|
|
28
31
|
summary?: string;
|
|
29
32
|
tabindex?: number;
|
|
@@ -13,8 +13,7 @@ import AST from './AST.js';
|
|
|
13
13
|
import H from '../../Globals.js';
|
|
14
14
|
const { composed, isFirefox } = H;
|
|
15
15
|
import SVGElement from '../SVG/SVGElement.js';
|
|
16
|
-
import
|
|
17
|
-
const { attr, css, createElement, defined, extend, getAlignFactor, isNumber, pInt, pushUnique } = U;
|
|
16
|
+
import { attr, createElement, css, defined, extend, getAlignFactor, isNumber, pInt, pushUnique } from '../../../Shared/Utilities.js';
|
|
18
17
|
/**
|
|
19
18
|
* The opacity and visibility properties are set as attributes on the main
|
|
20
19
|
* element and SVG groups, and as identical CSS properties on the HTML element
|