@mui/x-charts 9.0.0-alpha.4 → 9.0.0-beta.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 (242) hide show
  1. package/BarChart/BarChart.js +19 -28
  2. package/BarChart/BarChart.mjs +19 -28
  3. package/BarChart/BarElement.js +3 -5
  4. package/BarChart/BarElement.mjs +3 -5
  5. package/BarChart/BarLabel/BarLabelPlot.d.mts +0 -2
  6. package/BarChart/BarLabel/BarLabelPlot.d.ts +0 -2
  7. package/BarChart/BarLabel/BarLabelPlot.js +2 -3
  8. package/BarChart/BarLabel/BarLabelPlot.mjs +2 -3
  9. package/BarChart/BarPlot.d.mts +2 -12
  10. package/BarChart/BarPlot.d.ts +2 -12
  11. package/BarChart/BarPlot.js +4 -18
  12. package/BarChart/BarPlot.mjs +4 -18
  13. package/BarChart/BatchBarPlot/BatchBarPlot.js +0 -27
  14. package/BarChart/BatchBarPlot/BatchBarPlot.mjs +0 -27
  15. package/BarChart/IndividualBarPlot.d.mts +1 -2
  16. package/BarChart/IndividualBarPlot.d.ts +1 -2
  17. package/BarChart/IndividualBarPlot.js +5 -10
  18. package/BarChart/IndividualBarPlot.mjs +5 -10
  19. package/BarChart/seriesConfig/bar/descriptionGetter.d.mts +3 -0
  20. package/BarChart/seriesConfig/bar/descriptionGetter.d.ts +3 -0
  21. package/BarChart/seriesConfig/bar/descriptionGetter.js +36 -0
  22. package/BarChart/seriesConfig/bar/descriptionGetter.mjs +30 -0
  23. package/BarChart/seriesConfig/index.js +5 -1
  24. package/BarChart/seriesConfig/index.mjs +5 -1
  25. package/BarChart/useBarChartProps.js +2 -4
  26. package/BarChart/useBarChartProps.mjs +2 -4
  27. package/CHANGELOG.md +107 -1
  28. package/ChartsContainer/ChartsContainer.js +29 -29
  29. package/ChartsContainer/ChartsContainer.mjs +29 -29
  30. package/ChartsLayerContainer/ChartsLayerContainer.js +6 -2
  31. package/ChartsLayerContainer/ChartsLayerContainer.mjs +7 -2
  32. package/ChartsSvgLayer/ChartsSvgLayer.js +2 -2
  33. package/ChartsSvgLayer/ChartsSvgLayer.mjs +2 -2
  34. package/ChartsXAxis/ChartsGroupedXAxisTicks.js +12 -3
  35. package/ChartsXAxis/ChartsGroupedXAxisTicks.mjs +12 -3
  36. package/ChartsXAxis/useAxisTicksProps.d.mts +89 -89
  37. package/ChartsXAxis/useAxisTicksProps.d.ts +89 -89
  38. package/ChartsYAxis/ChartsGroupedYAxisTicks.js +12 -3
  39. package/ChartsYAxis/ChartsGroupedYAxisTicks.mjs +12 -3
  40. package/ChartsYAxis/useAxisTicksProps.d.mts +89 -89
  41. package/ChartsYAxis/useAxisTicksProps.d.ts +89 -89
  42. package/Gauge/Gauge.js +0 -4
  43. package/Gauge/Gauge.mjs +0 -4
  44. package/Gauge/GaugeContainer.d.mts +1 -1
  45. package/Gauge/GaugeContainer.d.ts +1 -1
  46. package/Gauge/GaugeContainer.js +0 -4
  47. package/Gauge/GaugeContainer.mjs +0 -4
  48. package/LineChart/AreaElement.js +5 -1
  49. package/LineChart/AreaElement.mjs +5 -1
  50. package/LineChart/CircleMarkElement.js +8 -5
  51. package/LineChart/CircleMarkElement.mjs +8 -5
  52. package/LineChart/LineChart.js +21 -19
  53. package/LineChart/LineChart.mjs +21 -19
  54. package/LineChart/LineElement.js +5 -1
  55. package/LineChart/LineElement.mjs +5 -1
  56. package/LineChart/MarkElement.js +7 -4
  57. package/LineChart/MarkElement.mjs +7 -4
  58. package/LineChart/seriesConfig/curveEvaluation.d.mts +11 -0
  59. package/LineChart/seriesConfig/curveEvaluation.d.ts +11 -0
  60. package/LineChart/seriesConfig/curveEvaluation.js +134 -0
  61. package/LineChart/seriesConfig/curveEvaluation.mjs +129 -0
  62. package/LineChart/seriesConfig/descriptionGetter.d.mts +3 -0
  63. package/LineChart/seriesConfig/descriptionGetter.d.ts +3 -0
  64. package/LineChart/seriesConfig/descriptionGetter.js +37 -0
  65. package/LineChart/seriesConfig/descriptionGetter.mjs +31 -0
  66. package/LineChart/seriesConfig/getItemAtPosition.d.mts +7 -0
  67. package/LineChart/seriesConfig/getItemAtPosition.d.ts +7 -0
  68. package/LineChart/seriesConfig/getItemAtPosition.js +356 -0
  69. package/LineChart/seriesConfig/getItemAtPosition.mjs +351 -0
  70. package/LineChart/seriesConfig/index.js +4 -0
  71. package/LineChart/seriesConfig/index.mjs +4 -0
  72. package/PieChart/PieArc.js +2 -3
  73. package/PieChart/PieArc.mjs +2 -3
  74. package/PieChart/seriesConfig/descriptionGetter.d.mts +3 -0
  75. package/PieChart/seriesConfig/descriptionGetter.d.ts +3 -0
  76. package/PieChart/seriesConfig/descriptionGetter.js +26 -0
  77. package/PieChart/seriesConfig/descriptionGetter.mjs +20 -0
  78. package/PieChart/seriesConfig/index.js +2 -0
  79. package/PieChart/seriesConfig/index.mjs +2 -0
  80. package/RadarChart/seriesConfig/descriptionGetter.d.mts +3 -0
  81. package/RadarChart/seriesConfig/descriptionGetter.d.ts +3 -0
  82. package/RadarChart/seriesConfig/descriptionGetter.js +37 -0
  83. package/RadarChart/seriesConfig/descriptionGetter.mjs +31 -0
  84. package/RadarChart/seriesConfig/index.js +2 -0
  85. package/RadarChart/seriesConfig/index.mjs +2 -0
  86. package/ScatterChart/ScatterChart.js +18 -18
  87. package/ScatterChart/ScatterChart.mjs +18 -18
  88. package/ScatterChart/seriesConfig/descriptionGetter.d.mts +3 -0
  89. package/ScatterChart/seriesConfig/descriptionGetter.d.ts +3 -0
  90. package/ScatterChart/seriesConfig/descriptionGetter.js +34 -0
  91. package/ScatterChart/seriesConfig/descriptionGetter.mjs +28 -0
  92. package/ScatterChart/seriesConfig/index.js +2 -0
  93. package/ScatterChart/seriesConfig/index.mjs +2 -0
  94. package/SparkLineChart/SparkLineChart.js +21 -19
  95. package/SparkLineChart/SparkLineChart.mjs +21 -19
  96. package/constants/index.js +0 -2
  97. package/constants/index.mjs +0 -2
  98. package/hooks/useInteractionItemProps.d.mts +1 -1
  99. package/hooks/useInteractionItemProps.d.ts +1 -1
  100. package/hooks/useInteractionItemProps.js +3 -3
  101. package/hooks/useInteractionItemProps.mjs +3 -3
  102. package/index.js +1 -1
  103. package/index.mjs +1 -1
  104. package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.d.mts +5 -0
  105. package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.d.ts +5 -0
  106. package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.js +100 -0
  107. package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.mjs +96 -0
  108. package/internals/components/ChartsAccessibilityProxy/index.d.mts +1 -0
  109. package/internals/components/ChartsAccessibilityProxy/index.d.ts +1 -0
  110. package/internals/components/ChartsAccessibilityProxy/index.js +16 -0
  111. package/internals/components/ChartsAccessibilityProxy/index.mjs +1 -0
  112. package/internals/components/ChartsAccessibilityProxy/useDescription.d.mts +5 -0
  113. package/internals/components/ChartsAccessibilityProxy/useDescription.d.ts +5 -0
  114. package/internals/components/ChartsAccessibilityProxy/useDescription.js +71 -0
  115. package/internals/components/ChartsAccessibilityProxy/useDescription.mjs +66 -0
  116. package/internals/getChartPoint.js +18 -1
  117. package/internals/getChartPoint.mjs +18 -1
  118. package/internals/plugins/corePlugins/corePlugins.d.mts +2 -2
  119. package/internals/plugins/corePlugins/corePlugins.d.ts +2 -2
  120. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.mts +2 -1
  121. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.ts +2 -1
  122. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.mts +2 -1
  123. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +2 -1
  124. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.mts +22 -7
  125. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.ts +22 -7
  126. package/internals/plugins/corePlugins/useChartSeries/index.d.mts +2 -1
  127. package/internals/plugins/corePlugins/useChartSeries/index.d.ts +2 -1
  128. package/internals/plugins/corePlugins/useChartSeries/index.js +12 -0
  129. package/internals/plugins/corePlugins/useChartSeries/index.mjs +2 -1
  130. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.mts +1 -8
  131. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +1 -8
  132. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +1 -11
  133. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.mjs +1 -11
  134. package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.d.mts +8 -0
  135. package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.d.ts +8 -0
  136. package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.js +19 -0
  137. package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.mjs +14 -0
  138. package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.d.mts +5 -0
  139. package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.d.ts +5 -0
  140. package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.js +5 -0
  141. package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.mjs +1 -0
  142. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.mts +1 -0
  143. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.ts +1 -0
  144. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.js +11 -0
  145. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.mjs +1 -0
  146. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.mts +2 -0
  147. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.ts +2 -0
  148. package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.d.mts +4 -10
  149. package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.d.ts +4 -10
  150. package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.js +28 -19
  151. package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.mjs +28 -18
  152. package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.d.mts +5 -0
  153. package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.d.ts +5 -0
  154. package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.js +11 -0
  155. package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.mjs +5 -0
  156. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.d.mts +33 -0
  157. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.d.ts +33 -0
  158. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.js +318 -0
  159. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.mjs +311 -0
  160. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.mts +5 -1
  161. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +5 -1
  162. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +63 -8
  163. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.mjs +62 -8
  164. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +12 -4
  165. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.mjs +12 -4
  166. package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.mts +12 -2
  167. package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +12 -2
  168. package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +28 -0
  169. package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.mjs +27 -0
  170. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.mts +3 -1
  171. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +3 -1
  172. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +22 -2
  173. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.mjs +3 -1
  174. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.d.mts +30 -0
  175. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.d.ts +30 -0
  176. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.js +96 -0
  177. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.mjs +91 -0
  178. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.d.mts +16 -0
  179. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.d.ts +16 -0
  180. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.js +36 -0
  181. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.mjs +31 -0
  182. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.d.mts +15 -0
  183. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.d.ts +15 -0
  184. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.js +45 -0
  185. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.mjs +39 -0
  186. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.mts +11 -0
  187. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +11 -0
  188. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +53 -11
  189. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.mjs +52 -11
  190. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +4 -9
  191. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +4 -9
  192. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +16 -40
  193. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.mjs +19 -43
  194. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.js +20 -2
  195. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.mjs +20 -2
  196. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +36 -30
  197. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.mjs +36 -30
  198. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.mts +8 -0
  199. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +8 -0
  200. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +9 -2
  201. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.mjs +9 -2
  202. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.mts +6 -0
  203. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +6 -0
  204. package/internals/store/useCharts.d.mts +1 -1
  205. package/internals/store/useCharts.d.ts +1 -1
  206. package/locales/elGR.d.mts +76 -0
  207. package/locales/elGR.d.ts +76 -0
  208. package/locales/elGR.js +89 -0
  209. package/locales/elGR.mjs +89 -0
  210. package/locales/enUS.d.mts +76 -0
  211. package/locales/enUS.d.ts +76 -0
  212. package/locales/enUS.js +89 -1
  213. package/locales/enUS.mjs +89 -1
  214. package/locales/frFR.d.mts +76 -0
  215. package/locales/frFR.d.ts +76 -0
  216. package/locales/frFR.js +89 -0
  217. package/locales/frFR.mjs +89 -0
  218. package/locales/nbNO.d.mts +76 -0
  219. package/locales/nbNO.d.ts +76 -0
  220. package/locales/nbNO.js +89 -0
  221. package/locales/nbNO.mjs +89 -0
  222. package/locales/ptBR.d.mts +76 -0
  223. package/locales/ptBR.d.ts +76 -0
  224. package/locales/ptBR.js +89 -0
  225. package/locales/ptBR.mjs +89 -0
  226. package/locales/ptPT.d.mts +76 -0
  227. package/locales/ptPT.d.ts +76 -0
  228. package/locales/ptPT.js +89 -0
  229. package/locales/ptPT.mjs +89 -0
  230. package/locales/svSE.d.mts +76 -0
  231. package/locales/svSE.d.ts +76 -0
  232. package/locales/svSE.js +89 -0
  233. package/locales/svSE.mjs +89 -0
  234. package/locales/utils/chartsLocaleTextApi.d.mts +189 -0
  235. package/locales/utils/chartsLocaleTextApi.d.ts +189 -0
  236. package/locales/utils/getChartsLocalization.d.mts +76 -0
  237. package/locales/utils/getChartsLocalization.d.ts +76 -0
  238. package/models/axis.d.mts +11 -5
  239. package/models/axis.d.ts +11 -5
  240. package/models/seriesType/config.d.mts +29 -0
  241. package/models/seriesType/config.d.ts +29 -0
  242. package/package.json +85 -85
