@mui/x-charts-pro 8.0.0-alpha.0 → 8.0.0-alpha.10
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.d.ts +2 -2
- package/BarChartPro/BarChartPro.js +74 -61
- package/CHANGELOG.md +2215 -119
- package/ChartContainerPro/ChartContainerPro.d.ts +33 -4
- package/ChartContainerPro/ChartContainerPro.js +59 -51
- package/ChartContainerPro/useChartContainerProProps.d.ts +7 -43
- package/ChartContainerPro/useChartContainerProProps.js +15 -9
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +37 -0
- package/{context/ChartDataProviderPro → ChartDataProviderPro}/ChartDataProviderPro.js +71 -80
- package/{context → ChartDataProviderPro}/package.json +1 -1
- package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +8 -0
- package/ChartDataProviderPro/useChartDataProviderProProps.js +15 -0
- package/Heatmap/Heatmap.d.ts +11 -4
- package/Heatmap/Heatmap.js +35 -43
- package/Heatmap/HeatmapItem.js +1 -1
- package/Heatmap/HeatmapTooltip.d.ts +9 -0
- package/Heatmap/HeatmapTooltip.js +274 -0
- package/Heatmap/extremums.d.ts +2 -2
- package/Heatmap/formatter.d.ts +2 -2
- package/Heatmap/formatter.js +2 -1
- package/Heatmap/heatmapClasses.js +2 -1
- package/Heatmap/index.d.ts +1 -1
- package/Heatmap/index.js +1 -1
- package/Heatmap/plugin.d.ts +2 -2
- package/Heatmap/plugin.js +4 -2
- package/Heatmap/tooltip.d.ts +3 -0
- package/Heatmap/tooltip.js +25 -0
- package/LineChartPro/LineChartPro.d.ts +2 -2
- package/LineChartPro/LineChartPro.js +80 -82
- package/README.md +3 -3
- package/ScatterChartPro/ScatterChartPro.d.ts +2 -2
- package/ScatterChartPro/ScatterChartPro.js +51 -64
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +2 -1
- package/hooks/useSeries.d.ts +2 -4
- package/hooks/zoom/index.d.ts +1 -0
- package/hooks/zoom/index.js +1 -0
- package/hooks/zoom/useIsZoomInteracting.d.ts +6 -0
- package/hooks/zoom/useIsZoomInteracting.js +14 -0
- package/index.d.ts +3 -1
- package/index.js +5 -5
- package/internals/plugins/allPlugins.d.ts +11 -0
- package/internals/plugins/allPlugins.js +5 -0
- package/internals/plugins/useChartProZoom/creatZoomLookup.d.ts +3 -0
- package/internals/plugins/useChartProZoom/creatZoomLookup.js +12 -0
- package/internals/plugins/useChartProZoom/defaultizeZoom.d.ts +2 -0
- package/internals/plugins/useChartProZoom/defaultizeZoom.js +25 -0
- package/internals/plugins/useChartProZoom/index.d.ts +3 -0
- package/internals/plugins/useChartProZoom/index.js +3 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.d.ts +3 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.js +303 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +377 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +10 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +50 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +45 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.utils.js +126 -0
- package/internals/plugins/useChartProZoom/zoom.types.d.ts +53 -0
- package/internals/utils/releaseInfo.js +2 -2
- package/models/index.d.ts +1 -0
- package/models/index.js +2 -1
- package/modern/BarChartPro/BarChartPro.js +74 -61
- package/modern/ChartContainerPro/ChartContainerPro.js +59 -51
- package/modern/ChartContainerPro/useChartContainerProProps.js +15 -9
- package/modern/{context/ChartDataProviderPro → ChartDataProviderPro}/ChartDataProviderPro.js +71 -80
- package/modern/ChartDataProviderPro/useChartDataProviderProProps.js +15 -0
- package/modern/Heatmap/Heatmap.js +35 -43
- package/modern/Heatmap/HeatmapItem.js +1 -1
- package/modern/Heatmap/HeatmapTooltip.js +274 -0
- package/modern/Heatmap/formatter.js +2 -1
- package/modern/Heatmap/heatmapClasses.js +2 -1
- package/modern/Heatmap/index.js +1 -1
- package/modern/Heatmap/plugin.js +4 -2
- package/modern/Heatmap/tooltip.js +25 -0
- package/modern/LineChartPro/LineChartPro.js +80 -82
- package/modern/ScatterChartPro/ScatterChartPro.js +51 -64
- package/modern/hooks/index.js +2 -1
- package/modern/hooks/zoom/index.js +1 -0
- package/modern/hooks/zoom/useIsZoomInteracting.js +14 -0
- package/modern/index.js +5 -5
- package/modern/internals/plugins/allPlugins.js +5 -0
- package/modern/internals/plugins/useChartProZoom/creatZoomLookup.js +12 -0
- package/modern/internals/plugins/useChartProZoom/defaultizeZoom.js +25 -0
- package/modern/internals/plugins/useChartProZoom/index.js +3 -0
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.js +303 -0
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +10 -0
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.js +1 -0
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.js +126 -0
- package/modern/internals/plugins/useChartProZoom/zoom.types.js +1 -0
- package/modern/internals/utils/releaseInfo.js +2 -2
- package/modern/models/index.js +2 -1
- package/node/BarChartPro/BarChartPro.js +73 -60
- package/node/ChartContainerPro/ChartContainerPro.js +58 -50
- package/node/ChartContainerPro/useChartContainerProProps.js +15 -9
- package/node/{context/ChartDataProviderPro → ChartDataProviderPro}/ChartDataProviderPro.js +70 -79
- package/node/ChartDataProviderPro/useChartDataProviderProProps.js +21 -0
- package/node/Heatmap/Heatmap.js +35 -43
- package/node/Heatmap/HeatmapItem.js +2 -2
- package/node/Heatmap/HeatmapTooltip.js +280 -0
- package/node/Heatmap/formatter.js +2 -1
- package/node/Heatmap/heatmapClasses.js +5 -4
- package/node/Heatmap/index.js +4 -4
- package/node/Heatmap/plugin.js +4 -2
- package/node/Heatmap/tooltip.js +31 -0
- package/node/LineChartPro/LineChartPro.js +79 -81
- package/node/ScatterChartPro/ScatterChartPro.js +50 -63
- package/node/hooks/index.js +16 -1
- package/node/{context/CartesianProviderPro → hooks/zoom}/index.js +4 -4
- package/node/hooks/zoom/useIsZoomInteracting.js +19 -0
- package/node/index.js +34 -12
- package/node/internals/plugins/allPlugins.js +11 -0
- package/node/internals/plugins/useChartProZoom/creatZoomLookup.js +19 -0
- package/node/internals/plugins/useChartProZoom/defaultizeZoom.js +33 -0
- package/node/internals/plugins/useChartProZoom/index.js +38 -0
- package/node/internals/plugins/useChartProZoom/useChartProZoom.js +310 -0
- package/node/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +18 -0
- package/node/internals/plugins/useChartProZoom/useChartProZoom.utils.js +140 -0
- package/node/internals/plugins/useChartProZoom/zoom.types.js +5 -0
- package/node/internals/utils/releaseInfo.js +4 -3
- package/package.json +8 -8
- package/typeOverloads/modules.d.ts +8 -1
- package/Heatmap/DefaultHeatmapTooltip.d.ts +0 -7
- package/Heatmap/DefaultHeatmapTooltip.js +0 -99
- package/context/CartesianProviderPro/CartesianProviderPro.d.ts +0 -6
- package/context/CartesianProviderPro/CartesianProviderPro.js +0 -89
- package/context/CartesianProviderPro/createAxisFilterMapper.d.ts +0 -12
- package/context/CartesianProviderPro/createAxisFilterMapper.js +0 -60
- package/context/CartesianProviderPro/index.d.ts +0 -1
- package/context/CartesianProviderPro/index.js +0 -1
- package/context/ChartDataProviderPro/ChartDataProviderPro.d.ts +0 -7
- package/context/ChartDataProviderPro/useChartDataProviderProProps.d.ts +0 -16
- package/context/ChartDataProviderPro/useChartDataProviderProProps.js +0 -43
- package/context/ZoomProvider/Zoom.types.d.ts +0 -144
- package/context/ZoomProvider/ZoomContext.d.ts +0 -4
- package/context/ZoomProvider/ZoomContext.js +0 -16
- package/context/ZoomProvider/ZoomProvider.d.ts +0 -3
- package/context/ZoomProvider/ZoomProvider.js +0 -56
- package/context/ZoomProvider/ZoomSetup.d.ts +0 -9
- package/context/ZoomProvider/ZoomSetup.js +0 -16
- package/context/ZoomProvider/defaultizeZoom.d.ts +0 -2
- package/context/ZoomProvider/defaultizeZoom.js +0 -32
- package/context/ZoomProvider/index.d.ts +0 -3
- package/context/ZoomProvider/index.js +0 -3
- package/context/ZoomProvider/initializeZoomData.d.ts +0 -6
- package/context/ZoomProvider/initializeZoomData.js +0 -13
- package/context/ZoomProvider/useSetupPan.d.ts +0 -1
- package/context/ZoomProvider/useSetupPan.js +0 -106
- package/context/ZoomProvider/useSetupZoom.d.ts +0 -1
- package/context/ZoomProvider/useSetupZoom.js +0 -274
- package/context/ZoomProvider/useZoom.d.ts +0 -7
- package/context/ZoomProvider/useZoom.js +0 -19
- package/context/index.d.ts +0 -3
- package/context/index.js +0 -5
- package/modern/Heatmap/DefaultHeatmapTooltip.js +0 -99
- package/modern/context/CartesianProviderPro/CartesianProviderPro.js +0 -89
- package/modern/context/CartesianProviderPro/createAxisFilterMapper.js +0 -60
- package/modern/context/CartesianProviderPro/index.js +0 -1
- package/modern/context/ChartDataProviderPro/useChartDataProviderProProps.js +0 -43
- package/modern/context/ZoomProvider/ZoomContext.js +0 -16
- package/modern/context/ZoomProvider/ZoomProvider.js +0 -56
- package/modern/context/ZoomProvider/ZoomSetup.js +0 -16
- package/modern/context/ZoomProvider/defaultizeZoom.js +0 -32
- package/modern/context/ZoomProvider/index.js +0 -3
- package/modern/context/ZoomProvider/initializeZoomData.js +0 -13
- package/modern/context/ZoomProvider/useSetupPan.js +0 -106
- package/modern/context/ZoomProvider/useSetupZoom.js +0 -274
- package/modern/context/ZoomProvider/useZoom.js +0 -19
- package/modern/context/index.js +0 -5
- package/node/Heatmap/DefaultHeatmapTooltip.js +0 -105
- package/node/context/CartesianProviderPro/CartesianProviderPro.js +0 -95
- package/node/context/CartesianProviderPro/createAxisFilterMapper.js +0 -68
- package/node/context/ChartDataProviderPro/useChartDataProviderProProps.js +0 -50
- package/node/context/ZoomProvider/ZoomContext.js +0 -23
- package/node/context/ZoomProvider/ZoomProvider.js +0 -63
- package/node/context/ZoomProvider/ZoomSetup.js +0 -20
- package/node/context/ZoomProvider/defaultizeZoom.js +0 -40
- package/node/context/ZoomProvider/index.js +0 -38
- package/node/context/ZoomProvider/initializeZoomData.js +0 -20
- package/node/context/ZoomProvider/useSetupPan.js +0 -114
- package/node/context/ZoomProvider/useSetupZoom.js +0 -281
- package/node/context/ZoomProvider/useZoom.js +0 -25
- package/node/context/index.js +0 -27
- /package/{context/ChartDataProviderPro → ChartDataProviderPro}/index.d.ts +0 -0
- /package/{context/ChartDataProviderPro → ChartDataProviderPro}/index.js +0 -0
- /package/{context/ZoomProvider/Zoom.types.js → internals/plugins/useChartProZoom/useChartProZoom.types.js} +0 -0
- /package/{modern/context/ZoomProvider/Zoom.types.js → internals/plugins/useChartProZoom/zoom.types.js} +0 -0
- /package/modern/{context/ChartDataProviderPro → ChartDataProviderPro}/index.js +0 -0
- /package/node/{context/ChartDataProviderPro → ChartDataProviderPro}/index.js +0 -0
- /package/node/{context/ZoomProvider/Zoom.types.js → internals/plugins/useChartProZoom/useChartProZoom.types.js} +0 -0
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
import HTMLElementType from '@mui/utils/HTMLElementType';
|
|
8
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
9
|
+
import { ChartsTooltipPaper, ChartsTooltipTable, ChartsTooltipRow, ChartsTooltipCell, useItemTooltip, getChartsTooltipUtilityClass, ChartsTooltipContainer } from '@mui/x-charts/ChartsTooltip';
|
|
10
|
+
import { useXAxis, useYAxis } from '@mui/x-charts/hooks';
|
|
11
|
+
import { getLabel, ChartsLabelMark } from '@mui/x-charts/internals';
|
|
12
|
+
import { useHeatmapSeries } from "../hooks/useSeries.js";
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
const useUtilityClasses = ownerState => {
|
|
15
|
+
const {
|
|
16
|
+
classes
|
|
17
|
+
} = ownerState;
|
|
18
|
+
const slots = {
|
|
19
|
+
root: ['root'],
|
|
20
|
+
paper: ['paper'],
|
|
21
|
+
table: ['table'],
|
|
22
|
+
row: ['row'],
|
|
23
|
+
cell: ['cell'],
|
|
24
|
+
mark: ['mark'],
|
|
25
|
+
markCell: ['markCell'],
|
|
26
|
+
labelCell: ['labelCell'],
|
|
27
|
+
valueCell: ['valueCell']
|
|
28
|
+
};
|
|
29
|
+
return composeClasses(slots, getChartsTooltipUtilityClass, classes);
|
|
30
|
+
};
|
|
31
|
+
function DefaultHeatmapTooltipContent(props) {
|
|
32
|
+
const {
|
|
33
|
+
classes
|
|
34
|
+
} = props;
|
|
35
|
+
const xAxis = useXAxis();
|
|
36
|
+
const yAxis = useYAxis();
|
|
37
|
+
const heatmapSeries = useHeatmapSeries();
|
|
38
|
+
const tooltipData = useItemTooltip();
|
|
39
|
+
if (!tooltipData || !heatmapSeries || heatmapSeries.seriesOrder.length === 0) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
const {
|
|
43
|
+
series,
|
|
44
|
+
seriesOrder
|
|
45
|
+
} = heatmapSeries;
|
|
46
|
+
const seriesId = seriesOrder[0];
|
|
47
|
+
const {
|
|
48
|
+
color,
|
|
49
|
+
value,
|
|
50
|
+
identifier,
|
|
51
|
+
markType
|
|
52
|
+
} = tooltipData;
|
|
53
|
+
const [xIndex, yIndex] = value;
|
|
54
|
+
const formattedX = xAxis.valueFormatter?.(xAxis.data[xIndex], {
|
|
55
|
+
location: 'tooltip'
|
|
56
|
+
}) ?? xAxis.data[xIndex].toLocaleString();
|
|
57
|
+
const formattedY = yAxis.valueFormatter?.(yAxis.data[yIndex], {
|
|
58
|
+
location: 'tooltip'
|
|
59
|
+
}) ?? yAxis.data[yIndex].toLocaleString();
|
|
60
|
+
const formattedValue = series[seriesId].valueFormatter(value, {
|
|
61
|
+
dataIndex: identifier.dataIndex
|
|
62
|
+
});
|
|
63
|
+
const seriesLabel = getLabel(series[seriesId].label, 'tooltip');
|
|
64
|
+
return /*#__PURE__*/_jsx(ChartsTooltipPaper, {
|
|
65
|
+
className: classes?.paper,
|
|
66
|
+
children: /*#__PURE__*/_jsxs(ChartsTooltipTable, {
|
|
67
|
+
className: classes?.table,
|
|
68
|
+
children: [/*#__PURE__*/_jsx("thead", {
|
|
69
|
+
children: /*#__PURE__*/_jsxs(ChartsTooltipRow, {
|
|
70
|
+
className: classes?.row,
|
|
71
|
+
children: [/*#__PURE__*/_jsx(ChartsTooltipCell, {
|
|
72
|
+
className: classes?.cell,
|
|
73
|
+
children: formattedX
|
|
74
|
+
}), formattedX && formattedY && /*#__PURE__*/_jsx(ChartsTooltipCell, {}), /*#__PURE__*/_jsx(ChartsTooltipCell, {
|
|
75
|
+
className: classes?.cell,
|
|
76
|
+
children: formattedY
|
|
77
|
+
})]
|
|
78
|
+
})
|
|
79
|
+
}), /*#__PURE__*/_jsx("tbody", {
|
|
80
|
+
children: /*#__PURE__*/_jsxs(ChartsTooltipRow, {
|
|
81
|
+
className: classes?.row,
|
|
82
|
+
children: [/*#__PURE__*/_jsx(ChartsTooltipCell, {
|
|
83
|
+
className: clsx(classes?.markCell, classes?.cell),
|
|
84
|
+
children: /*#__PURE__*/_jsx(ChartsLabelMark, {
|
|
85
|
+
type: markType,
|
|
86
|
+
color: color,
|
|
87
|
+
className: classes?.mark
|
|
88
|
+
})
|
|
89
|
+
}), /*#__PURE__*/_jsx(ChartsTooltipCell, {
|
|
90
|
+
className: clsx(classes?.labelCell, classes?.cell),
|
|
91
|
+
children: seriesLabel
|
|
92
|
+
}), /*#__PURE__*/_jsx(ChartsTooltipCell, {
|
|
93
|
+
className: clsx(classes?.valueCell, classes?.cell),
|
|
94
|
+
children: formattedValue
|
|
95
|
+
})]
|
|
96
|
+
})
|
|
97
|
+
})]
|
|
98
|
+
})
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
process.env.NODE_ENV !== "production" ? DefaultHeatmapTooltipContent.propTypes = {
|
|
102
|
+
// ----------------------------- Warning --------------------------------
|
|
103
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
104
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
105
|
+
// ----------------------------------------------------------------------
|
|
106
|
+
/**
|
|
107
|
+
* Override or extend the styles applied to the component.
|
|
108
|
+
*/
|
|
109
|
+
classes: PropTypes.object
|
|
110
|
+
} : void 0;
|
|
111
|
+
function HeatmapTooltip(props) {
|
|
112
|
+
const classes = useUtilityClasses({
|
|
113
|
+
classes: props.classes
|
|
114
|
+
});
|
|
115
|
+
return /*#__PURE__*/_jsx(ChartsTooltipContainer, _extends({}, props, {
|
|
116
|
+
classes: classes,
|
|
117
|
+
trigger: "item",
|
|
118
|
+
children: /*#__PURE__*/_jsx(DefaultHeatmapTooltipContent, {
|
|
119
|
+
classes: classes
|
|
120
|
+
})
|
|
121
|
+
}));
|
|
122
|
+
}
|
|
123
|
+
process.env.NODE_ENV !== "production" ? HeatmapTooltip.propTypes = {
|
|
124
|
+
// ----------------------------- Warning --------------------------------
|
|
125
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
126
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
127
|
+
// ----------------------------------------------------------------------
|
|
128
|
+
/**
|
|
129
|
+
* An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),
|
|
130
|
+
* or a function that returns either.
|
|
131
|
+
* It's used to set the position of the popper.
|
|
132
|
+
* The return value will passed as the reference object of the Popper instance.
|
|
133
|
+
*/
|
|
134
|
+
anchorEl: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]),
|
|
135
|
+
/**
|
|
136
|
+
* Override or extend the styles applied to the component.
|
|
137
|
+
*/
|
|
138
|
+
classes: PropTypes.object,
|
|
139
|
+
/**
|
|
140
|
+
* The component used for the root node.
|
|
141
|
+
* Either a string to use a HTML element or a component.
|
|
142
|
+
*/
|
|
143
|
+
component: PropTypes.elementType,
|
|
144
|
+
/**
|
|
145
|
+
* The components used for each slot inside the Popper.
|
|
146
|
+
* Either a string to use a HTML element or a component.
|
|
147
|
+
* @default {}
|
|
148
|
+
*/
|
|
149
|
+
components: PropTypes.shape({
|
|
150
|
+
Root: PropTypes.elementType
|
|
151
|
+
}),
|
|
152
|
+
/**
|
|
153
|
+
* The props used for each slot inside the Popper.
|
|
154
|
+
* @default {}
|
|
155
|
+
*/
|
|
156
|
+
componentsProps: PropTypes.shape({
|
|
157
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
158
|
+
}),
|
|
159
|
+
/**
|
|
160
|
+
* An HTML element or function that returns one.
|
|
161
|
+
* The `container` will have the portal children appended to it.
|
|
162
|
+
*
|
|
163
|
+
* You can also provide a callback, which is called in a React layout effect.
|
|
164
|
+
* This lets you set the container from a ref, and also makes server-side rendering possible.
|
|
165
|
+
*
|
|
166
|
+
* By default, it uses the body of the top-level document object,
|
|
167
|
+
* so it's simply `document.body` most of the time.
|
|
168
|
+
*/
|
|
169
|
+
container: PropTypes.oneOfType([(props, propName) => {
|
|
170
|
+
if (props[propName] == null) {
|
|
171
|
+
return new Error(`Prop '${propName}' is required but wasn't specified`);
|
|
172
|
+
}
|
|
173
|
+
if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
174
|
+
return new Error(`Expected prop '${propName}' to be of type Element`);
|
|
175
|
+
}
|
|
176
|
+
return null;
|
|
177
|
+
}, PropTypes.func]),
|
|
178
|
+
/**
|
|
179
|
+
* The `children` will be under the DOM hierarchy of the parent component.
|
|
180
|
+
* @default false
|
|
181
|
+
*/
|
|
182
|
+
disablePortal: PropTypes.bool,
|
|
183
|
+
/**
|
|
184
|
+
* Always keep the children in the DOM.
|
|
185
|
+
* This prop can be useful in SEO situation or
|
|
186
|
+
* when you want to maximize the responsiveness of the Popper.
|
|
187
|
+
* @default false
|
|
188
|
+
*/
|
|
189
|
+
keepMounted: PropTypes.bool,
|
|
190
|
+
/**
|
|
191
|
+
* Popper.js is based on a "plugin-like" architecture,
|
|
192
|
+
* most of its features are fully encapsulated "modifiers".
|
|
193
|
+
*
|
|
194
|
+
* A modifier is a function that is called each time Popper.js needs to
|
|
195
|
+
* compute the position of the popper.
|
|
196
|
+
* For this reason, modifiers should be very performant to avoid bottlenecks.
|
|
197
|
+
* To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).
|
|
198
|
+
*/
|
|
199
|
+
modifiers: PropTypes.arrayOf(PropTypes.shape({
|
|
200
|
+
data: PropTypes.object,
|
|
201
|
+
effect: PropTypes.func,
|
|
202
|
+
enabled: PropTypes.bool,
|
|
203
|
+
fn: PropTypes.func,
|
|
204
|
+
name: PropTypes.any,
|
|
205
|
+
options: PropTypes.object,
|
|
206
|
+
phase: PropTypes.oneOf(['afterMain', 'afterRead', 'afterWrite', 'beforeMain', 'beforeRead', 'beforeWrite', 'main', 'read', 'write']),
|
|
207
|
+
requires: PropTypes.arrayOf(PropTypes.string),
|
|
208
|
+
requiresIfExists: PropTypes.arrayOf(PropTypes.string)
|
|
209
|
+
})),
|
|
210
|
+
/**
|
|
211
|
+
* If `true`, the component is shown.
|
|
212
|
+
*/
|
|
213
|
+
open: PropTypes.bool,
|
|
214
|
+
/**
|
|
215
|
+
* Popper placement.
|
|
216
|
+
* @default 'bottom'
|
|
217
|
+
*/
|
|
218
|
+
placement: PropTypes.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']),
|
|
219
|
+
/**
|
|
220
|
+
* Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.
|
|
221
|
+
* @default {}
|
|
222
|
+
*/
|
|
223
|
+
popperOptions: PropTypes.shape({
|
|
224
|
+
modifiers: PropTypes.array,
|
|
225
|
+
onFirstUpdate: PropTypes.func,
|
|
226
|
+
placement: PropTypes.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']),
|
|
227
|
+
strategy: PropTypes.oneOf(['absolute', 'fixed'])
|
|
228
|
+
}),
|
|
229
|
+
/**
|
|
230
|
+
* A ref that points to the used popper instance.
|
|
231
|
+
*/
|
|
232
|
+
popperRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
233
|
+
current: PropTypes.shape({
|
|
234
|
+
destroy: PropTypes.func.isRequired,
|
|
235
|
+
forceUpdate: PropTypes.func.isRequired,
|
|
236
|
+
setOptions: PropTypes.func.isRequired,
|
|
237
|
+
state: PropTypes.shape({
|
|
238
|
+
attributes: PropTypes.object.isRequired,
|
|
239
|
+
elements: PropTypes.object.isRequired,
|
|
240
|
+
modifiersData: PropTypes.object.isRequired,
|
|
241
|
+
options: PropTypes.object.isRequired,
|
|
242
|
+
orderedModifiers: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
243
|
+
placement: PropTypes.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,
|
|
244
|
+
rects: PropTypes.object.isRequired,
|
|
245
|
+
reset: PropTypes.bool.isRequired,
|
|
246
|
+
scrollParents: PropTypes.object.isRequired,
|
|
247
|
+
strategy: PropTypes.oneOf(['absolute', 'fixed']).isRequired,
|
|
248
|
+
styles: PropTypes.object.isRequired
|
|
249
|
+
}).isRequired,
|
|
250
|
+
update: PropTypes.func.isRequired
|
|
251
|
+
})
|
|
252
|
+
})]),
|
|
253
|
+
/**
|
|
254
|
+
* The props used for each slot inside the Popper.
|
|
255
|
+
* @default {}
|
|
256
|
+
*/
|
|
257
|
+
slotProps: PropTypes.object,
|
|
258
|
+
/**
|
|
259
|
+
* The components used for each slot inside the Popper.
|
|
260
|
+
* Either a string to use a HTML element or a component.
|
|
261
|
+
* @default {}
|
|
262
|
+
*/
|
|
263
|
+
slots: PropTypes.object,
|
|
264
|
+
/**
|
|
265
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
266
|
+
*/
|
|
267
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
268
|
+
/**
|
|
269
|
+
* Help supporting a react-transition-group/Transition component.
|
|
270
|
+
* @default false
|
|
271
|
+
*/
|
|
272
|
+
transition: PropTypes.bool
|
|
273
|
+
} : void 0;
|
|
274
|
+
export { HeatmapTooltip };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import
|
|
2
|
+
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
3
|
+
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
3
4
|
export function getHeatmapUtilityClass(slot) {
|
|
4
5
|
// Those should be common to all charts
|
|
5
6
|
if (['highlighted', 'faded'].includes(slot)) {
|
package/modern/Heatmap/index.js
CHANGED
package/modern/Heatmap/plugin.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { getBaseExtremum } from "./extremums.js";
|
|
2
2
|
import formatter from "./formatter.js";
|
|
3
3
|
import getColor from "./getColor.js";
|
|
4
|
+
import tooltipGetter from "./tooltip.js";
|
|
4
5
|
export const plugin = {
|
|
5
|
-
|
|
6
|
-
seriesFormatter: formatter,
|
|
6
|
+
seriesProcessor: formatter,
|
|
7
7
|
colorProcessor: getColor,
|
|
8
|
+
legendGetter: () => [],
|
|
9
|
+
tooltipGetter,
|
|
8
10
|
xExtremumGetter: getBaseExtremum,
|
|
9
11
|
yExtremumGetter: getBaseExtremum
|
|
10
12
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getLabel } from '@mui/x-charts/internals';
|
|
2
|
+
const tooltipGetter = params => {
|
|
3
|
+
const {
|
|
4
|
+
series,
|
|
5
|
+
getColor,
|
|
6
|
+
identifier
|
|
7
|
+
} = params;
|
|
8
|
+
if (!identifier || identifier.dataIndex === undefined) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
const label = getLabel(series.label, 'tooltip');
|
|
12
|
+
const value = series.data[identifier.dataIndex];
|
|
13
|
+
const formattedValue = series.valueFormatter(value, {
|
|
14
|
+
dataIndex: identifier.dataIndex
|
|
15
|
+
});
|
|
16
|
+
return {
|
|
17
|
+
identifier,
|
|
18
|
+
color: getColor(identifier.dataIndex),
|
|
19
|
+
label,
|
|
20
|
+
value,
|
|
21
|
+
formattedValue,
|
|
22
|
+
markType: series.labelMarkType
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default tooltipGetter;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
|
-
const _excluded = ["
|
|
5
|
+
const _excluded = ["initialZoom", "onZoomChange", "apiRef"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { useThemeProps } from '@mui/material/styles';
|
|
@@ -15,17 +15,16 @@ import { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight';
|
|
|
15
15
|
import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
|
|
16
16
|
import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
|
|
17
17
|
import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
18
|
+
import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
|
|
19
|
+
import { useLineChartProps, ChartsWrapper } from '@mui/x-charts/internals';
|
|
20
|
+
import { useIsZoomInteracting } from "../hooks/zoom/index.js";
|
|
21
|
+
import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
|
|
22
|
+
import { ChartDataProviderPro } from "../ChartDataProviderPro/index.js";
|
|
22
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
24
|
function AreaPlotZoom(props) {
|
|
24
|
-
const
|
|
25
|
-
isInteracting
|
|
26
|
-
} = useZoom();
|
|
25
|
+
const isInteracting = useIsZoomInteracting();
|
|
27
26
|
return /*#__PURE__*/_jsx(AreaPlot, _extends({}, props, {
|
|
28
|
-
skipAnimation: isInteracting ||
|
|
27
|
+
skipAnimation: isInteracting || props.skipAnimation
|
|
29
28
|
}));
|
|
30
29
|
}
|
|
31
30
|
process.env.NODE_ENV !== "production" ? AreaPlotZoom.propTypes = {
|
|
@@ -56,11 +55,9 @@ process.env.NODE_ENV !== "production" ? AreaPlotZoom.propTypes = {
|
|
|
56
55
|
slots: PropTypes.object
|
|
57
56
|
} : void 0;
|
|
58
57
|
function LinePlotZoom(props) {
|
|
59
|
-
const
|
|
60
|
-
isInteracting
|
|
61
|
-
} = useZoom();
|
|
58
|
+
const isInteracting = useIsZoomInteracting();
|
|
62
59
|
return /*#__PURE__*/_jsx(LinePlot, _extends({}, props, {
|
|
63
|
-
skipAnimation: isInteracting ||
|
|
60
|
+
skipAnimation: isInteracting || props.skipAnimation
|
|
64
61
|
}));
|
|
65
62
|
}
|
|
66
63
|
process.env.NODE_ENV !== "production" ? LinePlotZoom.propTypes = {
|
|
@@ -91,9 +88,7 @@ process.env.NODE_ENV !== "production" ? LinePlotZoom.propTypes = {
|
|
|
91
88
|
slots: PropTypes.object
|
|
92
89
|
} : void 0;
|
|
93
90
|
function MarkPlotZoom(props) {
|
|
94
|
-
const
|
|
95
|
-
isInteracting
|
|
96
|
-
} = useZoom();
|
|
91
|
+
const isInteracting = useIsZoomInteracting();
|
|
97
92
|
return /*#__PURE__*/_jsx(MarkPlot, _extends({}, props, {
|
|
98
93
|
skipAnimation: isInteracting || undefined
|
|
99
94
|
}));
|
|
@@ -103,12 +98,6 @@ process.env.NODE_ENV !== "production" ? MarkPlotZoom.propTypes = {
|
|
|
103
98
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
104
99
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
105
100
|
// ----------------------------------------------------------------------
|
|
106
|
-
/**
|
|
107
|
-
* If `true` the mark element will only be able to render circle.
|
|
108
|
-
* Giving fewer customization options, but saving around 40ms per 1.000 marks.
|
|
109
|
-
* @default false
|
|
110
|
-
*/
|
|
111
|
-
experimentalRendering: PropTypes.bool,
|
|
112
101
|
/**
|
|
113
102
|
* Callback fired when a line mark item is clicked.
|
|
114
103
|
* @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
|
|
@@ -147,11 +136,13 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
|
|
|
147
136
|
name: 'MuiLineChartPro'
|
|
148
137
|
});
|
|
149
138
|
const {
|
|
150
|
-
|
|
151
|
-
onZoomChange
|
|
139
|
+
initialZoom,
|
|
140
|
+
onZoomChange,
|
|
141
|
+
apiRef
|
|
152
142
|
} = props,
|
|
153
143
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
154
144
|
const {
|
|
145
|
+
chartsWrapperProps,
|
|
155
146
|
chartContainerProps,
|
|
156
147
|
axisClickHandlerProps,
|
|
157
148
|
gridProps,
|
|
@@ -165,20 +156,28 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
|
|
|
165
156
|
axisHighlightProps,
|
|
166
157
|
lineHighlightPlotProps,
|
|
167
158
|
legendProps,
|
|
168
|
-
tooltipProps,
|
|
169
159
|
children
|
|
170
160
|
} = useLineChartProps(other);
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
161
|
+
const {
|
|
162
|
+
chartDataProviderProProps,
|
|
163
|
+
chartsSurfaceProps
|
|
164
|
+
} = useChartContainerProProps(_extends({}, chartContainerProps, {
|
|
165
|
+
initialZoom,
|
|
166
|
+
onZoomChange,
|
|
167
|
+
apiRef
|
|
168
|
+
}), ref);
|
|
169
|
+
const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
|
|
170
|
+
return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
|
|
171
|
+
children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
|
|
172
|
+
children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
173
|
+
children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
|
|
174
|
+
children: [/*#__PURE__*/_jsx(AreaPlotZoom, _extends({}, areaPlotProps)), /*#__PURE__*/_jsx(LinePlotZoom, _extends({}, linePlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
|
|
175
|
+
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx("g", {
|
|
176
|
+
"data-drawing-container": true,
|
|
177
|
+
children: /*#__PURE__*/_jsx(MarkPlotZoom, _extends({}, markPlotProps))
|
|
178
|
+
}), /*#__PURE__*/_jsx(LineHighlightPlot, _extends({}, lineHighlightPlotProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), children]
|
|
179
|
+
}))]
|
|
180
|
+
}))
|
|
182
181
|
}));
|
|
183
182
|
});
|
|
184
183
|
process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
@@ -186,9 +185,14 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
186
185
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
187
186
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
188
187
|
// ----------------------------------------------------------------------
|
|
188
|
+
apiRef: PropTypes.shape({
|
|
189
|
+
current: PropTypes.shape({
|
|
190
|
+
setZoomData: PropTypes.func.isRequired
|
|
191
|
+
})
|
|
192
|
+
}),
|
|
189
193
|
/**
|
|
190
194
|
* The configuration of axes highlight.
|
|
191
|
-
* @see See {@link https://mui.com/x/react-charts/highlighting highlighting docs} for more details.
|
|
195
|
+
* @see See {@link https://mui.com/x/react-charts/highlighting/ highlighting docs} for more details.
|
|
192
196
|
* @default { x: 'line' }
|
|
193
197
|
*/
|
|
194
198
|
axisHighlight: PropTypes.shape({
|
|
@@ -223,10 +227,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
223
227
|
* If `true`, render the line highlight item.
|
|
224
228
|
*/
|
|
225
229
|
disableLineItemHighlight: PropTypes.bool,
|
|
226
|
-
/**
|
|
227
|
-
* If `true` marks will render `<circle />` instead of `<path />` and drop theme override for faster rendering.
|
|
228
|
-
*/
|
|
229
|
-
experimentalMarkRendering: PropTypes.bool,
|
|
230
230
|
/**
|
|
231
231
|
* Option to display a cartesian grid in the background.
|
|
232
232
|
*/
|
|
@@ -243,12 +243,26 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
243
243
|
*/
|
|
244
244
|
hideLegend: PropTypes.bool,
|
|
245
245
|
/**
|
|
246
|
-
* The
|
|
246
|
+
* The highlighted item.
|
|
247
|
+
* Used when the highlight is controlled.
|
|
247
248
|
*/
|
|
248
249
|
highlightedItem: PropTypes.shape({
|
|
249
250
|
dataIndex: PropTypes.number,
|
|
250
|
-
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
251
|
+
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
|
|
251
252
|
}),
|
|
253
|
+
/**
|
|
254
|
+
* This prop is used to help implement the accessibility logic.
|
|
255
|
+
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
256
|
+
*/
|
|
257
|
+
id: PropTypes.string,
|
|
258
|
+
/**
|
|
259
|
+
* The list of zoom data related to each axis.
|
|
260
|
+
*/
|
|
261
|
+
initialZoom: PropTypes.arrayOf(PropTypes.shape({
|
|
262
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
263
|
+
end: PropTypes.number.isRequired,
|
|
264
|
+
start: PropTypes.number.isRequired
|
|
265
|
+
})),
|
|
252
266
|
/**
|
|
253
267
|
* Indicate which axis to display the left of the charts.
|
|
254
268
|
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
@@ -264,7 +278,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
264
278
|
* The margin between the SVG and the drawing area.
|
|
265
279
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
266
280
|
* Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
267
|
-
* @default object Depends on the charts type.
|
|
268
281
|
*/
|
|
269
282
|
margin: PropTypes.shape({
|
|
270
283
|
bottom: PropTypes.number,
|
|
@@ -303,16 +316,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
303
316
|
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
304
317
|
*/
|
|
305
318
|
onZoomChange: PropTypes.func,
|
|
306
|
-
/**
|
|
307
|
-
* The chart will try to wait for the parent container to resolve its size
|
|
308
|
-
* before it renders for the first time.
|
|
309
|
-
*
|
|
310
|
-
* This can be useful in some scenarios where the chart appear to grow after
|
|
311
|
-
* the first render, like when used inside a grid.
|
|
312
|
-
*
|
|
313
|
-
* @default false
|
|
314
|
-
*/
|
|
315
|
-
resolveSizeBeforeRender: PropTypes.bool,
|
|
316
319
|
/**
|
|
317
320
|
* Indicate which axis to display the right of the charts.
|
|
318
321
|
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
@@ -340,32 +343,14 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
340
343
|
*/
|
|
341
344
|
slots: PropTypes.object,
|
|
342
345
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
346
|
+
theme: PropTypes.oneOf(['dark', 'light']),
|
|
343
347
|
title: PropTypes.string,
|
|
344
|
-
/**
|
|
345
|
-
* The configuration of the tooltip.
|
|
346
|
-
* @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
|
|
347
|
-
* @default { trigger: 'item' }
|
|
348
|
-
*/
|
|
349
|
-
tooltip: PropTypes.shape({
|
|
350
|
-
axisContent: PropTypes.elementType,
|
|
351
|
-
classes: PropTypes.object,
|
|
352
|
-
itemContent: PropTypes.elementType,
|
|
353
|
-
slotProps: PropTypes.object,
|
|
354
|
-
slots: PropTypes.object,
|
|
355
|
-
trigger: PropTypes.oneOf(['axis', 'item', 'none'])
|
|
356
|
-
}),
|
|
357
348
|
/**
|
|
358
349
|
* Indicate which axis to display the top of the charts.
|
|
359
350
|
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
360
351
|
* @default null
|
|
361
352
|
*/
|
|
362
353
|
topAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
363
|
-
viewBox: PropTypes.shape({
|
|
364
|
-
height: PropTypes.number,
|
|
365
|
-
width: PropTypes.number,
|
|
366
|
-
x: PropTypes.number,
|
|
367
|
-
y: PropTypes.number
|
|
368
|
-
}),
|
|
369
354
|
/**
|
|
370
355
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
371
356
|
*/
|
|
@@ -401,7 +386,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
401
386
|
hideTooltip: PropTypes.bool,
|
|
402
387
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
403
388
|
label: PropTypes.string,
|
|
404
|
-
labelFontSize: PropTypes.number,
|
|
405
389
|
labelStyle: PropTypes.object,
|
|
406
390
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
407
391
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -412,7 +396,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
412
396
|
slots: PropTypes.object,
|
|
413
397
|
stroke: PropTypes.string,
|
|
414
398
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
415
|
-
tickFontSize: PropTypes.number,
|
|
416
399
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
417
400
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
418
401
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -464,7 +447,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
464
447
|
hideTooltip: PropTypes.bool,
|
|
465
448
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
466
449
|
label: PropTypes.string,
|
|
467
|
-
labelFontSize: PropTypes.number,
|
|
468
450
|
labelStyle: PropTypes.object,
|
|
469
451
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
470
452
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -475,7 +457,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
475
457
|
slots: PropTypes.object,
|
|
476
458
|
stroke: PropTypes.string,
|
|
477
459
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
478
|
-
tickFontSize: PropTypes.number,
|
|
479
460
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
480
461
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
481
462
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -497,12 +478,29 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
497
478
|
}), PropTypes.bool])
|
|
498
479
|
})),
|
|
499
480
|
/**
|
|
500
|
-
* The
|
|
481
|
+
* The configuration of the z-axes.
|
|
501
482
|
*/
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
483
|
+
zAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
484
|
+
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
485
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
486
|
+
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
487
|
+
unknownColor: PropTypes.string,
|
|
488
|
+
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
489
|
+
}), PropTypes.shape({
|
|
490
|
+
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
491
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
492
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
493
|
+
type: PropTypes.oneOf(['continuous']).isRequired
|
|
494
|
+
}), PropTypes.shape({
|
|
495
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
496
|
+
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
497
|
+
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
498
|
+
})]),
|
|
499
|
+
data: PropTypes.array,
|
|
500
|
+
dataKey: PropTypes.string,
|
|
501
|
+
id: PropTypes.string,
|
|
502
|
+
max: PropTypes.number,
|
|
503
|
+
min: PropTypes.number
|
|
506
504
|
}))
|
|
507
505
|
} : void 0;
|
|
508
506
|
export { LineChartPro };
|