@mui/x-charts 9.2.0 → 9.4.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 (228) hide show
  1. package/BarChart/BarChart.js +10 -10
  2. package/BarChart/BarChart.mjs +10 -10
  3. package/BarChart/BarElement.d.mts +3 -2
  4. package/BarChart/BarElement.d.ts +3 -2
  5. package/BarChart/BarLabel/BarLabelItem.d.mts +3 -2
  6. package/BarChart/BarLabel/BarLabelItem.d.ts +3 -2
  7. package/BarChart/seriesConfig/bar/extremums.js +7 -2
  8. package/BarChart/seriesConfig/bar/extremums.mjs +7 -2
  9. package/BarChart/seriesConfig/bar/getColor.js +7 -53
  10. package/BarChart/seriesConfig/bar/getColor.mjs +7 -53
  11. package/BarChart/seriesConfig/bar/seriesProcessor.js +3 -1
  12. package/BarChart/seriesConfig/bar/seriesProcessor.mjs +3 -1
  13. package/BarChart/seriesConfig/bar/tooltip.js +4 -27
  14. package/BarChart/seriesConfig/bar/tooltip.mjs +4 -27
  15. package/CHANGELOG.md +314 -0
  16. package/ChartsContainer/ChartsContainer.js +30 -9
  17. package/ChartsContainer/ChartsContainer.mjs +30 -9
  18. package/ChartsLabel/ChartsLabelMark.js +1 -23
  19. package/ChartsLabel/ChartsLabelMark.mjs +0 -22
  20. package/ChartsLabel/labelMarkClasses.d.mts +0 -1
  21. package/ChartsLabel/labelMarkClasses.d.ts +0 -1
  22. package/ChartsLabel/labelMarkClasses.js +1 -2
  23. package/ChartsLabel/labelMarkClasses.mjs +2 -2
  24. package/ChartsLayerContainer/ChartsLayerContainer.js +36 -30
  25. package/ChartsLayerContainer/ChartsLayerContainer.mjs +36 -30
  26. package/ChartsLegend/chartsLegend.types.d.mts +3 -2
  27. package/ChartsLegend/chartsLegend.types.d.ts +3 -2
  28. package/ChartsLegend/piecewiseColorLegendClasses.js +8 -2
  29. package/ChartsLegend/piecewiseColorLegendClasses.mjs +8 -2
  30. package/ChartsOverlay/ChartsOverlay.d.mts +5 -4
  31. package/ChartsOverlay/ChartsOverlay.d.ts +5 -4
  32. package/ChartsReferenceLine/ChartsXReferenceLine.js +6 -1
  33. package/ChartsReferenceLine/ChartsXReferenceLine.mjs +6 -1
  34. package/ChartsReferenceLine/ChartsYReferenceLine.js +5 -0
  35. package/ChartsReferenceLine/ChartsYReferenceLine.mjs +5 -0
  36. package/ChartsTooltip/ChartTooltip.types.d.mts +3 -2
  37. package/ChartsTooltip/ChartTooltip.types.d.ts +3 -2
  38. package/ChartsTooltip/useAxesTooltip.js +2 -2
  39. package/ChartsTooltip/useAxesTooltip.mjs +2 -2
  40. package/ChartsTooltip/useItemTooltip.js +2 -2
  41. package/ChartsTooltip/useItemTooltip.mjs +2 -2
  42. package/ChartsXAxis/ChartsXAxis.js +3 -1
  43. package/ChartsXAxis/ChartsXAxis.mjs +3 -1
  44. package/ChartsXAxis/useAxisTicksProps.d.mts +84 -3
  45. package/ChartsXAxis/useAxisTicksProps.d.ts +84 -3
  46. package/ChartsYAxis/ChartsYAxis.js +3 -1
  47. package/ChartsYAxis/ChartsYAxis.mjs +3 -1
  48. package/ChartsYAxis/useAxisTicksProps.d.mts +84 -3
  49. package/ChartsYAxis/useAxisTicksProps.d.ts +84 -3
  50. package/LineChart/AreaElement.d.mts +3 -2
  51. package/LineChart/AreaElement.d.ts +3 -2
  52. package/LineChart/LineChart.js +6 -6
  53. package/LineChart/LineChart.mjs +6 -6
  54. package/LineChart/LineElement.d.mts +3 -2
  55. package/LineChart/LineElement.d.ts +3 -2
  56. package/LineChart/LineHighlightPlot.d.mts +3 -2
  57. package/LineChart/LineHighlightPlot.d.ts +3 -2
  58. package/LineChart/LineHighlightPlot.js +65 -45
  59. package/LineChart/LineHighlightPlot.mjs +65 -45
  60. package/LineChart/MarkPlot.d.mts +3 -2
  61. package/LineChart/MarkPlot.d.ts +3 -2
  62. package/LineChart/seriesConfig/curveEvaluation.js +40 -15
  63. package/LineChart/seriesConfig/curveEvaluation.mjs +39 -15
  64. package/LineChart/seriesConfig/extremums.js +5 -1
  65. package/LineChart/seriesConfig/extremums.mjs +5 -1
  66. package/LineChart/seriesConfig/getColor.js +7 -54
  67. package/LineChart/seriesConfig/getColor.mjs +7 -54
  68. package/LineChart/seriesConfig/seriesProcessor.d.mts +2 -4
  69. package/LineChart/seriesConfig/seriesProcessor.d.ts +2 -4
  70. package/LineChart/seriesConfig/seriesProcessor.js +2 -139
  71. package/LineChart/seriesConfig/seriesProcessor.mjs +2 -138
  72. package/LineChart/seriesConfig/tooltip.js +4 -25
  73. package/LineChart/seriesConfig/tooltip.mjs +4 -25
  74. package/LineChart/useMarkPlotData.js +3 -1
  75. package/LineChart/useMarkPlotData.mjs +3 -1
  76. package/PieChart/PieArcLabelPlot.d.mts +3 -2
  77. package/PieChart/PieArcLabelPlot.d.ts +3 -2
  78. package/PieChart/PieArcPlot.d.mts +3 -2
  79. package/PieChart/PieArcPlot.d.ts +3 -2
  80. package/PieChart/PieChart.js +6 -6
  81. package/PieChart/PieChart.mjs +6 -6
  82. package/RadarChart/RadarAxis/RadarAxis.utils.d.mts +2 -2
  83. package/RadarChart/RadarAxis/RadarAxis.utils.d.ts +2 -2
  84. package/RadarChart/RadarAxis/useRadarAxis.js +1 -1
  85. package/RadarChart/RadarAxis/useRadarAxis.mjs +1 -1
  86. package/RadarChart/RadarChart.js +8 -8
  87. package/RadarChart/RadarChart.mjs +8 -8
  88. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +3 -1
  89. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.mjs +3 -1
  90. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +1 -0
  91. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.mjs +1 -0
  92. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +1 -0
  93. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.mjs +1 -0
  94. package/ScatterChart/BatchScatter.d.mts +2 -8
  95. package/ScatterChart/BatchScatter.d.ts +2 -8
  96. package/ScatterChart/BatchScatter.js +17 -12
  97. package/ScatterChart/BatchScatter.mjs +17 -12
  98. package/ScatterChart/FocusedScatterMark.js +2 -2
  99. package/ScatterChart/FocusedScatterMark.mjs +2 -2
  100. package/ScatterChart/HighlightedScatterMark.js +3 -3
  101. package/ScatterChart/HighlightedScatterMark.mjs +3 -3
  102. package/ScatterChart/Scatter.d.mts +5 -0
  103. package/ScatterChart/Scatter.d.ts +5 -0
  104. package/ScatterChart/Scatter.js +7 -2
  105. package/ScatterChart/Scatter.mjs +7 -2
  106. package/ScatterChart/ScatterChart.d.mts +2 -1
  107. package/ScatterChart/ScatterChart.d.ts +2 -1
  108. package/ScatterChart/ScatterChart.js +32 -11
  109. package/ScatterChart/ScatterChart.mjs +32 -11
  110. package/ScatterChart/ScatterMarker.types.d.mts +3 -2
  111. package/ScatterChart/ScatterMarker.types.d.ts +3 -2
  112. package/ScatterChart/ScatterPlot.d.mts +3 -2
  113. package/ScatterChart/ScatterPlot.d.ts +3 -2
  114. package/ScatterChart/ScatterPlot.js +6 -1
  115. package/ScatterChart/ScatterPlot.mjs +6 -1
  116. package/ScatterChart/seriesConfig/extremums.js +6 -0
  117. package/ScatterChart/seriesConfig/extremums.mjs +6 -0
  118. package/ScatterChart/seriesConfig/getColor.js +1 -1
  119. package/ScatterChart/seriesConfig/getColor.mjs +1 -1
  120. package/ScatterChart/seriesConfig/getMarkerSize.d.mts +18 -0
  121. package/ScatterChart/seriesConfig/getMarkerSize.d.ts +18 -0
  122. package/ScatterChart/seriesConfig/getMarkerSize.js +43 -0
  123. package/ScatterChart/seriesConfig/getMarkerSize.mjs +37 -0
  124. package/ScatterChart/seriesConfig/seriesProcessor.js +23 -8
  125. package/ScatterChart/seriesConfig/seriesProcessor.mjs +23 -8
  126. package/ScatterChart/seriesConfig/tooltip.js +2 -24
  127. package/ScatterChart/seriesConfig/tooltip.mjs +2 -24
  128. package/ScatterChart/useScatterItemPosition.d.mts +4 -0
  129. package/ScatterChart/useScatterItemPosition.d.ts +4 -0
  130. package/ScatterChart/useScatterItemPosition.js +9 -0
  131. package/ScatterChart/useScatterItemPosition.mjs +8 -0
  132. package/SparkLineChart/SparkLineChart.js +27 -27
  133. package/SparkLineChart/SparkLineChart.mjs +27 -27
  134. package/Toolbar/Toolbar.types.d.mts +3 -2
  135. package/Toolbar/Toolbar.types.d.ts +3 -2
  136. package/index.js +1 -1
  137. package/index.mjs +1 -1
  138. package/internals/animation/animation.d.mts +1 -2
  139. package/internals/animation/animation.d.ts +1 -2
  140. package/internals/commonNextFocusItem.d.mts +10 -2
  141. package/internals/commonNextFocusItem.d.ts +10 -2
  142. package/internals/commonNextFocusItem.js +12 -4
  143. package/internals/commonNextFocusItem.mjs +12 -4
  144. package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.js +1 -1
  145. package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.mjs +1 -1
  146. package/internals/createCommonKeyboardFocusHandler.d.mts +1 -1
  147. package/internals/createCommonKeyboardFocusHandler.d.ts +1 -1
  148. package/internals/createCommonKeyboardFocusHandler.js +3 -3
  149. package/internals/createCommonKeyboardFocusHandler.mjs +3 -3
  150. package/internals/getLineLikeTooltip.d.mts +9 -0
  151. package/internals/getLineLikeTooltip.d.ts +9 -0
  152. package/internals/getLineLikeTooltip.js +38 -0
  153. package/internals/getLineLikeTooltip.mjs +31 -0
  154. package/internals/incompleteDatasetKeysError.d.mts +1 -0
  155. package/internals/incompleteDatasetKeysError.d.ts +1 -0
  156. package/internals/incompleteDatasetKeysError.js +11 -0
  157. package/internals/incompleteDatasetKeysError.mjs +4 -0
  158. package/internals/index.d.mts +5 -0
  159. package/internals/index.d.ts +5 -0
  160. package/internals/index.js +48 -0
  161. package/internals/index.mjs +5 -0
  162. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.mts +4 -2
  163. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.ts +4 -2
  164. package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.js +3 -2
  165. package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.mjs +4 -3
  166. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +2 -2
  167. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.mjs +3 -3
  168. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.mts +10 -1
  169. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +10 -1
  170. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +18 -1
  171. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.mjs +16 -0
  172. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +11 -3
  173. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +11 -3
  174. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +24 -5
  175. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.mjs +24 -5
  176. package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.mts +1 -1
  177. package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.ts +1 -1
  178. package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +46 -2
  179. package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.mjs +47 -2
  180. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +46 -11
  181. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.mjs +46 -11
  182. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.mts +2 -1
  183. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.ts +2 -1
  184. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +6 -2
  185. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.mjs +6 -2
  186. package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.mts +4 -0
  187. package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.ts +4 -0
  188. package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.js +3 -1
  189. package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.mjs +1 -0
  190. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +5 -3
  191. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.mjs +7 -5
  192. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js +17 -3
  193. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.mjs +17 -3
  194. package/internals/processLineLikeSeries.d.mts +6 -0
  195. package/internals/processLineLikeSeries.d.ts +6 -0
  196. package/internals/processLineLikeSeries.js +145 -0
  197. package/internals/processLineLikeSeries.mjs +138 -0
  198. package/internals/resolveColorProcessor.d.mts +11 -0
  199. package/internals/resolveColorProcessor.d.ts +11 -0
  200. package/internals/resolveColorProcessor.js +62 -0
  201. package/internals/resolveColorProcessor.mjs +56 -0
  202. package/internals/sizeScale.d.mts +6 -0
  203. package/internals/sizeScale.d.ts +6 -0
  204. package/internals/sizeScale.js +46 -0
  205. package/internals/sizeScale.mjs +38 -0
  206. package/models/axis.d.mts +18 -12
  207. package/models/axis.d.ts +18 -12
  208. package/models/chartsSlotsComponentsProps.d.mts +25 -0
  209. package/models/chartsSlotsComponentsProps.d.ts +25 -0
  210. package/models/chartsSlotsComponentsProps.js +5 -0
  211. package/models/chartsSlotsComponentsProps.mjs +1 -0
  212. package/models/index.d.mts +1 -0
  213. package/models/index.d.ts +1 -0
  214. package/models/index.js +11 -0
  215. package/models/index.mjs +1 -0
  216. package/models/seriesType/line.d.mts +5 -2
  217. package/models/seriesType/line.d.ts +5 -2
  218. package/models/seriesType/scatter.d.mts +34 -2
  219. package/models/seriesType/scatter.d.ts +34 -2
  220. package/models/sizeMapping.d.mts +64 -0
  221. package/models/sizeMapping.d.ts +64 -0
  222. package/models/sizeMapping.js +5 -0
  223. package/models/sizeMapping.mjs +1 -0
  224. package/models/slots/chartsBaseSlots.d.mts +6 -5
  225. package/models/slots/chartsBaseSlots.d.ts +6 -5
  226. package/models/z-axis.d.mts +10 -1
  227. package/models/z-axis.d.ts +10 -1
  228. package/package.json +6 -6