@@ -116,6 +116,82 @@ export declare const getChartsLocalization: (chartsTranslations: Partial<ChartsL
116
116
  high?: string | undefined;
117
117
  low?: string | undefined;
118
118
  close?: string | undefined;
119
+ a11yNoValue?: string | undefined;
120
+ a11yConnector?: string | undefined;
121
+ barDescription?: ((params: {
122
+ value: number | null;
123
+ formattedValue: string;
124
+ categoryValue: string | number | null;
125
+ formattedCategoryValue: string;
126
+ seriesLabel?: string;
127
+ }) => string) | undefined;
128
+ lineDescription?: ((params: {
129
+ x: number | null;
130
+ y: number | null;
131
+ formattedXValue: string;
132
+ formattedYValue: string;
133
+ seriesLabel?: string;
134
+ }) => string) | undefined;
135
+ scatterDescription?: ((params: {
136
+ x: number | null;
137
+ y: number | null;
138
+ formattedXValue: string;
139
+ formattedYValue: string;
140
+ seriesLabel?: string;
141
+ }) => string) | undefined;
142
+ pieDescription?: ((params: {
143
+ value: number | null;
144
+ totalValue: number;
145
+ formattedValue: string;
146
+ seriesLabel?: string;
147
+ }) => string) | undefined;
148
+ radarDescription?: ((params: {
149
+ value: number | null;
150
+ formattedValue: string;
151
+ categoryValue: string | number | null;
152
+ formattedCategoryValue: string;
153
+ seriesLabel?: string;
154
+ }) => string) | undefined;
155
+ funnelDescription?: ((params: {
156
+ value: number | null;
157
+ formattedValue: string;
158
+ seriesLabel?: string;
159
+ }) => string) | undefined;
160
+ heatmapDescription?: ((params: {
161
+ x: number | string | null;
162
+ y: number | string | null;
163
+ value: number | null;
164
+ formattedValue: string;
165
+ formattedXValue: string;
166
+ formattedYValue: string;
167
+ }) => string) | undefined;
168
+ sankeyNodeDescription?: ((params: {
169
+ value: number | null;
170
+ formattedValue: string;
171
+ nodeLabel: string;
172
+ }) => string) | undefined;
173
+ sankeyLinkDescription?: ((params: {
174
+ value: number | null;
175
+ formattedValue: string;
176
+ sourceLabel: string;
177
+ targetLabel: string;
178
+ }) => string) | undefined;
179
+ rangeBarDescription?: ((params: {
180
+ value: [number, number] | null;
181
+ formattedValue: string;
182
+ categoryValue: string | number | null;
183
+ formattedCategoryValue: string;
184
+ seriesLabel?: string;
185
+ }) => string) | undefined;
186
+ ohlcDescription?: ((params: {
187
+ open: number | null;
188
+ high: number | null;
189
+ low: number | null;
190
+ close: number | null;
191
+ date: Date | null;
192
+ formattedDate: string;
193
+ seriesLabel?: string;
194
+ }) => string) | undefined;
119
195
  };
