@mui/x-charts-pro 7.0.0-alpha.2 → 7.0.0-beta.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/BarChartPro/BarChartPro.js +47 -54
- package/BarChartPro/index.js +1 -1
- package/CHANGELOG.md +167 -1
- package/ChartContainerPro/ChartContainerPro.js +4 -4
- package/ChartContainerPro/index.js +1 -1
- package/Heatmap/DefaultHeatmapTooltip.js +1 -1
- package/Heatmap/Heatmap.js +11 -6
- package/Heatmap/HeatmapItem.js +1 -1
- package/Heatmap/HeatmapPlot.js +2 -2
- package/Heatmap/index.js +4 -4
- package/Heatmap/plugin.js +3 -3
- package/LineChartPro/LineChartPro.js +63 -112
- package/LineChartPro/index.js +1 -1
- package/ResponsiveChartContainerPro/ResponsiveChartContainerPro.js +3 -3
- package/ResponsiveChartContainerPro/index.js +1 -1
- package/ScatterChartPro/ScatterChartPro.js +20 -4
- package/ScatterChartPro/index.js +1 -1
- package/context/CartesianProviderPro/CartesianProviderPro.js +2 -2
- package/context/CartesianProviderPro/createAxisFilterMapper.js +1 -2
- package/context/CartesianProviderPro/index.js +1 -1
- package/context/ZoomProvider/ZoomProvider.js +3 -3
- package/context/ZoomProvider/ZoomSetup.js +2 -2
- package/context/ZoomProvider/index.js +3 -3
- package/context/ZoomProvider/useSetupPan.js +1 -1
- package/context/ZoomProvider/useSetupZoom.js +1 -1
- package/context/ZoomProvider/useZoom.js +1 -1
- package/context/index.js +2 -2
- package/hooks/index.js +1 -1
- package/index.js +9 -9
- package/internals/utils/releaseInfo.js +1 -1
- package/models/index.js +1 -1
- package/models/seriesType/index.js +1 -1
- package/modern/BarChartPro/BarChartPro.js +47 -54
- package/modern/BarChartPro/index.js +1 -1
- package/modern/ChartContainerPro/ChartContainerPro.js +4 -4
- package/modern/ChartContainerPro/index.js +1 -1
- package/modern/Heatmap/DefaultHeatmapTooltip.js +1 -1
- package/modern/Heatmap/Heatmap.js +11 -6
- package/modern/Heatmap/HeatmapItem.js +1 -1
- package/modern/Heatmap/HeatmapPlot.js +2 -2
- package/modern/Heatmap/index.js +4 -4
- package/modern/Heatmap/plugin.js +3 -3
- package/modern/LineChartPro/LineChartPro.js +63 -112
- package/modern/LineChartPro/index.js +1 -1
- package/modern/ResponsiveChartContainerPro/ResponsiveChartContainerPro.js +3 -3
- package/modern/ResponsiveChartContainerPro/index.js +1 -1
- package/modern/ScatterChartPro/ScatterChartPro.js +20 -4
- package/modern/ScatterChartPro/index.js +1 -1
- package/modern/context/CartesianProviderPro/CartesianProviderPro.js +2 -2
- package/modern/context/CartesianProviderPro/createAxisFilterMapper.js +1 -2
- package/modern/context/CartesianProviderPro/index.js +1 -1
- package/modern/context/ZoomProvider/ZoomProvider.js +3 -3
- package/modern/context/ZoomProvider/ZoomSetup.js +2 -2
- package/modern/context/ZoomProvider/index.js +3 -3
- package/modern/context/ZoomProvider/useSetupPan.js +1 -1
- package/modern/context/ZoomProvider/useSetupZoom.js +1 -1
- package/modern/context/ZoomProvider/useZoom.js +1 -1
- package/modern/context/index.js +2 -2
- package/modern/hooks/index.js +1 -1
- package/modern/index.js +9 -9
- package/modern/internals/utils/releaseInfo.js +1 -1
- package/modern/models/index.js +1 -1
- package/modern/models/seriesType/index.js +1 -1
- package/modern/themeAugmentation/index.js +0 -0
- package/modern/typeOverloads/index.js +1 -1
- package/node/BarChartPro/BarChartPro.js +46 -54
- package/node/ChartContainerPro/ChartContainerPro.js +2 -3
- package/node/ChartContainerPro/useChartContainerProProps.js +1 -1
- package/node/Heatmap/DefaultHeatmapTooltip.js +3 -4
- package/node/Heatmap/Heatmap.js +9 -5
- package/node/Heatmap/HeatmapItem.js +2 -3
- package/node/Heatmap/HeatmapPlot.js +2 -3
- package/node/Heatmap/formatter.js +1 -1
- package/node/Heatmap/heatmapClasses.js +1 -1
- package/node/Heatmap/plugin.js +1 -1
- package/node/LineChartPro/LineChartPro.js +62 -112
- package/node/ResponsiveChartContainerPro/ResponsiveChartContainerPro.js +2 -3
- package/node/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.js +1 -1
- package/node/ScatterChartPro/ScatterChartPro.js +20 -5
- package/node/context/CartesianProviderPro/CartesianProviderPro.js +2 -3
- package/node/context/CartesianProviderPro/createAxisFilterMapper.js +1 -2
- package/node/context/ZoomProvider/ZoomContext.js +1 -2
- package/node/context/ZoomProvider/ZoomProvider.js +2 -3
- package/node/context/ZoomProvider/defaultizeZoom.js +1 -1
- package/node/context/ZoomProvider/useSetupPan.js +2 -3
- package/node/context/ZoomProvider/useSetupZoom.js +1 -2
- package/node/context/ZoomProvider/useZoom.js +1 -2
- package/node/hooks/useSeries.js +1 -2
- package/node/index.js +1 -1
- package/node/internals/utils/releaseInfo.js +1 -1
- package/node/themeAugmentation/index.js +1 -0
- package/package.json +8 -7
- package/themeAugmentation/components.d.ts +25 -0
- package/themeAugmentation/index.d.ts +4 -0
- package/themeAugmentation/index.js +0 -0
- package/themeAugmentation/overrides.d.ts +13 -0
- package/themeAugmentation/package.json +6 -0
- package/themeAugmentation/props.d.ts +22 -0
- package/typeOverloads/index.js +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
const _excluded = ["zoom", "onZoomChange"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
+
import { useThemeProps } from '@mui/material/styles';
|
|
6
7
|
import { BarPlot } from '@mui/x-charts/BarChart';
|
|
7
8
|
import { ChartsOnAxisClickHandler } from '@mui/x-charts/ChartsOnAxisClickHandler';
|
|
8
9
|
import { ChartsGrid } from '@mui/x-charts/ChartsGrid';
|
|
@@ -13,10 +14,18 @@ import { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight';
|
|
|
13
14
|
import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
|
|
14
15
|
import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
|
|
15
16
|
import { useBarChartProps } from '@mui/x-charts/internals';
|
|
16
|
-
import { ResponsiveChartContainerPro } from
|
|
17
|
-
import { ZoomSetup } from
|
|
18
|
-
import { useZoom } from
|
|
17
|
+
import { ResponsiveChartContainerPro } from "../ResponsiveChartContainerPro/index.js";
|
|
18
|
+
import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
|
|
19
|
+
import { useZoom } from "../context/ZoomProvider/useZoom.js";
|
|
19
20
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
|
+
function BarChartPlotZoom(props) {
|
|
22
|
+
const {
|
|
23
|
+
isInteracting
|
|
24
|
+
} = useZoom();
|
|
25
|
+
return /*#__PURE__*/_jsx(BarPlot, _extends({}, props, {
|
|
26
|
+
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
20
29
|
/**
|
|
21
30
|
* Demos:
|
|
22
31
|
*
|
|
@@ -28,7 +37,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
28
37
|
*
|
|
29
38
|
* - [BarChart API](https://mui.com/x/api/charts/bar-chart/)
|
|
30
39
|
*/
|
|
31
|
-
const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(
|
|
40
|
+
const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps, ref) {
|
|
41
|
+
const props = useThemeProps({
|
|
42
|
+
props: inProps,
|
|
43
|
+
name: 'MuiBarChartPro'
|
|
44
|
+
});
|
|
32
45
|
const {
|
|
33
46
|
zoom,
|
|
34
47
|
onZoomChange
|
|
@@ -53,7 +66,7 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(props, re
|
|
|
53
66
|
}, chartContainerProps, {
|
|
54
67
|
zoom: zoom,
|
|
55
68
|
onZoomChange: onZoomChange,
|
|
56
|
-
children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)),
|
|
69
|
+
children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
|
|
57
70
|
children: [/*#__PURE__*/_jsx(BarChartPlotZoom, _extends({}, barPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
|
|
58
71
|
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), !props.loading && /*#__PURE__*/_jsx(ChartsTooltip, _extends({}, tooltipProps)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
|
|
59
72
|
}));
|
|
@@ -145,6 +158,17 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
145
158
|
classes: PropTypes.object,
|
|
146
159
|
direction: PropTypes.oneOf(['column', 'row']),
|
|
147
160
|
hidden: PropTypes.bool,
|
|
161
|
+
itemGap: PropTypes.number,
|
|
162
|
+
itemMarkHeight: PropTypes.number,
|
|
163
|
+
itemMarkWidth: PropTypes.number,
|
|
164
|
+
labelStyle: PropTypes.object,
|
|
165
|
+
markGap: PropTypes.number,
|
|
166
|
+
padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
167
|
+
bottom: PropTypes.number,
|
|
168
|
+
left: PropTypes.number,
|
|
169
|
+
right: PropTypes.number,
|
|
170
|
+
top: PropTypes.number
|
|
171
|
+
})]),
|
|
148
172
|
position: PropTypes.shape({
|
|
149
173
|
horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
|
|
150
174
|
vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
@@ -188,6 +212,12 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
188
212
|
* @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
|
|
189
213
|
*/
|
|
190
214
|
onItemClick: PropTypes.func,
|
|
215
|
+
/**
|
|
216
|
+
* Callback fired when the zoom has changed.
|
|
217
|
+
*
|
|
218
|
+
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
219
|
+
*/
|
|
220
|
+
onZoomChange: PropTypes.func,
|
|
191
221
|
/**
|
|
192
222
|
* Indicate which axis to display the right of the charts.
|
|
193
223
|
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
@@ -250,7 +280,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
250
280
|
* An array of [[AxisConfig]] objects.
|
|
251
281
|
*/
|
|
252
282
|
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
253
|
-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
254
283
|
classes: PropTypes.object,
|
|
255
284
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
256
285
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
@@ -285,6 +314,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
285
314
|
slotProps: PropTypes.object,
|
|
286
315
|
slots: PropTypes.object,
|
|
287
316
|
stroke: PropTypes.string,
|
|
317
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
288
318
|
tickFontSize: PropTypes.number,
|
|
289
319
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
290
320
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -297,6 +327,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
297
327
|
tickSize: PropTypes.number,
|
|
298
328
|
valueFormatter: PropTypes.func,
|
|
299
329
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
330
|
+
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
300
331
|
maxEnd: PropTypes.number,
|
|
301
332
|
maxSpan: PropTypes.number,
|
|
302
333
|
minSpan: PropTypes.number,
|
|
@@ -311,7 +342,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
311
342
|
* An array of [[AxisConfig]] objects.
|
|
312
343
|
*/
|
|
313
344
|
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
314
|
-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
315
345
|
classes: PropTypes.object,
|
|
316
346
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
317
347
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
@@ -346,6 +376,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
346
376
|
slotProps: PropTypes.object,
|
|
347
377
|
slots: PropTypes.object,
|
|
348
378
|
stroke: PropTypes.string,
|
|
379
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
349
380
|
tickFontSize: PropTypes.number,
|
|
350
381
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
351
382
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -358,6 +389,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
358
389
|
tickSize: PropTypes.number,
|
|
359
390
|
valueFormatter: PropTypes.func,
|
|
360
391
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
392
|
+
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
361
393
|
maxEnd: PropTypes.number,
|
|
362
394
|
maxSpan: PropTypes.number,
|
|
363
395
|
minSpan: PropTypes.number,
|
|
@@ -365,53 +397,14 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
365
397
|
panning: PropTypes.bool,
|
|
366
398
|
step: PropTypes.number
|
|
367
399
|
}), PropTypes.bool])
|
|
368
|
-
}))
|
|
369
|
-
} : void 0;
|
|
370
|
-
function BarChartPlotZoom(props) {
|
|
371
|
-
const {
|
|
372
|
-
isInteracting
|
|
373
|
-
} = useZoom();
|
|
374
|
-
return /*#__PURE__*/_jsx(BarPlot, _extends({}, props, {
|
|
375
|
-
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
376
|
-
}));
|
|
377
|
-
}
|
|
378
|
-
process.env.NODE_ENV !== "production" ? BarChartPlotZoom.propTypes = {
|
|
379
|
-
// ----------------------------- Warning --------------------------------
|
|
380
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
381
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
382
|
-
// ----------------------------------------------------------------------
|
|
383
|
-
/**
|
|
384
|
-
* If provided, the function will be used to format the label of the bar.
|
|
385
|
-
* It can be set to 'value' to display the current value.
|
|
386
|
-
* @param {BarItem} item The item to format.
|
|
387
|
-
* @param {BarLabelContext} context data about the bar.
|
|
388
|
-
* @returns {string} The formatted label.
|
|
389
|
-
*/
|
|
390
|
-
barLabel: PropTypes.oneOfType([PropTypes.oneOf(['value']), PropTypes.func]),
|
|
391
|
-
/**
|
|
392
|
-
* Defines the border radius of the bar element.
|
|
393
|
-
*/
|
|
394
|
-
borderRadius: PropTypes.number,
|
|
395
|
-
/**
|
|
396
|
-
* Callback fired when a bar item is clicked.
|
|
397
|
-
* @param {React.MouseEvent<SVGElement, MouseEvent>} event The event source of the callback.
|
|
398
|
-
* @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
|
|
399
|
-
*/
|
|
400
|
-
onItemClick: PropTypes.func,
|
|
401
|
-
/**
|
|
402
|
-
* If `true`, animations are skipped.
|
|
403
|
-
* @default false
|
|
404
|
-
*/
|
|
405
|
-
skipAnimation: PropTypes.bool,
|
|
406
|
-
/**
|
|
407
|
-
* The props used for each component slot.
|
|
408
|
-
* @default {}
|
|
409
|
-
*/
|
|
410
|
-
slotProps: PropTypes.object,
|
|
400
|
+
})),
|
|
411
401
|
/**
|
|
412
|
-
*
|
|
413
|
-
* @default {}
|
|
402
|
+
* The list of zoom data related to each axis.
|
|
414
403
|
*/
|
|
415
|
-
|
|
404
|
+
zoom: PropTypes.arrayOf(PropTypes.shape({
|
|
405
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
406
|
+
end: PropTypes.number.isRequired,
|
|
407
|
+
start: PropTypes.number.isRequired
|
|
408
|
+
}))
|
|
416
409
|
} : void 0;
|
|
417
410
|
export { BarChartPro };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./BarChartPro.js";
|
|
@@ -5,10 +5,10 @@ import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
|
|
|
5
5
|
import { HighlightedProvider, ZAxisContextProvider } from '@mui/x-charts/context';
|
|
6
6
|
import { ChartsAxesGradients, DrawingProvider, InteractionProvider, PluginProvider, SeriesProvider } from '@mui/x-charts/internals';
|
|
7
7
|
import { useLicenseVerifier } from '@mui/x-license/useLicenseVerifier';
|
|
8
|
-
import { getReleaseInfo } from
|
|
9
|
-
import { CartesianProviderPro } from
|
|
10
|
-
import { ZoomProvider } from
|
|
11
|
-
import { useChartContainerProProps } from
|
|
8
|
+
import { getReleaseInfo } from "../internals/utils/releaseInfo.js";
|
|
9
|
+
import { CartesianProviderPro } from "../context/CartesianProviderPro/index.js";
|
|
10
|
+
import { ZoomProvider } from "../context/ZoomProvider/index.js";
|
|
11
|
+
import { useChartContainerProProps } from "./useChartContainerProProps.js";
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
const releaseInfo = getReleaseInfo();
|
|
14
14
|
const ChartContainerPro = /*#__PURE__*/React.forwardRef(function ChartContainer(props, ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./ChartContainerPro.js";
|
|
@@ -89,7 +89,7 @@ process.env.NODE_ENV !== "production" ? DefaultHeatmapTooltip.propTypes = {
|
|
|
89
89
|
type: PropTypes.oneOf(['heatmap']).isRequired
|
|
90
90
|
}).isRequired,
|
|
91
91
|
/**
|
|
92
|
-
* The series linked to the triggered
|
|
92
|
+
* The series linked to the triggered item.
|
|
93
93
|
*/
|
|
94
94
|
series: PropTypes.object.isRequired,
|
|
95
95
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import {
|
|
4
|
+
import { useThemeProps } from '@mui/material/styles';
|
|
5
5
|
import useId from '@mui/utils/useId';
|
|
6
|
+
import { interpolateRgbBasis } from '@mui/x-charts-vendor/d3-interpolate';
|
|
6
7
|
import { ChartsAxis } from '@mui/x-charts/ChartsAxis';
|
|
7
8
|
import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
|
|
8
9
|
import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
|
|
9
10
|
import { ChartsOnAxisClickHandler } from '@mui/x-charts/ChartsOnAxisClickHandler';
|
|
10
11
|
import { ChartsOverlay } from '@mui/x-charts/ChartsOverlay';
|
|
11
|
-
import { ResponsiveChartContainerPro } from
|
|
12
|
-
import { HeatmapPlot } from
|
|
13
|
-
import { plugin as heatmapPlugin } from
|
|
14
|
-
import { DefaultHeatmapTooltip } from
|
|
12
|
+
import { ResponsiveChartContainerPro } from "../ResponsiveChartContainerPro/index.js";
|
|
13
|
+
import { HeatmapPlot } from "./HeatmapPlot.js";
|
|
14
|
+
import { plugin as heatmapPlugin } from "./plugin.js";
|
|
15
|
+
import { DefaultHeatmapTooltip } from "./DefaultHeatmapTooltip.js";
|
|
15
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
17
|
// The GnBu: https://github.com/d3/d3-scale-chromatic/blob/main/src/sequential-multi/GnBu.js
|
|
17
18
|
const defaultColorMap = interpolateRgbBasis(['#f7fcf0', '#e0f3db', '#ccebc5', '#a8ddb5', '#7bccc4', '#4eb3d3', '#2b8cbe', '#0868ac', '#084081']);
|
|
18
|
-
const Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap(
|
|
19
|
+
const Heatmap = /*#__PURE__*/React.forwardRef(function Heatmap(inProps, ref) {
|
|
20
|
+
const props = useThemeProps({
|
|
21
|
+
props: inProps,
|
|
22
|
+
name: 'MuiHeatmap'
|
|
23
|
+
});
|
|
19
24
|
const {
|
|
20
25
|
xAxis,
|
|
21
26
|
yAxis,
|
|
@@ -8,7 +8,7 @@ import useSlotProps from '@mui/utils/useSlotProps';
|
|
|
8
8
|
import composeClasses from '@mui/utils/composeClasses';
|
|
9
9
|
import { useItemHighlighted } from '@mui/x-charts/context';
|
|
10
10
|
import { useInteractionItemProps } from '@mui/x-charts/internals';
|
|
11
|
-
import { getHeatmapUtilityClass } from
|
|
11
|
+
import { getHeatmapUtilityClass } from "./heatmapClasses.js";
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
const HeatmapCell = styled('rect', {
|
|
14
14
|
name: 'MuiHeatmap',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { useXScale, useYScale, useZColorScale } from '@mui/x-charts/hooks';
|
|
4
|
-
import { useHeatmapSeries } from
|
|
5
|
-
import { HeatmapItem } from
|
|
4
|
+
import { useHeatmapSeries } from "../hooks/useSeries.js";
|
|
5
|
+
import { HeatmapItem } from "./HeatmapItem.js";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
function HeatmapPlot(props) {
|
|
8
8
|
const xScale = useXScale();
|
package/modern/Heatmap/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Heatmap } from
|
|
2
|
-
export { HeatmapPlot } from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export { Heatmap } from "./Heatmap.js";
|
|
2
|
+
export { HeatmapPlot } from "./HeatmapPlot.js";
|
|
3
|
+
export * from "./DefaultHeatmapTooltip.js";
|
|
4
|
+
export * from "./heatmapClasses.js";
|
package/modern/Heatmap/plugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getBaseExtremum } from
|
|
2
|
-
import formatter from
|
|
3
|
-
import getColor from
|
|
1
|
+
import { getBaseExtremum } from "./extremums.js";
|
|
2
|
+
import formatter from "./formatter.js";
|
|
3
|
+
import getColor from "./getColor.js";
|
|
4
4
|
export const plugin = {
|
|
5
5
|
seriesType: 'heatmap',
|
|
6
6
|
seriesFormatter: formatter,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
const _excluded = ["zoom", "onZoomChange"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
+
import { useThemeProps } from '@mui/material/styles';
|
|
6
7
|
import { AreaPlot, LineHighlightPlot, LinePlot, MarkPlot } from '@mui/x-charts/LineChart';
|
|
7
8
|
import { ChartsOnAxisClickHandler } from '@mui/x-charts/ChartsOnAxisClickHandler';
|
|
8
9
|
import { ChartsGrid } from '@mui/x-charts/ChartsGrid';
|
|
@@ -13,10 +14,34 @@ import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
|
|
|
13
14
|
import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
|
|
14
15
|
import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
|
|
15
16
|
import { useLineChartProps } from '@mui/x-charts/internals';
|
|
16
|
-
import { ResponsiveChartContainerPro } from
|
|
17
|
-
import { ZoomSetup } from
|
|
18
|
-
import { useZoom } from
|
|
17
|
+
import { ResponsiveChartContainerPro } from "../ResponsiveChartContainerPro/index.js";
|
|
18
|
+
import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
|
|
19
|
+
import { useZoom } from "../context/ZoomProvider/useZoom.js";
|
|
19
20
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
|
+
function AreaPlotZoom(props) {
|
|
22
|
+
const {
|
|
23
|
+
isInteracting
|
|
24
|
+
} = useZoom();
|
|
25
|
+
return /*#__PURE__*/_jsx(AreaPlot, _extends({}, props, {
|
|
26
|
+
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
function LinePlotZoom(props) {
|
|
30
|
+
const {
|
|
31
|
+
isInteracting
|
|
32
|
+
} = useZoom();
|
|
33
|
+
return /*#__PURE__*/_jsx(LinePlot, _extends({}, props, {
|
|
34
|
+
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
function MarkPlotZoom(props) {
|
|
38
|
+
const {
|
|
39
|
+
isInteracting
|
|
40
|
+
} = useZoom();
|
|
41
|
+
return /*#__PURE__*/_jsx(MarkPlot, _extends({}, props, {
|
|
42
|
+
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
20
45
|
/**
|
|
21
46
|
* Demos:
|
|
22
47
|
*
|
|
@@ -27,7 +52,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
27
52
|
*
|
|
28
53
|
* - [LineChart API](https://mui.com/x/api/charts/line-chart/)
|
|
29
54
|
*/
|
|
30
|
-
const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(
|
|
55
|
+
const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps, ref) {
|
|
56
|
+
const props = useThemeProps({
|
|
57
|
+
props: inProps,
|
|
58
|
+
name: 'MuiLineChartPro'
|
|
59
|
+
});
|
|
31
60
|
const {
|
|
32
61
|
zoom,
|
|
33
62
|
onZoomChange
|
|
@@ -55,7 +84,7 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(props,
|
|
|
55
84
|
}, chartContainerProps, {
|
|
56
85
|
zoom: zoom,
|
|
57
86
|
onZoomChange: onZoomChange,
|
|
58
|
-
children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)),
|
|
87
|
+
children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
|
|
59
88
|
children: [/*#__PURE__*/_jsx(AreaPlotZoom, _extends({}, areaPlotProps)), /*#__PURE__*/_jsx(LinePlotZoom, _extends({}, linePlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
|
|
60
89
|
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx("g", {
|
|
61
90
|
"data-drawing-container": true,
|
|
@@ -136,6 +165,17 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
136
165
|
classes: PropTypes.object,
|
|
137
166
|
direction: PropTypes.oneOf(['column', 'row']),
|
|
138
167
|
hidden: PropTypes.bool,
|
|
168
|
+
itemGap: PropTypes.number,
|
|
169
|
+
itemMarkHeight: PropTypes.number,
|
|
170
|
+
itemMarkWidth: PropTypes.number,
|
|
171
|
+
labelStyle: PropTypes.object,
|
|
172
|
+
markGap: PropTypes.number,
|
|
173
|
+
padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
174
|
+
bottom: PropTypes.number,
|
|
175
|
+
left: PropTypes.number,
|
|
176
|
+
right: PropTypes.number,
|
|
177
|
+
top: PropTypes.number
|
|
178
|
+
})]),
|
|
139
179
|
position: PropTypes.shape({
|
|
140
180
|
horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
|
|
141
181
|
vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
@@ -185,6 +225,12 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
185
225
|
* Callback fired when a mark element is clicked.
|
|
186
226
|
*/
|
|
187
227
|
onMarkClick: PropTypes.func,
|
|
228
|
+
/**
|
|
229
|
+
* Callback fired when the zoom has changed.
|
|
230
|
+
*
|
|
231
|
+
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
232
|
+
*/
|
|
233
|
+
onZoomChange: PropTypes.func,
|
|
188
234
|
/**
|
|
189
235
|
* Indicate which axis to display the right of the charts.
|
|
190
236
|
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
@@ -248,7 +294,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
248
294
|
* An array of [[AxisConfig]] objects.
|
|
249
295
|
*/
|
|
250
296
|
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
251
|
-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
252
297
|
classes: PropTypes.object,
|
|
253
298
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
254
299
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
@@ -283,6 +328,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
283
328
|
slotProps: PropTypes.object,
|
|
284
329
|
slots: PropTypes.object,
|
|
285
330
|
stroke: PropTypes.string,
|
|
331
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
286
332
|
tickFontSize: PropTypes.number,
|
|
287
333
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
288
334
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -295,6 +341,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
295
341
|
tickSize: PropTypes.number,
|
|
296
342
|
valueFormatter: PropTypes.func,
|
|
297
343
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
344
|
+
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
298
345
|
maxEnd: PropTypes.number,
|
|
299
346
|
maxSpan: PropTypes.number,
|
|
300
347
|
minSpan: PropTypes.number,
|
|
@@ -309,7 +356,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
309
356
|
* An array of [[AxisConfig]] objects.
|
|
310
357
|
*/
|
|
311
358
|
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
312
|
-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
313
359
|
classes: PropTypes.object,
|
|
314
360
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
315
361
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
@@ -344,6 +390,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
344
390
|
slotProps: PropTypes.object,
|
|
345
391
|
slots: PropTypes.object,
|
|
346
392
|
stroke: PropTypes.string,
|
|
393
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
347
394
|
tickFontSize: PropTypes.number,
|
|
348
395
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
349
396
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
@@ -356,6 +403,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
356
403
|
tickSize: PropTypes.number,
|
|
357
404
|
valueFormatter: PropTypes.func,
|
|
358
405
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
406
|
+
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
359
407
|
maxEnd: PropTypes.number,
|
|
360
408
|
maxSpan: PropTypes.number,
|
|
361
409
|
minSpan: PropTypes.number,
|
|
@@ -363,111 +411,14 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
363
411
|
panning: PropTypes.bool,
|
|
364
412
|
step: PropTypes.number
|
|
365
413
|
}), PropTypes.bool])
|
|
366
|
-
}))
|
|
367
|
-
} : void 0;
|
|
368
|
-
function MarkPlotZoom(props) {
|
|
369
|
-
const {
|
|
370
|
-
isInteracting
|
|
371
|
-
} = useZoom();
|
|
372
|
-
return /*#__PURE__*/_jsx(MarkPlot, _extends({}, props, {
|
|
373
|
-
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
374
|
-
}));
|
|
375
|
-
}
|
|
376
|
-
process.env.NODE_ENV !== "production" ? MarkPlotZoom.propTypes = {
|
|
377
|
-
// ----------------------------- Warning --------------------------------
|
|
378
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
379
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
380
|
-
// ----------------------------------------------------------------------
|
|
381
|
-
/**
|
|
382
|
-
* Callback fired when a line mark item is clicked.
|
|
383
|
-
* @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
|
|
384
|
-
* @param {LineItemIdentifier} lineItemIdentifier The line mark item identifier.
|
|
385
|
-
*/
|
|
386
|
-
onItemClick: PropTypes.func,
|
|
387
|
-
/**
|
|
388
|
-
* If `true`, animations are skipped.
|
|
389
|
-
* @default false
|
|
390
|
-
*/
|
|
391
|
-
skipAnimation: PropTypes.bool,
|
|
392
|
-
/**
|
|
393
|
-
* The props used for each component slot.
|
|
394
|
-
* @default {}
|
|
395
|
-
*/
|
|
396
|
-
slotProps: PropTypes.object,
|
|
397
|
-
/**
|
|
398
|
-
* Overridable component slots.
|
|
399
|
-
* @default {}
|
|
400
|
-
*/
|
|
401
|
-
slots: PropTypes.object
|
|
402
|
-
} : void 0;
|
|
403
|
-
function LinePlotZoom(props) {
|
|
404
|
-
const {
|
|
405
|
-
isInteracting
|
|
406
|
-
} = useZoom();
|
|
407
|
-
return /*#__PURE__*/_jsx(LinePlot, _extends({}, props, {
|
|
408
|
-
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
409
|
-
}));
|
|
410
|
-
}
|
|
411
|
-
process.env.NODE_ENV !== "production" ? LinePlotZoom.propTypes = {
|
|
412
|
-
// ----------------------------- Warning --------------------------------
|
|
413
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
414
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
415
|
-
// ----------------------------------------------------------------------
|
|
416
|
-
/**
|
|
417
|
-
* Callback fired when a line item is clicked.
|
|
418
|
-
* @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
|
|
419
|
-
* @param {LineItemIdentifier} lineItemIdentifier The line item identifier.
|
|
420
|
-
*/
|
|
421
|
-
onItemClick: PropTypes.func,
|
|
422
|
-
/**
|
|
423
|
-
* If `true`, animations are skipped.
|
|
424
|
-
* @default false
|
|
425
|
-
*/
|
|
426
|
-
skipAnimation: PropTypes.bool,
|
|
427
|
-
/**
|
|
428
|
-
* The props used for each component slot.
|
|
429
|
-
* @default {}
|
|
430
|
-
*/
|
|
431
|
-
slotProps: PropTypes.object,
|
|
432
|
-
/**
|
|
433
|
-
* Overridable component slots.
|
|
434
|
-
* @default {}
|
|
435
|
-
*/
|
|
436
|
-
slots: PropTypes.object
|
|
437
|
-
} : void 0;
|
|
438
|
-
function AreaPlotZoom(props) {
|
|
439
|
-
const {
|
|
440
|
-
isInteracting
|
|
441
|
-
} = useZoom();
|
|
442
|
-
return /*#__PURE__*/_jsx(AreaPlot, _extends({}, props, {
|
|
443
|
-
skipAnimation: isInteracting ? true : props.skipAnimation
|
|
444
|
-
}));
|
|
445
|
-
}
|
|
446
|
-
process.env.NODE_ENV !== "production" ? AreaPlotZoom.propTypes = {
|
|
447
|
-
// ----------------------------- Warning --------------------------------
|
|
448
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
449
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
450
|
-
// ----------------------------------------------------------------------
|
|
451
|
-
/**
|
|
452
|
-
* Callback fired when a line area item is clicked.
|
|
453
|
-
* @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
|
|
454
|
-
* @param {LineItemIdentifier} lineItemIdentifier The line item identifier.
|
|
455
|
-
*/
|
|
456
|
-
onItemClick: PropTypes.func,
|
|
457
|
-
/**
|
|
458
|
-
* If `true`, animations are skipped.
|
|
459
|
-
* @default false
|
|
460
|
-
*/
|
|
461
|
-
skipAnimation: PropTypes.bool,
|
|
462
|
-
/**
|
|
463
|
-
* The props used for each component slot.
|
|
464
|
-
* @default {}
|
|
465
|
-
*/
|
|
466
|
-
slotProps: PropTypes.object,
|
|
414
|
+
})),
|
|
467
415
|
/**
|
|
468
|
-
*
|
|
469
|
-
* @default {}
|
|
416
|
+
* The list of zoom data related to each axis.
|
|
470
417
|
*/
|
|
471
|
-
|
|
418
|
+
zoom: PropTypes.arrayOf(PropTypes.shape({
|
|
419
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
420
|
+
end: PropTypes.number.isRequired,
|
|
421
|
+
start: PropTypes.number.isRequired
|
|
422
|
+
}))
|
|
472
423
|
} : void 0;
|
|
473
424
|
export { LineChartPro };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./LineChartPro.js";
|
|
@@ -3,9 +3,9 @@ import * as React from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { Watermark } from '@mui/x-license/Watermark';
|
|
5
5
|
import { ResizableContainer } from '@mui/x-charts/internals';
|
|
6
|
-
import { getReleaseInfo } from
|
|
7
|
-
import { ChartContainerPro } from
|
|
8
|
-
import { useResponsiveChartContainerProProps } from
|
|
6
|
+
import { getReleaseInfo } from "../internals/utils/releaseInfo.js";
|
|
7
|
+
import { ChartContainerPro } from "../ChartContainerPro/index.js";
|
|
8
|
+
import { useResponsiveChartContainerProProps } from "./useResponsiveChartContainerProProps.js";
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
const releaseInfo = getReleaseInfo();
|
|
11
11
|
const ResponsiveChartContainerPro = /*#__PURE__*/React.forwardRef(function ResponsiveChartContainerPro(props, ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./ResponsiveChartContainerPro.js";
|
|
@@ -3,6 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["zoom", "onZoomChange"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
+
import { useThemeProps } from '@mui/material/styles';
|
|
6
7
|
import { ChartsOverlay } from '@mui/x-charts/ChartsOverlay';
|
|
7
8
|
import { ScatterPlot } from '@mui/x-charts/ScatterChart';
|
|
8
9
|
import { ZAxisContextProvider } from '@mui/x-charts/context';
|
|
@@ -13,8 +14,8 @@ import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
|
|
|
13
14
|
import { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight';
|
|
14
15
|
import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
|
|
15
16
|
import { useScatterChartProps } from '@mui/x-charts/internals';
|
|
16
|
-
import { ResponsiveChartContainerPro } from
|
|
17
|
-
import { ZoomSetup } from
|
|
17
|
+
import { ResponsiveChartContainerPro } from "../ResponsiveChartContainerPro/index.js";
|
|
18
|
+
import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
|
|
18
19
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
20
|
/**
|
|
20
21
|
* Demos:
|
|
@@ -26,7 +27,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
26
27
|
*
|
|
27
28
|
* - [ScatterChart API](https://mui.com/x/api/charts/scatter-chart/)
|
|
28
29
|
*/
|
|
29
|
-
const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(
|
|
30
|
+
const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(inProps, ref) {
|
|
31
|
+
const props = useThemeProps({
|
|
32
|
+
props: inProps,
|
|
33
|
+
name: 'MuiScatterChartPro'
|
|
34
|
+
});
|
|
30
35
|
const {
|
|
31
36
|
zoom,
|
|
32
37
|
onZoomChange
|
|
@@ -51,7 +56,7 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(p
|
|
|
51
56
|
zoom: zoom,
|
|
52
57
|
onZoomChange: onZoomChange,
|
|
53
58
|
children: /*#__PURE__*/_jsxs(ZAxisContextProvider, _extends({}, zAxisProps, {
|
|
54
|
-
children: [!props.disableVoronoi && /*#__PURE__*/_jsx(ChartsVoronoiHandler, _extends({}, voronoiHandlerProps)), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)),
|
|
59
|
+
children: [!props.disableVoronoi && /*#__PURE__*/_jsx(ChartsVoronoiHandler, _extends({}, voronoiHandlerProps)), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsx("g", {
|
|
55
60
|
"data-drawing-container": true,
|
|
56
61
|
children: /*#__PURE__*/_jsx(ScatterPlot, _extends({}, scatterPlotProps))
|
|
57
62
|
}), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps)), !props.loading && /*#__PURE__*/_jsx(ChartsTooltip, _extends({}, tooltipProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
|
|
@@ -132,6 +137,17 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
132
137
|
classes: PropTypes.object,
|
|
133
138
|
direction: PropTypes.oneOf(['column', 'row']),
|
|
134
139
|
hidden: PropTypes.bool,
|
|
140
|
+
itemGap: PropTypes.number,
|
|
141
|
+
itemMarkHeight: PropTypes.number,
|
|
142
|
+
itemMarkWidth: PropTypes.number,
|
|
143
|
+
labelStyle: PropTypes.object,
|
|
144
|
+
markGap: PropTypes.number,
|
|
145
|
+
padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
146
|
+
bottom: PropTypes.number,
|
|
147
|
+
left: PropTypes.number,
|
|
148
|
+
right: PropTypes.number,
|
|
149
|
+
top: PropTypes.number
|
|
150
|
+
})]),
|
|
135
151
|
position: PropTypes.shape({
|
|
136
152
|
horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
|
|
137
153
|
vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./ScatterChartPro.js";
|