@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
|
@@ -17,12 +17,11 @@
|
|
|
17
17
|
'use strict';
|
|
18
18
|
import H from '../Core/Globals.js';
|
|
19
19
|
const { doc, win } = H;
|
|
20
|
-
import U from '../Core/Utilities.js';
|
|
21
|
-
const { attr, css, merge } = U;
|
|
22
20
|
import EventProvider from './Utils/EventProvider.js';
|
|
23
21
|
import ChartUtilities from './Utils/ChartUtilities.js';
|
|
24
22
|
const { fireEventOnWrappedOrUnwrappedElement } = ChartUtilities;
|
|
25
23
|
import HTMLUtilities from './Utils/HTMLUtilities.js';
|
|
24
|
+
import { attr, css, merge } from '../Shared/Utilities.js';
|
|
26
25
|
const { cloneMouseEvent, cloneTouchEvent, getFakeMouseEvent, removeElement } = HTMLUtilities;
|
|
27
26
|
/* *
|
|
28
27
|
*
|
|
@@ -79,8 +78,8 @@ class ProxyElement {
|
|
|
79
78
|
/**
|
|
80
79
|
* Update the target to be proxied. The position and events are updated to
|
|
81
80
|
* match the new target.
|
|
82
|
-
* @param target The new target definition
|
|
83
|
-
* @param attributes New HTML attributes to apply to the proxy. Set an
|
|
81
|
+
* @param {object} target The new target definition
|
|
82
|
+
* @param {object} attributes New HTML attributes to apply to the proxy. Set an
|
|
84
83
|
* attribute to null to remove.
|
|
85
84
|
*/
|
|
86
85
|
updateTarget(target, attributes) {
|
|
@@ -125,9 +124,7 @@ class ProxyElement {
|
|
|
125
124
|
*/
|
|
126
125
|
updateCSSClassName() {
|
|
127
126
|
const stringHasNoTooltip = (s) => (s.indexOf('highcharts-no-tooltip') > -1);
|
|
128
|
-
const
|
|
129
|
-
const groupDiv = legend.group && legend.group.div;
|
|
130
|
-
const noTooltipOnGroup = stringHasNoTooltip(groupDiv && groupDiv.className || '');
|
|
127
|
+
const noTooltipOnGroup = stringHasNoTooltip(this.chart.legend?.group?.div?.className || '');
|
|
131
128
|
const targetClassName = this.getTargetAttr(this.target.click, 'class') || '';
|
|
132
129
|
const noTooltipOnTarget = stringHasNoTooltip(targetClassName);
|
|
133
130
|
this.innerElement.className = noTooltipOnGroup || noTooltipOnTarget ?
|
|
@@ -17,14 +17,13 @@
|
|
|
17
17
|
'use strict';
|
|
18
18
|
import H from '../Core/Globals.js';
|
|
19
19
|
const { doc } = H;
|
|
20
|
-
import U from '../Core/Utilities.js';
|
|
21
|
-
const { attr, css } = U;
|
|
22
20
|
import CU from './Utils/ChartUtilities.js';
|
|
23
21
|
const { unhideChartElementFromAT } = CU;
|
|
24
22
|
import DOMElementProvider from './Utils/DOMElementProvider.js';
|
|
25
23
|
import HU from './Utils/HTMLUtilities.js';
|
|
26
24
|
const { removeChildNodes } = HU;
|
|
27
25
|
import ProxyElement from './ProxyElement.js';
|
|
26
|
+
import { attr, css } from '../Shared/Utilities.js';
|
|
28
27
|
/* *
|
|
29
28
|
*
|
|
30
29
|
* Class
|
|
@@ -17,8 +17,7 @@ import H from '../../Core/Globals.js';
|
|
|
17
17
|
const { doc } = H;
|
|
18
18
|
import HU from './HTMLUtilities.js';
|
|
19
19
|
const { addClass, visuallyHideElement } = HU;
|
|
20
|
-
import
|
|
21
|
-
const { attr } = U;
|
|
20
|
+
import { attr, internalClearTimeout } from '../../Shared/Utilities.js';
|
|
22
21
|
/* *
|
|
23
22
|
*
|
|
24
23
|
* Class
|
|
@@ -48,7 +47,7 @@ class Announcer {
|
|
|
48
47
|
// Delete contents after a little while to avoid user finding the live
|
|
49
48
|
// region in the DOM.
|
|
50
49
|
if (this.clearAnnouncementRegionTimer) {
|
|
51
|
-
|
|
50
|
+
internalClearTimeout(this.clearAnnouncementRegionTimer);
|
|
52
51
|
}
|
|
53
52
|
this.clearAnnouncementRegionTimer = setTimeout(() => {
|
|
54
53
|
this.announceRegion.innerHTML = AST.emptyHTML;
|
|
@@ -15,14 +15,12 @@ import H from '../../Core/Globals.js';
|
|
|
15
15
|
const { doc } = H;
|
|
16
16
|
import HU from './HTMLUtilities.js';
|
|
17
17
|
const { stripHTMLTagsFromString: stripHTMLTags } = HU;
|
|
18
|
-
import
|
|
19
|
-
const { defined, find, fireEvent } = U;
|
|
18
|
+
import { defined, find, fireEvent } from '../../Shared/Utilities.js';
|
|
20
19
|
/* *
|
|
21
20
|
*
|
|
22
21
|
* Functions
|
|
23
22
|
*
|
|
24
23
|
* */
|
|
25
|
-
/* eslint-disable valid-jsdoc */
|
|
26
24
|
/**
|
|
27
25
|
* Fire an event on an element that is either wrapped by Highcharts,
|
|
28
26
|
* or a DOM element.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { type EventOptions } from '../../Shared/Utilities.js';
|
|
1
2
|
import type { EventCallback } from '../../Core/Callback';
|
|
2
3
|
import DOMElementType from '../../Core/Renderer/DOMElementType';
|
|
3
|
-
import U from '../../Core/Utilities.js';
|
|
4
4
|
interface ElementsFocusEventRemovers {
|
|
5
5
|
element: DOMElementType;
|
|
6
6
|
remover: Function;
|
|
@@ -11,7 +11,7 @@ interface ElementsFocusEventRemovers {
|
|
|
11
11
|
declare class EventProvider {
|
|
12
12
|
constructor();
|
|
13
13
|
eventRemovers: Array<ElementsFocusEventRemovers>;
|
|
14
|
-
addEvent<T>(el: (Class<T> | T), type: string, fn: (EventCallback<T> | Function), options?:
|
|
14
|
+
addEvent<T>(el: (Class<T> | T), type: string, fn: (EventCallback<T> | Function), options?: EventOptions): Function;
|
|
15
15
|
/**
|
|
16
16
|
* Remove added event.
|
|
17
17
|
* @private
|
|
@@ -11,9 +11,13 @@
|
|
|
11
11
|
*
|
|
12
12
|
* */
|
|
13
13
|
'use strict';
|
|
14
|
+
/* *
|
|
15
|
+
*
|
|
16
|
+
* Imports
|
|
17
|
+
*
|
|
18
|
+
* */
|
|
19
|
+
import { addEvent } from '../../Shared/Utilities.js';
|
|
14
20
|
import H from '../../Core/Globals.js';
|
|
15
|
-
import U from '../../Core/Utilities.js';
|
|
16
|
-
const { addEvent } = U;
|
|
17
21
|
/**
|
|
18
22
|
* @private
|
|
19
23
|
*/
|
|
@@ -12,9 +12,8 @@
|
|
|
12
12
|
* */
|
|
13
13
|
'use strict';
|
|
14
14
|
import H from '../../Core/Globals.js';
|
|
15
|
+
import { css } from '../../Shared/Utilities.js';
|
|
15
16
|
const { doc, win } = H;
|
|
16
|
-
import U from '../../Core/Utilities.js';
|
|
17
|
-
const { css } = U;
|
|
18
17
|
/* *
|
|
19
18
|
*
|
|
20
19
|
* Constants
|
|
@@ -26,7 +25,6 @@ const simulatedEventTarget = win.EventTarget && new win.EventTarget() || 'none';
|
|
|
26
25
|
* Functions
|
|
27
26
|
*
|
|
28
27
|
* */
|
|
29
|
-
/* eslint-disable valid-jsdoc */
|
|
30
28
|
/**
|
|
31
29
|
* @private
|
|
32
30
|
* @param {Highcharts.HTMLDOMElement} el
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
* */
|
|
11
11
|
'use strict';
|
|
12
12
|
import Fx from './Fx.js';
|
|
13
|
-
import
|
|
14
|
-
const { defined, getStyle, isArray, isNumber, isObject, merge, objectEach, pick } = U;
|
|
13
|
+
import { defined, getStyle, isArray, isNumber, isObject, merge, objectEach, pick } from '../../Shared/Utilities.js';
|
|
15
14
|
/* *
|
|
16
15
|
*
|
|
17
16
|
* Functions
|
|
@@ -13,8 +13,7 @@ import Color from '../Color/Color.js';
|
|
|
13
13
|
const { parse: color } = Color;
|
|
14
14
|
import H from '../Globals.js';
|
|
15
15
|
const { win } = H;
|
|
16
|
-
import
|
|
17
|
-
const { isNumber, objectEach } = U;
|
|
16
|
+
import { isNumber, objectEach } from '../../Shared/Utilities.js';
|
|
18
17
|
/* eslint-disable no-invalid-this, valid-jsdoc */
|
|
19
18
|
/* *
|
|
20
19
|
*
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AnyRecord } from '../Shared/Types.js';
|
|
1
2
|
/**
|
|
2
3
|
* Generic callback function.
|
|
3
4
|
*
|
|
@@ -23,11 +24,14 @@ export interface Callback<TScope, TReturn> {
|
|
|
23
24
|
* @param {TEvent} e
|
|
24
25
|
* Event argument.
|
|
25
26
|
*
|
|
27
|
+
* @param {TScope} [ctx]
|
|
28
|
+
* The context for the callback.
|
|
29
|
+
*
|
|
26
30
|
* @return {boolean|void}
|
|
27
31
|
* Return value.
|
|
28
32
|
*/
|
|
29
33
|
export interface EventCallback<TScope, TEvent = AnyRecord | Event> {
|
|
30
|
-
(this: TScope, e: TEvent): (boolean | void);
|
|
34
|
+
(this: TScope, e: TEvent, ctx?: TScope): (boolean | void);
|
|
31
35
|
}
|
|
32
36
|
/**
|
|
33
37
|
* Generic formatter callback function.
|
|
@@ -40,10 +44,13 @@ export interface EventCallback<TScope, TEvent = AnyRecord | Event> {
|
|
|
40
44
|
* @param {TEvent} e
|
|
41
45
|
* Event argument.
|
|
42
46
|
*
|
|
47
|
+
* @param {TScope} [ctx]
|
|
48
|
+
* The context for the callback.
|
|
49
|
+
*
|
|
43
50
|
* @return {string}
|
|
44
51
|
* Return value.
|
|
45
52
|
*/
|
|
46
53
|
export interface FormatterCallback<TScope, TEvent = unknown> {
|
|
47
|
-
(this: TScope, e: TEvent): string;
|
|
54
|
+
(this: TScope, e: TEvent, ctx?: TScope): string;
|
|
48
55
|
}
|
|
49
56
|
export default Callback;
|
|
@@ -26,10 +26,10 @@ import SeriesRegistry from '../Series/SeriesRegistry.js';
|
|
|
26
26
|
const { seriesTypes } = SeriesRegistry;
|
|
27
27
|
import SVGRenderer from '../Renderer/SVG/SVGRenderer.js';
|
|
28
28
|
import Time from '../Time.js';
|
|
29
|
-
import U from '../Utilities.js';
|
|
30
29
|
import AST from '../Renderer/HTML/AST.js';
|
|
31
30
|
import Tick from '../Axis/Tick.js';
|
|
32
|
-
|
|
31
|
+
import { addEvent, attr, createElement, css, defined, diffObjects, discardElement, erase, extend, find, fireEvent, getAlignFactor, getStyle, internalClearTimeout, isArray, isNumber, isObject, isString, merge, objectEach, pick, pInt, relativeLength, removeEvent, splat, syncTimeout } from '../../Shared/Utilities.js';
|
|
32
|
+
import { error, uniqueKey } from '../Utilities.js';
|
|
33
33
|
/* *
|
|
34
34
|
*
|
|
35
35
|
* Class
|
|
@@ -65,6 +65,7 @@ const { addEvent, attr, createElement, css, defined, diffObjects, discardElement
|
|
|
65
65
|
* handler is equivalent.
|
|
66
66
|
*/
|
|
67
67
|
class Chart {
|
|
68
|
+
/* eslint-disable jsdoc/check-param-names */
|
|
68
69
|
/**
|
|
69
70
|
* Factory function for basic charts.
|
|
70
71
|
*
|
|
@@ -107,6 +108,11 @@ class Chart {
|
|
|
107
108
|
) {
|
|
108
109
|
/** @internal */
|
|
109
110
|
this.sharedClips = {};
|
|
111
|
+
// Return early if there's no browser API (server environment).
|
|
112
|
+
if (!doc) {
|
|
113
|
+
error(36, false, this);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
110
116
|
const args = [
|
|
111
117
|
// ES5 builds fail unless we cast it to an Array
|
|
112
118
|
...arguments
|
|
@@ -369,13 +375,6 @@ class Chart {
|
|
|
369
375
|
for (let i = fromIndex, iEnd = collection.length; i < iEnd; ++i) {
|
|
370
376
|
const item = collection[i];
|
|
371
377
|
if (item) {
|
|
372
|
-
/**
|
|
373
|
-
* Contains the series' index in the `Chart.series` array.
|
|
374
|
-
*
|
|
375
|
-
* @name Highcharts.Series#index
|
|
376
|
-
* @type {number}
|
|
377
|
-
* @readonly
|
|
378
|
-
*/
|
|
379
378
|
item.index = i;
|
|
380
379
|
if (item instanceof Series) {
|
|
381
380
|
item.name = item.getName();
|
|
@@ -1277,7 +1276,7 @@ class Chart {
|
|
|
1277
1276
|
containerBox.width) {
|
|
1278
1277
|
if (containerBox.width !== oldBox.width ||
|
|
1279
1278
|
containerBox.height !== oldBox.height) {
|
|
1280
|
-
|
|
1279
|
+
internalClearTimeout(chart.reflowTimeout);
|
|
1281
1280
|
// When called from window.resize, e is set, else it's called
|
|
1282
1281
|
// directly (#2224)
|
|
1283
1282
|
chart.reflowTimeout = syncTimeout(function () {
|
|
@@ -1285,6 +1284,12 @@ class Chart {
|
|
|
1285
1284
|
// (#1257)
|
|
1286
1285
|
if (chart.container) {
|
|
1287
1286
|
chart.setSize(void 0, void 0, false);
|
|
1287
|
+
// #23712: sync containerBox with reflowed height to
|
|
1288
|
+
// break infinite loop
|
|
1289
|
+
const box = chart.containerBox;
|
|
1290
|
+
if (box) {
|
|
1291
|
+
box.height = chart.chartHeight;
|
|
1292
|
+
}
|
|
1288
1293
|
}
|
|
1289
1294
|
}, e ? 100 : 0);
|
|
1290
1295
|
}
|
|
@@ -1681,15 +1686,6 @@ class Chart {
|
|
|
1681
1686
|
// #3341 avoid mutual linking
|
|
1682
1687
|
linkedParent.linkedParent !== series) {
|
|
1683
1688
|
linkedParent.linkedSeries.push(series);
|
|
1684
|
-
/**
|
|
1685
|
-
* The parent series of the current series, if the current
|
|
1686
|
-
* series has a [linkedTo](https://api.highcharts.com/highcharts/series.line.linkedTo)
|
|
1687
|
-
* setting.
|
|
1688
|
-
*
|
|
1689
|
-
* @name Highcharts.Series#linkedParent
|
|
1690
|
-
* @type {Highcharts.Series}
|
|
1691
|
-
* @readonly
|
|
1692
|
-
*/
|
|
1693
1689
|
series.linkedParent = linkedParent;
|
|
1694
1690
|
if (linkedParent.enabledDataSorting) {
|
|
1695
1691
|
series.setDataSortingOptions();
|
|
@@ -1772,14 +1768,25 @@ class Chart {
|
|
|
1772
1768
|
while ((redoHorizontal || redoVertical || axisLayoutRuns > 1) &&
|
|
1773
1769
|
run < axisLayoutRuns // #19794
|
|
1774
1770
|
) {
|
|
1775
|
-
const tempWidth = chart.plotWidth, tempHeight = chart.plotHeight;
|
|
1771
|
+
const tempWidth = chart.plotWidth, tempHeight = chart.plotHeight, threshold = [1.05, 1.1];
|
|
1776
1772
|
for (const axis of axes) {
|
|
1773
|
+
const horizNum = +(axis.horiz || 0);
|
|
1777
1774
|
if (run === 0) {
|
|
1778
1775
|
// Get margins by pre-rendering axes
|
|
1779
1776
|
axis.setScale();
|
|
1777
|
+
// On datetime axes, consider the tick interval match. A
|
|
1778
|
+
// match close to 1 means that the current normalized tick
|
|
1779
|
+
// interval is an insecure match to the requested tick
|
|
1780
|
+
// interval, on the brink of landing on a higher unit. In
|
|
1781
|
+
// this case, we should redo the axis to get a more
|
|
1782
|
+
// appropriate tick interval (#17393).
|
|
1783
|
+
const tickIntervalMatch = axis.tickPositions?.info?.match;
|
|
1784
|
+
if (tickIntervalMatch) {
|
|
1785
|
+
threshold[horizNum] = Math.min(tickIntervalMatch, threshold[horizNum]);
|
|
1786
|
+
}
|
|
1780
1787
|
}
|
|
1781
|
-
else if ((
|
|
1782
|
-
(!
|
|
1788
|
+
else if ((horizNum && redoHorizontal) ||
|
|
1789
|
+
(!horizNum && redoVertical)) {
|
|
1783
1790
|
// Update to reflect the new margins
|
|
1784
1791
|
axis.setTickInterval(true);
|
|
1785
1792
|
}
|
|
@@ -1791,8 +1798,10 @@ class Chart {
|
|
|
1791
1798
|
// Check again for new, rotated or moved labels
|
|
1792
1799
|
chart.getMargins();
|
|
1793
1800
|
}
|
|
1794
|
-
redoHorizontal = (tempWidth / chart.plotWidth) >
|
|
1795
|
-
|
|
1801
|
+
redoHorizontal = (tempWidth / chart.plotWidth) >
|
|
1802
|
+
(run ? 1 : threshold[1]);
|
|
1803
|
+
redoVertical = (tempHeight / chart.plotHeight) >
|
|
1804
|
+
(run ? 1 : threshold[0]);
|
|
1796
1805
|
run++;
|
|
1797
1806
|
}
|
|
1798
1807
|
// Draw the borders and backgrounds
|
|
@@ -1973,7 +1982,7 @@ class Chart {
|
|
|
1973
1982
|
chart.render();
|
|
1974
1983
|
chart.pointer?.getChartPosition(); // #14973
|
|
1975
1984
|
// Fire the load event if there are no external images
|
|
1976
|
-
if (!chart.renderer.
|
|
1985
|
+
if (!chart.renderer.asyncCounter && !chart.hasLoaded) {
|
|
1977
1986
|
chart.onload();
|
|
1978
1987
|
}
|
|
1979
1988
|
// If the chart was rendered outside the top container, put it back in
|
|
@@ -2166,7 +2175,7 @@ class Chart {
|
|
|
2166
2175
|
* @param {string} coll
|
|
2167
2176
|
* An axis type.
|
|
2168
2177
|
*
|
|
2169
|
-
* @param {...Array<*>}
|
|
2178
|
+
* @param {...Array<*>} options
|
|
2170
2179
|
* All arguments for the constructor.
|
|
2171
2180
|
*
|
|
2172
2181
|
* @return {Highcharts.Axis}
|
|
@@ -2199,13 +2208,13 @@ class Chart {
|
|
|
2199
2208
|
* [lang.loading](https://api.highcharts.com/highcharts/lang.loading).
|
|
2200
2209
|
*/
|
|
2201
2210
|
showLoading(str) {
|
|
2202
|
-
const chart = this, options = chart.options, loadingOptions = options.loading, setLoadingSize = function () {
|
|
2211
|
+
const chart = this, options = chart.options, loadingOptions = options.loading, loadingStyle = loadingOptions?.style ?? {}, setLoadingSize = function () {
|
|
2203
2212
|
if (loadingDiv) {
|
|
2204
2213
|
css(loadingDiv, {
|
|
2205
|
-
left: chart.plotLeft + 'px',
|
|
2206
|
-
top: chart.plotTop + 'px',
|
|
2207
|
-
width: chart.plotWidth + 'px',
|
|
2208
|
-
height: chart.plotHeight + 'px'
|
|
2214
|
+
left: loadingStyle.left ?? chart.plotLeft + 'px',
|
|
2215
|
+
top: loadingStyle.top ?? chart.plotTop + 'px',
|
|
2216
|
+
width: loadingStyle.width ?? chart.plotWidth + 'px',
|
|
2217
|
+
height: loadingStyle.height ?? chart.plotHeight + 'px'
|
|
2209
2218
|
});
|
|
2210
2219
|
}
|
|
2211
2220
|
};
|
|
@@ -2225,10 +2234,8 @@ class Chart {
|
|
|
2225
2234
|
AST.setElementHTML(loadingSpan, pick(str, options.lang.loading, ''));
|
|
2226
2235
|
if (!chart.styledMode) {
|
|
2227
2236
|
// Update visuals
|
|
2228
|
-
css(loadingDiv, extend(
|
|
2229
|
-
|
|
2230
|
-
}));
|
|
2231
|
-
css(loadingSpan, loadingOptions.labelStyle);
|
|
2237
|
+
css(loadingDiv, extend(loadingStyle, { zIndex: 10 }));
|
|
2238
|
+
css(loadingSpan, loadingOptions?.labelStyle ?? {});
|
|
2232
2239
|
// Show it
|
|
2233
2240
|
if (!chart.loadingShown) {
|
|
2234
2241
|
css(loadingDiv, {
|
|
@@ -2236,9 +2243,9 @@ class Chart {
|
|
|
2236
2243
|
display: ''
|
|
2237
2244
|
});
|
|
2238
2245
|
animate(loadingDiv, {
|
|
2239
|
-
opacity:
|
|
2246
|
+
opacity: loadingStyle.opacity ?? 0.5
|
|
2240
2247
|
}, {
|
|
2241
|
-
duration: loadingOptions
|
|
2248
|
+
duration: loadingOptions?.showDuration ?? 0
|
|
2242
2249
|
});
|
|
2243
2250
|
}
|
|
2244
2251
|
}
|
|
@@ -2266,7 +2273,7 @@ class Chart {
|
|
|
2266
2273
|
animate(loadingDiv, {
|
|
2267
2274
|
opacity: 0
|
|
2268
2275
|
}, {
|
|
2269
|
-
duration: options.loading
|
|
2276
|
+
duration: options.loading?.hideDuration ?? 100,
|
|
2270
2277
|
complete: function () {
|
|
2271
2278
|
css(loadingDiv, { display: 'none' });
|
|
2272
2279
|
}
|
|
@@ -2435,9 +2442,12 @@ class Chart {
|
|
|
2435
2442
|
// update the first series in the chart. Setting two series without
|
|
2436
2443
|
// an id will update the first and the second respectively (#6019)
|
|
2437
2444
|
// chart.update and responsive.
|
|
2438
|
-
this.collectionsWithUpdate.forEach(
|
|
2445
|
+
this.collectionsWithUpdate.forEach((coll) => {
|
|
2439
2446
|
if (options[coll]) {
|
|
2440
|
-
splat(options[coll]).forEach(
|
|
2447
|
+
splat(options[coll]).forEach((newOptions, i) => {
|
|
2448
|
+
if (!newOptions) {
|
|
2449
|
+
return;
|
|
2450
|
+
}
|
|
2441
2451
|
const hasId = defined(newOptions.id);
|
|
2442
2452
|
let item;
|
|
2443
2453
|
// Match by id
|
|
@@ -2476,7 +2486,7 @@ class Chart {
|
|
|
2476
2486
|
});
|
|
2477
2487
|
// Add items for removal
|
|
2478
2488
|
if (oneToOne) {
|
|
2479
|
-
chart[coll].forEach(
|
|
2489
|
+
chart[coll].forEach((item) => {
|
|
2480
2490
|
if (!item.touched && !item.options.isInternal) {
|
|
2481
2491
|
itemsForRemoval.push(item);
|
|
2482
2492
|
}
|
|
@@ -2487,7 +2497,7 @@ class Chart {
|
|
|
2487
2497
|
}
|
|
2488
2498
|
}
|
|
2489
2499
|
});
|
|
2490
|
-
itemsForRemoval.forEach(
|
|
2500
|
+
itemsForRemoval.forEach((item) => {
|
|
2491
2501
|
if (item.chart && item.remove) { // #9097, avoid removing twice
|
|
2492
2502
|
item.remove(false);
|
|
2493
2503
|
}
|
|
@@ -2930,6 +2940,10 @@ export default Chart;
|
|
|
2930
2940
|
* The thousands separator, defaults to the one given in the lang
|
|
2931
2941
|
* options, or a space character.
|
|
2932
2942
|
*
|
|
2943
|
+
* @param {Highcharts.Chart} [ctx]
|
|
2944
|
+
* Since v12.5.0, the chart context passed as an extra argument for
|
|
2945
|
+
* arrow functions.
|
|
2946
|
+
*
|
|
2933
2947
|
* @return {string} The formatted number.
|
|
2934
2948
|
*/
|
|
2935
2949
|
/**
|
|
@@ -17,8 +17,7 @@ import D from '../Defaults.js';
|
|
|
17
17
|
const { defaultOptions: genericDefaultOptions } = D;
|
|
18
18
|
import Math3D from '../Math3D.js';
|
|
19
19
|
const { perspective, shapeArea3D } = Math3D;
|
|
20
|
-
import
|
|
21
|
-
const { addEvent, isArray, merge, pick, wrap } = U;
|
|
20
|
+
import { addEvent, isArray, merge, pick, wrap } from '../../Shared/Utilities.js';
|
|
22
21
|
/* *
|
|
23
22
|
*
|
|
24
23
|
* Composition
|
|
@@ -386,6 +386,9 @@ const ChartDefaults = {
|
|
|
386
386
|
/**
|
|
387
387
|
* Callback function to override the default function that formats all
|
|
388
388
|
* the numbers in the chart. Returns a string with the formatted number.
|
|
389
|
+
* Since v12.5.0, the callback also receives `ctx` as the last argument,
|
|
390
|
+
* so that arrow functions can access the same context as regular
|
|
391
|
+
* functions using `this`.
|
|
389
392
|
*
|
|
390
393
|
* @sample highcharts/members/highcharts-numberformat
|
|
391
394
|
* Arabic digits in Highcharts
|
|
@@ -439,6 +442,10 @@ const ChartDefaults = {
|
|
|
439
442
|
* requires two fingers. To allow panning with one finger, set
|
|
440
443
|
* `followTouchMove` to `false`.
|
|
441
444
|
*
|
|
445
|
+
* **Note:** If both zooming and panning are enabled without keys, zooming
|
|
446
|
+
* will take precedence by default. To prioritize panning, either set
|
|
447
|
+
* [chart.zooming.key](#chart.zooming.key) or panKey.
|
|
448
|
+
*
|
|
442
449
|
* @sample {highcharts} highcharts/chart/pankey/ Zooming and panning
|
|
443
450
|
* @sample {highstock} stock/chart/panning/ Zooming and xy panning
|
|
444
451
|
*/
|
|
@@ -1048,6 +1055,10 @@ const ChartDefaults = {
|
|
|
1048
1055
|
* avoid zooming while moving points. Should be set different than
|
|
1049
1056
|
* [chart.panKey](#chart.panKey).
|
|
1050
1057
|
*
|
|
1058
|
+
* **Note:** If both zooming and panning are enabled without keys,
|
|
1059
|
+
* zooming will take precedence by default. To prioritize panning,
|
|
1060
|
+
* either set zooming key or [chart.panKey](#chart.panKey).
|
|
1061
|
+
*
|
|
1051
1062
|
* @type {string}
|
|
1052
1063
|
* @default {highcharts} undefined
|
|
1053
1064
|
* @validvalue ["alt", "ctrl", "meta", "shift"]
|
|
@@ -598,6 +598,10 @@ export interface ChartOptions {
|
|
|
598
598
|
* requires two fingers. To allow panning with one finger, set
|
|
599
599
|
* `followTouchMove` to `false`.
|
|
600
600
|
*
|
|
601
|
+
* **Note:** If both zooming and panning are enabled without keys, zooming
|
|
602
|
+
* will take precedence by default. To prioritize panning, either set
|
|
603
|
+
* [chart.zooming.key](#chart.zooming.key) or panKey.
|
|
604
|
+
*
|
|
601
605
|
* @sample {highcharts} highcharts/chart/pankey/
|
|
602
606
|
* Zooming and panning
|
|
603
607
|
* @sample {highstock} stock/chart/panning/
|
|
@@ -1160,6 +1164,10 @@ export interface ChartZoomingOptions {
|
|
|
1160
1164
|
* avoid zooming while moving points. Should be set different than
|
|
1161
1165
|
* [chart.panKey](#chart.panKey).
|
|
1162
1166
|
*
|
|
1167
|
+
* **Note:** If both zooming and panning are enabled without keys, zooming
|
|
1168
|
+
* will take precedence by default. To prioritize panning, either set
|
|
1169
|
+
* zooming key or [chart.panKey](#chart.panKey).
|
|
1170
|
+
*
|
|
1163
1171
|
* @default {highcharts} undefined
|
|
1164
1172
|
* @validvalue ["alt", "ctrl", "meta", "shift"]
|
|
1165
1173
|
* @requires modules/draggable-points
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
import Chart from './Chart.js';
|
|
14
14
|
import D from '../Defaults.js';
|
|
15
15
|
const { defaultOptions } = D;
|
|
16
|
-
import
|
|
17
|
-
const { isArray, merge, splat } = U;
|
|
16
|
+
import { isArray, merge, splat } from '../../Shared/Utilities.js';
|
|
18
17
|
/* *
|
|
19
18
|
*
|
|
20
19
|
* Class
|
|
@@ -13,9 +13,8 @@ import Chart from './Chart.js';
|
|
|
13
13
|
import D from '../Defaults.js';
|
|
14
14
|
const { getOptions } = D;
|
|
15
15
|
import SVGRenderer from '../Renderer/SVG/SVGRenderer.js';
|
|
16
|
-
import U from '../Utilities.js';
|
|
17
|
-
const { isNumber, merge, pick } = U;
|
|
18
16
|
import '../../Maps/MapSymbols.js';
|
|
17
|
+
import { isNumber, merge, pick } from '../../Shared/Utilities.js';
|
|
19
18
|
/* *
|
|
20
19
|
*
|
|
21
20
|
* Class
|
|
@@ -165,6 +164,7 @@ class MapChart extends Chart {
|
|
|
165
164
|
* Functions
|
|
166
165
|
*
|
|
167
166
|
* */
|
|
167
|
+
/* eslint-disable jsdoc/check-param-names */
|
|
168
168
|
/**
|
|
169
169
|
* The factory function for creating new map charts. Creates a new {@link
|
|
170
170
|
* Highcharts.MapChart|MapChart} object with different default options than
|
|
@@ -195,6 +195,7 @@ class MapChart extends Chart {
|
|
|
195
195
|
return new MapChart(a, b, c);
|
|
196
196
|
}
|
|
197
197
|
MapChart.mapChart = mapChart;
|
|
198
|
+
/* eslint-enable jsdoc/check-param-names */
|
|
198
199
|
/**
|
|
199
200
|
* Utility for reading SVG paths directly.
|
|
200
201
|
*
|
|
@@ -19,8 +19,7 @@ import RangeSelectorDefaults from '../../Stock/RangeSelector/RangeSelectorDefaul
|
|
|
19
19
|
import ScrollbarDefaults from '../../Stock/Scrollbar/ScrollbarDefaults.js';
|
|
20
20
|
import StockUtilities from '../../Stock/Utilities/StockUtilities.js';
|
|
21
21
|
const { setFixedRange } = StockUtilities;
|
|
22
|
-
import
|
|
23
|
-
const { addEvent, clamp, crisp, defined, extend, find, isNumber, isString, merge, pick, splat } = U;
|
|
22
|
+
import { addEvent, clamp, crisp, defined, extend, find, isNumber, isString, merge, pick, splat } from '../../Shared/Utilities.js';
|
|
24
23
|
/* *
|
|
25
24
|
*
|
|
26
25
|
* Functions
|
|
@@ -339,7 +338,7 @@ addEvent(Chart, 'update', function (e) {
|
|
|
339
338
|
text = format(formatOption, { value }, chart);
|
|
340
339
|
}
|
|
341
340
|
else if (options.formatter && isNumber(value)) {
|
|
342
|
-
text = options.formatter.call(axis, value);
|
|
341
|
+
text = options.formatter.call(axis, value, axis);
|
|
343
342
|
}
|
|
344
343
|
crossLabel.attr({
|
|
345
344
|
text,
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
'use strict';
|
|
12
12
|
import H from '../Globals.js';
|
|
13
13
|
const { win } = H;
|
|
14
|
-
import
|
|
15
|
-
const { isNumber, isString, merge, pInt, defined } = U;
|
|
14
|
+
import { defined, isNumber, isString, merge, pInt } from '../../Shared/Utilities.js';
|
|
16
15
|
/* *
|
|
17
16
|
*
|
|
18
17
|
* Helpers
|
|
@@ -25,7 +24,6 @@ const isStringColor = (color) => isString(color) && !!color && color !== 'none';
|
|
|
25
24
|
* Class
|
|
26
25
|
*
|
|
27
26
|
* */
|
|
28
|
-
/* eslint-disable valid-jsdoc */
|
|
29
27
|
/**
|
|
30
28
|
* Handle color operations. Some object methods are chainable.
|
|
31
29
|
*
|