120
196
  };
121
197
  };
@@ -116,6 +116,82 @@ export declare const getChartsLocalization: (chartsTranslations: Partial<ChartsL
116
116
  high?: string | undefined;
117
117
  low?: string | undefined;
118
118
  close?: string | undefined;
119
+ a11yNoValue?: string | undefined;
120
+ a11yConnector?: string | undefined;
121
+ barDescription?: ((params: {
122
+ value: number | null;
123
+ formattedValue: string;
124
+ categoryValue: string | number | null;
125
+ formattedCategoryValue: string;
126
+ seriesLabel?: string;
127
+ }) => string) | undefined;
128
+ lineDescription?: ((params: {
129
+ x: number | null;
130
+ y: number | null;
131
+ formattedXValue: string;
132
+ formattedYValue: string;
133
+ seriesLabel?: string;
134
+ }) => string) | undefined;
135
+ scatterDescription?: ((params: {
136
+ x: number | null;
137
+ y: number | null;
138
+ formattedXValue: string;
139
+ formattedYValue: string;
140
+ seriesLabel?: string;
141
+ }) => string) | undefined;
142
+ pieDescription?: ((params: {
143
+ value: number | null;
144
+ totalValue: number;
145
+ formattedValue: string;
146
+ seriesLabel?: string;
147
+ }) => string) | undefined;
148
+ radarDescription?: ((params: {
149
+ value: number | null;
150
+ formattedValue: string;
151
+ categoryValue: string | number | null;
152
+ formattedCategoryValue: string;
153
+ seriesLabel?: string;
154
+ }) => string) | undefined;
155
+ funnelDescription?: ((params: {
156
+ value: number | null;
157
+ formattedValue: string;
158
+ seriesLabel?: string;
159
+ }) => string) | undefined;
160
+ heatmapDescription?: ((params: {
161
+ x: number | string | null;
162
+ y: number | string | null;
163
+ value: number | null;
164
+ formattedValue: string;
165
+ formattedXValue: string;
166
+ formattedYValue: string;
167
+ }) => string) | undefined;
168
+ sankeyNodeDescription?: ((params: {
169
+ value: number | null;
170
+ formattedValue: string;
171
+ nodeLabel: string;
172
+ }) => string) | undefined;
173
+ sankeyLinkDescription?: ((params: {
174
+ value: number | null;
175
+ formattedValue: string;
176
+ sourceLabel: string;
177
+ targetLabel: string;
178
+ }) => string) | undefined;
179
+ rangeBarDescription?: ((params: {
180
+ value: [number, number] | null;
181
+ formattedValue: string;
182
+ categoryValue: string | number | null;
183
+ formattedCategoryValue: string;
184
+ seriesLabel?: string;
185
+ }) => string) | undefined;
186
+ ohlcDescription?: ((params: {
187
+ open: number | null;
188
+ high: number | null;
189
+ low: number | null;
190
+ close: number | null;
191
+ date: Date | null;
192
+ formattedDate: string;
193
+ seriesLabel?: string;
194
+ }) => string) | undefined;
119
195
  };