@@ -88,7 +88,7 @@ export function ChartsAccessibilityProxy() {
88
88
  }
89
89
  }, [message, chartId]);
90
90
  return /*#__PURE__*/_jsx("div", {
91
- role: "presentation",
91
+ role: "none",
92
92
  tabIndex: message ? undefined : 0,
93
93
  ref: containerRef,
94
94
  style: fullSizeLayerStyle
@@ -2,7 +2,7 @@ import type { ChartSeriesType } from "../models/seriesType/config.mjs";
2
2
  /**
3
3
  * Create a keyboard focus handler for common use cases where focused item are defined by the series is and data index.
4
4
  */
5
- export declare function createCommonKeyboardFocusHandler<SeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, TInputSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = SeriesType>(outSeriesTypes: Set<SeriesType>, allowCycles?: boolean): (event: KeyboardEvent) => ((currentItem: import("../index.mjs").FocusedItemIdentifier<TInputSeriesType> | null, state: {
5
+ export declare function createCommonKeyboardFocusHandler<SeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, TInputSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = SeriesType>(outSeriesTypes: Set<SeriesType>, allowCycles?: boolean, useCurrentSeriesMaxLength?: boolean): (event: KeyboardEvent) => ((currentItem: import("../index.mjs").FocusedItemIdentifier<TInputSeriesType> | null, state: {
6
6
  series: {
7
7
  defaultizedSeries: import("./plugins/corePlugins/useChartSeries/useChartSeries.types.mjs").DefaultizedSeriesGroups<TInputSeriesType>;
8
8
  idToType: import("./index.mjs").SeriesIdToType;
@@ -2,7 +2,7 @@ import type { ChartSeriesType } from "../models/seriesType/config.js";
2
2
  /**
3
3
  * Create a keyboard focus handler for common use cases where focused item are defined by the series is and data index.
4
4
  */
5
- export declare function createCommonKeyboardFocusHandler<SeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, TInputSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = SeriesType>(outSeriesTypes: Set<SeriesType>, allowCycles?: boolean): (event: KeyboardEvent) => ((currentItem: import("../index.js").FocusedItemIdentifier<TInputSeriesType> | null, state: {
5
+ export declare function createCommonKeyboardFocusHandler<SeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, TInputSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = SeriesType>(outSeriesTypes: Set<SeriesType>, allowCycles?: boolean, useCurrentSeriesMaxLength?: boolean): (event: KeyboardEvent) => ((currentItem: import("../index.js").FocusedItemIdentifier<TInputSeriesType> | null, state: {
6
6
  series: {
7
7
  defaultizedSeries: import("./plugins/corePlugins/useChartSeries/useChartSeries.types.js").DefaultizedSeriesGroups<TInputSeriesType>;
8
8
  idToType: import("./index.js").SeriesIdToType;
@@ -8,13 +8,13 @@ var _commonNextFocusItem = require("./commonNextFocusItem");
8
8
  /**
9
9
  * Create a keyboard focus handler for common use cases where focused item are defined by the series is and data index.
10
10
  */
11
- function createCommonKeyboardFocusHandler(outSeriesTypes, allowCycles) {
11
+ function createCommonKeyboardFocusHandler(outSeriesTypes, allowCycles, useCurrentSeriesMaxLength) {
12
12
  const keyboardFocusHandler = event => {
13
13
  switch (event.key) {
14
14
  case 'ArrowRight':
15
- return (0, _commonNextFocusItem.createGetNextIndexFocusedItem)(outSeriesTypes, allowCycles);
15
+ return (0, _commonNextFocusItem.createGetNextIndexFocusedItem)(outSeriesTypes, allowCycles, useCurrentSeriesMaxLength);
16
16
  case 'ArrowLeft':
17
- return (0, _commonNextFocusItem.createGetPreviousIndexFocusedItem)(outSeriesTypes, allowCycles);
17
+ return (0, _commonNextFocusItem.createGetPreviousIndexFocusedItem)(outSeriesTypes, allowCycles, useCurrentSeriesMaxLength);
18
18
  case 'ArrowDown':
19
19
  return (0, _commonNextFocusItem.createGetPreviousSeriesFocusedItem)(outSeriesTypes);
20
20
  case 'ArrowUp':
@@ -3,13 +3,13 @@ import { createGetNextIndexFocusedItem, createGetPreviousIndexFocusedItem, creat
3
3
  /**
4
4
  * Create a keyboard focus handler for common use cases where focused item are defined by the series is and data index.
5
5
  */
6
- export function createCommonKeyboardFocusHandler(outSeriesTypes, allowCycles) {
6
+ export function createCommonKeyboardFocusHandler(outSeriesTypes, allowCycles, useCurrentSeriesMaxLength) {
7
7
  const keyboardFocusHandler = event => {
8
8
  switch (event.key) {
9
9
  case 'ArrowRight':
10
- return createGetNextIndexFocusedItem(outSeriesTypes, allowCycles);
10
+ return createGetNextIndexFocusedItem(outSeriesTypes, allowCycles, useCurrentSeriesMaxLength);
11
11
  case 'ArrowLeft':
12
- return createGetPreviousIndexFocusedItem(outSeriesTypes, allowCycles);
12
+ return createGetPreviousIndexFocusedItem(outSeriesTypes, allowCycles, useCurrentSeriesMaxLength);
13
13
  case 'ArrowDown':
14
14
  return createGetPreviousSeriesFocusedItem(outSeriesTypes);
15
15
  case 'ArrowUp':
@@ -0,0 +1,9 @@
1
+ import type { ChartSeriesType } from "../models/seriesType/config.mjs";
2
+ import type { TooltipGetterParams, TooltipGetterResult } from "./plugins/corePlugins/useChartSeriesConfig/index.mjs";
3
+ type LineLikeTooltipChartType = Extract<ChartSeriesType, 'line' | 'radialLine' | 'bar' | 'radialBar' | 'scatter'>;
4
+ export interface LineLikeTooltipOptions {
5
+ skipNullValues?: boolean;
6
+ includeMarkShape?: boolean;
7
+ }
8
+ export declare function getLineLikeTooltip<SeriesType extends LineLikeTooltipChartType>(params: TooltipGetterParams<SeriesType>, options?: LineLikeTooltipOptions): TooltipGetterResult<SeriesType>;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { ChartSeriesType } from "../models/seriesType/config.js";
2
+ import type { TooltipGetterParams, TooltipGetterResult } from "./plugins/corePlugins/useChartSeriesConfig/index.js";
3
+ type LineLikeTooltipChartType = Extract<ChartSeriesType, 'line' | 'radialLine' | 'bar' | 'radialBar' | 'scatter'>;
4
+ export interface LineLikeTooltipOptions {
5
+ skipNullValues?: boolean;
6
+ includeMarkShape?: boolean;
7
+ }
8
+ export declare function getLineLikeTooltip<SeriesType extends LineLikeTooltipChartType>(params: TooltipGetterParams<SeriesType>, options?: LineLikeTooltipOptions): TooltipGetterResult<SeriesType>;
9
+ export {};
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.getLineLikeTooltip = getLineLikeTooltip;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _getLabel = require("./getLabel");
10
+ function getLineLikeTooltip(params, options = {}) {
11
+ const {
12
+ series,
13
+ getColor,
14
+ identifier
15
+ } = params;
16
+ if (!identifier || identifier.dataIndex === undefined) {
17
+ return null;
18
+ }
19
+ const label = (0, _getLabel.getLabel)(series.label, 'tooltip');
20
+ const value = series.data[identifier.dataIndex];
21
+ if (options.skipNullValues && value == null) {
22
+ return null;
23
+ }
24
+ const formattedValue = series.valueFormatter(value, {
25
+ dataIndex: identifier.dataIndex
26
+ });
27
+ const result = (0, _extends2.default)({
28
+ identifier,
29
+ color: getColor(identifier.dataIndex),
30
+ label,
31
+ value,
32
+ formattedValue,
33
+ markType: series.labelMarkType
34
+ }, options.includeMarkShape && 'showMark' in series && {
35
+ markShape: series.showMark ? series.shape : undefined
36
+ });
37
+ return result;
38
+ }
@@ -0,0 +1,31 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import { getLabel } from "./getLabel.mjs";
3
+ export function getLineLikeTooltip(params, options = {}) {
4
+ const {
5
+ series,
6
+ getColor,
7
+ identifier
8
+ } = params;
9
+ if (!identifier || identifier.dataIndex === undefined) {
10
+ return null;
11
+ }
12
+ const label = getLabel(series.label, 'tooltip');
13
+ const value = series.data[identifier.dataIndex];
14
+ if (options.skipNullValues && value == null) {
15
+ return null;
16
+ }
17
+ const formattedValue = series.valueFormatter(value, {
18
+ dataIndex: identifier.dataIndex
19
+ });
20
+ const result = _extends({
21
+ identifier,
22
+ color: getColor(identifier.dataIndex),
23
+ label,
24
+ value,
25
+ formattedValue,
26
+ markType: series.labelMarkType
27
+ }, options.includeMarkShape && 'showMark' in series && {
28
+ markShape: series.showMark ? series.shape : undefined
29
+ });
30
+ return result;
31
+ }
@@ -0,0 +1 @@
1
+ export declare function incompleteDatasetKeysError(seriesType: string, seriesId: string, missingKeys: string[]): void;
@@ -0,0 +1 @@
1
+ export declare function incompleteDatasetKeysError(seriesType: string, seriesId: string, missingKeys: string[]): void;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.incompleteDatasetKeysError = incompleteDatasetKeysError;
8
+ var _formatErrorMessage2 = _interopRequireDefault(require("@mui/x-internals/formatErrorMessage"));
9
+ function incompleteDatasetKeysError(seriesType, seriesId, missingKeys) {
10
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI X Charts: ${seriesType} series with id="${seriesId}" has incomplete datasetKeys.` + `Properties ${missingKeys.map(key => `"${key}"`).join(', ')} are missing.` : (0, _formatErrorMessage2.default)(279, seriesType, seriesId, missingKeys.map(key => `"${key}"`).join(', ')));
11
+ }
@@ -0,0 +1,4 @@
1
+ import _formatErrorMessage from "@mui/x-internals/formatErrorMessage";
2
+ export function incompleteDatasetKeysError(seriesType, seriesId, missingKeys) {
3
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI X Charts: ${seriesType} series with id="${seriesId}" has incomplete datasetKeys.` + `Properties ${missingKeys.map(key => `"${key}"`).join(', ')} are missing.` : _formatErrorMessage(279, seriesType, seriesId, missingKeys.map(key => `"${key}"`).join(', ')));
4
+ }
@@ -65,6 +65,8 @@ export * from "./consumeSlots.mjs";
65
65
  export * from "./consumeThemeProps.mjs";
66
66
  export * from "./defaultizeMargin.mjs";
67
67
  export * from "./colorScale.mjs";
68
+ export * from "./sizeScale.mjs";
69
+ export * from "./incompleteDatasetKeysError.mjs";
68
70
  export * from "./ticks.mjs";
69
71
  export * from "./dateHelpers.mjs";
70
72
  export * from "./invertScale.mjs";
@@ -73,6 +75,9 @@ export * from "./findMinMax.mjs";
73
75
  export * from "./commonNextFocusItem.mjs";
74
76
  export { createCommonKeyboardFocusHandler } from "./createCommonKeyboardFocusHandler.mjs";
75
77
  export { getSeriesColorFn } from "./getSeriesColorFn.mjs";
78
+ export { resolveColorProcessor } from "./resolveColorProcessor.mjs";
79
+ export { processLineLikeSeries } from "./processLineLikeSeries.mjs";
80
+ export { getLineLikeTooltip } from "./getLineLikeTooltip.mjs";
76
81
  export { checkBarChartScaleErrors } from "../BarChart/checkBarChartScaleErrors.mjs";
77
82
  export { getBandSize } from "./getBandSize.mjs";
78
83
  export * from "./plugins/utils/defaultSeriesConfig.mjs";
@@ -65,6 +65,8 @@ export * from "./consumeSlots.js";
65
65
  export * from "./consumeThemeProps.js";
66
66
  export * from "./defaultizeMargin.js";
67
67
  export * from "./colorScale.js";
68
+ export * from "./sizeScale.js";
69
+ export * from "./incompleteDatasetKeysError.js";
68
70
  export * from "./ticks.js";
69
71
  export * from "./dateHelpers.js";
70
72
  export * from "./invertScale.js";
@@ -73,6 +75,9 @@ export * from "./findMinMax.js";
73
75
  export * from "./commonNextFocusItem.js";
74
76
  export { createCommonKeyboardFocusHandler } from "./createCommonKeyboardFocusHandler.js";
75
77
  export { getSeriesColorFn } from "./getSeriesColorFn.js";
78
+ export { resolveColorProcessor } from "./resolveColorProcessor.js";
79
+ export { processLineLikeSeries } from "./processLineLikeSeries.js";
80
+ export { getLineLikeTooltip } from "./getLineLikeTooltip.js";
76
81
  export { checkBarChartScaleErrors } from "../BarChart/checkBarChartScaleErrors.js";
77
82
  export { getBandSize } from "./getBandSize.js";
78
83
  export * from "./plugins/utils/defaultSeriesConfig.js";
@@ -24,6 +24,9 @@ var _exportNames = {
24
24
  getRotationAxisIndex: true,
25
25
  createCommonKeyboardFocusHandler: true,
26
26
  getSeriesColorFn: true,
27
+ resolveColorProcessor: true,
28
+ processLineLikeSeries: true,
29
+ getLineLikeTooltip: true,
27
30
  checkBarChartScaleErrors: true,
28
31
  getBandSize: true,
29
32
  EPSILON: true,
@@ -93,6 +96,12 @@ Object.defineProperty(exports, "getLineItemAtPosition", {
93
96
  return _getItemAtPosition.default;
94
97
  }
95
98
  });
99
+ Object.defineProperty(exports, "getLineLikeTooltip", {
100
+ enumerable: true,
101
+ get: function () {
102
+ return _getLineLikeTooltip.getLineLikeTooltip;
103
+ }
104
+ });
96
105
  Object.defineProperty(exports, "getRotationAxisIndex", {
97
106
  enumerable: true,
98
107
  get: function () {
@@ -111,6 +120,18 @@ Object.defineProperty(exports, "processBarDataForPlot", {
111
120
  return _useBarPlotData.processBarDataForPlot;
112
121
  }
113
122
  });
123
+ Object.defineProperty(exports, "processLineLikeSeries", {
124
+ enumerable: true,
125
+ get: function () {
126
+ return _processLineLikeSeries.processLineLikeSeries;
127
+ }
128
+ });
129
+ Object.defineProperty(exports, "resolveColorProcessor", {
130
+ enumerable: true,
131
+ get: function () {
132
+ return _resolveColorProcessor.resolveColorProcessor;
133
+ }
134
+ });
114
135
  Object.defineProperty(exports, "scatterSeriesConfig", {
115
136
  enumerable: true,
116
137
  get: function () {
@@ -811,6 +832,30 @@ Object.keys(_colorScale).forEach(function (key) {
811
832
  }
812
833
  });
813
834
  });
835
+ var _sizeScale = require("./sizeScale");
836
+ Object.keys(_sizeScale).forEach(function (key) {
837
+ if (key === "default" || key === "__esModule") return;
838
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
839
+ if (key in exports && exports[key] === _sizeScale[key]) return;
840
+ Object.defineProperty(exports, key, {
841
+ enumerable: true,
842
+ get: function () {
843
+ return _sizeScale[key];
844
+ }
845
+ });
846
+ });
847
+ var _incompleteDatasetKeysError = require("./incompleteDatasetKeysError");
848
+ Object.keys(_incompleteDatasetKeysError).forEach(function (key) {
849
+ if (key === "default" || key === "__esModule") return;
850
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
851
+ if (key in exports && exports[key] === _incompleteDatasetKeysError[key]) return;
852
+ Object.defineProperty(exports, key, {
853
+ enumerable: true,
854
+ get: function () {
855
+ return _incompleteDatasetKeysError[key];
856
+ }
857
+ });
858
+ });
814
859
  var _ticks = require("./ticks");
815
860
  Object.keys(_ticks).forEach(function (key) {
816
861
  if (key === "default" || key === "__esModule") return;
@@ -885,6 +930,9 @@ Object.keys(_commonNextFocusItem).forEach(function (key) {
885
930
  });
886
931
  var _createCommonKeyboardFocusHandler = require("./createCommonKeyboardFocusHandler");
887
932
  var _getSeriesColorFn = require("./getSeriesColorFn");
933
+ var _resolveColorProcessor = require("./resolveColorProcessor");
934
+ var _processLineLikeSeries = require("./processLineLikeSeries");
935
+ var _getLineLikeTooltip = require("./getLineLikeTooltip");
888
936
  var _checkBarChartScaleErrors = require("../BarChart/checkBarChartScaleErrors");
889
937
  var _getBandSize = require("./getBandSize");
890
938
  var _defaultSeriesConfig = require("./plugins/utils/defaultSeriesConfig");
@@ -73,6 +73,8 @@ export * from "./consumeSlots.mjs";
73
73
  export * from "./consumeThemeProps.mjs";
74
74
  export * from "./defaultizeMargin.mjs";
75
75
  export * from "./colorScale.mjs";
76
+ export * from "./sizeScale.mjs";
77
+ export * from "./incompleteDatasetKeysError.mjs";
76
78
  export * from "./ticks.mjs";
77
79
  export * from "./dateHelpers.mjs";
78
80
  export * from "./invertScale.mjs";
@@ -81,6 +83,9 @@ export * from "./findMinMax.mjs";
81
83
  export * from "./commonNextFocusItem.mjs";
82
84
  export { createCommonKeyboardFocusHandler } from "./createCommonKeyboardFocusHandler.mjs";
83
85
  export { getSeriesColorFn } from "./getSeriesColorFn.mjs";
86
+ export { resolveColorProcessor } from "./resolveColorProcessor.mjs";
87
+ export { processLineLikeSeries } from "./processLineLikeSeries.mjs";
88
+ export { getLineLikeTooltip } from "./getLineLikeTooltip.mjs";
84
89
  export { checkBarChartScaleErrors } from "../BarChart/checkBarChartScaleErrors.mjs";
85
90
  export { getBandSize } from "./getBandSize.mjs";
86
91
  export * from "./plugins/utils/defaultSeriesConfig.mjs";
@@ -55,12 +55,14 @@ export interface TooltipGetterAxesConfig {
55
55
  rotation?: PolarAxisDefaultized<any, any, ChartsRotationAxisProps>;
56
56
  radius?: PolarAxisDefaultized<any, any, ChartsRadiusAxisProps>;
57
57
  }
58
- export type TooltipGetter<SeriesType extends ChartSeriesType> = (params: {
58
+ export interface TooltipGetterParams<SeriesType extends ChartSeriesType> {
59
59
  series: ChartSeriesDefaultized<SeriesType>;
60
60
  axesConfig: TooltipGetterAxesConfig;
61
61
  getColor: ColorGetter<SeriesType>;
62
62
  identifier: SeriesItemIdentifierWithType<SeriesType> | null;
63
- }) => (SeriesType extends 'radar' ? ItemTooltipWithMultipleValues<SeriesType> : ItemTooltip<SeriesType>) | null;
63
+ }
64
+ export type TooltipGetterResult<SeriesType extends ChartSeriesType> = (SeriesType extends 'radar' ? ItemTooltipWithMultipleValues<SeriesType> : ItemTooltip<SeriesType>) | null;
65
+ export type TooltipGetter<SeriesType extends ChartSeriesType> = (params: TooltipGetterParams<SeriesType>) => TooltipGetterResult<SeriesType>;
64
66
  /**
65
67
  * If `axisId` is set to undefined, the default axis will be used.
66
68
  *
@@ -55,12 +55,14 @@ export interface TooltipGetterAxesConfig {
55
55
  rotation?: PolarAxisDefaultized<any, any, ChartsRotationAxisProps>;
56
56
  radius?: PolarAxisDefaultized<any, any, ChartsRadiusAxisProps>;
57
57
  }
58
- export type TooltipGetter<SeriesType extends ChartSeriesType> = (params: {
58
+ export interface TooltipGetterParams<SeriesType extends ChartSeriesType> {
59
59
  series: ChartSeriesDefaultized<SeriesType>;
60
60
  axesConfig: TooltipGetterAxesConfig;
61
61
  getColor: ColorGetter<SeriesType>;
62
62
  identifier: SeriesItemIdentifierWithType<SeriesType> | null;
63
- }) => (SeriesType extends 'radar' ? ItemTooltipWithMultipleValues<SeriesType> : ItemTooltip<SeriesType>) | null;
63
+ }
64
+ export type TooltipGetterResult<SeriesType extends ChartSeriesType> = (SeriesType extends 'radar' ? ItemTooltipWithMultipleValues<SeriesType> : ItemTooltip<SeriesType>) | null;
65
+ export type TooltipGetter<SeriesType extends ChartSeriesType> = (params: TooltipGetterParams<SeriesType>) => TooltipGetterResult<SeriesType>;
64
66
  /**
65
67
  * If `axisId` is set to undefined, the default axis will be used.
66
68
  *
@@ -10,9 +10,10 @@ const createZoomLookup = axisDirection => (axes = []) => axes.reduce((acc, v) =>
10
10
  const {
11
11
  zoom,
12
12
  id: axisId,
13
- reverse
13
+ reverse,
14
+ scaleType
14
15
  } = v;
15
- const defaultizedZoom = (0, _defaultizeZoom.defaultizeZoom)(zoom, axisId, axisDirection, reverse);
16
+ const defaultizedZoom = (0, _defaultizeZoom.defaultizeZoom)(zoom, axisId, axisDirection, (0, _defaultizeZoom.getEffectiveZoomReverse)(axisDirection, scaleType, reverse));
16
17
  if (defaultizedZoom) {
17
18
  acc[axisId] = defaultizedZoom;
18
19
  }
@@ -1,12 +1,13 @@
1
- import { defaultizeZoom } from "./defaultizeZoom.mjs";
1
+ import { defaultizeZoom, getEffectiveZoomReverse } from "./defaultizeZoom.mjs";
2
2
  export const createZoomLookup = axisDirection => (axes = []) => axes.reduce((acc, v) => {
3
3
  // @ts-ignore
4
4
  const {
5
5
  zoom,
6
6
  id: axisId,
7
- reverse
7
+ reverse,
8
+ scaleType
8
9
  } = v;
9
- const defaultizedZoom = defaultizeZoom(zoom, axisId, axisDirection, reverse);
10
+ const defaultizedZoom = defaultizeZoom(zoom, axisId, axisDirection, getEffectiveZoomReverse(axisDirection, scaleType, reverse));
10
11
  if (defaultizedZoom) {
11
12
  acc[axisId] = defaultizedZoom;
12
13
  }
@@ -35,7 +35,7 @@ function defaultizeXAxis(inAxes, dataset, axesGap) {
35
35
  id,
36
36
  position,
37
37
  height,
38
- zoom: (0, _defaultizeZoom.defaultizeZoom)(axisConfig.zoom, id, 'x', axisConfig.reverse)
38
+ zoom: (0, _defaultizeZoom.defaultizeZoom)(axisConfig.zoom, id, 'x', (0, _defaultizeZoom.getEffectiveZoomReverse)('x', axisConfig.scaleType, axisConfig.reverse))
39
39
  });
40
40
 
41
41
  // Increment the offset for the next axis
@@ -87,7 +87,7 @@ function defaultizeYAxis(inAxes, dataset, axesGap) {
87
87
  id,
88
88
  position,
89
89
  width,
90
- zoom: (0, _defaultizeZoom.defaultizeZoom)(axisConfig.zoom, id, 'y', axisConfig.reverse)
90
+ zoom: (0, _defaultizeZoom.defaultizeZoom)(axisConfig.zoom, id, 'y', (0, _defaultizeZoom.getEffectiveZoomReverse)('y', axisConfig.scaleType, axisConfig.reverse))
91
91
  });
92
92
 
93
93
  // Increment the offset for the next axis
@@ -1,6 +1,6 @@
1
1
  import _formatErrorMessage from "@mui/x-internals/formatErrorMessage";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- import { defaultizeZoom } from "./defaultizeZoom.mjs";
3
+ import { defaultizeZoom, getEffectiveZoomReverse } from "./defaultizeZoom.mjs";
4
4
  import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY, DEFAULT_AXIS_SIZE_HEIGHT, DEFAULT_AXIS_SIZE_WIDTH, AXIS_LABEL_DEFAULT_HEIGHT } from "../../../../constants/index.mjs";
5
5
  export function defaultizeXAxis(inAxes, dataset, axesGap) {
6
6
  const offsets = {
@@ -27,7 +27,7 @@ export function defaultizeXAxis(inAxes, dataset, axesGap) {
27
27
  id,
28
28
  position,
29
29
  height,
30
- zoom: defaultizeZoom(axisConfig.zoom, id, 'x', axisConfig.reverse)
30
+ zoom: defaultizeZoom(axisConfig.zoom, id, 'x', getEffectiveZoomReverse('x', axisConfig.scaleType, axisConfig.reverse))
31
31
  });
32
32
 
33
33
  // Increment the offset for the next axis
@@ -79,7 +79,7 @@ export function defaultizeYAxis(inAxes, dataset, axesGap) {
79
79
  id,
80
80
  position,
81
81
  width,
82
- zoom: defaultizeZoom(axisConfig.zoom, id, 'y', axisConfig.reverse)
82
+ zoom: defaultizeZoom(axisConfig.zoom, id, 'y', getEffectiveZoomReverse('y', axisConfig.scaleType, axisConfig.reverse))
83
83
  });
84
84
 
85
85
  // Increment the offset for the next axis
@@ -1,6 +1,15 @@
1
- import { type AxisId } from "../../../../models/axis.mjs";
1
+ import { type AxisId, type ScaleName } from "../../../../models/axis.mjs";
2
2
  import { type DefaultizedZoomOptions } from "./useChartCartesianAxis.types.mjs";
3
3
  import { type ZoomOptions } from "./zoom.types.mjs";
4
+ /**
5
+ * Ordinal Y axes (band/point) render with `domain[0]` at the top of the chart
6
+ * (see the `range.reverse()` applied in `selectorChartYScales`), which is the
7
+ * opposite of the cartesian convention assumed by the zoom/pan math.
8
+ *
9
+ * Returns the `reverse` flag the zoom handlers should use so that pan/wheel
10
+ * gestures follow the visual direction of the axis.
11
+ */
12
+ export declare const getEffectiveZoomReverse: (axisDirection: "x" | "y", scaleType: ScaleName | undefined, reverse: boolean | undefined) => boolean;
4
13
  export declare const defaultZoomOptions: {
5
14
  minStart: number;
6
15
  maxEnd: number;
@@ -1,6 +1,15 @@
1
- import { type AxisId } from "../../../../models/axis.js";
1
+ import { type AxisId, type ScaleName } from "../../../../models/axis.js";
2
2
  import { type DefaultizedZoomOptions } from "./useChartCartesianAxis.types.js";
3
3
  import { type ZoomOptions } from "./zoom.types.js";
4
+ /**
5
+ * Ordinal Y axes (band/point) render with `domain[0]` at the top of the chart
6
+ * (see the `range.reverse()` applied in `selectorChartYScales`), which is the
7
+ * opposite of the cartesian convention assumed by the zoom/pan math.
8
+ *
9
+ * Returns the `reverse` flag the zoom handlers should use so that pan/wheel
10
+ * gestures follow the visual direction of the axis.
11
+ */
12
+ export declare const getEffectiveZoomReverse: (axisDirection: "x" | "y", scaleType: ScaleName | undefined, reverse: boolean | undefined) => boolean;
4
13
  export declare const defaultZoomOptions: {
5
14
  minStart: number;
6
15
  maxEnd: number;
@@ -4,9 +4,26 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.defaultizeZoom = exports.defaultZoomOptions = void 0;
7
+ exports.getEffectiveZoomReverse = exports.defaultizeZoom = exports.defaultZoomOptions = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _constants = require("../../../constants");
10
+ /**
11
+ * Ordinal Y axes (band/point) render with `domain[0]` at the top of the chart
12
+ * (see the `range.reverse()` applied in `selectorChartYScales`), which is the
13
+ * opposite of the cartesian convention assumed by the zoom/pan math.
14
+ *
15
+ * Returns the `reverse` flag the zoom handlers should use so that pan/wheel
16
+ * gestures follow the visual direction of the axis.
17
+ */
18
+ const getEffectiveZoomReverse = (axisDirection, scaleType, reverse) => {
19
+ const resolvedReverse = reverse ?? false;
20
+ const isOrdinal = scaleType === 'band' || scaleType === 'point';
21
+ if (axisDirection === 'y' && isOrdinal) {
22
+ return !resolvedReverse;
23
+ }
24
+ return resolvedReverse;
25
+ };
26
+ exports.getEffectiveZoomReverse = getEffectiveZoomReverse;
10
27
  const defaultZoomOptions = exports.defaultZoomOptions = {
11
28
  minStart: 0,
12
29
  maxEnd: 100,
@@ -1,5 +1,21 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { DEFAULT_ZOOM_SLIDER_PREVIEW_SIZE, DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP, DEFAULT_ZOOM_SLIDER_SIZE } from "../../../constants.mjs";
3
+ /**
4
+ * Ordinal Y axes (band/point) render with `domain[0]` at the top of the chart
5
+ * (see the `range.reverse()` applied in `selectorChartYScales`), which is the
6
+ * opposite of the cartesian convention assumed by the zoom/pan math.
7
+ *
8
+ * Returns the `reverse` flag the zoom handlers should use so that pan/wheel
9
+ * gestures follow the visual direction of the axis.
10
+ */
11
+ export const getEffectiveZoomReverse = (axisDirection, scaleType, reverse) => {
12
+ const resolvedReverse = reverse ?? false;
13
+ const isOrdinal = scaleType === 'band' || scaleType === 'point';
14
+ if (axisDirection === 'y' && isOrdinal) {
15
+ return !resolvedReverse;
16
+ }
17
+ return resolvedReverse;
18
+ };
3
19
  export const defaultZoomOptions = {
4
20
  minStart: 0,
5
21
  maxEnd: 100,
@@ -164,6 +164,7 @@ export declare const selectorChartRawAxis: (args_0: import("../../corePlugins/us
164
164
  min: NumberValue;
165
165
  max: NumberValue;
166
166
  });
167
+ domainSeries?: "all" | "visible";
167
168
  ignoreTooltip?: boolean;
168
169
  } & Omit<Partial<import("../../../index.mjs").ChartsYAxisProps>, "axisId"> & Partial<Omit<{
169
170
  scaleType: "linear";
@@ -223,7 +224,14 @@ export declare const selectorChartDefaultXAxisId: (args_0: import("../../corePlu
223
224
  export declare const selectorChartDefaultYAxisId: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.mjs").UseChartCartesianAxisState> & {
224
225
  cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
225
226
  }) => AxisId;
226
- export declare const selectorChartSeriesEmptyFlatbushMap: () => Map<string, Flatbush>;
227
- export declare const selectorChartSeriesFlatbushMap: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<{}> & {
227
+ export type ScatterFlatbushEntry = {
228
+ flatbush: Flatbush;
229
+ /** Per-point marker radius, in pixels. */
230
+ getItemRadius: number | ((dataIndex: number) => number);
231
+ /** Largest radius across all points in this series, in pixels. */
232
+ maxItemRadius: number;
233
+ };
234
+ export declare const selectorChartSeriesEmptyFlatbushMap: () => Map<string, ScatterFlatbushEntry>;
235
+ export declare const selectorChartSeriesFlatbushMap: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & import("../useChartZAxis/index.mjs").UseChartZAxisState & Partial<{}> & {
228
236
  cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
229
- }) => Map<string, Flatbush>;
237
+ }) => Map<string, ScatterFlatbushEntry>;
@@ -164,6 +164,7 @@ export declare const selectorChartRawAxis: (args_0: import("../../corePlugins/us
164
164
  min: NumberValue;
165
165
  max: NumberValue;
166
166
  });
167
+ domainSeries?: "all" | "visible";
167
168
  ignoreTooltip?: boolean;
168
169
  } & Omit<Partial<import("../../../index.js").ChartsYAxisProps>, "axisId"> & Partial<Omit<{
169
170
  scaleType: "linear";
@@ -223,7 +224,14 @@ export declare const selectorChartDefaultXAxisId: (args_0: import("../../corePlu
223
224
  export declare const selectorChartDefaultYAxisId: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
224
225
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
225
226
  }) => AxisId;
226
- export declare const selectorChartSeriesEmptyFlatbushMap: () => Map<string, Flatbush>;
227
- export declare const selectorChartSeriesFlatbushMap: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
227
+ export type ScatterFlatbushEntry = {
228
+ flatbush: Flatbush;
229
+ /** Per-point marker radius, in pixels. */
230
+ getItemRadius: number | ((dataIndex: number) => number);
231
+ /** Largest radius across all points in this series, in pixels. */
232
+ maxItemRadius: number;
233
+ };
234
+ export declare const selectorChartSeriesEmptyFlatbushMap: () => Map<string, ScatterFlatbushEntry>;
235
+ export declare const selectorChartSeriesFlatbushMap: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & import("../useChartZAxis/index.js").UseChartZAxisState & Partial<{}> & {
228
236
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
229
- }) => Map<string, Flatbush>;
237
+ }) => Map<string, ScatterFlatbushEntry>;