@mui/x-charts 9.0.3 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/BarChart/BarChart.d.mts +1 -2
  2. package/BarChart/BarChart.d.ts +1 -2
  3. package/BarChart/BarChart.js +2 -913
  4. package/BarChart/BarChart.mjs +2 -913
  5. package/BarChart/FocusedBar.js +3 -0
  6. package/BarChart/FocusedBar.mjs +3 -0
  7. package/BarChart/seriesConfig/bar/seriesProcessor.js +2 -0
  8. package/BarChart/seriesConfig/bar/seriesProcessor.mjs +2 -0
  9. package/CHANGELOG.md +220 -0
  10. package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.d.mts +55 -0
  11. package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.d.ts +55 -0
  12. package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.js +94 -0
  13. package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.mjs +88 -0
  14. package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.d.mts +13 -0
  15. package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.d.ts +13 -0
  16. package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.js +86 -0
  17. package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.mjs +80 -0
  18. package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.d.mts +18 -0
  19. package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.d.ts +18 -0
  20. package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.js +26 -0
  21. package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.mjs +16 -0
  22. package/ChartsAxisHighlightValue/index.d.mts +1 -0
  23. package/ChartsAxisHighlightValue/index.d.ts +1 -0
  24. package/ChartsAxisHighlightValue/index.js +16 -0
  25. package/ChartsAxisHighlightValue/index.mjs +1 -0
  26. package/ChartsAxisHighlightValue/useAxisHighlightValue.d.mts +14 -0
  27. package/ChartsAxisHighlightValue/useAxisHighlightValue.d.ts +14 -0
  28. package/ChartsAxisHighlightValue/useAxisHighlightValue.js +130 -0
  29. package/ChartsAxisHighlightValue/useAxisHighlightValue.mjs +124 -0
  30. package/ChartsContainer/ChartsContainer.js +4 -1431
  31. package/ChartsContainer/ChartsContainer.mjs +4 -1431
  32. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.d.mts +15 -0
  33. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.d.ts +15 -0
  34. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.js +56 -0
  35. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.mjs +50 -0
  36. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.d.mts +6 -0
  37. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.d.ts +6 -0
  38. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.js +5 -0
  39. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.types.mjs +1 -0
  40. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlightPath.d.mts +11 -0
  41. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlightPath.d.ts +11 -0
  42. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlightPath.js +70 -0
  43. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlightPath.mjs +64 -0
  44. package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.d.mts +9 -0
  45. package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.d.ts +9 -0
  46. package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.js +87 -0
  47. package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.mjs +81 -0
  48. package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.d.mts +9 -0
  49. package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.d.ts +9 -0
  50. package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.js +98 -0
  51. package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.mjs +92 -0
  52. package/ChartsRadialAxisHighlight/chartsRadialAxisHighlightClasses.d.mts +7 -0
  53. package/ChartsRadialAxisHighlight/chartsRadialAxisHighlightClasses.d.ts +7 -0
  54. package/ChartsRadialAxisHighlight/chartsRadialAxisHighlightClasses.js +14 -0
  55. package/ChartsRadialAxisHighlight/chartsRadialAxisHighlightClasses.mjs +6 -0
  56. package/ChartsRadialAxisHighlight/index.d.mts +5 -0
  57. package/ChartsRadialAxisHighlight/index.d.ts +5 -0
  58. package/ChartsRadialAxisHighlight/index.js +47 -0
  59. package/ChartsRadialAxisHighlight/index.mjs +4 -0
  60. package/ChartsRadiusAxis/index.d.mts +3 -2
  61. package/ChartsRadiusAxis/index.d.ts +3 -2
  62. package/ChartsRadiusAxis/index.mjs +3 -1
  63. package/ChartsRotationAxis/index.d.mts +3 -2
  64. package/ChartsRotationAxis/index.d.ts +3 -2
  65. package/ChartsRotationAxis/index.mjs +3 -1
  66. package/ChartsTooltip/useAxesTooltip.js +11 -3
  67. package/ChartsTooltip/useAxesTooltip.mjs +11 -3
  68. package/ChartsXAxis/useAxisTicksProps.d.mts +162 -81
  69. package/ChartsXAxis/useAxisTicksProps.d.ts +162 -81
  70. package/ChartsYAxis/useAxisTicksProps.d.mts +162 -81
  71. package/ChartsYAxis/useAxisTicksProps.d.ts +162 -81
  72. package/LICENSE +2 -0
  73. package/LineChart/FocusedLineMark.js +3 -0
  74. package/LineChart/FocusedLineMark.mjs +3 -0
  75. package/LineChart/LineChart.js +2 -913
  76. package/LineChart/LineChart.mjs +2 -913
  77. package/LineChart/seriesConfig/curveEvaluation.d.mts +19 -1
  78. package/LineChart/seriesConfig/curveEvaluation.d.ts +19 -1
  79. package/LineChart/seriesConfig/curveEvaluation.js +132 -0
  80. package/LineChart/seriesConfig/curveEvaluation.mjs +131 -0
  81. package/LineChart/seriesConfig/getItemAtPosition.js +12 -35
  82. package/LineChart/seriesConfig/getItemAtPosition.mjs +10 -33
  83. package/LineChart/seriesConfig/getSeriesWithDefaultValues.js +2 -1
  84. package/LineChart/seriesConfig/getSeriesWithDefaultValues.mjs +2 -1
  85. package/LineChart/seriesConfig/seriesProcessor.js +4 -0
  86. package/LineChart/seriesConfig/seriesProcessor.mjs +4 -0
  87. package/LineChart/useAreaPlotData.js +4 -0
  88. package/LineChart/useAreaPlotData.mjs +4 -0
  89. package/LineChart/useLinePlotData.js +2 -0
  90. package/LineChart/useLinePlotData.mjs +2 -0
  91. package/LineChart/useMarkPlotData.js +2 -0
  92. package/LineChart/useMarkPlotData.mjs +2 -0
  93. package/PieChart/FocusedPieArc.js +3 -0
  94. package/PieChart/FocusedPieArc.mjs +3 -0
  95. package/RadarChart/FocusedRadarMark.js +3 -0
  96. package/RadarChart/FocusedRadarMark.mjs +3 -0
  97. package/ScatterChart/FocusedScatterMark.js +10 -21
  98. package/ScatterChart/FocusedScatterMark.mjs +10 -21
  99. package/ScatterChart/HighlightedScatterMark.d.mts +11 -0
  100. package/ScatterChart/HighlightedScatterMark.d.ts +11 -0
  101. package/ScatterChart/HighlightedScatterMark.js +68 -0
  102. package/ScatterChart/HighlightedScatterMark.mjs +62 -0
  103. package/ScatterChart/ScatterChart.d.mts +1 -2
  104. package/ScatterChart/ScatterChart.d.ts +1 -2
  105. package/ScatterChart/ScatterChart.js +2 -913
  106. package/ScatterChart/ScatterChart.mjs +2 -913
  107. package/ScatterChart/index.d.mts +1 -0
  108. package/ScatterChart/index.d.ts +1 -0
  109. package/ScatterChart/index.js +12 -0
  110. package/ScatterChart/index.mjs +1 -0
  111. package/ScatterChart/scatterClasses.d.mts +3 -1
  112. package/ScatterChart/scatterClasses.d.ts +3 -1
  113. package/ScatterChart/scatterClasses.js +3 -2
  114. package/ScatterChart/scatterClasses.mjs +3 -2
  115. package/ScatterChart/useScatterChartProps.js +3 -1
  116. package/ScatterChart/useScatterChartProps.mjs +3 -1
  117. package/ScatterChart/useScatterItemPosition.d.mts +16 -0
  118. package/ScatterChart/useScatterItemPosition.d.ts +16 -0
  119. package/ScatterChart/useScatterItemPosition.js +47 -0
  120. package/ScatterChart/useScatterItemPosition.mjs +41 -0
  121. package/SparkLineChart/SparkLineChart.js +2 -913
  122. package/SparkLineChart/SparkLineChart.mjs +2 -913
  123. package/hooks/useAxis.d.mts +3 -3
  124. package/hooks/useAxis.d.ts +3 -3
  125. package/hooks/useAxisSystem.d.mts +1 -1
  126. package/hooks/useAxisSystem.d.ts +1 -1
  127. package/hooks/useAxisSystem.js +1 -1
  128. package/hooks/useAxisSystem.mjs +1 -1
  129. package/index.d.mts +2 -0
  130. package/index.d.ts +2 -0
  131. package/index.js +25 -1
  132. package/index.mjs +3 -1
  133. package/internals/commonNextFocusItem.js +62 -8
  134. package/internals/commonNextFocusItem.mjs +62 -8
  135. package/internals/findClosestIndex.d.mts +5 -0
  136. package/internals/findClosestIndex.d.ts +5 -0
  137. package/internals/findClosestIndex.js +27 -0
  138. package/internals/findClosestIndex.mjs +22 -0
  139. package/internals/getAsNumber.d.mts +1 -0
  140. package/internals/getAsNumber.d.ts +1 -0
  141. package/internals/getAsNumber.js +9 -0
  142. package/internals/getAsNumber.mjs +3 -0
  143. package/internals/index.d.mts +6 -0
  144. package/internals/index.d.ts +6 -0
  145. package/internals/index.js +60 -0
  146. package/internals/index.mjs +6 -0
  147. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +4 -2
  148. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.mjs +4 -2
  149. package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.mts +2 -2
  150. package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.ts +2 -2
  151. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +4 -21
  152. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.mjs +4 -21
  153. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +3 -2
  154. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +3 -2
  155. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/findVisibleDataIndex.d.mts +30 -0
  156. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/findVisibleDataIndex.d.ts +30 -0
  157. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/findVisibleDataIndex.js +57 -0
  158. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/findVisibleDataIndex.mjs +51 -0
  159. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getMaxSeriesLength.js +7 -1
  160. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getMaxSeriesLength.mjs +7 -1
  161. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getNonEmptySeriesArray.js +7 -1
  162. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getNonEmptySeriesArray.mjs +7 -1
  163. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.mts +4 -7
  164. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +4 -7
  165. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +2 -1
  166. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.mjs +2 -1
  167. package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.d.mts +3 -2
  168. package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.d.ts +3 -2
  169. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.mts +2 -2
  170. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +2 -2
  171. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.d.mts +2 -2
  172. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.d.ts +2 -2
  173. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.js +27 -6
  174. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.mjs +27 -5
  175. package/internals/plugins/featurePlugins/useChartPolarAxis/index.d.mts +2 -1
  176. package/internals/plugins/featurePlugins/useChartPolarAxis/index.d.ts +2 -1
  177. package/internals/plugins/featurePlugins/useChartPolarAxis/index.js +12 -0
  178. package/internals/plugins/featurePlugins/useChartPolarAxis/index.mjs +2 -1
  179. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.mts +4 -4
  180. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +4 -4
  181. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.mts +3 -3
  182. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.ts +3 -3
  183. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.mts +1 -1
  184. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +1 -1
  185. package/models/axis.d.mts +28 -28
  186. package/models/axis.d.ts +28 -28
  187. package/models/axis.js +5 -1
  188. package/models/axis.mjs +5 -1
  189. package/models/seriesType/line.d.mts +6 -6
  190. package/models/seriesType/line.d.ts +6 -6
  191. package/package.json +170 -142
