@mui/x-charts 7.0.0-alpha.1 → 7.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.
Files changed (133) hide show
  1. package/BarChart/BarElement.d.ts +5 -1
  2. package/BarChart/BarElement.js +24 -1
  3. package/BarChart/index.d.ts +3 -2
  4. package/BarChart/index.js +31 -12
  5. package/CHANGELOG.md +607 -188
  6. package/ChartsLegend/index.d.ts +1 -0
  7. package/ChartsLegend/index.js +11 -0
  8. package/ChartsTooltip/ChartsAxisTooltipContent.d.ts +6 -3
  9. package/ChartsTooltip/ChartsAxisTooltipContent.js +93 -69
  10. package/ChartsTooltip/ChartsItemTooltipContent.d.ts +6 -3
  11. package/ChartsTooltip/ChartsItemTooltipContent.js +38 -53
  12. package/ChartsTooltip/ChartsTooltip.d.ts +1 -1
  13. package/ChartsTooltip/ChartsTooltip.js +13 -5
  14. package/ChartsTooltip/ChartsTooltipTable.js +3 -3
  15. package/ChartsTooltip/DefaultChartsAxisTooltipContent.d.ts +7 -0
  16. package/ChartsTooltip/DefaultChartsAxisTooltipContent.js +174 -0
  17. package/ChartsTooltip/DefaultChartsItemTooltipContent.d.ts +8 -0
  18. package/ChartsTooltip/DefaultChartsItemTooltipContent.js +99 -0
  19. package/ChartsTooltip/chartsTooltipClasses.d.ts +21 -0
  20. package/ChartsTooltip/chartsTooltipClasses.js +12 -0
  21. package/ChartsTooltip/index.d.ts +5 -0
  22. package/ChartsTooltip/index.js +55 -0
  23. package/ChartsTooltip/utils.d.ts +1 -1
  24. package/ChartsTooltip/utils.js +2 -2
  25. package/ChartsYAxis/ChartsYAxis.js +6 -4
  26. package/LineChart/extremums.js +25 -8
  27. package/LineChart/index.d.ts +5 -5
  28. package/LineChart/index.js +50 -41
  29. package/PieChart/PieArc.d.ts +5 -2
  30. package/PieChart/PieArc.js +17 -2
  31. package/PieChart/PieArcLabel.d.ts +1 -1
  32. package/PieChart/PieArcLabel.js +5 -10
  33. package/PieChart/PieArcLabelPlot.d.ts +5 -1
  34. package/PieChart/PieArcLabelPlot.js +91 -3
  35. package/PieChart/PieArcPlot.d.ts +5 -1
  36. package/PieChart/PieArcPlot.js +90 -3
  37. package/PieChart/index.d.ts +4 -2
  38. package/PieChart/index.js +42 -18
  39. package/README.md +0 -1
  40. package/ScatterChart/Scatter.js +1 -1
  41. package/ScatterChart/index.d.ts +3 -3
  42. package/ScatterChart/index.js +31 -19
  43. package/SparkLineChart/index.d.ts +1 -1
  44. package/SparkLineChart/index.js +11 -7
  45. package/esm/BarChart/BarElement.js +26 -2
  46. package/esm/BarChart/index.js +3 -2
  47. package/esm/ChartsLegend/index.js +2 -1
  48. package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +95 -71
  49. package/esm/ChartsTooltip/ChartsItemTooltipContent.js +40 -54
  50. package/esm/ChartsTooltip/ChartsTooltip.js +15 -7
  51. package/esm/ChartsTooltip/ChartsTooltipTable.js +3 -3
  52. package/esm/ChartsTooltip/DefaultChartsAxisTooltipContent.js +168 -0
  53. package/esm/ChartsTooltip/DefaultChartsItemTooltipContent.js +92 -0
  54. package/esm/ChartsTooltip/chartsTooltipClasses.js +5 -0
  55. package/esm/ChartsTooltip/index.js +6 -1
  56. package/esm/ChartsTooltip/utils.js +1 -1
  57. package/esm/ChartsYAxis/ChartsYAxis.js +6 -4
  58. package/esm/LineChart/extremums.js +25 -8
  59. package/esm/LineChart/index.js +5 -5
  60. package/esm/PieChart/PieArc.js +18 -2
  61. package/esm/PieChart/PieArcLabel.js +7 -11
  62. package/esm/PieChart/PieArcLabelPlot.js +92 -3
  63. package/esm/PieChart/PieArcPlot.js +91 -3
  64. package/esm/PieChart/index.js +4 -2
  65. package/esm/ScatterChart/Scatter.js +1 -1
  66. package/esm/ScatterChart/index.js +3 -3
  67. package/esm/SparkLineChart/index.js +1 -1
  68. package/esm/internals/defaultizeValueFormatter.js +4 -3
  69. package/index.js +1 -1
  70. package/internals/defaultizeValueFormatter.d.ts +3 -1
  71. package/internals/defaultizeValueFormatter.js +3 -3
  72. package/legacy/BarChart/BarElement.js +26 -2
  73. package/legacy/BarChart/index.js +3 -2
  74. package/legacy/ChartsLegend/index.js +2 -1
  75. package/legacy/ChartsReferenceLine/common.js +3 -4
  76. package/legacy/ChartsTooltip/ChartsAxisTooltipContent.js +95 -70
  77. package/legacy/ChartsTooltip/ChartsItemTooltipContent.js +40 -51
  78. package/legacy/ChartsTooltip/ChartsTooltip.js +20 -12
  79. package/legacy/ChartsTooltip/ChartsTooltipTable.js +7 -8
  80. package/legacy/ChartsTooltip/DefaultChartsAxisTooltipContent.js +167 -0
  81. package/legacy/ChartsTooltip/DefaultChartsItemTooltipContent.js +89 -0
  82. package/legacy/ChartsTooltip/chartsTooltipClasses.js +5 -0
  83. package/legacy/ChartsTooltip/index.js +6 -1
  84. package/legacy/ChartsTooltip/utils.js +1 -1
  85. package/legacy/ChartsYAxis/ChartsYAxis.js +6 -4
  86. package/legacy/LineChart/extremums.js +29 -14
  87. package/legacy/LineChart/index.js +5 -5
  88. package/legacy/PieChart/PieArc.js +18 -2
  89. package/legacy/PieChart/PieArcLabel.js +7 -11
  90. package/legacy/PieChart/PieArcLabelPlot.js +92 -3
  91. package/legacy/PieChart/PieArcPlot.js +91 -3
  92. package/legacy/PieChart/index.js +4 -2
  93. package/legacy/ScatterChart/Scatter.js +1 -1
  94. package/legacy/ScatterChart/index.js +3 -3
  95. package/legacy/SparkLineChart/index.js +1 -1
  96. package/legacy/index.js +1 -1
  97. package/legacy/internals/components/AxisSharedComponents.js +5 -6
  98. package/legacy/internals/defaultizeValueFormatter.js +4 -3
  99. package/models/seriesType/config.d.ts +5 -1
  100. package/models/seriesType/scatter.d.ts +1 -1
  101. package/modern/BarChart/BarElement.js +26 -2
  102. package/modern/BarChart/index.js +3 -2
  103. package/modern/ChartsLegend/index.js +2 -1
  104. package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +95 -70
  105. package/modern/ChartsTooltip/ChartsItemTooltipContent.js +40 -54
  106. package/modern/ChartsTooltip/ChartsTooltip.js +15 -7
  107. package/modern/ChartsTooltip/ChartsTooltipTable.js +3 -3
  108. package/modern/ChartsTooltip/DefaultChartsAxisTooltipContent.js +167 -0
  109. package/modern/ChartsTooltip/DefaultChartsItemTooltipContent.js +92 -0
  110. package/modern/ChartsTooltip/chartsTooltipClasses.js +5 -0
  111. package/modern/ChartsTooltip/index.js +6 -1
  112. package/modern/ChartsTooltip/utils.js +1 -1
  113. package/modern/ChartsYAxis/ChartsYAxis.js +6 -4
  114. package/modern/LineChart/extremums.js +25 -8
  115. package/modern/LineChart/index.js +5 -5
  116. package/modern/PieChart/PieArc.js +18 -2
  117. package/modern/PieChart/PieArcLabel.js +7 -11
  118. package/modern/PieChart/PieArcLabelPlot.js +92 -3
  119. package/modern/PieChart/PieArcPlot.js +91 -3
  120. package/modern/PieChart/index.js +4 -2
  121. package/modern/ScatterChart/Scatter.js +1 -1
  122. package/modern/ScatterChart/index.js +3 -3
  123. package/modern/SparkLineChart/index.js +1 -1
  124. package/modern/index.js +1 -1
  125. package/modern/internals/defaultizeValueFormatter.js +3 -3
  126. package/package.json +5 -4
  127. package/themeAugmentation/components.d.ts +1 -0
  128. package/themeAugmentation/overrides.d.ts +2 -0
  129. package/ChartsTooltip/tooltipClasses.d.ts +0 -13
  130. package/ChartsTooltip/tooltipClasses.js +0 -12
  131. package/esm/ChartsTooltip/tooltipClasses.js +0 -5
  132. package/legacy/ChartsTooltip/tooltipClasses.js +0 -5
  133. package/modern/ChartsTooltip/tooltipClasses.js +0 -5
