@mui/x-charts-pro 8.0.0-alpha.1 → 8.0.0-alpha.3
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 +0 -4
- package/CHANGELOG.md +330 -7
- package/ChartContainerPro/ChartContainerPro.js +8 -16
- package/ChartContainerPro/useChartContainerProProps.js +0 -2
- package/Heatmap/Heatmap.js +0 -4
- package/Heatmap/HeatmapTooltip.js +2 -24
- package/Heatmap/heatmapClasses.js +2 -1
- package/LineChartPro/LineChartPro.js +0 -4
- package/ScatterChartPro/ScatterChartPro.js +0 -4
- package/context/CartesianProviderPro/createAxisFilterMapper.d.ts +2 -1
- package/context/ChartDataProviderPro/ChartDataProviderPro.d.ts +0 -3
- package/context/ChartDataProviderPro/ChartDataProviderPro.js +13 -262
- package/index.js +1 -1
- package/internals/utils/releaseInfo.js +2 -2
- package/modern/BarChartPro/BarChartPro.js +0 -4
- package/modern/ChartContainerPro/ChartContainerPro.js +8 -16
- package/modern/ChartContainerPro/useChartContainerProProps.js +0 -2
- package/modern/Heatmap/Heatmap.js +0 -4
- package/modern/Heatmap/HeatmapTooltip.js +2 -24
- package/modern/Heatmap/heatmapClasses.js +2 -1
- package/modern/LineChartPro/LineChartPro.js +0 -4
- package/modern/ScatterChartPro/ScatterChartPro.js +0 -4
- package/modern/context/ChartDataProviderPro/ChartDataProviderPro.js +13 -262
- package/modern/index.js +1 -1
- package/modern/internals/utils/releaseInfo.js +2 -2
- package/node/BarChartPro/BarChartPro.js +0 -4
- package/node/ChartContainerPro/ChartContainerPro.js +8 -16
- package/node/ChartContainerPro/useChartContainerProProps.js +0 -2
- package/node/Heatmap/Heatmap.js +0 -4
- package/node/Heatmap/HeatmapTooltip.js +2 -24
- package/node/Heatmap/heatmapClasses.js +5 -4
- package/node/LineChartPro/LineChartPro.js +0 -4
- package/node/ScatterChartPro/ScatterChartPro.js +0 -4
- package/node/context/ChartDataProviderPro/ChartDataProviderPro.js +13 -262
- package/node/index.js +1 -1
- package/node/internals/utils/releaseInfo.js +4 -3
- package/package.json +5 -5
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FormattedSeries, ExtremumGettersConfig, ExtremumFilter, ZoomAxisFilters, GetZoomAxisFilters } from '@mui/x-charts/internals';
|
|
2
|
-
import {
|
|
2
|
+
import { ScaleName, AxisConfig } from '@mui/x-charts/models';
|
|
3
|
+
import { ChartsAxisProps } from '@mui/x-charts/ChartsAxis';
|
|
3
4
|
import { ZoomData } from '../ZoomProvider';
|
|
4
5
|
type CreateAxisFilterMapperParams = {
|
|
5
6
|
zoomData: ZoomData[];
|
|
@@ -4,7 +4,4 @@ import { ZoomProps } from '../ZoomProvider';
|
|
|
4
4
|
export interface ChartDataProviderProProps extends ChartDataProviderProps, ZoomProps {
|
|
5
5
|
}
|
|
6
6
|
declare function ChartDataProviderPro(props: ChartDataProviderProProps): React.JSX.Element;
|
|
7
|
-
declare namespace ChartDataProviderPro {
|
|
8
|
-
var propTypes: any;
|
|
9
|
-
}
|
|
10
7
|
export { ChartDataProviderPro };
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import
|
|
6
|
-
import { DrawingAreaProvider, InteractionProvider, PluginProvider, SeriesProvider, AnimationProvider, SvgRefProvider, SizeProvider } from '@mui/x-charts/internals';
|
|
5
|
+
import { DrawingAreaProvider, PluginProvider, SeriesProvider, AnimationProvider, SizeProvider, ChartProvider } from '@mui/x-charts/internals';
|
|
7
6
|
import { HighlightedProvider, ZAxisContextProvider } from '@mui/x-charts/context';
|
|
8
7
|
import { useLicenseVerifier } from '@mui/x-license/useLicenseVerifier';
|
|
9
8
|
import { getReleaseInfo } from "../../internals/utils/releaseInfo.js";
|
|
@@ -26,21 +25,19 @@ function ChartDataProviderPro(props) {
|
|
|
26
25
|
children
|
|
27
26
|
} = useChartContainerProProps(props);
|
|
28
27
|
useLicenseVerifier('x-charts-pro', releaseInfo);
|
|
29
|
-
return /*#__PURE__*/_jsx(
|
|
30
|
-
children: /*#__PURE__*/_jsx(
|
|
31
|
-
children: /*#__PURE__*/_jsx(
|
|
32
|
-
children: /*#__PURE__*/_jsx(
|
|
33
|
-
children: /*#__PURE__*/_jsx(
|
|
34
|
-
children: /*#__PURE__*/_jsx(
|
|
35
|
-
children: /*#__PURE__*/_jsx(
|
|
36
|
-
children: /*#__PURE__*/_jsx(
|
|
37
|
-
children: /*#__PURE__*/_jsx(
|
|
28
|
+
return /*#__PURE__*/_jsx(ChartProvider, {
|
|
29
|
+
children: /*#__PURE__*/_jsx(SizeProvider, _extends({}, sizeProviderProps, {
|
|
30
|
+
children: /*#__PURE__*/_jsx(DrawingAreaProvider, _extends({}, drawingAreaProviderProps, {
|
|
31
|
+
children: /*#__PURE__*/_jsx(AnimationProvider, _extends({}, animationProviderProps, {
|
|
32
|
+
children: /*#__PURE__*/_jsx(PluginProvider, _extends({}, pluginProviderProps, {
|
|
33
|
+
children: /*#__PURE__*/_jsx(ZoomProvider, _extends({}, zoomProviderProps, {
|
|
34
|
+
children: /*#__PURE__*/_jsx(SeriesProvider, _extends({}, seriesProviderProps, {
|
|
35
|
+
children: /*#__PURE__*/_jsx(CartesianProviderPro, _extends({}, cartesianProviderProps, {
|
|
36
|
+
children: /*#__PURE__*/_jsx(ZAxisContextProvider, _extends({}, zAxisContextProps, {
|
|
38
37
|
children: /*#__PURE__*/_jsx(HighlightedProvider, _extends({}, highlightedProviderProps, {
|
|
39
|
-
children:
|
|
40
|
-
children: children
|
|
41
|
-
})
|
|
38
|
+
children: children
|
|
42
39
|
}))
|
|
43
|
-
})
|
|
40
|
+
}))
|
|
44
41
|
}))
|
|
45
42
|
}))
|
|
46
43
|
}))
|
|
@@ -48,252 +45,6 @@ function ChartDataProviderPro(props) {
|
|
|
48
45
|
}))
|
|
49
46
|
}))
|
|
50
47
|
}))
|
|
51
|
-
})
|
|
48
|
+
});
|
|
52
49
|
}
|
|
53
|
-
process.env.NODE_ENV !== "production" ? ChartDataProviderPro.propTypes = {
|
|
54
|
-
// ----------------------------- Warning --------------------------------
|
|
55
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
56
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
57
|
-
// ----------------------------------------------------------------------
|
|
58
|
-
children: PropTypes.node,
|
|
59
|
-
className: PropTypes.string,
|
|
60
|
-
/**
|
|
61
|
-
* Color palette used to colorize multiple series.
|
|
62
|
-
* @default blueberryTwilightPalette
|
|
63
|
-
*/
|
|
64
|
-
colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
65
|
-
/**
|
|
66
|
-
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
67
|
-
*/
|
|
68
|
-
dataset: PropTypes.arrayOf(PropTypes.object),
|
|
69
|
-
desc: PropTypes.string,
|
|
70
|
-
/**
|
|
71
|
-
* If `true`, the charts will not listen to the mouse move event.
|
|
72
|
-
* It might break interactive features, but will improve performance.
|
|
73
|
-
* @default false
|
|
74
|
-
*/
|
|
75
|
-
disableAxisListener: PropTypes.bool,
|
|
76
|
-
/**
|
|
77
|
-
* The height of the chart in px.
|
|
78
|
-
*/
|
|
79
|
-
height: PropTypes.number.isRequired,
|
|
80
|
-
/**
|
|
81
|
-
* The item currently highlighted. Turns highlighting into a controlled prop.
|
|
82
|
-
*/
|
|
83
|
-
highlightedItem: PropTypes.shape({
|
|
84
|
-
dataIndex: PropTypes.number,
|
|
85
|
-
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
86
|
-
}),
|
|
87
|
-
/**
|
|
88
|
-
* The margin between the SVG and the drawing area.
|
|
89
|
-
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
90
|
-
* Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
91
|
-
* @default object Depends on the charts type.
|
|
92
|
-
*/
|
|
93
|
-
margin: PropTypes.shape({
|
|
94
|
-
bottom: PropTypes.number,
|
|
95
|
-
left: PropTypes.number,
|
|
96
|
-
right: PropTypes.number,
|
|
97
|
-
top: PropTypes.number
|
|
98
|
-
}),
|
|
99
|
-
/**
|
|
100
|
-
* The callback fired when the highlighted item changes.
|
|
101
|
-
*
|
|
102
|
-
* @param {HighlightItemData | null} highlightedItem The newly highlighted item.
|
|
103
|
-
*/
|
|
104
|
-
onHighlightChange: PropTypes.func,
|
|
105
|
-
/**
|
|
106
|
-
* Callback fired when the zoom has changed.
|
|
107
|
-
*
|
|
108
|
-
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
109
|
-
*/
|
|
110
|
-
onZoomChange: PropTypes.func,
|
|
111
|
-
/**
|
|
112
|
-
* An array of plugins defining how to preprocess data.
|
|
113
|
-
* If not provided, the container supports line, bar, scatter and pie charts.
|
|
114
|
-
*/
|
|
115
|
-
plugins: PropTypes.arrayOf(PropTypes.object),
|
|
116
|
-
/**
|
|
117
|
-
* The array of series to display.
|
|
118
|
-
* Each type of series has its own specificity.
|
|
119
|
-
* Please refer to the appropriate docs page to learn more about it.
|
|
120
|
-
*/
|
|
121
|
-
series: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
122
|
-
/**
|
|
123
|
-
* If `true`, animations are skipped.
|
|
124
|
-
* If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
|
|
125
|
-
*/
|
|
126
|
-
skipAnimation: PropTypes.bool,
|
|
127
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
128
|
-
title: PropTypes.string,
|
|
129
|
-
viewBox: PropTypes.shape({
|
|
130
|
-
height: PropTypes.number,
|
|
131
|
-
width: PropTypes.number,
|
|
132
|
-
x: PropTypes.number,
|
|
133
|
-
y: PropTypes.number
|
|
134
|
-
}),
|
|
135
|
-
/**
|
|
136
|
-
* The width of the chart in px.
|
|
137
|
-
*/
|
|
138
|
-
width: PropTypes.number.isRequired,
|
|
139
|
-
/**
|
|
140
|
-
* The configuration of the x-axes.
|
|
141
|
-
* If not provided, a default axis config is used.
|
|
142
|
-
* An array of [[AxisConfig]] objects.
|
|
143
|
-
*/
|
|
144
|
-
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
145
|
-
classes: PropTypes.object,
|
|
146
|
-
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
147
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
148
|
-
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
149
|
-
unknownColor: PropTypes.string,
|
|
150
|
-
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
151
|
-
}), PropTypes.shape({
|
|
152
|
-
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
153
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
154
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
155
|
-
type: PropTypes.oneOf(['continuous']).isRequired
|
|
156
|
-
}), PropTypes.shape({
|
|
157
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
158
|
-
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
159
|
-
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
160
|
-
})]),
|
|
161
|
-
data: PropTypes.array,
|
|
162
|
-
dataKey: PropTypes.string,
|
|
163
|
-
disableLine: PropTypes.bool,
|
|
164
|
-
disableTicks: PropTypes.bool,
|
|
165
|
-
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
166
|
-
fill: PropTypes.string,
|
|
167
|
-
hideTooltip: PropTypes.bool,
|
|
168
|
-
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
169
|
-
label: PropTypes.string,
|
|
170
|
-
labelFontSize: PropTypes.number,
|
|
171
|
-
labelStyle: PropTypes.object,
|
|
172
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
173
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
174
|
-
position: PropTypes.oneOf(['bottom', 'top']),
|
|
175
|
-
reverse: PropTypes.bool,
|
|
176
|
-
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
177
|
-
slotProps: PropTypes.object,
|
|
178
|
-
slots: PropTypes.object,
|
|
179
|
-
stroke: PropTypes.string,
|
|
180
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
181
|
-
tickFontSize: PropTypes.number,
|
|
182
|
-
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
183
|
-
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
184
|
-
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
185
|
-
tickLabelStyle: PropTypes.object,
|
|
186
|
-
tickMaxStep: PropTypes.number,
|
|
187
|
-
tickMinStep: PropTypes.number,
|
|
188
|
-
tickNumber: PropTypes.number,
|
|
189
|
-
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
190
|
-
tickSize: PropTypes.number,
|
|
191
|
-
valueFormatter: PropTypes.func,
|
|
192
|
-
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
193
|
-
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
194
|
-
maxEnd: PropTypes.number,
|
|
195
|
-
maxSpan: PropTypes.number,
|
|
196
|
-
minSpan: PropTypes.number,
|
|
197
|
-
minStart: PropTypes.number,
|
|
198
|
-
panning: PropTypes.bool,
|
|
199
|
-
step: PropTypes.number
|
|
200
|
-
}), PropTypes.bool])
|
|
201
|
-
})),
|
|
202
|
-
/**
|
|
203
|
-
* The configuration of the y-axes.
|
|
204
|
-
* If not provided, a default axis config is used.
|
|
205
|
-
* An array of [[AxisConfig]] objects.
|
|
206
|
-
*/
|
|
207
|
-
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
208
|
-
classes: PropTypes.object,
|
|
209
|
-
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
210
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
211
|
-
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
212
|
-
unknownColor: PropTypes.string,
|
|
213
|
-
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
214
|
-
}), PropTypes.shape({
|
|
215
|
-
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
216
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
217
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
218
|
-
type: PropTypes.oneOf(['continuous']).isRequired
|
|
219
|
-
}), PropTypes.shape({
|
|
220
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
221
|
-
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
222
|
-
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
223
|
-
})]),
|
|
224
|
-
data: PropTypes.array,
|
|
225
|
-
dataKey: PropTypes.string,
|
|
226
|
-
disableLine: PropTypes.bool,
|
|
227
|
-
disableTicks: PropTypes.bool,
|
|
228
|
-
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
229
|
-
fill: PropTypes.string,
|
|
230
|
-
hideTooltip: PropTypes.bool,
|
|
231
|
-
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
232
|
-
label: PropTypes.string,
|
|
233
|
-
labelFontSize: PropTypes.number,
|
|
234
|
-
labelStyle: PropTypes.object,
|
|
235
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
236
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
237
|
-
position: PropTypes.oneOf(['left', 'right']),
|
|
238
|
-
reverse: PropTypes.bool,
|
|
239
|
-
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
240
|
-
slotProps: PropTypes.object,
|
|
241
|
-
slots: PropTypes.object,
|
|
242
|
-
stroke: PropTypes.string,
|
|
243
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
244
|
-
tickFontSize: PropTypes.number,
|
|
245
|
-
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
246
|
-
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
247
|
-
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
248
|
-
tickLabelStyle: PropTypes.object,
|
|
249
|
-
tickMaxStep: PropTypes.number,
|
|
250
|
-
tickMinStep: PropTypes.number,
|
|
251
|
-
tickNumber: PropTypes.number,
|
|
252
|
-
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
253
|
-
tickSize: PropTypes.number,
|
|
254
|
-
valueFormatter: PropTypes.func,
|
|
255
|
-
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
256
|
-
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
257
|
-
maxEnd: PropTypes.number,
|
|
258
|
-
maxSpan: PropTypes.number,
|
|
259
|
-
minSpan: PropTypes.number,
|
|
260
|
-
minStart: PropTypes.number,
|
|
261
|
-
panning: PropTypes.bool,
|
|
262
|
-
step: PropTypes.number
|
|
263
|
-
}), PropTypes.bool])
|
|
264
|
-
})),
|
|
265
|
-
/**
|
|
266
|
-
* The configuration of the z-axes.
|
|
267
|
-
*/
|
|
268
|
-
zAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
269
|
-
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
270
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
271
|
-
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
272
|
-
unknownColor: PropTypes.string,
|
|
273
|
-
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
274
|
-
}), PropTypes.shape({
|
|
275
|
-
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
276
|
-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
277
|
-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
278
|
-
type: PropTypes.oneOf(['continuous']).isRequired
|
|
279
|
-
}), PropTypes.shape({
|
|
280
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
281
|
-
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
282
|
-
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
283
|
-
})]),
|
|
284
|
-
data: PropTypes.array,
|
|
285
|
-
dataKey: PropTypes.string,
|
|
286
|
-
id: PropTypes.string,
|
|
287
|
-
max: PropTypes.number,
|
|
288
|
-
min: PropTypes.number
|
|
289
|
-
})),
|
|
290
|
-
/**
|
|
291
|
-
* The list of zoom data related to each axis.
|
|
292
|
-
*/
|
|
293
|
-
zoom: PropTypes.arrayOf(PropTypes.shape({
|
|
294
|
-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
295
|
-
end: PropTypes.number.isRequired,
|
|
296
|
-
start: PropTypes.number.isRequired
|
|
297
|
-
}))
|
|
298
|
-
} : void 0;
|
|
299
50
|
export { ChartDataProviderPro };
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ponyfillGlobal from '@mui/utils/ponyfillGlobal';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTczMzM1MzIwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
|
@@ -307,7 +307,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
307
307
|
hideTooltip: PropTypes.bool,
|
|
308
308
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
309
309
|
label: PropTypes.string,
|
|
310
|
-
labelFontSize: PropTypes.number,
|
|
311
310
|
labelStyle: PropTypes.object,
|
|
312
311
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
313
312
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -318,7 +317,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
318
317
|
slots: PropTypes.object,
|
|
319
318
|
stroke: PropTypes.string,
|
|
320
319
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
321
|
-
tickFontSize: PropTypes.number,
|
|
322
320
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
323
321
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
324
322
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -370,7 +368,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
370
368
|
hideTooltip: PropTypes.bool,
|
|
371
369
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
372
370
|
label: PropTypes.string,
|
|
373
|
-
labelFontSize: PropTypes.number,
|
|
374
371
|
labelStyle: PropTypes.object,
|
|
375
372
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
376
373
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -381,7 +378,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
381
378
|
slots: PropTypes.object,
|
|
382
379
|
stroke: PropTypes.string,
|
|
383
380
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
384
|
-
tickFontSize: PropTypes.number,
|
|
385
381
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
386
382
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
387
383
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -4,8 +4,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { Watermark } from '@mui/x-license/Watermark';
|
|
7
|
-
import {
|
|
8
|
-
import { ChartsSurface } from '@mui/x-charts';
|
|
7
|
+
import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
|
|
9
8
|
import { getReleaseInfo } from "../internals/utils/releaseInfo.js";
|
|
10
9
|
import { ChartDataProviderPro } from "../context/ChartDataProviderPro/index.js";
|
|
11
10
|
import { useChartContainerProProps } from "./useChartContainerProProps.js";
|
|
@@ -15,18 +14,15 @@ const ChartContainerPro = /*#__PURE__*/React.forwardRef(function ChartContainerP
|
|
|
15
14
|
const {
|
|
16
15
|
chartDataProviderProProps,
|
|
17
16
|
children,
|
|
18
|
-
resizableContainerProps,
|
|
19
17
|
chartsSurfaceProps
|
|
20
18
|
} = useChartContainerProProps(props, ref);
|
|
21
|
-
return /*#__PURE__*/
|
|
22
|
-
children: /*#__PURE__*/
|
|
23
|
-
children:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
})]
|
|
29
|
-
}))
|
|
19
|
+
return /*#__PURE__*/_jsxs(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
|
|
20
|
+
children: [/*#__PURE__*/_jsx(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
21
|
+
children: children
|
|
22
|
+
})), /*#__PURE__*/_jsx(Watermark, {
|
|
23
|
+
packageName: "x-charts-pro",
|
|
24
|
+
releaseInfo: releaseInfo
|
|
25
|
+
})]
|
|
30
26
|
}));
|
|
31
27
|
});
|
|
32
28
|
process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
@@ -140,7 +136,6 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
140
136
|
hideTooltip: PropTypes.bool,
|
|
141
137
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
142
138
|
label: PropTypes.string,
|
|
143
|
-
labelFontSize: PropTypes.number,
|
|
144
139
|
labelStyle: PropTypes.object,
|
|
145
140
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
146
141
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -151,7 +146,6 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
151
146
|
slots: PropTypes.object,
|
|
152
147
|
stroke: PropTypes.string,
|
|
153
148
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
154
|
-
tickFontSize: PropTypes.number,
|
|
155
149
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
156
150
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
157
151
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -203,7 +197,6 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
203
197
|
hideTooltip: PropTypes.bool,
|
|
204
198
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
205
199
|
label: PropTypes.string,
|
|
206
|
-
labelFontSize: PropTypes.number,
|
|
207
200
|
labelStyle: PropTypes.object,
|
|
208
201
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
209
202
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -214,7 +207,6 @@ process.env.NODE_ENV !== "production" ? ChartContainerPro.propTypes = {
|
|
|
214
207
|
slots: PropTypes.object,
|
|
215
208
|
stroke: PropTypes.string,
|
|
216
209
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
217
|
-
tickFontSize: PropTypes.number,
|
|
218
210
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
219
211
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
220
212
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -17,12 +17,10 @@ export const useChartContainerProProps = (props, ref) => {
|
|
|
17
17
|
const {
|
|
18
18
|
chartDataProviderProps,
|
|
19
19
|
chartsSurfaceProps,
|
|
20
|
-
resizableContainerProps,
|
|
21
20
|
children
|
|
22
21
|
} = useChartContainerProps(baseProps, ref);
|
|
23
22
|
return {
|
|
24
23
|
chartDataProviderProProps: _extends({}, chartDataProviderProps, chartDataProviderProProps),
|
|
25
|
-
resizableContainerProps,
|
|
26
24
|
chartsSurfaceProps,
|
|
27
25
|
children
|
|
28
26
|
};
|
|
@@ -253,7 +253,6 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
253
253
|
hideTooltip: PropTypes.bool,
|
|
254
254
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
255
255
|
label: PropTypes.string,
|
|
256
|
-
labelFontSize: PropTypes.number,
|
|
257
256
|
labelStyle: PropTypes.object,
|
|
258
257
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
259
258
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -264,7 +263,6 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
264
263
|
slots: PropTypes.object,
|
|
265
264
|
stroke: PropTypes.string,
|
|
266
265
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
267
|
-
tickFontSize: PropTypes.number,
|
|
268
266
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
269
267
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
270
268
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -318,7 +316,6 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
318
316
|
hideTooltip: PropTypes.bool,
|
|
319
317
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
320
318
|
label: PropTypes.string,
|
|
321
|
-
labelFontSize: PropTypes.number,
|
|
322
319
|
labelStyle: PropTypes.object,
|
|
323
320
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
324
321
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -329,7 +326,6 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
329
326
|
slots: PropTypes.object,
|
|
330
327
|
stroke: PropTypes.string,
|
|
331
328
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
332
|
-
tickFontSize: PropTypes.number,
|
|
333
329
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
334
330
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
335
331
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -4,6 +4,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
+
import HTMLElementType from '@mui/utils/HTMLElementType';
|
|
7
8
|
import composeClasses from '@mui/utils/composeClasses';
|
|
8
9
|
import { ChartsTooltipPaper, ChartsTooltipTable, ChartsTooltipRow, ChartsTooltipCell, ChartsTooltipMark, useItemTooltip, getChartsTooltipUtilityClass, ChartsTooltipContainer } from '@mui/x-charts/ChartsTooltip';
|
|
9
10
|
import { useXAxis, useYAxis } from '@mui/x-charts/hooks';
|
|
@@ -27,10 +28,6 @@ const useUtilityClasses = ownerState => {
|
|
|
27
28
|
};
|
|
28
29
|
return composeClasses(slots, getChartsTooltipUtilityClass, classes);
|
|
29
30
|
};
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* @ignore - internal component.
|
|
33
|
-
*/
|
|
34
31
|
function DefaultHeatmapTooltipContent(props) {
|
|
35
32
|
const {
|
|
36
33
|
classes
|
|
@@ -132,26 +129,7 @@ process.env.NODE_ENV !== "production" ? HeatmapTooltip.propTypes = {
|
|
|
132
129
|
* It's used to set the position of the popper.
|
|
133
130
|
* The return value will passed as the reference object of the Popper instance.
|
|
134
131
|
*/
|
|
135
|
-
anchorEl: PropTypes
|
|
136
|
-
if (props[propName] == null) {
|
|
137
|
-
return new Error(`Prop '${propName}' is required but wasn't specified`);
|
|
138
|
-
}
|
|
139
|
-
if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
140
|
-
return new Error(`Expected prop '${propName}' to be of type Element`);
|
|
141
|
-
}
|
|
142
|
-
return null;
|
|
143
|
-
}, PropTypes.func, PropTypes.shape({
|
|
144
|
-
contextElement: (props, propName) => {
|
|
145
|
-
if (props[propName] == null) {
|
|
146
|
-
return null;
|
|
147
|
-
}
|
|
148
|
-
if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
149
|
-
return new Error(`Expected prop '${propName}' to be of type Element`);
|
|
150
|
-
}
|
|
151
|
-
return null;
|
|
152
|
-
},
|
|
153
|
-
getBoundingClientRect: PropTypes.func.isRequired
|
|
154
|
-
})]),
|
|
132
|
+
anchorEl: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]),
|
|
155
133
|
/**
|
|
156
134
|
* Override or extend the styles applied to the component.
|
|
157
135
|
*/
|
|
@@ -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)) {
|
|
@@ -372,7 +372,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
372
372
|
hideTooltip: PropTypes.bool,
|
|
373
373
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
374
374
|
label: PropTypes.string,
|
|
375
|
-
labelFontSize: PropTypes.number,
|
|
376
375
|
labelStyle: PropTypes.object,
|
|
377
376
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
378
377
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -383,7 +382,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
383
382
|
slots: PropTypes.object,
|
|
384
383
|
stroke: PropTypes.string,
|
|
385
384
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
386
|
-
tickFontSize: PropTypes.number,
|
|
387
385
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
388
386
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
389
387
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -435,7 +433,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
435
433
|
hideTooltip: PropTypes.bool,
|
|
436
434
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
437
435
|
label: PropTypes.string,
|
|
438
|
-
labelFontSize: PropTypes.number,
|
|
439
436
|
labelStyle: PropTypes.object,
|
|
440
437
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
441
438
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -446,7 +443,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
446
443
|
slots: PropTypes.object,
|
|
447
444
|
stroke: PropTypes.string,
|
|
448
445
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
449
|
-
tickFontSize: PropTypes.number,
|
|
450
446
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
451
447
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
452
448
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -245,7 +245,6 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
245
245
|
hideTooltip: PropTypes.bool,
|
|
246
246
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
247
247
|
label: PropTypes.string,
|
|
248
|
-
labelFontSize: PropTypes.number,
|
|
249
248
|
labelStyle: PropTypes.object,
|
|
250
249
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
251
250
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -256,7 +255,6 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
256
255
|
slots: PropTypes.object,
|
|
257
256
|
stroke: PropTypes.string,
|
|
258
257
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
259
|
-
tickFontSize: PropTypes.number,
|
|
260
258
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
261
259
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
262
260
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|
|
@@ -308,7 +306,6 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
308
306
|
hideTooltip: PropTypes.bool,
|
|
309
307
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
310
308
|
label: PropTypes.string,
|
|
311
|
-
labelFontSize: PropTypes.number,
|
|
312
309
|
labelStyle: PropTypes.object,
|
|
313
310
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
314
311
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -319,7 +316,6 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
319
316
|
slots: PropTypes.object,
|
|
320
317
|
stroke: PropTypes.string,
|
|
321
318
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
322
|
-
tickFontSize: PropTypes.number,
|
|
323
319
|
tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
|
|
324
320
|
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
|
|
325
321
|
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
|