120
196
  };
121
197
  };
package/models/axis.d.mts CHANGED
@@ -151,9 +151,10 @@ type AxisSideConfig<AxisProps extends ChartsAxisProps> = AxisProps extends Chart
151
151
  position?: 'top' | 'bottom' | 'none';
152
152
  /**
153
153
  * The height of the axis.
154
+ * Set to `'auto'` to automatically calculate the height based on tick label measurements.
154
155
  * @default 45 if an axis label is provided, 25 otherwise.
155
156
  */
156
- height?: number;
157
+ height?: number | 'auto';
157
158
  } : AxisProps extends ChartsYAxisProps ? {
158
159
  /**
159
160
  * Position of the axis.
@@ -167,13 +168,14 @@ type AxisSideConfig<AxisProps extends ChartsAxisProps> = AxisProps extends Chart
167
168
  position?: 'left' | 'right' | 'none';
168
169
  /**
169
170
  * The width of the axis.
171
+ * Set to `'auto'` to automatically calculate the width based on tick label measurements.
170
172
  * @default 65 if an axis label is provided, 45 otherwise.
171
173
  */
172
- width?: number;
174
+ width?: number | 'auto';
173
175
  } : {
174
176
  position?: 'top' | 'bottom' | 'left' | 'right' | 'none';
175
- height?: number;
176
- width?: number;
177
+ height?: number | 'auto';
178
+ width?: number | 'auto';
177
179
  };
