@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.
Files changed (274) hide show
  1. package/LICENSE.txt +6 -0
  2. package/README.md +15 -9
  3. package/css/grid-pro.css +1262 -1122
  4. package/css/modules/grid-base-variables.css +131 -0
  5. package/css/modules/grid-button-variables.css +140 -0
  6. package/css/modules/grid-caption-variables.css +11 -0
  7. package/css/modules/grid-description-variables.css +11 -0
  8. package/css/modules/grid-input-variables.css +114 -0
  9. package/css/modules/grid-link-variables.css +18 -0
  10. package/css/modules/grid-menu-variables.css +50 -0
  11. package/css/modules/grid-pagination-variables.css +12 -0
  12. package/css/modules/grid-popup-variables.css +24 -0
  13. package/css/modules/grid-pro.css +234 -0
  14. package/css/modules/grid-table-variables.css +385 -0
  15. package/css/modules/grid-theme-default.css +55 -0
  16. package/es-modules/Accessibility/A11yI18n.js +1 -2
  17. package/es-modules/Accessibility/Accessibility.js +1 -2
  18. package/es-modules/Accessibility/AccessibilityComponent.d.ts +2 -2
  19. package/es-modules/Accessibility/Components/ContainerComponent.js +0 -1
  20. package/es-modules/Accessibility/Components/InfoRegionsComponent.js +6 -8
  21. package/es-modules/Accessibility/Components/LegendComponent.js +1 -2
  22. package/es-modules/Accessibility/Components/MenuComponent.js +1 -3
  23. package/es-modules/Accessibility/Components/NavigatorComponent.js +3 -4
  24. package/es-modules/Accessibility/Components/RangeSelectorComponent.js +1 -3
  25. package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +22 -11
  26. package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +3 -7
  27. package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +0 -1
  28. package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +3 -5
  29. package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +1 -4
  30. package/es-modules/Accessibility/Components/ZoomComponent.js +1 -2
  31. package/es-modules/Accessibility/FocusBorder.js +6 -7
  32. package/es-modules/Accessibility/KeyboardNavigation.js +1 -2
  33. package/es-modules/Accessibility/KeyboardNavigationHandler.js +1 -2
  34. package/es-modules/Accessibility/Options/A11yDefaults.d.ts +11 -0
  35. package/es-modules/Accessibility/Options/A11yDefaults.js +11 -0
  36. package/es-modules/Accessibility/Options/DeprecatedOptions.d.ts +58 -0
  37. package/es-modules/Accessibility/Options/DeprecatedOptions.js +8 -4
  38. package/es-modules/Accessibility/Options/LangDefaults.js +9 -0
  39. package/es-modules/Accessibility/ProxyElement.d.ts +2 -2
  40. package/es-modules/Accessibility/ProxyElement.js +4 -7
  41. package/es-modules/Accessibility/ProxyProvider.js +1 -2
  42. package/es-modules/Accessibility/Utils/Announcer.js +2 -3
  43. package/es-modules/Accessibility/Utils/ChartUtilities.js +1 -3
  44. package/es-modules/Accessibility/Utils/EventProvider.d.ts +2 -2
  45. package/es-modules/Accessibility/Utils/EventProvider.js +6 -2
  46. package/es-modules/Accessibility/Utils/HTMLUtilities.js +1 -3
  47. package/es-modules/Core/Animation/AnimationUtilities.js +1 -2
  48. package/es-modules/Core/Animation/Fx.js +1 -2
  49. package/es-modules/Core/Callback.d.ts +9 -2
  50. package/es-modules/Core/Chart/Chart.js +56 -42
  51. package/es-modules/Core/Chart/Chart3D.js +1 -2
  52. package/es-modules/Core/Chart/ChartDefaults.js +11 -0
  53. package/es-modules/Core/Chart/ChartNavigationComposition.js +0 -1
  54. package/es-modules/Core/Chart/ChartOptions.d.ts +8 -0
  55. package/es-modules/Core/Chart/GanttChart.js +1 -2
  56. package/es-modules/Core/Chart/MapChart.js +3 -2
  57. package/es-modules/Core/Chart/StockChart.js +2 -3
  58. package/es-modules/Core/Color/Color.js +1 -3
  59. package/es-modules/Core/Defaults.js +36 -10
  60. package/es-modules/Core/Delaunay.d.ts +1 -0
  61. package/es-modules/Core/Delaunay.js +312 -0
  62. package/es-modules/Core/Foundation.js +1 -3
  63. package/es-modules/Core/Geometry/CircleUtilities.js +1 -2
  64. package/es-modules/Core/Globals.js +1 -1
  65. package/es-modules/Core/HttpUtilities.js +1 -2
  66. package/es-modules/Core/MSPointer.js +1 -3
  67. package/es-modules/Core/Math3D.js +1 -2
  68. package/es-modules/Core/Options.d.ts +6 -2
  69. package/es-modules/Core/Pointer.js +23 -4
  70. package/es-modules/Core/PointerEvent.d.ts +2 -0
  71. package/es-modules/Core/Renderer/HTML/AST.js +2 -2
  72. package/es-modules/Core/Renderer/HTML/HTMLAttributes.d.ts +3 -0
  73. package/es-modules/Core/Renderer/HTML/HTMLElement.js +1 -2
  74. package/es-modules/Core/Renderer/RendererUtilities.js +34 -20
  75. package/es-modules/Core/Renderer/SVG/SVGRenderer.d.ts +1 -1
  76. package/es-modules/Core/Renderer/SVG/Symbols.d.ts +2 -2
  77. package/es-modules/Core/Responsive.d.ts +4 -2
  78. package/es-modules/Core/Responsive.js +10 -4
  79. package/es-modules/Core/Templating.d.ts +1 -1
  80. package/es-modules/Core/Templating.js +3 -4
  81. package/es-modules/Core/Time.d.ts +8 -0
  82. package/es-modules/Core/Time.js +2 -2
  83. package/es-modules/Core/Tooltip.d.ts +4 -8
  84. package/es-modules/Core/Tooltip.js +100 -81
  85. package/es-modules/Core/TooltipOptions.d.ts +44 -1
  86. package/es-modules/Core/Utilities.d.ts +25 -665
  87. package/es-modules/Core/Utilities.js +21 -1400
  88. package/es-modules/Data/ColumnUtils.d.ts +83 -80
  89. package/es-modules/Data/ColumnUtils.js +103 -113
  90. package/es-modules/Data/Connectors/CSVConnector.d.ts +9 -14
  91. package/es-modules/Data/Connectors/CSVConnector.js +3 -4
  92. package/es-modules/Data/Connectors/DataConnector.d.ts +56 -58
  93. package/es-modules/Data/Connectors/DataConnector.js +37 -56
  94. package/es-modules/Data/Connectors/GoogleSheetsConnector.d.ts +40 -42
  95. package/es-modules/Data/Connectors/GoogleSheetsConnector.js +73 -88
  96. package/es-modules/Data/Connectors/GoogleSheetsConnectorOptions.d.ts +4 -2
  97. package/es-modules/Data/Connectors/HTMLTableConnector.d.ts +23 -28
  98. package/es-modules/Data/Connectors/HTMLTableConnector.js +3 -4
  99. package/es-modules/Data/Connectors/JSONConnector.d.ts +9 -14
  100. package/es-modules/Data/Connectors/JSONConnector.js +3 -4
  101. package/es-modules/Data/Converters/CSVConverter.d.ts +5 -5
  102. package/es-modules/Data/Converters/CSVConverter.js +3 -4
  103. package/es-modules/Data/Converters/CSVConverterOptions.d.ts +2 -2
  104. package/es-modules/Data/Converters/DataConverter.d.ts +76 -78
  105. package/es-modules/Data/Converters/DataConverter.js +26 -53
  106. package/es-modules/Data/Converters/DataConverterUtils.d.ts +88 -81
  107. package/es-modules/Data/Converters/DataConverterUtils.js +169 -181
  108. package/es-modules/Data/Converters/GoogleSheetsConverter.d.ts +4 -4
  109. package/es-modules/Data/Converters/GoogleSheetsConverter.js +3 -3
  110. package/es-modules/Data/Converters/GoogleSheetsConverterOptions.d.ts +2 -2
  111. package/es-modules/Data/Converters/HTMLTableConverter.d.ts +4 -4
  112. package/es-modules/Data/Converters/HTMLTableConverter.js +2 -3
  113. package/es-modules/Data/Converters/HTMLTableConverterOptions.d.ts +2 -2
  114. package/es-modules/Data/Converters/JSONConverter.d.ts +7 -7
  115. package/es-modules/Data/Converters/JSONConverter.js +6 -6
  116. package/es-modules/Data/Converters/JSONConverterOptions.d.ts +2 -2
  117. package/es-modules/Data/DataCursor.d.ts +65 -70
  118. package/es-modules/Data/DataCursor.js +119 -139
  119. package/es-modules/Data/DataEvent.d.ts +55 -57
  120. package/es-modules/Data/DataPool.d.ts +10 -17
  121. package/es-modules/Data/DataPool.js +21 -10
  122. package/es-modules/Data/DataTable.d.ts +111 -113
  123. package/es-modules/Data/DataTable.js +3 -3
  124. package/es-modules/Data/DataTableCore.d.ts +9 -9
  125. package/es-modules/Data/DataTableCore.js +2 -2
  126. package/es-modules/Data/Formula/FormulaParser.js +1 -2
  127. package/es-modules/Data/Formula/FormulaProcessor.js +1 -2
  128. package/es-modules/Data/Modifiers/ChainModifier.d.ts +29 -34
  129. package/es-modules/Data/Modifiers/ChainModifier.js +7 -8
  130. package/es-modules/Data/Modifiers/DataModifier.d.ts +36 -41
  131. package/es-modules/Data/Modifiers/DataModifier.js +31 -53
  132. package/es-modules/Data/Modifiers/FilterModifier.d.ts +4 -4
  133. package/es-modules/Data/Modifiers/FilterModifier.js +3 -4
  134. package/es-modules/Data/Modifiers/FilterModifierOptions.d.ts +3 -2
  135. package/es-modules/Data/Modifiers/InvertModifier.d.ts +4 -4
  136. package/es-modules/Data/Modifiers/InvertModifier.js +3 -4
  137. package/es-modules/Data/Modifiers/MathModifier.d.ts +5 -4
  138. package/es-modules/Data/Modifiers/RangeModifier.d.ts +4 -4
  139. package/es-modules/Data/Modifiers/RangeModifier.js +3 -4
  140. package/es-modules/Data/Modifiers/SortModifier.d.ts +6 -11
  141. package/es-modules/Data/Modifiers/SortModifier.js +3 -4
  142. package/es-modules/Data/Modifiers/SortModifierOptions.d.ts +3 -3
  143. package/es-modules/Grid/Core/Accessibility/Accessibility.d.ts +1 -1
  144. package/es-modules/Grid/Core/Accessibility/Accessibility.js +5 -6
  145. package/es-modules/Grid/Core/Data/DataProvider.d.ts +97 -0
  146. package/es-modules/Grid/Core/Data/DataProvider.js +89 -0
  147. package/es-modules/Grid/Core/Data/DataProviderRegistry.d.ts +20 -0
  148. package/es-modules/Grid/Core/Data/DataProviderRegistry.js +52 -0
  149. package/es-modules/Grid/Core/Data/DataProviderType.d.ts +19 -0
  150. package/es-modules/Grid/Core/Data/DataProviderType.js +15 -0
  151. package/es-modules/Grid/Core/Data/LocalDataProvider.d.ts +165 -0
  152. package/es-modules/Grid/Core/Data/LocalDataProvider.js +341 -0
  153. package/es-modules/Grid/Core/Defaults.js +4 -2
  154. package/es-modules/Grid/Core/Globals.d.ts +20 -16
  155. package/es-modules/Grid/Core/Globals.js +10 -8
  156. package/es-modules/Grid/Core/Grid.d.ts +31 -22
  157. package/es-modules/Grid/Core/Grid.js +217 -139
  158. package/es-modules/Grid/Core/GridUtils.d.ts +33 -0
  159. package/es-modules/Grid/Core/GridUtils.js +50 -3
  160. package/es-modules/Grid/Core/Options.d.ts +145 -4
  161. package/es-modules/Grid/Core/Pagination/Pagination.d.ts +3 -0
  162. package/es-modules/Grid/Core/Pagination/Pagination.js +68 -28
  163. package/es-modules/Grid/Core/Pagination/PaginationOptions.d.ts +4 -0
  164. package/es-modules/Grid/Core/Querying/FilteringController.js +1 -2
  165. package/es-modules/Grid/Core/Querying/PaginationController.d.ts +3 -3
  166. package/es-modules/Grid/Core/Querying/PaginationController.js +7 -6
  167. package/es-modules/Grid/Core/Querying/QueryingController.d.ts +1 -1
  168. package/es-modules/Grid/Core/Querying/QueryingController.js +2 -26
  169. package/es-modules/Grid/Core/Responsive/ResponsiveComposition.d.ts +53 -0
  170. package/es-modules/Grid/Core/Responsive/ResponsiveComposition.js +272 -0
  171. package/es-modules/Grid/Core/Responsive/ResponsiveOptions.d.ts +58 -0
  172. package/es-modules/Grid/Core/Responsive/ResponsiveOptions.js +15 -0
  173. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/ColumnFiltering.js +2 -3
  174. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.d.ts +1 -1
  175. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.js +3 -4
  176. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.d.ts +1 -1
  177. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.js +2 -2
  178. package/es-modules/Grid/Core/Table/Actions/ColumnSorting.d.ts +17 -1
  179. package/es-modules/Grid/Core/Table/Actions/ColumnSorting.js +58 -15
  180. package/es-modules/Grid/Core/Table/Actions/ColumnsResizer.js +1 -3
  181. package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.d.ts +57 -3
  182. package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.js +411 -118
  183. package/es-modules/Grid/Core/Table/Body/CellContextMenu.d.ts +11 -0
  184. package/es-modules/Grid/Core/Table/Body/CellContextMenu.js +84 -0
  185. package/es-modules/Grid/Core/Table/Body/TableCell.d.ts +27 -13
  186. package/es-modules/Grid/Core/Table/Body/TableCell.js +74 -25
  187. package/es-modules/Grid/Core/Table/Body/TableRow.d.ts +7 -15
  188. package/es-modules/Grid/Core/Table/Body/TableRow.js +24 -19
  189. package/es-modules/Grid/Core/Table/Cell.d.ts +16 -3
  190. package/es-modules/Grid/Core/Table/Cell.js +36 -3
  191. package/es-modules/Grid/Core/Table/CellContent/TextContent.js +3 -8
  192. package/es-modules/Grid/Core/Table/Column.d.ts +10 -4
  193. package/es-modules/Grid/Core/Table/Column.js +23 -34
  194. package/es-modules/Grid/Core/Table/ColumnResizing/IndependentResizingMode.js +9 -8
  195. package/es-modules/Grid/Core/Table/ColumnResizing/ResizingMode.js +4 -3
  196. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.d.ts +5 -0
  197. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.js +7 -2
  198. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/FilterPopup.js +1 -2
  199. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/FilterMenuButton.js +1 -2
  200. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/SortMenuButton.js +2 -3
  201. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/FilterToolbarButton.js +1 -2
  202. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/MenuToolbarButton.js +1 -2
  203. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.d.ts +0 -1
  204. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.js +4 -14
  205. package/es-modules/Grid/Core/Table/Header/HeaderCell.d.ts +6 -1
  206. package/es-modules/Grid/Core/Table/Header/HeaderCell.js +33 -13
  207. package/es-modules/Grid/Core/Table/Header/HeaderRow.js +4 -5
  208. package/es-modules/Grid/Core/Table/Header/TableHeader.d.ts +1 -1
  209. package/es-modules/Grid/Core/Table/Header/TableHeader.js +3 -3
  210. package/es-modules/Grid/Core/Table/Row.d.ts +1 -1
  211. package/es-modules/Grid/Core/Table/Row.js +2 -2
  212. package/es-modules/Grid/Core/Table/Table.d.ts +38 -12
  213. package/es-modules/Grid/Core/Table/Table.js +184 -91
  214. package/es-modules/Grid/Core/UI/ContextMenuButton.d.ts +6 -7
  215. package/es-modules/Grid/Core/UI/ContextMenuButton.js +5 -3
  216. package/es-modules/Grid/Core/UI/Popup.js +7 -9
  217. package/es-modules/Grid/Core/UI/SvgIcons.d.ts +42 -7
  218. package/es-modules/Grid/Core/UI/SvgIcons.js +206 -33
  219. package/es-modules/Grid/Core/UI/Toolbar.d.ts +5 -0
  220. package/es-modules/Grid/Core/UI/ToolbarButton.d.ts +4 -12
  221. package/es-modules/Grid/Core/UI/ToolbarButton.js +8 -26
  222. package/es-modules/Grid/Pro/CellEditing/CellEditMode.d.ts +2 -2
  223. package/es-modules/Grid/Pro/CellEditing/CellEditing.js +10 -10
  224. package/es-modules/Grid/Pro/CellEditing/CellEditingComposition.js +1 -2
  225. package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.d.ts +1 -1
  226. package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.js +4 -2
  227. package/es-modules/Grid/Pro/CellRendering/ContentTypes/CheckboxContent.d.ts +2 -2
  228. package/es-modules/Grid/Pro/CellRendering/ContentTypes/NumberInputContent.js +1 -2
  229. package/es-modules/Grid/Pro/CellRendering/ContentTypes/SelectContent.d.ts +2 -2
  230. package/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.js +1 -2
  231. package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.d.ts +2 -2
  232. package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.js +1 -2
  233. package/es-modules/Grid/Pro/CellRendering/Renderers/CheckboxRenderer.js +1 -2
  234. package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRenderer.js +1 -2
  235. package/es-modules/Grid/Pro/CellRendering/Renderers/DateTimeInputRenderer.js +1 -2
  236. package/es-modules/Grid/Pro/CellRendering/Renderers/NumberInputRenderer.js +1 -2
  237. package/es-modules/Grid/Pro/CellRendering/Renderers/SelectRenderer.js +1 -2
  238. package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.d.ts +2 -2
  239. package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.js +1 -2
  240. package/es-modules/Grid/Pro/CellRendering/Renderers/TextInputRenderer.js +1 -2
  241. package/es-modules/Grid/Pro/CellRendering/Renderers/TextRenderer.js +1 -2
  242. package/es-modules/Grid/Pro/CellRendering/Renderers/TimeInputRenderer.js +1 -2
  243. package/es-modules/Grid/Pro/ColumnTypes/Validator.js +34 -32
  244. package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.d.ts +1 -1
  245. package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.js +3 -4
  246. package/es-modules/Grid/Pro/Credits/CreditsProComposition.d.ts +1 -1
  247. package/es-modules/Grid/Pro/Credits/CreditsProComposition.js +1 -3
  248. package/es-modules/Grid/Pro/Data/DataSourceHelper.d.ts +74 -0
  249. package/es-modules/Grid/Pro/Data/DataSourceHelper.js +256 -0
  250. package/es-modules/Grid/Pro/Data/QuerySerializer.d.ts +46 -0
  251. package/es-modules/Grid/Pro/Data/QuerySerializer.js +169 -0
  252. package/es-modules/Grid/Pro/Data/RemoteDataProvider.d.ts +187 -0
  253. package/es-modules/Grid/Pro/Data/RemoteDataProvider.js +500 -0
  254. package/es-modules/Grid/Pro/Export/Exporting.js +1 -2
  255. package/es-modules/Grid/Pro/Export/ExportingComposition.js +1 -2
  256. package/es-modules/Grid/Pro/GridEvents.js +1 -2
  257. package/es-modules/Grid/Pro/Pagination/PaginationComposition.d.ts +0 -1
  258. package/es-modules/Grid/Pro/Pagination/PaginationComposition.js +1 -2
  259. package/es-modules/Shared/BaseForm.js +1 -2
  260. package/es-modules/Shared/DownloadURL.js +1 -2
  261. package/es-modules/Shared/TimeBase.js +3 -3
  262. package/es-modules/Shared/Types.d.ts +7 -0
  263. package/es-modules/Shared/Utilities.d.ts +576 -0
  264. package/es-modules/Shared/Utilities.js +1360 -0
  265. package/es-modules/masters/grid-pro.src.d.ts +15 -11
  266. package/es-modules/masters/grid-pro.src.js +12 -5
  267. package/grid-pro.d.ts +15 -11
  268. package/grid-pro.js +3 -3
  269. package/grid-pro.js.map +1 -1
  270. package/grid-pro.src.d.ts +15 -11
  271. package/grid-pro.src.js +13854 -11395
  272. package/package.json +1 -1
  273. package/es-modules/Grid/Core/Pagination/Icons.d.ts +0 -7
  274. 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 legend = this.chart.legend;
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 U from '../../Core/Utilities.js';
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
- clearTimeout(this.clearAnnouncementRegionTimer);
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 U from '../../Core/Utilities.js';
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?: U.EventOptions): Function;
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 U from '../Utilities.js';
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 U from '../Utilities.js';
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
- const { addEvent, attr, createElement, css, defined, diffObjects, discardElement, erase, error, extend, find, fireEvent, getAlignFactor, getStyle, isArray, isNumber, isObject, isString, merge, objectEach, pick, pInt, relativeLength, removeEvent, splat, syncTimeout, uniqueKey } = U;
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
- U.clearTimeout(chart.reflowTimeout);
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 ((axis.horiz && redoHorizontal) ||
1782
- (!axis.horiz && redoVertical)) {
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) > (run ? 1 : 1.1);
1795
- redoVertical = (tempHeight / chart.plotHeight) > (run ? 1 : 1.05);
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.imgCount && !chart.hasLoaded) {
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<*>} arguments
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(loadingOptions.style, {
2229
- zIndex: 10
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: loadingOptions.style.opacity || 0.5
2246
+ opacity: loadingStyle.opacity ?? 0.5
2240
2247
  }, {
2241
- duration: loadingOptions.showDuration || 0
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.hideDuration || 100,
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(function (coll) {
2445
+ this.collectionsWithUpdate.forEach((coll) => {
2439
2446
  if (options[coll]) {
2440
- splat(options[coll]).forEach(function (newOptions, i) {
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(function (item) {
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(function (item) {
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 U from '../Utilities.js';
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"]
@@ -26,7 +26,6 @@ var ChartNavigationComposition;
26
26
  * Functions
27
27
  *
28
28
  * */
29
- /* eslint-disable valid-jsdoc */
30
29
  /** @internal */
31
30
  function compose(chart) {
32
31
  if (!chart.navigation) {
@@ -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 U from '../Utilities.js';
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 U from '../Utilities.js';
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 U from '../Utilities.js';
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
  *