@mui/x-charts-pro 8.0.0-alpha.0 → 8.0.0-alpha.1
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/BarChartPro/BarChartPro.js +3 -31
- package/CHANGELOG.md +429 -5
- package/ChartContainerPro/ChartContainerPro.js +13 -23
- package/ChartContainerPro/useChartContainerProProps.d.ts +2 -39
- package/ChartContainerPro/useChartContainerProProps.js +6 -4
- package/Heatmap/Heatmap.d.ts +11 -4
- package/Heatmap/Heatmap.js +4 -35
- package/Heatmap/HeatmapTooltip.d.ts +9 -0
- package/Heatmap/HeatmapTooltip.js +294 -0
- package/Heatmap/index.d.ts +1 -1
- package/Heatmap/index.js +1 -1
- package/LineChartPro/LineChartPro.js +3 -32
- package/README.md +2 -2
- package/ScatterChartPro/ScatterChartPro.js +3 -32
- package/context/ChartDataProviderPro/ChartDataProviderPro.d.ts +4 -1
- package/context/ChartDataProviderPro/ChartDataProviderPro.js +22 -21
- package/context/ChartDataProviderPro/useChartDataProviderProProps.d.ts +3 -5
- package/context/ChartDataProviderPro/useChartDataProviderProProps.js +6 -6
- package/index.js +1 -1
- package/internals/utils/releaseInfo.js +1 -1
- package/modern/BarChartPro/BarChartPro.js +3 -31
- package/modern/ChartContainerPro/ChartContainerPro.js +13 -23
- package/modern/ChartContainerPro/useChartContainerProProps.js +6 -4
- package/modern/Heatmap/Heatmap.js +4 -35
- package/modern/Heatmap/HeatmapTooltip.js +294 -0
- package/modern/Heatmap/index.js +1 -1
- package/modern/LineChartPro/LineChartPro.js +3 -32
- package/modern/ScatterChartPro/ScatterChartPro.js +3 -32
- package/modern/context/ChartDataProviderPro/ChartDataProviderPro.js +22 -21
- package/modern/context/ChartDataProviderPro/useChartDataProviderProProps.js +6 -6
- package/modern/index.js +1 -1
- package/modern/internals/utils/releaseInfo.js +1 -1
- package/node/BarChartPro/BarChartPro.js +3 -31
- package/node/ChartContainerPro/ChartContainerPro.js +13 -23
- package/node/ChartContainerPro/useChartContainerProProps.js +6 -4
- package/node/Heatmap/Heatmap.js +4 -35
- package/node/Heatmap/HeatmapTooltip.js +300 -0
- package/node/Heatmap/index.js +4 -4
- package/node/LineChartPro/LineChartPro.js +3 -32
- package/node/ScatterChartPro/ScatterChartPro.js +3 -32
- package/node/context/ChartDataProviderPro/ChartDataProviderPro.js +21 -20
- package/node/context/ChartDataProviderPro/useChartDataProviderProProps.js +6 -6
- package/node/index.js +1 -1
- package/node/internals/utils/releaseInfo.js +1 -1
- package/package.json +7 -7
- package/Heatmap/DefaultHeatmapTooltip.d.ts +0 -7
- package/Heatmap/DefaultHeatmapTooltip.js +0 -99
- package/modern/Heatmap/DefaultHeatmapTooltip.js +0 -99
- package/node/Heatmap/DefaultHeatmapTooltip.js +0 -105
|
@@ -106,9 +106,9 @@ const BarChartPro = exports.BarChartPro = /*#__PURE__*/React.forwardRef(function
|
|
|
106
106
|
chartsAxisProps,
|
|
107
107
|
axisHighlightProps,
|
|
108
108
|
legendProps,
|
|
109
|
-
tooltipProps,
|
|
110
109
|
children
|
|
111
110
|
} = (0, _internals.useBarChartProps)(other);
|
|
111
|
+
const Tooltip = props.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
|
|
112
112
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartContainerPro.ChartContainerPro, (0, _extends2.default)({
|
|
113
113
|
ref: ref
|
|
114
114
|
}, chartContainerProps, {
|
|
@@ -116,7 +116,7 @@ const BarChartPro = exports.BarChartPro = /*#__PURE__*/React.forwardRef(function
|
|
|
116
116
|
onZoomChange: onZoomChange,
|
|
117
117
|
children: [props.onAxisClick && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOnAxisClickHandler.ChartsOnAxisClickHandler, (0, _extends2.default)({}, axisClickHandlerProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", (0, _extends2.default)({}, clipPathGroupProps, {
|
|
118
118
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(BarChartPlotZoom, (0, _extends2.default)({}, barPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps))]
|
|
119
|
-
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), !props.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
119
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), !props.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({}, props.slotProps?.tooltip)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, (0, _extends2.default)({}, clipPathProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ZoomSetup.ZoomSetup, {}), children]
|
|
120
120
|
}));
|
|
121
121
|
});
|
|
122
122
|
process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
@@ -128,7 +128,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
128
128
|
* The configuration of axes highlight.
|
|
129
129
|
* Default is set to 'band' in the bar direction.
|
|
130
130
|
* Depends on `layout` prop.
|
|
131
|
-
* @see See {@link https://mui.com/x/react-charts/highlighting highlighting docs} for more details.
|
|
131
|
+
* @see See {@link https://mui.com/x/react-charts/highlighting/ highlighting docs} for more details.
|
|
132
132
|
*/
|
|
133
133
|
axisHighlight: _propTypes.default.shape({
|
|
134
134
|
x: _propTypes.default.oneOf(['band', 'line', 'none']),
|
|
@@ -245,16 +245,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
245
245
|
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
246
246
|
*/
|
|
247
247
|
onZoomChange: _propTypes.default.func,
|
|
248
|
-
/**
|
|
249
|
-
* The chart will try to wait for the parent container to resolve its size
|
|
250
|
-
* before it renders for the first time.
|
|
251
|
-
*
|
|
252
|
-
* This can be useful in some scenarios where the chart appear to grow after
|
|
253
|
-
* the first render, like when used inside a grid.
|
|
254
|
-
*
|
|
255
|
-
* @default false
|
|
256
|
-
*/
|
|
257
|
-
resolveSizeBeforeRender: _propTypes.default.bool,
|
|
258
248
|
/**
|
|
259
249
|
* Indicate which axis to display the right of the charts.
|
|
260
250
|
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
@@ -283,30 +273,12 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
283
273
|
slots: _propTypes.default.object,
|
|
284
274
|
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]),
|
|
285
275
|
title: _propTypes.default.string,
|
|
286
|
-
/**
|
|
287
|
-
* The configuration of the tooltip.
|
|
288
|
-
* @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
|
|
289
|
-
*/
|
|
290
|
-
tooltip: _propTypes.default.shape({
|
|
291
|
-
axisContent: _propTypes.default.elementType,
|
|
292
|
-
classes: _propTypes.default.object,
|
|
293
|
-
itemContent: _propTypes.default.elementType,
|
|
294
|
-
slotProps: _propTypes.default.object,
|
|
295
|
-
slots: _propTypes.default.object,
|
|
296
|
-
trigger: _propTypes.default.oneOf(['axis', 'item', 'none'])
|
|
297
|
-
}),
|
|
298
276
|
/**
|
|
299
277
|
* Indicate which axis to display the top of the charts.
|
|
300
278
|
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
301
279
|
* @default null
|
|
302
280
|
*/
|
|
303
281
|
topAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
304
|
-
viewBox: _propTypes.default.shape({
|
|
305
|
-
height: _propTypes.default.number,
|
|
306
|
-
width: _propTypes.default.number,
|
|
307
|
-
x: _propTypes.default.number,
|
|
308
|
-
y: _propTypes.default.number
|
|
309
|
-
}),
|
|
310
282
|
/**
|
|
311
283
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
312
284
|
*/
|
|
@@ -12,6 +12,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _Watermark = require("@mui/x-license/Watermark");
|
|
14
14
|
var _internals = require("@mui/x-charts/internals");
|
|
15
|
+
var _xCharts = require("@mui/x-charts");
|
|
15
16
|
var _releaseInfo = require("../internals/utils/releaseInfo");
|
|
16
17
|
var _ChartDataProviderPro = require("../context/ChartDataProviderPro");
|
|
17
18
|
var _useChartContainerProProps = require("./useChartContainerProProps");
|
|
@@ -20,14 +21,19 @@ const releaseInfo = (0, _releaseInfo.getReleaseInfo)();
|
|
|
20
21
|
const ChartContainerPro = exports.ChartContainerPro = /*#__PURE__*/React.forwardRef(function ChartContainerPro(props, ref) {
|
|
21
22
|
const {
|
|
22
23
|
chartDataProviderProProps,
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
children,
|
|
25
|
+
resizableContainerProps,
|
|
26
|
+
chartsSurfaceProps
|
|
25
27
|
} = (0, _useChartContainerProProps.useChartContainerProProps)(props, ref);
|
|
26
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
27
|
-
children:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPro.ChartDataProviderPro, (0, _extends2.default)({}, chartDataProviderProProps, {
|
|
29
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_internals.ResizableContainer, (0, _extends2.default)({}, resizableContainerProps, {
|
|
30
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_xCharts.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
|
|
31
|
+
children: children
|
|
32
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Watermark.Watermark, {
|
|
33
|
+
packageName: "x-charts-pro",
|
|
34
|
+
releaseInfo: releaseInfo
|
|
35
|
+
})]
|
|
36
|
+
}))
|
|
31
37
|
}));
|
|
32
38
|
});
|
|
33
39
|
process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
@@ -93,16 +99,6 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
93
99
|
* If not provided, the container supports line, bar, scatter and pie charts.
|
|
94
100
|
*/
|
|
95
101
|
plugins: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
96
|
-
/**
|
|
97
|
-
* The chart will try to wait for the parent container to resolve its size
|
|
98
|
-
* before it renders for the first time.
|
|
99
|
-
*
|
|
100
|
-
* This can be useful in some scenarios where the chart appear to grow after
|
|
101
|
-
* the first render, like when used inside a grid.
|
|
102
|
-
*
|
|
103
|
-
* @default false
|
|
104
|
-
*/
|
|
105
|
-
resolveSizeBeforeRender: _propTypes.default.bool,
|
|
106
102
|
/**
|
|
107
103
|
* The array of series to display.
|
|
108
104
|
* Each type of series has its own specificity.
|
|
@@ -116,12 +112,6 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
116
112
|
skipAnimation: _propTypes.default.bool,
|
|
117
113
|
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]),
|
|
118
114
|
title: _propTypes.default.string,
|
|
119
|
-
viewBox: _propTypes.default.shape({
|
|
120
|
-
height: _propTypes.default.number,
|
|
121
|
-
width: _propTypes.default.number,
|
|
122
|
-
x: _propTypes.default.number,
|
|
123
|
-
y: _propTypes.default.number
|
|
124
|
-
}),
|
|
125
115
|
/**
|
|
126
116
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
127
117
|
*/
|
|
@@ -22,13 +22,15 @@ const useChartContainerProProps = (props, ref) => {
|
|
|
22
22
|
};
|
|
23
23
|
const {
|
|
24
24
|
chartDataProviderProps,
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
chartsSurfaceProps,
|
|
26
|
+
resizableContainerProps,
|
|
27
|
+
children
|
|
27
28
|
} = (0, _internals.useChartContainerProps)(baseProps, ref);
|
|
28
29
|
return {
|
|
29
30
|
chartDataProviderProProps: (0, _extends2.default)({}, chartDataProviderProps, chartDataProviderProProps),
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
resizableContainerProps,
|
|
32
|
+
chartsSurfaceProps,
|
|
33
|
+
children
|
|
32
34
|
};
|
|
33
35
|
};
|
|
34
36
|
exports.useChartContainerProProps = useChartContainerProProps;
|
package/node/Heatmap/Heatmap.js
CHANGED
|
@@ -14,14 +14,13 @@ var _styles = require("@mui/material/styles");
|
|
|
14
14
|
var _useId = _interopRequireDefault(require("@mui/utils/useId"));
|
|
15
15
|
var _d3Interpolate = require("@mui/x-charts-vendor/d3-interpolate");
|
|
16
16
|
var _ChartsAxis = require("@mui/x-charts/ChartsAxis");
|
|
17
|
-
var _ChartsTooltip = require("@mui/x-charts/ChartsTooltip");
|
|
18
17
|
var _ChartsClipPath = require("@mui/x-charts/ChartsClipPath");
|
|
19
18
|
var _ChartsOnAxisClickHandler = require("@mui/x-charts/ChartsOnAxisClickHandler");
|
|
20
19
|
var _ChartsOverlay = require("@mui/x-charts/ChartsOverlay");
|
|
21
20
|
var _ChartContainerPro = require("../ChartContainerPro");
|
|
22
21
|
var _HeatmapPlot = require("./HeatmapPlot");
|
|
23
22
|
var _plugin = require("./plugin");
|
|
24
|
-
var
|
|
23
|
+
var _HeatmapTooltip = require("./HeatmapTooltip");
|
|
25
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
26
25
|
// The GnBu: https://github.com/d3/d3-scale-chromatic/blob/main/src/sequential-multi/GnBu.js
|
|
27
26
|
const defaultColorMap = (0, _d3Interpolate.interpolateRgbBasis)(['#f7fcf0', '#e0f3db', '#ccebc5', '#a8ddb5', '#7bccc4', '#4eb3d3', '#2b8cbe', '#0868ac', '#084081']);
|
|
@@ -41,7 +40,6 @@ const Heatmap = exports.Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap
|
|
|
41
40
|
colors,
|
|
42
41
|
dataset,
|
|
43
42
|
sx,
|
|
44
|
-
tooltip,
|
|
45
43
|
topAxis,
|
|
46
44
|
leftAxis,
|
|
47
45
|
rightAxis,
|
|
@@ -72,6 +70,7 @@ const Heatmap = exports.Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap
|
|
|
72
70
|
color: defaultColorMap
|
|
73
71
|
}
|
|
74
72
|
}], [zAxis]);
|
|
73
|
+
const Tooltip = props.slots?.tooltip ?? _HeatmapTooltip.HeatmapTooltip;
|
|
75
74
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartContainerPro.ChartContainerPro, {
|
|
76
75
|
ref: ref,
|
|
77
76
|
plugins: [_plugin.plugin],
|
|
@@ -109,14 +108,7 @@ const Heatmap = exports.Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap
|
|
|
109
108
|
bottomAxis: bottomAxis,
|
|
110
109
|
slots: slots,
|
|
111
110
|
slotProps: slotProps
|
|
112
|
-
}), !loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
113
|
-
trigger: "item"
|
|
114
|
-
}, tooltip, {
|
|
115
|
-
slots: (0, _extends2.default)({
|
|
116
|
-
itemContent: _DefaultHeatmapTooltip.DefaultHeatmapTooltip
|
|
117
|
-
}, slots),
|
|
118
|
-
slotProps: slotProps
|
|
119
|
-
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, {
|
|
111
|
+
}), !loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({}, slotProps?.tooltip)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, {
|
|
120
112
|
id: clipPathId
|
|
121
113
|
}), children]
|
|
122
114
|
});
|
|
@@ -197,16 +189,6 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
197
189
|
* @param {HighlightItemData | null} highlightedItem The newly highlighted item.
|
|
198
190
|
*/
|
|
199
191
|
onHighlightChange: _propTypes.default.func,
|
|
200
|
-
/**
|
|
201
|
-
* The chart will try to wait for the parent container to resolve its size
|
|
202
|
-
* before it renders for the first time.
|
|
203
|
-
*
|
|
204
|
-
* This can be useful in some scenarios where the chart appear to grow after
|
|
205
|
-
* the first render, like when used inside a grid.
|
|
206
|
-
*
|
|
207
|
-
* @default false
|
|
208
|
-
*/
|
|
209
|
-
resolveSizeBeforeRender: _propTypes.default.bool,
|
|
210
192
|
/**
|
|
211
193
|
* Indicate which axis to display the right of the charts.
|
|
212
194
|
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
@@ -234,26 +216,13 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
234
216
|
* The configuration of the tooltip.
|
|
235
217
|
* @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
|
|
236
218
|
*/
|
|
237
|
-
tooltip: _propTypes.default.
|
|
238
|
-
axisContent: _propTypes.default.elementType,
|
|
239
|
-
classes: _propTypes.default.object,
|
|
240
|
-
itemContent: _propTypes.default.elementType,
|
|
241
|
-
slotProps: _propTypes.default.object,
|
|
242
|
-
slots: _propTypes.default.object,
|
|
243
|
-
trigger: _propTypes.default.oneOf(['axis', 'item', 'none'])
|
|
244
|
-
}),
|
|
219
|
+
tooltip: _propTypes.default.object,
|
|
245
220
|
/**
|
|
246
221
|
* Indicate which axis to display the top of the charts.
|
|
247
222
|
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
248
223
|
* @default null
|
|
249
224
|
*/
|
|
250
225
|
topAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
251
|
-
viewBox: _propTypes.default.shape({
|
|
252
|
-
height: _propTypes.default.number,
|
|
253
|
-
width: _propTypes.default.number,
|
|
254
|
-
x: _propTypes.default.number,
|
|
255
|
-
y: _propTypes.default.number
|
|
256
|
-
}),
|
|
257
226
|
/**
|
|
258
227
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
259
228
|
*/
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.HeatmapTooltip = HeatmapTooltip;
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
|
+
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
15
|
+
var _ChartsTooltip = require("@mui/x-charts/ChartsTooltip");
|
|
16
|
+
var _hooks = require("@mui/x-charts/hooks");
|
|
17
|
+
var _internals = require("@mui/x-charts/internals");
|
|
18
|
+
var _useSeries = require("../hooks/useSeries");
|
|
19
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
+
const useUtilityClasses = ownerState => {
|
|
21
|
+
const {
|
|
22
|
+
classes
|
|
23
|
+
} = ownerState;
|
|
24
|
+
const slots = {
|
|
25
|
+
root: ['root'],
|
|
26
|
+
paper: ['paper'],
|
|
27
|
+
table: ['table'],
|
|
28
|
+
row: ['row'],
|
|
29
|
+
cell: ['cell'],
|
|
30
|
+
mark: ['mark'],
|
|
31
|
+
markCell: ['markCell'],
|
|
32
|
+
labelCell: ['labelCell'],
|
|
33
|
+
valueCell: ['valueCell']
|
|
34
|
+
};
|
|
35
|
+
return (0, _composeClasses.default)(slots, _ChartsTooltip.getChartsTooltipUtilityClass, classes);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @ignore - internal component.
|
|
40
|
+
*/
|
|
41
|
+
function DefaultHeatmapTooltipContent(props) {
|
|
42
|
+
const {
|
|
43
|
+
classes
|
|
44
|
+
} = props;
|
|
45
|
+
const xAxis = (0, _hooks.useXAxis)();
|
|
46
|
+
const yAxis = (0, _hooks.useYAxis)();
|
|
47
|
+
const heatmapSeries = (0, _useSeries.useHeatmapSeries)();
|
|
48
|
+
const tooltipData = (0, _ChartsTooltip.useItemTooltip)();
|
|
49
|
+
if (!tooltipData || !heatmapSeries || heatmapSeries.seriesOrder.length === 0) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
const {
|
|
53
|
+
series,
|
|
54
|
+
seriesOrder
|
|
55
|
+
} = heatmapSeries;
|
|
56
|
+
const seriesId = seriesOrder[0];
|
|
57
|
+
const {
|
|
58
|
+
color,
|
|
59
|
+
value,
|
|
60
|
+
identifier
|
|
61
|
+
} = tooltipData;
|
|
62
|
+
const [xIndex, yIndex] = value;
|
|
63
|
+
const formattedX = xAxis.valueFormatter?.(xAxis.data[xIndex], {
|
|
64
|
+
location: 'tooltip'
|
|
65
|
+
}) ?? xAxis.data[xIndex].toLocaleString();
|
|
66
|
+
const formattedY = yAxis.valueFormatter?.(yAxis.data[yIndex], {
|
|
67
|
+
location: 'tooltip'
|
|
68
|
+
}) ?? yAxis.data[yIndex].toLocaleString();
|
|
69
|
+
const formattedValue = series[seriesId].valueFormatter(value, {
|
|
70
|
+
dataIndex: identifier.dataIndex
|
|
71
|
+
});
|
|
72
|
+
const seriesLabel = (0, _internals.getLabel)(series[seriesId].label, 'tooltip');
|
|
73
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltipPaper, {
|
|
74
|
+
className: classes?.paper,
|
|
75
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsTooltip.ChartsTooltipTable, {
|
|
76
|
+
className: classes?.table,
|
|
77
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("thead", {
|
|
78
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsTooltip.ChartsTooltipRow, {
|
|
79
|
+
className: classes?.row,
|
|
80
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltipCell, {
|
|
81
|
+
className: classes?.cell,
|
|
82
|
+
children: formattedX
|
|
83
|
+
}), formattedX && formattedY && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltipCell, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltipCell, {
|
|
84
|
+
className: classes?.cell,
|
|
85
|
+
children: formattedY
|
|
86
|
+
})]
|
|
87
|
+
})
|
|
88
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("tbody", {
|
|
89
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsTooltip.ChartsTooltipRow, {
|
|
90
|
+
className: classes?.row,
|
|
91
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltipCell, {
|
|
92
|
+
className: (0, _clsx.default)(classes?.markCell, classes?.cell),
|
|
93
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltipMark, {
|
|
94
|
+
color: color,
|
|
95
|
+
className: classes?.mark
|
|
96
|
+
})
|
|
97
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltipCell, {
|
|
98
|
+
className: (0, _clsx.default)(classes?.labelCell, classes?.cell),
|
|
99
|
+
children: seriesLabel
|
|
100
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltipCell, {
|
|
101
|
+
className: (0, _clsx.default)(classes?.valueCell, classes?.cell),
|
|
102
|
+
children: formattedValue
|
|
103
|
+
})]
|
|
104
|
+
})
|
|
105
|
+
})]
|
|
106
|
+
})
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
process.env.NODE_ENV !== "production" ? DefaultHeatmapTooltipContent.propTypes = {
|
|
110
|
+
// ----------------------------- Warning --------------------------------
|
|
111
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
112
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
113
|
+
// ----------------------------------------------------------------------
|
|
114
|
+
/**
|
|
115
|
+
* Override or extend the styles applied to the component.
|
|
116
|
+
*/
|
|
117
|
+
classes: _propTypes.default.object
|
|
118
|
+
} : void 0;
|
|
119
|
+
function HeatmapTooltip(props) {
|
|
120
|
+
const classes = useUtilityClasses({
|
|
121
|
+
classes: props.classes
|
|
122
|
+
});
|
|
123
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltipContainer, (0, _extends2.default)({}, props, {
|
|
124
|
+
classes: classes,
|
|
125
|
+
trigger: "item",
|
|
126
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DefaultHeatmapTooltipContent, {
|
|
127
|
+
classes: classes
|
|
128
|
+
})
|
|
129
|
+
}));
|
|
130
|
+
}
|
|
131
|
+
process.env.NODE_ENV !== "production" ? HeatmapTooltip.propTypes = {
|
|
132
|
+
// ----------------------------- Warning --------------------------------
|
|
133
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
134
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
135
|
+
// ----------------------------------------------------------------------
|
|
136
|
+
/**
|
|
137
|
+
* An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),
|
|
138
|
+
* or a function that returns either.
|
|
139
|
+
* It's used to set the position of the popper.
|
|
140
|
+
* The return value will passed as the reference object of the Popper instance.
|
|
141
|
+
*/
|
|
142
|
+
anchorEl: _propTypes.default.oneOfType([(props, propName) => {
|
|
143
|
+
if (props[propName] == null) {
|
|
144
|
+
return new Error(`Prop '${propName}' is required but wasn't specified`);
|
|
145
|
+
}
|
|
146
|
+
if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
147
|
+
return new Error(`Expected prop '${propName}' to be of type Element`);
|
|
148
|
+
}
|
|
149
|
+
return null;
|
|
150
|
+
}, _propTypes.default.func, _propTypes.default.shape({
|
|
151
|
+
contextElement: (props, propName) => {
|
|
152
|
+
if (props[propName] == null) {
|
|
153
|
+
return null;
|
|
154
|
+
}
|
|
155
|
+
if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
156
|
+
return new Error(`Expected prop '${propName}' to be of type Element`);
|
|
157
|
+
}
|
|
158
|
+
return null;
|
|
159
|
+
},
|
|
160
|
+
getBoundingClientRect: _propTypes.default.func.isRequired
|
|
161
|
+
})]),
|
|
162
|
+
/**
|
|
163
|
+
* Override or extend the styles applied to the component.
|
|
164
|
+
*/
|
|
165
|
+
classes: _propTypes.default.object,
|
|
166
|
+
/**
|
|
167
|
+
* The component used for the root node.
|
|
168
|
+
* Either a string to use a HTML element or a component.
|
|
169
|
+
*/
|
|
170
|
+
component: _propTypes.default.elementType,
|
|
171
|
+
/**
|
|
172
|
+
* The components used for each slot inside the Popper.
|
|
173
|
+
* Either a string to use a HTML element or a component.
|
|
174
|
+
* @default {}
|
|
175
|
+
*/
|
|
176
|
+
components: _propTypes.default.shape({
|
|
177
|
+
Root: _propTypes.default.elementType
|
|
178
|
+
}),
|
|
179
|
+
/**
|
|
180
|
+
* The props used for each slot inside the Popper.
|
|
181
|
+
* @default {}
|
|
182
|
+
*/
|
|
183
|
+
componentsProps: _propTypes.default.shape({
|
|
184
|
+
root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
|
|
185
|
+
}),
|
|
186
|
+
/**
|
|
187
|
+
* An HTML element or function that returns one.
|
|
188
|
+
* The `container` will have the portal children appended to it.
|
|
189
|
+
*
|
|
190
|
+
* You can also provide a callback, which is called in a React layout effect.
|
|
191
|
+
* This lets you set the container from a ref, and also makes server-side rendering possible.
|
|
192
|
+
*
|
|
193
|
+
* By default, it uses the body of the top-level document object,
|
|
194
|
+
* so it's simply `document.body` most of the time.
|
|
195
|
+
*/
|
|
196
|
+
container: _propTypes.default.oneOfType([(props, propName) => {
|
|
197
|
+
if (props[propName] == null) {
|
|
198
|
+
return new Error(`Prop '${propName}' is required but wasn't specified`);
|
|
199
|
+
}
|
|
200
|
+
if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
201
|
+
return new Error(`Expected prop '${propName}' to be of type Element`);
|
|
202
|
+
}
|
|
203
|
+
return null;
|
|
204
|
+
}, _propTypes.default.func]),
|
|
205
|
+
/**
|
|
206
|
+
* The `children` will be under the DOM hierarchy of the parent component.
|
|
207
|
+
* @default false
|
|
208
|
+
*/
|
|
209
|
+
disablePortal: _propTypes.default.bool,
|
|
210
|
+
/**
|
|
211
|
+
* Always keep the children in the DOM.
|
|
212
|
+
* This prop can be useful in SEO situation or
|
|
213
|
+
* when you want to maximize the responsiveness of the Popper.
|
|
214
|
+
* @default false
|
|
215
|
+
*/
|
|
216
|
+
keepMounted: _propTypes.default.bool,
|
|
217
|
+
/**
|
|
218
|
+
* Popper.js is based on a "plugin-like" architecture,
|
|
219
|
+
* most of its features are fully encapsulated "modifiers".
|
|
220
|
+
*
|
|
221
|
+
* A modifier is a function that is called each time Popper.js needs to
|
|
222
|
+
* compute the position of the popper.
|
|
223
|
+
* For this reason, modifiers should be very performant to avoid bottlenecks.
|
|
224
|
+
* To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).
|
|
225
|
+
*/
|
|
226
|
+
modifiers: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
227
|
+
data: _propTypes.default.object,
|
|
228
|
+
effect: _propTypes.default.func,
|
|
229
|
+
enabled: _propTypes.default.bool,
|
|
230
|
+
fn: _propTypes.default.func,
|
|
231
|
+
name: _propTypes.default.any,
|
|
232
|
+
options: _propTypes.default.object,
|
|
233
|
+
phase: _propTypes.default.oneOf(['afterMain', 'afterRead', 'afterWrite', 'beforeMain', 'beforeRead', 'beforeWrite', 'main', 'read', 'write']),
|
|
234
|
+
requires: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
235
|
+
requiresIfExists: _propTypes.default.arrayOf(_propTypes.default.string)
|
|
236
|
+
})),
|
|
237
|
+
/**
|
|
238
|
+
* If `true`, the component is shown.
|
|
239
|
+
*/
|
|
240
|
+
open: _propTypes.default.bool,
|
|
241
|
+
/**
|
|
242
|
+
* Popper placement.
|
|
243
|
+
* @default 'bottom'
|
|
244
|
+
*/
|
|
245
|
+
placement: _propTypes.default.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),
|
|
246
|
+
/**
|
|
247
|
+
* Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.
|
|
248
|
+
* @default {}
|
|
249
|
+
*/
|
|
250
|
+
popperOptions: _propTypes.default.shape({
|
|
251
|
+
modifiers: _propTypes.default.array,
|
|
252
|
+
onFirstUpdate: _propTypes.default.func,
|
|
253
|
+
placement: _propTypes.default.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),
|
|
254
|
+
strategy: _propTypes.default.oneOf(['absolute', 'fixed'])
|
|
255
|
+
}),
|
|
256
|
+
/**
|
|
257
|
+
* A ref that points to the used popper instance.
|
|
258
|
+
*/
|
|
259
|
+
popperRef: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.shape({
|
|
260
|
+
current: _propTypes.default.shape({
|
|
261
|
+
destroy: _propTypes.default.func.isRequired,
|
|
262
|
+
forceUpdate: _propTypes.default.func.isRequired,
|
|
263
|
+
setOptions: _propTypes.default.func.isRequired,
|
|
264
|
+
state: _propTypes.default.shape({
|
|
265
|
+
attributes: _propTypes.default.object.isRequired,
|
|
266
|
+
elements: _propTypes.default.object.isRequired,
|
|
267
|
+
modifiersData: _propTypes.default.object.isRequired,
|
|
268
|
+
options: _propTypes.default.object.isRequired,
|
|
269
|
+
orderedModifiers: _propTypes.default.arrayOf(_propTypes.default.object).isRequired,
|
|
270
|
+
placement: _propTypes.default.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']).isRequired,
|
|
271
|
+
rects: _propTypes.default.object.isRequired,
|
|
272
|
+
reset: _propTypes.default.bool.isRequired,
|
|
273
|
+
scrollParents: _propTypes.default.object.isRequired,
|
|
274
|
+
strategy: _propTypes.default.oneOf(['absolute', 'fixed']).isRequired,
|
|
275
|
+
styles: _propTypes.default.object.isRequired
|
|
276
|
+
}).isRequired,
|
|
277
|
+
update: _propTypes.default.func.isRequired
|
|
278
|
+
})
|
|
279
|
+
})]),
|
|
280
|
+
/**
|
|
281
|
+
* The props used for each slot inside the Popper.
|
|
282
|
+
* @default {}
|
|
283
|
+
*/
|
|
284
|
+
slotProps: _propTypes.default.object,
|
|
285
|
+
/**
|
|
286
|
+
* The components used for each slot inside the Popper.
|
|
287
|
+
* Either a string to use a HTML element or a component.
|
|
288
|
+
* @default {}
|
|
289
|
+
*/
|
|
290
|
+
slots: _propTypes.default.object,
|
|
291
|
+
/**
|
|
292
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
293
|
+
*/
|
|
294
|
+
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]),
|
|
295
|
+
/**
|
|
296
|
+
* Help supporting a react-transition-group/Transition component.
|
|
297
|
+
* @default false
|
|
298
|
+
*/
|
|
299
|
+
transition: _propTypes.default.bool
|
|
300
|
+
} : void 0;
|
package/node/Heatmap/index.js
CHANGED
|
@@ -21,15 +21,15 @@ Object.defineProperty(exports, "HeatmapPlot", {
|
|
|
21
21
|
});
|
|
22
22
|
var _Heatmap = require("./Heatmap");
|
|
23
23
|
var _HeatmapPlot = require("./HeatmapPlot");
|
|
24
|
-
var
|
|
25
|
-
Object.keys(
|
|
24
|
+
var _HeatmapTooltip = require("./HeatmapTooltip");
|
|
25
|
+
Object.keys(_HeatmapTooltip).forEach(function (key) {
|
|
26
26
|
if (key === "default" || key === "__esModule") return;
|
|
27
27
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
28
|
-
if (key in exports && exports[key] ===
|
|
28
|
+
if (key in exports && exports[key] === _HeatmapTooltip[key]) return;
|
|
29
29
|
Object.defineProperty(exports, key, {
|
|
30
30
|
enumerable: true,
|
|
31
31
|
get: function () {
|
|
32
|
-
return
|
|
32
|
+
return _HeatmapTooltip[key];
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
35
|
});
|
|
@@ -172,9 +172,9 @@ const LineChartPro = exports.LineChartPro = /*#__PURE__*/React.forwardRef(functi
|
|
|
172
172
|
axisHighlightProps,
|
|
173
173
|
lineHighlightPlotProps,
|
|
174
174
|
legendProps,
|
|
175
|
-
tooltipProps,
|
|
176
175
|
children
|
|
177
176
|
} = (0, _internals.useLineChartProps)(other);
|
|
177
|
+
const Tooltip = props.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
|
|
178
178
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartContainerPro.ChartContainerPro, (0, _extends2.default)({
|
|
179
179
|
ref: ref
|
|
180
180
|
}, chartContainerProps, {
|
|
@@ -185,7 +185,7 @@ const LineChartPro = exports.LineChartPro = /*#__PURE__*/React.forwardRef(functi
|
|
|
185
185
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, (0, _extends2.default)({}, chartsAxisProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
186
186
|
"data-drawing-container": true,
|
|
187
187
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(MarkPlotZoom, (0, _extends2.default)({}, markPlotProps))
|
|
188
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LineChart.LineHighlightPlot, (0, _extends2.default)({}, lineHighlightPlotProps)), !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), !props.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
188
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LineChart.LineHighlightPlot, (0, _extends2.default)({}, lineHighlightPlotProps)), !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), !props.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({}, props.slotProps?.tooltip)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, (0, _extends2.default)({}, clipPathProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ZoomSetup.ZoomSetup, {}), children]
|
|
189
189
|
}));
|
|
190
190
|
});
|
|
191
191
|
process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
@@ -195,7 +195,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
195
195
|
// ----------------------------------------------------------------------
|
|
196
196
|
/**
|
|
197
197
|
* The configuration of axes highlight.
|
|
198
|
-
* @see See {@link https://mui.com/x/react-charts/highlighting highlighting docs} for more details.
|
|
198
|
+
* @see See {@link https://mui.com/x/react-charts/highlighting/ highlighting docs} for more details.
|
|
199
199
|
* @default { x: 'line' }
|
|
200
200
|
*/
|
|
201
201
|
axisHighlight: _propTypes.default.shape({
|
|
@@ -310,16 +310,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
310
310
|
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
311
311
|
*/
|
|
312
312
|
onZoomChange: _propTypes.default.func,
|
|
313
|
-
/**
|
|
314
|
-
* The chart will try to wait for the parent container to resolve its size
|
|
315
|
-
* before it renders for the first time.
|
|
316
|
-
*
|
|
317
|
-
* This can be useful in some scenarios where the chart appear to grow after
|
|
318
|
-
* the first render, like when used inside a grid.
|
|
319
|
-
*
|
|
320
|
-
* @default false
|
|
321
|
-
*/
|
|
322
|
-
resolveSizeBeforeRender: _propTypes.default.bool,
|
|
323
313
|
/**
|
|
324
314
|
* Indicate which axis to display the right of the charts.
|
|
325
315
|
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
@@ -348,31 +338,12 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
348
338
|
slots: _propTypes.default.object,
|
|
349
339
|
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]),
|
|
350
340
|
title: _propTypes.default.string,
|
|
351
|
-
/**
|
|
352
|
-
* The configuration of the tooltip.
|
|
353
|
-
* @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
|
|
354
|
-
* @default { trigger: 'item' }
|
|
355
|
-
*/
|
|
356
|
-
tooltip: _propTypes.default.shape({
|
|
357
|
-
axisContent: _propTypes.default.elementType,
|
|
358
|
-
classes: _propTypes.default.object,
|
|
359
|
-
itemContent: _propTypes.default.elementType,
|
|
360
|
-
slotProps: _propTypes.default.object,
|
|
361
|
-
slots: _propTypes.default.object,
|
|
362
|
-
trigger: _propTypes.default.oneOf(['axis', 'item', 'none'])
|
|
363
|
-
}),
|
|
364
341
|
/**
|
|
365
342
|
* Indicate which axis to display the top of the charts.
|
|
366
343
|
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
367
344
|
* @default null
|
|
368
345
|
*/
|
|
369
346
|
topAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
370
|
-
viewBox: _propTypes.default.shape({
|
|
371
|
-
height: _propTypes.default.number,
|
|
372
|
-
width: _propTypes.default.number,
|
|
373
|
-
x: _propTypes.default.number,
|
|
374
|
-
y: _propTypes.default.number
|
|
375
|
-
}),
|
|
376
347
|
/**
|
|
377
348
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
378
349
|
*/
|