178
180
  export interface ChartsRotationAxisProps extends ChartsAxisProps {
179
181
  /**
@@ -511,7 +513,11 @@ export type ComputedAxis<S extends ScaleName = ScaleName, V = any, AxisProps ext
511
513
  * Indicate if the axis should be consider by a tooltip with `trigger='axis'`.
512
514
  */
513
515
  triggerTooltip?: boolean;
514
- } & (AxisProps extends ChartsXAxisProps ? MakeRequired<AxisSideConfig<AxisProps>, 'height'> : AxisProps extends ChartsYAxisProps ? MakeRequired<AxisSideConfig<AxisProps>, 'width'> : AxisSideConfig<AxisProps>);
516
+ } & (AxisProps extends ChartsXAxisProps ? AxisSideConfig<AxisProps> & {
517
+ height: number;
518
+ } : AxisProps extends ChartsYAxisProps ? AxisSideConfig<AxisProps> & {
519
+ width: number;
520
+ } : AxisSideConfig<AxisProps>);
515
521
  export type ComputedXAxis<S extends ScaleName = ScaleName, V = any> = ComputedAxis<S, V, ChartsXAxisProps>;
516
522
  export type ComputedYAxis<S extends ScaleName = ScaleName, V = any> = ComputedAxis<S, V, ChartsYAxisProps>;