@@ -1355,4 +1355,8 @@ export type BarElementProps = Omit<BarElementOwnerState, 'isFaded' | 'isHighligh
1355
1355
  bar?: React.ElementType;
1356
1356
  };
1357
1357
  };
1358
- export declare function BarElement(props: BarElementProps): React.JSX.Element;
1358
+ declare function BarElement(props: BarElementProps): React.JSX.Element;
1359
+ declare namespace BarElement {
1360
+ var propTypes: any;
1361
+ }
1362
+ export { BarElement };
@@ -10,6 +10,7 @@ exports.getBarElementUtilityClass = getBarElementUtilityClass;
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
11
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
12
12
  var React = _interopRequireWildcard(require("react"));
13
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
14
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
14
15
  var _utils = require("@mui/base/utils");
15
16
  var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
@@ -100,4 +101,26 @@ function BarElement(props) {
100
101
  ownerState
101
102
  });
102
103
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Bar, (0, _extends2.default)({}, barProps));
103
- }
104
+ }
105
+ process.env.NODE_ENV !== "production" ? BarElement.propTypes = {
106
+ // ----------------------------- Warning --------------------------------
107
+ // | These PropTypes are generated from the TypeScript type definitions |
108
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
109
+ // ----------------------------------------------------------------------
110
+ classes: _propTypes.default.object,
111
+ dataIndex: _propTypes.default.number.isRequired,
112
+ highlightScope: _propTypes.default.shape({
113
+ faded: _propTypes.default.oneOf(['global', 'none', 'series']),
114
+ highlighted: _propTypes.default.oneOf(['item', 'none', 'series'])
115
+ }),
116
+ /**
117
+ * The props used for each component slot.
118
+ * @default {}
119
+ */
120
+ slotProps: _propTypes.default.object,
121
+ /**
122
+ * Overridable component slots.
123
+ * @default {}
124
+ */
125
+ slots: _propTypes.default.object
126
+ } : void 0;
@@ -1,2 +1,3 @@
1
- export { BarPlot } from './BarPlot';
2
- export { BarChart } from './BarChart';
1
+ export * from './BarChart';
2
+ export * from './BarPlot';
3
+ export * from './BarElement';
package/BarChart/index.js CHANGED
@@ -3,17 +3,36 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "BarChart", {
7
- enumerable: true,
8
- get: function () {
9
- return _BarChart.BarChart;
10
- }
11
- });
12
- Object.defineProperty(exports, "BarPlot", {
13
- enumerable: true,
14
- get: function () {
15
- return _BarPlot.BarPlot;
16
- }
6
+ var _BarChart = require("./BarChart");
7
+ Object.keys(_BarChart).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _BarChart[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _BarChart[key];
14
+ }
15
+ });
17
16
  });
18
17
  var _BarPlot = require("./BarPlot");
19
- var _BarChart = require("./BarChart");
18
+ Object.keys(_BarPlot).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _BarPlot[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _BarPlot[key];
25
+ }
26
+ });
27
+ });
28
+ var _BarElement = require("./BarElement");
29
+ Object.keys(_BarElement).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _BarElement[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _BarElement[key];
36
+ }
37
+ });
38
+ });