@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.
- package/BarChart/BarChart.js +19 -28
- package/BarChart/BarChart.mjs +19 -28
- package/BarChart/BarElement.js +3 -5
- package/BarChart/BarElement.mjs +3 -5
- package/BarChart/BarLabel/BarLabelPlot.d.mts +0 -2
- package/BarChart/BarLabel/BarLabelPlot.d.ts +0 -2
- package/BarChart/BarLabel/BarLabelPlot.js +2 -3
- package/BarChart/BarLabel/BarLabelPlot.mjs +2 -3
- package/BarChart/BarPlot.d.mts +2 -12
- package/BarChart/BarPlot.d.ts +2 -12
- package/BarChart/BarPlot.js +4 -18
- package/BarChart/BarPlot.mjs +4 -18
- package/BarChart/BatchBarPlot/BatchBarPlot.js +0 -27
- package/BarChart/BatchBarPlot/BatchBarPlot.mjs +0 -27
- package/BarChart/IndividualBarPlot.d.mts +1 -2
- package/BarChart/IndividualBarPlot.d.ts +1 -2
- package/BarChart/IndividualBarPlot.js +5 -10
- package/BarChart/IndividualBarPlot.mjs +5 -10
- package/BarChart/seriesConfig/bar/descriptionGetter.d.mts +3 -0
- package/BarChart/seriesConfig/bar/descriptionGetter.d.ts +3 -0
- package/BarChart/seriesConfig/bar/descriptionGetter.js +36 -0
- package/BarChart/seriesConfig/bar/descriptionGetter.mjs +30 -0
- package/BarChart/seriesConfig/index.js +5 -1
- package/BarChart/seriesConfig/index.mjs +5 -1
- package/BarChart/useBarChartProps.js +2 -4
- package/BarChart/useBarChartProps.mjs +2 -4
- package/CHANGELOG.md +107 -1
- package/ChartsContainer/ChartsContainer.js +29 -29
- package/ChartsContainer/ChartsContainer.mjs +29 -29
- package/ChartsLayerContainer/ChartsLayerContainer.js +6 -2
- package/ChartsLayerContainer/ChartsLayerContainer.mjs +7 -2
- package/ChartsSvgLayer/ChartsSvgLayer.js +2 -2
- package/ChartsSvgLayer/ChartsSvgLayer.mjs +2 -2
- package/ChartsXAxis/ChartsGroupedXAxisTicks.js +12 -3
- package/ChartsXAxis/ChartsGroupedXAxisTicks.mjs +12 -3
- package/ChartsXAxis/useAxisTicksProps.d.mts +89 -89
- package/ChartsXAxis/useAxisTicksProps.d.ts +89 -89
- package/ChartsYAxis/ChartsGroupedYAxisTicks.js +12 -3
- package/ChartsYAxis/ChartsGroupedYAxisTicks.mjs +12 -3
- package/ChartsYAxis/useAxisTicksProps.d.mts +89 -89
- package/ChartsYAxis/useAxisTicksProps.d.ts +89 -89
- package/Gauge/Gauge.js +0 -4
- package/Gauge/Gauge.mjs +0 -4
- package/Gauge/GaugeContainer.d.mts +1 -1
- package/Gauge/GaugeContainer.d.ts +1 -1
- package/Gauge/GaugeContainer.js +0 -4
- package/Gauge/GaugeContainer.mjs +0 -4
- package/LineChart/AreaElement.js +5 -1
- package/LineChart/AreaElement.mjs +5 -1
- package/LineChart/CircleMarkElement.js +8 -5
- package/LineChart/CircleMarkElement.mjs +8 -5
- package/LineChart/LineChart.js +21 -19
- package/LineChart/LineChart.mjs +21 -19
- package/LineChart/LineElement.js +5 -1
- package/LineChart/LineElement.mjs +5 -1
- package/LineChart/MarkElement.js +7 -4
- package/LineChart/MarkElement.mjs +7 -4
- package/LineChart/seriesConfig/curveEvaluation.d.mts +11 -0
- package/LineChart/seriesConfig/curveEvaluation.d.ts +11 -0
- package/LineChart/seriesConfig/curveEvaluation.js +134 -0
- package/LineChart/seriesConfig/curveEvaluation.mjs +129 -0
- package/LineChart/seriesConfig/descriptionGetter.d.mts +3 -0
- package/LineChart/seriesConfig/descriptionGetter.d.ts +3 -0
- package/LineChart/seriesConfig/descriptionGetter.js +37 -0
- package/LineChart/seriesConfig/descriptionGetter.mjs +31 -0
- package/LineChart/seriesConfig/getItemAtPosition.d.mts +7 -0
- package/LineChart/seriesConfig/getItemAtPosition.d.ts +7 -0
- package/LineChart/seriesConfig/getItemAtPosition.js +356 -0
- package/LineChart/seriesConfig/getItemAtPosition.mjs +351 -0
- package/LineChart/seriesConfig/index.js +4 -0
- package/LineChart/seriesConfig/index.mjs +4 -0
- package/PieChart/PieArc.js +2 -3
- package/PieChart/PieArc.mjs +2 -3
- package/PieChart/seriesConfig/descriptionGetter.d.mts +3 -0
- package/PieChart/seriesConfig/descriptionGetter.d.ts +3 -0
- package/PieChart/seriesConfig/descriptionGetter.js +26 -0
- package/PieChart/seriesConfig/descriptionGetter.mjs +20 -0
- package/PieChart/seriesConfig/index.js +2 -0
- package/PieChart/seriesConfig/index.mjs +2 -0
- package/RadarChart/seriesConfig/descriptionGetter.d.mts +3 -0
- package/RadarChart/seriesConfig/descriptionGetter.d.ts +3 -0
- package/RadarChart/seriesConfig/descriptionGetter.js +37 -0
- package/RadarChart/seriesConfig/descriptionGetter.mjs +31 -0
- package/RadarChart/seriesConfig/index.js +2 -0
- package/RadarChart/seriesConfig/index.mjs +2 -0
- package/ScatterChart/ScatterChart.js +18 -18
- package/ScatterChart/ScatterChart.mjs +18 -18
- package/ScatterChart/seriesConfig/descriptionGetter.d.mts +3 -0
- package/ScatterChart/seriesConfig/descriptionGetter.d.ts +3 -0
- package/ScatterChart/seriesConfig/descriptionGetter.js +34 -0
- package/ScatterChart/seriesConfig/descriptionGetter.mjs +28 -0
- package/ScatterChart/seriesConfig/index.js +2 -0
- package/ScatterChart/seriesConfig/index.mjs +2 -0
- package/SparkLineChart/SparkLineChart.js +21 -19
- package/SparkLineChart/SparkLineChart.mjs +21 -19
- package/constants/index.js +0 -2
- package/constants/index.mjs +0 -2
- package/hooks/useInteractionItemProps.d.mts +1 -1
- package/hooks/useInteractionItemProps.d.ts +1 -1
- package/hooks/useInteractionItemProps.js +3 -3
- package/hooks/useInteractionItemProps.mjs +3 -3
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.d.mts +5 -0
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.d.ts +5 -0
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.js +100 -0
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.mjs +96 -0
- package/internals/components/ChartsAccessibilityProxy/index.d.mts +1 -0
- package/internals/components/ChartsAccessibilityProxy/index.d.ts +1 -0
- package/internals/components/ChartsAccessibilityProxy/index.js +16 -0
- package/internals/components/ChartsAccessibilityProxy/index.mjs +1 -0
- package/internals/components/ChartsAccessibilityProxy/useDescription.d.mts +5 -0
- package/internals/components/ChartsAccessibilityProxy/useDescription.d.ts +5 -0
- package/internals/components/ChartsAccessibilityProxy/useDescription.js +71 -0
- package/internals/components/ChartsAccessibilityProxy/useDescription.mjs +66 -0
- package/internals/getChartPoint.js +18 -1
- package/internals/getChartPoint.mjs +18 -1
- package/internals/plugins/corePlugins/corePlugins.d.mts +2 -2
- package/internals/plugins/corePlugins/corePlugins.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.mts +2 -1
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.ts +2 -1
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.mts +2 -1
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +2 -1
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.mts +22 -7
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.ts +22 -7
- package/internals/plugins/corePlugins/useChartSeries/index.d.mts +2 -1
- package/internals/plugins/corePlugins/useChartSeries/index.d.ts +2 -1
- package/internals/plugins/corePlugins/useChartSeries/index.js +12 -0
- package/internals/plugins/corePlugins/useChartSeries/index.mjs +2 -1
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.mts +1 -8
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +1 -8
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +1 -11
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.mjs +1 -11
- package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.d.mts +8 -0
- package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.d.ts +8 -0
- package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.js +19 -0
- package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.mjs +14 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.d.mts +5 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.d.ts +5 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.js +5 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.mjs +1 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.mts +1 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.ts +1 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.js +11 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.mjs +1 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.mts +2 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.ts +2 -0
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.d.mts +4 -10
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.d.ts +4 -10
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.js +28 -19
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.mjs +28 -18
- package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.d.mts +5 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.d.ts +5 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.js +11 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.mjs +5 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.d.mts +33 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.d.ts +33 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.js +318 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.mjs +311 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.mts +5 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +5 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +63 -8
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.mjs +62 -8
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +12 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.mjs +12 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.mts +12 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +12 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +28 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.mjs +27 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.mts +3 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +3 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +22 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.mjs +3 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.d.mts +30 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.d.ts +30 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.js +96 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.mjs +91 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.d.mts +16 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.d.ts +16 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.js +36 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.mjs +31 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.d.mts +15 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.d.ts +15 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.js +45 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.mjs +39 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.mts +11 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +11 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +53 -11
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.mjs +52 -11
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +4 -9
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +4 -9
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +16 -40
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.mjs +19 -43
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.js +20 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.mjs +20 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +36 -30
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.mjs +36 -30
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.mts +8 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +8 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +9 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.mjs +9 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.mts +6 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +6 -0
- package/internals/store/useCharts.d.mts +1 -1
- package/internals/store/useCharts.d.ts +1 -1
- package/locales/elGR.d.mts +76 -0
- package/locales/elGR.d.ts +76 -0
- package/locales/elGR.js +89 -0
- package/locales/elGR.mjs +89 -0
- package/locales/enUS.d.mts +76 -0
- package/locales/enUS.d.ts +76 -0
- package/locales/enUS.js +89 -1
- package/locales/enUS.mjs +89 -1
- package/locales/frFR.d.mts +76 -0
- package/locales/frFR.d.ts +76 -0
- package/locales/frFR.js +89 -0
- package/locales/frFR.mjs +89 -0
- package/locales/nbNO.d.mts +76 -0
- package/locales/nbNO.d.ts +76 -0
- package/locales/nbNO.js +89 -0
- package/locales/nbNO.mjs +89 -0
- package/locales/ptBR.d.mts +76 -0
- package/locales/ptBR.d.ts +76 -0
- package/locales/ptBR.js +89 -0
- package/locales/ptBR.mjs +89 -0
- package/locales/ptPT.d.mts +76 -0
- package/locales/ptPT.d.ts +76 -0
- package/locales/ptPT.js +89 -0
- package/locales/ptPT.mjs +89 -0
- package/locales/svSE.d.mts +76 -0
- package/locales/svSE.d.ts +76 -0
- package/locales/svSE.js +89 -0
- package/locales/svSE.mjs +89 -0
- package/locales/utils/chartsLocaleTextApi.d.mts +189 -0
- package/locales/utils/chartsLocaleTextApi.d.ts +189 -0
- package/locales/utils/getChartsLocalization.d.mts +76 -0
- package/locales/utils/getChartsLocalization.d.ts +76 -0
- package/models/axis.d.mts +11 -5
- package/models/axis.d.ts +11 -5
- package/models/seriesType/config.d.mts +29 -0
- package/models/seriesType/config.d.ts +29 -0
- package/package.json +85 -85
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { useChartId } from "../../../hooks/useChartId.mjs";
|
|
5
|
+
import { useDescription } from "./useDescription.mjs";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Make the proxy looks like a layer.
|
|
9
|
+
* Having a non-zero size is important for some screen readers to announce the content.
|
|
10
|
+
*/
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
const fullSizeLayerStyle = {
|
|
13
|
+
borderWidth: 0,
|
|
14
|
+
width: '100%',
|
|
15
|
+
height: '100%',
|
|
16
|
+
overflow: 'hidden',
|
|
17
|
+
position: 'absolute',
|
|
18
|
+
inset: 0,
|
|
19
|
+
padding: 0,
|
|
20
|
+
outline: 'none',
|
|
21
|
+
pointerEvents: 'none'
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// The proxy is implemented by having two divs with the same content, and toggling the visibility of each one when the content changes.
|
|
25
|
+
// The idea is to imitate the behavior of the focus moving from a list element to another, but with the minimal number of DOM elements.
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* This component provides an accessibility proxy for charts.
|
|
29
|
+
* It uses two divs to let screen readers announce the focused content when it changes.
|
|
30
|
+
*/
|
|
31
|
+
export function ChartsAccessibilityProxy() {
|
|
32
|
+
const message = useDescription();
|
|
33
|
+
const chartId = useChartId();
|
|
34
|
+
const currentFormatRef = React.useRef(null);
|
|
35
|
+
const currentIndexRef = React.useRef(0);
|
|
36
|
+
const containerRef = React.useRef(null);
|
|
37
|
+
React.useEffect(() => {
|
|
38
|
+
const container = containerRef.current;
|
|
39
|
+
if (!container) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Initialize children if not present
|
|
44
|
+
if (container.children.length === 0) {
|
|
45
|
+
for (let i = 0; i < 2; i += 1) {
|
|
46
|
+
const div = document.createElement('div');
|
|
47
|
+
div.setAttribute('id', i === 0 ? `voiceover-${chartId}-1` : `voiceover-${chartId}-2`);
|
|
48
|
+
div.style.display = 'none';
|
|
49
|
+
container.appendChild(div);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// The divs with the message content
|
|
53
|
+
for (let i = 0; i < 2; i += 1) {
|
|
54
|
+
const div = document.createElement('div');
|
|
55
|
+
if (i === (currentIndexRef.current + 1) % 2 && message) {
|
|
56
|
+
div.setAttribute('tabindex', '0');
|
|
57
|
+
}
|
|
58
|
+
div.setAttribute('role', 'img');
|
|
59
|
+
div.setAttribute('aria-labelledby', i === 0 ? `voiceover-${chartId}-1` : `voiceover-${chartId}-2`);
|
|
60
|
+
div.style.width = '100%';
|
|
61
|
+
div.style.height = '100%';
|
|
62
|
+
div.style.outline = 'none';
|
|
63
|
+
container.appendChild(div);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (message && message !== currentFormatRef.current) {
|
|
67
|
+
currentFormatRef.current = message;
|
|
68
|
+
const inactiveIndex = currentIndexRef.current;
|
|
69
|
+
currentIndexRef.current = (currentIndexRef.current + 1) % 2;
|
|
70
|
+
const activeIndex = currentIndexRef.current;
|
|
71
|
+
const activeDiv = container.children[2 + activeIndex];
|
|
72
|
+
const inactiveDiv = container.children[2 + inactiveIndex];
|
|
73
|
+
const activeTextDiv = container.children[activeIndex];
|
|
74
|
+
const inactiveTextDiv = container.children[inactiveIndex];
|
|
75
|
+
|
|
76
|
+
// Both get text update
|
|
77
|
+
activeTextDiv.textContent = message ?? '';
|
|
78
|
+
inactiveTextDiv.textContent = message ?? '';
|
|
79
|
+
activeDiv.setAttribute('aria-hidden', 'false');
|
|
80
|
+
activeDiv.setAttribute('aria-labelledby', activeIndex === 0 ? `voiceover-${chartId}-1` : `voiceover-${chartId}-2`);
|
|
81
|
+
if (message) {
|
|
82
|
+
activeDiv.setAttribute('tabindex', '0');
|
|
83
|
+
}
|
|
84
|
+
inactiveDiv.setAttribute('aria-hidden', 'true');
|
|
85
|
+
inactiveDiv.setAttribute('aria-labelledby', activeIndex === 0 ? `voiceover-${chartId}-1` : `voiceover-${chartId}-2`);
|
|
86
|
+
inactiveDiv.removeAttribute('tabindex');
|
|
87
|
+
activeDiv.focus();
|
|
88
|
+
}
|
|
89
|
+
}, [message, chartId]);
|
|
90
|
+
return /*#__PURE__*/_jsx("div", {
|
|
91
|
+
role: "presentation",
|
|
92
|
+
tabIndex: message ? undefined : 0,
|
|
93
|
+
ref: containerRef,
|
|
94
|
+
style: fullSizeLayerStyle
|
|
95
|
+
});
|
|
96
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ChartsAccessibilityProxy.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ChartsAccessibilityProxy.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _ChartsAccessibilityProxy = require("./ChartsAccessibilityProxy");
|
|
7
|
+
Object.keys(_ChartsAccessibilityProxy).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _ChartsAccessibilityProxy[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _ChartsAccessibilityProxy[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ChartsAccessibilityProxy.mjs";
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useDescription = useDescription;
|
|
7
|
+
var _hooks = require("../../../hooks");
|
|
8
|
+
var _useStore = require("../../store/useStore");
|
|
9
|
+
var _useChartSeriesConfig = require("../../plugins/corePlugins/useChartSeriesConfig");
|
|
10
|
+
var _isCartesian = require("../../isCartesian");
|
|
11
|
+
var _isPolar = require("../../isPolar");
|
|
12
|
+
var _useChartKeyboardNavigation = require("../../plugins/featurePlugins/useChartKeyboardNavigation");
|
|
13
|
+
/**
|
|
14
|
+
* Get the message associated to the focused item.
|
|
15
|
+
* @returns {string | null} the accessibility description linked to the focused item
|
|
16
|
+
*/
|
|
17
|
+
function useDescription() {
|
|
18
|
+
const store = (0, _useStore.useStore)();
|
|
19
|
+
const focusedItem = store.use(_useChartKeyboardNavigation.selectorChartsFocusedOrToFocusedItem);
|
|
20
|
+
const seriesConfig = store.use(_useChartSeriesConfig.selectorChartSeriesConfig);
|
|
21
|
+
const seriesState = (0, _hooks.useSeries)();
|
|
22
|
+
const {
|
|
23
|
+
localeText
|
|
24
|
+
} = (0, _hooks.useChartsLocalization)();
|
|
25
|
+
const {
|
|
26
|
+
xAxis,
|
|
27
|
+
xAxisIds
|
|
28
|
+
} = (0, _hooks.useXAxes)();
|
|
29
|
+
const {
|
|
30
|
+
yAxis,
|
|
31
|
+
yAxisIds
|
|
32
|
+
} = (0, _hooks.useYAxes)();
|
|
33
|
+
const {
|
|
34
|
+
rotationAxis,
|
|
35
|
+
rotationAxisIds
|
|
36
|
+
} = (0, _hooks.useRotationAxes)();
|
|
37
|
+
const {
|
|
38
|
+
radiusAxis,
|
|
39
|
+
radiusAxisIds
|
|
40
|
+
} = (0, _hooks.useRadiusAxes)();
|
|
41
|
+
if (focusedItem === null) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
const {
|
|
45
|
+
type,
|
|
46
|
+
seriesId
|
|
47
|
+
} = focusedItem;
|
|
48
|
+
const focusedSeries = seriesState[type]?.series[seriesId];
|
|
49
|
+
if (!focusedSeries) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
const descriptionGetter = seriesConfig[type]?.descriptionGetter;
|
|
53
|
+
if (!descriptionGetter) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
const descriptionParams = {
|
|
57
|
+
identifier: focusedItem,
|
|
58
|
+
series: focusedSeries,
|
|
59
|
+
localeText
|
|
60
|
+
};
|
|
61
|
+
if ((0, _isCartesian.isCartesianSeries)(focusedSeries)) {
|
|
62
|
+
const xAxisId = focusedSeries.xAxisId ?? xAxisIds[0];
|
|
63
|
+
const yAxisId = focusedSeries.yAxisId ?? yAxisIds[0];
|
|
64
|
+
descriptionParams.xAxis = xAxis[xAxisId];
|
|
65
|
+
descriptionParams.yAxis = yAxis[yAxisId];
|
|
66
|
+
} else if ((0, _isPolar.isPolarSeriesType)(type)) {
|
|
67
|
+
descriptionParams.rotationAxis = rotationAxis[rotationAxisIds[0]];
|
|
68
|
+
descriptionParams.radiusAxis = radiusAxis[radiusAxisIds[0]];
|
|
69
|
+
}
|
|
70
|
+
return descriptionGetter(descriptionParams);
|
|
71
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { useChartsLocalization, useRadiusAxes, useRotationAxes, useSeries, useXAxes, useYAxes } from "../../../hooks/index.mjs";
|
|
2
|
+
import { useStore } from "../../store/useStore.mjs";
|
|
3
|
+
import { selectorChartSeriesConfig } from "../../plugins/corePlugins/useChartSeriesConfig/index.mjs";
|
|
4
|
+
import { isCartesianSeries } from "../../isCartesian.mjs";
|
|
5
|
+
import { isPolarSeriesType } from "../../isPolar.mjs";
|
|
6
|
+
import { selectorChartsFocusedOrToFocusedItem } from "../../plugins/featurePlugins/useChartKeyboardNavigation/index.mjs";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Get the message associated to the focused item.
|
|
10
|
+
* @returns {string | null} the accessibility description linked to the focused item
|
|
11
|
+
*/
|
|
12
|
+
export function useDescription() {
|
|
13
|
+
const store = useStore();
|
|
14
|
+
const focusedItem = store.use(selectorChartsFocusedOrToFocusedItem);
|
|
15
|
+
const seriesConfig = store.use(selectorChartSeriesConfig);
|
|
16
|
+
const seriesState = useSeries();
|
|
17
|
+
const {
|
|
18
|
+
localeText
|
|
19
|
+
} = useChartsLocalization();
|
|
20
|
+
const {
|
|
21
|
+
xAxis,
|
|
22
|
+
xAxisIds
|
|
23
|
+
} = useXAxes();
|
|
24
|
+
const {
|
|
25
|
+
yAxis,
|
|
26
|
+
yAxisIds
|
|
27
|
+
} = useYAxes();
|
|
28
|
+
const {
|
|
29
|
+
rotationAxis,
|
|
30
|
+
rotationAxisIds
|
|
31
|
+
} = useRotationAxes();
|
|
32
|
+
const {
|
|
33
|
+
radiusAxis,
|
|
34
|
+
radiusAxisIds
|
|
35
|
+
} = useRadiusAxes();
|
|
36
|
+
if (focusedItem === null) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
const {
|
|
40
|
+
type,
|
|
41
|
+
seriesId
|
|
42
|
+
} = focusedItem;
|
|
43
|
+
const focusedSeries = seriesState[type]?.series[seriesId];
|
|
44
|
+
if (!focusedSeries) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
const descriptionGetter = seriesConfig[type]?.descriptionGetter;
|
|
48
|
+
if (!descriptionGetter) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
const descriptionParams = {
|
|
52
|
+
identifier: focusedItem,
|
|
53
|
+
series: focusedSeries,
|
|
54
|
+
localeText
|
|
55
|
+
};
|
|
56
|
+
if (isCartesianSeries(focusedSeries)) {
|
|
57
|
+
const xAxisId = focusedSeries.xAxisId ?? xAxisIds[0];
|
|
58
|
+
const yAxisId = focusedSeries.yAxisId ?? yAxisIds[0];
|
|
59
|
+
descriptionParams.xAxis = xAxis[xAxisId];
|
|
60
|
+
descriptionParams.yAxis = yAxis[yAxisId];
|
|
61
|
+
} else if (isPolarSeriesType(type)) {
|
|
62
|
+
descriptionParams.rotationAxis = rotationAxis[rotationAxisIds[0]];
|
|
63
|
+
descriptionParams.radiusAxis = radiusAxis[radiusAxisIds[0]];
|
|
64
|
+
}
|
|
65
|
+
return descriptionGetter(descriptionParams);
|
|
66
|
+
}
|
|
@@ -12,8 +12,25 @@ exports.getChartPoint = getChartPoint;
|
|
|
12
12
|
*/
|
|
13
13
|
function getChartPoint(element, event) {
|
|
14
14
|
const rect = element.getBoundingClientRect();
|
|
15
|
+
const x = event.clientX - rect.left;
|
|
16
|
+
const y = event.clientY - rect.top;
|
|
17
|
+
if (typeof DOMMatrix === 'undefined') {
|
|
18
|
+
// Fallback for environments like JSDOM where DOMMatrix is not available.
|
|
19
|
+
return {
|
|
20
|
+
x,
|
|
21
|
+
y,
|
|
22
|
+
z: 0,
|
|
23
|
+
w: 1,
|
|
24
|
+
matrixTransform: () => ({
|
|
25
|
+
x,
|
|
26
|
+
y,
|
|
27
|
+
z: 0,
|
|
28
|
+
w: 1
|
|
29
|
+
})
|
|
30
|
+
};
|
|
31
|
+
}
|
|
15
32
|
const style = getComputedStyle(element);
|
|
16
33
|
const transform = new DOMMatrix(style.transform);
|
|
17
|
-
const point = new DOMPoint(
|
|
34
|
+
const point = new DOMPoint(x, y);
|
|
18
35
|
return point.matrixTransform(transform.inverse());
|
|
19
36
|
}
|
|
@@ -6,8 +6,25 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export function getChartPoint(element, event) {
|
|
8
8
|
const rect = element.getBoundingClientRect();
|
|
9
|
+
const x = event.clientX - rect.left;
|
|
10
|
+
const y = event.clientY - rect.top;
|
|
11
|
+
if (typeof DOMMatrix === 'undefined') {
|
|
12
|
+
// Fallback for environments like JSDOM where DOMMatrix is not available.
|
|
13
|
+
return {
|
|
14
|
+
x,
|
|
15
|
+
y,
|
|
16
|
+
z: 0,
|
|
17
|
+
w: 1,
|
|
18
|
+
matrixTransform: () => ({
|
|
19
|
+
x,
|
|
20
|
+
y,
|
|
21
|
+
z: 0,
|
|
22
|
+
w: 1
|
|
23
|
+
})
|
|
24
|
+
};
|
|
25
|
+
}
|
|
9
26
|
const style = getComputedStyle(element);
|
|
10
27
|
const transform = new DOMMatrix(style.transform);
|
|
11
|
-
const point = new DOMPoint(
|
|
28
|
+
const point = new DOMPoint(x, y);
|
|
12
29
|
return point.matrixTransform(transform.inverse());
|
|
13
30
|
}
|
|
@@ -11,6 +11,6 @@ import type { ChartSeriesType } from "../../../models/seriesType/config.mjs";
|
|
|
11
11
|
* Internal plugins that create the tools used by the other plugins.
|
|
12
12
|
* These plugins are used by the Charts components.
|
|
13
13
|
*/
|
|
14
|
-
export declare const CHART_CORE_PLUGINS: readonly [import("../models/index.mjs").ChartPlugin<UseChartElementRefSignature>, import("../models/index.mjs").ChartPlugin<UseChartIdSignature>, import("../models/index.mjs").ChartPlugin<UseChartSeriesConfigSignature>, import("../models/index.mjs").ChartPlugin<UseChartExperimentalFeaturesSignature
|
|
15
|
-
export type ChartCorePluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartElementRefSignature, UseChartIdSignature, UseChartSeriesConfigSignature<SeriesType>, UseChartExperimentalFeaturesSignature
|
|
14
|
+
export declare const CHART_CORE_PLUGINS: readonly [import("../models/index.mjs").ChartPlugin<UseChartElementRefSignature>, import("../models/index.mjs").ChartPlugin<UseChartIdSignature>, import("../models/index.mjs").ChartPlugin<UseChartSeriesConfigSignature>, import("../models/index.mjs").ChartPlugin<UseChartExperimentalFeaturesSignature<keyof import("../../index.mjs").ChartsSeriesConfig>>, import("../models/index.mjs").ChartPlugin<UseChartDimensionsSignature>, import("../models/index.mjs").ChartPlugin<UseChartSeriesSignature>, import("../models/index.mjs").ChartPlugin<UseChartInteractionListenerSignature>, import("../models/index.mjs").ChartPlugin<UseChartAnimationSignature>];
|
|
15
|
+
export type ChartCorePluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartElementRefSignature, UseChartIdSignature, UseChartSeriesConfigSignature<SeriesType>, UseChartExperimentalFeaturesSignature<SeriesType>, UseChartDimensionsSignature, UseChartSeriesSignature<SeriesType>, UseChartAnimationSignature, UseChartInteractionListenerSignature];
|
|
16
16
|
export interface ChartCorePluginParameters extends UseChartIdParameters, UseChartSeriesConfigParameters {}
|
|
@@ -11,6 +11,6 @@ import type { ChartSeriesType } from "../../../models/seriesType/config.js";
|
|
|
11
11
|
* Internal plugins that create the tools used by the other plugins.
|
|
12
12
|
* These plugins are used by the Charts components.
|
|
13
13
|
*/
|
|
14
|
-
export declare const CHART_CORE_PLUGINS: readonly [import("../models/index.js").ChartPlugin<UseChartElementRefSignature>, import("../models/index.js").ChartPlugin<UseChartIdSignature>, import("../models/index.js").ChartPlugin<UseChartSeriesConfigSignature>, import("../models/index.js").ChartPlugin<UseChartExperimentalFeaturesSignature
|
|
15
|
-
export type ChartCorePluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartElementRefSignature, UseChartIdSignature, UseChartSeriesConfigSignature<SeriesType>, UseChartExperimentalFeaturesSignature
|
|
14
|
+
export declare const CHART_CORE_PLUGINS: readonly [import("../models/index.js").ChartPlugin<UseChartElementRefSignature>, import("../models/index.js").ChartPlugin<UseChartIdSignature>, import("../models/index.js").ChartPlugin<UseChartSeriesConfigSignature>, import("../models/index.js").ChartPlugin<UseChartExperimentalFeaturesSignature<keyof import("../../index.js").ChartsSeriesConfig>>, import("../models/index.js").ChartPlugin<UseChartDimensionsSignature>, import("../models/index.js").ChartPlugin<UseChartSeriesSignature>, import("../models/index.js").ChartPlugin<UseChartInteractionListenerSignature>, import("../models/index.js").ChartPlugin<UseChartAnimationSignature>];
|
|
15
|
+
export type ChartCorePluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartElementRefSignature, UseChartIdSignature, UseChartSeriesConfigSignature<SeriesType>, UseChartExperimentalFeaturesSignature<SeriesType>, UseChartDimensionsSignature, UseChartSeriesSignature<SeriesType>, UseChartAnimationSignature, UseChartInteractionListenerSignature];
|
|
16
16
|
export interface ChartCorePluginParameters extends UseChartIdParameters, UseChartSeriesConfigParameters {}
|
package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { type ChartPlugin } from "../../models/index.mjs";
|
|
2
2
|
import type { UseChartExperimentalFeaturesSignature } from "./useChartExperimentalFeature.types.mjs";
|
|
3
|
-
|
|
3
|
+
import type { ChartSeriesType } from "../../../../models/seriesType/config.mjs";
|
|
4
|
+
export declare const useChartExperimentalFeatures: ChartPlugin<UseChartExperimentalFeaturesSignature<ChartSeriesType>>;
|
package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { type ChartPlugin } from "../../models/index.js";
|
|
2
2
|
import type { UseChartExperimentalFeaturesSignature } from "./useChartExperimentalFeature.types.js";
|
|
3
|
-
|
|
3
|
+
import type { ChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
4
|
+
export declare const useChartExperimentalFeatures: ChartPlugin<UseChartExperimentalFeaturesSignature<ChartSeriesType>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ChartSeriesType } from "../../../../models/seriesType/config.mjs";
|
|
1
2
|
import { type ChartRootSelector } from "../../utils/selectors.mjs";
|
|
2
3
|
import type { UseChartExperimentalFeaturesSignature } from "./useChartExperimentalFeature.types.mjs";
|
|
3
|
-
export declare const selectorChartExperimentalFeaturesState: ChartRootSelector<UseChartExperimentalFeaturesSignature
|
|
4
|
+
export declare const selectorChartExperimentalFeaturesState: ChartRootSelector<UseChartExperimentalFeaturesSignature<ChartSeriesType>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
1
2
|
import { type ChartRootSelector } from "../../utils/selectors.js";
|
|
2
3
|
import type { UseChartExperimentalFeaturesSignature } from "./useChartExperimentalFeature.types.js";
|
|
3
|
-
export declare const selectorChartExperimentalFeaturesState: ChartRootSelector<UseChartExperimentalFeaturesSignature
|
|
4
|
+
export declare const selectorChartExperimentalFeaturesState: ChartRootSelector<UseChartExperimentalFeaturesSignature<ChartSeriesType>>;
|
|
@@ -1,16 +1,31 @@
|
|
|
1
1
|
import { type ChartPluginSignature } from "../../models/index.mjs";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import type { ChartSeriesType } from "../../../../models/seriesType/config.mjs";
|
|
3
|
+
interface LineExperimentalFeatures {
|
|
4
|
+
/**
|
|
5
|
+
* Enables pointer-based interaction detection for line and area series.
|
|
6
|
+
*
|
|
7
|
+
* When enabled, the chart uses pointer position to determine which series
|
|
8
|
+
* is closest to the cursor, rather than relying on SVG element hover events.
|
|
9
|
+
*
|
|
10
|
+
* This provides finer control over highlighting and clicking the closest
|
|
11
|
+
* line or point, but uses an approximation (linear interpolation between
|
|
12
|
+
* data points) rather than exact SVG geometry.
|
|
13
|
+
*/
|
|
14
|
+
enablePositionBasedPointerInteraction?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export type ChartExperimentalFeatures<SeriesType extends ChartSeriesType = ChartSeriesType> = 'line' extends SeriesType ? LineExperimentalFeatures : {};
|
|
17
|
+
export interface UseChartExperimentalFeaturesParameters<SeriesType extends ChartSeriesType = ChartSeriesType> {
|
|
4
18
|
/**
|
|
5
19
|
* Options to enable features planned for the next major.
|
|
6
20
|
*/
|
|
7
|
-
experimentalFeatures?: ChartExperimentalFeatures
|
|
21
|
+
experimentalFeatures?: ChartExperimentalFeatures<SeriesType>;
|
|
8
22
|
}
|
|
9
23
|
export interface UseChartExperimentalFeaturesState {
|
|
10
24
|
experimentalFeatures?: ChartExperimentalFeatures;
|
|
11
25
|
}
|
|
12
|
-
export type UseChartExperimentalFeaturesSignature = ChartPluginSignature<{
|
|
13
|
-
params: UseChartExperimentalFeaturesParameters
|
|
14
|
-
defaultizedParams: UseChartExperimentalFeaturesParameters
|
|
26
|
+
export type UseChartExperimentalFeaturesSignature<SeriesType extends ChartSeriesType> = ChartPluginSignature<{
|
|
27
|
+
params: UseChartExperimentalFeaturesParameters<SeriesType>;
|
|
28
|
+
defaultizedParams: UseChartExperimentalFeaturesParameters<SeriesType>;
|
|
15
29
|
state: UseChartExperimentalFeaturesState;
|
|
16
|
-
}>;
|
|
30
|
+
}>;
|
|
31
|
+
export {};
|
|
@@ -1,16 +1,31 @@
|
|
|
1
1
|
import { type ChartPluginSignature } from "../../models/index.js";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import type { ChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
3
|
+
interface LineExperimentalFeatures {
|
|
4
|
+
/**
|
|
5
|
+
* Enables pointer-based interaction detection for line and area series.
|
|
6
|
+
*
|
|
7
|
+
* When enabled, the chart uses pointer position to determine which series
|
|
8
|
+
* is closest to the cursor, rather than relying on SVG element hover events.
|
|
9
|
+
*
|
|
10
|
+
* This provides finer control over highlighting and clicking the closest
|
|
11
|
+
* line or point, but uses an approximation (linear interpolation between
|
|
12
|
+
* data points) rather than exact SVG geometry.
|
|
13
|
+
*/
|
|
14
|
+
enablePositionBasedPointerInteraction?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export type ChartExperimentalFeatures<SeriesType extends ChartSeriesType = ChartSeriesType> = 'line' extends SeriesType ? LineExperimentalFeatures : {};
|
|
17
|
+
export interface UseChartExperimentalFeaturesParameters<SeriesType extends ChartSeriesType = ChartSeriesType> {
|
|
4
18
|
/**
|
|
5
19
|
* Options to enable features planned for the next major.
|
|
6
20
|
*/
|
|
7
|
-
experimentalFeatures?: ChartExperimentalFeatures
|
|
21
|
+
experimentalFeatures?: ChartExperimentalFeatures<SeriesType>;
|
|
8
22
|
}
|
|
9
23
|
export interface UseChartExperimentalFeaturesState {
|
|
10
24
|
experimentalFeatures?: ChartExperimentalFeatures;
|
|
11
25
|
}
|
|
12
|
-
export type UseChartExperimentalFeaturesSignature = ChartPluginSignature<{
|
|
13
|
-
params: UseChartExperimentalFeaturesParameters
|
|
14
|
-
defaultizedParams: UseChartExperimentalFeaturesParameters
|
|
26
|
+
export type UseChartExperimentalFeaturesSignature<SeriesType extends ChartSeriesType> = ChartPluginSignature<{
|
|
27
|
+
params: UseChartExperimentalFeaturesParameters<SeriesType>;
|
|
28
|
+
defaultizedParams: UseChartExperimentalFeaturesParameters<SeriesType>;
|
|
15
29
|
state: UseChartExperimentalFeaturesState;
|
|
16
|
-
}>;
|
|
30
|
+
}>;
|
|
31
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { useChartSeries } from "./useChartSeries.mjs";
|
|
2
2
|
export type { UseChartSeriesSignature, UseChartSeriesParameters, UseChartSeriesDefaultizedParameters, ProcessedSeries, SeriesIdToType, SeriesLayout } from "./useChartSeries.types.mjs";
|
|
3
|
-
export * from "./useChartSeries.selectors.mjs";
|
|
3
|
+
export * from "./useChartSeries.selectors.mjs";
|
|
4
|
+
export * from "./useChartSeriesLayout.selectors.mjs";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { useChartSeries } from "./useChartSeries.js";
|
|
2
2
|
export type { UseChartSeriesSignature, UseChartSeriesParameters, UseChartSeriesDefaultizedParameters, ProcessedSeries, SeriesIdToType, SeriesLayout } from "./useChartSeries.types.js";
|
|
3
|
-
export * from "./useChartSeries.selectors.js";
|
|
3
|
+
export * from "./useChartSeries.selectors.js";
|
|
4
|
+
export * from "./useChartSeriesLayout.selectors.js";
|
|
@@ -24,4 +24,16 @@ Object.keys(_useChartSeries2).forEach(function (key) {
|
|
|
24
24
|
return _useChartSeries2[key];
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
+
});
|
|
28
|
+
var _useChartSeriesLayout = require("./useChartSeriesLayout.selectors");
|
|
29
|
+
Object.keys(_useChartSeriesLayout).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
32
|
+
if (key in exports && exports[key] === _useChartSeriesLayout[key]) return;
|
|
33
|
+
Object.defineProperty(exports, key, {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () {
|
|
36
|
+
return _useChartSeriesLayout[key];
|
|
37
|
+
}
|
|
38
|
+
});
|
|
27
39
|
});
|
|
@@ -20,14 +20,6 @@ export declare const selectorChartsDataset: (args_0: import("../useChartId/useCh
|
|
|
20
20
|
export declare const selectorChartSeriesProcessed: (args_0: import("../useChartId/useChartId.types.mjs").UseChartIdState & import("../useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("./useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../useChartInteractionListener/index.mjs").UseChartInteractionListenerState & Partial<{}> & {
|
|
21
21
|
cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
|
|
22
22
|
}) => import("./useChartSeries.types.mjs").ProcessedSeries<keyof import("../../../index.mjs").ChartsSeriesConfig>;
|
|
23
|
-
/**
|
|
24
|
-
* Get the processed series after applying series processors.
|
|
25
|
-
* This selector computes the processed series on-demand from the defaultized series.
|
|
26
|
-
* @returns {ProcessedSeries} The processed series.
|
|
27
|
-
*/
|
|
28
|
-
export declare const selectorChartSeriesLayout: (args_0: import("../useChartId/useChartId.types.mjs").UseChartIdState & import("../useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("./useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../useChartInteractionListener/index.mjs").UseChartInteractionListenerState & Partial<{}> & {
|
|
29
|
-
cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
|
|
30
|
-
}) => import("./useChartSeries.types.mjs").SeriesLayout<keyof import("../../../index.mjs").ChartsSeriesConfig>;
|
|
31
23
|
/**
|
|
32
24
|
* Returns a function that returns the series configuration for a given series id.
|
|
33
25
|
*/
|
|
@@ -46,6 +38,7 @@ export declare const selectorChartSeriesConfigGetter: (args_0: import("../useCha
|
|
|
46
38
|
identifierSerializer: import("../useChartSeriesConfig/index.mjs").IdentifierSerializer<"pie">;
|
|
47
39
|
identifierCleaner: import("../useChartSeriesConfig/index.mjs").IdentifierCleaner<"pie">;
|
|
48
40
|
getItemAtPosition?: import("../useChartSeriesConfig/index.mjs").GetItemAtPosition<"pie"> | undefined;
|
|
41
|
+
descriptionGetter: import("../useChartSeriesConfig/index.mjs").DescriptionGetter<"pie">;
|
|
49
42
|
isHighlightedCreator: import("../../featurePlugins/useChartHighlight/highlightCreator.types.mjs").HighlightCreator<"pie">;
|
|
50
43
|
isFadedCreator: import("../../featurePlugins/useChartHighlight/highlightCreator.types.mjs").HighlightCreator<"pie">;
|
|
51
44
|
} | import("../useChartSeriesConfig/index.mjs").ChartSeriesTypeConfig<"radar"> | null;
|
|
@@ -20,14 +20,6 @@ export declare const selectorChartsDataset: (args_0: import("../useChartId/useCh
|
|
|
20
20
|
export declare const selectorChartSeriesProcessed: (args_0: import("../useChartId/useChartId.types.js").UseChartIdState & import("../useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("./useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
21
21
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
22
22
|
}) => import("./useChartSeries.types.js").ProcessedSeries<keyof import("../../../index.js").ChartsSeriesConfig>;
|
|
23
|
-
/**
|
|
24
|
-
* Get the processed series after applying series processors.
|
|
25
|
-
* This selector computes the processed series on-demand from the defaultized series.
|
|
26
|
-
* @returns {ProcessedSeries} The processed series.
|
|
27
|
-
*/
|
|
28
|
-
export declare const selectorChartSeriesLayout: (args_0: import("../useChartId/useChartId.types.js").UseChartIdState & import("../useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("./useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
29
|
-
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
30
|
-
}) => import("./useChartSeries.types.js").SeriesLayout<keyof import("../../../index.js").ChartsSeriesConfig>;
|
|
31
23
|
/**
|
|
32
24
|
* Returns a function that returns the series configuration for a given series id.
|
|
33
25
|
*/
|
|
@@ -46,6 +38,7 @@ export declare const selectorChartSeriesConfigGetter: (args_0: import("../useCha
|
|
|
46
38
|
identifierSerializer: import("../useChartSeriesConfig/index.js").IdentifierSerializer<"pie">;
|
|
47
39
|
identifierCleaner: import("../useChartSeriesConfig/index.js").IdentifierCleaner<"pie">;
|
|
48
40
|
getItemAtPosition?: import("../useChartSeriesConfig/index.js").GetItemAtPosition<"pie"> | undefined;
|
|
41
|
+
descriptionGetter: import("../useChartSeriesConfig/index.js").DescriptionGetter<"pie">;
|
|
49
42
|
isHighlightedCreator: import("../../featurePlugins/useChartHighlight/highlightCreator.types.js").HighlightCreator<"pie">;
|
|
50
43
|
isFadedCreator: import("../../featurePlugins/useChartHighlight/highlightCreator.types.js").HighlightCreator<"pie">;
|
|
51
44
|
} | import("../useChartSeriesConfig/index.js").ChartSeriesTypeConfig<"radar"> | null;
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.selectorChartsDataset = exports.selectorChartSeriesState = exports.selectorChartSeriesProcessed = exports.
|
|
6
|
+
exports.selectorChartsDataset = exports.selectorChartSeriesState = exports.selectorChartSeriesProcessed = exports.selectorChartSeriesConfigGetter = exports.selectorChartDefaultizedSeries = void 0;
|
|
7
7
|
var _store = require("@mui/x-internals/store");
|
|
8
8
|
var _processSeries = require("./processSeries");
|
|
9
|
-
var _useChartDimensions = require("../useChartDimensions");
|
|
10
9
|
var _useChartVisibilityManager = require("../../featurePlugins/useChartVisibilityManager");
|
|
11
10
|
var _useChartSeriesConfig = require("../useChartSeriesConfig/useChartSeriesConfig.selectors");
|
|
12
11
|
const selectorChartSeriesState = state => state.series;
|
|
@@ -28,15 +27,6 @@ const selectorChartSeriesProcessed = exports.selectorChartSeriesProcessed = (0,
|
|
|
28
27
|
return (0, _processSeries.applySeriesProcessors)(defaultizedSeries, seriesConfig, dataset, isItemVisible);
|
|
29
28
|
});
|
|
30
29
|
|
|
31
|
-
/**
|
|
32
|
-
* Get the processed series after applying series processors.
|
|
33
|
-
* This selector computes the processed series on-demand from the defaultized series.
|
|
34
|
-
* @returns {ProcessedSeries} The processed series.
|
|
35
|
-
*/
|
|
36
|
-
const selectorChartSeriesLayout = exports.selectorChartSeriesLayout = (0, _store.createSelectorMemoized)(selectorChartSeriesProcessed, _useChartSeriesConfig.selectorChartSeriesConfig, _useChartDimensions.selectorChartDrawingArea, function selectorChartSeriesLayout(processedSeries, seriesConfig, drawingArea) {
|
|
37
|
-
return (0, _processSeries.applySeriesLayout)(processedSeries, seriesConfig, drawingArea);
|
|
38
|
-
});
|
|
39
|
-
|
|
40
30
|
/**
|
|
41
31
|
* Returns a function that returns the series configuration for a given series id.
|
|
42
32
|
*/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createSelectorMemoized, createSelector } from '@mui/x-internals/store';
|
|
2
|
-
import {
|
|
3
|
-
import { selectorChartDrawingArea } from "../useChartDimensions/index.mjs";
|
|
2
|
+
import { applySeriesProcessors } from "./processSeries.mjs";
|
|
4
3
|
import { selectorIsItemVisibleGetter } from "../../featurePlugins/useChartVisibilityManager/index.mjs";
|
|
5
4
|
import { selectorChartSeriesConfig } from "../useChartSeriesConfig/useChartSeriesConfig.selectors.mjs";
|
|
6
5
|
export const selectorChartSeriesState = state => state.series;
|
|
@@ -21,15 +20,6 @@ export const selectorChartSeriesProcessed = createSelectorMemoized(selectorChart
|
|
|
21
20
|
return applySeriesProcessors(defaultizedSeries, seriesConfig, dataset, isItemVisible);
|
|
22
21
|
});
|
|
23
22
|
|
|
24
|
-
/**
|
|
25
|
-
* Get the processed series after applying series processors.
|
|
26
|
-
* This selector computes the processed series on-demand from the defaultized series.
|
|
27
|
-
* @returns {ProcessedSeries} The processed series.
|
|
28
|
-
*/
|
|
29
|
-
export const selectorChartSeriesLayout = createSelectorMemoized(selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartDrawingArea, function selectorChartSeriesLayout(processedSeries, seriesConfig, drawingArea) {
|
|
30
|
-
return applySeriesLayout(processedSeries, seriesConfig, drawingArea);
|
|
31
|
-
});
|
|
32
|
-
|
|
33
23
|
/**
|
|
34
24
|
* Returns a function that returns the series configuration for a given series id.
|
|
35
25
|
*/
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the processed series after applying series layout.
|
|
3
|
+
* This selector computes the series layout on-demand from the processed series.
|
|
4
|
+
* @returns {SeriesLayout} The series with layout applied.
|
|
5
|
+
*/
|
|
6
|
+
export declare const selectorChartSeriesLayout: (args_0: import("../useChartId/useChartId.types.mjs").UseChartIdState & import("../useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("./useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../useChartInteractionListener/index.mjs").UseChartInteractionListenerState & Partial<{}> & {
|
|
7
|
+
cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
|
|
8
|
+
}) => import("./useChartSeries.types.mjs").SeriesLayout<keyof import("../../../index.mjs").ChartsSeriesConfig>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the processed series after applying series layout.
|
|
3
|
+
* This selector computes the series layout on-demand from the processed series.
|
|
4
|
+
* @returns {SeriesLayout} The series with layout applied.
|
|
5
|
+
*/
|
|
6
|
+
export declare const selectorChartSeriesLayout: (args_0: import("../useChartId/useChartId.types.js").UseChartIdState & import("../useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("./useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
7
|
+
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
8
|
+
}) => import("./useChartSeries.types.js").SeriesLayout<keyof import("../../../index.js").ChartsSeriesConfig>;
|