@mui/x-charts-pro 8.0.0-beta.3 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/BarChartPro/BarChartPro.js +786 -9
  2. package/CHANGELOG.md +282 -96
  3. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
  4. package/ChartDataProviderPro/ChartDataProviderPro.js +27 -22
  5. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +1 -2
  6. package/ChartDataProviderPro/useChartDataProviderProProps.js +0 -2
  7. package/FunnelChart/FunnelChart.js +73 -4
  8. package/FunnelChart/categoryAxis.types.d.ts +3 -2
  9. package/FunnelChart/funnelSectionClasses.d.ts +5 -0
  10. package/FunnelChart/funnelSectionClasses.js +1 -1
  11. package/FunnelChart/index.d.ts +1 -0
  12. package/FunnelChart/index.js +12 -0
  13. package/FunnelChart/useFunnelChartProps.js +3 -3
  14. package/Heatmap/Heatmap.js +1 -2
  15. package/Heatmap/heatmapClasses.d.ts +5 -0
  16. package/Heatmap/heatmapClasses.js +1 -1
  17. package/LineChartPro/LineChartPro.js +786 -9
  18. package/ScatterChartPro/ScatterChartPro.js +786 -9
  19. package/esm/BarChartPro/BarChartPro.js +786 -9
  20. package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
  21. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +28 -23
  22. package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +1 -2
  23. package/esm/ChartDataProviderPro/useChartDataProviderProProps.js +0 -2
  24. package/esm/FunnelChart/FunnelChart.js +73 -4
  25. package/esm/FunnelChart/categoryAxis.types.d.ts +3 -2
  26. package/esm/FunnelChart/funnelSectionClasses.d.ts +5 -0
  27. package/esm/FunnelChart/funnelSectionClasses.js +1 -1
  28. package/esm/FunnelChart/index.d.ts +1 -0
  29. package/esm/FunnelChart/index.js +1 -0
  30. package/esm/FunnelChart/useFunnelChartProps.js +3 -3
  31. package/esm/Heatmap/Heatmap.js +1 -2
  32. package/esm/Heatmap/heatmapClasses.d.ts +5 -0
  33. package/esm/Heatmap/heatmapClasses.js +1 -1
  34. package/esm/LineChartPro/LineChartPro.js +786 -9
  35. package/esm/ScatterChartPro/ScatterChartPro.js +786 -9
  36. package/esm/index.js +1 -1
  37. package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +28 -35
  38. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +7 -7
  39. package/index.js +1 -1
  40. package/internals/plugins/useChartProZoom/useChartProZoom.js +28 -34
  41. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +7 -7
  42. package/package.json +6 -14
  43. package/esm/internals/utils/releaseInfo.d.ts +0 -1
  44. package/esm/internals/utils/releaseInfo.js +0 -13
  45. package/internals/utils/releaseInfo.d.ts +0 -1
  46. package/internals/utils/releaseInfo.js +0 -21
  47. package/modern/BarChartPro/BarChartPro.d.ts +0 -18
  48. package/modern/BarChartPro/BarChartPro.js +0 -406
  49. package/modern/BarChartPro/BarChartPro.plugins.d.ts +0 -4
  50. package/modern/BarChartPro/BarChartPro.plugins.js +0 -3
  51. package/modern/BarChartPro/index.d.ts +0 -1
  52. package/modern/BarChartPro/index.js +0 -1
  53. package/modern/ChartContainerPro/ChartContainerPro.d.ts +0 -35
  54. package/modern/ChartContainerPro/ChartContainerPro.js +0 -290
  55. package/modern/ChartContainerPro/index.d.ts +0 -2
  56. package/modern/ChartContainerPro/index.js +0 -2
  57. package/modern/ChartContainerPro/useChartContainerProProps.d.ts +0 -9
  58. package/modern/ChartContainerPro/useChartContainerProProps.js +0 -35
  59. package/modern/ChartDataProviderPro/ChartDataProviderPro.d.ts +0 -37
  60. package/modern/ChartDataProviderPro/ChartDataProviderPro.js +0 -106
  61. package/modern/ChartDataProviderPro/index.d.ts +0 -2
  62. package/modern/ChartDataProviderPro/index.js +0 -2
  63. package/modern/ChartDataProviderPro/useChartDataProviderProProps.d.ts +0 -8
  64. package/modern/ChartDataProviderPro/useChartDataProviderProProps.js +0 -15
  65. package/modern/FunnelChart/FunnelChart.d.ts +0 -37
  66. package/modern/FunnelChart/FunnelChart.js +0 -212
  67. package/modern/FunnelChart/FunnelPlot.d.ts +0 -16
  68. package/modern/FunnelChart/FunnelPlot.js +0 -184
  69. package/modern/FunnelChart/FunnelSection.d.ts +0 -15
  70. package/modern/FunnelChart/FunnelSection.js +0 -56
  71. package/modern/FunnelChart/categoryAxis.types.d.ts +0 -24
  72. package/modern/FunnelChart/categoryAxis.types.js +0 -1
  73. package/modern/FunnelChart/funnel.types.d.ts +0 -124
  74. package/modern/FunnelChart/funnel.types.js +0 -1
  75. package/modern/FunnelChart/funnelPlotSlots.types.d.ts +0 -20
  76. package/modern/FunnelChart/funnelPlotSlots.types.js +0 -1
  77. package/modern/FunnelChart/funnelSectionClasses.d.ts +0 -13
  78. package/modern/FunnelChart/funnelSectionClasses.js +0 -20
  79. package/modern/FunnelChart/funnelSlots.types.d.ts +0 -19
  80. package/modern/FunnelChart/funnelSlots.types.js +0 -1
  81. package/modern/FunnelChart/funnelStepCurve.d.ts +0 -4
  82. package/modern/FunnelChart/funnelStepCurve.js +0 -67
  83. package/modern/FunnelChart/index.d.ts +0 -7
  84. package/modern/FunnelChart/index.js +0 -5
  85. package/modern/FunnelChart/labelUtils.d.ts +0 -42
  86. package/modern/FunnelChart/labelUtils.js +0 -166
  87. package/modern/FunnelChart/seriesConfig/extremums.d.ts +0 -3
  88. package/modern/FunnelChart/seriesConfig/extremums.js +0 -42
  89. package/modern/FunnelChart/seriesConfig/getColor.d.ts +0 -3
  90. package/modern/FunnelChart/seriesConfig/getColor.js +0 -4
  91. package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +0 -3
  92. package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +0 -11
  93. package/modern/FunnelChart/seriesConfig/index.d.ts +0 -2
  94. package/modern/FunnelChart/seriesConfig/index.js +0 -15
  95. package/modern/FunnelChart/seriesConfig/legend.d.ts +0 -3
  96. package/modern/FunnelChart/seriesConfig/legend.js +0 -25
  97. package/modern/FunnelChart/seriesConfig/seriesProcessor.d.ts +0 -3
  98. package/modern/FunnelChart/seriesConfig/seriesProcessor.js +0 -89
  99. package/modern/FunnelChart/seriesConfig/tooltip.d.ts +0 -3
  100. package/modern/FunnelChart/seriesConfig/tooltip.js +0 -29
  101. package/modern/FunnelChart/useFunnelChartProps.d.ts +0 -30
  102. package/modern/FunnelChart/useFunnelChartProps.js +0 -161
  103. package/modern/Heatmap/Heatmap.d.ts +0 -57
  104. package/modern/Heatmap/Heatmap.js +0 -389
  105. package/modern/Heatmap/Heatmap.plugins.d.ts +0 -3
  106. package/modern/Heatmap/Heatmap.plugins.js +0 -2
  107. package/modern/Heatmap/HeatmapItem.d.ts +0 -49
  108. package/modern/Heatmap/HeatmapItem.js +0 -106
  109. package/modern/Heatmap/HeatmapPlot.d.ts +0 -8
  110. package/modern/Heatmap/HeatmapPlot.js +0 -59
  111. package/modern/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +0 -16
  112. package/modern/Heatmap/HeatmapTooltip/HeatmapTooltip.js +0 -284
  113. package/modern/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.d.ts +0 -4
  114. package/modern/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.js +0 -22
  115. package/modern/Heatmap/HeatmapTooltip/index.d.ts +0 -1
  116. package/modern/Heatmap/HeatmapTooltip/index.js +0 -1
  117. package/modern/Heatmap/heatmapClasses.d.ts +0 -11
  118. package/modern/Heatmap/heatmapClasses.js +0 -14
  119. package/modern/Heatmap/index.d.ts +0 -4
  120. package/modern/Heatmap/index.js +0 -4
  121. package/modern/Heatmap/seriesConfig/extremums.d.ts +0 -2
  122. package/modern/Heatmap/seriesConfig/extremums.js +0 -8
  123. package/modern/Heatmap/seriesConfig/getColor.d.ts +0 -3
  124. package/modern/Heatmap/seriesConfig/getColor.js +0 -15
  125. package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +0 -3
  126. package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +0 -8
  127. package/modern/Heatmap/seriesConfig/index.d.ts +0 -2
  128. package/modern/Heatmap/seriesConfig/index.js +0 -14
  129. package/modern/Heatmap/seriesConfig/seriesProcessor.d.ts +0 -3
  130. package/modern/Heatmap/seriesConfig/seriesProcessor.js +0 -21
  131. package/modern/Heatmap/seriesConfig/tooltip.d.ts +0 -3
  132. package/modern/Heatmap/seriesConfig/tooltip.js +0 -25
  133. package/modern/LineChartPro/LineChartPro.d.ts +0 -17
  134. package/modern/LineChartPro/LineChartPro.js +0 -403
  135. package/modern/LineChartPro/LineChartPro.plugins.d.ts +0 -4
  136. package/modern/LineChartPro/LineChartPro.plugins.js +0 -3
  137. package/modern/LineChartPro/index.d.ts +0 -1
  138. package/modern/LineChartPro/index.js +0 -1
  139. package/modern/ScatterChartPro/ScatterChartPro.d.ts +0 -17
  140. package/modern/ScatterChartPro/ScatterChartPro.js +0 -397
  141. package/modern/ScatterChartPro/ScatterChartPro.plugins.d.ts +0 -4
  142. package/modern/ScatterChartPro/ScatterChartPro.plugins.js +0 -3
  143. package/modern/ScatterChartPro/index.d.ts +0 -1
  144. package/modern/ScatterChartPro/index.js +0 -1
  145. package/modern/hooks/index.d.ts +0 -2
  146. package/modern/hooks/index.js +0 -2
  147. package/modern/hooks/useFunnelSeries.d.ts +0 -33
  148. package/modern/hooks/useFunnelSeries.js +0 -42
  149. package/modern/hooks/useHeatmapSeries.d.ts +0 -33
  150. package/modern/hooks/useHeatmapSeries.js +0 -42
  151. package/modern/hooks/zoom/index.d.ts +0 -1
  152. package/modern/hooks/zoom/index.js +0 -1
  153. package/modern/hooks/zoom/useIsZoomInteracting.d.ts +0 -6
  154. package/modern/hooks/zoom/useIsZoomInteracting.js +0 -14
  155. package/modern/index.d.ts +0 -34
  156. package/modern/index.js +0 -45
  157. package/modern/internals/plugins/allPlugins.d.ts +0 -8
  158. package/modern/internals/plugins/allPlugins.js +0 -6
  159. package/modern/internals/plugins/useChartProZoom/index.d.ts +0 -3
  160. package/modern/internals/plugins/useChartProZoom/index.js +0 -3
  161. package/modern/internals/plugins/useChartProZoom/useChartProZoom.d.ts +0 -3
  162. package/modern/internals/plugins/useChartProZoom/useChartProZoom.js +0 -350
  163. package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +0 -203
  164. package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +0 -4
  165. package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +0 -53
  166. package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.js +0 -1
  167. package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +0 -45
  168. package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.js +0 -126
  169. package/modern/internals/utils/releaseInfo.d.ts +0 -1
  170. package/modern/internals/utils/releaseInfo.js +0 -13
  171. package/modern/models/index.d.ts +0 -2
  172. package/modern/models/index.js +0 -2
  173. package/modern/models/seriesType/heatmap.d.ts +0 -28
  174. package/modern/models/seriesType/heatmap.js +0 -1
  175. package/modern/models/seriesType/index.d.ts +0 -1
  176. package/modern/models/seriesType/index.js +0 -1
  177. package/modern/package.json +0 -1
  178. package/modern/themeAugmentation/components.d.ts +0 -23
  179. package/modern/themeAugmentation/index.d.ts +0 -4
  180. package/modern/themeAugmentation/index.js +0 -0
  181. package/modern/themeAugmentation/overrides.d.ts +0 -11
  182. package/modern/themeAugmentation/props.d.ts +0 -20
  183. package/modern/typeOverloads/index.d.ts +0 -1
  184. package/modern/typeOverloads/index.js +0 -1
  185. package/modern/typeOverloads/modules.d.ts +0 -33
  186. package/modern/typeOverloads/modules.js +0 -1
  187. package/tsconfig.build.tsbuildinfo +0 -1