517
523
  export declare function isBandScaleConfig(scaleConfig: AxisConfig<ScaleName>): scaleConfig is AxisConfig<'band'> & {
package/models/axis.d.ts CHANGED
@@ -151,9 +151,10 @@ type AxisSideConfig<AxisProps extends ChartsAxisProps> = AxisProps extends Chart
151
151
  position?: 'top' | 'bottom' | 'none';
152
152
  /**
153
153
  * The height of the axis.
154
+ * Set to `'auto'` to automatically calculate the height based on tick label measurements.
154
155
  * @default 45 if an axis label is provided, 25 otherwise.
155
156
  */
156
- height?: number;
157
+ height?: number | 'auto';
157
158
  } : AxisProps extends ChartsYAxisProps ? {
158
159
  /**
159
160
  * Position of the axis.
@@ -167,13 +168,14 @@ type AxisSideConfig<AxisProps extends ChartsAxisProps> = AxisProps extends Chart
167
168
  position?: 'left' | 'right' | 'none';
168
169
  /**
169
170
  * The width of the axis.
171
+ * Set to `'auto'` to automatically calculate the width based on tick label measurements.
170
172
  * @default 65 if an axis label is provided, 45 otherwise.
171
173
  */
172
- width?: number;
174
+ width?: number | 'auto';
173
175
  } : {
174
176
  position?: 'top' | 'bottom' | 'left' | 'right' | 'none';
175
- height?: number;
176
- width?: number;
177
+ height?: number | 'auto';
178
+ width?: number | 'auto';
177
179
  };
178
180
  export interface ChartsRotationAxisProps extends ChartsAxisProps {
179
181
  /**
@@ -511,7 +513,11 @@ export type ComputedAxis<S extends ScaleName = ScaleName, V = any, AxisProps ext
511
513
  * Indicate if the axis should be consider by a tooltip with `trigger='axis'`.
512
514
  */
513
515
  triggerTooltip?: boolean;
514
- } & (AxisProps extends ChartsXAxisProps ? MakeRequired<AxisSideConfig<AxisProps>, 'height'> : AxisProps extends ChartsYAxisProps ? MakeRequired<AxisSideConfig<AxisProps>, 'width'> : AxisSideConfig<AxisProps>);
516
+ } & (AxisProps extends ChartsXAxisProps ? AxisSideConfig<AxisProps> & {
517
+ height: number;
518
+ } : AxisProps extends ChartsYAxisProps ? AxisSideConfig<AxisProps> & {
519
+ width: number;
520
+ } : AxisSideConfig<AxisProps>);
515
521
  export type ComputedXAxis<S extends ScaleName = ScaleName, V = any> = ComputedAxis<S, V, ChartsXAxisProps>;
