@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
|
@@ -50,7 +50,7 @@ function ChartsRadialDataProvider(props) {
|
|
|
50
50
|
})
|
|
51
51
|
}));
|
|
52
52
|
}
|
|
53
|
-
process.env.NODE_ENV !== "production" ? ChartsRadialDataProvider.propTypes = {
|
|
53
|
+
process.env.NODE_ENV !== "production" ? ChartsRadialDataProvider.propTypes /* remove-proptypes */ = {
|
|
54
54
|
// ----------------------------- Warning --------------------------------
|
|
55
55
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
56
56
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -63,6 +63,14 @@ process.env.NODE_ENV !== "production" ? ChartsRadialDataProvider.propTypes = {
|
|
|
63
63
|
* @default rainbowSurgePalette
|
|
64
64
|
*/
|
|
65
65
|
colors: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string), _propTypes.default.func]),
|
|
66
|
+
/**
|
|
67
|
+
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
68
|
+
*/
|
|
69
|
+
dataset: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
70
|
+
/**
|
|
71
|
+
* Options to enable features planned for the next major.
|
|
72
|
+
*/
|
|
73
|
+
experimentalFeatures: _propTypes.default.any,
|
|
66
74
|
/**
|
|
67
75
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
68
76
|
*/
|
|
@@ -43,7 +43,7 @@ function ChartsRadialDataProvider(props) {
|
|
|
43
43
|
})
|
|
44
44
|
}));
|
|
45
45
|
}
|
|
46
|
-
process.env.NODE_ENV !== "production" ? ChartsRadialDataProvider.propTypes = {
|
|
46
|
+
process.env.NODE_ENV !== "production" ? ChartsRadialDataProvider.propTypes /* remove-proptypes */ = {
|
|
47
47
|
// ----------------------------- Warning --------------------------------
|
|
48
48
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
49
49
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -56,6 +56,14 @@ process.env.NODE_ENV !== "production" ? ChartsRadialDataProvider.propTypes = {
|
|
|
56
56
|
* @default rainbowSurgePalette
|
|
57
57
|
*/
|
|
58
58
|
colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
59
|
+
/**
|
|
60
|
+
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
61
|
+
*/
|
|
62
|
+
dataset: PropTypes.arrayOf(PropTypes.object),
|
|
63
|
+
/**
|
|
64
|
+
* Options to enable features planned for the next major.
|
|
65
|
+
*/
|
|
66
|
+
experimentalFeatures: PropTypes.any,
|
|
59
67
|
/**
|
|
60
68
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
61
69
|
*/
|
|
@@ -81,7 +81,7 @@ function ChartsRadialGrid(inProps) {
|
|
|
81
81
|
})]
|
|
82
82
|
}));
|
|
83
83
|
}
|
|
84
|
-
process.env.NODE_ENV !== "production" ? ChartsRadialGrid.propTypes = {
|
|
84
|
+
process.env.NODE_ENV !== "production" ? ChartsRadialGrid.propTypes /* remove-proptypes */ = {
|
|
85
85
|
// ----------------------------- Warning --------------------------------
|
|
86
86
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
87
87
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -90,6 +90,10 @@ process.env.NODE_ENV !== "production" ? ChartsRadialGrid.propTypes = {
|
|
|
90
90
|
* Override or extend the styles applied to the component.
|
|
91
91
|
*/
|
|
92
92
|
classes: _propTypes.default.object,
|
|
93
|
+
/**
|
|
94
|
+
* A CSS class name applied to the root element.
|
|
95
|
+
*/
|
|
96
|
+
className: _propTypes.default.string,
|
|
93
97
|
/**
|
|
94
98
|
* Displays radius (concentric) grid.
|
|
95
99
|
*/
|
|
@@ -75,7 +75,7 @@ function ChartsRadialGrid(inProps) {
|
|
|
75
75
|
})]
|
|
76
76
|
}));
|
|
77
77
|
}
|
|
78
|
-
process.env.NODE_ENV !== "production" ? ChartsRadialGrid.propTypes = {
|
|
78
|
+
process.env.NODE_ENV !== "production" ? ChartsRadialGrid.propTypes /* remove-proptypes */ = {
|
|
79
79
|
// ----------------------------- Warning --------------------------------
|
|
80
80
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
81
81
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -84,6 +84,10 @@ process.env.NODE_ENV !== "production" ? ChartsRadialGrid.propTypes = {
|
|
|
84
84
|
* Override or extend the styles applied to the component.
|
|
85
85
|
*/
|
|
86
86
|
classes: PropTypes.object,
|
|
87
|
+
/**
|
|
88
|
+
* A CSS class name applied to the root element.
|
|
89
|
+
*/
|
|
90
|
+
className: PropTypes.string,
|
|
87
91
|
/**
|
|
88
92
|
* Displays radius (concentric) grid.
|
|
89
93
|
*/
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import type { ChartsRadiusAxisProps } from "../models/axis.mjs";
|
|
2
|
-
export
|
|
1
|
+
import type { ChartsRadiusAxisProps, ChartsAxisSlots, ChartsAxisSlotProps } from "../models/axis.mjs";
|
|
2
|
+
export interface ChartsRadiusAxisSlots extends ChartsAxisSlots {}
|
|
3
|
+
export interface ChartsRadiusAxisSlotProps extends ChartsAxisSlotProps {}
|
|
4
|
+
declare function ChartsRadiusAxis(props: ChartsRadiusAxisProps): import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
declare namespace ChartsRadiusAxis {
|
|
6
|
+
var propTypes: any;
|
|
7
|
+
}
|
|
8
|
+
export { ChartsRadiusAxis };
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import type { ChartsRadiusAxisProps } from "../models/axis.js";
|
|
2
|
-
export
|
|
1
|
+
import type { ChartsRadiusAxisProps, ChartsAxisSlots, ChartsAxisSlotProps } from "../models/axis.js";
|
|
2
|
+
export interface ChartsRadiusAxisSlots extends ChartsAxisSlots {}
|
|
3
|
+
export interface ChartsRadiusAxisSlotProps extends ChartsAxisSlotProps {}
|
|
4
|
+
declare function ChartsRadiusAxis(props: ChartsRadiusAxisProps): import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
declare namespace ChartsRadiusAxis {
|
|
6
|
+
var propTypes: any;
|
|
7
|
+
}
|
|
8
|
+
export { ChartsRadiusAxis };
|
|
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.ChartsRadiusAxis = ChartsRadiusAxis;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
11
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
12
|
var _styles = require("@mui/material/styles");
|
|
12
13
|
var _useTicks = require("../hooks/useTicks");
|
|
13
14
|
var _useAxis = require("../hooks/useAxis");
|
|
@@ -17,7 +18,8 @@ var _chartsRadiusAxisClasses = require("./chartsRadiusAxisClasses");
|
|
|
17
18
|
var _createGetLabelTextAnchors = require("./createGetLabelTextAnchors");
|
|
18
19
|
var _getLabelTransform = require("./getLabelTransform");
|
|
19
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
/* Gap between a tick and its label. */
|
|
21
|
+
/* Gap between a tick and its label. */
|
|
22
|
+
const TICK_LABEL_GAP = 3;
|
|
21
23
|
const getLabelTextAnchors = (0, _createGetLabelTextAnchors.createGetLabelTextAnchors)(_getLabelTransform.getLabelTransform);
|
|
22
24
|
|
|
23
25
|
/**
|
|
@@ -45,6 +47,7 @@ function ChartsRadiusAxis(props) {
|
|
|
45
47
|
position = 'start',
|
|
46
48
|
disableLine,
|
|
47
49
|
disableTicks,
|
|
50
|
+
disableTickLabel,
|
|
48
51
|
tickLabelPosition: tickLabelPositionProp = 'auto',
|
|
49
52
|
tickPosition = position === 'start' ? 'before' : 'after',
|
|
50
53
|
tickSize = 6,
|
|
@@ -135,7 +138,7 @@ function ChartsRadiusAxis(props) {
|
|
|
135
138
|
y2: tickY + tickDy,
|
|
136
139
|
stroke: stroke,
|
|
137
140
|
className: classes.tick
|
|
138
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("text", (0, _extends2.default)({
|
|
141
|
+
}), !disableTickLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)("text", (0, _extends2.default)({
|
|
139
142
|
x: labelX,
|
|
140
143
|
y: labelY,
|
|
141
144
|
fill: stroke,
|
|
@@ -148,4 +151,141 @@ function ChartsRadiusAxis(props) {
|
|
|
148
151
|
}, index);
|
|
149
152
|
})]
|
|
150
153
|
});
|
|
151
|
-
}
|
|
154
|
+
}
|
|
155
|
+
process.env.NODE_ENV !== "production" ? ChartsRadiusAxis.propTypes /* remove-proptypes */ = {
|
|
156
|
+
// ----------------------------- Warning --------------------------------
|
|
157
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
158
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
159
|
+
// ----------------------------------------------------------------------
|
|
160
|
+
axis: _propTypes.default.oneOf(['radius']),
|
|
161
|
+
/**
|
|
162
|
+
* The id of the axis to render.
|
|
163
|
+
* If undefined, it will be the first defined axis.
|
|
164
|
+
*/
|
|
165
|
+
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
166
|
+
/**
|
|
167
|
+
* Override or extend the styles applied to the component.
|
|
168
|
+
*/
|
|
169
|
+
classes: _propTypes.default.object,
|
|
170
|
+
/**
|
|
171
|
+
* A CSS class name applied to the root element.
|
|
172
|
+
*/
|
|
173
|
+
className: _propTypes.default.string,
|
|
174
|
+
/**
|
|
175
|
+
* If true, the axis line is disabled.
|
|
176
|
+
* @default false
|
|
177
|
+
*/
|
|
178
|
+
disableLine: _propTypes.default.bool,
|
|
179
|
+
/**
|
|
180
|
+
* If true, the tick labels are not rendered.
|
|
181
|
+
* @default false
|
|
182
|
+
*/
|
|
183
|
+
disableTickLabel: _propTypes.default.bool,
|
|
184
|
+
/**
|
|
185
|
+
* If true, the ticks are disabled.
|
|
186
|
+
* @default false
|
|
187
|
+
*/
|
|
188
|
+
disableTicks: _propTypes.default.bool,
|
|
189
|
+
/**
|
|
190
|
+
* The label of the axis.
|
|
191
|
+
*/
|
|
192
|
+
label: _propTypes.default.string,
|
|
193
|
+
/**
|
|
194
|
+
* The style applied to the axis label.
|
|
195
|
+
*/
|
|
196
|
+
labelStyle: _propTypes.default.object,
|
|
197
|
+
/**
|
|
198
|
+
* The maximal radius.
|
|
199
|
+
* Can be a number (in pixels), a pixel string (for example `'80px'`), or a percentage string
|
|
200
|
+
* (for example `'80%'`) relative to the available radius (half the smallest side of the drawing area).
|
|
201
|
+
* @default '100%'
|
|
202
|
+
*/
|
|
203
|
+
maxRadius: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
204
|
+
/**
|
|
205
|
+
* The minimal radius.
|
|
206
|
+
* Can be a number (in pixels), a pixel string (for example `'20px'`), or a percentage string
|
|
207
|
+
* (for example `'20%'`) relative to the available radius (half the smallest side of the drawing area).
|
|
208
|
+
* @default 0
|
|
209
|
+
*/
|
|
210
|
+
minRadius: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
211
|
+
/**
|
|
212
|
+
* The position of the axis in polar coordinates.
|
|
213
|
+
* It can be 'start', 'end', or a specific angle in degrees.
|
|
214
|
+
* @default 'start'
|
|
215
|
+
*/
|
|
216
|
+
position: _propTypes.default.oneOfType([_propTypes.default.oneOf(['end', 'none', 'start']), _propTypes.default.number]),
|
|
217
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
218
|
+
/**
|
|
219
|
+
* Defines which ticks are displayed.
|
|
220
|
+
* Its value can be:
|
|
221
|
+
* - 'auto' In such case the ticks are computed based on axis scale and other parameters.
|
|
222
|
+
* - a filtering function of the form `(value, index) => boolean` which is available only if the axis has "point" scale.
|
|
223
|
+
* - an array containing the values where ticks should be displayed.
|
|
224
|
+
* @see See {@link https://mui.com/x/react-charts/axis/#fixed-tick-positions}
|
|
225
|
+
* @default 'auto'
|
|
226
|
+
*/
|
|
227
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
228
|
+
/**
|
|
229
|
+
* Defines which ticks get its label displayed. Its value can be:
|
|
230
|
+
* - 'auto' In such case, labels are displayed if they do not overlap with the previous one.
|
|
231
|
+
* - a filtering function of the form (value, index) => boolean. Warning: the index is tick index, not data ones.
|
|
232
|
+
* @default 'auto'
|
|
233
|
+
*/
|
|
234
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
235
|
+
/**
|
|
236
|
+
* The placement of ticks label. Can be the middle of the band, or the tick position.
|
|
237
|
+
* Only used if scale is 'band'.
|
|
238
|
+
* @default 'middle'
|
|
239
|
+
*/
|
|
240
|
+
tickLabelPlacement: _propTypes.default.oneOf(['middle', 'tick']),
|
|
241
|
+
/**
|
|
242
|
+
* Set the position of the tick labels relative to the axis line.
|
|
243
|
+
* The before/after is defined based on clockwise direction.
|
|
244
|
+
* Using `'auto'` sets it to `'before'` if position is `'start'` and `'after'` otherwise.
|
|
245
|
+
* @default 'auto'
|
|
246
|
+
*/
|
|
247
|
+
tickLabelPosition: _propTypes.default.oneOf(['after', 'auto', 'before', 'center']),
|
|
248
|
+
/**
|
|
249
|
+
* The style applied to ticks text.
|
|
250
|
+
*/
|
|
251
|
+
tickLabelStyle: _propTypes.default.object,
|
|
252
|
+
/**
|
|
253
|
+
* Maximal step between two ticks.
|
|
254
|
+
* When using time data, the value is assumed to be in ms.
|
|
255
|
+
* Not supported by categorical axis (band, points).
|
|
256
|
+
*/
|
|
257
|
+
tickMaxStep: _propTypes.default.number,
|
|
258
|
+
/**
|
|
259
|
+
* Minimal step between two ticks.
|
|
260
|
+
* When using time data, the value is assumed to be in ms.
|
|
261
|
+
* Not supported by categorical axis (band, points).
|
|
262
|
+
*/
|
|
263
|
+
tickMinStep: _propTypes.default.number,
|
|
264
|
+
/**
|
|
265
|
+
* The number of ticks. This number is not guaranteed.
|
|
266
|
+
* Not supported by categorical axis (band, points).
|
|
267
|
+
*/
|
|
268
|
+
tickNumber: _propTypes.default.number,
|
|
269
|
+
/**
|
|
270
|
+
* The placement of ticks in regard to the band interval.
|
|
271
|
+
* Only used if scale is 'band'.
|
|
272
|
+
* @default 'extremities'
|
|
273
|
+
*/
|
|
274
|
+
tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
275
|
+
/**
|
|
276
|
+
* Set the position of the tick relative to the axis line.
|
|
277
|
+
* The before/after is defined based on clockwise direction.
|
|
278
|
+
* @default position === 'start' ? 'before' : 'after'
|
|
279
|
+
*/
|
|
280
|
+
tickPosition: _propTypes.default.oneOf(['after', 'before']),
|
|
281
|
+
/**
|
|
282
|
+
* The size of the ticks.
|
|
283
|
+
* @default 6
|
|
284
|
+
*/
|
|
285
|
+
tickSize: _propTypes.default.number,
|
|
286
|
+
/**
|
|
287
|
+
* The minimum space between ticks when using an ordinal scale. It defines the minimum distance in pixels between two ticks.
|
|
288
|
+
* @default 0
|
|
289
|
+
*/
|
|
290
|
+
tickSpacing: _propTypes.default.number
|
|
291
|
+
} : void 0;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
5
6
|
import { useTheme } from '@mui/material/styles';
|
|
6
7
|
import { useTicks } from "../hooks/useTicks.mjs";
|
|
7
8
|
import { useRadiusAxis, useRotationAxis } from "../hooks/useAxis.mjs";
|
|
@@ -10,9 +11,8 @@ import { selectorChartPolarCenter } from "../internals/plugins/featurePlugins/us
|
|
|
10
11
|
import { useUtilityClasses } from "./chartsRadiusAxisClasses.mjs";
|
|
11
12
|
import { createGetLabelTextAnchors } from "./createGetLabelTextAnchors.mjs";
|
|
12
13
|
import { getLabelTransform } from "./getLabelTransform.mjs";
|
|
13
|
-
|
|
14
|
-
/* Gap between a tick and its label. */
|
|
15
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
/* Gap between a tick and its label. */
|
|
16
16
|
const TICK_LABEL_GAP = 3;
|
|
17
17
|
const getLabelTextAnchors = createGetLabelTextAnchors(getLabelTransform);
|
|
18
18
|
|
|
@@ -34,13 +34,14 @@ function getAxisAngleInRadians(position, rotationAxis) {
|
|
|
34
34
|
}
|
|
35
35
|
return 0;
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
function ChartsRadiusAxis(props) {
|
|
38
38
|
const radiusAxis = useRadiusAxis(props.axisId);
|
|
39
39
|
const settings = _extends({}, radiusAxis, props);
|
|
40
40
|
const {
|
|
41
41
|
position = 'start',
|
|
42
42
|
disableLine,
|
|
43
43
|
disableTicks,
|
|
44
|
+
disableTickLabel,
|
|
44
45
|
tickLabelPosition: tickLabelPositionProp = 'auto',
|
|
45
46
|
tickPosition = position === 'start' ? 'before' : 'after',
|
|
46
47
|
tickSize = 6,
|
|
@@ -131,7 +132,7 @@ export function ChartsRadiusAxis(props) {
|
|
|
131
132
|
y2: tickY + tickDy,
|
|
132
133
|
stroke: stroke,
|
|
133
134
|
className: classes.tick
|
|
134
|
-
}), /*#__PURE__*/_jsx("text", _extends({
|
|
135
|
+
}), !disableTickLabel && /*#__PURE__*/_jsx("text", _extends({
|
|
135
136
|
x: labelX,
|
|
136
137
|
y: labelY,
|
|
137
138
|
fill: stroke,
|
|
@@ -144,4 +145,142 @@ export function ChartsRadiusAxis(props) {
|
|
|
144
145
|
}, index);
|
|
145
146
|
})]
|
|
146
147
|
});
|
|
147
|
-
}
|
|
148
|
+
}
|
|
149
|
+
process.env.NODE_ENV !== "production" ? ChartsRadiusAxis.propTypes /* remove-proptypes */ = {
|
|
150
|
+
// ----------------------------- Warning --------------------------------
|
|
151
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
152
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
153
|
+
// ----------------------------------------------------------------------
|
|
154
|
+
axis: PropTypes.oneOf(['radius']),
|
|
155
|
+
/**
|
|
156
|
+
* The id of the axis to render.
|
|
157
|
+
* If undefined, it will be the first defined axis.
|
|
158
|
+
*/
|
|
159
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
160
|
+
/**
|
|
161
|
+
* Override or extend the styles applied to the component.
|
|
162
|
+
*/
|
|
163
|
+
classes: PropTypes.object,
|
|
164
|
+
/**
|
|
165
|
+
* A CSS class name applied to the root element.
|
|
166
|
+
*/
|
|
167
|
+
className: PropTypes.string,
|
|
168
|
+
/**
|
|
169
|
+
* If true, the axis line is disabled.
|
|
170
|
+
* @default false
|
|
171
|
+
*/
|
|
172
|
+
disableLine: PropTypes.bool,
|
|
173
|
+
/**
|
|
174
|
+
* If true, the tick labels are not rendered.
|
|
175
|
+
* @default false
|
|
176
|
+
*/
|
|
177
|
+
disableTickLabel: PropTypes.bool,
|
|
178
|
+
/**
|
|
179
|
+
* If true, the ticks are disabled.
|
|
180
|
+
* @default false
|
|
181
|
+
*/
|
|
182
|
+
disableTicks: PropTypes.bool,
|
|
183
|
+
/**
|
|
184
|
+
* The label of the axis.
|
|
185
|
+
*/
|
|
186
|
+
label: PropTypes.string,
|
|
187
|
+
/**
|
|
188
|
+
* The style applied to the axis label.
|
|
189
|
+
*/
|
|
190
|
+
labelStyle: PropTypes.object,
|
|
191
|
+
/**
|
|
192
|
+
* The maximal radius.
|
|
193
|
+
* Can be a number (in pixels), a pixel string (for example `'80px'`), or a percentage string
|
|
194
|
+
* (for example `'80%'`) relative to the available radius (half the smallest side of the drawing area).
|
|
195
|
+
* @default '100%'
|
|
196
|
+
*/
|
|
197
|
+
maxRadius: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
198
|
+
/**
|
|
199
|
+
* The minimal radius.
|
|
200
|
+
* Can be a number (in pixels), a pixel string (for example `'20px'`), or a percentage string
|
|
201
|
+
* (for example `'20%'`) relative to the available radius (half the smallest side of the drawing area).
|
|
202
|
+
* @default 0
|
|
203
|
+
*/
|
|
204
|
+
minRadius: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
205
|
+
/**
|
|
206
|
+
* The position of the axis in polar coordinates.
|
|
207
|
+
* It can be 'start', 'end', or a specific angle in degrees.
|
|
208
|
+
* @default 'start'
|
|
209
|
+
*/
|
|
210
|
+
position: PropTypes.oneOfType([PropTypes.oneOf(['end', 'none', 'start']), PropTypes.number]),
|
|
211
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
212
|
+
/**
|
|
213
|
+
* Defines which ticks are displayed.
|
|
214
|
+
* Its value can be:
|
|
215
|
+
* - 'auto' In such case the ticks are computed based on axis scale and other parameters.
|
|
216
|
+
* - a filtering function of the form `(value, index) => boolean` which is available only if the axis has "point" scale.
|
|
217
|
+
* - an array containing the values where ticks should be displayed.
|
|
218
|
+
* @see See {@link https://mui.com/x/react-charts/axis/#fixed-tick-positions}
|
|
219
|
+
* @default 'auto'
|
|
220
|
+
*/
|
|
221
|
+
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
222
|
+
/**
|
|
223
|
+
* Defines which ticks get its label displayed. Its value can be:
|
|
224
|
+
* - 'auto' In such case, labels are displayed if they do not overlap with the previous one.
|
|
225
|
+
* - a filtering function of the form (value, index) => boolean. Warning: the index is tick index, not data ones.
|
|
226
|
+
* @default 'auto'
|
|
227
|
+
*/
|
|
228
|
+
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
229
|
+
/**
|
|
230
|
+
* The placement of ticks label. Can be the middle of the band, or the tick position.
|
|
231
|
+
* Only used if scale is 'band'.
|
|
232
|
+
* @default 'middle'
|
|
233
|
+
*/
|
|
234
|
+
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
235
|
+
/**
|
|
236
|
+
* Set the position of the tick labels relative to the axis line.
|
|
237
|
+
* The before/after is defined based on clockwise direction.
|
|
238
|
+
* Using `'auto'` sets it to `'before'` if position is `'start'` and `'after'` otherwise.
|
|
239
|
+
* @default 'auto'
|
|
240
|
+
*/
|
|
241
|
+
tickLabelPosition: PropTypes.oneOf(['after', 'auto', 'before', 'center']),
|
|
242
|
+
/**
|
|
243
|
+
* The style applied to ticks text.
|
|
244
|
+
*/
|
|
245
|
+
tickLabelStyle: PropTypes.object,
|
|
246
|
+
/**
|
|
247
|
+
* Maximal step between two ticks.
|
|
248
|
+
* When using time data, the value is assumed to be in ms.
|
|
249
|
+
* Not supported by categorical axis (band, points).
|
|
250
|
+
*/
|
|
251
|
+
tickMaxStep: PropTypes.number,
|
|
252
|
+
/**
|
|
253
|
+
* Minimal step between two ticks.
|
|
254
|
+
* When using time data, the value is assumed to be in ms.
|
|
255
|
+
* Not supported by categorical axis (band, points).
|
|
256
|
+
*/
|
|
257
|
+
tickMinStep: PropTypes.number,
|
|
258
|
+
/**
|
|
259
|
+
* The number of ticks. This number is not guaranteed.
|
|
260
|
+
* Not supported by categorical axis (band, points).
|
|
261
|
+
*/
|
|
262
|
+
tickNumber: PropTypes.number,
|
|
263
|
+
/**
|
|
264
|
+
* The placement of ticks in regard to the band interval.
|
|
265
|
+
* Only used if scale is 'band'.
|
|
266
|
+
* @default 'extremities'
|
|
267
|
+
*/
|
|
268
|
+
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
269
|
+
/**
|
|
270
|
+
* Set the position of the tick relative to the axis line.
|
|
271
|
+
* The before/after is defined based on clockwise direction.
|
|
272
|
+
* @default position === 'start' ? 'before' : 'after'
|
|
273
|
+
*/
|
|
274
|
+
tickPosition: PropTypes.oneOf(['after', 'before']),
|
|
275
|
+
/**
|
|
276
|
+
* The size of the ticks.
|
|
277
|
+
* @default 6
|
|
278
|
+
*/
|
|
279
|
+
tickSize: PropTypes.number,
|
|
280
|
+
/**
|
|
281
|
+
* The minimum space between ticks when using an ordinal scale. It defines the minimum distance in pixels between two ticks.
|
|
282
|
+
* @default 0
|
|
283
|
+
*/
|
|
284
|
+
tickSpacing: PropTypes.number
|
|
285
|
+
} : void 0;
|
|
286
|
+
export { ChartsRadiusAxis };
|
|
@@ -28,7 +28,7 @@ function ChartsReferenceLine(props) {
|
|
|
28
28
|
}
|
|
29
29
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsYReferenceLine.ChartsYReferenceLine, (0, _extends2.default)({}, props));
|
|
30
30
|
}
|
|
31
|
-
process.env.NODE_ENV !== "production" ? ChartsReferenceLine.propTypes = {
|
|
31
|
+
process.env.NODE_ENV !== "production" ? ChartsReferenceLine.propTypes /* remove-proptypes */ = {
|
|
32
32
|
// ----------------------------- Warning --------------------------------
|
|
33
33
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
34
34
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -22,7 +22,7 @@ function ChartsReferenceLine(props) {
|
|
|
22
22
|
}
|
|
23
23
|
return /*#__PURE__*/_jsx(ChartsYReferenceLine, _extends({}, props));
|
|
24
24
|
}
|
|
25
|
-
process.env.NODE_ENV !== "production" ? ChartsReferenceLine.propTypes = {
|
|
25
|
+
process.env.NODE_ENV !== "production" ? ChartsReferenceLine.propTypes /* remove-proptypes */ = {
|
|
26
26
|
// ----------------------------- Warning --------------------------------
|
|
27
27
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
28
28
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import type { ChartsRotationAxisProps } from "../models/axis.mjs";
|
|
2
|
-
export
|
|
1
|
+
import type { ChartsRotationAxisProps, ChartsAxisSlots, ChartsAxisSlotProps } from "../models/axis.mjs";
|
|
2
|
+
export interface ChartsRotationAxisSlots extends ChartsAxisSlots {}
|
|
3
|
+
export interface ChartsRotationAxisSlotProps extends ChartsAxisSlotProps {}
|
|
4
|
+
declare function ChartsRotationAxis(props: ChartsRotationAxisProps): import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
declare namespace ChartsRotationAxis {
|
|
6
|
+
var propTypes: any;
|
|
7
|
+
}
|
|
8
|
+
export { ChartsRotationAxis };
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import type { ChartsRotationAxisProps } from "../models/axis.js";
|
|
2
|
-
export
|
|
1
|
+
import type { ChartsRotationAxisProps, ChartsAxisSlots, ChartsAxisSlotProps } from "../models/axis.js";
|
|
2
|
+
export interface ChartsRotationAxisSlots extends ChartsAxisSlots {}
|
|
3
|
+
export interface ChartsRotationAxisSlotProps extends ChartsAxisSlotProps {}
|
|
4
|
+
declare function ChartsRotationAxis(props: ChartsRotationAxisProps): import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
declare namespace ChartsRotationAxis {
|
|
6
|
+
var propTypes: any;
|
|
7
|
+
}
|
|
8
|
+
export { ChartsRotationAxis };
|