@mui/x-charts 9.9.0 → 9.10.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 (164) 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/CHANGELOG.md +111 -0
  6. package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.d.mts +1 -1
  7. package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.d.ts +1 -1
  8. package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.d.mts +1 -1
  9. package/ChartsAxisHighlightValue/chartsAxisHighlightValueClasses.d.ts +1 -1
  10. package/ChartsDataProvider/useChartsDataProviderProps.d.mts +1 -1
  11. package/ChartsDataProvider/useChartsDataProviderProps.d.ts +1 -1
  12. package/ChartsLabel/labelGradientClasses.d.mts +1 -1
  13. package/ChartsLabel/labelGradientClasses.d.ts +1 -1
  14. package/ChartsLabel/labelMarkClasses.d.mts +1 -1
  15. package/ChartsLabel/labelMarkClasses.d.ts +1 -1
  16. package/ChartsLegend/chartsLegend.types.d.mts +2 -1
  17. package/ChartsLegend/chartsLegend.types.d.ts +2 -1
  18. package/ChartsLegend/chartsLegendClasses.d.mts +1 -1
  19. package/ChartsLegend/chartsLegendClasses.d.ts +1 -1
  20. package/ChartsLegend/continuousColorLegendClasses.d.mts +1 -1
  21. package/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
  22. package/ChartsLegend/piecewiseColorLegendClasses.d.mts +1 -1
  23. package/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
  24. package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.d.mts +1 -1
  25. package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.d.ts +1 -1
  26. package/ChartsRadiusAxis/chartsRadiusAxisClasses.d.mts +1 -1
  27. package/ChartsRadiusAxis/chartsRadiusAxisClasses.d.ts +1 -1
  28. package/ChartsRadiusAxis/createGetLabelTextAnchors.d.mts +6 -6
  29. package/ChartsRadiusAxis/createGetLabelTextAnchors.d.ts +6 -6
  30. package/ChartsReferenceLine/ChartsXReferenceLine.d.mts +1 -1
  31. package/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -1
  32. package/ChartsReferenceLine/ChartsYReferenceLine.d.mts +1 -1
  33. package/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -1
  34. package/ChartsRotationAxis/chartsRotationAxisClasses.d.mts +1 -1
  35. package/ChartsRotationAxis/chartsRotationAxisClasses.d.ts +1 -1
  36. package/ChartsTooltip/ChartTooltip.types.d.mts +2 -1
  37. package/ChartsTooltip/ChartTooltip.types.d.ts +2 -1
  38. package/ChartsTooltip/ChartsTooltipContainer.d.mts +4 -1
  39. package/ChartsTooltip/ChartsTooltipContainer.d.ts +4 -1
  40. package/ChartsTooltip/ChartsTooltipTable.d.mts +1 -1
  41. package/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
  42. package/ChartsTooltip/chartsTooltipClasses.d.mts +1 -1
  43. package/ChartsTooltip/chartsTooltipClasses.d.ts +1 -1
  44. package/ChartsTooltip/useItemTooltip.d.mts +1 -1
  45. package/ChartsTooltip/useItemTooltip.d.ts +1 -1
  46. package/ChartsXAxis/useAxisTicksProps.d.mts +2573 -2573
  47. package/ChartsXAxis/useAxisTicksProps.d.ts +2573 -2573
  48. package/ChartsXAxis/utilities.d.mts +1 -1
  49. package/ChartsXAxis/utilities.d.ts +1 -1
  50. package/ChartsYAxis/useAxisTicksProps.d.mts +2573 -2573
  51. package/ChartsYAxis/useAxisTicksProps.d.ts +2573 -2573
  52. package/ChartsYAxis/utilities.d.mts +1 -1
  53. package/ChartsYAxis/utilities.d.ts +1 -1
  54. package/LineChart/AreaPlot.d.mts +3 -3
  55. package/LineChart/AreaPlot.d.ts +3 -3
  56. package/LineChart/AreaPlot.js +4 -5
  57. package/LineChart/AreaPlot.mjs +4 -5
  58. package/LineChart/LinePlot.d.mts +3 -3
  59. package/LineChart/LinePlot.d.ts +3 -3
  60. package/LineChart/LinePlot.js +4 -5
  61. package/LineChart/LinePlot.mjs +4 -5
  62. package/LineChart/MarkPlot.d.mts +5 -4
  63. package/LineChart/MarkPlot.d.ts +5 -4
  64. package/LineChart/MarkPlot.js +1 -1
  65. package/LineChart/MarkPlot.mjs +1 -1
  66. package/LineChart/lineClasses.d.mts +1 -1
  67. package/LineChart/lineClasses.d.ts +1 -1
  68. package/LineChart/useLineItemClickHandler.d.mts +12 -0
  69. package/LineChart/useLineItemClickHandler.d.ts +12 -0
  70. package/LineChart/useLineItemClickHandler.js +54 -0
  71. package/LineChart/useLineItemClickHandler.mjs +48 -0
  72. package/PieChart/PieArcLabelPlot.d.mts +2 -1
  73. package/PieChart/PieArcLabelPlot.d.ts +2 -1
  74. package/PieChart/PieArcPlot.d.mts +2 -1
  75. package/PieChart/PieArcPlot.d.ts +2 -1
  76. package/PieChart/pieClasses.d.mts +1 -1
  77. package/PieChart/pieClasses.d.ts +1 -1
  78. package/RadarChart/RadarAxis/RadarAxis.utils.d.mts +5 -5
  79. package/RadarChart/RadarAxis/RadarAxis.utils.d.ts +5 -5
  80. package/RadarChart/RadarSeriesPlot/useInteractionAllItemProps.d.mts +1 -1
  81. package/RadarChart/RadarSeriesPlot/useInteractionAllItemProps.d.ts +1 -1
  82. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.mts +12 -12
  83. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +12 -12
  84. package/RadarChart/radarClasses.d.mts +1 -1
  85. package/RadarChart/radarClasses.d.ts +1 -1
  86. package/RadarChart/useRadarChartProps.d.mts +1 -1
  87. package/RadarChart/useRadarChartProps.d.ts +1 -1
  88. package/ScatterChart/ScatterChart.d.mts +2 -1
  89. package/ScatterChart/ScatterChart.d.ts +2 -1
  90. package/ScatterChart/ScatterMarker.types.d.mts +2 -1
  91. package/ScatterChart/ScatterMarker.types.d.ts +2 -1
  92. package/ScatterChart/scatterClasses.d.mts +1 -1
  93. package/ScatterChart/scatterClasses.d.ts +1 -1
  94. package/ScatterChart/useScatterPlotData.d.mts +1 -1
  95. package/ScatterChart/useScatterPlotData.d.ts +1 -1
  96. package/SparkLineChart/SparkLineChart.d.mts +1 -1
  97. package/SparkLineChart/SparkLineChart.d.ts +1 -1
  98. package/Toolbar/Toolbar.types.d.mts +2 -1
  99. package/Toolbar/Toolbar.types.d.ts +2 -1
  100. package/index.js +1 -1
  101. package/index.mjs +1 -1
  102. package/internals/colorScale.d.mts +1 -1
  103. package/internals/colorScale.d.ts +1 -1
  104. package/internals/configInit.d.mts +1 -1
  105. package/internals/configInit.d.ts +1 -1
  106. package/internals/consumeSlots.d.mts +1 -1
  107. package/internals/consumeSlots.d.ts +1 -1
  108. package/internals/consumeThemeProps.d.mts +1 -1
  109. package/internals/consumeThemeProps.d.ts +1 -1
  110. package/internals/createCommonKeyboardFocusHandler.d.mts +1 -1
  111. package/internals/createCommonKeyboardFocusHandler.d.ts +1 -1
  112. package/internals/getGraphemeCount.d.mts +2 -2
  113. package/internals/getGraphemeCount.d.ts +2 -2
  114. package/internals/getGroupingConfig.d.mts +1 -1
  115. package/internals/getGroupingConfig.d.ts +1 -1
  116. package/internals/identifierCleaner.d.mts +1 -1
  117. package/internals/identifierCleaner.d.ts +1 -1
  118. package/internals/invertScale.d.mts +1 -1
  119. package/internals/invertScale.d.ts +1 -1
  120. package/internals/plugins/corePlugins/useChartSeries/processSeries.d.mts +1 -1
  121. package/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +1 -1
  122. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.mts +2 -2
  123. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +2 -2
  124. package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.d.mts +3 -3
  125. package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.d.ts +3 -3
  126. package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.d.mts +1 -1
  127. package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.d.ts +1 -1
  128. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.mts +2 -2
  129. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +2 -2
  130. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.mts +1 -1
  131. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +1 -1
  132. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.mts +1 -1
  133. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +1 -1
  134. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +70 -70
  135. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +70 -70
  136. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.mts +78 -78
  137. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +78 -78
  138. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.mts +7 -7
  139. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +7 -7
  140. package/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.d.mts +1 -1
  141. package/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.d.ts +1 -1
  142. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.mts +1 -1
  143. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +1 -1
  144. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.mts +1 -1
  145. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.ts +1 -1
  146. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.mts +1 -1
  147. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +1 -1
  148. package/internals/plugins/featurePlugins/useProgressiveRendering/useProgressiveRendering.selectors.d.mts +1 -1
  149. package/internals/plugins/featurePlugins/useProgressiveRendering/useProgressiveRendering.selectors.d.ts +1 -1
  150. package/internals/seriesSelectorOfType.d.mts +6 -6
  151. package/internals/seriesSelectorOfType.d.ts +6 -6
  152. package/internals/sizeScale.d.mts +1 -1
  153. package/internals/sizeScale.d.ts +1 -1
  154. package/internals/sliceUntil.d.mts +2 -2
  155. package/internals/sliceUntil.d.ts +2 -2
  156. package/models/axis.d.mts +5 -4
  157. package/models/axis.d.ts +5 -4
  158. package/models/seriesType/config.d.mts +2 -2
  159. package/models/seriesType/config.d.ts +2 -2
  160. package/models/seriesType/index.d.mts +1 -1
  161. package/models/seriesType/index.d.ts +1 -1
  162. package/models/seriesType/line.d.mts +14 -1
  163. package/models/seriesType/line.d.ts +14 -1
  164. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