516
522
  export type ComputedYAxis<S extends ScaleName = ScaleName, V = any> = ComputedAxis<S, V, ChartsYAxisProps>;
517
523
  export declare function isBandScaleConfig(scaleConfig: AxisConfig<ScaleName>): scaleConfig is AxisConfig<'band'> & {
@@ -5,6 +5,7 @@ import type { BarItemIdentifier, BarSeriesType, DefaultizedBarSeriesType } from
5
5
  import type { PieSeriesType, DefaultizedPieSeriesType, PieItemIdentifier, PieValueType, DefaultizedPieValueType, PieSeriesLayout } from "./pie.mjs";
6
6
  import type { DefaultizedRadarSeriesType, RadarItemIdentifier, RadarSeriesType } from "./radar.mjs";
7
7
  import type { SeriesColor, SeriesId } from "./common.mjs";
8
+ import type { ChartsRadiusAxisProps, ChartsRotationAxisProps, ComputedXAxis, ComputedYAxis, PolarAxisDefaultized } from "../axis.mjs";
8
9
  import type { CommonHighlightScope } from "../../internals/plugins/featurePlugins/useChartHighlight/highlightConfig.types.mjs";
9
10
  export interface ChartsSeriesConfig {
10
11
  bar: {
@@ -37,6 +38,12 @@ export interface ChartsSeriesConfig {
37
38
  canBeStacked: true;
38
39
  axisType: 'cartesian';
39
40
  highlightScope: CommonHighlightScope;
41
+ descriptionGetterParams: {
42
+ identifier: BarItemIdentifier;
43
+ xAxis: ComputedXAxis;
44
+ yAxis: ComputedYAxis;
45
+ series: DefaultizedBarSeriesType;
46
+ };
40
47
  highlightIdentifier: {
41
48
  type: 'bar';
42
49
  seriesId: SeriesId;
@@ -54,6 +61,12 @@ export interface ChartsSeriesConfig {
54
61
  canBeStacked: true;
55
62
  axisType: 'cartesian';
56
63
  highlightScope: CommonHighlightScope;
64
+ descriptionGetterParams: {
65
+ identifier: LineItemIdentifier;
66
+ xAxis: ComputedXAxis;
67
+ yAxis: ComputedYAxis;
68
+ series: DefaultizedLineSeriesType;
69
+ };
57
70
  highlightIdentifier: {
58
71
  type: 'line';
59
72
  seriesId: SeriesId;
@@ -70,6 +83,12 @@ export interface ChartsSeriesConfig {
70
83
  itemIdentifierWithData: ScatterItemIdentifier;
71
84
  axisType: 'cartesian';
72
85
  highlightScope: CommonHighlightScope;
86
+ descriptionGetterParams: {
87
+ identifier: ScatterItemIdentifier;
88
+ xAxis: ComputedXAxis;
89
+ yAxis: ComputedYAxis;
90
+ series: DefaultizedScatterSeriesType;
91
+ };
73
92
  highlightIdentifier: {
74
93
  type: 'scatter';
75
94
  seriesId: SeriesId;
@@ -87,6 +106,10 @@ export interface ChartsSeriesConfig {
87
106
  itemIdentifierWithData: PieItemIdentifier;
88
107
  valueType: DefaultizedPieValueType;
89
108
  highlightScope: CommonHighlightScope;
109
+ descriptionGetterParams: {
110
+ identifier: PieItemIdentifier;
111
+ series: DefaultizedPieSeriesType;
112
+ };
90
113
  highlightIdentifier: {
91
114
  type: 'pie';
92
115
  seriesId: SeriesId;
@@ -103,6 +126,12 @@ export interface ChartsSeriesConfig {
103
126
  valueType: number;
104
127
  axisType: 'polar';
105
128
  highlightScope: CommonHighlightScope;
129
+ descriptionGetterParams: {
130
+ identifier: RadarItemIdentifier;
131
+ rotationAxis: PolarAxisDefaultized<any, any, ChartsRotationAxisProps>;
132
+ radiusAxis: PolarAxisDefaultized<any, any, ChartsRadiusAxisProps>;
133
+ series: DefaultizedRadarSeriesType;
134
+ };
106
135
  highlightIdentifier: {
107
136
  type: 'radar';
108
137
  seriesId: SeriesId;
@@ -5,6 +5,7 @@ import type { BarItemIdentifier, BarSeriesType, DefaultizedBarSeriesType } from
5
5
  import type { PieSeriesType, DefaultizedPieSeriesType, PieItemIdentifier, PieValueType, DefaultizedPieValueType, PieSeriesLayout } from "./pie.js";
6
6
  import type { DefaultizedRadarSeriesType, RadarItemIdentifier, RadarSeriesType } from "./radar.js";
7
7
  import type { SeriesColor, SeriesId } from "./common.js";
8
+ import type { ChartsRadiusAxisProps, ChartsRotationAxisProps, ComputedXAxis, ComputedYAxis, PolarAxisDefaultized } from "../axis.js";
8
9
  import type { CommonHighlightScope } from "../../internals/plugins/featurePlugins/useChartHighlight/highlightConfig.types.js";
9
10
  export interface ChartsSeriesConfig {
10
11
  bar: {
@@ -37,6 +38,12 @@ export interface ChartsSeriesConfig {
37
38
  canBeStacked: true;
38
39
  axisType: 'cartesian';
39
40
  highlightScope: CommonHighlightScope;
41
+ descriptionGetterParams: {
42
+ identifier: BarItemIdentifier;
43
+ xAxis: ComputedXAxis;
44
+ yAxis: ComputedYAxis;
45
+ series: DefaultizedBarSeriesType;
46
+ };
40
47
  highlightIdentifier: {
41
48
  type: 'bar';
42
49
  seriesId: SeriesId;
@@ -54,6 +61,12 @@ export interface ChartsSeriesConfig {
54
61
  canBeStacked: true;
55
62
  axisType: 'cartesian';
56
63
  highlightScope: CommonHighlightScope;
64
+ descriptionGetterParams: {
65
+ identifier: LineItemIdentifier;
66
+ xAxis: ComputedXAxis;
67
+ yAxis: ComputedYAxis;
68
+ series: DefaultizedLineSeriesType;
69
+ };
57
70
  highlightIdentifier: {
58
71
  type: 'line';
59
72
  seriesId: SeriesId;
@@ -70,6 +83,12 @@ export interface ChartsSeriesConfig {
70
83
  itemIdentifierWithData: ScatterItemIdentifier;
71
84
  axisType: 'cartesian';
72
85
  highlightScope: CommonHighlightScope;
86
+ descriptionGetterParams: {
87
+ identifier: ScatterItemIdentifier;
88
+ xAxis: ComputedXAxis;
89
+ yAxis: ComputedYAxis;
90
+ series: DefaultizedScatterSeriesType;
91
+ };
73
92
  highlightIdentifier: {
74
93
  type: 'scatter';
75
94
  seriesId: SeriesId;
@@ -87,6 +106,10 @@ export interface ChartsSeriesConfig {
87
106
  itemIdentifierWithData: PieItemIdentifier;
88
107
  valueType: DefaultizedPieValueType;
89
108
  highlightScope: CommonHighlightScope;
109
+ descriptionGetterParams: {
110
+ identifier: PieItemIdentifier;
111
+ series: DefaultizedPieSeriesType;
112
+ };
90
113
  highlightIdentifier: {
91
114
  type: 'pie';
92
115
  seriesId: SeriesId;
@@ -103,6 +126,12 @@ export interface ChartsSeriesConfig {
103
126
  valueType: number;
104
127
  axisType: 'polar';
105
128
  highlightScope: CommonHighlightScope;
129
+ descriptionGetterParams: {
130
+ identifier: RadarItemIdentifier;
131
+ rotationAxis: PolarAxisDefaultized<any, any, ChartsRotationAxisProps>;
132
+ radiusAxis: PolarAxisDefaultized<any, any, ChartsRadiusAxisProps>;
133
+ series: DefaultizedRadarSeriesType;
134
+ };
106
135
  highlightIdentifier: {
107
136
  type: 'radar';
108
137
  seriesId: SeriesId;