@@ -1,25 +0,0 @@
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;
@@ -1,17 +0,0 @@
1
- import * as React from 'react';
2
- import { LineChartProps } from '@mui/x-charts/LineChart';
3
- import { ChartContainerProProps } from "../ChartContainerPro/index.js";
4
- import { LineChartProPluginsSignatures } from "./LineChartPro.plugins.js";
5
- export interface LineChartProProps extends Omit<LineChartProps, 'apiRef'>, Omit<ChartContainerProProps<'line', LineChartProPluginsSignatures>, 'series' | 'plugins' | 'seriesConfig'> {}
6
- /**
7
- * Demos:
8
- *
9
- * - [Lines](https://mui.com/x/react-charts/lines/)
10
- * - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
11
- *
12
- * API:
13
- *
14
- * - [LineChart API](https://mui.com/x/api/charts/line-chart/)
15
- */
16
- declare const LineChartPro: React.ForwardRefExoticComponent<LineChartProProps & React.RefAttributes<SVGSVGElement>>;
17
- export { LineChartPro };
@@ -1,403 +0,0 @@
1
- 'use client';
2
-
3
- import _extends from "@babel/runtime/helpers/esm/extends";
4
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
- const _excluded = ["initialZoom", "zoomData", "onZoomChange", "apiRef"];
6
- import * as React from 'react';
7
- import PropTypes from 'prop-types';
8
- import { useThemeProps } from '@mui/material/styles';
9
- import { AreaPlot, LineHighlightPlot, LinePlot, MarkPlot } from '@mui/x-charts/LineChart';
10
- import { ChartsGrid } from '@mui/x-charts/ChartsGrid';
11
- import { ChartsOverlay } from '@mui/x-charts/ChartsOverlay';
12
- import { ChartsAxis } from '@mui/x-charts/ChartsAxis';
13
- import { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight';
14
- import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
15
- import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
16
- import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
17
- import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
18
- import { useLineChartProps, ChartsWrapper } from '@mui/x-charts/internals';
19
- import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
20
- import { ChartDataProviderPro } from "../ChartDataProviderPro/index.js";
21
- import { LINE_CHART_PRO_PLUGINS } from "./LineChartPro.plugins.js";
22
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
- /**
24
- * Demos:
25
- *
26
- * - [Lines](https://mui.com/x/react-charts/lines/)
27
- * - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
28
- *
29
- * API:
30
- *
31
- * - [LineChart API](https://mui.com/x/api/charts/line-chart/)
32
- */
33
- const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps, ref) {
34
- const props = useThemeProps({
35
- props: inProps,
36
- name: 'MuiLineChartPro'
37
- });
38
- const {
39
- initialZoom,
40
- zoomData,
41
- onZoomChange,
42
- apiRef
43
- } = props,
44
- other = _objectWithoutPropertiesLoose(props, _excluded);
45
- const {
46
- chartsWrapperProps,
47
- chartContainerProps,
48
- gridProps,
49
- clipPathProps,
50
- clipPathGroupProps,
51
- areaPlotProps,
52
- linePlotProps,
53
- markPlotProps,
54
- overlayProps,
55
- chartsAxisProps,
56
- axisHighlightProps,
57
- lineHighlightPlotProps,
58
- legendProps,
59
- children
60
- } = useLineChartProps(other);
61
- const {
62
- chartDataProviderProProps,
63
- chartsSurfaceProps
64
- } = useChartContainerProProps(_extends({}, chartContainerProps, {
65
- initialZoom,
66
- zoomData,
67
- onZoomChange,
68
- apiRef,
69
- plugins: LINE_CHART_PRO_PLUGINS
70
- }), ref);
71
- const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
72
- return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
73
- children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
74
- children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
75
- children: [/*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
76
- children: [/*#__PURE__*/_jsx(AreaPlot, _extends({}, areaPlotProps)), /*#__PURE__*/_jsx(LinePlot, _extends({}, linePlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
77
- })), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx("g", {
78
- "data-drawing-container": true,
79
- children: /*#__PURE__*/_jsx(MarkPlot, _extends({}, markPlotProps))
80
- }), /*#__PURE__*/_jsx(LineHighlightPlot, _extends({}, lineHighlightPlotProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), children]
81
- }))]
82
- }))
83
- }));
84
- });
85
- process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
86
- // ----------------------------- Warning --------------------------------
87
- // | These PropTypes are generated from the TypeScript type definitions |
88
- // | To update them edit the TypeScript types and run "pnpm proptypes" |
89
- // ----------------------------------------------------------------------
90
- apiRef: PropTypes.shape({
91
- current: PropTypes.shape({
92
- setZoomData: PropTypes.func.isRequired
93
- })
94
- }),
95
- /**
96
- * The configuration of axes highlight.
97
- * @see See {@link https://mui.com/x/react-charts/highlighting/ highlighting docs} for more details.
98
- * @default { x: 'line' }
99
- */
100
- axisHighlight: PropTypes.shape({
101
- x: PropTypes.oneOf(['band', 'line', 'none']),
102
- y: PropTypes.oneOf(['band', 'line', 'none'])
103
- }),
104
- children: PropTypes.node,
105
- className: PropTypes.string,
106
- /**
107
- * Color palette used to colorize multiple series.
108
- * @default rainbowSurgePalette
109
- */
110
- colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
111
- /**
112
- * An array of objects that can be used to populate series and axes data using their `dataKey` property.
113
- */
114
- dataset: PropTypes.arrayOf(PropTypes.object),
115
- desc: PropTypes.string,
116
- /**
117
- * If `true`, the charts will not listen to the mouse move event.
118
- * It might break interactive features, but will improve performance.
119
- * @default false
120
- */
121
- disableAxisListener: PropTypes.bool,
122
- /**
123
- * If `true`, render the line highlight item.
124
- */
125
- disableLineItemHighlight: PropTypes.bool,
126
- /**
127
- * Option to display a cartesian grid in the background.
128
- */
129
- grid: PropTypes.shape({
130
- horizontal: PropTypes.bool,
131
- vertical: PropTypes.bool
132
- }),
133
- /**
134
- * The height of the chart in px. If not defined, it takes the height of the parent element.
135
- */
136
- height: PropTypes.number,
137
- /**
138
- * If `true`, the legend is not rendered.
139
- */
140
- hideLegend: PropTypes.bool,
141
- /**
142
- * The highlighted item.
143
- * Used when the highlight is controlled.
144
- */
145
- highlightedItem: PropTypes.shape({
146
- dataIndex: PropTypes.number,
147
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
148
- }),
149
- /**
150
- * This prop is used to help implement the accessibility logic.
151
- * If you don't provide this prop. It falls back to a randomly generated id.
152
- */
153
- id: PropTypes.string,
154
- /**
155
- * The list of zoom data related to each axis.
156
- * Used to initialize the zoom in a specific configuration without controlling it.
157
- */
158
- initialZoom: PropTypes.arrayOf(PropTypes.shape({
159
- axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
160
- end: PropTypes.number.isRequired,
161
- start: PropTypes.number.isRequired
162
- })),
163
- /**
164
- * If `true`, a loading overlay is displayed.
165
- * @default false
166
- */
167
- loading: PropTypes.bool,
168
- /**
169
- * The margin between the SVG and the drawing area.
170
- * It's used for leaving some space for extra information such as the x- and y-axis or legend.
171
- *
172
- * Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
173
- */
174
- margin: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
175
- bottom: PropTypes.number,
176
- left: PropTypes.number,
177
- right: PropTypes.number,
178
- top: PropTypes.number
179
- })]),
180
- /**
181
- * Callback fired when an area element is clicked.
182
- */
183
- onAreaClick: PropTypes.func,
184
- /**
185
- * The function called for onClick events.
186
- * The second argument contains information about all line/bar elements at the current mouse position.
187
- * @param {MouseEvent} event The mouse event recorded on the `<svg/>` element.
188
- * @param {null | AxisData} data The data about the clicked axis and items associated with it.
189
- */
190
- onAxisClick: PropTypes.func,
191
- /**
192
- * The callback fired when the highlighted item changes.
193
- *
194
- * @param {HighlightItemData | null} highlightedItem The newly highlighted item.
195
- */
196
- onHighlightChange: PropTypes.func,
197
- /**
198
- * Callback fired when a line element is clicked.
199
- */
200
- onLineClick: PropTypes.func,
201
- /**
202
- * Callback fired when a mark element is clicked.
203
- */
204
- onMarkClick: PropTypes.func,
205
- /**
206
- * Callback fired when the zoom has changed.
207
- *
208
- * @param {ZoomData[]} zoomData Updated zoom data.
209
- */
210
- onZoomChange: PropTypes.func,
211
- /**
212
- * The series to display in the line chart.
213
- * An array of [[LineSeriesType]] objects.
214
- */
215
- series: PropTypes.arrayOf(PropTypes.object).isRequired,
216
- /**
217
- * If `true`, animations are skipped.
218
- * @default false
219
- */
220
- skipAnimation: PropTypes.bool,
221
- /**
222
- * The props used for each component slot.
223
- * @default {}
224
- */
225
- slotProps: PropTypes.object,
226
- /**
227
- * Overridable component slots.
228
- * @default {}
229
- */
230
- slots: PropTypes.object,
231
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
232
- theme: PropTypes.oneOf(['dark', 'light']),
233
- title: PropTypes.string,
234
- /**
235
- * The width of the chart in px. If not defined, it takes the width of the parent element.
236
- */
237
- width: PropTypes.number,
238
- /**
239
- * The configuration of the x-axes.
240
- * If not provided, a default axis config is used.
241
- * An array of [[AxisConfig]] objects.
242
- */
243
- xAxis: PropTypes.arrayOf(PropTypes.shape({
244
- axis: PropTypes.oneOf(['x']),
245
- classes: PropTypes.object,
246
- colorMap: PropTypes.oneOfType([PropTypes.shape({
247
- colors: PropTypes.arrayOf(PropTypes.string).isRequired,
248
- type: PropTypes.oneOf(['ordinal']).isRequired,
249
- unknownColor: PropTypes.string,
250
- values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
251
- }), PropTypes.shape({
252
- color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
253
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
254
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
255
- type: PropTypes.oneOf(['continuous']).isRequired
256
- }), PropTypes.shape({
257
- colors: PropTypes.arrayOf(PropTypes.string).isRequired,
258
- thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
259
- type: PropTypes.oneOf(['piecewise']).isRequired
260
- })]),
261
- data: PropTypes.array,
262
- dataKey: PropTypes.string,
263
- disableLine: PropTypes.bool,
264
- disableTicks: PropTypes.bool,
265
- domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
266
- fill: PropTypes.string,
267
- height: PropTypes.number,
268
- hideTooltip: PropTypes.bool,
269
- id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
270
- ignoreTooltip: PropTypes.bool,
271
- label: PropTypes.string,
272
- labelStyle: PropTypes.object,
273
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
274
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
275
- offset: PropTypes.number,
276
- position: PropTypes.oneOf(['bottom', 'none', 'top']),
277
- reverse: PropTypes.bool,
278
- scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
279
- slotProps: PropTypes.object,
280
- slots: PropTypes.object,
281
- stroke: PropTypes.string,
282
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
283
- tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
284
- tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
285
- tickLabelMinGap: PropTypes.number,
286
- tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
287
- tickLabelStyle: PropTypes.object,
288
- tickMaxStep: PropTypes.number,
289
- tickMinStep: PropTypes.number,
290
- tickNumber: PropTypes.number,
291
- tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
292
- tickSize: PropTypes.number,
293
- valueFormatter: PropTypes.func,
294
- zoom: PropTypes.oneOfType([PropTypes.shape({
295
- filterMode: PropTypes.oneOf(['discard', 'keep']),
296
- maxEnd: PropTypes.number,
297
- maxSpan: PropTypes.number,
298
- minSpan: PropTypes.number,
299
- minStart: PropTypes.number,
300
- panning: PropTypes.bool,
301
- step: PropTypes.number
302
- }), PropTypes.bool])
303
- })),
304
- /**
305
- * The configuration of the y-axes.
306
- * If not provided, a default axis config is used.
307
- * An array of [[AxisConfig]] objects.
308
- */
309
- yAxis: PropTypes.arrayOf(PropTypes.shape({
310
- axis: PropTypes.oneOf(['y']),
311
- classes: PropTypes.object,
312
- colorMap: PropTypes.oneOfType([PropTypes.shape({
313
- colors: PropTypes.arrayOf(PropTypes.string).isRequired,
314
- type: PropTypes.oneOf(['ordinal']).isRequired,
315
- unknownColor: PropTypes.string,
316
- values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
317
- }), PropTypes.shape({
318
- color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
319
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
320
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
321
- type: PropTypes.oneOf(['continuous']).isRequired
322
- }), PropTypes.shape({
323
- colors: PropTypes.arrayOf(PropTypes.string).isRequired,
324
- thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
325
- type: PropTypes.oneOf(['piecewise']).isRequired
326
- })]),
327
- data: PropTypes.array,
328
- dataKey: PropTypes.string,
329
- disableLine: PropTypes.bool,
330
- disableTicks: PropTypes.bool,
331
- domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
332
- fill: PropTypes.string,
333
- hideTooltip: PropTypes.bool,
334
- id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
335
- ignoreTooltip: PropTypes.bool,
336
- label: PropTypes.string,
337
- labelStyle: PropTypes.object,
338
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
339
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
340
- offset: PropTypes.number,
341
- position: PropTypes.oneOf(['left', 'none', 'right']),
342
- reverse: PropTypes.bool,
343
- scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
344
- slotProps: PropTypes.object,
345
- slots: PropTypes.object,
346
- stroke: PropTypes.string,
347
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
348
- tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
349
- tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
350
- tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
351
- tickLabelStyle: PropTypes.object,
352
- tickMaxStep: PropTypes.number,
353
- tickMinStep: PropTypes.number,
354
- tickNumber: PropTypes.number,
355
- tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
356
- tickSize: PropTypes.number,
357
- valueFormatter: PropTypes.func,
358
- width: PropTypes.number,
359
- zoom: PropTypes.oneOfType([PropTypes.shape({
360
- filterMode: PropTypes.oneOf(['discard', 'keep']),
361
- maxEnd: PropTypes.number,
362
- maxSpan: PropTypes.number,
363
- minSpan: PropTypes.number,
364
- minStart: PropTypes.number,
365
- panning: PropTypes.bool,
366
- step: PropTypes.number
367
- }), PropTypes.bool])
368
- })),
369
- /**
370
- * The configuration of the z-axes.
371
- */
372
- zAxis: PropTypes.arrayOf(PropTypes.shape({
373
- colorMap: PropTypes.oneOfType([PropTypes.shape({
374
- colors: PropTypes.arrayOf(PropTypes.string).isRequired,
375
- type: PropTypes.oneOf(['ordinal']).isRequired,
376
- unknownColor: PropTypes.string,
377
- values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
378
- }), PropTypes.shape({
379
- color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
380
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
381
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
382
- type: PropTypes.oneOf(['continuous']).isRequired
383
- }), PropTypes.shape({
384
- colors: PropTypes.arrayOf(PropTypes.string).isRequired,
385
- thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
386
- type: PropTypes.oneOf(['piecewise']).isRequired
387
- })]),
388
- data: PropTypes.array,
389
- dataKey: PropTypes.string,
390
- id: PropTypes.string,
391
- max: PropTypes.number,
392
- min: PropTypes.number
393
- })),
394
- /**
395
- * The list of zoom data related to each axis.
396
- */
397
- zoomData: PropTypes.arrayOf(PropTypes.shape({
398
- axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
399
- end: PropTypes.number.isRequired,
400
- start: PropTypes.number.isRequired
401
- }))
402
- } : void 0;
403
- export { LineChartPro };
@@ -1,4 +0,0 @@
1
- import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
2
- import { UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
3
- export type LineChartProPluginsSignatures = [UseChartZAxisSignature, UseChartCartesianAxisSignature<'line'>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature];
4
- export declare const LINE_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<LineChartProPluginsSignatures>;
@@ -1,3 +0,0 @@
1
- import { useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight } from '@mui/x-charts/internals';
2
- import { useChartProZoom } from "../internals/plugins/useChartProZoom/index.js";
3
- export const LINE_CHART_PRO_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartProZoom];
@@ -1 +0,0 @@
1
- export * from "./LineChartPro.js";
@@ -1 +0,0 @@
1
- export * from "./LineChartPro.js";
@@ -1,17 +0,0 @@
1
- import * as React from 'react';
2
- import { ScatterChartProps } from '@mui/x-charts/ScatterChart';
3
- import { ChartContainerProProps } from "../ChartContainerPro/ChartContainerPro.js";
4
- import { ScatterChartProPluginsSignatures } from "./ScatterChartPro.plugins.js";
5
- export interface ScatterChartProProps extends Omit<ScatterChartProps, 'apiRef'>, Omit<ChartContainerProProps<'scatter', ScatterChartProPluginsSignatures>, 'series' | 'plugins' | 'seriesConfig' | 'onItemClick'> {}
6
- /**
7
- * Demos:
8
- *
9
- * - [Scatter](https://mui.com/x/react-charts/scatter/)
10
- * - [Scatter demonstration](https://mui.com/x/react-charts/scatter-demo/)
11
- *
12
- * API:
13
- *
14
- * - [ScatterChart API](https://mui.com/x/api/charts/scatter-chart/)
15
- */
16
- declare const ScatterChartPro: React.ForwardRefExoticComponent<ScatterChartProProps & React.RefAttributes<SVGSVGElement>>;
17
- export { ScatterChartPro };