@mui/x-charts-pro 8.0.0-alpha.0 → 8.0.0-alpha.2
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 -35
- package/CHANGELOG.md +651 -6
- package/ChartContainerPro/ChartContainerPro.js +7 -25
- package/ChartContainerPro/useChartContainerProProps.d.ts +2 -39
- package/ChartContainerPro/useChartContainerProProps.js +4 -4
- package/Heatmap/Heatmap.d.ts +11 -4
- package/Heatmap/Heatmap.js +4 -39
- package/Heatmap/HeatmapTooltip.d.ts +9 -0
- package/Heatmap/HeatmapTooltip.js +272 -0
- package/Heatmap/heatmapClasses.js +2 -1
- package/Heatmap/index.d.ts +1 -1
- package/Heatmap/index.js +1 -1
- package/LineChartPro/LineChartPro.js +3 -36
- package/README.md +2 -2
- package/ScatterChartPro/ScatterChartPro.js +3 -36
- package/context/CartesianProviderPro/createAxisFilterMapper.d.ts +2 -1
- package/context/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
- package/context/ChartDataProviderPro/ChartDataProviderPro.js +20 -268
- 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 +2 -2
- package/modern/BarChartPro/BarChartPro.js +3 -35
- package/modern/ChartContainerPro/ChartContainerPro.js +7 -25
- package/modern/ChartContainerPro/useChartContainerProProps.js +4 -4
- package/modern/Heatmap/Heatmap.js +4 -39
- package/modern/Heatmap/HeatmapTooltip.js +272 -0
- package/modern/Heatmap/heatmapClasses.js +2 -1
- package/modern/Heatmap/index.js +1 -1
- package/modern/LineChartPro/LineChartPro.js +3 -36
- package/modern/ScatterChartPro/ScatterChartPro.js +3 -36
- package/modern/context/ChartDataProviderPro/ChartDataProviderPro.js +20 -268
- package/modern/context/ChartDataProviderPro/useChartDataProviderProProps.js +6 -6
- package/modern/index.js +1 -1
- package/modern/internals/utils/releaseInfo.js +2 -2
- package/node/BarChartPro/BarChartPro.js +3 -35
- package/node/ChartContainerPro/ChartContainerPro.js +7 -25
- package/node/ChartContainerPro/useChartContainerProProps.js +4 -4
- package/node/Heatmap/Heatmap.js +4 -39
- package/node/Heatmap/HeatmapTooltip.js +278 -0
- package/node/Heatmap/heatmapClasses.js +5 -4
- package/node/Heatmap/index.js +4 -4
- package/node/LineChartPro/LineChartPro.js +3 -36
- package/node/ScatterChartPro/ScatterChartPro.js +3 -36
- package/node/context/ChartDataProviderPro/ChartDataProviderPro.js +19 -267
- package/node/context/ChartDataProviderPro/useChartDataProviderProProps.js +6 -6
- package/node/index.js +1 -1
- package/node/internals/utils/releaseInfo.js +4 -3
- 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
|
@@ -99,9 +99,9 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps,
|
|
|
99
99
|
chartsAxisProps,
|
|
100
100
|
axisHighlightProps,
|
|
101
101
|
legendProps,
|
|
102
|
-
tooltipProps,
|
|
103
102
|
children
|
|
104
103
|
} = useBarChartProps(other);
|
|
104
|
+
const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
|
|
105
105
|
return /*#__PURE__*/_jsxs(ChartContainerPro, _extends({
|
|
106
106
|
ref: ref
|
|
107
107
|
}, chartContainerProps, {
|
|
@@ -109,7 +109,7 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps,
|
|
|
109
109
|
onZoomChange: onZoomChange,
|
|
110
110
|
children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
|
|
111
111
|
children: [/*#__PURE__*/_jsx(BarChartPlotZoom, _extends({}, barPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
|
|
112
|
-
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), !props.loading && /*#__PURE__*/_jsx(
|
|
112
|
+
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
|
|
113
113
|
}));
|
|
114
114
|
});
|
|
115
115
|
process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
@@ -121,7 +121,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
121
121
|
* The configuration of axes highlight.
|
|
122
122
|
* Default is set to 'band' in the bar direction.
|
|
123
123
|
* Depends on `layout` prop.
|
|
124
|
-
* @see See {@link https://mui.com/x/react-charts/highlighting highlighting docs} for more details.
|
|
124
|
+
* @see See {@link https://mui.com/x/react-charts/highlighting/ highlighting docs} for more details.
|
|
125
125
|
*/
|
|
126
126
|
axisHighlight: PropTypes.shape({
|
|
127
127
|
x: PropTypes.oneOf(['band', 'line', 'none']),
|
|
@@ -238,16 +238,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
238
238
|
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
239
239
|
*/
|
|
240
240
|
onZoomChange: PropTypes.func,
|
|
241
|
-
/**
|
|
242
|
-
* The chart will try to wait for the parent container to resolve its size
|
|
243
|
-
* before it renders for the first time.
|
|
244
|
-
*
|
|
245
|
-
* This can be useful in some scenarios where the chart appear to grow after
|
|
246
|
-
* the first render, like when used inside a grid.
|
|
247
|
-
*
|
|
248
|
-
* @default false
|
|
249
|
-
*/
|
|
250
|
-
resolveSizeBeforeRender: PropTypes.bool,
|
|
251
241
|
/**
|
|
252
242
|
* Indicate which axis to display the right of the charts.
|
|
253
243
|
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
@@ -276,30 +266,12 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
276
266
|
slots: PropTypes.object,
|
|
277
267
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
278
268
|
title: PropTypes.string,
|
|
279
|
-
/**
|
|
280
|
-
* The configuration of the tooltip.
|
|
281
|
-
* @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
|
|
282
|
-
*/
|
|
283
|
-
tooltip: PropTypes.shape({
|
|
284
|
-
axisContent: PropTypes.elementType,
|
|
285
|
-
classes: PropTypes.object,
|
|
286
|
-
itemContent: PropTypes.elementType,
|
|
287
|
-
slotProps: PropTypes.object,
|
|
288
|
-
slots: PropTypes.object,
|
|
289
|
-
trigger: PropTypes.oneOf(['axis', 'item', 'none'])
|
|
290
|
-
}),
|
|
291
269
|
/**
|
|
292
270
|
* Indicate which axis to display the top of the charts.
|
|
293
271
|
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
294
272
|
* @default null
|
|
295
273
|
*/
|
|
296
274
|
topAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
297
|
-
viewBox: PropTypes.shape({
|
|
298
|
-
height: PropTypes.number,
|
|
299
|
-
width: PropTypes.number,
|
|
300
|
-
x: PropTypes.number,
|
|
301
|
-
y: PropTypes.number
|
|
302
|
-
}),
|
|
303
275
|
/**
|
|
304
276
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
305
277
|
*/
|
|
@@ -335,7 +307,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
335
307
|
hideTooltip: PropTypes.bool,
|
|
336
308
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
337
309
|
label: PropTypes.string,
|
|
338
|
-
labelFontSize: PropTypes.number,
|
|
339
310
|
labelStyle: PropTypes.object,
|
|
340
311
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
341
312
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -346,7 +317,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
346
317
|
slots: PropTypes.object,
|
|
347
318
|
stroke: PropTypes.string,
|
|
348
319
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
349
|
-
tickFontSize: PropTypes.number,
|
|
350
320
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
351
321
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
352
322
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -398,7 +368,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
398
368
|
hideTooltip: PropTypes.bool,
|
|
399
369
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
400
370
|
label: PropTypes.string,
|
|
401
|
-
labelFontSize: PropTypes.number,
|
|
402
371
|
labelStyle: PropTypes.object,
|
|
403
372
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
404
373
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -409,7 +378,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
409
378
|
slots: PropTypes.object,
|
|
410
379
|
stroke: PropTypes.string,
|
|
411
380
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
412
|
-
tickFontSize: PropTypes.number,
|
|
413
381
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
414
382
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
415
383
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|