@mui/x-charts 8.3.1 → 8.4.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 +3 -2
- package/CHANGELOG.md +110 -0
- package/ChartContainer/ChartContainer.js +1 -1
- package/ChartsAxis/axisClasses.d.ts +5 -0
- package/ChartsAxis/axisClasses.js +1 -1
- package/ChartsLegend/ChartsLegend.js +1 -0
- package/ChartsLocalizationProvider/ChartsLocalizationProvider.js +1 -3
- package/ChartsSurface/ChartsSurface.js +1 -0
- package/ChartsXAxis/ChartsXAxis.js +7 -16
- package/ChartsYAxis/ChartsYAxis.js +4 -8
- package/Gauge/Gauge.js +1 -0
- package/Gauge/GaugeContainer.js +1 -0
- package/Gauge/GaugeProvider.js +1 -3
- package/LineChart/AnimatedLine.js +1 -0
- package/LineChart/LineChart.js +3 -2
- package/LineChart/LineHighlightPlot.js +1 -4
- package/LineChart/MarkPlot.js +1 -4
- package/PieChart/PieArc.js +1 -0
- package/PieChart/PieArcLabel.js +1 -0
- package/PieChart/PieChart.js +7 -6
- package/RadarChart/RadarChart.js +3 -2
- package/ScatterChart/Scatter.js +3 -11
- package/ScatterChart/ScatterChart.js +5 -4
- package/SparkLineChart/SparkLineChart.js +31 -26
- package/Toolbar/ToolbarButton.js +1 -0
- package/context/ChartProvider/ChartContext.js +1 -3
- package/esm/BarChart/BarChart.js +3 -2
- package/esm/ChartContainer/ChartContainer.js +1 -1
- package/esm/ChartsAxis/axisClasses.d.ts +5 -0
- package/esm/ChartsAxis/axisClasses.js +1 -1
- package/esm/ChartsLegend/ChartsLegend.js +1 -0
- package/esm/ChartsLocalizationProvider/ChartsLocalizationProvider.js +1 -3
- package/esm/ChartsSurface/ChartsSurface.js +1 -0
- package/esm/ChartsXAxis/ChartsXAxis.js +7 -16
- package/esm/ChartsYAxis/ChartsYAxis.js +4 -8
- package/esm/Gauge/Gauge.js +1 -0
- package/esm/Gauge/GaugeContainer.js +1 -0
- package/esm/Gauge/GaugeProvider.js +1 -3
- package/esm/LineChart/AnimatedLine.js +1 -0
- package/esm/LineChart/LineChart.js +3 -2
- package/esm/LineChart/LineHighlightPlot.js +1 -4
- package/esm/LineChart/MarkPlot.js +1 -4
- package/esm/PieChart/PieArc.js +1 -0
- package/esm/PieChart/PieArcLabel.js +1 -0
- package/esm/PieChart/PieChart.js +5 -4
- package/esm/RadarChart/RadarChart.js +3 -2
- package/esm/ScatterChart/Scatter.js +3 -11
- package/esm/ScatterChart/ScatterChart.js +5 -4
- package/esm/SparkLineChart/SparkLineChart.js +31 -26
- package/esm/Toolbar/ToolbarButton.js +1 -0
- package/esm/context/ChartProvider/ChartContext.js +1 -3
- package/esm/hooks/useTicks.js +2 -6
- package/esm/index.js +1 -1
- package/esm/internals/constants.d.ts +1 -1
- package/esm/internals/constants.js +1 -1
- package/esm/internals/consumeSlots.js +2 -1
- package/esm/internals/consumeThemeProps.js +3 -1
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +11 -17
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +16 -13
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +2 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +3 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +4 -5
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +1 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/zoom.types.d.ts +8 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +1 -3
- package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.js +2 -5
- package/hooks/useTicks.js +2 -6
- package/index.js +1 -1
- package/internals/constants.d.ts +1 -1
- package/internals/constants.js +2 -2
- package/internals/consumeSlots.js +2 -1
- package/internals/consumeThemeProps.js +3 -1
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +11 -17
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +16 -13
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +7 -8
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +3 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +4 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +1 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/zoom.types.d.ts +8 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +1 -3
- package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.js +2 -5
- package/package.json +3 -3
package/BarChart/BarChart.js
CHANGED
|
@@ -64,11 +64,12 @@ const BarChart = exports.BarChart = /*#__PURE__*/React.forwardRef(function BarCh
|
|
|
64
64
|
children: [!props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
|
|
65
65
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", (0, _extends2.default)({}, clipPathGroupProps, {
|
|
66
66
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_BarPlot.BarPlot, (0, _extends2.default)({}, barPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps))]
|
|
67
|
-
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)),
|
|
68
|
-
}))]
|
|
67
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, (0, _extends2.default)({}, clipPathProps)), children]
|
|
68
|
+
})), !props.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({}, props.slotProps?.tooltip))]
|
|
69
69
|
}))
|
|
70
70
|
}));
|
|
71
71
|
});
|
|
72
|
+
if (process.env.NODE_ENV !== "production") BarChart.displayName = "BarChart";
|
|
72
73
|
process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
73
74
|
// ----------------------------- Warning --------------------------------
|
|
74
75
|
// | These PropTypes are generated from the TypeScript type definitions |
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,116 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.4.0
|
|
9
|
+
|
|
10
|
+
_May 21, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 21 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🔺 Support regular [`pyramid` variation in the `<FunnelChart />` component](https://mui.com/x/react-charts/funnel/#pyramid-chart):
|
|
15
|
+
|
|
16
|
+
<img width="398" alt="Pyramid funnel chart" src="https://github.com/user-attachments/assets/90ccb221-3a48-4ffa-8878-89c6db16da86" />
|
|
17
|
+
|
|
18
|
+
- 📚 Documentation improvements
|
|
19
|
+
- 🌎 Improve Icelandic (is-IS) locale on the Data Grid
|
|
20
|
+
- 🐞 Bugfixes
|
|
21
|
+
|
|
22
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
23
|
+
@aizerin, @arminmeh, @campmarc, @jyash97, @mapache-salvaje, @noraleonte, @nusr, @ragnarr18, @romgrk, @whereisrmsqhs.
|
|
24
|
+
Following are all team members who have contributed to this release:
|
|
25
|
+
@alexfauquette, @bernardobelchior, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @rita-codes.
|
|
26
|
+
|
|
27
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
28
|
+
|
|
29
|
+
### Data Grid
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid@8.4.0`
|
|
32
|
+
|
|
33
|
+
- [DataGrid] Fix content rendering for large rows while using automatic page size (#14737) @campmarc
|
|
34
|
+
- [DataGrid] Fix disabled typography variants crashing grid (#17934) @KenanYusuf
|
|
35
|
+
- [DataGrid] Fix tree data demo crash (#17904) @MBilalShafi
|
|
36
|
+
- [DataGrid] Use `exclude` selection model type if quick filter does not have actual values (#17899) @arminmeh
|
|
37
|
+
- [DataGrid] Fix clipboard copy behavior for cell ranges with empty cells (#16797) @nusr
|
|
38
|
+
- [l10n] Improve Icelandic (is-IS) locale (#17915) @ragnarr18
|
|
39
|
+
|
|
40
|
+
#### `@mui/x-data-grid-pro@8.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
41
|
+
|
|
42
|
+
Same changes as in `@mui/x-data-grid@8.4.0`, plus:
|
|
43
|
+
|
|
44
|
+
- [DataGridPro] Add `aria-expanded` attribute to the master detail toggle button (#17122) @whereisrmsqhs
|
|
45
|
+
- [DataGridPro] Preserve row state during server-side lazy loading (#17743) @arminmeh
|
|
46
|
+
- [DataGridPro] Prevent text selection when reordering rows (#16568) @jyash97
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-data-grid-premium@8.4.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
49
|
+
|
|
50
|
+
Same changes as in `@mui/x-data-grid-pro@8.4.0`.
|
|
51
|
+
|
|
52
|
+
### Date and Time Pickers
|
|
53
|
+
|
|
54
|
+
#### `@mui/x-date-pickers@8.4.0`
|
|
55
|
+
|
|
56
|
+
- [fields] Ensure fresh `disabled` value is used when focusing or clicking (#17914) @aizerin
|
|
57
|
+
- [fields] Improve the field controlled edition (#17816) @flaviendelangle
|
|
58
|
+
- [pickers] Fix `PickersTextField` overflow (#17942) @noraleonte
|
|
59
|
+
|
|
60
|
+
#### `@mui/x-date-pickers-pro@8.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
61
|
+
|
|
62
|
+
Same changes as in `@mui/x-date-pickers@8.4.0`.
|
|
63
|
+
|
|
64
|
+
### Charts
|
|
65
|
+
|
|
66
|
+
#### `@mui/x-charts@8.4.0`
|
|
67
|
+
|
|
68
|
+
- [charts] Add grouped axes demo (#17848) @bernardobelchior
|
|
69
|
+
- [charts] Enable tooltip disable portal (#17871) @alexfauquette
|
|
70
|
+
- [charts] Improve performance in scatter chart (#17849) @bernardobelchior
|
|
71
|
+
- [charts] Recreate `isPointInside` less often (#17850) @bernardobelchior
|
|
72
|
+
- [charts] Try fix for flaky `useAnimate` test (#17777) @JCQuintas
|
|
73
|
+
- [charts] Add `isXInside` and `isYInside` (#17911) @bernardobelchior
|
|
74
|
+
|
|
75
|
+
#### `@mui/x-charts-pro@8.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
76
|
+
|
|
77
|
+
Same changes as in `@mui/x-charts@8.4.0`, plus:
|
|
78
|
+
|
|
79
|
+
- [charts-pro] Add size for zoom slider (#17736) @bernardobelchior
|
|
80
|
+
- [charts-pro] Add zoom slider tooltip (#17733) @bernardobelchior
|
|
81
|
+
- [charts-pro] Clean and document Heatmap Tooltip (#17933) @alexfauquette
|
|
82
|
+
- [charts-pro] Introduce `Pyramid` chart (#17783) @JCQuintas
|
|
83
|
+
- [charts-pro] Update zoom slider nomenclature (#17938) @bernardobelchior
|
|
84
|
+
- [charts-pro] Fix error when importing rasterizehtml (#17897) @bernardobelchior
|
|
85
|
+
|
|
86
|
+
### Tree View
|
|
87
|
+
|
|
88
|
+
#### `@mui/x-tree-view@8.4.0`
|
|
89
|
+
|
|
90
|
+
- [TreeView] Add `getItemChildren` prop in `RichTreeView` (#17894) @rita-codes
|
|
91
|
+
- [TreeView] Add a method in the `apiRef` to toggle the editing status of an item (#17768) @rita-codes
|
|
92
|
+
- [TreeView] Add missing sx prop on the Tree Item component (#17930) @flaviendelangle
|
|
93
|
+
|
|
94
|
+
#### `@mui/x-tree-view-pro@8.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
95
|
+
|
|
96
|
+
Same changes as in `@mui/x-tree-view@8.4.0`.
|
|
97
|
+
|
|
98
|
+
### Docs
|
|
99
|
+
|
|
100
|
+
- [docs] Add a recipe for drag and drop row grouping (#17638) @KenanYusuf
|
|
101
|
+
- [docs] Add introductory text to Data Grid component pages (#17902) @KenanYusuf
|
|
102
|
+
- [docs] Refactor embedded CodeSandbox on Data Grid—Quickstart page (#17749) @rita-codes
|
|
103
|
+
- [docs] Remove double border on Data Grid—Quickstart demo (#17932) @rita-codes
|
|
104
|
+
- [docs] Standardize `apiRef` copy (#17776) @mapache-salvaje
|
|
105
|
+
- [docs][DataGrid] Revise server-side data docs (#17007) @mapache-salvaje
|
|
106
|
+
- [docs][DataGrid] Audit and revise the tree data doc (#17650) @mapache-salvaje
|
|
107
|
+
- [docs][pickers] Fix migration guide references to range fields (#17861) @LukasTy
|
|
108
|
+
- [docs][charts] Reorganize the Tooltip documentation (#17917) @alexfauquette
|
|
109
|
+
|
|
110
|
+
### Core
|
|
111
|
+
|
|
112
|
+
- [core] refactor: remove manual `displayName` (#17845) @romgrk
|
|
113
|
+
- [code-infra] Document how to use `vitest` cli (#17847) @JCQuintas
|
|
114
|
+
- [code-infra] Increase charts export test timeout (#17909) @JCQuintas
|
|
115
|
+
- [code-infra] Set `isolatedModules=true` in tsconfig (#17781) @JCQuintas
|
|
116
|
+
- [infra] Ensure proper docs preview path resolution (#17863) @LukasTy
|
|
117
|
+
|
|
8
118
|
## 8.3.1
|
|
9
119
|
|
|
10
120
|
_May 14, 2025_
|
|
@@ -52,7 +52,7 @@ const ChartContainer = exports.ChartContainer = /*#__PURE__*/React.forwardRef(fu
|
|
|
52
52
|
});
|
|
53
53
|
|
|
54
54
|
// @ts-ignore
|
|
55
|
-
|
|
55
|
+
if (process.env.NODE_ENV !== "production") ChartContainer.displayName = "ChartContainer";
|
|
56
56
|
process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
57
57
|
// ----------------------------- Warning --------------------------------
|
|
58
58
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -27,6 +27,11 @@ export interface ChartsAxisClasses {
|
|
|
27
27
|
left: string;
|
|
28
28
|
/** Styles applied to the right axis. */
|
|
29
29
|
right: string;
|
|
30
|
+
/**
|
|
31
|
+
* Styles applied to the root element for the axis with the given ID.
|
|
32
|
+
* Needs to be suffixed with the axis ID: `.${axisClasses.id}-${axisId}`.
|
|
33
|
+
*/
|
|
34
|
+
id: string;
|
|
30
35
|
}
|
|
31
36
|
export type ChartsAxisClassKey = keyof ChartsAxisClasses;
|
|
32
37
|
export declare function getAxisUtilityClass(slot: string): string;
|
|
@@ -11,4 +11,4 @@ var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generat
|
|
|
11
11
|
function getAxisUtilityClass(slot) {
|
|
12
12
|
return (0, _generateUtilityClass.default)('MuiChartsAxis', slot);
|
|
13
13
|
}
|
|
14
|
-
const axisClasses = exports.axisClasses = (0, _generateUtilityClasses.default)('MuiChartsAxis', ['root', 'line', 'tickContainer', 'tick', 'tickLabel', 'label', 'directionX', 'directionY', 'top', 'bottom', 'left', 'right']);
|
|
14
|
+
const axisClasses = exports.axisClasses = (0, _generateUtilityClasses.default)('MuiChartsAxis', ['root', 'line', 'tickContainer', 'tick', 'tickLabel', 'label', 'directionX', 'directionY', 'top', 'bottom', 'left', 'right', 'id']);
|
|
@@ -107,6 +107,7 @@ const ChartsLegend = exports.ChartsLegend = (0, _consumeSlots.consumeSlots)('Mui
|
|
|
107
107
|
})
|
|
108
108
|
}));
|
|
109
109
|
}));
|
|
110
|
+
if (process.env.NODE_ENV !== "production") ChartsLegend.displayName = "ChartsLegend";
|
|
110
111
|
process.env.NODE_ENV !== "production" ? ChartsLegend.propTypes = {
|
|
111
112
|
// ----------------------------- Warning --------------------------------
|
|
112
113
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -17,9 +17,7 @@ var _enUS = require("../locales/enUS");
|
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
18
|
const _excluded = ["localeText"];
|
|
19
19
|
const ChartsLocalizationContext = exports.ChartsLocalizationContext = /*#__PURE__*/React.createContext(null);
|
|
20
|
-
if (process.env.NODE_ENV !==
|
|
21
|
-
ChartsLocalizationContext.displayName = 'ChartsLocalizationContext';
|
|
22
|
-
}
|
|
20
|
+
if (process.env.NODE_ENV !== "production") ChartsLocalizationContext.displayName = "ChartsLocalizationContext";
|
|
23
21
|
/**
|
|
24
22
|
* Demos:
|
|
25
23
|
*
|
|
@@ -93,6 +93,7 @@ const ChartsSurface = exports.ChartsSurface = /*#__PURE__*/React.forwardRef(func
|
|
|
93
93
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxesGradients.ChartsAxesGradients, {}), hasIntrinsicSize && children]
|
|
94
94
|
}));
|
|
95
95
|
});
|
|
96
|
+
if (process.env.NODE_ENV !== "production") ChartsSurface.displayName = "ChartsSurface";
|
|
96
97
|
process.env.NODE_ENV !== "production" ? ChartsSurface.propTypes = {
|
|
97
98
|
// ----------------------------- Warning --------------------------------
|
|
98
99
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -38,10 +38,11 @@ const _excluded = ["scale", "tickNumber", "reverse"];
|
|
|
38
38
|
const useUtilityClasses = ownerState => {
|
|
39
39
|
const {
|
|
40
40
|
classes,
|
|
41
|
-
position
|
|
41
|
+
position,
|
|
42
|
+
id
|
|
42
43
|
} = ownerState;
|
|
43
44
|
const slots = {
|
|
44
|
-
root: ['root', 'directionX', position],
|
|
45
|
+
root: ['root', 'directionX', position, `id-${id}`],
|
|
45
46
|
line: ['line'],
|
|
46
47
|
tickContainer: ['tickContainer'],
|
|
47
48
|
tick: ['tick'],
|
|
@@ -63,7 +64,7 @@ function getVisibleLabels(xTicks, {
|
|
|
63
64
|
tickLabelMinGap,
|
|
64
65
|
reverse,
|
|
65
66
|
isMounted,
|
|
66
|
-
|
|
67
|
+
isXInside
|
|
67
68
|
}) {
|
|
68
69
|
const getTickLabelSize = tick => {
|
|
69
70
|
if (!isMounted || tick.formattedValue === undefined) {
|
|
@@ -98,7 +99,7 @@ function getVisibleLabels(xTicks, {
|
|
|
98
99
|
if (labelIndex > 0 && direction * textPosition < direction * (previousTextLimit + tickLabelMinGap)) {
|
|
99
100
|
return false;
|
|
100
101
|
}
|
|
101
|
-
if (!
|
|
102
|
+
if (!isXInside(textPosition)) {
|
|
102
103
|
return false;
|
|
103
104
|
}
|
|
104
105
|
|
|
@@ -266,12 +267,7 @@ function ChartsXAxis(inProps) {
|
|
|
266
267
|
tickLabelMinGap,
|
|
267
268
|
reverse,
|
|
268
269
|
isMounted,
|
|
269
|
-
|
|
270
|
-
x,
|
|
271
|
-
y: -1
|
|
272
|
-
}, {
|
|
273
|
-
direction: 'x'
|
|
274
|
-
})
|
|
270
|
+
isXInside: instance.isXInside
|
|
275
271
|
});
|
|
276
272
|
const axisLabelProps = (0, _useSlotProps.default)({
|
|
277
273
|
elementType: Label,
|
|
@@ -319,12 +315,7 @@ function ChartsXAxis(inProps) {
|
|
|
319
315
|
} = item;
|
|
320
316
|
const xTickLabel = labelOffset ?? 0;
|
|
321
317
|
const yTickLabel = positionSign * (tickSize + TICK_LABEL_GAP);
|
|
322
|
-
const showTick = instance.
|
|
323
|
-
x: tickOffset,
|
|
324
|
-
y: -1
|
|
325
|
-
}, {
|
|
326
|
-
direction: 'x'
|
|
327
|
-
});
|
|
318
|
+
const showTick = instance.isXInside(tickOffset);
|
|
328
319
|
const tickLabel = tickLabels.get(item);
|
|
329
320
|
const showTickLabel = visibleLabels.has(item);
|
|
330
321
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
|
|
@@ -35,10 +35,11 @@ const _excluded = ["scale", "tickNumber"];
|
|
|
35
35
|
const useUtilityClasses = ownerState => {
|
|
36
36
|
const {
|
|
37
37
|
classes,
|
|
38
|
-
position
|
|
38
|
+
position,
|
|
39
|
+
id
|
|
39
40
|
} = ownerState;
|
|
40
41
|
const slots = {
|
|
41
|
-
root: ['root', 'directionY', position],
|
|
42
|
+
root: ['root', 'directionY', position, `id-${id}`],
|
|
42
43
|
line: ['line'],
|
|
43
44
|
tickContainer: ['tickContainer'],
|
|
44
45
|
tick: ['tick'],
|
|
@@ -243,12 +244,7 @@ function ChartsYAxis(inProps) {
|
|
|
243
244
|
const xTickLabel = positionSign * (tickSize + TICK_LABEL_GAP);
|
|
244
245
|
const yTickLabel = labelOffset;
|
|
245
246
|
const skipLabel = typeof tickLabelInterval === 'function' && !tickLabelInterval?.(value, index);
|
|
246
|
-
const showLabel = instance.
|
|
247
|
-
x: -1,
|
|
248
|
-
y: tickOffset
|
|
249
|
-
}, {
|
|
250
|
-
direction: 'y'
|
|
251
|
-
});
|
|
247
|
+
const showLabel = instance.isYInside(tickOffset);
|
|
252
248
|
const tickLabel = tickLabels.get(item);
|
|
253
249
|
if (!showLabel) {
|
|
254
250
|
return null;
|
package/Gauge/Gauge.js
CHANGED
|
@@ -55,6 +55,7 @@ const Gauge = exports.Gauge = /*#__PURE__*/React.forwardRef(function Gauge(props
|
|
|
55
55
|
}), children]
|
|
56
56
|
}));
|
|
57
57
|
});
|
|
58
|
+
if (process.env.NODE_ENV !== "production") Gauge.displayName = "Gauge";
|
|
58
59
|
process.env.NODE_ENV !== "production" ? Gauge.propTypes = {
|
|
59
60
|
// ----------------------------- Warning --------------------------------
|
|
60
61
|
// | These PropTypes are generated from the TypeScript type definitions |
|
package/Gauge/GaugeContainer.js
CHANGED
|
@@ -85,6 +85,7 @@ const GaugeContainer = exports.GaugeContainer = /*#__PURE__*/React.forwardRef(fu
|
|
|
85
85
|
})
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
|
+
if (process.env.NODE_ENV !== "production") GaugeContainer.displayName = "GaugeContainer";
|
|
88
89
|
process.env.NODE_ENV !== "production" ? GaugeContainer.propTypes = {
|
|
89
90
|
// ----------------------------- Warning --------------------------------
|
|
90
91
|
// | These PropTypes are generated from the TypeScript type definitions |
|
package/Gauge/GaugeProvider.js
CHANGED
|
@@ -29,9 +29,7 @@ const GaugeContext = exports.GaugeContext = /*#__PURE__*/React.createContext({
|
|
|
29
29
|
maxRadius: 0,
|
|
30
30
|
valueAngle: null
|
|
31
31
|
});
|
|
32
|
-
if (process.env.NODE_ENV !==
|
|
33
|
-
GaugeContext.displayName = 'GaugeContext';
|
|
34
|
-
}
|
|
32
|
+
if (process.env.NODE_ENV !== "production") GaugeContext.displayName = "GaugeContext";
|
|
35
33
|
function GaugeProvider(props) {
|
|
36
34
|
const {
|
|
37
35
|
value = null,
|
|
@@ -47,6 +47,7 @@ const AnimatedLine = exports.AnimatedLine = /*#__PURE__*/React.forwardRef(functi
|
|
|
47
47
|
}, other, animateProps))
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
|
+
if (process.env.NODE_ENV !== "production") AnimatedLine.displayName = "AnimatedLine";
|
|
50
51
|
process.env.NODE_ENV !== "production" ? AnimatedLine.propTypes = {
|
|
51
52
|
// ----------------------------- Warning --------------------------------
|
|
52
53
|
// | These PropTypes are generated from the TypeScript type definitions |
|
package/LineChart/LineChart.js
CHANGED
|
@@ -72,11 +72,12 @@ const LineChart = exports.LineChart = /*#__PURE__*/React.forwardRef(function Lin
|
|
|
72
72
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
73
73
|
"data-drawing-container": true,
|
|
74
74
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MarkPlot.MarkPlot, (0, _extends2.default)({}, markPlotProps))
|
|
75
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LineHighlightPlot.LineHighlightPlot, (0, _extends2.default)({}, lineHighlightPlotProps)),
|
|
76
|
-
}))]
|
|
75
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LineHighlightPlot.LineHighlightPlot, (0, _extends2.default)({}, lineHighlightPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, (0, _extends2.default)({}, clipPathProps)), children]
|
|
76
|
+
})), !props.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({}, props.slotProps?.tooltip))]
|
|
77
77
|
}))
|
|
78
78
|
}));
|
|
79
79
|
});
|
|
80
|
+
if (process.env.NODE_ENV !== "production") LineChart.displayName = "LineChart";
|
|
80
81
|
process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
81
82
|
// ----------------------------- Warning --------------------------------
|
|
82
83
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -91,10 +91,7 @@ function LineHighlightPlot(props) {
|
|
|
91
91
|
const x = xScale(xData[highlightedIndex]);
|
|
92
92
|
const y = yScale(stackedData[highlightedIndex][1]); // This should not be undefined since y should not be a band scale
|
|
93
93
|
|
|
94
|
-
if (!instance.isPointInside({
|
|
95
|
-
x,
|
|
96
|
-
y
|
|
97
|
-
})) {
|
|
94
|
+
if (!instance.isPointInside(x, y)) {
|
|
98
95
|
return null;
|
|
99
96
|
}
|
|
100
97
|
const colorGetter = (0, _getColor.default)(series[seriesId], xAxis[xAxisId], yAxis[yAxisId]);
|
package/LineChart/MarkPlot.js
CHANGED
package/PieChart/PieArc.js
CHANGED
|
@@ -106,6 +106,7 @@ const PieArc = exports.PieArc = /*#__PURE__*/React.forwardRef(function PieArc(pr
|
|
|
106
106
|
strokeLinejoin: "round"
|
|
107
107
|
}, other, interactionProps, animatedProps));
|
|
108
108
|
});
|
|
109
|
+
if (process.env.NODE_ENV !== "production") PieArc.displayName = "PieArc";
|
|
109
110
|
process.env.NODE_ENV !== "production" ? PieArc.propTypes = {
|
|
110
111
|
// ----------------------------- Warning --------------------------------
|
|
111
112
|
// | These PropTypes are generated from the TypeScript type definitions |
|
package/PieChart/PieArcLabel.js
CHANGED
|
@@ -101,6 +101,7 @@ const PieArcLabel = exports.PieArcLabel = /*#__PURE__*/React.forwardRef(function
|
|
|
101
101
|
children: formattedArcLabel
|
|
102
102
|
}));
|
|
103
103
|
});
|
|
104
|
+
if (process.env.NODE_ENV !== "production") PieArcLabel.displayName = "PieArcLabel";
|
|
104
105
|
process.env.NODE_ENV !== "production" ? PieArcLabel.propTypes = {
|
|
105
106
|
// ----------------------------- Warning --------------------------------
|
|
106
107
|
// | These PropTypes are generated from the TypeScript type definitions |
|
package/PieChart/PieChart.js
CHANGED
|
@@ -20,7 +20,7 @@ var _ChartsSurface = require("../ChartsSurface");
|
|
|
20
20
|
var _ChartDataProvider = require("../ChartDataProvider");
|
|
21
21
|
var _useChartContainerProps = require("../ChartContainer/useChartContainerProps");
|
|
22
22
|
var _ChartsWrapper = require("../internals/components/ChartsWrapper");
|
|
23
|
-
var
|
|
23
|
+
var _PieChart2 = require("./PieChart.plugins");
|
|
24
24
|
var _defaultizeMargin = require("../internals/defaultizeMargin");
|
|
25
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
26
26
|
const _excluded = ["series", "width", "height", "margin", "colors", "sx", "skipAnimation", "hideLegend", "children", "slots", "slotProps", "onItemClick", "loading", "highlightedItem", "onHighlightChange", "className"];
|
|
@@ -81,7 +81,7 @@ const PieChart = exports.PieChart = /*#__PURE__*/React.forwardRef(function PieCh
|
|
|
81
81
|
onHighlightChange,
|
|
82
82
|
className,
|
|
83
83
|
skipAnimation,
|
|
84
|
-
plugins:
|
|
84
|
+
plugins: _PieChart2.PIE_CHART_PLUGINS
|
|
85
85
|
}), ref);
|
|
86
86
|
const Tooltip = slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
|
|
87
87
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProvider.ChartDataProvider, (0, _extends2.default)({}, chartDataProviderProps, {
|
|
@@ -102,13 +102,14 @@ const PieChart = exports.PieChart = /*#__PURE__*/React.forwardRef(function PieCh
|
|
|
102
102
|
loading: loading,
|
|
103
103
|
slots: slots,
|
|
104
104
|
slotProps: slotProps
|
|
105
|
-
}),
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}))]
|
|
105
|
+
}), children]
|
|
106
|
+
})), !loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({
|
|
107
|
+
trigger: "item"
|
|
108
|
+
}, slotProps?.tooltip))]
|
|
109
109
|
})
|
|
110
110
|
}));
|
|
111
111
|
});
|
|
112
|
+
if (process.env.NODE_ENV !== "production") PieChart.displayName = "PieChart";
|
|
112
113
|
process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
113
114
|
// ----------------------------- Warning --------------------------------
|
|
114
115
|
// | These PropTypes are generated from the TypeScript type definitions |
|
package/RadarChart/RadarChart.js
CHANGED
|
@@ -43,11 +43,12 @@ const RadarChart = exports.RadarChart = /*#__PURE__*/React.forwardRef(function R
|
|
|
43
43
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
|
|
44
44
|
children: [!props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
|
|
45
45
|
ref: ref,
|
|
46
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_RadarGrid.RadarGrid, (0, _extends2.default)({}, radarGrid)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_RadarMetricLabels.RadarMetricLabels, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_RadarSeriesPlot.RadarSeriesArea, {}), highlight === 'axis' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_RadarAxisHighlight.RadarAxisHighlight, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_RadarSeriesPlot.RadarSeriesMarks, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)),
|
|
47
|
-
}))]
|
|
46
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_RadarGrid.RadarGrid, (0, _extends2.default)({}, radarGrid)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_RadarMetricLabels.RadarMetricLabels, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_RadarSeriesPlot.RadarSeriesArea, {}), highlight === 'axis' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_RadarAxisHighlight.RadarAxisHighlight, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_RadarSeriesPlot.RadarSeriesMarks, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), children]
|
|
47
|
+
})), !props.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({}, props.slotProps?.tooltip))]
|
|
48
48
|
}))
|
|
49
49
|
}));
|
|
50
50
|
});
|
|
51
|
+
if (process.env.NODE_ENV !== "production") RadarChart.displayName = "RadarChart";
|
|
51
52
|
process.env.NODE_ENV !== "production" ? RadarChart.propTypes = {
|
|
52
53
|
// ----------------------------- Warning --------------------------------
|
|
53
54
|
// | These PropTypes are generated from the TypeScript type definitions |
|
package/ScatterChart/Scatter.js
CHANGED
|
@@ -61,19 +61,11 @@ function Scatter(props) {
|
|
|
61
61
|
const scatterPoint = series.data[i];
|
|
62
62
|
const x = getXPosition(scatterPoint.x);
|
|
63
63
|
const y = getYPosition(scatterPoint.y);
|
|
64
|
-
const isInRange = instance.isPointInside(
|
|
65
|
-
x,
|
|
66
|
-
y
|
|
67
|
-
});
|
|
68
|
-
const pointCtx = {
|
|
69
|
-
type: 'scatter',
|
|
70
|
-
seriesId: series.id,
|
|
71
|
-
dataIndex: i
|
|
72
|
-
};
|
|
64
|
+
const isInRange = instance.isPointInside(x, y);
|
|
73
65
|
if (isInRange) {
|
|
74
66
|
const currentItem = {
|
|
75
|
-
seriesId:
|
|
76
|
-
dataIndex:
|
|
67
|
+
seriesId: series.id,
|
|
68
|
+
dataIndex: i
|
|
77
69
|
};
|
|
78
70
|
const isItemHighlighted = isHighlighted(currentItem);
|
|
79
71
|
temp.push({
|
|
@@ -61,13 +61,14 @@ const ScatterChart = exports.ScatterChart = /*#__PURE__*/React.forwardRef(functi
|
|
|
61
61
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
62
62
|
"data-drawing-container": true,
|
|
63
63
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScatterPlot.ScatterPlot, (0, _extends2.default)({}, scatterPlotProps))
|
|
64
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps)),
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}))]
|
|
64
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps)), children]
|
|
65
|
+
})), !props.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({
|
|
66
|
+
trigger: "item"
|
|
67
|
+
}, props.slotProps?.tooltip))]
|
|
68
68
|
}))
|
|
69
69
|
}));
|
|
70
70
|
});
|
|
71
|
+
if (process.env.NODE_ENV !== "production") ScatterChart.displayName = "ScatterChart";
|
|
71
72
|
process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
72
73
|
// ----------------------------- Warning --------------------------------
|
|
73
74
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -15,7 +15,8 @@ var _useId = _interopRequireDefault(require("@mui/utils/useId"));
|
|
|
15
15
|
var _ChartsClipPath = require("../ChartsClipPath");
|
|
16
16
|
var _BarChart = require("../BarChart");
|
|
17
17
|
var _LineChart = require("../LineChart");
|
|
18
|
-
var
|
|
18
|
+
var _ChartDataProvider = require("../ChartDataProvider");
|
|
19
|
+
var _ChartsSurface = require("../ChartsSurface");
|
|
19
20
|
var _constants = require("../constants");
|
|
20
21
|
var _ChartsTooltip = require("../ChartsTooltip");
|
|
21
22
|
var _ChartsAxisHighlight = require("../ChartsAxisHighlight");
|
|
@@ -78,8 +79,7 @@ const SparkLineChart = exports.SparkLineChart = /*#__PURE__*/React.forwardRef(fu
|
|
|
78
79
|
}
|
|
79
80
|
return typeof color === 'function' ? mode => [color(mode)] : [color];
|
|
80
81
|
}, [color]);
|
|
81
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
82
|
-
ref: ref,
|
|
82
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartDataProvider.ChartDataProvider, {
|
|
83
83
|
series: [(0, _extends2.default)({
|
|
84
84
|
type: plotType,
|
|
85
85
|
data,
|
|
@@ -92,7 +92,6 @@ const SparkLineChart = exports.SparkLineChart = /*#__PURE__*/React.forwardRef(fu
|
|
|
92
92
|
width: width,
|
|
93
93
|
height: height,
|
|
94
94
|
margin: margin,
|
|
95
|
-
className: className,
|
|
96
95
|
xAxis: [(0, _extends2.default)({
|
|
97
96
|
id: _constants.DEFAULT_X_AXIS_KEY,
|
|
98
97
|
scaleType: plotType === 'bar' ? 'band' : 'point',
|
|
@@ -109,34 +108,40 @@ const SparkLineChart = exports.SparkLineChart = /*#__PURE__*/React.forwardRef(fu
|
|
|
109
108
|
position: 'none'
|
|
110
109
|
})],
|
|
111
110
|
colors: colors,
|
|
112
|
-
sx: sx,
|
|
113
111
|
disableAxisListener: (!showTooltip || slotProps?.tooltip?.trigger !== 'axis') && axisHighlight?.x === 'none' && axisHighlight?.y === 'none',
|
|
114
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
122
|
-
skipAnimation: true,
|
|
123
|
-
slots: slots,
|
|
124
|
-
slotProps: slotProps
|
|
125
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LineChart.LinePlot, {
|
|
112
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({
|
|
113
|
+
className: className,
|
|
114
|
+
ref: ref,
|
|
115
|
+
sx: sx
|
|
116
|
+
}, other, {
|
|
117
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
|
|
118
|
+
clipPath: `url(#${clipPathId})`,
|
|
119
|
+
children: [plotType === 'bar' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_BarChart.BarPlot, {
|
|
126
120
|
skipAnimation: true,
|
|
127
121
|
slots: slots,
|
|
128
122
|
slotProps: slotProps
|
|
123
|
+
}), plotType === 'line' && /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
124
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LineChart.AreaPlot, {
|
|
125
|
+
skipAnimation: true,
|
|
126
|
+
slots: slots,
|
|
127
|
+
slotProps: slotProps
|
|
128
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LineChart.LinePlot, {
|
|
129
|
+
skipAnimation: true,
|
|
130
|
+
slots: slots,
|
|
131
|
+
slotProps: slotProps
|
|
132
|
+
})]
|
|
129
133
|
})]
|
|
130
|
-
})
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
})
|
|
138
|
-
})
|
|
134
|
+
}), plotType === 'line' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_LineChart.LineHighlightPlot, {
|
|
135
|
+
slots: slots,
|
|
136
|
+
slotProps: slotProps
|
|
137
|
+
}), disableClipping ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, {
|
|
138
|
+
id: clipPathId,
|
|
139
|
+
offset: clipPathOffset
|
|
140
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlight)), children]
|
|
141
|
+
})), showTooltip && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({}, props.slotProps?.tooltip))]
|
|
142
|
+
});
|
|
139
143
|
});
|
|
144
|
+
if (process.env.NODE_ENV !== "production") SparkLineChart.displayName = "SparkLineChart";
|
|
140
145
|
process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
141
146
|
// ----------------------------- Warning --------------------------------
|
|
142
147
|
// | These PropTypes are generated from the TypeScript type definitions |
|
package/Toolbar/ToolbarButton.js
CHANGED
|
@@ -17,6 +17,7 @@ const ToolbarButton = exports.ToolbarButton = /*#__PURE__*/React.forwardRef(func
|
|
|
17
17
|
ref: ref
|
|
18
18
|
}, props));
|
|
19
19
|
});
|
|
20
|
+
if (process.env.NODE_ENV !== "production") ToolbarButton.displayName = "ToolbarButton";
|
|
20
21
|
process.env.NODE_ENV !== "production" ? ToolbarButton.propTypes = {
|
|
21
22
|
// ----------------------------- Warning --------------------------------
|
|
22
23
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -10,6 +10,4 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
* @ignore - internal component.
|
|
11
11
|
*/
|
|
12
12
|
const ChartContext = exports.ChartContext = /*#__PURE__*/React.createContext(null);
|
|
13
|
-
if (process.env.NODE_ENV !==
|
|
14
|
-
ChartContext.displayName = 'ChartContext';
|
|
15
|
-
}
|
|
13
|
+
if (process.env.NODE_ENV !== "production") ChartContext.displayName = "ChartContext";
|
package/esm/BarChart/BarChart.js
CHANGED
|
@@ -57,11 +57,12 @@ const BarChart = /*#__PURE__*/React.forwardRef(function BarChart(inProps, ref) {
|
|
|
57
57
|
children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
58
58
|
children: [/*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
|
|
59
59
|
children: [/*#__PURE__*/_jsx(BarPlot, _extends({}, barPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
|
|
60
|
-
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)),
|
|
61
|
-
}))]
|
|
60
|
+
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), children]
|
|
61
|
+
})), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip))]
|
|
62
62
|
}))
|
|
63
63
|
}));
|
|
64
64
|
});
|
|
65
|
+
if (process.env.NODE_ENV !== "production") BarChart.displayName = "BarChart";
|
|
65
66
|
process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
66
67
|
// ----------------------------- Warning --------------------------------
|
|
67
68
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -45,7 +45,7 @@ const ChartContainer = /*#__PURE__*/React.forwardRef(function ChartContainer(pro
|
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
// @ts-ignore
|
|
48
|
-
|
|
48
|
+
if (process.env.NODE_ENV !== "production") ChartContainer.displayName = "ChartContainer";
|
|
49
49
|
process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
50
50
|
// ----------------------------- Warning --------------------------------
|
|
51
51
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -27,6 +27,11 @@ export interface ChartsAxisClasses {
|
|
|
27
27
|
left: string;
|
|
28
28
|
/** Styles applied to the right axis. */
|
|
29
29
|
right: string;
|
|
30
|
+
/**
|
|
31
|
+
* Styles applied to the root element for the axis with the given ID.
|
|
32
|
+
* Needs to be suffixed with the axis ID: `.${axisClasses.id}-${axisId}`.
|
|
33
|
+
*/
|
|
34
|
+
id: string;
|
|
30
35
|
}
|
|
31
36
|
export type ChartsAxisClassKey = keyof ChartsAxisClasses;
|
|
32
37
|
export declare function getAxisUtilityClass(slot: string): string;
|