1
  import type { AxisConfig, ChartsYAxisProps } from "../models/axis.mjs";
2
- export declare const useUtilityClasses: (ownerState: AxisConfig<any, any, ChartsYAxisProps>) => Record<"root" | "line" | "label" | "tickContainer" | "tick" | "tickLabel", string>;
2
+ export declare const useUtilityClasses: (ownerState: AxisConfig<any, any, ChartsYAxisProps>) => Record<"label" | "line" | "root" | "tick" | "tickContainer" | "tickLabel", string>;
3
3
  export declare const TICK_LABEL_GAP = 2;
4
4
  export declare const AXIS_LABEL_TICK_LABEL_GAP = 2;
5
5
  export declare const defaultProps: {
@@ -1,5 +1,5 @@
1
1
  import type { AxisConfig, ChartsYAxisProps } from "../models/axis.js";
2
- export declare const useUtilityClasses: (ownerState: AxisConfig<any, any, ChartsYAxisProps>) => Record<"root" | "line" | "label" | "tickContainer" | "tick" | "tickLabel", string>;
2
+ export declare const useUtilityClasses: (ownerState: AxisConfig<any, any, ChartsYAxisProps>) => Record<"label" | "line" | "root" | "tick" | "tickContainer" | "tickLabel", string>;
3
3
  export declare const TICK_LABEL_GAP = 2;
4
4
  export declare const AXIS_LABEL_TICK_LABEL_GAP = 2;
5
5
  export declare const defaultProps: {
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
2
  import type { AreaElementProps, AreaElementSlotProps, AreaElementSlots } from "./AreaElement.mjs";
3
- import type { LineItemIdentifier } from "../models/seriesType/line.mjs";
3
+ import type { LineItemClickIdentifier } from "../models/seriesType/line.mjs";
4
4
  export interface AreaPlotSlots extends AreaElementSlots {}
5
5
  export interface AreaPlotSlotProps extends AreaElementSlotProps {}
6
6
  export interface AreaPlotProps extends React.SVGAttributes<SVGSVGElement>, Pick<AreaElementProps, 'slots' | 'slotProps' | 'skipAnimation'> {
7
7
  /**
8
8
  * Callback fired when a line area item is clicked.
9
9
  * @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
10
- * @param {LineItemIdentifier} lineItemIdentifier The line item identifier.
10
+ * @param {LineItemClickIdentifier} lineItemIdentifier The line item identifier.
11
11
  */
12
- onItemClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, lineItemIdentifier: LineItemIdentifier) => void;
12
+ onItemClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, lineItemIdentifier: LineItemClickIdentifier) => void;
13
13
  }