@@ -1,4 +1,4 @@
1
- import { type AxisId, type ChartsRadiusAxisProps, type ChartsRotationAxisProps, type PolarAxisDefaultized, type ScaleName, type AxisScaleConfig, type ChartsXAxisProps, type ChartsYAxisProps, type ComputedAxis } from "../models/axis.mjs";
1
+ import { type AxisId, type ChartsRadiusAxisProps, type ChartsRotationAxisProps, type ScaleName, type AxisScaleConfig, type ChartsXAxisProps, type ChartsYAxisProps, type ComputedAxis } from "../models/axis.mjs";
2
2
  /**
3
3
  * Get all the x-axes.
4
4
  *
@@ -128,7 +128,7 @@ export declare function useRadiusAxes(): {
128
128
  * // Get a specific rotation axis by string ID
129
129
  * const rotationAxis = useRotationAxis('categories');
130
130
  */
131
- export declare function useRotationAxis(axisId?: AxisId): PolarAxisDefaultized<ScaleName, any, ChartsRotationAxisProps> | undefined;
131
+ export declare function useRotationAxis(axisId?: AxisId): ComputedAxis<ScaleName, any, ChartsRotationAxisProps> | undefined;
132
132
  /**
133
133
  * Get a specific radius axis or the default radius axis for polar charts.
134
134
  *
@@ -148,4 +148,4 @@ export declare function useRotationAxis(axisId?: AxisId): PolarAxisDefaultized<S
148
148
  * // Get a specific radius axis by string ID
149
149
  * const radiusAxis = useRadiusAxis('magnitude');
150
150
  */
