@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.
Files changed (188) hide show
  1. package/BarChartPro/BarChartPro.d.ts +2 -2
  2. package/BarChartPro/BarChartPro.js +74 -61
  3. package/CHANGELOG.md +2215 -119
  4. package/ChartContainerPro/ChartContainerPro.d.ts +33 -4
  5. package/ChartContainerPro/ChartContainerPro.js +59 -51
  6. package/ChartContainerPro/useChartContainerProProps.d.ts +7 -43
  7. package/ChartContainerPro/useChartContainerProProps.js +15 -9
  8. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +37 -0
  9. package/{context/ChartDataProviderPro → ChartDataProviderPro}/ChartDataProviderPro.js +71 -80
  10. package/{context → ChartDataProviderPro}/package.json +1 -1
  11. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +8 -0
  12. package/ChartDataProviderPro/useChartDataProviderProProps.js +15 -0
  13. package/Heatmap/Heatmap.d.ts +11 -4
  14. package/Heatmap/Heatmap.js +35 -43
  15. package/Heatmap/HeatmapItem.js +1 -1
  16. package/Heatmap/HeatmapTooltip.d.ts +9 -0
  17. package/Heatmap/HeatmapTooltip.js +274 -0
  18. package/Heatmap/extremums.d.ts +2 -2
  19. package/Heatmap/formatter.d.ts +2 -2
  20. package/Heatmap/formatter.js +2 -1
  21. package/Heatmap/heatmapClasses.js +2 -1
  22. package/Heatmap/index.d.ts +1 -1
  23. package/Heatmap/index.js +1 -1
  24. package/Heatmap/plugin.d.ts +2 -2
  25. package/Heatmap/plugin.js +4 -2
  26. package/Heatmap/tooltip.d.ts +3 -0
  27. package/Heatmap/tooltip.js +25 -0
  28. package/LineChartPro/LineChartPro.d.ts +2 -2
  29. package/LineChartPro/LineChartPro.js +80 -82
  30. package/README.md +3 -3
  31. package/ScatterChartPro/ScatterChartPro.d.ts +2 -2
  32. package/ScatterChartPro/ScatterChartPro.js +51 -64
  33. package/hooks/index.d.ts +1 -0
  34. package/hooks/index.js +2 -1
  35. package/hooks/useSeries.d.ts +2 -4
  36. package/hooks/zoom/index.d.ts +1 -0
  37. package/hooks/zoom/index.js +1 -0
  38. package/hooks/zoom/useIsZoomInteracting.d.ts +6 -0
  39. package/hooks/zoom/useIsZoomInteracting.js +14 -0
  40. package/index.d.ts +3 -1
  41. package/index.js +5 -5
  42. package/internals/plugins/allPlugins.d.ts +11 -0
  43. package/internals/plugins/allPlugins.js +5 -0
  44. package/internals/plugins/useChartProZoom/creatZoomLookup.d.ts +3 -0
  45. package/internals/plugins/useChartProZoom/creatZoomLookup.js +12 -0
  46. package/internals/plugins/useChartProZoom/defaultizeZoom.d.ts +2 -0
  47. package/internals/plugins/useChartProZoom/defaultizeZoom.js +25 -0
  48. package/internals/plugins/useChartProZoom/index.d.ts +3 -0
  49. package/internals/plugins/useChartProZoom/index.js +3 -0
  50. package/internals/plugins/useChartProZoom/useChartProZoom.d.ts +3 -0
  51. package/internals/plugins/useChartProZoom/useChartProZoom.js +303 -0
  52. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +377 -0
  53. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +10 -0
  54. package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +50 -0
  55. package/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +45 -0
  56. package/internals/plugins/useChartProZoom/useChartProZoom.utils.js +126 -0
  57. package/internals/plugins/useChartProZoom/zoom.types.d.ts +53 -0
  58. package/internals/utils/releaseInfo.js +2 -2
  59. package/models/index.d.ts +1 -0
  60. package/models/index.js +2 -1
  61. package/modern/BarChartPro/BarChartPro.js +74 -61
  62. package/modern/ChartContainerPro/ChartContainerPro.js +59 -51
  63. package/modern/ChartContainerPro/useChartContainerProProps.js +15 -9
  64. package/modern/{context/ChartDataProviderPro → ChartDataProviderPro}/ChartDataProviderPro.js +71 -80
  65. package/modern/ChartDataProviderPro/useChartDataProviderProProps.js +15 -0
  66. package/modern/Heatmap/Heatmap.js +35 -43
  67. package/modern/Heatmap/HeatmapItem.js +1 -1
  68. package/modern/Heatmap/HeatmapTooltip.js +274 -0
  69. package/modern/Heatmap/formatter.js +2 -1
  70. package/modern/Heatmap/heatmapClasses.js +2 -1
  71. package/modern/Heatmap/index.js +1 -1
  72. package/modern/Heatmap/plugin.js +4 -2
  73. package/modern/Heatmap/tooltip.js +25 -0
  74. package/modern/LineChartPro/LineChartPro.js +80 -82
  75. package/modern/ScatterChartPro/ScatterChartPro.js +51 -64
  76. package/modern/hooks/index.js +2 -1
  77. package/modern/hooks/zoom/index.js +1 -0
  78. package/modern/hooks/zoom/useIsZoomInteracting.js +14 -0
  79. package/modern/index.js +5 -5
  80. package/modern/internals/plugins/allPlugins.js +5 -0
  81. package/modern/internals/plugins/useChartProZoom/creatZoomLookup.js +12 -0
  82. package/modern/internals/plugins/useChartProZoom/defaultizeZoom.js +25 -0
  83. package/modern/internals/plugins/useChartProZoom/index.js +3 -0
  84. package/modern/internals/plugins/useChartProZoom/useChartProZoom.js +303 -0
  85. package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +10 -0
  86. package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.js +1 -0
  87. package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.js +126 -0
  88. package/modern/internals/plugins/useChartProZoom/zoom.types.js +1 -0
  89. package/modern/internals/utils/releaseInfo.js +2 -2
  90. package/modern/models/index.js +2 -1
  91. package/node/BarChartPro/BarChartPro.js +73 -60
  92. package/node/ChartContainerPro/ChartContainerPro.js +58 -50
  93. package/node/ChartContainerPro/useChartContainerProProps.js +15 -9
  94. package/node/{context/ChartDataProviderPro → ChartDataProviderPro}/ChartDataProviderPro.js +70 -79
  95. package/node/ChartDataProviderPro/useChartDataProviderProProps.js +21 -0
  96. package/node/Heatmap/Heatmap.js +35 -43
  97. package/node/Heatmap/HeatmapItem.js +2 -2
  98. package/node/Heatmap/HeatmapTooltip.js +280 -0
  99. package/node/Heatmap/formatter.js +2 -1
  100. package/node/Heatmap/heatmapClasses.js +5 -4
  101. package/node/Heatmap/index.js +4 -4
  102. package/node/Heatmap/plugin.js +4 -2
  103. package/node/Heatmap/tooltip.js +31 -0
  104. package/node/LineChartPro/LineChartPro.js +79 -81
  105. package/node/ScatterChartPro/ScatterChartPro.js +50 -63
  106. package/node/hooks/index.js +16 -1
  107. package/node/{context/CartesianProviderPro → hooks/zoom}/index.js +4 -4
  108. package/node/hooks/zoom/useIsZoomInteracting.js +19 -0
  109. package/node/index.js +34 -12
  110. package/node/internals/plugins/allPlugins.js +11 -0
  111. package/node/internals/plugins/useChartProZoom/creatZoomLookup.js +19 -0
  112. package/node/internals/plugins/useChartProZoom/defaultizeZoom.js +33 -0
  113. package/node/internals/plugins/useChartProZoom/index.js +38 -0
  114. package/node/internals/plugins/useChartProZoom/useChartProZoom.js +310 -0
  115. package/node/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +18 -0
  116. package/node/internals/plugins/useChartProZoom/useChartProZoom.utils.js +140 -0
  117. package/node/internals/plugins/useChartProZoom/zoom.types.js +5 -0
  118. package/node/internals/utils/releaseInfo.js +4 -3
  119. package/package.json +8 -8
  120. package/typeOverloads/modules.d.ts +8 -1
  121. package/Heatmap/DefaultHeatmapTooltip.d.ts +0 -7
  122. package/Heatmap/DefaultHeatmapTooltip.js +0 -99
  123. package/context/CartesianProviderPro/CartesianProviderPro.d.ts +0 -6
  124. package/context/CartesianProviderPro/CartesianProviderPro.js +0 -89
  125. package/context/CartesianProviderPro/createAxisFilterMapper.d.ts +0 -12
  126. package/context/CartesianProviderPro/createAxisFilterMapper.js +0 -60
  127. package/context/CartesianProviderPro/index.d.ts +0 -1
  128. package/context/CartesianProviderPro/index.js +0 -1
  129. package/context/ChartDataProviderPro/ChartDataProviderPro.d.ts +0 -7
  130. package/context/ChartDataProviderPro/useChartDataProviderProProps.d.ts +0 -16
  131. package/context/ChartDataProviderPro/useChartDataProviderProProps.js +0 -43
  132. package/context/ZoomProvider/Zoom.types.d.ts +0 -144
  133. package/context/ZoomProvider/ZoomContext.d.ts +0 -4
  134. package/context/ZoomProvider/ZoomContext.js +0 -16
  135. package/context/ZoomProvider/ZoomProvider.d.ts +0 -3
  136. package/context/ZoomProvider/ZoomProvider.js +0 -56
  137. package/context/ZoomProvider/ZoomSetup.d.ts +0 -9
  138. package/context/ZoomProvider/ZoomSetup.js +0 -16
  139. package/context/ZoomProvider/defaultizeZoom.d.ts +0 -2
  140. package/context/ZoomProvider/defaultizeZoom.js +0 -32
  141. package/context/ZoomProvider/index.d.ts +0 -3
  142. package/context/ZoomProvider/index.js +0 -3
  143. package/context/ZoomProvider/initializeZoomData.d.ts +0 -6
  144. package/context/ZoomProvider/initializeZoomData.js +0 -13
  145. package/context/ZoomProvider/useSetupPan.d.ts +0 -1
  146. package/context/ZoomProvider/useSetupPan.js +0 -106
  147. package/context/ZoomProvider/useSetupZoom.d.ts +0 -1
  148. package/context/ZoomProvider/useSetupZoom.js +0 -274
  149. package/context/ZoomProvider/useZoom.d.ts +0 -7
  150. package/context/ZoomProvider/useZoom.js +0 -19
  151. package/context/index.d.ts +0 -3
  152. package/context/index.js +0 -5
  153. package/modern/Heatmap/DefaultHeatmapTooltip.js +0 -99
  154. package/modern/context/CartesianProviderPro/CartesianProviderPro.js +0 -89
  155. package/modern/context/CartesianProviderPro/createAxisFilterMapper.js +0 -60
  156. package/modern/context/CartesianProviderPro/index.js +0 -1
  157. package/modern/context/ChartDataProviderPro/useChartDataProviderProProps.js +0 -43
  158. package/modern/context/ZoomProvider/ZoomContext.js +0 -16
  159. package/modern/context/ZoomProvider/ZoomProvider.js +0 -56
  160. package/modern/context/ZoomProvider/ZoomSetup.js +0 -16
  161. package/modern/context/ZoomProvider/defaultizeZoom.js +0 -32
  162. package/modern/context/ZoomProvider/index.js +0 -3
  163. package/modern/context/ZoomProvider/initializeZoomData.js +0 -13
  164. package/modern/context/ZoomProvider/useSetupPan.js +0 -106
  165. package/modern/context/ZoomProvider/useSetupZoom.js +0 -274
  166. package/modern/context/ZoomProvider/useZoom.js +0 -19
  167. package/modern/context/index.js +0 -5
  168. package/node/Heatmap/DefaultHeatmapTooltip.js +0 -105
  169. package/node/context/CartesianProviderPro/CartesianProviderPro.js +0 -95
  170. package/node/context/CartesianProviderPro/createAxisFilterMapper.js +0 -68
  171. package/node/context/ChartDataProviderPro/useChartDataProviderProProps.js +0 -50
  172. package/node/context/ZoomProvider/ZoomContext.js +0 -23
  173. package/node/context/ZoomProvider/ZoomProvider.js +0 -63
  174. package/node/context/ZoomProvider/ZoomSetup.js +0 -20
  175. package/node/context/ZoomProvider/defaultizeZoom.js +0 -40
  176. package/node/context/ZoomProvider/index.js +0 -38
  177. package/node/context/ZoomProvider/initializeZoomData.js +0 -20
  178. package/node/context/ZoomProvider/useSetupPan.js +0 -114
  179. package/node/context/ZoomProvider/useSetupZoom.js +0 -281
  180. package/node/context/ZoomProvider/useZoom.js +0 -25
  181. package/node/context/index.js +0 -27
  182. /package/{context/ChartDataProviderPro → ChartDataProviderPro}/index.d.ts +0 -0
  183. /package/{context/ChartDataProviderPro → ChartDataProviderPro}/index.js +0 -0
  184. /package/{context/ZoomProvider/Zoom.types.js → internals/plugins/useChartProZoom/useChartProZoom.types.js} +0 -0
  185. /package/{modern/context/ZoomProvider/Zoom.types.js → internals/plugins/useChartProZoom/zoom.types.js} +0 -0
  186. /package/modern/{context/ChartDataProviderPro → ChartDataProviderPro}/index.js +0 -0
  187. /package/node/{context/ChartDataProviderPro → ChartDataProviderPro}/index.js +0 -0
  188. /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 };
