@mui/x-charts-premium 9.0.4 → 9.2.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/BarChartPremium/BarChartPremium.d.mts +4 -1
- package/BarChartPremium/BarChartPremium.d.ts +4 -1
- package/BarChartPremium/BarChartPremium.js +23 -1191
- package/BarChartPremium/BarChartPremium.mjs +24 -1192
- package/BarChartPremium/BarPlotPremium.d.mts +37 -0
- package/BarChartPremium/BarPlotPremium.d.ts +37 -0
- package/BarChartPremium/BarPlotPremium.js +78 -0
- package/BarChartPremium/BarPlotPremium.mjs +72 -0
- package/BarChartPremium/RangeBar/seriesConfig/seriesProcessor.js +2 -0
- package/BarChartPremium/RangeBar/seriesConfig/seriesProcessor.mjs +2 -0
- package/BarChartPremium/RangeBar/useUtilityClasses.d.mts +1 -1
- package/BarChartPremium/RangeBar/useUtilityClasses.d.ts +1 -1
- package/BarChartPremium/index.d.mts +1 -0
- package/BarChartPremium/index.d.ts +1 -0
- package/BarChartPremium/index.js +12 -0
- package/BarChartPremium/index.mjs +1 -0
- package/BarChartPremium/useBarChartPremiumProps.d.mts +2 -1
- package/BarChartPremium/useBarChartPremiumProps.d.ts +2 -1
- package/BarChartPremium/useBarChartPremiumProps.js +39 -5
- package/BarChartPremium/useBarChartPremiumProps.mjs +39 -5
- package/BarChartPremium/webgl/BarWebGLPlot.d.mts +10 -0
- package/BarChartPremium/webgl/BarWebGLPlot.d.ts +10 -0
- package/BarChartPremium/webgl/BarWebGLPlot.js +81 -0
- package/BarChartPremium/webgl/BarWebGLPlot.mjs +75 -0
- package/BarChartPremium/webgl/BarWebGLProgram.d.mts +19 -0
- package/BarChartPremium/webgl/BarWebGLProgram.d.ts +19 -0
- package/BarChartPremium/webgl/BarWebGLProgram.js +107 -0
- package/BarChartPremium/webgl/BarWebGLProgram.mjs +100 -0
- package/BarChartPremium/webgl/shaders.d.mts +2 -0
- package/BarChartPremium/webgl/shaders.d.ts +2 -0
- package/BarChartPremium/webgl/shaders.js +69 -0
- package/BarChartPremium/webgl/shaders.mjs +63 -0
- package/BarChartPremium/webgl/useBarWebGLPlotData.d.mts +10 -0
- package/BarChartPremium/webgl/useBarWebGLPlotData.d.ts +10 -0
- package/BarChartPremium/webgl/useBarWebGLPlotData.js +160 -0
- package/BarChartPremium/webgl/useBarWebGLPlotData.mjs +154 -0
- package/CHANGELOG.md +236 -0
- package/CandlestickChart/CandlestickChart.d.mts +2 -2
- package/CandlestickChart/CandlestickChart.d.ts +2 -2
- package/CandlestickChart/CandlestickChart.js +2 -1183
- package/CandlestickChart/CandlestickChart.mjs +2 -1183
- package/CandlestickChart/CandlestickWebGLProgram.d.mts +6 -11
- package/CandlestickChart/CandlestickWebGLProgram.d.ts +6 -11
- package/CandlestickChart/CandlestickWebGLProgram.js +136 -121
- package/CandlestickChart/CandlestickWebGLProgram.mjs +137 -122
- package/CandlestickChart/useCandlestickPlotData.d.mts +2 -2
- package/CandlestickChart/useCandlestickPlotData.d.ts +2 -2
- package/CandlestickChart/useCandlestickPlotData.js +121 -61
- package/CandlestickChart/useCandlestickPlotData.mjs +122 -61
- package/ChartsAxisHighlightValue/index.d.mts +1 -0
- package/ChartsAxisHighlightValue/index.d.ts +1 -0
- package/ChartsAxisHighlightValue/index.js +16 -0
- package/ChartsAxisHighlightValue/index.mjs +2 -0
- package/ChartsDataProviderPremium/ChartsDataProviderPremium.js +2 -2
- package/ChartsDataProviderPremium/ChartsDataProviderPremium.mjs +2 -2
- package/ChartsRadialAxisHighlight/index.d.mts +1 -0
- package/ChartsRadialAxisHighlight/index.d.ts +1 -0
- package/ChartsRadialAxisHighlight/index.js +16 -0
- package/ChartsRadialAxisHighlight/index.mjs +2 -0
- package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.js +9 -3
- package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.mjs +9 -3
- package/HeatmapPremium/HeatmapPremium.js +2 -155
- package/HeatmapPremium/HeatmapPremium.mjs +2 -155
- package/HeatmapPremium/webgl/HeatmapWebGLPlot.js +19 -112
- package/HeatmapPremium/webgl/HeatmapWebGLPlot.mjs +19 -111
- package/HeatmapPremium/webgl/HeatmapWebGLProgram.d.mts +24 -0
- package/HeatmapPremium/webgl/HeatmapWebGLProgram.d.ts +24 -0
- package/HeatmapPremium/webgl/HeatmapWebGLProgram.js +132 -0
- package/HeatmapPremium/webgl/HeatmapWebGLProgram.mjs +125 -0
- package/HeatmapPremium/webgl/useHeatmapPlotData.d.mts +3 -3
- package/HeatmapPremium/webgl/useHeatmapPlotData.d.ts +3 -3
- package/HeatmapPremium/webgl/useHeatmapPlotData.js +78 -26
- package/HeatmapPremium/webgl/useHeatmapPlotData.mjs +80 -26
- package/LICENSE +3 -1
- package/RadialBarChart/RadialBarChart.d.mts +67 -0
- package/RadialBarChart/RadialBarChart.d.ts +67 -0
- package/RadialBarChart/RadialBarChart.js +311 -0
- package/RadialBarChart/RadialBarChart.mjs +305 -0
- package/RadialBarChart/RadialBarChart.plugins.d.mts +4 -0
- package/RadialBarChart/RadialBarChart.plugins.d.ts +4 -0
- package/RadialBarChart/RadialBarChart.plugins.js +9 -0
- package/RadialBarChart/RadialBarChart.plugins.mjs +3 -0
- package/RadialBarChart/RadialBarElement.d.mts +16 -0
- package/RadialBarChart/RadialBarElement.d.ts +16 -0
- package/RadialBarChart/RadialBarElement.js +68 -0
- package/RadialBarChart/RadialBarElement.mjs +62 -0
- package/RadialBarChart/RadialBarPlot.d.mts +21 -0
- package/RadialBarChart/RadialBarPlot.d.ts +21 -0
- package/RadialBarChart/RadialBarPlot.js +85 -0
- package/RadialBarChart/RadialBarPlot.mjs +79 -0
- package/RadialBarChart/index.d.mts +3 -0
- package/RadialBarChart/index.d.ts +3 -0
- package/RadialBarChart/index.js +39 -0
- package/RadialBarChart/index.mjs +3 -0
- package/RadialBarChart/radialBarClasses.d.mts +15 -0
- package/RadialBarChart/radialBarClasses.d.ts +15 -0
- package/RadialBarChart/radialBarClasses.js +26 -0
- package/RadialBarChart/radialBarClasses.mjs +18 -0
- package/RadialBarChart/seriesConfig/axisTooltipGetter.js +5 -2
- package/RadialBarChart/seriesConfig/axisTooltipGetter.mjs +5 -2
- package/RadialBarChart/seriesConfig/getItemAtPosition.d.mts +6 -0
- package/RadialBarChart/seriesConfig/getItemAtPosition.d.ts +6 -0
- package/RadialBarChart/seriesConfig/getItemAtPosition.js +69 -0
- package/RadialBarChart/seriesConfig/getItemAtPosition.mjs +63 -0
- package/RadialBarChart/seriesConfig/index.js +2 -1
- package/RadialBarChart/seriesConfig/index.mjs +2 -1
- package/RadialBarChart/seriesConfig/seriesProcessor.js +4 -0
- package/RadialBarChart/seriesConfig/seriesProcessor.mjs +4 -0
- package/RadialBarChart/useRadialBarChartProps.d.mts +30 -0
- package/RadialBarChart/useRadialBarChartProps.d.ts +30 -0
- package/RadialBarChart/useRadialBarChartProps.js +108 -0
- package/RadialBarChart/useRadialBarChartProps.mjs +101 -0
- package/RadialBarChart/useRadialBarPlotData.d.mts +23 -0
- package/RadialBarChart/useRadialBarPlotData.d.ts +23 -0
- package/RadialBarChart/useRadialBarPlotData.js +94 -0
- package/RadialBarChart/useRadialBarPlotData.mjs +87 -0
- package/RadialLineChart/RadialArea.js +13 -1
- package/RadialLineChart/RadialArea.mjs +13 -1
- package/RadialLineChart/RadialLine.js +13 -1
- package/RadialLineChart/RadialLine.mjs +13 -1
- package/RadialLineChart/RadialLineChart.d.mts +11 -3
- package/RadialLineChart/RadialLineChart.d.ts +11 -3
- package/RadialLineChart/RadialLineChart.js +26 -673
- package/RadialLineChart/RadialLineChart.mjs +26 -673
- package/RadialLineChart/RadialLineChart.plugins.d.mts +1 -1
- package/RadialLineChart/RadialLineChart.plugins.d.ts +1 -1
- package/RadialLineChart/RadialLineChart.plugins.js +1 -1
- package/RadialLineChart/RadialLineChart.plugins.mjs +1 -1
- package/RadialLineChart/RadialLineHighlightElement.d.mts +15 -0
- package/RadialLineChart/RadialLineHighlightElement.d.ts +15 -0
- package/RadialLineChart/RadialLineHighlightElement.js +46 -0
- package/RadialLineChart/RadialLineHighlightElement.mjs +39 -0
- package/RadialLineChart/RadialLineHighlightPlot.d.mts +23 -0
- package/RadialLineChart/RadialLineHighlightPlot.d.ts +23 -0
- package/RadialLineChart/RadialLineHighlightPlot.js +92 -0
- package/RadialLineChart/RadialLineHighlightPlot.mjs +86 -0
- package/RadialLineChart/RadialMarkPlot.js +17 -2
- package/RadialLineChart/RadialMarkPlot.mjs +17 -2
- package/RadialLineChart/index.d.mts +3 -1
- package/RadialLineChart/index.d.ts +3 -1
- package/RadialLineChart/index.js +22 -0
- package/RadialLineChart/index.mjs +3 -1
- package/RadialLineChart/radialLineClasses.d.mts +3 -1
- package/RadialLineChart/radialLineClasses.d.ts +3 -1
- package/RadialLineChart/radialLineClasses.js +2 -1
- package/RadialLineChart/radialLineClasses.mjs +2 -1
- package/RadialLineChart/seriesConfig/getItemAtPosition.d.mts +6 -0
- package/RadialLineChart/seriesConfig/getItemAtPosition.d.ts +6 -0
- package/RadialLineChart/seriesConfig/getItemAtPosition.js +353 -0
- package/RadialLineChart/seriesConfig/getItemAtPosition.mjs +348 -0
- package/RadialLineChart/seriesConfig/getSeriesWithDefaultValues.js +2 -1
- package/RadialLineChart/seriesConfig/getSeriesWithDefaultValues.mjs +2 -1
- package/RadialLineChart/seriesConfig/index.js +2 -1
- package/RadialLineChart/seriesConfig/index.mjs +2 -1
- package/RadialLineChart/seriesConfig/seriesProcessor.js +4 -0
- package/RadialLineChart/seriesConfig/seriesProcessor.mjs +4 -0
- package/RadialLineChart/useRadialLineChartProps.d.mts +2 -0
- package/RadialLineChart/useRadialLineChartProps.d.ts +2 -0
- package/RadialLineChart/useRadialLineChartProps.js +16 -8
- package/RadialLineChart/useRadialLineChartProps.mjs +16 -8
- package/RadialLineChart/useRadialLinePlotData.js +2 -1
- package/RadialLineChart/useRadialLinePlotData.mjs +3 -2
- package/ScatterChartPremium/ScatterChartPremium.d.mts +25 -0
- package/ScatterChartPremium/ScatterChartPremium.d.ts +25 -0
- package/ScatterChartPremium/ScatterChartPremium.js +507 -0
- package/ScatterChartPremium/ScatterChartPremium.mjs +501 -0
- package/ScatterChartPremium/ScatterChartPremium.plugins.d.mts +3 -0
- package/ScatterChartPremium/ScatterChartPremium.plugins.d.ts +3 -0
- package/ScatterChartPremium/ScatterChartPremium.plugins.js +8 -0
- package/ScatterChartPremium/ScatterChartPremium.plugins.mjs +2 -0
- package/ScatterChartPremium/ScatterPlotPremium.d.mts +14 -0
- package/ScatterChartPremium/ScatterPlotPremium.d.ts +14 -0
- package/ScatterChartPremium/ScatterPlotPremium.js +28 -0
- package/ScatterChartPremium/ScatterPlotPremium.mjs +21 -0
- package/ScatterChartPremium/index.d.mts +3 -0
- package/ScatterChartPremium/index.d.ts +3 -0
- package/ScatterChartPremium/index.js +26 -0
- package/ScatterChartPremium/index.mjs +3 -0
- package/ScatterChartPremium/webgl/ScatterWebGLPlot.d.mts +4 -0
- package/ScatterChartPremium/webgl/ScatterWebGLPlot.d.ts +4 -0
- package/ScatterChartPremium/webgl/ScatterWebGLPlot.js +70 -0
- package/ScatterChartPremium/webgl/ScatterWebGLPlot.mjs +65 -0
- package/ScatterChartPremium/webgl/ScatterWebGLProgram.d.mts +18 -0
- package/ScatterChartPremium/webgl/ScatterWebGLProgram.d.ts +18 -0
- package/ScatterChartPremium/webgl/ScatterWebGLProgram.js +129 -0
- package/ScatterChartPremium/webgl/ScatterWebGLProgram.mjs +122 -0
- package/ScatterChartPremium/webgl/shaders.d.mts +2 -0
- package/ScatterChartPremium/webgl/shaders.d.ts +2 -0
- package/ScatterChartPremium/webgl/shaders.js +57 -0
- package/ScatterChartPremium/webgl/shaders.mjs +51 -0
- package/ScatterChartPremium/webgl/useScatterWebGLPlotData.d.mts +7 -0
- package/ScatterChartPremium/webgl/useScatterWebGLPlotData.d.ts +7 -0
- package/ScatterChartPremium/webgl/useScatterWebGLPlotData.js +140 -0
- package/ScatterChartPremium/webgl/useScatterWebGLPlotData.mjs +134 -0
- package/index.d.mts +3 -1
- package/index.d.ts +3 -1
- package/index.js +25 -1
- package/index.mjs +4 -2
- package/internals/index.d.mts +1 -0
- package/internals/index.d.ts +1 -0
- package/internals/index.js +13 -0
- package/internals/index.mjs +1 -0
- package/models/seriesType/radialLine.d.mts +7 -1
- package/models/seriesType/radialLine.d.ts +7 -1
- package/package.json +76 -6
- package/plugins/selectors/useChartCandlestickPosition.selectors.d.mts +1 -1
- package/plugins/selectors/useChartCandlestickPosition.selectors.d.ts +1 -1
- package/utils/webgl/parseColor.d.mts +2 -1
- package/utils/webgl/parseColor.d.ts +2 -1
- package/utils/webgl/parseColor.js +8 -7
- package/utils/webgl/parseColor.mjs +8 -7
- package/utils/webgl/utils.d.mts +13 -0
- package/utils/webgl/utils.d.ts +13 -0
- package/utils/webgl/utils.js +29 -0
- package/utils/webgl/utils.mjs +27 -0
|
@@ -1,50 +1,104 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
4
|
import { useZColorScale } from '@mui/x-charts/hooks';
|
|
3
5
|
import { selectorChartsHighlightStateCallback, useStore } from '@mui/x-charts/internals';
|
|
4
6
|
import { parseColor } from "../../utils/webgl/parseColor.mjs";
|
|
7
|
+
|
|
8
|
+
/* Far enough off-canvas that the rect is never visible; used for invalid x/y entries.
|
|
9
|
+
* Avoids coupling the position pass to the color/saturation passes. */
|
|
10
|
+
const OFFSCREEN = -1e9;
|
|
11
|
+
function ensurePoolFloat32(pool, n) {
|
|
12
|
+
if (pool && pool.length >= n) {
|
|
13
|
+
return pool;
|
|
14
|
+
}
|
|
15
|
+
return new Float32Array(n);
|
|
16
|
+
}
|
|
5
17
|
export function useHeatmapPlotData(drawingArea, series, xScale, yScale) {
|
|
6
18
|
const width = xScale.bandwidth();
|
|
7
19
|
const height = yScale.bandwidth();
|
|
8
20
|
const colorScale = useZColorScale();
|
|
9
21
|
const store = useStore();
|
|
10
22
|
const getHighlightState = store.use(selectorChartsHighlightStateCallback);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
23
|
+
|
|
24
|
+
/* Colors only change when series data or color scale changes. Cached so resize/highlight
|
|
25
|
+
* renders don't re-upload the colors buffer.
|
|
26
|
+
* Stored as Uint8 (1 byte per channel) — 4x less GPU traffic than Float32 RGBA. */
|
|
27
|
+
const colors = React.useMemo(() => {
|
|
28
|
+
const out = new Uint8Array(series.data.length * 4);
|
|
17
29
|
for (let dataIndex = 0; dataIndex < series.data.length; dataIndex += 1) {
|
|
18
|
-
const
|
|
19
|
-
const x = xScale(xDomain[xIndex]);
|
|
20
|
-
const y = yScale(yDomain[yIndex]);
|
|
30
|
+
const value = series.data[dataIndex][2];
|
|
21
31
|
const color = colorScale?.(value);
|
|
22
|
-
if (
|
|
32
|
+
if (!color) {
|
|
33
|
+
/* Alpha 0 hides the rect; src-alpha blending makes RGB irrelevant. */
|
|
23
34
|
continue;
|
|
24
35
|
}
|
|
25
|
-
centers[dataIndex * 2] = x + width / 2 - drawingArea.left;
|
|
26
|
-
centers[dataIndex * 2 + 1] = y + height / 2 - drawingArea.top;
|
|
27
36
|
const rgbColor = parseColor(color);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
out[dataIndex * 4] = rgbColor[0];
|
|
38
|
+
out[dataIndex * 4 + 1] = rgbColor[1];
|
|
39
|
+
out[dataIndex * 4 + 2] = rgbColor[2];
|
|
40
|
+
out[dataIndex * 4 + 3] = 255;
|
|
41
|
+
}
|
|
42
|
+
return out;
|
|
43
|
+
}, [colorScale, series.data]);
|
|
44
|
+
|
|
45
|
+
/* Saturations only change with highlight state. Pooled so highlight churn doesn't
|
|
46
|
+
* allocate per change. */
|
|
47
|
+
const saturationsPoolRef = React.useRef(null);
|
|
48
|
+
const saturations = React.useMemo(() => {
|
|
49
|
+
const n = series.data.length;
|
|
50
|
+
const pool = ensurePoolFloat32(saturationsPoolRef.current ?? undefined, n);
|
|
51
|
+
saturationsPoolRef.current = pool;
|
|
52
|
+
for (let dataIndex = 0; dataIndex < n; dataIndex += 1) {
|
|
53
|
+
const item = series.data[dataIndex];
|
|
32
54
|
const highlightState = getHighlightState({
|
|
33
55
|
type: 'heatmap',
|
|
34
56
|
seriesId: series.id,
|
|
35
|
-
xIndex,
|
|
36
|
-
yIndex
|
|
57
|
+
xIndex: item[0],
|
|
58
|
+
yIndex: item[1]
|
|
37
59
|
});
|
|
60
|
+
let saturation = 0;
|
|
38
61
|
if (highlightState === 'highlighted') {
|
|
39
|
-
|
|
62
|
+
saturation = 0.2;
|
|
40
63
|
} else if (highlightState === 'faded') {
|
|
41
|
-
|
|
64
|
+
saturation = -0.2;
|
|
65
|
+
}
|
|
66
|
+
pool[dataIndex] = saturation;
|
|
67
|
+
}
|
|
68
|
+
/* Subarray gives a fresh identity over the same bytes — upload short-circuit fires. */
|
|
69
|
+
return pool.subarray(0, n);
|
|
70
|
+
}, [getHighlightState, series.data, series.id]);
|
|
71
|
+
|
|
72
|
+
/* Positions change on resize (drawing area / band width). Pooled to avoid per-frame
|
|
73
|
+
* allocation. Subarray view gives a fresh identity each call so the upload still runs. */
|
|
74
|
+
const centersPoolRef = React.useRef(null);
|
|
75
|
+
const centers = React.useMemo(() => {
|
|
76
|
+
const n = series.data.length;
|
|
77
|
+
const pool = ensurePoolFloat32(centersPoolRef.current ?? undefined, n * 2);
|
|
78
|
+
centersPoolRef.current = pool;
|
|
79
|
+
const left = drawingArea.left;
|
|
80
|
+
const top = drawingArea.top;
|
|
81
|
+
const halfWidth = width / 2;
|
|
82
|
+
const halfHeight = height / 2;
|
|
83
|
+
const xDomain = xScale.domain();
|
|
84
|
+
const yDomain = yScale.domain();
|
|
85
|
+
for (let dataIndex = 0; dataIndex < n; dataIndex += 1) {
|
|
86
|
+
const item = series.data[dataIndex];
|
|
87
|
+
const x = xScale(xDomain[item[0]]);
|
|
88
|
+
const y = yScale(yDomain[item[1]]);
|
|
89
|
+
if (x === undefined || y === undefined) {
|
|
90
|
+
pool[dataIndex * 2] = OFFSCREEN;
|
|
91
|
+
pool[dataIndex * 2 + 1] = OFFSCREEN;
|
|
92
|
+
continue;
|
|
42
93
|
}
|
|
94
|
+
pool[dataIndex * 2] = x + halfWidth - left;
|
|
95
|
+
pool[dataIndex * 2 + 1] = y + halfHeight - top;
|
|
43
96
|
}
|
|
44
|
-
return
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
97
|
+
return pool.subarray(0, n * 2);
|
|
98
|
+
}, [drawingArea.left, drawingArea.top, height, series.data, width, xScale, yScale]);
|
|
99
|
+
return React.useMemo(() => ({
|
|
100
|
+
centers,
|
|
101
|
+
colors,
|
|
102
|
+
saturations
|
|
103
|
+
}), [centers, colors, saturations]);
|
|
50
104
|
}
|
package/LICENSE
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
# License
|
|
2
|
+
|
|
1
3
|
Commercial License
|
|
2
4
|
|
|
3
5
|
Copyright (c) 2020 Material-UI SAS
|
|
4
6
|
|
|
5
|
-
MUI
|
|
7
|
+
MUI X Premium (https://mui.com/pricing/) is commercial software. You MUST agree to the
|
|
6
8
|
End User License Agreement (EULA: https://mui.com/r/x-license-eula) to be able to
|
|
7
9
|
use the software.
|
|
8
10
|
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type MakeOptional } from '@mui/x-internals/types';
|
|
3
|
+
import { type ChartsSlots, type ChartsSlotProps } from '@mui/x-charts/internals';
|
|
4
|
+
import { type ChartsRadialGridProps } from '@mui/x-charts/ChartsRadialGrid';
|
|
5
|
+
import { type ChartsLegendSlots, type ChartsLegendSlotProps } from "../ChartsLegend/index.mjs";
|
|
6
|
+
import { type ChartsTooltipSlots, type ChartsTooltipSlotProps } from "../ChartsTooltip/index.mjs";
|
|
7
|
+
import { type ChartsOverlayProps, type ChartsOverlaySlots, type ChartsOverlaySlotProps } from "../ChartsOverlay/index.mjs";
|
|
8
|
+
import { type ChartsToolbarSlots, type ChartsToolbarSlotProps } from "../Toolbar/index.mjs";
|
|
9
|
+
import { type ChartsRadialDataProviderPremiumProps } from "../ChartsRadialDataProviderPremium/index.mjs";
|
|
10
|
+
import type { RadialBarSeriesType } from "../models/seriesType/radialBar.mjs";
|
|
11
|
+
import { type RadialBarChartPluginSignatures } from "./RadialBarChart.plugins.mjs";
|
|
12
|
+
import { type ChartsRadialAxisHighlightProps } from "../ChartsRadialAxisHighlight/index.mjs";
|
|
13
|
+
export type RadialBarSeries = MakeOptional<RadialBarSeriesType, 'type'>;
|
|
14
|
+
export interface RadialBarChartSlots extends ChartsLegendSlots, ChartsOverlaySlots, ChartsTooltipSlots, ChartsToolbarSlots, Partial<ChartsSlots> {}
|
|
15
|
+
export interface RadialBarChartSlotProps extends ChartsLegendSlotProps, ChartsOverlaySlotProps, ChartsTooltipSlotProps, ChartsToolbarSlotProps, Partial<ChartsSlotProps> {}
|
|
16
|
+
export interface RadialBarChartProps extends Omit<ChartsRadialDataProviderPremiumProps<'radialBar', RadialBarChartPluginSignatures>, 'series' | 'plugins' | 'zAxis' | 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
|
|
17
|
+
/**
|
|
18
|
+
* The series to display in the radial bar chart.
|
|
19
|
+
* An array of [[RadialBarSeries]] objects.
|
|
20
|
+
*/
|
|
21
|
+
series: Readonly<RadialBarSeries[]>;
|
|
22
|
+
/**
|
|
23
|
+
* The configuration of axes highlight.
|
|
24
|
+
* @see See {@link https://mui.com/x/react-charts/highlighting highlighting docs} for more details.
|
|
25
|
+
* @default { rotation: 'band' } or { radius: 'band' } according to the layout.
|
|
26
|
+
*/
|
|
27
|
+
axisHighlight?: ChartsRadialAxisHighlightProps;
|
|
28
|
+
/**
|
|
29
|
+
* Option to display a radial grid in the background.
|
|
30
|
+
*/
|
|
31
|
+
grid?: Pick<ChartsRadialGridProps, 'radius' | 'rotation'>;
|
|
32
|
+
/**
|
|
33
|
+
* If `true`, the legend is not rendered.
|
|
34
|
+
*/
|
|
35
|
+
hideLegend?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Overridable component slots.
|
|
38
|
+
* @default {}
|
|
39
|
+
*/
|
|
40
|
+
slots?: RadialBarChartSlots;
|
|
41
|
+
/**
|
|
42
|
+
* The props used for each component slot.
|
|
43
|
+
* @default {}
|
|
44
|
+
*/
|
|
45
|
+
slotProps?: RadialBarChartSlotProps;
|
|
46
|
+
/**
|
|
47
|
+
* If `true`, animations are skipped.
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
skipAnimation?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* If true, shows the default chart toolbar.
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
55
|
+
showToolbar?: boolean;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Demos:
|
|
59
|
+
*
|
|
60
|
+
* - [Radial bar demonstration](https://mui.com/x/react-charts/radial-bar/)
|
|
61
|
+
*
|
|
62
|
+
* API:
|
|
63
|
+
*
|
|
64
|
+
* - [RadialBarChart API](https://mui.com/x/api/charts/radial-bar-chart/)
|
|
65
|
+
*/
|
|
66
|
+
declare const RadialBarChart: React.ForwardRefExoticComponent<RadialBarChartProps & React.RefAttributes<HTMLDivElement>>;
|
|
67
|
+
export { RadialBarChart as Unstable_RadialBarChart };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type MakeOptional } from '@mui/x-internals/types';
|
|
3
|
+
import { type ChartsSlots, type ChartsSlotProps } from '@mui/x-charts/internals';
|
|
4
|
+
import { type ChartsRadialGridProps } from '@mui/x-charts/ChartsRadialGrid';
|
|
5
|
+
import { type ChartsLegendSlots, type ChartsLegendSlotProps } from "../ChartsLegend/index.js";
|
|
6
|
+
import { type ChartsTooltipSlots, type ChartsTooltipSlotProps } from "../ChartsTooltip/index.js";
|
|
7
|
+
import { type ChartsOverlayProps, type ChartsOverlaySlots, type ChartsOverlaySlotProps } from "../ChartsOverlay/index.js";
|
|
8
|
+
import { type ChartsToolbarSlots, type ChartsToolbarSlotProps } from "../Toolbar/index.js";
|
|
9
|
+
import { type ChartsRadialDataProviderPremiumProps } from "../ChartsRadialDataProviderPremium/index.js";
|
|
10
|
+
import type { RadialBarSeriesType } from "../models/seriesType/radialBar.js";
|
|
11
|
+
import { type RadialBarChartPluginSignatures } from "./RadialBarChart.plugins.js";
|
|
12
|
+
import { type ChartsRadialAxisHighlightProps } from "../ChartsRadialAxisHighlight/index.js";
|
|
13
|
+
export type RadialBarSeries = MakeOptional<RadialBarSeriesType, 'type'>;
|
|
14
|
+
export interface RadialBarChartSlots extends ChartsLegendSlots, ChartsOverlaySlots, ChartsTooltipSlots, ChartsToolbarSlots, Partial<ChartsSlots> {}
|
|
15
|
+
export interface RadialBarChartSlotProps extends ChartsLegendSlotProps, ChartsOverlaySlotProps, ChartsTooltipSlotProps, ChartsToolbarSlotProps, Partial<ChartsSlotProps> {}
|
|
16
|
+
export interface RadialBarChartProps extends Omit<ChartsRadialDataProviderPremiumProps<'radialBar', RadialBarChartPluginSignatures>, 'series' | 'plugins' | 'zAxis' | 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
|
|
17
|
+
/**
|
|
18
|
+
* The series to display in the radial bar chart.
|
|
19
|
+
* An array of [[RadialBarSeries]] objects.
|
|
20
|
+
*/
|
|
21
|
+
series: Readonly<RadialBarSeries[]>;
|
|
22
|
+
/**
|
|
23
|
+
* The configuration of axes highlight.
|
|
24
|
+
* @see See {@link https://mui.com/x/react-charts/highlighting highlighting docs} for more details.
|
|
25
|
+
* @default { rotation: 'band' } or { radius: 'band' } according to the layout.
|
|
26
|
+
*/
|
|
27
|
+
axisHighlight?: ChartsRadialAxisHighlightProps;
|
|
28
|
+
/**
|
|
29
|
+
* Option to display a radial grid in the background.
|
|
30
|
+
*/
|
|
31
|
+
grid?: Pick<ChartsRadialGridProps, 'radius' | 'rotation'>;
|
|
32
|
+
/**
|
|
33
|
+
* If `true`, the legend is not rendered.
|
|
34
|
+
*/
|
|
35
|
+
hideLegend?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Overridable component slots.
|
|
38
|
+
* @default {}
|
|
39
|
+
*/
|
|
40
|
+
slots?: RadialBarChartSlots;
|
|
41
|
+
/**
|
|
42
|
+
* The props used for each component slot.
|
|
43
|
+
* @default {}
|
|
44
|
+
*/
|
|
45
|
+
slotProps?: RadialBarChartSlotProps;
|
|
46
|
+
/**
|
|
47
|
+
* If `true`, animations are skipped.
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
skipAnimation?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* If true, shows the default chart toolbar.
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
55
|
+
showToolbar?: boolean;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Demos:
|
|
59
|
+
*
|
|
60
|
+
* - [Radial bar demonstration](https://mui.com/x/react-charts/radial-bar/)
|
|
61
|
+
*
|
|
62
|
+
* API:
|
|
63
|
+
*
|
|
64
|
+
* - [RadialBarChart API](https://mui.com/x/api/charts/radial-bar-chart/)
|
|
65
|
+
*/
|
|
66
|
+
declare const RadialBarChart: React.ForwardRefExoticComponent<RadialBarChartProps & React.RefAttributes<HTMLDivElement>>;
|
|
67
|
+
export { RadialBarChart as Unstable_RadialBarChart };
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.Unstable_RadialBarChart = void 0;
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
var _styles = require("@mui/material/styles");
|
|
14
|
+
var _internals = require("@mui/x-charts/internals");
|
|
15
|
+
var _ChartsRadialGrid = require("@mui/x-charts/ChartsRadialGrid");
|
|
16
|
+
var _ChartsRotationAxis = require("@mui/x-charts/ChartsRotationAxis");
|
|
17
|
+
var _ChartsRadiusAxis = require("@mui/x-charts/ChartsRadiusAxis");
|
|
18
|
+
var _ChartsLegend = require("../ChartsLegend");
|
|
19
|
+
var _ChartsSurface = require("../ChartsSurface");
|
|
20
|
+
var _ChartsTooltip = require("../ChartsTooltip");
|
|
21
|
+
var _ChartsWrapper = require("../ChartsWrapper");
|
|
22
|
+
var _ChartsClipPath = require("../ChartsClipPath");
|
|
23
|
+
var _ChartsOverlay = require("../ChartsOverlay");
|
|
24
|
+
var _seriesConfig = require("./seriesConfig");
|
|
25
|
+
var _ChartsRadialDataProviderPremium = require("../ChartsRadialDataProviderPremium");
|
|
26
|
+
var _RadialBarPlot = require("./RadialBarPlot");
|
|
27
|
+
var _useRadialBarChartProps = require("./useRadialBarChartProps");
|
|
28
|
+
var _ChartsRadialAxisHighlight = require("../ChartsRadialAxisHighlight");
|
|
29
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
30
|
+
const seriesConfig = {
|
|
31
|
+
radialBar: _seriesConfig.radialBarSeriesConfig
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Demos:
|
|
36
|
+
*
|
|
37
|
+
* - [Radial bar demonstration](https://mui.com/x/react-charts/radial-bar/)
|
|
38
|
+
*
|
|
39
|
+
* API:
|
|
40
|
+
*
|
|
41
|
+
* - [RadialBarChart API](https://mui.com/x/api/charts/radial-bar-chart/)
|
|
42
|
+
*/
|
|
43
|
+
const RadialBarChart = exports.Unstable_RadialBarChart = /*#__PURE__*/React.forwardRef(function RadialBarChart(inProps, ref) {
|
|
44
|
+
const props = (0, _styles.useThemeProps)({
|
|
45
|
+
props: inProps,
|
|
46
|
+
name: 'MuiRadialBarChart'
|
|
47
|
+
});
|
|
48
|
+
const {
|
|
49
|
+
chartsWrapperProps,
|
|
50
|
+
chartsContainerProps,
|
|
51
|
+
gridProps,
|
|
52
|
+
clipPathProps,
|
|
53
|
+
clipPathGroupProps,
|
|
54
|
+
overlayProps,
|
|
55
|
+
legendProps,
|
|
56
|
+
axisHighlightProps,
|
|
57
|
+
children
|
|
58
|
+
} = (0, _useRadialBarChartProps.useRadialBarChartProps)(props);
|
|
59
|
+
const {
|
|
60
|
+
chartsDataProviderProps,
|
|
61
|
+
chartsSurfaceProps
|
|
62
|
+
} = (0, _internals.useChartsContainerProps)(chartsContainerProps);
|
|
63
|
+
const Tooltip = props.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
|
|
64
|
+
const Toolbar = props.slots?.toolbar;
|
|
65
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsRadialDataProviderPremium.ChartsRadialDataProviderPremium, (0, _extends2.default)({}, chartsDataProviderProps, {
|
|
66
|
+
seriesConfig: seriesConfig,
|
|
67
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
|
|
68
|
+
ref: ref,
|
|
69
|
+
children: [props.showToolbar && Toolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, (0, _extends2.default)({}, props.slotProps?.toolbar)) : null, !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
|
|
70
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsRadialGrid.Unstable_ChartsRadialGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsRadialAxisHighlight.Unstable_ChartsRadialAxisHighlight, (0, _extends2.default)({}, axisHighlightProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", (0, _extends2.default)({}, clipPathGroupProps, {
|
|
71
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_RadialBarPlot.RadialBarPlot, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps))]
|
|
72
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsRotationAxis.Unstable_ChartsRotationAxis, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsRadiusAxis.Unstable_ChartsRadiusAxis, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, (0, _extends2.default)({}, clipPathProps)), children]
|
|
73
|
+
})), !props.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({}, props.slotProps?.tooltip))]
|
|
74
|
+
}))
|
|
75
|
+
}));
|
|
76
|
+
});
|
|
77
|
+
if (process.env.NODE_ENV !== "production") RadialBarChart.displayName = "RadialBarChart";
|
|
78
|
+
process.env.NODE_ENV !== "production" ? RadialBarChart.propTypes = {
|
|
79
|
+
// ----------------------------- Warning --------------------------------
|
|
80
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
81
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
82
|
+
// ----------------------------------------------------------------------
|
|
83
|
+
apiRef: _propTypes.default.shape({
|
|
84
|
+
current: _propTypes.default.shape({
|
|
85
|
+
exportAsImage: _propTypes.default.func.isRequired,
|
|
86
|
+
exportAsPrint: _propTypes.default.func.isRequired
|
|
87
|
+
})
|
|
88
|
+
}),
|
|
89
|
+
/**
|
|
90
|
+
* The configuration of axes highlight.
|
|
91
|
+
* @see See {@link https://mui.com/x/react-charts/highlighting highlighting docs} for more details.
|
|
92
|
+
* @default { rotation: 'band' } or { radius: 'band' } according to the layout.
|
|
93
|
+
*/
|
|
94
|
+
axisHighlight: _propTypes.default.shape({
|
|
95
|
+
radius: _propTypes.default.oneOf(['band', 'line', 'none']),
|
|
96
|
+
rotation: _propTypes.default.oneOf(['band', 'line', 'none'])
|
|
97
|
+
}),
|
|
98
|
+
/**
|
|
99
|
+
* Color palette used to colorize multiple series.
|
|
100
|
+
* @default rainbowSurgePalette
|
|
101
|
+
*/
|
|
102
|
+
colors: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string), _propTypes.default.func]),
|
|
103
|
+
/**
|
|
104
|
+
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
105
|
+
*/
|
|
106
|
+
dataset: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
107
|
+
/**
|
|
108
|
+
* If `true`, the charts will not listen to the mouse move event.
|
|
109
|
+
* It might break interactive features, but will improve performance.
|
|
110
|
+
* @default false
|
|
111
|
+
*/
|
|
112
|
+
disableAxisListener: _propTypes.default.bool,
|
|
113
|
+
/**
|
|
114
|
+
* If `true`, disables keyboard navigation for the chart.
|
|
115
|
+
*/
|
|
116
|
+
disableKeyboardNavigation: _propTypes.default.bool,
|
|
117
|
+
/**
|
|
118
|
+
* Options to enable features planned for the next major.
|
|
119
|
+
*/
|
|
120
|
+
experimentalFeatures: _propTypes.default.object,
|
|
121
|
+
/**
|
|
122
|
+
* Option to display a radial grid in the background.
|
|
123
|
+
*/
|
|
124
|
+
grid: _propTypes.default.shape({
|
|
125
|
+
radius: _propTypes.default.bool,
|
|
126
|
+
rotation: _propTypes.default.bool
|
|
127
|
+
}),
|
|
128
|
+
/**
|
|
129
|
+
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
130
|
+
*/
|
|
131
|
+
height: _propTypes.default.number,
|
|
132
|
+
/**
|
|
133
|
+
* List of hidden series and/or items.
|
|
134
|
+
*
|
|
135
|
+
* Different chart types use different keys.
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* ```ts
|
|
139
|
+
* [
|
|
140
|
+
* {
|
|
141
|
+
* type: 'pie',
|
|
142
|
+
* seriesId: 'series-1',
|
|
143
|
+
* dataIndex: 3,
|
|
144
|
+
* },
|
|
145
|
+
* {
|
|
146
|
+
* type: 'line',
|
|
147
|
+
* seriesId: 'series-2',
|
|
148
|
+
* }
|
|
149
|
+
* ]
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
152
|
+
hiddenItems: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.shape({
|
|
153
|
+
dataIndex: _propTypes.default.number,
|
|
154
|
+
seriesId: _propTypes.default.string.isRequired,
|
|
155
|
+
type: _propTypes.default.oneOf(['radialBar'])
|
|
156
|
+
}), _propTypes.default.shape({
|
|
157
|
+
dataIndex: _propTypes.default.number,
|
|
158
|
+
seriesId: _propTypes.default.string.isRequired,
|
|
159
|
+
type: _propTypes.default.oneOf(['radialBar']).isRequired
|
|
160
|
+
})]).isRequired),
|
|
161
|
+
/**
|
|
162
|
+
* If `true`, the legend is not rendered.
|
|
163
|
+
*/
|
|
164
|
+
hideLegend: _propTypes.default.bool,
|
|
165
|
+
/**
|
|
166
|
+
* The highlighted item.
|
|
167
|
+
* Used when the highlight is controlled.
|
|
168
|
+
*/
|
|
169
|
+
highlightedItem: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
170
|
+
dataIndex: _propTypes.default.number.isRequired,
|
|
171
|
+
seriesId: _propTypes.default.string.isRequired,
|
|
172
|
+
type: _propTypes.default.oneOf(['radialBar']).isRequired
|
|
173
|
+
}), _propTypes.default.shape({
|
|
174
|
+
dataIndex: _propTypes.default.number.isRequired,
|
|
175
|
+
seriesId: _propTypes.default.string.isRequired
|
|
176
|
+
})]),
|
|
177
|
+
/**
|
|
178
|
+
* This prop is used to help implement the accessibility logic.
|
|
179
|
+
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
180
|
+
*/
|
|
181
|
+
id: _propTypes.default.string,
|
|
182
|
+
/**
|
|
183
|
+
* List of initially hidden series and/or items.
|
|
184
|
+
* Used for uncontrolled state.
|
|
185
|
+
*
|
|
186
|
+
* Different chart types use different keys.
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* ```ts
|
|
190
|
+
* [
|
|
191
|
+
* {
|
|
192
|
+
* type: 'pie',
|
|
193
|
+
* seriesId: 'series-1',
|
|
194
|
+
* dataIndex: 3,
|
|
195
|
+
* },
|
|
196
|
+
* {
|
|
197
|
+
* type: 'line',
|
|
198
|
+
* seriesId: 'series-2',
|
|
199
|
+
* }
|
|
200
|
+
* ]
|
|
201
|
+
* ```
|
|
202
|
+
*/
|
|
203
|
+
initialHiddenItems: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.shape({
|
|
204
|
+
dataIndex: _propTypes.default.number,
|
|
205
|
+
seriesId: _propTypes.default.string.isRequired,
|
|
206
|
+
type: _propTypes.default.oneOf(['radialBar'])
|
|
207
|
+
}), _propTypes.default.shape({
|
|
208
|
+
dataIndex: _propTypes.default.number,
|
|
209
|
+
seriesId: _propTypes.default.string.isRequired,
|
|
210
|
+
type: _propTypes.default.oneOf(['radialBar']).isRequired
|
|
211
|
+
})]).isRequired),
|
|
212
|
+
/**
|
|
213
|
+
* If `true`, a loading overlay is displayed.
|
|
214
|
+
* @default false
|
|
215
|
+
*/
|
|
216
|
+
loading: _propTypes.default.bool,
|
|
217
|
+
/**
|
|
218
|
+
* Localized text for chart components.
|
|
219
|
+
*/
|
|
220
|
+
localeText: _propTypes.default.object,
|
|
221
|
+
/**
|
|
222
|
+
* The margin between the SVG and the drawing area.
|
|
223
|
+
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
224
|
+
*
|
|
225
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
226
|
+
*/
|
|
227
|
+
margin: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
228
|
+
bottom: _propTypes.default.number,
|
|
229
|
+
left: _propTypes.default.number,
|
|
230
|
+
right: _propTypes.default.number,
|
|
231
|
+
top: _propTypes.default.number
|
|
232
|
+
})]),
|
|
233
|
+
/**
|
|
234
|
+
* The function called for onClick events.
|
|
235
|
+
* The second argument contains information about all line/bar elements at the current mouse position.
|
|
236
|
+
* @param {MouseEvent} event The mouse event recorded on the `<svg/>` element.
|
|
237
|
+
* @param {null | ChartsAxisData} data The data about the clicked axis and items associated with it.
|
|
238
|
+
*/
|
|
239
|
+
onAxisClick: _propTypes.default.func,
|
|
240
|
+
/**
|
|
241
|
+
* Callback fired when any hidden identifiers change.
|
|
242
|
+
* @param {VisibilityIdentifierWithType[]} hiddenItems The new list of hidden identifiers.
|
|
243
|
+
*/
|
|
244
|
+
onHiddenItemsChange: _propTypes.default.func,
|
|
245
|
+
/**
|
|
246
|
+
* The callback fired when the highlighted item changes.
|
|
247
|
+
*
|
|
248
|
+
* @param {HighlightItemIdentifierWithType<SeriesType> | null} highlightedItem The newly highlighted item.
|
|
249
|
+
*/
|
|
250
|
+
onHighlightChange: _propTypes.default.func,
|
|
251
|
+
/**
|
|
252
|
+
* The callback fired when the tooltip item changes.
|
|
253
|
+
*
|
|
254
|
+
* @param {SeriesItemIdentifier<SeriesType> | null} tooltipItem The newly highlighted item.
|
|
255
|
+
*/
|
|
256
|
+
onTooltipItemChange: _propTypes.default.func,
|
|
257
|
+
/**
|
|
258
|
+
* The configuration of the radial-axes.
|
|
259
|
+
* If not provided, a default axis config is used.
|
|
260
|
+
* An array of [[AxisConfig]] objects.
|
|
261
|
+
*/
|
|
262
|
+
radiusAxis: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
263
|
+
/**
|
|
264
|
+
* The configuration of the rotation-axes.
|
|
265
|
+
* If not provided, a default axis config is used.
|
|
266
|
+
* An array of [[AxisConfig]] objects.
|
|
267
|
+
*/
|
|
268
|
+
rotationAxis: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
269
|
+
/**
|
|
270
|
+
* The series to display in the radial bar chart.
|
|
271
|
+
* An array of [[RadialBarSeries]] objects.
|
|
272
|
+
*/
|
|
273
|
+
series: _propTypes.default.arrayOf(_propTypes.default.object).isRequired,
|
|
274
|
+
/**
|
|
275
|
+
* If true, shows the default chart toolbar.
|
|
276
|
+
* @default false
|
|
277
|
+
*/
|
|
278
|
+
showToolbar: _propTypes.default.bool,
|
|
279
|
+
/**
|
|
280
|
+
* If `true`, animations are skipped.
|
|
281
|
+
* @default false
|
|
282
|
+
*/
|
|
283
|
+
skipAnimation: _propTypes.default.bool,
|
|
284
|
+
/**
|
|
285
|
+
* The props used for each component slot.
|
|
286
|
+
* @default {}
|
|
287
|
+
*/
|
|
288
|
+
slotProps: _propTypes.default.object,
|
|
289
|
+
/**
|
|
290
|
+
* Overridable component slots.
|
|
291
|
+
* @default {}
|
|
292
|
+
*/
|
|
293
|
+
slots: _propTypes.default.object,
|
|
294
|
+
theme: _propTypes.default.oneOf(['dark', 'light']),
|
|
295
|
+
/**
|
|
296
|
+
* The tooltip item.
|
|
297
|
+
* Used when the tooltip is controlled.
|
|
298
|
+
*/
|
|
299
|
+
tooltipItem: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
300
|
+
dataIndex: _propTypes.default.number.isRequired,
|
|
301
|
+
seriesId: _propTypes.default.string.isRequired,
|
|
302
|
+
type: _propTypes.default.oneOf(['radialBar']).isRequired
|
|
303
|
+
}), _propTypes.default.shape({
|
|
304
|
+
dataIndex: _propTypes.default.number.isRequired,
|
|
305
|
+
seriesId: _propTypes.default.string.isRequired
|
|
306
|
+
})]),
|
|
307
|
+
/**
|
|
308
|
+
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
309
|
+
*/
|
|
310
|
+
width: _propTypes.default.number
|
|
311
|
+
} : void 0;
|