151
- export declare function useRadiusAxis(axisId?: AxisId): PolarAxisDefaultized<ScaleName, any, ChartsRadiusAxisProps> | undefined;
151
+ export declare function useRadiusAxis(axisId?: AxisId): ComputedAxis<ScaleName, any, ChartsRadiusAxisProps> | undefined;
@@ -1,4 +1,4 @@
1
- import { type AxisId, type ChartsRadiusAxisProps, type ChartsRotationAxisProps, type PolarAxisDefaultized, type ScaleName, type AxisScaleConfig, type ChartsXAxisProps, type ChartsYAxisProps, type ComputedAxis } from "../models/axis.js";
1
+ import { type AxisId, type ChartsRadiusAxisProps, type ChartsRotationAxisProps, type ScaleName, type AxisScaleConfig, type ChartsXAxisProps, type ChartsYAxisProps, type ComputedAxis } from "../models/axis.js";
2
2
  /**
3
3
  * Get all the x-axes.
4
4
  *
@@ -128,7 +128,7 @@ export declare function useRadiusAxes(): {
128
128
  * // Get a specific rotation axis by string ID
129
129
  * const rotationAxis = useRotationAxis('categories');
130
130
  */
131
- export declare function useRotationAxis(axisId?: AxisId): PolarAxisDefaultized<ScaleName, any, ChartsRotationAxisProps> | undefined;
131
+ export declare function useRotationAxis(axisId?: AxisId): ComputedAxis<ScaleName, any, ChartsRotationAxisProps> | undefined;
132
132
  /**
133
133
  * Get a specific radius axis or the default radius axis for polar charts.
134
134
  *
@@ -148,4 +148,4 @@ export declare function useRotationAxis(axisId?: AxisId): PolarAxisDefaultized<S
148
148
  * // Get a specific radius axis by string ID
149
149
  * const radiusAxis = useRadiusAxis('magnitude');
150
150
  */
151
- export declare function useRadiusAxis(axisId?: AxisId): PolarAxisDefaultized<ScaleName, any, ChartsRadiusAxisProps> | undefined;
151
+ export declare function useRadiusAxis(axisId?: AxisId): ComputedAxis<ScaleName, any, ChartsRadiusAxisProps> | undefined;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @internals
2
+ * @internal
3
3
  *
4
4
  * Get the coordinate system implemented.
5
5
  * The hook assumes polar and cartesian are never implemented at the same time.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @internals
2
+ * @internal
3
3
  *
4
4
  * Get the coordinate system implemented.
5
5
  * The hook assumes polar and cartesian are never implemented at the same time.
@@ -9,7 +9,7 @@ var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useCha
9
9
  var _useChartPolarAxis = require("../internals/plugins/featurePlugins/useChartPolarAxis");
10
10
  var _useStore = require("../internals/store/useStore");