14
14
  /**
15
15
  * Demos:
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
2
  import type { AreaElementProps, AreaElementSlotProps, AreaElementSlots } from "./AreaElement.js";
3
- import type { LineItemIdentifier } from "../models/seriesType/line.js";
3
+ import type { LineItemClickIdentifier } from "../models/seriesType/line.js";
4
4
  export interface AreaPlotSlots extends AreaElementSlots {}
5
5
  export interface AreaPlotSlotProps extends AreaElementSlotProps {}
6
6
  export interface AreaPlotProps extends React.SVGAttributes<SVGSVGElement>, Pick<AreaElementProps, 'slots' | 'slotProps' | 'skipAnimation'> {
7
7
  /**
8
8
  * Callback fired when a line area item is clicked.
9
9
  * @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
10
- * @param {LineItemIdentifier} lineItemIdentifier The line item identifier.
10
+ * @param {LineItemClickIdentifier} lineItemIdentifier The line item identifier.
11
11
  */
12
- onItemClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, lineItemIdentifier: LineItemIdentifier) => void;
12
+ onItemClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, lineItemIdentifier: LineItemClickIdentifier) => void;
13
13
  }
14
14
  /**
15
15
  * Demos:
@@ -18,6 +18,7 @@ var _useSkipAnimation = require("../hooks/useSkipAnimation");
18
18
  var _useAxis = require("../hooks/useAxis");
19
19
  var _useInternalIsZoomInteracting = require("../internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting");
20
20
  var _useAreaPlotData = require("./useAreaPlotData");
21
+ var _useLineItemClickHandler = require("./useLineItemClickHandler");
21
22
  var _animation = require("../internals/animation/animation");
22
23
  var _lineClasses = require("./lineClasses");
23
24
  var _jsxRuntime = require("react/jsx-runtime");
@@ -66,6 +67,7 @@ function AreaPlot(props) {
66
67
  const skipAnimation = (0, _useSkipAnimation.useSkipAnimation)(isZoomInteracting || inSkipAnimation);
67
68
  const completedData = useAggregatedData();
68
69
  const classes = (0, _lineClasses.useUtilityClasses)();
70
+ const onAreaItemClick = (0, _useLineItemClickHandler.useLineItemClickHandler)(onItemClick);
69
71
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(AreaPlotRoot, (0, _extends2.default)({
70
72
  className: (0, _clsx.default)(classes.areaPlot, className)
71
73
  }, other, {
@@ -82,10 +84,7 @@ function AreaPlot(props) {
82
84
  gradientId: gradientId,
83
85
  slots: slots,
84
86
  slotProps: slotProps,
85
- onClick: onItemClick && (event => onItemClick(event, {
86
- type: 'line',
87
- seriesId
88
- })),
87
+ onClick: onAreaItemClick && (event => onAreaItemClick(event, seriesId)),
89
88
  skipAnimation: skipAnimation
90
89
  }, seriesId))
91
90
  }));
@@ -98,7 +97,7 @@ process.env.NODE_ENV !== "production" ? AreaPlot.propTypes /* remove-proptypes *
98
97
  /**
99
98
  * Callback fired when a line area item is clicked.
100
99
  * @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
101
- * @param {LineItemIdentifier} lineItemIdentifier The line item identifier.
100
+ * @param {LineItemClickIdentifier} lineItemIdentifier The line item identifier.
102
101
  */
103
102
  onItemClick: _propTypes.default.func,
104
103
  /**
@@ -12,6 +12,7 @@ import { useSkipAnimation } from "../hooks/useSkipAnimation.mjs";
12
12
  import { useXAxes, useYAxes } from "../hooks/useAxis.mjs";
13
13
  import { useInternalIsZoomInteracting } from "../internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting.mjs";
14
14
  import { useAreaPlotData } from "./useAreaPlotData.mjs";
15
+ import { useLineItemClickHandler } from "./useLineItemClickHandler.mjs";
15
16
  import { ANIMATION_DURATION_MS, ANIMATION_TIMING_FUNCTION } from "../internals/animation/animation.mjs";
16
17
  import { lineClasses, useUtilityClasses } from "./lineClasses.mjs";
17
18
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -59,6 +60,7 @@ function AreaPlot(props) {
59
60
  const skipAnimation = useSkipAnimation(isZoomInteracting || inSkipAnimation);
60
61
  const completedData = useAggregatedData();
61
62
  const classes = useUtilityClasses();
63
+ const onAreaItemClick = useLineItemClickHandler(onItemClick);
62
64
  return /*#__PURE__*/_jsx(AreaPlotRoot, _extends({
63
65
  className: clsx(classes.areaPlot, className)
64
66
  }, other, {
@@ -75,10 +77,7 @@ function AreaPlot(props) {
75
77
  gradientId: gradientId,
76
78
  slots: slots,
77
79
  slotProps: slotProps,
78
- onClick: onItemClick && (event => onItemClick(event, {
79
- type: 'line',
80
- seriesId
81
- })),
80
+ onClick: onAreaItemClick && (event => onAreaItemClick(event, seriesId)),
82
81
  skipAnimation: skipAnimation
83
82
  }, seriesId))
84
83
  }));