@@ -9,7 +9,8 @@ const formatter = params => {
9
9
  defaultizedSeries[seriesId] = _extends({
10
10
  // Defaultize the data and the value formatter.
11
11
  valueFormatter: v => v[2].toString(),
12
- data: []
12
+ data: [],
13
+ labelMarkType: 'square'
13
14
  }, series[seriesId]);
14
15
  });
15
16
  return {
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
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)) {
@@ -1,4 +1,4 @@
1
1
  export { Heatmap } from "./Heatmap.js";
2
2
  export { HeatmapPlot } from "./HeatmapPlot.js";
3
- export * from "./DefaultHeatmapTooltip.js";
3
+ export * from "./HeatmapTooltip.js";
4
4
  export * from "./heatmapClasses.js";
@@ -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
- seriesType: 'heatmap',
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 = ["zoom", "onZoomChange"];
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 { useLineChartProps } from '@mui/x-charts/internals';
19
- import { ChartContainerPro } from "../ChartContainerPro/index.js";
20
- import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
21
- import { useZoom } from "../context/ZoomProvider/useZoom.js";
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 || undefined
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 || undefined
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
- zoom,
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
- return /*#__PURE__*/_jsxs(ChartContainerPro, _extends({
172
- ref: ref
173
- }, chartContainerProps, {
174
- zoom: zoom,
175
- onZoomChange: onZoomChange,
176
- children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
177
- children: [/*#__PURE__*/_jsx(AreaPlotZoom, _extends({}, areaPlotProps)), /*#__PURE__*/_jsx(LinePlotZoom, _extends({}, linePlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
178
- })), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx("g", {
179
- "data-drawing-container": true,
180
- children: /*#__PURE__*/_jsx(MarkPlotZoom, _extends({}, markPlotProps))
181
- }), /*#__PURE__*/_jsx(LineHighlightPlot, _extends({}, lineHighlightPlotProps)), !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), !props.loading && /*#__PURE__*/_jsx(ChartsTooltip, _extends({}, tooltipProps)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
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 item currently highlighted. Turns highlighting into a controlled prop.
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 list of zoom data related to each axis.
481
+ * The configuration of the z-axes.
501
482
  */
502
- zoom: PropTypes.arrayOf(PropTypes.shape({
503
- axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
504
- end: PropTypes.number.isRequired,
505
- start: PropTypes.number.isRequired
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 };