11
11
  /**
12
- * @internals
12
+ * @internal
13
13
  *
14
14
  * Get the coordinate system implemented.
15
15
  * The hook assumes polar and cartesian are never implemented at the same time.
@@ -5,7 +5,7 @@ import { selectorChartRawRotationAxis } from "../internals/plugins/featurePlugin
5
5
  import { useStore } from "../internals/store/useStore.mjs";
6
6
 
7
7
  /**
8
- * @internals
8
+ * @internal
9
9
  *
10
10
  * Get the coordinate system implemented.
11
11
  * The hook assumes polar and cartesian are never implemented at the same time.
package/index.d.mts CHANGED
@@ -7,6 +7,7 @@ export * from "./models/index.mjs";
7
7
  export * from "./ChartsClipPath/index.mjs";
8
8
  export * from "./ChartsReferenceLine/index.mjs";
9
9
  export * from "./ChartsAxis/index.mjs";
10
+ export * from "./ChartsAxisHighlightValue/index.mjs";
10
11
  export * from "./ChartsXAxis/index.mjs";
11
12
  export * from "./ChartsYAxis/index.mjs";
12
13
  export * from "./ChartsGrid/index.mjs";
@@ -29,6 +30,7 @@ export type { ChartsContainerProps, ChartsContainerSlots, ChartsContainerSlotPro
29
30
  export * from "./ChartsDataProvider/index.mjs";
30
31
  export * from "./ChartsRadialDataProvider/index.mjs";
31
32
  export * from "./ChartsRadialGrid/index.mjs";
33
+ export * from "./ChartsRadialAxisHighlight/index.mjs";
32
34
  export * from "./ChartsRadiusAxis/index.mjs";
33
35
  export { type ChartsRotationAxisProps, Unstable_ChartsRotationAxis } from "./ChartsRotationAxis/index.mjs";
34
36
  export * from "./Toolbar/index.mjs";
package/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export * from "./models/index.js";
7
7
  export * from "./ChartsClipPath/index.js";
8
8
  export * from "./ChartsReferenceLine/index.js";
9
9
  export * from "./ChartsAxis/index.js";
10
+ export * from "./ChartsAxisHighlightValue/index.js";
10
11
  export * from "./ChartsXAxis/index.js";
11
12
  export * from "./ChartsYAxis/index.js";
12
13
  export * from "./ChartsGrid/index.js";
@@ -29,6 +30,7 @@ export type { ChartsContainerProps, ChartsContainerSlots, ChartsContainerSlotPro
29
30
  export * from "./ChartsDataProvider/index.js";
30
31
  export * from "./ChartsRadialDataProvider/index.js";
31
32
  export * from "./ChartsRadialGrid/index.js";
33
+ export * from "./ChartsRadialAxisHighlight/index.js";
32
34
  export * from "./ChartsRadiusAxis/index.js";
33
35
  export { type ChartsRotationAxisProps, Unstable_ChartsRotationAxis } from "./ChartsRotationAxis/index.js";
34
36
  export * from "./Toolbar/index.js";
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts v9.0.3
2
+ * @mui/x-charts v9.1.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -134,6 +134,18 @@ Object.keys(_ChartsAxis).forEach(function (key) {
134
134
  }
135
135
  });
136
136
  });
137
+ var _ChartsAxisHighlightValue = require("./ChartsAxisHighlightValue");
138
+ Object.keys(_ChartsAxisHighlightValue).forEach(function (key) {
139
+ if (key === "default" || key === "__esModule") return;
140
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
141
+ if (key in exports && exports[key] === _ChartsAxisHighlightValue[key]) return;
142
+ Object.defineProperty(exports, key, {
143
+ enumerable: true,
144
+ get: function () {
145
+ return _ChartsAxisHighlightValue[key];
146
+ }
147
+ });
148
+ });
137
149
  var _ChartsXAxis = require("./ChartsXAxis");
138
150
  Object.keys(_ChartsXAxis).forEach(function (key) {
139
151
  if (key === "default" || key === "__esModule") return;
@@ -375,6 +387,18 @@ Object.keys(_ChartsRadialGrid).forEach(function (key) {
375
387
  }
376
388
  });
377
389
  });
390
+ var _ChartsRadialAxisHighlight = require("./ChartsRadialAxisHighlight");
391
+ Object.keys(_ChartsRadialAxisHighlight).forEach(function (key) {
392
+ if (key === "default" || key === "__esModule") return;
393
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
394
+ if (key in exports && exports[key] === _ChartsRadialAxisHighlight[key]) return;
395
+ Object.defineProperty(exports, key, {
396
+ enumerable: true,
397
+ get: function () {
398
+ return _ChartsRadialAxisHighlight[key];
399
+ }
400
+ });
401
+ });
378
402
  var _ChartsRadiusAxis = require("./ChartsRadiusAxis");
379
403
  Object.keys(_ChartsRadiusAxis).forEach(function (key) {
380
404
  if (key === "default" || key === "__esModule") return;
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts v9.0.3
2
+ * @mui/x-charts v9.1.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -14,6 +14,7 @@ export * from "./models/index.mjs";
14
14
  export * from "./ChartsClipPath/index.mjs";
15
15
  export * from "./ChartsReferenceLine/index.mjs";
16
16
  export * from "./ChartsAxis/index.mjs";
17
+ export * from "./ChartsAxisHighlightValue/index.mjs";
17
18
  export * from "./ChartsXAxis/index.mjs";
18
19
  export * from "./ChartsYAxis/index.mjs";
19
20
  export * from "./ChartsGrid/index.mjs";
@@ -35,6 +36,7 @@ export { ChartsContainer } from "./ChartsContainer/index.mjs";
35
36
  export * from "./ChartsDataProvider/index.mjs";
36
37
  export * from "./ChartsRadialDataProvider/index.mjs";
37
38
  export * from "./ChartsRadialGrid/index.mjs";
39
+ export * from "./ChartsRadialAxisHighlight/index.mjs";
38
40
  export * from "./ChartsRadiusAxis/index.mjs";
39
41
  export { Unstable_ChartsRotationAxis } from "./ChartsRotationAxis/index.mjs";
40
42
  export * from "./Toolbar/index.mjs";
@@ -10,8 +10,13 @@ exports.createGetPreviousSeriesFocusedItem = createGetPreviousSeriesFocusedItem;
10
10
  var _getPreviousNonEmptySeries = require("./plugins/featurePlugins/useChartKeyboardNavigation/utils/getPreviousNonEmptySeries");
11
11
  var _getMaxSeriesLength = require("./plugins/featurePlugins/useChartKeyboardNavigation/utils/getMaxSeriesLength");
12
12
  var _getNextNonEmptySeries = require("./plugins/featurePlugins/useChartKeyboardNavigation/utils/getNextNonEmptySeries");
13
+ var _findVisibleDataIndex = require("./plugins/featurePlugins/useChartKeyboardNavigation/utils/findVisibleDataIndex");
13
14
  var _seriesHasData = require("./seriesHasData");
14
15
  var _useChartSeries = require("./plugins/corePlugins/useChartSeries/useChartSeries.selectors");
16
+ function isSeriesHidden(processedSeries, type, seriesId) {
17
+ const seriesItem = processedSeries[type]?.series[seriesId];
18
+ return Boolean(seriesItem && 'hidden' in seriesItem && seriesItem.hidden);
19
+ }
15
20
  function createGetNextIndexFocusedItem(
16
21
  /**
17
22
  * The set of series types compatible with this navigation action.
@@ -25,7 +30,7 @@ allowCycles = false) {
25
30
  const processedSeries = (0, _useChartSeries.selectorChartSeriesProcessed)(state);
26
31
  let seriesId = currentItem?.seriesId;
27
32
  let type = currentItem?.type;
28
- if (!type || seriesId == null || !(0, _seriesHasData.seriesHasData)(processedSeries, type, seriesId)) {
33
+ if (!type || seriesId == null || !(0, _seriesHasData.seriesHasData)(processedSeries, type, seriesId) || isSeriesHidden(processedSeries, type, seriesId)) {
29
34
  const nextSeries = (0, _getNextNonEmptySeries.getNextNonEmptySeries)(processedSeries, compatibleSeriesTypes, type, seriesId);
30
35
  if (nextSeries === null) {
31
36
  return null;
@@ -40,10 +45,22 @@ allowCycles = false) {
40
45
  } else {
41
46
  dataIndex = Math.min(maxLength - 1, dataIndex);
42
47
  }
48
+ const visibleDataIndex = (0, _findVisibleDataIndex.findVisibleDataIndex)({
49
+ processedSeries,
50
+ type,
51
+ seriesId,
52
+ startIndex: dataIndex,
53
+ dataLength: maxLength,
54
+ direction: 1,
55
+ allowCycles
56
+ });
57
+ if (visibleDataIndex === null) {
58
+ return null;
59
+ }
43
60
  return {
44
61
  type: type,
45
62
  seriesId,
46
- dataIndex
63
+ dataIndex: visibleDataIndex
47
64
  };
48
65
  };
49
66
  }
@@ -60,7 +77,7 @@ allowCycles = false) {
60
77
  const processedSeries = (0, _useChartSeries.selectorChartSeriesProcessed)(state);
61
78
  let seriesId = currentItem?.seriesId;
62
79
  let type = currentItem?.type;
63
- if (!type || seriesId == null || !(0, _seriesHasData.seriesHasData)(processedSeries, type, seriesId)) {
80
+ if (!type || seriesId == null || !(0, _seriesHasData.seriesHasData)(processedSeries, type, seriesId) || isSeriesHidden(processedSeries, type, seriesId)) {
64
81
  const previousSeries = (0, _getPreviousNonEmptySeries.getPreviousNonEmptySeries)(processedSeries, compatibleSeriesTypes, type, seriesId);
65
82
  if (previousSeries === null) {
66
83
  return null;
@@ -75,10 +92,22 @@ allowCycles = false) {
75
92
  } else {
76
93
  dataIndex = Math.max(0, dataIndex);
77
94
  }
95
+ const visibleDataIndex = (0, _findVisibleDataIndex.findVisibleDataIndex)({
96
+ processedSeries,
97
+ type,
98
+ seriesId,
99
+ startIndex: dataIndex,
100
+ dataLength: maxLength,
101
+ direction: -1,
102
+ allowCycles
103
+ });
104
+ if (visibleDataIndex === null) {
105
+ return null;
106
+ }
78
107
  return {
79
108
  type: type,
80
109
  seriesId,
81
- dataIndex
110
+ dataIndex: visibleDataIndex
82
111
  };
83
112
  };
84
113
  }
@@ -97,11 +126,24 @@ compatibleSeriesTypes) {
97
126
  }
98
127
  type = nextSeries.type;
99
128
  seriesId = nextSeries.seriesId;
100
- const dataIndex = currentItem?.dataIndex == null ? 0 : currentItem.dataIndex;
129
+ const data = processedSeries[type].series[seriesId].data;
130
+ const startIndex = currentItem?.dataIndex == null ? 0 : Math.min(currentItem.dataIndex, data.length - 1);
131
+ const visibleDataIndex = (0, _findVisibleDataIndex.findVisibleDataIndex)({
132
+ processedSeries,
133
+ type,
134
+ seriesId,
135
+ startIndex,
136
+ dataLength: data.length,
137
+ direction: 1,
138
+ allowCycles: true
139
+ });
140
+ if (visibleDataIndex === null) {
141
+ return null;
142
+ }
101
143
  return {
102
144
  type: type,
103
145
  seriesId,
104
- dataIndex
146
+ dataIndex: visibleDataIndex
105
147
  };
106
148
  };
107
149
  }
@@ -121,11 +163,23 @@ compatibleSeriesTypes) {
121
163
  type = previousSeries.type;
122
164
  seriesId = previousSeries.seriesId;
123
165
  const data = processedSeries[type].series[seriesId].data;
124
- const dataIndex = currentItem?.dataIndex == null ? data.length - 1 : currentItem.dataIndex;
166
+ const startIndex = currentItem?.dataIndex == null ? data.length - 1 : Math.min(currentItem.dataIndex, data.length - 1);
167
+ const visibleDataIndex = (0, _findVisibleDataIndex.findVisibleDataIndex)({
168
+ processedSeries,
169
+ type,
170
+ seriesId,
171
+ startIndex,
172
+ dataLength: data.length,
173
+ direction: -1,
174
+ allowCycles: true
175
+ });
176
+ if (visibleDataIndex === null) {
177
+ return null;
178
+ }
125
179
  return {
126
180
  type: type,
127
181
  seriesId,
128
- dataIndex
182
+ dataIndex: visibleDataIndex
129
183
  };
130
184
  };
131
185
  }
@@ -1,8 +1,13 @@
1
1
  import { getPreviousNonEmptySeries } from "./plugins/featurePlugins/useChartKeyboardNavigation/utils/getPreviousNonEmptySeries.mjs";
2
2
  import { getMaxSeriesLength } from "./plugins/featurePlugins/useChartKeyboardNavigation/utils/getMaxSeriesLength.mjs";
3
3
  import { getNextNonEmptySeries } from "./plugins/featurePlugins/useChartKeyboardNavigation/utils/getNextNonEmptySeries.mjs";
4
+ import { findVisibleDataIndex } from "./plugins/featurePlugins/useChartKeyboardNavigation/utils/findVisibleDataIndex.mjs";
4
5
  import { seriesHasData } from "./seriesHasData.mjs";
5
6
  import { selectorChartSeriesProcessed } from "./plugins/corePlugins/useChartSeries/useChartSeries.selectors.mjs";
7
+ function isSeriesHidden(processedSeries, type, seriesId) {
8
+ const seriesItem = processedSeries[type]?.series[seriesId];
9
+ return Boolean(seriesItem && 'hidden' in seriesItem && seriesItem.hidden);
10
+ }
6
11
  export function createGetNextIndexFocusedItem(
7
12
  /**
8
13
  * The set of series types compatible with this navigation action.
@@ -16,7 +21,7 @@ allowCycles = false) {
16
21
  const processedSeries = selectorChartSeriesProcessed(state);
17
22
  let seriesId = currentItem?.seriesId;
18
23
  let type = currentItem?.type;
19
- if (!type || seriesId == null || !seriesHasData(processedSeries, type, seriesId)) {
24
+ if (!type || seriesId == null || !seriesHasData(processedSeries, type, seriesId) || isSeriesHidden(processedSeries, type, seriesId)) {
20
25
  const nextSeries = getNextNonEmptySeries(processedSeries, compatibleSeriesTypes, type, seriesId);
21
26
  if (nextSeries === null) {
22
27
  return null;
@@ -31,10 +36,22 @@ allowCycles = false) {
31
36
  } else {
32
37
  dataIndex = Math.min(maxLength - 1, dataIndex);
33
38
  }
39
+ const visibleDataIndex = findVisibleDataIndex({
40
+ processedSeries,
41
+ type,
42
+ seriesId,
43
+ startIndex: dataIndex,
44
+ dataLength: maxLength,
45
+ direction: 1,
46
+ allowCycles
47
+ });
48
+ if (visibleDataIndex === null) {
49
+ return null;
50
+ }
34
51
  return {
35
52
  type: type,
36
53
  seriesId,
37
- dataIndex
54
+ dataIndex: visibleDataIndex
38
55
  };
39
56
  };
40
57
  }
@@ -51,7 +68,7 @@ allowCycles = false) {
51
68
  const processedSeries = selectorChartSeriesProcessed(state);
52
69
  let seriesId = currentItem?.seriesId;
53
70
  let type = currentItem?.type;
54
- if (!type || seriesId == null || !seriesHasData(processedSeries, type, seriesId)) {
71
+ if (!type || seriesId == null || !seriesHasData(processedSeries, type, seriesId) || isSeriesHidden(processedSeries, type, seriesId)) {
55
72
  const previousSeries = getPreviousNonEmptySeries(processedSeries, compatibleSeriesTypes, type, seriesId);
56
73
  if (previousSeries === null) {
57
74
  return null;
@@ -66,10 +83,22 @@ allowCycles = false) {
66
83
  } else {
67
84
  dataIndex = Math.max(0, dataIndex);
68
85
  }
86
+ const visibleDataIndex = findVisibleDataIndex({
87
+ processedSeries,
88
+ type,
89
+ seriesId,
90
+ startIndex: dataIndex,
91
+ dataLength: maxLength,
92
+ direction: -1,
93
+ allowCycles
94
+ });
95
+ if (visibleDataIndex === null) {
96
+ return null;
97
+ }
69
98
  return {
70
99
  type: type,
71
100
  seriesId,
72
- dataIndex
101
+ dataIndex: visibleDataIndex
73
102
  };
74
103
  };
75
104
  }
@@ -88,11 +117,24 @@ compatibleSeriesTypes) {
88
117
  }
89
118
  type = nextSeries.type;
90
119
  seriesId = nextSeries.seriesId;
91
- const dataIndex = currentItem?.dataIndex == null ? 0 : currentItem.dataIndex;
120
+ const data = processedSeries[type].series[seriesId].data;
121
+ const startIndex = currentItem?.dataIndex == null ? 0 : Math.min(currentItem.dataIndex, data.length - 1);
122
+ const visibleDataIndex = findVisibleDataIndex({
123
+ processedSeries,
124
+ type,
125
+ seriesId,
126
+ startIndex,
127
+ dataLength: data.length,
128
+ direction: 1,
129
+ allowCycles: true
130
+ });
131
+ if (visibleDataIndex === null) {
132
+ return null;
133
+ }
92
134
  return {
93
135
  type: type,
94
136
  seriesId,
95
- dataIndex
137
+ dataIndex: visibleDataIndex
96
138
  };
97
139
  };
98
140
  }
@@ -112,11 +154,23 @@ compatibleSeriesTypes) {
112
154
  type = previousSeries.type;
113
155
  seriesId = previousSeries.seriesId;
114
156
  const data = processedSeries[type].series[seriesId].data;
115
- const dataIndex = currentItem?.dataIndex == null ? data.length - 1 : currentItem.dataIndex;
157
+ const startIndex = currentItem?.dataIndex == null ? data.length - 1 : Math.min(currentItem.dataIndex, data.length - 1);
158
+ const visibleDataIndex = findVisibleDataIndex({
159
+ processedSeries,
160
+ type,
161
+ seriesId,
162
+ startIndex,
163
+ dataLength: data.length,
164
+ direction: -1,
165
+ allowCycles: true
166
+ });
167
+ if (visibleDataIndex === null) {
168
+ return null;
169
+ }
116
170
  return {
117
171
  type: type,
118
172
  seriesId,
119
- dataIndex
173
+ dataIndex: visibleDataIndex
120
174
  };
121
175
  };
122
176
  }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Returns the index of the entry in `axisData` whose numeric value is closest
3
+ * to `valueAsNumber`. Returns -1 if `axisData` is empty.
4
+ */
5
+ export declare function findClosestIndex(axisData: readonly any[], valueAsNumber: number): number;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Returns the index of the entry in `axisData` whose numeric value is closest
3
+ * to `valueAsNumber`. Returns -1 if `axisData` is empty.
4
+ */
5
+ export declare function findClosestIndex(axisData: readonly any[], valueAsNumber: number): number;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.findClosestIndex = findClosestIndex;
7
+ var _getAsNumber = require("./getAsNumber");
8
+ /**
9
+ * Returns the index of the entry in `axisData` whose numeric value is closest
10
+ * to `valueAsNumber`. Returns -1 if `axisData` is empty.
11
+ */
12
+ function findClosestIndex(axisData, valueAsNumber) {
13
+ return axisData.findIndex((pointValue, index) => {
14
+ const v = (0, _getAsNumber.getAsNumber)(pointValue);
15
+ if (v > valueAsNumber) {
16
+ if (index === 0 || Math.abs(valueAsNumber - v) <= Math.abs(valueAsNumber - (0, _getAsNumber.getAsNumber)(axisData[index - 1]))) {
17
+ return true;
18
+ }
19
+ }
20
+ if (v <= valueAsNumber) {
21
+ if (index === axisData.length - 1 || Math.abs(valueAsNumber - v) < Math.abs(valueAsNumber - (0, _getAsNumber.getAsNumber)(axisData[index + 1]))) {
22
+ return true;
23
+ }
24
+ }
25
+ return false;
26
+ });
27
+ }
@@ -0,0 +1,22 @@
1
+ import { getAsNumber } from "./getAsNumber.mjs";
2
+
3
+ /**
4
+ * Returns the index of the entry in `axisData` whose numeric value is closest
5
+ * to `valueAsNumber`. Returns -1 if `axisData` is empty.
6
+ */
7
+ export function findClosestIndex(axisData, valueAsNumber) {
8
+ return axisData.findIndex((pointValue, index) => {
9
+ const v = getAsNumber(pointValue);
10
+ if (v > valueAsNumber) {
11
+ if (index === 0 || Math.abs(valueAsNumber - v) <= Math.abs(valueAsNumber - getAsNumber(axisData[index - 1]))) {
12
+ return true;
13
+ }
14
+ }
15
+ if (v <= valueAsNumber) {
16
+ if (index === axisData.length - 1 || Math.abs(valueAsNumber - v) < Math.abs(valueAsNumber - getAsNumber(axisData[index + 1]))) {
17
+ return true;
18
+ }
19
+ }
20
+ return false;
21
+ });
22
+ }
@@ -0,0 +1 @@
1
+ export declare function getAsNumber(value: number | Date): number;
@@ -0,0 +1 @@
1
+ export declare function getAsNumber(value: number | Date): number;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getAsNumber = getAsNumber;
7
+ function getAsNumber(value) {
8
+ return value instanceof Date ? value.getTime() : value;
9
+ }
@@ -0,0 +1,3 @@
1
+ export function getAsNumber(value) {
2
+ return value instanceof Date ? value.getTime() : value;
3
+ }
@@ -40,6 +40,7 @@ export * from "./plugins/featurePlugins/useChartItemClick/index.mjs";
40
40
  export * from "./plugins/utils/selectors.mjs";