@@ -91,7 +90,7 @@ process.env.NODE_ENV !== "production" ? AreaPlot.propTypes /* remove-proptypes *
91
90
  /**
92
91
  * Callback fired when a line area item is clicked.
93
92
  * @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
94
- * @param {LineItemIdentifier} lineItemIdentifier The line item identifier.
93
+ * @param {LineItemClickIdentifier} lineItemIdentifier The line item identifier.
95
94
  */
96
95
  onItemClick: PropTypes.func,
97
96
  /**
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
2
  import type { LineElementProps, LineElementSlotProps, LineElementSlots } from "./LineElement.mjs";
3
- import type { LineItemIdentifier } from "../models/seriesType/line.mjs";
3
+ import type { LineItemClickIdentifier } from "../models/seriesType/line.mjs";
4
4
  export interface LinePlotSlots extends LineElementSlots {}
5
5
  export interface LinePlotSlotProps extends LineElementSlotProps {}
6
6
  export interface LinePlotProps extends React.SVGAttributes<SVGSVGElement>, Pick<LineElementProps, 'slots' | 'slotProps' | 'skipAnimation'> {
7
7
  /**
8
8
  * Callback fired when a line item is clicked.
9
9
  * @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
10
- * @param {LineItemIdentifier} lineItemIdentifier The line item identifier.
10
+ * @param {LineItemClickIdentifier} lineItemIdentifier The line item identifier.
11
11
  */
12
- onItemClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, lineItemIdentifier: LineItemIdentifier) => void;
12
+ onItemClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, lineItemIdentifier: LineItemClickIdentifier) => void;
13
13
  }
14
14
  /**
15
15
  * Demos:
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
2
  import type { LineElementProps, LineElementSlotProps, LineElementSlots } from "./LineElement.js";
3
- import type { LineItemIdentifier } from "../models/seriesType/line.js";
3
+ import type { LineItemClickIdentifier } from "../models/seriesType/line.js";
4
4
  export interface LinePlotSlots extends LineElementSlots {}
5
5
  export interface LinePlotSlotProps extends LineElementSlotProps {}
6
6
  export interface LinePlotProps extends React.SVGAttributes<SVGSVGElement>, Pick<LineElementProps, 'slots' | 'slotProps' | 'skipAnimation'> {
7
7
  /**
8
8
  * Callback fired when a line item is clicked.
9
9
  * @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
10
- * @param {LineItemIdentifier} lineItemIdentifier The line item identifier.
10
+ * @param {LineItemClickIdentifier} lineItemIdentifier The line item identifier.
11
11
  */
12
- onItemClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, lineItemIdentifier: LineItemIdentifier) => void;
12
+ onItemClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, lineItemIdentifier: LineItemClickIdentifier) => void;
13
13
  }
14
14
  /**
15
15
  * Demos:
@@ -18,6 +18,7 @@ var _useSkipAnimation = require("../hooks/useSkipAnimation");
18
18
  var _hooks = require("../hooks");
19
19
  var _useInternalIsZoomInteracting = require("../internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting");
20
20
  var _useLinePlotData = require("./useLinePlotData");
21
+ var _useLineItemClickHandler = require("./useLineItemClickHandler");
21
22
  var _animation = require("../internals/animation/animation");
22
23
  var _lineClasses = require("./lineClasses");
23
24
  var _jsxRuntime = require("react/jsx-runtime");
@@ -65,6 +66,7 @@ function LinePlot(props) {
65
66
  const skipAnimation = (0, _useSkipAnimation.useSkipAnimation)(isZoomInteracting || inSkipAnimation);
66
67
  const completedData = useAggregatedData();
67
68
  const classes = (0, _lineClasses.useUtilityClasses)();
69
+ const onLineItemClick = (0, _useLineItemClickHandler.useLineItemClickHandler)(onItemClick);
68
70
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(LinePlotRoot, (0, _extends2.default)({
69
71
  className: (0, _clsx.default)(classes.linePlot, className)
70
72
  }, other, {
@@ -85,10 +87,7 @@ function LinePlot(props) {
85
87
  skipAnimation: skipAnimation || isSampled,
86
88
  slots: slots,
87
89
  slotProps: slotProps,
88
- onClick: onItemClick && (event => onItemClick(event, {
89
- type: 'line',
90
- seriesId
91
- }))
90
+ onClick: onLineItemClick && (event => onLineItemClick(event, seriesId))
92
91
  }, seriesId);
93
92
  })
94
93
  }));
@@ -101,7 +100,7 @@ process.env.NODE_ENV !== "production" ? LinePlot.propTypes /* remove-proptypes *
101
100
  /**
102
101
  * Callback fired when a line item is clicked.
103
102
  * @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
104
- * @param {LineItemIdentifier} lineItemIdentifier The line item identifier.
103
+ * @param {LineItemClickIdentifier} lineItemIdentifier The line item identifier.
105
104
  */
106
105
  onItemClick: _propTypes.default.func,
