@mui/x-charts 9.5.0 → 9.6.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 +1 -1
- package/BarChart/BarChart.mjs +1 -1
- package/BarChart/BarElement.js +2 -1
- package/BarChart/BarElement.mjs +2 -1
- package/BarChart/BarLabel/BarLabel.js +1 -1
- package/BarChart/BarLabel/BarLabel.mjs +1 -1
- package/BarChart/BarPlot.js +1 -1
- package/BarChart/BarPlot.mjs +1 -1
- package/CHANGELOG.md +151 -0
- package/ChartsAxis/ChartsAxis.js +1 -1
- package/ChartsAxis/ChartsAxis.mjs +1 -1
- package/ChartsAxisHighlight/ChartsAxisHighlight.js +1 -1
- package/ChartsAxisHighlight/ChartsAxisHighlight.mjs +1 -1
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.js +2 -2
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.mjs +2 -2
- package/ChartsBrushOverlay/ChartsBrushOverlay.d.mts +5 -1
- package/ChartsBrushOverlay/ChartsBrushOverlay.d.ts +5 -1
- package/ChartsBrushOverlay/ChartsBrushOverlay.js +12 -1
- package/ChartsBrushOverlay/ChartsBrushOverlay.mjs +14 -2
- package/ChartsClipPath/ChartsClipPath.js +1 -1
- package/ChartsClipPath/ChartsClipPath.mjs +1 -1
- package/ChartsContainer/ChartsContainer.js +5 -3
- package/ChartsContainer/ChartsContainer.mjs +5 -3
- package/ChartsDataProvider/ChartsDataProvider.js +5 -1
- package/ChartsDataProvider/ChartsDataProvider.mjs +5 -1
- package/ChartsGrid/ChartsGrid.js +5 -1
- package/ChartsGrid/ChartsGrid.mjs +5 -1
- package/ChartsLayerContainer/ChartsLayerContainer.js +1 -1
- package/ChartsLayerContainer/ChartsLayerContainer.mjs +1 -1
- package/ChartsLocalizationProvider/ChartsLocalizationProvider.js +1 -1
- package/ChartsLocalizationProvider/ChartsLocalizationProvider.mjs +1 -1
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.js +2 -2
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.mjs +2 -2
- package/ChartsRadialDataProvider/ChartsRadialDataProvider.js +9 -1
- package/ChartsRadialDataProvider/ChartsRadialDataProvider.mjs +9 -1
- package/ChartsRadialGrid/ChartsRadialGrid.js +5 -1
- package/ChartsRadialGrid/ChartsRadialGrid.mjs +5 -1
- package/ChartsRadiusAxis/ChartsRadiusAxis.d.mts +8 -2
- package/ChartsRadiusAxis/ChartsRadiusAxis.d.ts +8 -2
- package/ChartsRadiusAxis/ChartsRadiusAxis.js +143 -3
- package/ChartsRadiusAxis/ChartsRadiusAxis.mjs +144 -5
- package/ChartsReferenceLine/ChartsReferenceLine.js +1 -1
- package/ChartsReferenceLine/ChartsReferenceLine.mjs +1 -1
- package/ChartsRotationAxis/ChartsRotationAxis.d.mts +8 -2
- package/ChartsRotationAxis/ChartsRotationAxis.d.ts +8 -2
- package/ChartsRotationAxis/ChartsRotationAxis.js +140 -3
- package/ChartsRotationAxis/ChartsRotationAxis.mjs +141 -5
- package/ChartsRotationAxis/index.d.mts +1 -1
- package/ChartsRotationAxis/index.d.ts +1 -1
- package/ChartsSurface/ChartsSurface.js +1 -1
- package/ChartsSurface/ChartsSurface.mjs +1 -1
- package/ChartsSvgLayer/ChartsSvgLayer.js +1 -1
- package/ChartsSvgLayer/ChartsSvgLayer.mjs +1 -1
- package/ChartsText/ChartsText.js +2 -2
- package/ChartsText/ChartsText.mjs +2 -2
- package/ChartsTooltip/ChartsAxisTooltipContent.js +22 -3
- package/ChartsTooltip/ChartsAxisTooltipContent.mjs +22 -3
- package/ChartsTooltip/ChartsItemTooltipContent.js +52 -1
- package/ChartsTooltip/ChartsItemTooltipContent.mjs +52 -1
- package/ChartsTooltip/ChartsTooltip.js +13 -33
- package/ChartsTooltip/ChartsTooltip.mjs +13 -33
- package/ChartsTooltip/ChartsTooltipContainer.js +6 -26
- package/ChartsTooltip/ChartsTooltipContainer.mjs +6 -26
- package/ChartsWrapper/ChartsWrapper.js +1 -1
- package/ChartsWrapper/ChartsWrapper.mjs +1 -1
- package/ChartsXAxis/ChartsSingleXAxisTicks.js +1 -1
- package/ChartsXAxis/ChartsSingleXAxisTicks.mjs +1 -1
- package/ChartsXAxis/ChartsXAxis.js +11 -2
- package/ChartsXAxis/ChartsXAxis.mjs +11 -2
- package/ChartsYAxis/ChartsSingleYAxisTicks.js +1 -1
- package/ChartsYAxis/ChartsSingleYAxisTicks.mjs +1 -1
- package/ChartsYAxis/ChartsYAxis.js +11 -2
- package/ChartsYAxis/ChartsYAxis.mjs +11 -2
- package/ChartsYAxis/ChartsYAxisImpl.js +1 -1
- package/ChartsYAxis/ChartsYAxisImpl.mjs +1 -1
- package/Gauge/Gauge.js +1 -1
- package/Gauge/Gauge.mjs +1 -1
- package/Gauge/GaugeContainer.js +1 -1
- package/Gauge/GaugeContainer.mjs +1 -1
- package/Gauge/GaugeValueArc.js +2 -2
- package/Gauge/GaugeValueArc.mjs +2 -2
- package/Gauge/GaugeValueText.js +1 -1
- package/Gauge/GaugeValueText.mjs +1 -1
- package/LineChart/AnimatedArea.js +3 -3
- package/LineChart/AnimatedArea.mjs +3 -3
- package/LineChart/AnimatedLine.js +1 -1
- package/LineChart/AnimatedLine.mjs +1 -1
- package/LineChart/AreaElement.js +1 -1
- package/LineChart/AreaElement.mjs +1 -1
- package/LineChart/AreaPlot.js +1 -1
- package/LineChart/AreaPlot.mjs +1 -1
- package/LineChart/LineChart.js +1 -1
- package/LineChart/LineChart.mjs +1 -1
- package/LineChart/LineElement.js +4 -2
- package/LineChart/LineElement.mjs +4 -2
- package/LineChart/LineHighlightElement.js +1 -2
- package/LineChart/LineHighlightElement.mjs +1 -2
- package/LineChart/LineHighlightPlot.js +1 -1
- package/LineChart/LineHighlightPlot.mjs +1 -1
- package/LineChart/LinePlot.js +1 -1
- package/LineChart/LinePlot.mjs +1 -1
- package/LineChart/MarkElement.js +3 -2
- package/LineChart/MarkElement.mjs +3 -2
- package/LineChart/MarkPlot.js +2 -1
- package/LineChart/MarkPlot.mjs +2 -1
- package/PieChart/FocusedPieArc.d.mts +5 -1
- package/PieChart/FocusedPieArc.d.ts +5 -1
- package/PieChart/FocusedPieArc.js +22 -1
- package/PieChart/FocusedPieArc.mjs +24 -2
- package/PieChart/PieArc.js +1 -1
- package/PieChart/PieArc.mjs +1 -1
- package/PieChart/PieArcLabel.js +1 -1
- package/PieChart/PieArcLabel.mjs +1 -1
- package/PieChart/PieArcLabelPlot.js +7 -6
- package/PieChart/PieArcLabelPlot.mjs +7 -6
- package/PieChart/PieArcPlot.js +7 -6
- package/PieChart/PieArcPlot.mjs +7 -6
- package/PieChart/PieChart.js +1 -1
- package/PieChart/PieChart.mjs +1 -1
- package/PieChart/PiePlot.js +2 -1
- package/PieChart/PiePlot.mjs +2 -1
- package/RadarChart/RadarAxis/RadarAxis.js +5 -1
- package/RadarChart/RadarAxis/RadarAxis.mjs +5 -1
- package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.js +6 -2
- package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.mjs +6 -2
- package/RadarChart/RadarChart.js +1 -1
- package/RadarChart/RadarChart.mjs +1 -1
- package/RadarChart/RadarGrid/RadarGrid.js +1 -5
- package/RadarChart/RadarGrid/RadarGrid.mjs +1 -5
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +5 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.mjs +5 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +5 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.mjs +5 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +5 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.mjs +5 -1
- package/ScatterChart/Scatter.js +1 -1
- package/ScatterChart/Scatter.mjs +1 -1
- package/ScatterChart/ScatterChart.js +5 -3
- package/ScatterChart/ScatterChart.mjs +5 -3
- package/ScatterChart/ScatterMarker.js +2 -2
- package/ScatterChart/ScatterMarker.mjs +2 -2
- package/ScatterChart/ScatterPlot.d.mts +8 -1
- package/ScatterChart/ScatterPlot.d.ts +8 -1
- package/ScatterChart/ScatterPlot.js +5 -2
- package/ScatterChart/ScatterPlot.mjs +5 -2
- package/ScatterChart/seriesConfig/getColor.js +6 -15
- package/ScatterChart/seriesConfig/getColor.mjs +6 -15
- package/SparkLineChart/SparkLineChart.js +1 -1
- package/SparkLineChart/SparkLineChart.mjs +1 -1
- package/Toolbar/Toolbar.js +1 -1
- package/Toolbar/Toolbar.mjs +1 -1
- package/Toolbar/ToolbarButton.js +1 -1
- package/Toolbar/ToolbarButton.mjs +1 -1
- package/index.d.mts +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/colorScale.d.mts +2 -2
- package/internals/colorScale.d.ts +2 -2
- package/internals/colorScale.js +2 -2
- package/internals/colorScale.mjs +2 -2
- package/internals/index.d.mts +2 -0
- package/internals/index.d.ts +2 -0
- package/internals/index.js +8 -0
- package/internals/index.mjs +2 -0
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +16 -30
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.mjs +17 -31
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.mts +8 -1
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +8 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.mts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.mts +7 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.ts +7 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.mts +0 -8
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +0 -8
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +1 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.mjs +2 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +6 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.mjs +6 -1
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.js +6 -2
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.mjs +6 -2
- package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.d.mts +49 -0
- package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.d.ts +49 -0
- package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.js +124 -0
- package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.mjs +117 -0
- package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.types.d.mts +64 -0
- package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.types.d.ts +64 -0
- package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.types.js +5 -0
- package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.types.mjs +1 -0
- package/internals/resolveColorProcessor.js +4 -7
- package/internals/resolveColorProcessor.mjs +4 -7
- package/models/axis.d.mts +20 -4
- package/models/axis.d.ts +20 -4
- package/models/colorMapping.d.mts +8 -0
- package/models/colorMapping.d.ts +8 -0
- package/package.json +7 -4
- package/hooks/useIsHydrated.d.mts +0 -4
- package/hooks/useIsHydrated.d.ts +0 -4
- package/hooks/useIsHydrated.js +0 -19
- package/hooks/useIsHydrated.mjs +0 -14
|
@@ -22,11 +22,8 @@ const getColor = (series, xAxis, yAxis, zAxis) => {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
const value = series.data[dataIndex];
|
|
25
|
-
const color = value
|
|
26
|
-
|
|
27
|
-
dataIndex
|
|
28
|
-
}) : zColorScale(value.colorValue ?? value.z);
|
|
29
|
-
if (color === null) {
|
|
25
|
+
const color = zColorScale(value.colorValue ?? value.z);
|
|
26
|
+
if (typeof color !== 'string') {
|
|
30
27
|
return getSeriesColor({
|
|
31
28
|
value,
|
|
32
29
|
dataIndex
|
|
@@ -41,11 +38,8 @@ const getColor = (series, xAxis, yAxis, zAxis) => {
|
|
|
41
38
|
return series.color;
|
|
42
39
|
}
|
|
43
40
|
const value = series.data[dataIndex];
|
|
44
|
-
const color = value
|
|
45
|
-
|
|
46
|
-
dataIndex
|
|
47
|
-
}) : yColorScale(value.y);
|
|
48
|
-
if (color === null) {
|
|
41
|
+
const color = yColorScale(value.y);
|
|
42
|
+
if (typeof color !== 'string') {
|
|
49
43
|
return getSeriesColor({
|
|
50
44
|
value,
|
|
51
45
|
dataIndex
|
|
@@ -60,11 +54,8 @@ const getColor = (series, xAxis, yAxis, zAxis) => {
|
|
|
60
54
|
return series.color;
|
|
61
55
|
}
|
|
62
56
|
const value = series.data[dataIndex];
|
|
63
|
-
const color = value
|
|
64
|
-
|
|
65
|
-
dataIndex
|
|
66
|
-
}) : xColorScale(value.x);
|
|
67
|
-
if (color === null) {
|
|
57
|
+
const color = xColorScale(value.x);
|
|
58
|
+
if (typeof color !== 'string') {
|
|
68
59
|
return getSeriesColor({
|
|
69
60
|
value,
|
|
70
61
|
dataIndex
|
|
@@ -16,11 +16,8 @@ const getColor = (series, xAxis, yAxis, zAxis) => {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
const value = series.data[dataIndex];
|
|
19
|
-
const color = value
|
|
20
|
-
|
|
21
|
-
dataIndex
|
|
22
|
-
}) : zColorScale(value.colorValue ?? value.z);
|
|
23
|
-
if (color === null) {
|
|
19
|
+
const color = zColorScale(value.colorValue ?? value.z);
|
|
20
|
+
if (typeof color !== 'string') {
|
|
24
21
|
return getSeriesColor({
|
|
25
22
|
value,
|
|
26
23
|
dataIndex
|
|
@@ -35,11 +32,8 @@ const getColor = (series, xAxis, yAxis, zAxis) => {
|
|
|
35
32
|
return series.color;
|
|
36
33
|
}
|
|
37
34
|
const value = series.data[dataIndex];
|
|
38
|
-
const color = value
|
|
39
|
-
|
|
40
|
-
dataIndex
|
|
41
|
-
}) : yColorScale(value.y);
|
|
42
|
-
if (color === null) {
|
|
35
|
+
const color = yColorScale(value.y);
|
|
36
|
+
if (typeof color !== 'string') {
|
|
43
37
|
return getSeriesColor({
|
|
44
38
|
value,
|
|
45
39
|
dataIndex
|
|
@@ -54,11 +48,8 @@ const getColor = (series, xAxis, yAxis, zAxis) => {
|
|
|
54
48
|
return series.color;
|
|
55
49
|
}
|
|
56
50
|
const value = series.data[dataIndex];
|
|
57
|
-
const color = value
|
|
58
|
-
|
|
59
|
-
dataIndex
|
|
60
|
-
}) : xColorScale(value.x);
|
|
61
|
-
if (color === null) {
|
|
51
|
+
const color = xColorScale(value.x);
|
|
52
|
+
if (typeof color !== 'string') {
|
|
62
53
|
return getSeriesColor({
|
|
63
54
|
value,
|
|
64
55
|
dataIndex
|
|
@@ -158,7 +158,7 @@ const SparkLineChart = exports.SparkLineChart = /*#__PURE__*/React.forwardRef(fu
|
|
|
158
158
|
});
|
|
159
159
|
});
|
|
160
160
|
if (process.env.NODE_ENV !== "production") SparkLineChart.displayName = "SparkLineChart";
|
|
161
|
-
process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
161
|
+
process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes /* remove-proptypes */ = {
|
|
162
162
|
// ----------------------------- Warning --------------------------------
|
|
163
163
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
164
164
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -151,7 +151,7 @@ const SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(pro
|
|
|
151
151
|
});
|
|
152
152
|
});
|
|
153
153
|
if (process.env.NODE_ENV !== "production") SparkLineChart.displayName = "SparkLineChart";
|
|
154
|
-
process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
154
|
+
process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes /* remove-proptypes */ = {
|
|
155
155
|
// ----------------------------- Warning --------------------------------
|
|
156
156
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
157
157
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
package/Toolbar/Toolbar.js
CHANGED
|
@@ -53,7 +53,7 @@ const Toolbar = exports.Toolbar = /*#__PURE__*/React.forwardRef(function Toolbar
|
|
|
53
53
|
});
|
|
54
54
|
});
|
|
55
55
|
if (process.env.NODE_ENV !== "production") Toolbar.displayName = "Toolbar";
|
|
56
|
-
process.env.NODE_ENV !== "production" ? Toolbar.propTypes = {
|
|
56
|
+
process.env.NODE_ENV !== "production" ? Toolbar.propTypes /* remove-proptypes */ = {
|
|
57
57
|
// ----------------------------- Warning --------------------------------
|
|
58
58
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
59
59
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
package/Toolbar/Toolbar.mjs
CHANGED
|
@@ -45,7 +45,7 @@ export const Toolbar = /*#__PURE__*/React.forwardRef(function Toolbar(_ref, ref)
|
|
|
45
45
|
});
|
|
46
46
|
});
|
|
47
47
|
if (process.env.NODE_ENV !== "production") Toolbar.displayName = "Toolbar";
|
|
48
|
-
process.env.NODE_ENV !== "production" ? Toolbar.propTypes = {
|
|
48
|
+
process.env.NODE_ENV !== "production" ? Toolbar.propTypes /* remove-proptypes */ = {
|
|
49
49
|
// ----------------------------- Warning --------------------------------
|
|
50
50
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
51
51
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
package/Toolbar/ToolbarButton.js
CHANGED
|
@@ -44,7 +44,7 @@ const ToolbarButton = exports.ToolbarButton = /*#__PURE__*/React.forwardRef(func
|
|
|
44
44
|
});
|
|
45
45
|
});
|
|
46
46
|
if (process.env.NODE_ENV !== "production") ToolbarButton.displayName = "ToolbarButton";
|
|
47
|
-
process.env.NODE_ENV !== "production" ? ToolbarButton.propTypes = {
|
|
47
|
+
process.env.NODE_ENV !== "production" ? ToolbarButton.propTypes /* remove-proptypes */ = {
|
|
48
48
|
// ----------------------------- Warning --------------------------------
|
|
49
49
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
50
50
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -37,7 +37,7 @@ const ToolbarButton = /*#__PURE__*/React.forwardRef(function ToolbarButton(props
|
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
39
|
if (process.env.NODE_ENV !== "production") ToolbarButton.displayName = "ToolbarButton";
|
|
40
|
-
process.env.NODE_ENV !== "production" ? ToolbarButton.propTypes = {
|
|
40
|
+
process.env.NODE_ENV !== "production" ? ToolbarButton.propTypes /* remove-proptypes */ = {
|
|
41
41
|
// ----------------------------- Warning --------------------------------
|
|
42
42
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
43
43
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
package/index.d.mts
CHANGED
|
@@ -32,7 +32,7 @@ export * from "./ChartsRadialDataProvider/index.mjs";
|
|
|
32
32
|
export * from "./ChartsRadialGrid/index.mjs";
|
|
33
33
|
export * from "./ChartsRadialAxisHighlight/index.mjs";
|
|
34
34
|
export * from "./ChartsRadiusAxis/index.mjs";
|
|
35
|
-
export { type ChartsRotationAxisProps, Unstable_ChartsRotationAxis } from "./ChartsRotationAxis/index.mjs";
|
|
35
|
+
export { type ChartsRotationAxisProps, type ChartsRotationAxisSlots, type ChartsRotationAxisSlotProps, Unstable_ChartsRotationAxis } from "./ChartsRotationAxis/index.mjs";
|
|
36
36
|
export * from "./Toolbar/index.mjs";
|
|
37
37
|
export * from "./ChartsWrapper/index.mjs";
|
|
38
38
|
export * from "./ChartsBrushOverlay/index.mjs";
|
package/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export * from "./ChartsRadialDataProvider/index.js";
|
|
|
32
32
|
export * from "./ChartsRadialGrid/index.js";
|
|
33
33
|
export * from "./ChartsRadialAxisHighlight/index.js";
|
|
34
34
|
export * from "./ChartsRadiusAxis/index.js";
|
|
35
|
-
export { type ChartsRotationAxisProps, Unstable_ChartsRotationAxis } from "./ChartsRotationAxis/index.js";
|
|
35
|
+
export { type ChartsRotationAxisProps, type ChartsRotationAxisSlots, type ChartsRotationAxisSlotProps, Unstable_ChartsRotationAxis } from "./ChartsRotationAxis/index.js";
|
|
36
36
|
export * from "./Toolbar/index.js";
|
|
37
37
|
export * from "./ChartsWrapper/index.js";
|
|
38
38
|
export * from "./ChartsBrushOverlay/index.js";
|
package/index.js
CHANGED
package/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ScaleOrdinal } from '@mui/x-charts-vendor/d3-scale';
|
|
2
2
|
import { type ContinuousColorConfig, type PiecewiseColorConfig, type OrdinalColorConfig } from "../models/colorMapping.mjs";
|
|
3
|
-
export declare function getSequentialColorScale<Value extends number | Date>(config: ContinuousColorConfig<Value> | PiecewiseColorConfig<Value>): import("@mui/x-charts-vendor/d3-scale").
|
|
3
|
+
export declare function getSequentialColorScale<Value extends number | Date>(config: ContinuousColorConfig<Value> | PiecewiseColorConfig<Value>): import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<Value, string, string | null>;
|
|
4
4
|
export declare function getOrdinalColorScale<Value extends number | Date | string>(config: OrdinalColorConfig<Value>): ScaleOrdinal<Value, string, null | string> | ScaleOrdinal<number, string, null | string>;
|
|
5
|
-
export declare function getColorScale(config: ContinuousColorConfig | PiecewiseColorConfig | OrdinalColorConfig): ScaleOrdinal<string | number | Date, string, string | null> | ScaleOrdinal<number, string, string | null> | import("@mui/x-charts-vendor/d3-scale").
|
|
5
|
+
export declare function getColorScale(config: ContinuousColorConfig | PiecewiseColorConfig | OrdinalColorConfig): ScaleOrdinal<string | number | Date, string, string | null> | ScaleOrdinal<number, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string, string | null>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ScaleOrdinal } from '@mui/x-charts-vendor/d3-scale';
|
|
2
2
|
import { type ContinuousColorConfig, type PiecewiseColorConfig, type OrdinalColorConfig } from "../models/colorMapping.js";
|
|
3
|
-
export declare function getSequentialColorScale<Value extends number | Date>(config: ContinuousColorConfig<Value> | PiecewiseColorConfig<Value>): import("@mui/x-charts-vendor/d3-scale").
|
|
3
|
+
export declare function getSequentialColorScale<Value extends number | Date>(config: ContinuousColorConfig<Value> | PiecewiseColorConfig<Value>): import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<Value, string, string | null>;
|
|
4
4
|
export declare function getOrdinalColorScale<Value extends number | Date | string>(config: OrdinalColorConfig<Value>): ScaleOrdinal<Value, string, null | string> | ScaleOrdinal<number, string, null | string>;
|
|
5
|
-
export declare function getColorScale(config: ContinuousColorConfig | PiecewiseColorConfig | OrdinalColorConfig): ScaleOrdinal<string | number | Date, string, string | null> | ScaleOrdinal<number, string, string | null> | import("@mui/x-charts-vendor/d3-scale").
|
|
5
|
+
export declare function getColorScale(config: ContinuousColorConfig | PiecewiseColorConfig | OrdinalColorConfig): ScaleOrdinal<string | number | Date, string, string | null> | ScaleOrdinal<number, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string, string | null>;
|
package/internals/colorScale.js
CHANGED
|
@@ -9,9 +9,9 @@ exports.getSequentialColorScale = getSequentialColorScale;
|
|
|
9
9
|
var _d3Scale = require("@mui/x-charts-vendor/d3-scale");
|
|
10
10
|
function getSequentialColorScale(config) {
|
|
11
11
|
if (config.type === 'piecewise') {
|
|
12
|
-
return (0, _d3Scale.scaleThreshold)(config.thresholds, config.colors);
|
|
12
|
+
return (0, _d3Scale.scaleThreshold)(config.thresholds, config.colors).unknown(config.unknownColor ?? null);
|
|
13
13
|
}
|
|
14
|
-
return (0, _d3Scale.scaleSequential)([config.min ?? 0, config.max ?? 100], config.color);
|
|
14
|
+
return (0, _d3Scale.scaleSequential)([config.min ?? 0, config.max ?? 100], config.color).unknown(config.unknownColor ?? null);
|
|
15
15
|
}
|
|
16
16
|
function getOrdinalColorScale(config) {
|
|
17
17
|
if (config.values) {
|
package/internals/colorScale.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { scaleOrdinal, scaleThreshold, scaleSequential } from '@mui/x-charts-vendor/d3-scale';
|
|
2
2
|
export function getSequentialColorScale(config) {
|
|
3
3
|
if (config.type === 'piecewise') {
|
|
4
|
-
return scaleThreshold(config.thresholds, config.colors);
|
|
4
|
+
return scaleThreshold(config.thresholds, config.colors).unknown(config.unknownColor ?? null);
|
|
5
5
|
}
|
|
6
|
-
return scaleSequential([config.min ?? 0, config.max ?? 100], config.color);
|
|
6
|
+
return scaleSequential([config.min ?? 0, config.max ?? 100], config.color).unknown(config.unknownColor ?? null);
|
|
7
7
|
}
|
|
8
8
|
export function getOrdinalColorScale(config) {
|
|
9
9
|
if (config.values) {
|
package/internals/index.d.mts
CHANGED
|
@@ -37,6 +37,8 @@ export * from "./plugins/featurePlugins/useChartVisibilityManager/index.mjs";
|
|
|
37
37
|
export * from "./plugins/featurePlugins/useChartKeyboardNavigation/index.mjs";
|
|
38
38
|
export * from "./plugins/featurePlugins/useChartClosestPoint/index.mjs";
|
|
39
39
|
export * from "./plugins/featurePlugins/useChartBrush/index.mjs";
|
|
40
|
+
export * as useGeoProjectionSelectors from "./plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.mjs";
|
|
41
|
+
export * as useGeoProjectionTypes from "./plugins/featurePlugins/useGeoProjection/useGeoProjection.types.mjs";
|
|
40
42
|
export * from "./plugins/featurePlugins/useChartItemClick/index.mjs";
|
|
41
43
|
export * from "./plugins/featurePlugins/useProgressiveRendering/index.mjs";
|
|
42
44
|
export * from "./plugins/utils/selectors.mjs";
|
package/internals/index.d.ts
CHANGED
|
@@ -37,6 +37,8 @@ export * from "./plugins/featurePlugins/useChartVisibilityManager/index.js";
|
|
|
37
37
|
export * from "./plugins/featurePlugins/useChartKeyboardNavigation/index.js";
|
|
38
38
|
export * from "./plugins/featurePlugins/useChartClosestPoint/index.js";
|
|
39
39
|
export * from "./plugins/featurePlugins/useChartBrush/index.js";
|
|
40
|
+
export * as useGeoProjectionSelectors from "./plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.js";
|
|
41
|
+
export * as useGeoProjectionTypes from "./plugins/featurePlugins/useGeoProjection/useGeoProjection.types.js";
|
|
40
42
|
export * from "./plugins/featurePlugins/useChartItemClick/index.js";
|
|
41
43
|
export * from "./plugins/featurePlugins/useProgressiveRendering/index.js";
|
|
42
44
|
export * from "./plugins/utils/selectors.js";
|
package/internals/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
@@ -19,6 +20,8 @@ var _exportNames = {
|
|
|
19
20
|
useRadarChartProps: true,
|
|
20
21
|
useSkipAnimation: true,
|
|
21
22
|
useRegisterPointerInteractions: true,
|
|
23
|
+
useGeoProjectionSelectors: true,
|
|
24
|
+
useGeoProjectionTypes: true,
|
|
22
25
|
getCartesianAxisTriggerTooltip: true,
|
|
23
26
|
getCartesianAxisIndex: true,
|
|
24
27
|
getRotationAxisIndex: true,
|
|
@@ -162,6 +165,7 @@ Object.defineProperty(exports, "useDrawingArea", {
|
|
|
162
165
|
return _useDrawingArea.useDrawingArea;
|
|
163
166
|
}
|
|
164
167
|
});
|
|
168
|
+
exports.useGeoProjectionTypes = exports.useGeoProjectionSelectors = void 0;
|
|
165
169
|
Object.defineProperty(exports, "useInteractionItemProps", {
|
|
166
170
|
enumerable: true,
|
|
167
171
|
get: function () {
|
|
@@ -529,6 +533,10 @@ Object.keys(_useChartBrush).forEach(function (key) {
|
|
|
529
533
|
}
|
|
530
534
|
});
|
|
531
535
|
});
|
|
536
|
+
var _useGeoProjectionSelectors = _interopRequireWildcard(require("./plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors"));
|
|
537
|
+
exports.useGeoProjectionSelectors = _useGeoProjectionSelectors;
|
|
538
|
+
var _useGeoProjectionTypes = _interopRequireWildcard(require("./plugins/featurePlugins/useGeoProjection/useGeoProjection.types"));
|
|
539
|
+
exports.useGeoProjectionTypes = _useGeoProjectionTypes;
|
|
532
540
|
var _useChartItemClick = require("./plugins/featurePlugins/useChartItemClick");
|
|
533
541
|
Object.keys(_useChartItemClick).forEach(function (key) {
|
|
534
542
|
if (key === "default" || key === "__esModule") return;
|
package/internals/index.mjs
CHANGED
|
@@ -41,6 +41,8 @@ export * from "./plugins/featurePlugins/useChartVisibilityManager/index.mjs";
|
|
|
41
41
|
export * from "./plugins/featurePlugins/useChartKeyboardNavigation/index.mjs";
|
|
42
42
|
export * from "./plugins/featurePlugins/useChartClosestPoint/index.mjs";
|
|
43
43
|
export * from "./plugins/featurePlugins/useChartBrush/index.mjs";
|
|
44
|
+
export * as useGeoProjectionSelectors from "./plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.mjs";
|
|
45
|
+
export * as useGeoProjectionTypes from "./plugins/featurePlugins/useGeoProjection/useGeoProjection.types.mjs";
|
|
44
46
|
export * from "./plugins/featurePlugins/useChartItemClick/index.mjs";
|
|
45
47
|
export * from "./plugins/featurePlugins/useProgressiveRendering/index.mjs";
|
|
46
48
|
export * from "./plugins/utils/selectors.mjs";
|
package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js
CHANGED
|
@@ -40,34 +40,6 @@ const useChartInteractionListener = ({
|
|
|
40
40
|
name: 'brush',
|
|
41
41
|
threshold: 0,
|
|
42
42
|
maxPointers: 1
|
|
43
|
-
}),
|
|
44
|
-
// Zoom gestures
|
|
45
|
-
new _core.PanGesture({
|
|
46
|
-
name: 'zoomPan',
|
|
47
|
-
threshold: 0,
|
|
48
|
-
preventIf: ['zoomTapAndDrag', 'zoomPressAndDrag']
|
|
49
|
-
}), new _core.PinchGesture({
|
|
50
|
-
name: 'zoomPinch',
|
|
51
|
-
threshold: 5
|
|
52
|
-
}), new _core.TurnWheelGesture({
|
|
53
|
-
name: 'zoomTurnWheel',
|
|
54
|
-
sensitivity: 0.01,
|
|
55
|
-
initialDelta: 1,
|
|
56
|
-
passive: false
|
|
57
|
-
}), new _core.TurnWheelGesture({
|
|
58
|
-
name: 'panTurnWheel',
|
|
59
|
-
sensitivity: 0.5,
|
|
60
|
-
passive: false
|
|
61
|
-
}), new _core.TapAndDragGesture({
|
|
62
|
-
name: 'zoomTapAndDrag',
|
|
63
|
-
dragThreshold: 10
|
|
64
|
-
}), new _core.PressAndDragGesture({
|
|
65
|
-
name: 'zoomPressAndDrag',
|
|
66
|
-
dragThreshold: 10,
|
|
67
|
-
preventIf: ['zoomPinch']
|
|
68
|
-
}), new _core.TapGesture({
|
|
69
|
-
name: 'zoomDoubleTapReset',
|
|
70
|
-
taps: 2
|
|
71
43
|
})]
|
|
72
44
|
});
|
|
73
45
|
}
|
|
@@ -77,7 +49,7 @@ const useChartInteractionListener = ({
|
|
|
77
49
|
if (!svg || !gestureManager) {
|
|
78
50
|
return undefined;
|
|
79
51
|
}
|
|
80
|
-
gestureManager.registerElement(['pan', 'move', '
|
|
52
|
+
gestureManager.registerElement(['pan', 'move', 'tap', 'quickPress', 'brush'], svg);
|
|
81
53
|
return () => {
|
|
82
54
|
// Cleanup gesture manager
|
|
83
55
|
gestureManager.unregisterAllGestures(svg);
|
|
@@ -113,10 +85,24 @@ const useChartInteractionListener = ({
|
|
|
113
85
|
svg?.removeEventListener('gestureend', preventDefault);
|
|
114
86
|
};
|
|
115
87
|
}, [chartsLayerContainerRef]);
|
|
88
|
+
const registerGestures = React.useCallback(gestures => {
|
|
89
|
+
const svg = chartsLayerContainerRef.current;
|
|
90
|
+
const gestureManager = gestureManagerRef.current;
|
|
91
|
+
if (!gestureManager || !svg) {
|
|
92
|
+
return () => {};
|
|
93
|
+
}
|
|
94
|
+
const gestureNames = gestures.map(gesture => gesture.name);
|
|
95
|
+
gestureManager.addGestures(gestures);
|
|
96
|
+
gestureManager.registerElement(gestureNames, svg);
|
|
97
|
+
return () => {
|
|
98
|
+
gestureManager.removeGestures(gestureNames);
|
|
99
|
+
};
|
|
100
|
+
}, [chartsLayerContainerRef, gestureManagerRef]);
|
|
116
101
|
return {
|
|
117
102
|
instance: {
|
|
118
103
|
addInteractionListener,
|
|
119
|
-
updateZoomInteractionListeners
|
|
104
|
+
updateZoomInteractionListeners,
|
|
105
|
+
registerGestures
|
|
120
106
|
}
|
|
121
107
|
};
|
|
122
108
|
};
|
package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { GestureManager, MoveGesture, PanGesture,
|
|
4
|
+
import { GestureManager, MoveGesture, PanGesture, PressGesture, TapGesture } from '@mui/x-internal-gestures/core';
|
|
5
5
|
const preventDefault = event => event.preventDefault();
|
|
6
6
|
export const useChartInteractionListener = ({
|
|
7
7
|
instance
|
|
@@ -34,34 +34,6 @@ export const useChartInteractionListener = ({
|
|
|
34
34
|
name: 'brush',
|
|
35
35
|
threshold: 0,
|
|
36
36
|
maxPointers: 1
|
|
37
|
-
}),
|
|
38
|
-
// Zoom gestures
|
|
39
|
-
new PanGesture({
|
|
40
|
-
name: 'zoomPan',
|
|
41
|
-
threshold: 0,
|
|
42
|
-
preventIf: ['zoomTapAndDrag', 'zoomPressAndDrag']
|
|
43
|
-
}), new PinchGesture({
|
|
44
|
-
name: 'zoomPinch',
|
|
45
|
-
threshold: 5
|
|
46
|
-
}), new TurnWheelGesture({
|
|
47
|
-
name: 'zoomTurnWheel',
|
|
48
|
-
sensitivity: 0.01,
|
|
49
|
-
initialDelta: 1,
|
|
50
|
-
passive: false
|
|
51
|
-
}), new TurnWheelGesture({
|
|
52
|
-
name: 'panTurnWheel',
|
|
53
|
-
sensitivity: 0.5,
|
|
54
|
-
passive: false
|
|
55
|
-
}), new TapAndDragGesture({
|
|
56
|
-
name: 'zoomTapAndDrag',
|
|
57
|
-
dragThreshold: 10
|
|
58
|
-
}), new PressAndDragGesture({
|
|
59
|
-
name: 'zoomPressAndDrag',
|
|
60
|
-
dragThreshold: 10,
|
|
61
|
-
preventIf: ['zoomPinch']
|
|
62
|
-
}), new TapGesture({
|
|
63
|
-
name: 'zoomDoubleTapReset',
|
|
64
|
-
taps: 2
|
|
65
37
|
})]
|
|
66
38
|
});
|
|
67
39
|
}
|
|
@@ -71,7 +43,7 @@ export const useChartInteractionListener = ({
|
|
|
71
43
|
if (!svg || !gestureManager) {
|
|
72
44
|
return undefined;
|
|
73
45
|
}
|
|
74
|
-
gestureManager.registerElement(['pan', 'move', '
|
|
46
|
+
gestureManager.registerElement(['pan', 'move', 'tap', 'quickPress', 'brush'], svg);
|
|
75
47
|
return () => {
|
|
76
48
|
// Cleanup gesture manager
|
|
77
49
|
gestureManager.unregisterAllGestures(svg);
|
|
@@ -107,10 +79,24 @@ export const useChartInteractionListener = ({
|
|
|
107
79
|
svg?.removeEventListener('gestureend', preventDefault);
|
|
108
80
|
};
|
|
109
81
|
}, [chartsLayerContainerRef]);
|
|
82
|
+
const registerGestures = React.useCallback(gestures => {
|
|
83
|
+
const svg = chartsLayerContainerRef.current;
|
|
84
|
+
const gestureManager = gestureManagerRef.current;
|
|
85
|
+
if (!gestureManager || !svg) {
|
|
86
|
+
return () => {};
|
|
87
|
+
}
|
|
88
|
+
const gestureNames = gestures.map(gesture => gesture.name);
|
|
89
|
+
gestureManager.addGestures(gestures);
|
|
90
|
+
gestureManager.registerElement(gestureNames, svg);
|
|
91
|
+
return () => {
|
|
92
|
+
gestureManager.removeGestures(gestureNames);
|
|
93
|
+
};
|
|
94
|
+
}, [chartsLayerContainerRef, gestureManagerRef]);
|
|
110
95
|
return {
|
|
111
96
|
instance: {
|
|
112
97
|
addInteractionListener,
|
|
113
|
-
updateZoomInteractionListeners
|
|
98
|
+
updateZoomInteractionListeners,
|
|
99
|
+
registerGestures
|
|
114
100
|
}
|
|
115
101
|
};
|
|
116
102
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type MoveEvent, type PanEvent, type PanGestureOptions, type PinchEvent, type PinchGestureOptions, type PressEvent, type TapEvent, type TurnWheelEvent, type PressAndDragEvent, type PressAndDragGestureOptions, type TapAndDragEvent, type TapAndDragGestureOptions, type TapGestureOptions, type TurnWheelGestureOptions } from '@mui/x-internal-gestures/core';
|
|
1
|
+
import { type Gesture, type MoveEvent, type PanEvent, type PanGestureOptions, type PinchEvent, type PinchGestureOptions, type PressEvent, type TapEvent, type TurnWheelEvent, type PressAndDragEvent, type PressAndDragGestureOptions, type TapAndDragEvent, type TapAndDragGestureOptions, type TapGestureOptions, type TurnWheelGestureOptions } from '@mui/x-internal-gestures/core';
|
|
2
2
|
import { type ChartPluginSignature } from "../../models/index.mjs";
|
|
3
3
|
export type ChartInteraction = 'pan' | 'panStart' | 'panEnd' | 'zoomPan' | 'zoomPanStart' | 'zoomPanEnd' | 'zoomPinch' | 'zoomPinchStart' | 'zoomPinchEnd' | 'zoomTurnWheel' | 'panTurnWheel' | 'zoomTapAndDrag' | 'zoomTapAndDragStart' | 'zoomTapAndDragEnd' | 'zoomPressAndDrag' | 'zoomPressAndDragStart' | 'zoomPressAndDragEnd' | 'move' | 'moveStart' | 'moveEnd' | 'tap' | 'quickPress' | 'quickPressEnd' | 'zoomDoubleTapReset' | 'brush' | 'brushStart' | 'brushCancel' | 'brushEnd';
|
|
4
4
|
export type InteractionListenerResult = {
|
|
@@ -27,6 +27,7 @@ export type UpdateZoomInteractionListeners = {
|
|
|
27
27
|
};
|
|
28
28
|
export interface UseChartInteractionListenerParameters {}
|
|
29
29
|
export interface UseChartInteractionListenerState {}
|
|
30
|
+
export type RegisterGestures = (gestures: Gesture<string>[]) => () => void;
|
|
30
31
|
export interface UseChartInteractionListenerInstance {
|
|
31
32
|
/**
|
|
32
33
|
* Adds an interaction listener to the SVG element.
|
|
@@ -42,6 +43,12 @@ export interface UseChartInteractionListenerInstance {
|
|
|
42
43
|
* @param options The options to apply to the interaction.
|
|
43
44
|
*/
|
|
44
45
|
updateZoomInteractionListeners: UpdateZoomInteractionListeners;
|
|
46
|
+
/**
|
|
47
|
+
* Registers additional gestures on the chart interaction element.
|
|
48
|
+
*
|
|
49
|
+
* @param gestures The gestures to register.
|
|
50
|
+
*/
|
|
51
|
+
registerGestures: RegisterGestures;
|
|
45
52
|
}
|
|
46
53
|
export type UseChartInteractionListenerSignature = ChartPluginSignature<{
|
|
47
54
|
params: UseChartInteractionListenerParameters;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type MoveEvent, type PanEvent, type PanGestureOptions, type PinchEvent, type PinchGestureOptions, type PressEvent, type TapEvent, type TurnWheelEvent, type PressAndDragEvent, type PressAndDragGestureOptions, type TapAndDragEvent, type TapAndDragGestureOptions, type TapGestureOptions, type TurnWheelGestureOptions } from '@mui/x-internal-gestures/core';
|
|
1
|
+
import { type Gesture, type MoveEvent, type PanEvent, type PanGestureOptions, type PinchEvent, type PinchGestureOptions, type PressEvent, type TapEvent, type TurnWheelEvent, type PressAndDragEvent, type PressAndDragGestureOptions, type TapAndDragEvent, type TapAndDragGestureOptions, type TapGestureOptions, type TurnWheelGestureOptions } from '@mui/x-internal-gestures/core';
|
|
2
2
|
import { type ChartPluginSignature } from "../../models/index.js";
|
|
3
3
|
export type ChartInteraction = 'pan' | 'panStart' | 'panEnd' | 'zoomPan' | 'zoomPanStart' | 'zoomPanEnd' | 'zoomPinch' | 'zoomPinchStart' | 'zoomPinchEnd' | 'zoomTurnWheel' | 'panTurnWheel' | 'zoomTapAndDrag' | 'zoomTapAndDragStart' | 'zoomTapAndDragEnd' | 'zoomPressAndDrag' | 'zoomPressAndDragStart' | 'zoomPressAndDragEnd' | 'move' | 'moveStart' | 'moveEnd' | 'tap' | 'quickPress' | 'quickPressEnd' | 'zoomDoubleTapReset' | 'brush' | 'brushStart' | 'brushCancel' | 'brushEnd';
|
|
4
4
|
export type InteractionListenerResult = {
|
|
@@ -27,6 +27,7 @@ export type UpdateZoomInteractionListeners = {
|
|
|
27
27
|
};
|
|
28
28
|
export interface UseChartInteractionListenerParameters {}
|
|
29
29
|
export interface UseChartInteractionListenerState {}
|
|
30
|
+
export type RegisterGestures = (gestures: Gesture<string>[]) => () => void;
|
|
30
31
|
export interface UseChartInteractionListenerInstance {
|
|
31
32
|
/**
|
|
32
33
|
* Adds an interaction listener to the SVG element.
|
|
@@ -42,6 +43,12 @@ export interface UseChartInteractionListenerInstance {
|
|
|
42
43
|
* @param options The options to apply to the interaction.
|
|
43
44
|
*/
|
|
44
45
|
updateZoomInteractionListeners: UpdateZoomInteractionListeners;
|
|
46
|
+
/**
|
|
47
|
+
* Registers additional gestures on the chart interaction element.
|
|
48
|
+
*
|
|
49
|
+
* @param gestures The gestures to register.
|
|
50
|
+
*/
|
|
51
|
+
registerGestures: RegisterGestures;
|
|
45
52
|
}
|
|
46
53
|
export type UseChartInteractionListenerSignature = ChartPluginSignature<{
|
|
47
54
|
params: UseChartInteractionListenerParameters;
|
|
@@ -6,7 +6,7 @@ import type { ChartSeriesType } from "../../../../../models/seriesType/config.mj
|
|
|
6
6
|
* Map data index to a color.
|
|
7
7
|
* If dataIndex is not defined, it falls back to the series color when defined.
|
|
8
8
|
*/
|
|
9
|
-
export type ColorGetter<SeriesType extends ChartSeriesType> = SeriesType extends 'pie' | 'funnel' ? (dataIndex: number) => string : SeriesType extends 'heatmap' ? (value: number | null) => string : (dataIndex?: number) => string;
|
|
9
|
+
export type ColorGetter<SeriesType extends ChartSeriesType> = SeriesType extends 'pie' | 'funnel' ? (dataIndex: number) => string : SeriesType extends 'heatmap' ? (value: number | null) => string : SeriesType extends 'mapShape' ? (dataIndex?: number) => string | null : (dataIndex?: number) => string;
|
|
10
10
|
export type ColorProcessor<SeriesType extends ChartSeriesType> = (series: DefaultizedSeriesType<SeriesType>,
|
|
11
11
|
/**
|
|
12
12
|
* Either the x-axis or rotation-axis, depending on the coordinate system.
|
|
@@ -6,7 +6,7 @@ import type { ChartSeriesType } from "../../../../../models/seriesType/config.js
|
|
|
6
6
|
* Map data index to a color.
|
|
7
7
|
* If dataIndex is not defined, it falls back to the series color when defined.
|
|
8
8
|
*/
|
|
9
|
-
export type ColorGetter<SeriesType extends ChartSeriesType> = SeriesType extends 'pie' | 'funnel' ? (dataIndex: number) => string : SeriesType extends 'heatmap' ? (value: number | null) => string : (dataIndex?: number) => string;
|
|
9
|
+
export type ColorGetter<SeriesType extends ChartSeriesType> = SeriesType extends 'pie' | 'funnel' ? (dataIndex: number) => string : SeriesType extends 'heatmap' ? (value: number | null) => string : SeriesType extends 'mapShape' ? (dataIndex?: number) => string | null : (dataIndex?: number) => string;
|
|
10
10
|
export type ColorProcessor<SeriesType extends ChartSeriesType> = (series: DefaultizedSeriesType<SeriesType>,
|
|
11
11
|
/**
|
|
12
12
|
* Either the x-axis or rotation-axis, depending on the coordinate system.
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
+
import type { ExtendedFeatureCollection, GeoProjection } from '@mui/x-charts-vendor/d3-geo';
|
|
1
2
|
import type { SeriesItemIdentifierWithType } from "../../../../../models/seriesType/index.mjs";
|
|
2
3
|
import type { ChartSeriesType } from "../../../../../models/seriesType/config.mjs";
|
|
3
4
|
import { type ChartsRotationAxisProps, type ChartsRadiusAxisProps, type ComputedXAxis, type ComputedYAxis } from "../../../../../models/axis.mjs";
|
|
4
5
|
import { type ChartDrawingArea } from "../../../../../hooks/useDrawingArea.mjs";
|
|
5
6
|
import { type ProcessedSeries, type SeriesLayout } from "../../useChartSeries/index.mjs";
|
|
6
7
|
import { type ComputeResult } from "../../../featurePlugins/useChartPolarAxis/computeAxisValue.mjs";
|
|
8
|
+
export type GeoTooltipPosition = {
|
|
9
|
+
geoData: ExtendedFeatureCollection | null;
|
|
10
|
+
projection: GeoProjection | null;
|
|
11
|
+
featureIndexesByName: ReadonlyMap<string, number[]>;
|
|
12
|
+
};
|
|
7
13
|
export interface TooltipPositionGetterAxesConfig {
|
|
8
14
|
x?: ComputedXAxis;
|
|
9
15
|
y?: ComputedYAxis;
|
|
10
16
|
rotationAxes?: ComputeResult<ChartsRotationAxisProps>;
|
|
11
17
|
radiusAxes?: ComputeResult<ChartsRadiusAxisProps>;
|
|
18
|
+
geo?: GeoTooltipPosition;
|
|
12
19
|
}
|
|
13
20
|
export type TooltipItemPositionGetter<SeriesType extends ChartSeriesType> = (params: {
|
|
14
21
|
series: ProcessedSeries<SeriesType>;
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
+
import type { ExtendedFeatureCollection, GeoProjection } from '@mui/x-charts-vendor/d3-geo';
|
|
1
2
|
import type { SeriesItemIdentifierWithType } from "../../../../../models/seriesType/index.js";
|
|
2
3
|
import type { ChartSeriesType } from "../../../../../models/seriesType/config.js";
|
|
3
4
|
import { type ChartsRotationAxisProps, type ChartsRadiusAxisProps, type ComputedXAxis, type ComputedYAxis } from "../../../../../models/axis.js";
|
|
4
5
|
import { type ChartDrawingArea } from "../../../../../hooks/useDrawingArea.js";
|
|
5
6
|
import { type ProcessedSeries, type SeriesLayout } from "../../useChartSeries/index.js";
|
|
6
7
|
import { type ComputeResult } from "../../../featurePlugins/useChartPolarAxis/computeAxisValue.js";
|
|
8
|
+
export type GeoTooltipPosition = {
|
|
9
|
+
geoData: ExtendedFeatureCollection | null;
|
|
10
|
+
projection: GeoProjection | null;
|
|
11
|
+
featureIndexesByName: ReadonlyMap<string, number[]>;
|
|
12
|
+
};
|
|
7
13
|
export interface TooltipPositionGetterAxesConfig {
|
|
8
14
|
x?: ComputedXAxis;
|
|
9
15
|
y?: ComputedYAxis;
|
|
10
16
|
rotationAxes?: ComputeResult<ChartsRotationAxisProps>;
|
|
11
17
|
radiusAxes?: ComputeResult<ChartsRadiusAxisProps>;
|
|
18
|
+
geo?: GeoTooltipPosition;
|
|
12
19
|
}
|
|
13
20
|
export type TooltipItemPositionGetter<SeriesType extends ChartSeriesType> = (params: {
|
|
14
21
|
series: ProcessedSeries<SeriesType>;
|
|
@@ -2,14 +2,6 @@ import { type NumberValue } from '@mui/x-charts-vendor/d3-scale';
|
|
|
2
2
|
import { type AxisId, type ContinuousScaleName, type DefaultedAxis, type DefaultedXAxis, type DefaultedYAxis } from "../../../../models/axis.mjs";
|
|
3
3
|
import { type ProcessedSeries } from "../../corePlugins/useChartSeries/index.mjs";
|
|
4
4
|
import { type TickParams } from "../../../../hooks/useTicks.mjs";
|
|
5
|
-
/**
|
|
6
|
-
* Calculates the initial domain and tick number for a given axis.
|
|
7
|
-
* The domain should still run through the zoom filterMode after this step.
|
|
8
|
-
*/
|
|
9
|
-
export declare function calculateInitialDomainAndTickNumber(axis: DefaultedAxis<ContinuousScaleName>, axisDirection: 'x' | 'y', axisIndex: number, formattedSeries: ProcessedSeries, [minData, maxData]: [number | Date, number | Date], defaultTickNumber: number): {
|
|
10
|
-
domain: [NumberValue, NumberValue];
|
|
11
|
-
tickNumber: number;
|
|
12
|
-
};
|
|
13
5
|
/**
|
|
14
6
|
* Calculates the final domain for an axis.
|
|
15
7
|
* After this step, the domain can be used to create the axis scale.
|
|
@@ -2,14 +2,6 @@ import { type NumberValue } from '@mui/x-charts-vendor/d3-scale';
|
|
|
2
2
|
import { type AxisId, type ContinuousScaleName, type DefaultedAxis, type DefaultedXAxis, type DefaultedYAxis } from "../../../../models/axis.js";
|
|
3
3
|
import { type ProcessedSeries } from "../../corePlugins/useChartSeries/index.js";
|
|
4
4
|
import { type TickParams } from "../../../../hooks/useTicks.js";
|
|
5
|
-
/**
|
|
6
|
-
* Calculates the initial domain and tick number for a given axis.
|
|
7
|
-
* The domain should still run through the zoom filterMode after this step.
|
|
8
|
-
*/
|
|
9
|
-
export declare function calculateInitialDomainAndTickNumber(axis: DefaultedAxis<ContinuousScaleName>, axisDirection: 'x' | 'y', axisIndex: number, formattedSeries: ProcessedSeries, [minData, maxData]: [number | Date, number | Date], defaultTickNumber: number): {
|
|
10
|
-
domain: [NumberValue, NumberValue];
|
|
11
|
-
tickNumber: number;
|
|
12
|
-
};
|
|
13
5
|
/**
|
|
14
6
|
* Calculates the final domain for an axis.
|
|
15
7
|
* After this step, the domain can be used to create the axis scale.
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.calculateFinalDomain = calculateFinalDomain;
|
|
7
|
-
exports.calculateInitialDomainAndTickNumber = calculateInitialDomainAndTickNumber;
|
|
8
7
|
exports.computeAxisDomainsMap = computeAxisDomainsMap;
|
|
9
8
|
var _axis = require("../../../../models/axis");
|
|
10
9
|
var _getScale = require("../../../getScale");
|
|
@@ -73,7 +72,7 @@ function getActualAxisExtrema(axisExtrema, minData, maxData) {
|
|
|
73
72
|
if ('max' in axisExtrema && axisExtrema.max != null && axisExtrema.max < minData) {
|
|
74
73
|
min = axisExtrema.max;
|
|
75
74
|
}
|
|
76
|
-
if ('min' in axisExtrema && axisExtrema.min != null && axisExtrema.min >
|
|
75
|
+
if ('min' in axisExtrema && axisExtrema.min != null && axisExtrema.min > maxData) {
|
|
77
76
|
max = axisExtrema.min;
|
|
78
77
|
}
|
|
79
78
|
if (!('min' in axisExtrema) && !('max' in axisExtrema)) {
|