41
41
  export { getAxisTriggerTooltip as getCartesianAxisTriggerTooltip } from "./plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.mjs";
42
42
  export { getAxisIndex as getCartesianAxisIndex } from "./plugins/featurePlugins/useChartCartesianAxis/getAxisValue.mjs";
43
+ export { getAxisIndex as getPolarAxisIndex } from "./plugins/featurePlugins/useChartPolarAxis/getAxisIndex.mjs";
43
44
  export * from "./store/useCharts.mjs";
44
45
  export * from "./store/useStore.mjs";
45
46
  export * from "../BarChart/BarChart.plugins.mjs";
@@ -48,13 +49,16 @@ export * from "../ScatterChart/ScatterChart.plugins.mjs";
48
49
  export * from "../RadarChart/RadarChart.plugins.mjs";
49
50
  export * from "../PieChart/PieChart.plugins.mjs";
50
51
  export * from "./configInit.mjs";
52
+ export * from "./clampAngle.mjs";
51
53
  export * from "./getLabel.mjs";
52
54
  export * from "./legendUtils.mjs";
53
55
  export * from "./getChartPoint.mjs";
54
56
  export * from "./isDefined.mjs";
55
57
  export * from "./getScale.mjs";
58
+ export * from "./getAsNumber.mjs";
56
59
  export * from "./stacking/index.mjs";