107
106
  /**
@@ -12,6 +12,7 @@ import { useSkipAnimation } from "../hooks/useSkipAnimation.mjs";
12
12
  import { useXAxes, useYAxes } from "../hooks/index.mjs";
13
13
  import { useInternalIsZoomInteracting } from "../internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting.mjs";
14
14
  import { useLinePlotData } from "./useLinePlotData.mjs";
15
+ import { useLineItemClickHandler } from "./useLineItemClickHandler.mjs";
15
16
  import { ANIMATION_DURATION_MS, ANIMATION_TIMING_FUNCTION } from "../internals/animation/animation.mjs";
16
17
  import { lineClasses, useUtilityClasses } from "./lineClasses.mjs";
17
18
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -58,6 +59,7 @@ function LinePlot(props) {
58
59
  const skipAnimation = useSkipAnimation(isZoomInteracting || inSkipAnimation);
59
60
  const completedData = useAggregatedData();
60
61
  const classes = useUtilityClasses();
62
+ const onLineItemClick = useLineItemClickHandler(onItemClick);
61
63
  return /*#__PURE__*/_jsx(LinePlotRoot, _extends({
62
64
  className: clsx(classes.linePlot, className)
63
65
  }, other, {
@@ -78,10 +80,7 @@ function LinePlot(props) {
78
80
  skipAnimation: skipAnimation || isSampled,
79
81
  slots: slots,
80
82
  slotProps: slotProps,
81
- onClick: onItemClick && (event => onItemClick(event, {
82
- type: 'line',
83
- seriesId
84
- }))
83
+ onClick: onLineItemClick && (event => onLineItemClick(event, seriesId))
85
84
  }, seriesId);
86
85
  })
87
86
  }));
@@ -94,7 +93,7 @@ process.env.NODE_ENV !== "production" ? LinePlot.propTypes /* remove-proptypes *
94
93
  /**
95
94
  * Callback fired when a line item is clicked.
96
95
  * @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
97
- * @param {LineItemIdentifier} lineItemIdentifier The line item identifier.
96
+ * @param {LineItemClickIdentifier} lineItemIdentifier The line item identifier.
98
97
  */
99
98
  onItemClick: PropTypes.func,
100
99
  /**
@@ -1,12 +1,13 @@
1
1
  import * as React from 'react';
2
- import type { LineItemIdentifier } from "../models/seriesType/line.mjs";
2
+ import type { WithDataAttributes } from '@mui/utils/types';
3
+ import type { LineItemClickIdentifier } from "../models/seriesType/line.mjs";
3
4
  import type { MarkElementProps } from "./MarkElement.mjs";
4
5
  import type { MarkPropsOverrides } from "../models/chartsSlotsComponentsProps.mjs";
5
6
  export interface MarkPlotSlots {
6
7
  mark?: React.JSXElementConstructor<MarkElementProps & MarkPropsOverrides>;
7
8
  }
8
9
  export interface MarkPlotSlotProps {
9
- mark?: Partial<MarkElementProps> & MarkPropsOverrides;
10
+ mark?: WithDataAttributes<Partial<MarkElementProps> & MarkPropsOverrides>;
10
11
  }
11
12
  export interface MarkPlotProps extends React.SVGAttributes<SVGSVGElement>, Pick<MarkElementProps, 'skipAnimation'> {
12
13
  /**
@@ -22,9 +23,9 @@ export interface MarkPlotProps extends React.SVGAttributes<SVGSVGElement>, Pick<
22
23
  /**
23
24
  * Callback fired when a line mark item is clicked.
24
25
  * @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
25
- * @param {LineItemIdentifier} lineItemIdentifier The line mark item identifier.
26
+ * @param {LineItemClickIdentifier} lineItemIdentifier The line mark item identifier.
26
27
  */
27
- onItemClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, lineItemIdentifier: LineItemIdentifier) => void;
28
+ onItemClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, lineItemIdentifier: LineItemClickIdentifier) => void;
28
29
  }
29
30
  /**
30
31
  * Demos:
@@ -1,12 +1,13 @@
1
1
  import * as React from 'react';
2
- import type { LineItemIdentifier } from "../models/seriesType/line.js";
2
+ import type { WithDataAttributes } from '@mui/utils/types';
3
+ import type { LineItemClickIdentifier } from "../models/seriesType/line.js";
3
4
  import type { MarkElementProps } from "./MarkElement.js";
4
5
  import type { MarkPropsOverrides } from "../models/chartsSlotsComponentsProps.js";
5
6
  export interface MarkPlotSlots {
6
7
  mark?: React.JSXElementConstructor<MarkElementProps & MarkPropsOverrides>;
7
8
  }
8
9
  export interface MarkPlotSlotProps {
9
- mark?: Partial<MarkElementProps> & MarkPropsOverrides;
10
+ mark?: WithDataAttributes<Partial<MarkElementProps> & MarkPropsOverrides>;
10
11
  }
11
12
  export interface MarkPlotProps extends React.SVGAttributes<SVGSVGElement>, Pick<MarkElementProps, 'skipAnimation'> {
12
13
  /**
@@ -22,9 +23,9 @@ export interface MarkPlotProps extends React.SVGAttributes<SVGSVGElement>, Pick<
22
23
  /**
23
24
  * Callback fired when a line mark item is clicked.
24
25
  * @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
25
- * @param {LineItemIdentifier} lineItemIdentifier The line mark item identifier.
26
+ * @param {LineItemClickIdentifier} lineItemIdentifier The line mark item identifier.
26
27
  */
27
- onItemClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, lineItemIdentifier: LineItemIdentifier) => void;
28
+ onItemClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, lineItemIdentifier: LineItemClickIdentifier) => void;
28
29
  }
29
30
  /**
30
31
  * Demos:
@@ -135,7 +135,7 @@ process.env.NODE_ENV !== "production" ? MarkPlot.propTypes /* remove-proptypes *
135
135
  /**
136
136
  * Callback fired when a line mark item is clicked.
137
137
  * @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
138
- * @param {LineItemIdentifier} lineItemIdentifier The line mark item identifier.
138
+ * @param {LineItemClickIdentifier} lineItemIdentifier The line mark item identifier.
139
139
  */
