@mui/x-charts 9.9.0 → 9.10.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 (196) hide show
  1. package/BarChart/barClasses.d.mts +1 -1
  2. package/BarChart/barClasses.d.ts +1 -1
  3. package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.mts +10 -10
  4. package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +10 -10
  5. package/BarChart/seriesConfig/bar/keyboardFocusHandler.js +3 -1
  6. package/BarChart/seriesConfig/bar/keyboardFocusHandler.mjs +3 -1
  7. package/CHANGELOG.md +217 -0
  8. package/ChartsAxisHighlight/getSampledBandHighlight.d.mts +1 -1
  9. package/ChartsAxisHighlight/getSampledBandHighlight.d.ts +1 -1
  10. package/ChartsAxisHighlight/getSampledBandHighlight.js +15 -3
  11. package/ChartsAxisHighlight/getSampledBandHighlight.mjs +15 -3
  12. package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.d.mts +1 -1
  13. package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.d.ts +1 -1
  14. package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.d.mts +1 -1
  15. package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.d.ts +1 -1
  16. package/ChartsDataProvider/useChartsDataProviderProps.d.mts +1 -1
  17. package/ChartsDataProvider/useChartsDataProviderProps.d.ts +1 -1
  18. package/ChartsLabel/labelGradientClasses.d.mts +1 -1
  19. package/ChartsLabel/labelGradientClasses.d.ts +1 -1
  20. package/ChartsLabel/labelMarkClasses.d.mts +1 -1
  21. package/ChartsLabel/labelMarkClasses.d.ts +1 -1
  22. package/ChartsLegend/chartsLegend.types.d.mts +2 -1
  23. package/ChartsLegend/chartsLegend.types.d.ts +2 -1
  24. package/ChartsLegend/chartsLegendClasses.d.mts +1 -1
  25. package/ChartsLegend/chartsLegendClasses.d.ts +1 -1
  26. package/ChartsLegend/continuousColorLegendClasses.d.mts +1 -1
  27. package/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
  28. package/ChartsLegend/piecewiseColorLegendClasses.d.mts +1 -1
  29. package/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
  30. package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.d.mts +1 -1
  31. package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.d.ts +1 -1
  32. package/ChartsRadiusAxis/chartsRadiusAxisClasses.d.mts +1 -1
  33. package/ChartsRadiusAxis/chartsRadiusAxisClasses.d.ts +1 -1
  34. package/ChartsRadiusAxis/createGetLabelTextAnchors.d.mts +6 -6
  35. package/ChartsRadiusAxis/createGetLabelTextAnchors.d.ts +6 -6
  36. package/ChartsReferenceLine/ChartsXReferenceLine.d.mts +1 -1
  37. package/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -1
  38. package/ChartsReferenceLine/ChartsYReferenceLine.d.mts +1 -1
  39. package/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -1
  40. package/ChartsRotationAxis/chartsRotationAxisClasses.d.mts +1 -1
  41. package/ChartsRotationAxis/chartsRotationAxisClasses.d.ts +1 -1
  42. package/ChartsTooltip/ChartTooltip.types.d.mts +2 -1
  43. package/ChartsTooltip/ChartTooltip.types.d.ts +2 -1
  44. package/ChartsTooltip/ChartsTooltipContainer.d.mts +4 -1
  45. package/ChartsTooltip/ChartsTooltipContainer.d.ts +4 -1
  46. package/ChartsTooltip/ChartsTooltipTable.d.mts +1 -1
  47. package/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
  48. package/ChartsTooltip/chartsTooltipClasses.d.mts +1 -1
  49. package/ChartsTooltip/chartsTooltipClasses.d.ts +1 -1
  50. package/ChartsTooltip/useItemTooltip.d.mts +1 -1
  51. package/ChartsTooltip/useItemTooltip.d.ts +1 -1
  52. package/ChartsXAxis/useAxisTicksProps.d.mts +2573 -2573
  53. package/ChartsXAxis/useAxisTicksProps.d.ts +2573 -2573
  54. package/ChartsXAxis/utilities.d.mts +1 -1
  55. package/ChartsXAxis/utilities.d.ts +1 -1
  56. package/ChartsYAxis/useAxisTicksProps.d.mts +2573 -2573
  57. package/ChartsYAxis/useAxisTicksProps.d.ts +2573 -2573
  58. package/ChartsYAxis/utilities.d.mts +1 -1
  59. package/ChartsYAxis/utilities.d.ts +1 -1
  60. package/LineChart/AreaPlot.d.mts +3 -3
  61. package/LineChart/AreaPlot.d.ts +3 -3
  62. package/LineChart/AreaPlot.js +4 -5
  63. package/LineChart/AreaPlot.mjs +4 -5
  64. package/LineChart/LinePlot.d.mts +3 -3
  65. package/LineChart/LinePlot.d.ts +3 -3
  66. package/LineChart/LinePlot.js +4 -5
  67. package/LineChart/LinePlot.mjs +4 -5
  68. package/LineChart/MarkPlot.d.mts +5 -4
  69. package/LineChart/MarkPlot.d.ts +5 -4
  70. package/LineChart/MarkPlot.js +1 -1
  71. package/LineChart/MarkPlot.mjs +1 -1
  72. package/LineChart/lineClasses.d.mts +1 -1
  73. package/LineChart/lineClasses.d.ts +1 -1
  74. package/LineChart/seriesConfig/keyboardFocusHandler.js +3 -1
  75. package/LineChart/seriesConfig/keyboardFocusHandler.mjs +3 -1
  76. package/LineChart/useLineItemClickHandler.d.mts +12 -0
  77. package/LineChart/useLineItemClickHandler.d.ts +12 -0
  78. package/LineChart/useLineItemClickHandler.js +54 -0
  79. package/LineChart/useLineItemClickHandler.mjs +48 -0
  80. package/PieChart/PieArcLabelPlot.d.mts +2 -1
  81. package/PieChart/PieArcLabelPlot.d.ts +2 -1
  82. package/PieChart/PieArcPlot.d.mts +2 -1
  83. package/PieChart/PieArcPlot.d.ts +2 -1
  84. package/PieChart/pieClasses.d.mts +1 -1
  85. package/PieChart/pieClasses.d.ts +1 -1
  86. package/RadarChart/RadarAxis/RadarAxis.utils.d.mts +4 -4
  87. package/RadarChart/RadarAxis/RadarAxis.utils.d.ts +4 -4
  88. package/RadarChart/RadarSeriesPlot/useInteractionAllItemProps.d.mts +1 -1
  89. package/RadarChart/RadarSeriesPlot/useInteractionAllItemProps.d.ts +1 -1
  90. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.mts +12 -12
  91. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +12 -12
  92. package/RadarChart/radarClasses.d.mts +1 -1
  93. package/RadarChart/radarClasses.d.ts +1 -1
  94. package/RadarChart/seriesConfig/keyboardFocusHandler.js +3 -1
  95. package/RadarChart/seriesConfig/keyboardFocusHandler.mjs +3 -1
  96. package/RadarChart/useRadarChartProps.d.mts +1 -1
  97. package/RadarChart/useRadarChartProps.d.ts +1 -1
  98. package/ScatterChart/ScatterChart.d.mts +2 -1
  99. package/ScatterChart/ScatterChart.d.ts +2 -1
  100. package/ScatterChart/ScatterMarker.types.d.mts +2 -1
  101. package/ScatterChart/ScatterMarker.types.d.ts +2 -1
  102. package/ScatterChart/scatterClasses.d.mts +1 -1
  103. package/ScatterChart/scatterClasses.d.ts +1 -1
  104. package/ScatterChart/useScatterPlotData.d.mts +1 -1
  105. package/ScatterChart/useScatterPlotData.d.ts +1 -1
  106. package/SparkLineChart/SparkLineChart.d.mts +1 -1
  107. package/SparkLineChart/SparkLineChart.d.ts +1 -1
  108. package/Toolbar/Toolbar.types.d.mts +2 -1
  109. package/Toolbar/Toolbar.types.d.ts +2 -1
  110. package/hooks/animation/useAnimatePieArc.js +2 -1
  111. package/hooks/animation/useAnimatePieArc.mjs +2 -1
  112. package/index.js +1 -1
  113. package/index.mjs +1 -1
  114. package/internals/colorScale.d.mts +1 -1
  115. package/internals/colorScale.d.ts +1 -1
  116. package/internals/commonNextFocusItem.d.mts +2 -2
  117. package/internals/commonNextFocusItem.d.ts +2 -2
  118. package/internals/commonNextFocusItem.js +4 -4
  119. package/internals/commonNextFocusItem.mjs +4 -4
  120. package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.js +1 -0
  121. package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.mjs +1 -0
  122. package/internals/configInit.d.mts +1 -1
  123. package/internals/configInit.d.ts +1 -1
  124. package/internals/consumeSlots.d.mts +1 -1
  125. package/internals/consumeSlots.d.ts +1 -1
  126. package/internals/consumeThemeProps.d.mts +1 -1
  127. package/internals/consumeThemeProps.d.ts +1 -1
  128. package/internals/createCommonKeyboardFocusHandler.d.mts +1 -1
  129. package/internals/createCommonKeyboardFocusHandler.d.ts +1 -1
  130. package/internals/createGetBarDimensions.js +10 -5
  131. package/internals/createGetBarDimensions.mjs +10 -5
  132. package/internals/getGraphemeCount.d.mts +2 -2
  133. package/internals/getGraphemeCount.d.ts +2 -2
  134. package/internals/getGroupingConfig.d.mts +1 -1
  135. package/internals/getGroupingConfig.d.ts +1 -1
  136. package/internals/getSampledBucketRegion.d.mts +12 -0
  137. package/internals/getSampledBucketRegion.d.ts +12 -0
  138. package/internals/getSampledBucketRegion.js +23 -0
  139. package/internals/getSampledBucketRegion.mjs +17 -0
  140. package/internals/identifierCleaner.d.mts +1 -1
  141. package/internals/identifierCleaner.d.ts +1 -1
  142. package/internals/invertScale.d.mts +1 -1
  143. package/internals/invertScale.d.ts +1 -1
  144. package/internals/plugins/corePlugins/useChartSeries/processSeries.d.mts +1 -1
  145. package/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +1 -1
  146. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.mts +2 -2
  147. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +2 -2
  148. package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.d.mts +3 -3
  149. package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.d.ts +3 -3
  150. package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.d.mts +1 -1
  151. package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.d.ts +1 -1
  152. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.mts +2 -2
  153. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +2 -2
  154. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.mts +1 -1
  155. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +1 -1
  156. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.mts +1 -1
  157. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +1 -1
  158. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +70 -70
  159. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +70 -70
  160. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.mts +78 -78
  161. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +78 -78
  162. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.mts +7 -7
  163. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +7 -7
  164. package/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.d.mts +1 -1
  165. package/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.d.ts +1 -1
  166. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/findVisibleDataIndex.d.mts +3 -0
  167. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/findVisibleDataIndex.d.ts +3 -0
  168. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/findVisibleDataIndex.js +3 -0
  169. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/findVisibleDataIndex.mjs +3 -0
  170. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.mts +1 -1
  171. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +1 -1
  172. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.mts +1 -1
  173. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.ts +1 -1
  174. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.mts +1 -1
  175. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +1 -1
  176. package/internals/plugins/featurePlugins/useProgressiveRendering/useProgressiveRendering.selectors.d.mts +1 -1
  177. package/internals/plugins/featurePlugins/useProgressiveRendering/useProgressiveRendering.selectors.d.ts +1 -1
  178. package/internals/seriesSelectorOfType.d.mts +6 -6
  179. package/internals/seriesSelectorOfType.d.ts +6 -6
  180. package/internals/sizeScale.d.mts +1 -1
  181. package/internals/sizeScale.d.ts +1 -1
  182. package/internals/sliceUntil.d.mts +2 -2
  183. package/internals/sliceUntil.d.ts +2 -2
  184. package/internals/snapEndAngleToFullCircle.d.mts +20 -0
  185. package/internals/snapEndAngleToFullCircle.d.ts +20 -0
  186. package/internals/snapEndAngleToFullCircle.js +47 -0
  187. package/internals/snapEndAngleToFullCircle.mjs +41 -0
  188. package/models/axis.d.mts +5 -4
  189. package/models/axis.d.ts +5 -4
  190. package/models/seriesType/config.d.mts +2 -2
  191. package/models/seriesType/config.d.ts +2 -2
  192. package/models/seriesType/index.d.mts +1 -1
  193. package/models/seriesType/index.d.ts +1 -1
  194. package/models/seriesType/line.d.mts +14 -1
  195. package/models/seriesType/line.d.ts +14 -1
  196. package/package.json +3 -3
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import type { SeriesItemIdentifierWithData } from "../../models/seriesType/index.js";
3
- export declare const useInteractionAllItemProps: (data: SeriesItemIdentifierWithData<"radar">[], skip?: boolean) => {
3
+ export declare const useInteractionAllItemProps: (data: SeriesItemIdentifierWithData<'radar'>[], skip?: boolean) => {
4
4
  onPointerEnter?: () => void;
5
5
  onPointerLeave?: () => void;
6
6
  onPointerDown?: (event: React.PointerEvent) => void;
@@ -5,6 +5,18 @@ import type { SeriesId } from "../../models/seriesType/common.mjs";
5
5
  * @returns
6
6
  */
7
7
  export declare function useRadarSeriesData(querySeriesId?: SeriesId): {
8
+ type: 'radar';
9
+ data: number[];
10
+ label?: string | ((location: 'tooltip' | 'legend') => string);
11
+ hideMark?: boolean;
12
+ fillArea?: boolean;
13
+ hidden: boolean;
14
+ color: string;
15
+ colorGetter?: ((data: import("../../internals/index.mjs").ColorCallbackValue<number>) => string) | undefined;
16
+ id: SeriesId;
17
+ valueFormatter: import("../../internals/index.mjs").SeriesValueFormatter<number>;
18
+ highlightScope?: import("../../internals/index.mjs").CommonHighlightScope | undefined;
19
+ labelMarkType?: import("../../internals/index.mjs").ChartsLabelMarkType;
8
20
  seriesId: string;
9
21
  isSeriesHighlighted: boolean;
10
22
  isSeriesFaded: boolean;
@@ -17,16 +29,4 @@ export declare function useRadarSeriesData(querySeriesId?: SeriesId): {
17
29
  value: number;
18
30
  color: string;
19
31
  }[];
20
- hidden: boolean;
21
- type: "radar";
22
- highlightScope?: import("../../internals/index.mjs").CommonHighlightScope | undefined;
23
- labelMarkType?: import("../../internals/index.mjs").ChartsLabelMarkType | undefined;
24
- colorGetter?: ((data: import("../../internals/index.mjs").ColorCallbackValue<number>) => string) | undefined;
25
- label?: string | ((location: "tooltip" | "legend") => string) | undefined;
26
- hideMark?: boolean | undefined;
27
- fillArea?: boolean | undefined;
28
- id: SeriesId;
29
- valueFormatter: import("../../internals/index.mjs").SeriesValueFormatter<number>;
30
- color: string;
31
- data: number[];
32
32
  }[];
@@ -5,6 +5,18 @@ import type { SeriesId } from "../../models/seriesType/common.js";
5
5
  * @returns
6
6
  */
7
7
  export declare function useRadarSeriesData(querySeriesId?: SeriesId): {
8
+ type: 'radar';
9
+ data: number[];
10
+ label?: string | ((location: 'tooltip' | 'legend') => string);
11
+ hideMark?: boolean;
12
+ fillArea?: boolean;
13
+ hidden: boolean;
14
+ color: string;
15
+ colorGetter?: ((data: import("../../internals/index.js").ColorCallbackValue<number>) => string) | undefined;
16
+ id: SeriesId;
17
+ valueFormatter: import("../../internals/index.js").SeriesValueFormatter<number>;
18
+ highlightScope?: import("../../internals/index.js").CommonHighlightScope | undefined;
19
+ labelMarkType?: import("../../internals/index.js").ChartsLabelMarkType;
8
20
  seriesId: string;
9
21
  isSeriesHighlighted: boolean;
10
22
  isSeriesFaded: boolean;
@@ -17,16 +29,4 @@ export declare function useRadarSeriesData(querySeriesId?: SeriesId): {
17
29
  value: number;
18
30
  color: string;
19
31
  }[];
20
- hidden: boolean;
21
- type: "radar";
22
- highlightScope?: import("../../internals/index.js").CommonHighlightScope | undefined;
23
- labelMarkType?: import("../../internals/index.js").ChartsLabelMarkType | undefined;
24
- colorGetter?: ((data: import("../../internals/index.js").ColorCallbackValue<number>) => string) | undefined;
25
- label?: string | ((location: "tooltip" | "legend") => string) | undefined;
26
- hideMark?: boolean | undefined;
27
- fillArea?: boolean | undefined;
28
- id: SeriesId;
29
- valueFormatter: import("../../internals/index.js").SeriesValueFormatter<number>;
30
- color: string;
31
- data: number[];
32
32
  }[];
@@ -27,4 +27,4 @@ export interface RadarClasses {
27
27
  export type RadarClassKey = keyof RadarClasses;
28
28
  export declare function getRadarUtilityClass(slot: string): string;
29
29
  export declare const radarClasses: RadarClasses;
30
- export declare const useUtilityClasses: (classes?: Partial<RadarClasses>) => Record<"axisLine" | "axisLabel" | "axisRoot" | "gridRadial" | "gridDivider" | "gridStripe" | "seriesRoot" | "seriesArea" | "seriesMark" | "axisHighlightRoot" | "axisHighlightLine" | "axisHighlightDot", string>;
30
+ export declare const useUtilityClasses: (classes?: Partial<RadarClasses>) => Record<"axisHighlightDot" | "axisHighlightLine" | "axisHighlightRoot" | "axisLabel" | "axisLine" | "axisRoot" | "gridDivider" | "gridRadial" | "gridStripe" | "seriesArea" | "seriesMark" | "seriesRoot", string>;
@@ -27,4 +27,4 @@ export interface RadarClasses {
27
27
  export type RadarClassKey = keyof RadarClasses;
28
28
  export declare function getRadarUtilityClass(slot: string): string;
29
29
  export declare const radarClasses: RadarClasses;
30
- export declare const useUtilityClasses: (classes?: Partial<RadarClasses>) => Record<"axisLine" | "axisLabel" | "axisRoot" | "gridRadial" | "gridDivider" | "gridStripe" | "seriesRoot" | "seriesArea" | "seriesMark" | "axisHighlightRoot" | "axisHighlightLine" | "axisHighlightDot", string>;
30
+ export declare const useUtilityClasses: (classes?: Partial<RadarClasses>) => Record<"axisHighlightDot" | "axisHighlightLine" | "axisHighlightRoot" | "axisLabel" | "axisLine" | "axisRoot" | "gridDivider" | "gridRadial" | "gridStripe" | "seriesArea" | "seriesMark" | "seriesRoot", string>;
@@ -6,5 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _createCommonKeyboardFocusHandler = require("../../internals/createCommonKeyboardFocusHandler");
8
8
  const outSeriesTypes = new Set(['radar']);
9
- const keyboardFocusHandler = (0, _createCommonKeyboardFocusHandler.createCommonKeyboardFocusHandler)(outSeriesTypes, true);
9
+ const allowCycles = true;
10
+ const useCurrentSeriesMaxLength = false;
11
+ const keyboardFocusHandler = (0, _createCommonKeyboardFocusHandler.createCommonKeyboardFocusHandler)(outSeriesTypes, allowCycles, useCurrentSeriesMaxLength);
10
12
  var _default = exports.default = keyboardFocusHandler;
@@ -1,4 +1,6 @@
1
1
  import { createCommonKeyboardFocusHandler } from "../../internals/createCommonKeyboardFocusHandler.mjs";
2
2
  const outSeriesTypes = new Set(['radar']);
3
- const keyboardFocusHandler = createCommonKeyboardFocusHandler(outSeriesTypes, true);
3
+ const allowCycles = true;
4
+ const useCurrentSeriesMaxLength = false;
5
+ const keyboardFocusHandler = createCommonKeyboardFocusHandler(outSeriesTypes, allowCycles, useCurrentSeriesMaxLength);
4
6
  export default keyboardFocusHandler;
@@ -15,7 +15,7 @@ import type { RadarSeriesAreaProps, RadarSeriesMarksProps } from "./RadarSeriesP
15
15
  * @returns An object with props for the children components of RadarChart
16
16
  */
17
17
  export declare const useRadarChartProps: (props: RadarChartProps) => {
18
- highlight: "none" | "series" | "axis";
18
+ highlight: "axis" | "none" | "series";
19
19
  chartsWrapperProps: Omit<ChartsWrapperProps, "children">;
20
20
  chartsSurfaceProps: ChartsSurfaceProps;
21
21
  radarDataProviderProps: RadarDataProviderProps<RadarChartPluginSignatures>;
@@ -15,7 +15,7 @@ import type { RadarSeriesAreaProps, RadarSeriesMarksProps } from "./RadarSeriesP
15
15
  * @returns An object with props for the children components of RadarChart
16
16
  */
17
17
  export declare const useRadarChartProps: (props: RadarChartProps) => {
18
- highlight: "none" | "series" | "axis";
18
+ highlight: "axis" | "none" | "series";
19
19
  chartsWrapperProps: Omit<ChartsWrapperProps, "children">;
20
20
  chartsSurfaceProps: ChartsSurfaceProps;
21
21
  radarDataProviderProps: RadarDataProviderProps<RadarChartPluginSignatures>;
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import type { MakeOptional } from '@mui/x-internals/types';
3
+ import type { WithDataAttributes } from '@mui/utils/types';
3
4
  import type { ChartsToolbarSlotProps, ChartsToolbarSlots } from "../Toolbar/index.mjs";
4
5
  import type { ChartsSlots, ChartsSlotProps } from "../internals/material/index.mjs";
5
6
  import type { ScatterPlotProps, ScatterPlotSlotProps, ScatterPlotSlots } from "./ScatterPlot.mjs";
@@ -21,7 +22,7 @@ export interface ScatterChartSlotProps extends ChartsAxisSlotProps, ScatterPlotS
21
22
  * Slot props for the tooltip component.
22
23
  * @default {}
23
24
  */
24
- tooltip?: Partial<ChartsTooltipProps<'item' | 'none'>> & TooltipPropsOverrides;
25
+ tooltip?: WithDataAttributes<Partial<ChartsTooltipProps<'item' | 'none'>> & TooltipPropsOverrides>;
25
26
  }
26
27
  export type ScatterSeries = MakeOptional<ScatterSeriesType, 'type'>;
27
28
  export interface ScatterChartProps extends Omit<ChartsContainerProps<'scatter', ScatterChartPluginSignatures>, 'series' | 'plugins' | 'onItemClick' | 'highlightedAxis' | 'onHighlightedAxisChange'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'>, Pick<ScatterPlotProps, 'renderer'> {
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import type { MakeOptional } from '@mui/x-internals/types';
3
+ import type { WithDataAttributes } from '@mui/utils/types';
3
4
  import type { ChartsToolbarSlotProps, ChartsToolbarSlots } from "../Toolbar/index.js";
4
5
  import type { ChartsSlots, ChartsSlotProps } from "../internals/material/index.js";
5
6
  import type { ScatterPlotProps, ScatterPlotSlotProps, ScatterPlotSlots } from "./ScatterPlot.js";
@@ -21,7 +22,7 @@ export interface ScatterChartSlotProps extends ChartsAxisSlotProps, ScatterPlotS
21
22
  * Slot props for the tooltip component.
22
23
  * @default {}
23
24
  */
24
- tooltip?: Partial<ChartsTooltipProps<'item' | 'none'>> & TooltipPropsOverrides;
25
+ tooltip?: WithDataAttributes<Partial<ChartsTooltipProps<'item' | 'none'>> & TooltipPropsOverrides>;
25
26
  }
26
27
  export type ScatterSeries = MakeOptional<ScatterSeriesType, 'type'>;
27
28
  export interface ScatterChartProps extends Omit<ChartsContainerProps<'scatter', ScatterChartPluginSignatures>, 'series' | 'plugins' | 'onItemClick' | 'highlightedAxis' | 'onHighlightedAxisChange'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'>, Pick<ScatterPlotProps, 'renderer'> {
@@ -1,4 +1,5 @@
1
1
  import type * as React from 'react';
2
+ import type { WithDataAttributes } from '@mui/utils/types';
2
3
  import type { ScatterMarkerProps } from "./ScatterMarker.mjs";
3
4
  import type { MarkerPropsOverrides } from "../models/chartsSlotsComponentsProps.mjs";
4
5
  export interface ScatterMarkerSlots {
@@ -9,7 +10,7 @@ export interface ScatterMarkerSlots {
9
10
  marker?: React.JSXElementConstructor<ScatterMarkerProps & MarkerPropsOverrides>;
10
11
  }
11
12
  export interface ScatterMarkerSlotProps {
12
- marker?: Partial<ScatterMarkerProps> & MarkerPropsOverrides;
13
+ marker?: WithDataAttributes<Partial<ScatterMarkerProps> & MarkerPropsOverrides>;
13
14
  }
14
15
  export interface ScatterMarkerSlotExtension {
15
16
  /**
@@ -1,4 +1,5 @@
1
1
  import type * as React from 'react';
2
+ import type { WithDataAttributes } from '@mui/utils/types';
2
3
  import type { ScatterMarkerProps } from "./ScatterMarker.js";
3
4
  import type { MarkerPropsOverrides } from "../models/chartsSlotsComponentsProps.js";
4
5
  export interface ScatterMarkerSlots {
@@ -9,7 +10,7 @@ export interface ScatterMarkerSlots {
9
10
  marker?: React.JSXElementConstructor<ScatterMarkerProps & MarkerPropsOverrides>;
10
11
  }
11
12
  export interface ScatterMarkerSlotProps {
12
- marker?: Partial<ScatterMarkerProps> & MarkerPropsOverrides;
13
+ marker?: WithDataAttributes<Partial<ScatterMarkerProps> & MarkerPropsOverrides>;
13
14
  }
14
15
  export interface ScatterMarkerSlotExtension {
15
16
  /**
@@ -19,4 +19,4 @@ export declare const scatterClasses: ScatterClasses;
19
19
  export interface UseUtilityClassesOptions {
20
20
  classes?: Partial<ScatterClasses>;
21
21
  }
22
- export declare const useUtilityClasses: (options?: UseUtilityClassesOptions) => Record<"root" | "marker" | "series" | "focusedMark" | "highlightedMark", string>;
22
+ export declare const useUtilityClasses: (options?: UseUtilityClassesOptions) => Record<"focusedMark" | "highlightedMark" | "marker" | "root" | "series", string>;
@@ -19,4 +19,4 @@ export declare const scatterClasses: ScatterClasses;
19
19
  export interface UseUtilityClassesOptions {
20
20
  classes?: Partial<ScatterClasses>;
21
21
  }
22
- export declare const useUtilityClasses: (options?: UseUtilityClassesOptions) => Record<"root" | "marker" | "series" | "focusedMark" | "highlightedMark", string>;
22
+ export declare const useUtilityClasses: (options?: UseUtilityClassesOptions) => Record<"focusedMark" | "highlightedMark" | "marker" | "root" | "series", string>;
@@ -4,5 +4,5 @@ import type { DefaultizedScatterSeriesType, ScatterValueType } from "../models/i
4
4
  export declare function useScatterPlotData(series: DefaultizedScatterSeriesType, xScale: D3Scale, yScale: D3Scale, isPointInside: (x: number, y: number) => boolean): (ScatterValueType & {
5
5
  dataIndex: number;
6
6
  seriesId: SeriesId;
7
- type: "scatter";
7
+ type: 'scatter';
8
8
  })[];
@@ -4,5 +4,5 @@ import type { DefaultizedScatterSeriesType, ScatterValueType } from "../models/i
4
4
  export declare function useScatterPlotData(series: DefaultizedScatterSeriesType, xScale: D3Scale, yScale: D3Scale, isPointInside: (x: number, y: number) => boolean): (ScatterValueType & {
5
5
  dataIndex: number;
6
6
  seriesId: SeriesId;
7
- type: "scatter";
7
+ type: 'scatter';
8
8
  })[];
@@ -125,5 +125,5 @@ export interface SparkLineChartProps<PlotType extends 'line' | 'bar' = 'line' |
125
125
  *
126
126
  * - [SparkLineChart API](https://mui.com/x/api/charts/spark-line-chart/)
127
127
  */
128
- declare const SparkLineChart: React.ForwardRefExoticComponent<SparkLineChartProps<"line" | "bar"> & React.RefAttributes<HTMLDivElement>>;
128
+ declare const SparkLineChart: React.ForwardRefExoticComponent<SparkLineChartProps<"bar" | "line"> & React.RefAttributes<HTMLDivElement>>;
129
129
  export { SparkLineChart };
@@ -125,5 +125,5 @@ export interface SparkLineChartProps<PlotType extends 'line' | 'bar' = 'line' |
125
125
  *
126
126
  * - [SparkLineChart API](https://mui.com/x/api/charts/spark-line-chart/)
127
127
  */
128
- declare const SparkLineChart: React.ForwardRefExoticComponent<SparkLineChartProps<"line" | "bar"> & React.RefAttributes<HTMLDivElement>>;
128
+ declare const SparkLineChart: React.ForwardRefExoticComponent<SparkLineChartProps<"bar" | "line"> & React.RefAttributes<HTMLDivElement>>;
129
129
  export { SparkLineChart };
@@ -1,4 +1,5 @@
1
1
  import type * as React from 'react';
2
+ import type { WithDataAttributes } from '@mui/utils/types';
2
3
  import type { ToolbarPropsOverrides } from "../models/chartsSlotsComponentsProps.mjs";
3
4
  export interface ChartsToolbarProps {}
4
5
  export interface ChartsToolbarSlots {
@@ -12,5 +13,5 @@ export interface ChartsToolbarSlotProps {
12
13
  /**
13
14
  * Props for the toolbar component.
14
15
  */
15
- toolbar?: Partial<ChartsToolbarProps> & ToolbarPropsOverrides;
16
+ toolbar?: WithDataAttributes<Partial<ChartsToolbarProps> & ToolbarPropsOverrides>;
16
17
  }
@@ -1,4 +1,5 @@
1
1
  import type * as React from 'react';
2
+ import type { WithDataAttributes } from '@mui/utils/types';
2
3
  import type { ToolbarPropsOverrides } from "../models/chartsSlotsComponentsProps.js";
3
4
  export interface ChartsToolbarProps {}
4
5
  export interface ChartsToolbarSlots {
@@ -12,5 +13,5 @@ export interface ChartsToolbarSlotProps {
12
13
  /**
13
14
  * Props for the toolbar component.
14
15
  */
15
- toolbar?: Partial<ChartsToolbarProps> & ToolbarPropsOverrides;
16
+ toolbar?: WithDataAttributes<Partial<ChartsToolbarProps> & ToolbarPropsOverrides>;
16
17
  }
@@ -7,6 +7,7 @@ exports.useAnimatePieArc = useAnimatePieArc;
7
7
  var _d3Shape = require("@mui/x-charts-vendor/d3-shape");
8
8
  var _d3Interpolate = require("@mui/x-charts-vendor/d3-interpolate");
9
9
  var _useAnimate = require("./useAnimate");
10
+ var _snapEndAngleToFullCircle = require("../../internals/snapEndAngleToFullCircle");
10
11
  function pieArcPropsInterpolator(from, to) {
11
12
  const interpolateStartAngle = (0, _d3Interpolate.interpolateNumber)(from.startAngle, to.startAngle);
12
13
  const interpolateEndAngle = (0, _d3Interpolate.interpolateNumber)(from.endAngle, to.endAngle);
@@ -53,7 +54,7 @@ function useAnimatePieArc(props) {
53
54
  innerRadius: p.innerRadius,
54
55
  outerRadius: p.outerRadius,
55
56
  startAngle: p.startAngle,
56
- endAngle: p.endAngle
57
+ endAngle: (0, _snapEndAngleToFullCircle.snapEndAngleToFullCircle)(p.startAngle, p.endAngle, p.outerRadius, p.paddingAngle)
57
58
  }),
58
59
  visibility: p.startAngle === p.endAngle ? 'hidden' : 'visible'
59
60
  }),
@@ -1,6 +1,7 @@
1
1
  import { arc as d3Arc } from '@mui/x-charts-vendor/d3-shape';
2
2
  import { interpolateNumber } from '@mui/x-charts-vendor/d3-interpolate';
3
3
  import { useAnimate } from "./useAnimate.mjs";
4
+ import { snapEndAngleToFullCircle } from "../../internals/snapEndAngleToFullCircle.mjs";
4
5
  function pieArcPropsInterpolator(from, to) {
5
6
  const interpolateStartAngle = interpolateNumber(from.startAngle, to.startAngle);
6
7
  const interpolateEndAngle = interpolateNumber(from.endAngle, to.endAngle);
@@ -47,7 +48,7 @@ export function useAnimatePieArc(props) {
47
48
  innerRadius: p.innerRadius,
48
49
  outerRadius: p.outerRadius,
49
50
  startAngle: p.startAngle,
50
- endAngle: p.endAngle
51
+ endAngle: snapEndAngleToFullCircle(p.startAngle, p.endAngle, p.outerRadius, p.paddingAngle)
51
52
  }),
52
53
  visibility: p.startAngle === p.endAngle ? 'hidden' : 'visible'
53
54
  }),
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts v9.9.0
2
+ * @mui/x-charts v9.10.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts v9.9.0
2
+ * @mui/x-charts v9.10.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -2,4 +2,4 @@ import type { ScaleOrdinal } from '@mui/x-charts-vendor/d3-scale';
2
2
  import type { ContinuousColorConfig, PiecewiseColorConfig, OrdinalColorConfig } from "../models/colorMapping.mjs";
3
3
  export declare function getSequentialColorScale<Value extends number | Date>(config: ContinuousColorConfig<Value> | PiecewiseColorConfig<Value>): import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<Value, string, string | null>;
4
4
  export declare function getOrdinalColorScale<Value extends number | Date | string>(config: OrdinalColorConfig<Value>): ScaleOrdinal<Value, string, null | string> | ScaleOrdinal<number, string, null | string>;
5
- export declare function getColorScale(config: ContinuousColorConfig | PiecewiseColorConfig | OrdinalColorConfig): ScaleOrdinal<string | number | Date, string, string | null> | ScaleOrdinal<number, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string, string | null>;
5
+ export declare function getColorScale(config: ContinuousColorConfig | PiecewiseColorConfig | OrdinalColorConfig): ScaleOrdinal<number, string, string | null> | ScaleOrdinal<string | number | Date, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string, string | null>;
@@ -2,4 +2,4 @@ import type { ScaleOrdinal } from '@mui/x-charts-vendor/d3-scale';
2
2
  import type { ContinuousColorConfig, PiecewiseColorConfig, OrdinalColorConfig } from "../models/colorMapping.js";
3
3
  export declare function getSequentialColorScale<Value extends number | Date>(config: ContinuousColorConfig<Value> | PiecewiseColorConfig<Value>): import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<Value, string, string | null>;
4
4
  export declare function getOrdinalColorScale<Value extends number | Date | string>(config: OrdinalColorConfig<Value>): ScaleOrdinal<Value, string, null | string> | ScaleOrdinal<number, string, null | string>;
5
- export declare function getColorScale(config: ContinuousColorConfig | PiecewiseColorConfig | OrdinalColorConfig): ScaleOrdinal<string | number | Date, string, string | null> | ScaleOrdinal<number, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string, string | null>;
5
+ export declare function getColorScale(config: ContinuousColorConfig | PiecewiseColorConfig | OrdinalColorConfig): ScaleOrdinal<number, string, string | null> | ScaleOrdinal<string | number | Date, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string, string | null>;
@@ -28,7 +28,7 @@ compatibleSeriesTypes: Set<OutSeriesType>,
28
28
  */
29
29
  allowCycles?: boolean,
30
30
  /**
31
- * If true, series max index is defined by the current series length and not all series.
31
+ * If true (default), series max index is defined by the current series length and not all series.
32
32
  */
33
33
  useCurrentSeriesMaxLength?: boolean): (currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
34
34
  export declare function createGetPreviousIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
@@ -41,7 +41,7 @@ compatibleSeriesTypes: Set<OutSeriesType>,
41
41
  */
42
42
  allowCycles?: boolean,
43
43
  /**
44
- * If true, series max index is defined by the current series length and not all series.
44
+ * If true (default), series max index is defined by the current series length and not all series.
45
45
  */
46
46
  useCurrentSeriesMaxLength?: boolean): (currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
47
47
  export declare function createGetNextSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
@@ -28,7 +28,7 @@ compatibleSeriesTypes: Set<OutSeriesType>,
28
28
  */
29
29
  allowCycles?: boolean,
30
30
  /**
31
- * If true, series max index is defined by the current series length and not all series.
31
+ * If true (default), series max index is defined by the current series length and not all series.
32
32
  */
33
33
  useCurrentSeriesMaxLength?: boolean): (currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
34
34
  export declare function createGetPreviousIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
@@ -41,7 +41,7 @@ compatibleSeriesTypes: Set<OutSeriesType>,
41
41
  */
42
42
  allowCycles?: boolean,
43
43
  /**
44
- * If true, series max index is defined by the current series length and not all series.
44
+ * If true (default), series max index is defined by the current series length and not all series.
45
45
  */
46
46
  useCurrentSeriesMaxLength?: boolean): (currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
47
47
  export declare function createGetNextSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
@@ -33,9 +33,9 @@ compatibleSeriesTypes,
33
33
  */
34
34
  allowCycles = false,
35
35
  /**
36
- * If true, series max index is defined by the current series length and not all series.
36
+ * If true (default), series max index is defined by the current series length and not all series.
37
37
  */
38
- useCurrentSeriesMaxLength = false) {
38
+ useCurrentSeriesMaxLength = true) {
39
39
  return function getNextIndexFocusedItem(currentItem, state) {
40
40
  const processedSeries = (0, _useChartSeries.selectorChartSeriesProcessed)(state);
41
41
  let seriesId = currentItem?.seriesId;
@@ -84,9 +84,9 @@ compatibleSeriesTypes,
84
84
  */
85
85
  allowCycles = false,
86
86
  /**
87
- * If true, series max index is defined by the current series length and not all series.
87
+ * If true (default), series max index is defined by the current series length and not all series.
88
88
  */
89
- useCurrentSeriesMaxLength = false) {
89
+ useCurrentSeriesMaxLength = true) {
90
90
  return function getPreviousIndexFocusedItem(currentItem, state) {
91
91
  const processedSeries = (0, _useChartSeries.selectorChartSeriesProcessed)(state);
92
92
  let seriesId = currentItem?.seriesId;
@@ -25,9 +25,9 @@ compatibleSeriesTypes,
25
25
  */
26
26
  allowCycles = false,
27
27
  /**
28
- * If true, series max index is defined by the current series length and not all series.
28
+ * If true (default), series max index is defined by the current series length and not all series.
29
29
  */
30
- useCurrentSeriesMaxLength = false) {
30
+ useCurrentSeriesMaxLength = true) {
31
31
  return function getNextIndexFocusedItem(currentItem, state) {
32
32
  const processedSeries = selectorChartSeriesProcessed(state);
33
33
  let seriesId = currentItem?.seriesId;
@@ -76,9 +76,9 @@ compatibleSeriesTypes,
76
76
  */
77
77
  allowCycles = false,
78
78
  /**
79
- * If true, series max index is defined by the current series length and not all series.
79
+ * If true (default), series max index is defined by the current series length and not all series.
80
80
  */
81
- useCurrentSeriesMaxLength = false) {
81
+ useCurrentSeriesMaxLength = true) {
82
82
  return function getPreviousIndexFocusedItem(currentItem, state) {
83
83
  const processedSeries = selectorChartSeriesProcessed(state);
84
84
  let seriesId = currentItem?.seriesId;
@@ -60,6 +60,7 @@ function ChartsAccessibilityProxy() {
60
60
  div.setAttribute('tabindex', '0');
61
61
  }
62
62
  div.setAttribute('role', 'img');
63
+ div.setAttribute('aria-hidden', 'true');
63
64
  div.setAttribute('aria-labelledby', i === 0 ? `voiceover-${chartId}-1` : `voiceover-${chartId}-2`);
64
65
  div.style.width = '100%';
65
66
  div.style.height = '100%';
@@ -56,6 +56,7 @@ export function ChartsAccessibilityProxy() {
56
56
  div.setAttribute('tabindex', '0');
57
57
  }
58
58
  div.setAttribute('role', 'img');
59
+ div.setAttribute('aria-hidden', 'true');
59
60
  div.setAttribute('aria-labelledby', i === 0 ? `voiceover-${chartId}-1` : `voiceover-${chartId}-2`);
60
61
  div.style.width = '100%';
61
62
  div.style.height = '100%';
@@ -3,7 +3,7 @@ declare class CartesianSeriesTypes {
3
3
  types: Set<CartesianChartSeriesType>;
4
4
  constructor();
5
5
  addType(value: CartesianChartSeriesType): void;
6
- getTypes(): Set<"line" | "bar" | "scatter">;
6
+ getTypes(): Set<"bar" | "line" | "scatter">;
7
7
  }
8
8
  declare class PolarSeriesTypes {
9
9
  types: Set<PolarChartSeriesType>;
@@ -3,7 +3,7 @@ declare class CartesianSeriesTypes {
3
3
  types: Set<CartesianChartSeriesType>;
4
4
  constructor();
5
5
  addType(value: CartesianChartSeriesType): void;
6
- getTypes(): Set<"line" | "bar" | "scatter">;
6
+ getTypes(): Set<"bar" | "line" | "scatter">;
7
7
  }
8
8
  declare class PolarSeriesTypes {
9
9
  types: Set<PolarChartSeriesType>;
@@ -42,7 +42,7 @@ import * as React from 'react';
42
42
  */
43
43
  export declare const consumeSlots: <Props extends {}, Ref extends {}, RenderFunction = React.ForwardRefExoticComponent<Props & React.RefAttributes<Ref>>>(name: string, slotPropName: string, options: {
44
44
  propagateSlots?: boolean;
45
- defaultProps?: Omit<Partial<Props>, "slots" | "slotProps"> | ((props: Props) => Omit<Partial<Props>, "slots" | "slotProps">);
45
+ defaultProps?: Omit<Partial<Props>, 'slots' | 'slotProps'> | ((props: Props) => Omit<Partial<Props>, 'slots' | 'slotProps'>);
46
46
  omitProps?: Array<keyof Props>;
47
47
  classesResolver?: (props: Props, theme: any) => Record<string, string>;
48
48
  }, InComponent: RenderFunction) => React.ForwardRefExoticComponent<React.PropsWithoutRef<Props> & React.RefAttributes<Ref>>;
@@ -42,7 +42,7 @@ import * as React from 'react';
42
42
  */
43
43
  export declare const consumeSlots: <Props extends {}, Ref extends {}, RenderFunction = React.ForwardRefExoticComponent<Props & React.RefAttributes<Ref>>>(name: string, slotPropName: string, options: {
44
44
  propagateSlots?: boolean;
45
- defaultProps?: Omit<Partial<Props>, "slots" | "slotProps"> | ((props: Props) => Omit<Partial<Props>, "slots" | "slotProps">);
45
+ defaultProps?: Omit<Partial<Props>, 'slots' | 'slotProps'> | ((props: Props) => Omit<Partial<Props>, 'slots' | 'slotProps'>);
46
46
  omitProps?: Array<keyof Props>;
47
47
  classesResolver?: (props: Props, theme: any) => Record<string, string>;
48
48
  }, InComponent: RenderFunction) => React.ForwardRefExoticComponent<React.PropsWithoutRef<Props> & React.RefAttributes<Ref>>;
@@ -45,6 +45,6 @@ import * as React from 'react';
45
45
  * @param InComponent The component to render if the slot is not provided.
46
46
  */
47
47
  export declare const consumeThemeProps: <Props extends {}, Ref extends {}, RenderFunction = (props: Props, ref: React.Ref<Ref>) => React.ElementType>(name: string, options: {
48
- defaultProps?: Omit<Partial<Props>, "slots" | "slotProps"> | (<T extends Props>(props: T) => Omit<Partial<T>, "slots" | "slotProps">);
48
+ defaultProps?: Omit<Partial<Props>, 'slots' | 'slotProps'> | (<T extends Props>(props: T) => Omit<Partial<T>, 'slots' | 'slotProps'>);
49
49
  classesResolver?: (props: Props, theme: any) => Record<string, string>;
50
50
  }, InComponent: RenderFunction) => React.ForwardRefExoticComponent<React.PropsWithoutRef<Props> & React.RefAttributes<Ref>>;
@@ -45,6 +45,6 @@ import * as React from 'react';
45
45
  * @param InComponent The component to render if the slot is not provided.
46
46
  */
47
47
  export declare const consumeThemeProps: <Props extends {}, Ref extends {}, RenderFunction = (props: Props, ref: React.Ref<Ref>) => React.ElementType>(name: string, options: {
48
- defaultProps?: Omit<Partial<Props>, "slots" | "slotProps"> | (<T extends Props>(props: T) => Omit<Partial<T>, "slots" | "slotProps">);
48
+ defaultProps?: Omit<Partial<Props>, 'slots' | 'slotProps'> | (<T extends Props>(props: T) => Omit<Partial<T>, 'slots' | 'slotProps'>);
49
49
  classesResolver?: (props: Props, theme: any) => Record<string, string>;
50
50
  }, InComponent: RenderFunction) => React.ForwardRefExoticComponent<React.PropsWithoutRef<Props> & React.RefAttributes<Ref>>;
@@ -3,7 +3,7 @@ import type { ChartSeriesType } from "../models/seriesType/config.mjs";
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
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: {
6
- type: Exclude<ChartSeriesType, "sankey" | "heatmap">;
6
+ type: Exclude<ChartSeriesType, 'sankey' | 'heatmap'>;
7
7
  seriesId: import("../index.mjs").SeriesId;
8
8
  dataIndex?: number;
9
9
  } | null, state: {
@@ -3,7 +3,7 @@ import type { ChartSeriesType } from "../models/seriesType/config.js";
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
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: {
6
- type: Exclude<ChartSeriesType, "sankey" | "heatmap">;
6
+ type: Exclude<ChartSeriesType, 'sankey' | 'heatmap'>;
7
7
  seriesId: import("../index.js").SeriesId;
8
8
  dataIndex?: number;
9
9
  } | null, state: {
@@ -7,6 +7,7 @@ exports.createGetBarDimensions = createGetBarDimensions;
7
7
  exports.createGetBucketBarDimensions = createGetBucketBarDimensions;
8
8
  var _findMinMax = require("./findMinMax");
9
9
  var _getBandSize = require("./getBandSize");
10
+ var _getSampledBucketRegion = require("./getSampledBucketRegion");
10
11
  /** Minimum on-screen gap (px) kept between merged (sampled) bars so they stay distinguishable. */
11
12
  const MIN_SAMPLED_BAR_GAP_PX = 2;
12
13
  function shouldInvertStartCoordinate(verticalLayout, baseValue, reverse) {
@@ -78,9 +79,12 @@ function createGetBucketBarDimensions(params) {
78
79
  const step = baseScale.step();
79
80
  const valueScale = verticalLayout ? yAxisConfig.scale : xAxisConfig.scale;
80
81
  return function getBucketBarDimensions(startIndex, endIndex, min, max, groupIndex) {
81
- const spanStart = baseScale(baseScaleConfig.data[startIndex]);
82
+ // Region matches the axis highlight (see `getSampledBandHighlight`) so bar and highlight stay in sync.
83
+ const {
84
+ regionStart,
85
+ regionSize: bucketStride
86
+ } = (0, _getSampledBucketRegion.getSampledBucketRegion)(baseScale, baseScaleConfig.data, startIndex, endIndex);
82
87
  const bucketCount = endIndex - startIndex + 1;
83
- const bucketStride = bucketCount * step;
84
88
 
85
89
  // Keep the gap between buckets proportional to the bucket (same ratio as an unsampled chart),
86
90
  // but never thinner than MIN_SAMPLED_BAR_GAP_PX so it stays visible at every level and zoom.
@@ -89,7 +93,8 @@ function createGetBucketBarDimensions(params) {
89
93
  barWidth,
90
94
  offset
91
95
  } = (0, _getBandSize.getBandSize)(bucketStride - gap, numberOfGroups, baseScaleConfig.barGapRatio);
92
- const barOffset = groupIndex * (barWidth + offset);
96
+ // Center the bars in the region (split the gap to both sides) so they sit under the highlight.
97
+ const barOffset = gap / 2 + groupIndex * (barWidth + offset);
93
98
  const valueCoordinates = [valueScale(min), valueScale(max)];
94
99
  const [minValueCoord, maxValueCoord] = (0, _findMinMax.findMinMax)(valueCoordinates).map(v => Math.round(v));
95
100
  let barSize = maxValueCoord - minValueCoord;
@@ -97,8 +102,8 @@ function createGetBucketBarDimensions(params) {
97
102
  barSize = Math.max(series.minBarSize, barSize);
98
103
  }
99
104
  return {
100
- x: verticalLayout ? spanStart + barOffset : minValueCoord,
101
- y: verticalLayout ? minValueCoord : spanStart + barOffset,
105
+ x: verticalLayout ? regionStart + barOffset : minValueCoord,
106
+ y: verticalLayout ? minValueCoord : regionStart + barOffset,
102
107
  height: verticalLayout ? barSize : barWidth,
103
108
  width: verticalLayout ? barWidth : barSize
104
109
  };