57
60
  export * from "./getCurve.mjs";
61
+ export * from "./getSymbol.mjs";
58
62
  export * from "./consumeSlots.mjs";
59
63
  export * from "./consumeThemeProps.mjs";
60
64
  export * from "./defaultizeMargin.mjs";
@@ -70,6 +74,7 @@ export { getSeriesColorFn } from "./getSeriesColorFn.mjs";
70
74
  export { checkBarChartScaleErrors } from "../BarChart/checkBarChartScaleErrors.mjs";
71
75
  export { getBandSize } from "./getBandSize.mjs";
72
76
  export * from "./plugins/utils/defaultSeriesConfig.mjs";
77
+ export { EPSILON } from "../utils/epsilon.mjs";
73
78
  export { useUtilityClasses as useChartsTooltipUtilityClasses, getChartsTooltipUtilityClass } from "../ChartsTooltip/chartsTooltipClasses.mjs";
74
79
  export { getAxisExtrema } from "./plugins/featurePlugins/useChartCartesianAxis/getAxisExtrema.mjs";
75
80
  export * from "../context/ChartsProvider/index.mjs";
@@ -88,4 +93,5 @@ export * from "./constants.mjs";
88
93
  export * from "./scales/index.mjs";
89
94
  export * from "./identifierSerializer.mjs";