140
140
  onItemClick: _propTypes.default.func,
141
141
  /**
@@ -128,7 +128,7 @@ process.env.NODE_ENV !== "production" ? MarkPlot.propTypes /* remove-proptypes *
128
128
  /**
129
129
  * Callback fired when a line mark item is clicked.
130
130
  * @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
131
- * @param {LineItemIdentifier} lineItemIdentifier The line mark item identifier.
131
+ * @param {LineItemClickIdentifier} lineItemIdentifier The line mark item identifier.
132
132
  */
133
133
  onItemClick: PropTypes.func,
134
134
  /**
@@ -22,4 +22,4 @@ export interface UseUtilityClassesOptions {
22
22
  skipAnimation?: boolean;
23
23
  classes?: Partial<LineClasses>;
24
24
  }
25
- export declare const useUtilityClasses: (options?: UseUtilityClassesOptions) => Record<"line" | "area" | "mark" | "highlight" | "areaPlot" | "linePlot" | "markPlot", string>;
25
+ export declare const useUtilityClasses: (options?: UseUtilityClassesOptions) => Record<"area" | "areaPlot" | "highlight" | "line" | "linePlot" | "mark" | "markPlot", string>;
@@ -22,4 +22,4 @@ export interface UseUtilityClassesOptions {
22
22
  skipAnimation?: boolean;
23
23
  classes?: Partial<LineClasses>;
24
24
  }
25
- export declare const useUtilityClasses: (options?: UseUtilityClassesOptions) => Record<"line" | "area" | "mark" | "highlight" | "areaPlot" | "linePlot" | "markPlot", string>;
25
+ export declare const useUtilityClasses: (options?: UseUtilityClassesOptions) => Record<"area" | "areaPlot" | "highlight" | "line" | "linePlot" | "mark" | "markPlot", string>;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import type { LineItemClickIdentifier } from "../models/seriesType/line.mjs";
3
+ import type { SeriesId } from "../models/seriesType/common.mjs";
4
+ /**
5
+ * Creates a click handler for line and area paths that enriches the item
6
+ * identifier with the `dataIndex` of the closest data point along the x-axis.
7
+ *
8
+ * The index is derived from the click position, using the same logic as the
9
+ * axis interaction (tooltip, highlight, `onAxisClick`). The callback is not
10
+ * fired when the click position cannot be associated with a data point.
11
+ */
12
+ export declare function useLineItemClickHandler(onItemClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, lineItemIdentifier: LineItemClickIdentifier) => void): ((event: React.MouseEvent<SVGElement, MouseEvent>, seriesId: SeriesId) => void) | undefined;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import type { LineItemClickIdentifier } from "../models/seriesType/line.js";
3
+ import type { SeriesId } from "../models/seriesType/common.js";
4
+ /**
5
+ * Creates a click handler for line and area paths that enriches the item
6
+ * identifier with the `dataIndex` of the closest data point along the x-axis.
7
+ *
8
+ * The index is derived from the click position, using the same logic as the
9
+ * axis interaction (tooltip, highlight, `onAxisClick`). The callback is not
10
+ * fired when the click position cannot be associated with a data point.
11
+ */
12
+ export declare function useLineItemClickHandler(onItemClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, lineItemIdentifier: LineItemClickIdentifier) => void): ((event: React.MouseEvent<SVGElement, MouseEvent>, seriesId: SeriesId) => void) | undefined;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.useLineItemClickHandler = useLineItemClickHandler;
9
+ var React = _interopRequireWildcard(require("react"));
10
+ var _useChartsLayerContainerRef = require("../hooks/useChartsLayerContainerRef");
11
+ var _useAxis = require("../hooks/useAxis");
12
+ var _useLineSeries = require("../hooks/useLineSeries");
13
+ var _getChartPoint = require("../internals/getChartPoint");
14
+ var _getAxisValue = require("../internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue");
15
+ /**
16
+ * Creates a click handler for line and area paths that enriches the item
17
+ * identifier with the `dataIndex` of the closest data point along the x-axis.
18
+ *
19
+ * The index is derived from the click position, using the same logic as the
20
+ * axis interaction (tooltip, highlight, `onAxisClick`). The callback is not
21
+ * fired when the click position cannot be associated with a data point.
22
+ */
23
+ function useLineItemClickHandler(onItemClick) {
24
+ const chartsLayerContainerRef = (0, _useChartsLayerContainerRef.useChartsLayerContainerRef)();
25
+ const {
26
+ xAxis: xAxes,
27
+ xAxisIds
28
+ } = (0, _useAxis.useXAxes)();
29
+ const seriesData = (0, _useLineSeries.useLineSeriesContext)();
30
+ const defaultXAxisId = xAxisIds[0];
31
+ return React.useMemo(() => {
32
+ if (!onItemClick) {
33
+ return undefined;
34
+ }
35
+ return (event, seriesId) => {
36
+ const element = chartsLayerContainerRef.current;
37
+ const xAxisId = seriesData?.series[seriesId]?.xAxisId ?? defaultXAxisId;
38
+ const xAxis = xAxisId === undefined ? undefined : xAxes[xAxisId];
39
+ if (element === null || xAxis === undefined) {
40
+ return;
41
+ }
42
+ const point = (0, _getChartPoint.getChartPoint)(element, event);
43
+ const dataIndex = (0, _getAxisValue.getAxisIndex)(xAxis, point.x);
44
+ if (dataIndex === -1) {
45
+ return;
46
+ }
47
+ onItemClick(event, {
48
+ type: 'line',
49
+ seriesId,
50
+ dataIndex
51
+ });
52
+ };
53
+ }, [onItemClick, chartsLayerContainerRef, seriesData, defaultXAxisId, xAxes]);
54
+ }
@@ -0,0 +1,48 @@
1
+ 'use client';
2
+
3
+ import * as React from 'react';
4
+ import { useChartsLayerContainerRef } from "../hooks/useChartsLayerContainerRef.mjs";
5
+ import { useXAxes } from "../hooks/useAxis.mjs";
6
+ import { useLineSeriesContext } from "../hooks/useLineSeries.mjs";
7
+ import { getChartPoint } from "../internals/getChartPoint.mjs";
8
+ import { getAxisIndex } from "../internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.mjs";
9
+ /**
10
+ * Creates a click handler for line and area paths that enriches the item
11
+ * identifier with the `dataIndex` of the closest data point along the x-axis.
12
+ *
13
+ * The index is derived from the click position, using the same logic as the
14
+ * axis interaction (tooltip, highlight, `onAxisClick`). The callback is not
15
+ * fired when the click position cannot be associated with a data point.
16
+ */
17
+ export function useLineItemClickHandler(onItemClick) {
18
+ const chartsLayerContainerRef = useChartsLayerContainerRef();
19
+ const {
20
+ xAxis: xAxes,
21
+ xAxisIds
22
+ } = useXAxes();
23
+ const seriesData = useLineSeriesContext();
24
+ const defaultXAxisId = xAxisIds[0];
25
+ return React.useMemo(() => {
26
+ if (!onItemClick) {
27
+ return undefined;
28
+ }
29
+ return (event, seriesId) => {
30
+ const element = chartsLayerContainerRef.current;
31
+ const xAxisId = seriesData?.series[seriesId]?.xAxisId ?? defaultXAxisId;
32
+ const xAxis = xAxisId === undefined ? undefined : xAxes[xAxisId];
33
+ if (element === null || xAxis === undefined) {
34
+ return;
35
+ }
36
+ const point = getChartPoint(element, event);
37
+ const dataIndex = getAxisIndex(xAxis, point.x);
38
+ if (dataIndex === -1) {
39
+ return;
40
+ }
41
+ onItemClick(event, {
42
+ type: 'line',
43
+ seriesId,
44
+ dataIndex
45
+ });
46
+ };
47
+ }, [onItemClick, chartsLayerContainerRef, seriesData, defaultXAxisId, xAxes]);
48
+ }
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import type { WithDataAttributes } from '@mui/utils/types';
2
3
  import type { ComputedPieRadius, DefaultizedPieSeriesType } from "../models/seriesType/pie.mjs";