90
95
  export * from "./identifierCleaner.mjs";
96
+ export { evaluateCurveAtAngle } from "../LineChart/seriesConfig/curveEvaluation.mjs";
91
97
  export { default as getLineItemAtPosition } from "../LineChart/seriesConfig/getItemAtPosition.mjs";
@@ -40,6 +40,7 @@ export * from "./plugins/featurePlugins/useChartItemClick/index.js";
40
40
  export * from "./plugins/utils/selectors.js";
41
41
  export { getAxisTriggerTooltip as getCartesianAxisTriggerTooltip } from "./plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.js";
42
42
  export { getAxisIndex as getCartesianAxisIndex } from "./plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js";
43
+ export { getAxisIndex as getPolarAxisIndex } from "./plugins/featurePlugins/useChartPolarAxis/getAxisIndex.js";
43
44
  export * from "./store/useCharts.js";
44
45
  export * from "./store/useStore.js";
45
46
  export * from "../BarChart/BarChart.plugins.js";
@@ -48,13 +49,16 @@ export * from "../ScatterChart/ScatterChart.plugins.js";
48
49
  export * from "../RadarChart/RadarChart.plugins.js";
49
50
  export * from "../PieChart/PieChart.plugins.js";
50
51
  export * from "./configInit.js";
52
+ export * from "./clampAngle.js";
51
53
  export * from "./getLabel.js";
52
54
  export * from "./legendUtils.js";
53
55
  export * from "./getChartPoint.js";
54
56
  export * from "./isDefined.js";
55
57
  export * from "./getScale.js";
58
+ export * from "./getAsNumber.js";
56
59
  export * from "./stacking/index.js";
57
60
  export * from "./getCurve.js";
61
+ export * from "./getSymbol.js";
58
62
  export * from "./consumeSlots.js";
59
63
  export * from "./consumeThemeProps.js";
60
64
  export * from "./defaultizeMargin.js";
@@ -70,6 +74,7 @@ export { getSeriesColorFn } from "./getSeriesColorFn.js";
70
74
  export { checkBarChartScaleErrors } from "../BarChart/checkBarChartScaleErrors.js";
71
75
  export { getBandSize } from "./getBandSize.js";
72
76
  export * from "./plugins/utils/defaultSeriesConfig.js";
77
+ export { EPSILON } from "../utils/epsilon.js";
73
78
  export { useUtilityClasses as useChartsTooltipUtilityClasses, getChartsTooltipUtilityClass } from "../ChartsTooltip/chartsTooltipClasses.js";
74
79
  export { getAxisExtrema } from "./plugins/featurePlugins/useChartCartesianAxis/getAxisExtrema.js";
75
80
  export * from "../context/ChartsProvider/index.js";
@@ -88,4 +93,5 @@ export * from "./constants.js";
88
93
  export * from "./scales/index.js";
89
94
  export * from "./identifierSerializer.js";
90
95
  export * from "./identifierCleaner.js";
96
+ export { evaluateCurveAtAngle } from "../LineChart/seriesConfig/curveEvaluation.js";
91
97
  export { default as getLineItemAtPosition } from "../LineChart/seriesConfig/getItemAtPosition.js";