3
4
  import type { PieArcLabelProps } from "./PieArcLabel.mjs";
4
5
  import type { PieArcLabelPropsOverrides } from "../models/chartsSlotsComponentsProps.mjs";
@@ -6,7 +7,7 @@ export interface PieArcLabelPlotSlots {
6
7
  pieArcLabel?: React.JSXElementConstructor<PieArcLabelProps & PieArcLabelPropsOverrides>;
7
8
  }
8
9
  export interface PieArcLabelPlotSlotProps {
9
- pieArcLabel?: Partial<PieArcLabelProps> & PieArcLabelPropsOverrides;
10
+ pieArcLabel?: WithDataAttributes<Partial<PieArcLabelProps> & PieArcLabelPropsOverrides>;
10
11
  }
11
12
  export interface PieArcLabelPlotProps extends Pick<DefaultizedPieSeriesType, 'data' | 'faded' | 'highlighted' | 'cornerRadius' | 'paddingAngle' | 'arcLabel' | 'arcLabelMinAngle'>, ComputedPieRadius {
12
13
  /**
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import type { WithDataAttributes } from '@mui/utils/types';
2
3
  import type { ComputedPieRadius, DefaultizedPieSeriesType } from "../models/seriesType/pie.js";
3
4
  import type { PieArcLabelProps } from "./PieArcLabel.js";
4
5
  import type { PieArcLabelPropsOverrides } from "../models/chartsSlotsComponentsProps.js";
@@ -6,7 +7,7 @@ export interface PieArcLabelPlotSlots {
6
7
  pieArcLabel?: React.JSXElementConstructor<PieArcLabelProps & PieArcLabelPropsOverrides>;
7
8
  }
8
9
  export interface PieArcLabelPlotSlotProps {
9
- pieArcLabel?: Partial<PieArcLabelProps> & PieArcLabelPropsOverrides;
10
+ pieArcLabel?: WithDataAttributes<Partial<PieArcLabelProps> & PieArcLabelPropsOverrides>;
10
11
  }
11
12
  export interface PieArcLabelPlotProps extends Pick<DefaultizedPieSeriesType, 'data' | 'faded' | 'highlighted' | 'cornerRadius' | 'paddingAngle' | 'arcLabel' | 'arcLabelMinAngle'>, ComputedPieRadius {
12
13
  /**
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import type { WithDataAttributes } from '@mui/utils/types';
2
3
  import type { PieArcProps } from "./PieArc.mjs";
3
4
  import type { ComputedPieRadius, DefaultizedPieSeriesType, DefaultizedPieValueType, PieItemIdentifier } from "../models/seriesType/pie.mjs";
4
5
  import type { PieArcPropsOverrides } from "../models/chartsSlotsComponentsProps.mjs";
@@ -6,7 +7,7 @@ export interface PieArcPlotSlots {
6
7
  pieArc?: React.JSXElementConstructor<PieArcProps & PieArcPropsOverrides>;
7
8
  }
8
9
  export interface PieArcPlotSlotProps {
9
- pieArc?: Partial<PieArcProps> & PieArcPropsOverrides;
10
+ pieArc?: WithDataAttributes<Partial<PieArcProps> & PieArcPropsOverrides>;
10
11
  }
11
12
  export interface PieArcPlotProps extends Pick<DefaultizedPieSeriesType, 'data' | 'faded' | 'highlighted' | 'cornerRadius' | 'paddingAngle'>, ComputedPieRadius {
12
13
  /**
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import type { WithDataAttributes } from '@mui/utils/types';
2
3
  import type { PieArcProps } from "./PieArc.js";
3
4
  import type { ComputedPieRadius, DefaultizedPieSeriesType, DefaultizedPieValueType, PieItemIdentifier } from "../models/seriesType/pie.js";
4
5
  import type { PieArcPropsOverrides } from "../models/chartsSlotsComponentsProps.js";
@@ -6,7 +7,7 @@ export interface PieArcPlotSlots {
6
7
  pieArc?: React.JSXElementConstructor<PieArcProps & PieArcPropsOverrides>;
7
8
  }
8
9
  export interface PieArcPlotSlotProps {
9
- pieArc?: Partial<PieArcProps> & PieArcPropsOverrides;
10
+ pieArc?: WithDataAttributes<Partial<PieArcProps> & PieArcPropsOverrides>;
10
11
  }
11
12
  export interface PieArcPlotProps extends Pick<DefaultizedPieSeriesType, 'data' | 'faded' | 'highlighted' | 'cornerRadius' | 'paddingAngle'>, ComputedPieRadius {
12
13
  /**
@@ -30,4 +30,4 @@ export declare const pieClasses: PieClasses;
30
30
  export declare const useUtilityClasses: (options?: {
31
31
  classes?: Partial<PieClasses>;
32
32
  skipAnimation?: boolean;
33
- }) => Record<"root" | "series" | "seriesLabels" | "arcLabel" | "arc" | "focusIndicator", string>;
33
+ }) => Record<"arc" | "arcLabel" | "focusIndicator" | "root" | "series" | "seriesLabels", string>;
@@ -30,4 +30,4 @@ export declare const pieClasses: PieClasses;
30
30
  export declare const useUtilityClasses: (options?: {
31
31
  classes?: Partial<PieClasses>;
32
32
  skipAnimation?: boolean;
33
- }) => Record<"root" | "series" | "seriesLabels" | "arcLabel" | "arc" | "focusIndicator", string>;
33
+ }) => Record<"arc" | "arcLabel" | "focusIndicator" | "root" | "series" | "seriesLabels", string>;
@@ -5,16 +5,16 @@ interface GetLabelAttributesParams extends Required<Pick<RadarAxisProps, 'labelO
5
5
  angle: number;
6
6
  }
7
7
  export declare function getLabelAttributes(params: GetLabelAttributesParams): {
8
+ transform?: undefined;
8
9
  x: number;
9
10
  y: number;
10
- textAnchor: "start" | "end" | "inherit" | "middle" | undefined;
11
- dominantBaseline: "inherit" | "auto" | "text-before-edge" | "middle" | "central" | "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "use-script" | "no-change" | "reset-size" | undefined;
12
- transform?: undefined;
11
+ textAnchor: "end" | "inherit" | "middle" | "start" | undefined;
12
+ dominantBaseline: "alphabetic" | "auto" | "central" | "hanging" | "ideographic" | "inherit" | "mathematical" | "middle" | "no-change" | "reset-size" | "text-after-edge" | "text-before-edge" | "use-script" | undefined;
13
13
  } | {
14
14
  x: number;
15
15
  y: number;
16
- textAnchor: "start" | "end" | "inherit" | "middle" | undefined;
17
- dominantBaseline: "inherit" | "auto" | "text-before-edge" | "middle" | "central" | "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "use-script" | "no-change" | "reset-size" | undefined;
16
+ textAnchor: "end" | "inherit" | "middle" | "start" | undefined;
17
+ dominantBaseline: "alphabetic" | "auto" | "central" | "hanging" | "ideographic" | "inherit" | "mathematical" | "middle" | "no-change" | "reset-size" | "text-after-edge" | "text-before-edge" | "use-script" | undefined;
18
18
  transform: string;
19
19
  };
20
20
  export {};
@@ -5,16 +5,16 @@ interface GetLabelAttributesParams extends Required<Pick<RadarAxisProps, 'labelO
5
5
  angle: number;
6
6
  }
7
7
  export declare function getLabelAttributes(params: GetLabelAttributesParams): {
8
+ transform?: undefined;
8
9
  x: number;
9
10
  y: number;
10
- textAnchor: "start" | "end" | "inherit" | "middle" | undefined;
11
- dominantBaseline: "inherit" | "auto" | "text-before-edge" | "middle" | "central" | "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "use-script" | "no-change" | "reset-size" | undefined;
12
- transform?: undefined;
11
+ textAnchor: "end" | "inherit" | "middle" | "start" | undefined;
12
+ dominantBaseline: "alphabetic" | "auto" | "central" | "hanging" | "ideographic" | "inherit" | "mathematical" | "middle" | "no-change" | "reset-size" | "text-after-edge" | "text-before-edge" | "use-script" | undefined;
13
13
  } | {
14
14
  x: number;
15
15
  y: number;
16
- textAnchor: "start" | "end" | "inherit" | "middle" | undefined;
17
- dominantBaseline: "inherit" | "auto" | "text-before-edge" | "middle" | "central" | "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "use-script" | "no-change" | "reset-size" | undefined;
16
+ textAnchor: "end" | "inherit" | "middle" | "start" | undefined;
17
+ dominantBaseline: "alphabetic" | "auto" | "central" | "hanging" | "ideographic" | "inherit" | "mathematical" | "middle" | "no-change" | "reset-size" | "text-after-edge" | "text-before-edge" | "use-script" | undefined;
18
18
  transform: string;
19
19
  };
20
20
  export {};
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import type { SeriesItemIdentifierWithData } from "../../models/seriesType/index.mjs";
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;
@@ -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;