@mui/x-charts-pro 8.1.0 → 8.3.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 (198) hide show
  1. package/BarChartPro/BarChartPro.d.ts +7 -1
  2. package/BarChartPro/BarChartPro.js +62 -5
  3. package/CHANGELOG.md +233 -7
  4. package/ChartContainerPro/useChartContainerProProps.d.ts +1 -1
  5. package/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
  6. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +2 -2
  7. package/ChartZoomSlider/ChartZoomSlider.d.ts +5 -0
  8. package/ChartZoomSlider/ChartZoomSlider.js +47 -0
  9. package/ChartZoomSlider/index.d.ts +2 -0
  10. package/ChartZoomSlider/index.js +27 -0
  11. package/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +23 -0
  12. package/ChartZoomSlider/internals/ChartAxisZoomSlider.js +348 -0
  13. package/ChartZoomSlider/internals/ChartAxisZoomSliderHandle.d.ts +12 -0
  14. package/ChartZoomSlider/internals/ChartAxisZoomSliderHandle.js +92 -0
  15. package/ChartZoomSlider/internals/chartAxisZoomSliderHandleClasses.d.ts +17 -0
  16. package/ChartZoomSlider/internals/chartAxisZoomSliderHandleClasses.js +27 -0
  17. package/ChartsToolbarPro/ChartsToolbarPro.d.ts +2 -0
  18. package/ChartsToolbarPro/ChartsToolbarPro.js +31 -0
  19. package/ChartsToolbarPro/index.d.ts +1 -0
  20. package/ChartsToolbarPro/index.js +16 -0
  21. package/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.d.ts +13 -0
  22. package/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.js +36 -0
  23. package/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.d.ts +13 -0
  24. package/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.js +36 -0
  25. package/FunnelChart/FunnelChart.js +9 -8
  26. package/FunnelChart/FunnelPlot.d.ts +5 -0
  27. package/FunnelChart/FunnelPlot.js +36 -18
  28. package/FunnelChart/FunnelSection.d.ts +1 -0
  29. package/FunnelChart/FunnelSection.js +12 -7
  30. package/FunnelChart/curves/borderRadiusPolygon.d.ts +8 -0
  31. package/FunnelChart/curves/borderRadiusPolygon.js +42 -0
  32. package/FunnelChart/curves/bump.d.ts +27 -0
  33. package/FunnelChart/curves/bump.js +81 -0
  34. package/FunnelChart/curves/curve.types.d.ts +38 -0
  35. package/FunnelChart/curves/curve.types.js +5 -0
  36. package/FunnelChart/curves/getFunnelCurve.d.ts +3 -0
  37. package/FunnelChart/curves/getFunnelCurve.js +30 -0
  38. package/FunnelChart/curves/index.d.ts +2 -0
  39. package/FunnelChart/curves/index.js +27 -0
  40. package/FunnelChart/curves/linear.d.ts +32 -0
  41. package/FunnelChart/curves/linear.js +88 -0
  42. package/FunnelChart/curves/pyramid.d.ts +34 -0
  43. package/FunnelChart/curves/pyramid.js +127 -0
  44. package/FunnelChart/curves/step-pyramid.d.ts +31 -0
  45. package/FunnelChart/curves/step-pyramid.js +107 -0
  46. package/FunnelChart/curves/step.d.ts +32 -0
  47. package/FunnelChart/curves/step.js +88 -0
  48. package/FunnelChart/curves/utils.d.ts +4 -0
  49. package/FunnelChart/curves/utils.js +29 -0
  50. package/FunnelChart/funnel.types.d.ts +25 -4
  51. package/FunnelChart/funnelPlotSlots.types.d.ts +1 -1
  52. package/FunnelChart/funnelSectionClasses.d.ts +6 -2
  53. package/FunnelChart/funnelSectionClasses.js +5 -2
  54. package/FunnelChart/index.d.ts +3 -2
  55. package/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +1 -0
  56. package/FunnelChart/useFunnelChartProps.d.ts +1 -6
  57. package/FunnelChart/useFunnelChartProps.js +7 -15
  58. package/Heatmap/Heatmap.d.ts +3 -3
  59. package/Heatmap/Heatmap.js +3 -21
  60. package/LineChartPro/LineChartPro.d.ts +7 -1
  61. package/LineChartPro/LineChartPro.js +62 -5
  62. package/ScatterChartPro/ScatterChartPro.d.ts +7 -1
  63. package/ScatterChartPro/ScatterChartPro.js +62 -5
  64. package/esm/BarChartPro/BarChartPro.d.ts +7 -1
  65. package/esm/BarChartPro/BarChartPro.js +62 -5
  66. package/esm/ChartContainerPro/useChartContainerProProps.d.ts +1 -1
  67. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
  68. package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +2 -2
  69. package/esm/ChartZoomSlider/ChartZoomSlider.d.ts +5 -0
  70. package/esm/ChartZoomSlider/ChartZoomSlider.js +41 -0
  71. package/esm/ChartZoomSlider/index.d.ts +2 -0
  72. package/esm/ChartZoomSlider/index.js +2 -0
  73. package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +23 -0
  74. package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.js +339 -0
  75. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderHandle.d.ts +12 -0
  76. package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderHandle.js +85 -0
  77. package/esm/ChartZoomSlider/internals/chartAxisZoomSliderHandleClasses.d.ts +17 -0
  78. package/esm/ChartZoomSlider/internals/chartAxisZoomSliderHandleClasses.js +17 -0
  79. package/esm/ChartsToolbarPro/ChartsToolbarPro.d.ts +2 -0
  80. package/esm/ChartsToolbarPro/ChartsToolbarPro.js +24 -0
  81. package/esm/ChartsToolbarPro/index.d.ts +1 -0
  82. package/esm/ChartsToolbarPro/index.js +1 -0
  83. package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.d.ts +13 -0
  84. package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomInButton.js +29 -0
  85. package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.d.ts +13 -0
  86. package/esm/ChartsToolbarPro/internal/ChartsToolbarZoomOutButton.js +29 -0
  87. package/esm/FunnelChart/FunnelChart.js +9 -8
  88. package/esm/FunnelChart/FunnelPlot.d.ts +5 -0
  89. package/esm/FunnelChart/FunnelPlot.js +37 -19
  90. package/esm/FunnelChart/FunnelSection.d.ts +1 -0
  91. package/esm/FunnelChart/FunnelSection.js +12 -7
  92. package/esm/FunnelChart/curves/borderRadiusPolygon.d.ts +8 -0
  93. package/esm/FunnelChart/curves/borderRadiusPolygon.js +36 -0
  94. package/esm/FunnelChart/curves/bump.d.ts +27 -0
  95. package/esm/FunnelChart/curves/bump.js +74 -0
  96. package/esm/FunnelChart/curves/curve.types.d.ts +38 -0
  97. package/esm/FunnelChart/curves/curve.types.js +1 -0
  98. package/esm/FunnelChart/curves/getFunnelCurve.d.ts +3 -0
  99. package/esm/FunnelChart/curves/getFunnelCurve.js +23 -0
  100. package/esm/FunnelChart/curves/index.d.ts +2 -0
  101. package/esm/FunnelChart/curves/index.js +2 -0
  102. package/esm/FunnelChart/curves/linear.d.ts +32 -0
  103. package/esm/FunnelChart/curves/linear.js +82 -0
  104. package/esm/FunnelChart/curves/pyramid.d.ts +34 -0
  105. package/esm/FunnelChart/curves/pyramid.js +121 -0
  106. package/esm/FunnelChart/curves/step-pyramid.d.ts +31 -0
  107. package/esm/FunnelChart/curves/step-pyramid.js +101 -0
  108. package/esm/FunnelChart/curves/step.d.ts +32 -0
  109. package/esm/FunnelChart/curves/step.js +82 -0
  110. package/esm/FunnelChart/curves/utils.d.ts +4 -0
  111. package/esm/FunnelChart/curves/utils.js +19 -0
  112. package/esm/FunnelChart/funnel.types.d.ts +25 -4
  113. package/esm/FunnelChart/funnelPlotSlots.types.d.ts +1 -1
  114. package/esm/FunnelChart/funnelSectionClasses.d.ts +6 -2
  115. package/esm/FunnelChart/funnelSectionClasses.js +5 -2
  116. package/esm/FunnelChart/index.d.ts +3 -2
  117. package/esm/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +1 -0
  118. package/esm/FunnelChart/useFunnelChartProps.d.ts +1 -6
  119. package/esm/FunnelChart/useFunnelChartProps.js +7 -15
  120. package/esm/Heatmap/Heatmap.d.ts +3 -3
  121. package/esm/Heatmap/Heatmap.js +3 -21
  122. package/esm/LineChartPro/LineChartPro.d.ts +7 -1
  123. package/esm/LineChartPro/LineChartPro.js +62 -5
  124. package/esm/ScatterChartPro/ScatterChartPro.d.ts +7 -1
  125. package/esm/ScatterChartPro/ScatterChartPro.js +62 -5
  126. package/esm/index.d.ts +4 -1
  127. package/esm/index.js +5 -2
  128. package/esm/internals/material/icons.d.ts +3 -0
  129. package/esm/internals/material/icons.js +13 -0
  130. package/esm/internals/material/index.d.ts +4 -0
  131. package/esm/internals/material/index.js +12 -0
  132. package/esm/internals/plugins/useChartProExport/common.d.ts +1 -0
  133. package/esm/internals/plugins/useChartProExport/common.js +8 -0
  134. package/esm/internals/plugins/useChartProExport/exportImage.d.ts +3 -0
  135. package/esm/internals/plugins/useChartProExport/exportImage.js +85 -0
  136. package/esm/internals/plugins/useChartProExport/print.js +6 -50
  137. package/esm/internals/plugins/useChartProExport/useChartProExport.js +22 -2
  138. package/esm/internals/plugins/useChartProExport/useChartProExport.types.d.ts +32 -0
  139. package/esm/internals/plugins/useChartProZoom/calculateZoom.d.ts +23 -0
  140. package/esm/internals/plugins/useChartProZoom/calculateZoom.js +32 -0
  141. package/esm/internals/plugins/useChartProZoom/useChartProZoom.d.ts +1 -1
  142. package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +46 -4
  143. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +84 -32
  144. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +3 -2
  145. package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +17 -2
  146. package/esm/internals/slots/chartBaseSlotProps.d.ts +10 -0
  147. package/esm/internals/slots/chartBaseSlotProps.js +1 -0
  148. package/esm/internals/slots/chartsBaseSlots.d.ts +6 -0
  149. package/esm/internals/slots/chartsBaseSlots.js +1 -0
  150. package/esm/internals/slots/chartsIconSlots.d.ts +14 -0
  151. package/esm/internals/slots/chartsIconSlots.js +1 -0
  152. package/esm/themeAugmentation/components.d.ts +0 -4
  153. package/esm/themeAugmentation/components.js +1 -0
  154. package/esm/themeAugmentation/index.d.ts +3 -3
  155. package/esm/themeAugmentation/overrides.d.ts +0 -3
  156. package/esm/themeAugmentation/overrides.js +2 -0
  157. package/esm/themeAugmentation/props.d.ts +0 -6
  158. package/esm/themeAugmentation/props.js +2 -0
  159. package/esm/typeOverloads/modules.d.ts +1 -1
  160. package/index.d.ts +4 -1
  161. package/index.js +90 -1
  162. package/internals/material/icons.d.ts +3 -0
  163. package/internals/material/icons.js +20 -0
  164. package/internals/material/index.d.ts +4 -0
  165. package/internals/material/index.js +19 -0
  166. package/internals/plugins/useChartProExport/common.d.ts +1 -0
  167. package/internals/plugins/useChartProExport/common.js +14 -0
  168. package/internals/plugins/useChartProExport/exportImage.d.ts +3 -0
  169. package/internals/plugins/useChartProExport/exportImage.js +95 -0
  170. package/internals/plugins/useChartProExport/print.js +6 -50
  171. package/internals/plugins/useChartProExport/useChartProExport.js +22 -2
  172. package/internals/plugins/useChartProExport/useChartProExport.types.d.ts +32 -0
  173. package/internals/plugins/useChartProZoom/calculateZoom.d.ts +23 -0
  174. package/internals/plugins/useChartProZoom/calculateZoom.js +39 -0
  175. package/internals/plugins/useChartProZoom/useChartProZoom.d.ts +1 -1
  176. package/internals/plugins/useChartProZoom/useChartProZoom.js +45 -3
  177. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +84 -32
  178. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +3 -2
  179. package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +17 -2
  180. package/internals/slots/chartBaseSlotProps.d.ts +10 -0
  181. package/internals/slots/chartBaseSlotProps.js +5 -0
  182. package/internals/slots/chartsBaseSlots.d.ts +6 -0
  183. package/internals/slots/chartsBaseSlots.js +5 -0
  184. package/internals/slots/chartsIconSlots.d.ts +14 -0
  185. package/internals/slots/chartsIconSlots.js +5 -0
  186. package/package.json +10 -7
  187. package/themeAugmentation/components.d.ts +0 -4
  188. package/themeAugmentation/components.js +5 -0
  189. package/themeAugmentation/index.d.ts +3 -3
  190. package/themeAugmentation/overrides.d.ts +0 -3
  191. package/themeAugmentation/overrides.js +5 -0
  192. package/themeAugmentation/props.d.ts +0 -6
  193. package/themeAugmentation/props.js +5 -0
  194. package/typeOverloads/modules.d.ts +1 -1
  195. package/FunnelChart/funnelStepCurve.d.ts +0 -4
  196. package/FunnelChart/funnelStepCurve.js +0 -74
  197. package/esm/FunnelChart/funnelStepCurve.d.ts +0 -4
  198. package/esm/FunnelChart/funnelStepCurve.js +0 -67
@@ -1,74 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.funnelVerticalStepCurve = exports.funnelHorizontalStepCurve = void 0;
7
- /**
8
- * This is a custom "step" curve generator for the funnel chart.
9
- * It is used to draw the funnel using "rectangles" without having to rework the rendering logic.
10
- *
11
- * It is based on the d3-shape step curve generator.
12
- * https://github.com/d3/d3-shape/blob/a82254af78f08799c71d7ab25df557c4872a3c51/src/curve/step.js
13
- */
14
- class FunnelStep {
15
- constructor(context, isHorizontal) {
16
- this.context = void 0;
17
- this.line = NaN;
18
- this.x = NaN;
19
- this.y = NaN;
20
- this.currentPoint = 0;
21
- this.isHorizontal = false;
22
- this.context = context;
23
- this.isHorizontal = isHorizontal;
24
- }
25
- areaStart() {
26
- this.line = 0;
27
- }
28
- areaEnd() {
29
- this.line = NaN;
30
- }
31
- lineStart() {
32
- this.x = NaN;
33
- this.y = NaN;
34
- this.currentPoint = 0;
35
- }
36
- lineEnd() {
37
- if (this.currentPoint === 2) {
38
- this.context.lineTo(this.x, this.y);
39
- }
40
- if (this.line || this.line !== 0 && this.currentPoint === 1) {
41
- this.context.closePath();
42
- }
43
- if (this.line >= 0) {
44
- this.line = 1 - this.line;
45
- }
46
- }
47
- point(x, y) {
48
- x = +x;
49
- y = +y;
50
- if (this.currentPoint === 0) {
51
- this.context.moveTo(x, y);
52
- } else if (this.isHorizontal && (this.currentPoint === 2 || this.currentPoint === 1)) {
53
- this.context.lineTo(x, this.y);
54
- this.context.lineTo(x, y);
55
- } else if (this.currentPoint === 3 && !this.isHorizontal) {
56
- this.context.lineTo(x, this.y);
57
- this.context.lineTo(x, y);
58
- } else {
59
- this.context.lineTo(this.x, y);
60
- this.context.lineTo(x, y);
61
- }
62
- this.currentPoint += 1;
63
- this.x = x;
64
- this.y = y;
65
- }
66
- }
67
- const funnelHorizontalStepCurve = context => {
68
- return new FunnelStep(context, true);
69
- };
70
- exports.funnelHorizontalStepCurve = funnelHorizontalStepCurve;
71
- const funnelVerticalStepCurve = context => {
72
- return new FunnelStep(context, false);
73
- };
74
- exports.funnelVerticalStepCurve = funnelVerticalStepCurve;
@@ -1,4 +0,0 @@
1
- import { CurveFactory } from '@mui/x-charts-vendor/d3-shape';
2
- declare const funnelHorizontalStepCurve: CurveFactory;
3
- declare const funnelVerticalStepCurve: CurveFactory;
4
- export { funnelHorizontalStepCurve, funnelVerticalStepCurve };
@@ -1,67 +0,0 @@
1
- /**
2
- * This is a custom "step" curve generator for the funnel chart.
3
- * It is used to draw the funnel using "rectangles" without having to rework the rendering logic.
4
- *
5
- * It is based on the d3-shape step curve generator.
6
- * https://github.com/d3/d3-shape/blob/a82254af78f08799c71d7ab25df557c4872a3c51/src/curve/step.js
7
- */
8
- class FunnelStep {
9
- constructor(context, isHorizontal) {
10
- this.context = void 0;
11
- this.line = NaN;
12
- this.x = NaN;
13
- this.y = NaN;
14
- this.currentPoint = 0;
15
- this.isHorizontal = false;
16
- this.context = context;
17
- this.isHorizontal = isHorizontal;
18
- }
19
- areaStart() {
20
- this.line = 0;
21
- }
22
- areaEnd() {
23
- this.line = NaN;
24
- }
25
- lineStart() {
26
- this.x = NaN;
27
- this.y = NaN;
28
- this.currentPoint = 0;
29
- }
30
- lineEnd() {
31
- if (this.currentPoint === 2) {
32
- this.context.lineTo(this.x, this.y);
33
- }
34
- if (this.line || this.line !== 0 && this.currentPoint === 1) {
35
- this.context.closePath();
36
- }
37
- if (this.line >= 0) {
38
- this.line = 1 - this.line;
39
- }
40
- }
41
- point(x, y) {
42
- x = +x;
43
- y = +y;
44
- if (this.currentPoint === 0) {
45
- this.context.moveTo(x, y);
46
- } else if (this.isHorizontal && (this.currentPoint === 2 || this.currentPoint === 1)) {
47
- this.context.lineTo(x, this.y);
48
- this.context.lineTo(x, y);
49
- } else if (this.currentPoint === 3 && !this.isHorizontal) {
50
- this.context.lineTo(x, this.y);
51
- this.context.lineTo(x, y);
52
- } else {
53
- this.context.lineTo(this.x, y);
54
- this.context.lineTo(x, y);
55
- }
56
- this.currentPoint += 1;
57
- this.x = x;
58
- this.y = y;
59
- }
60
- }
61
- const funnelHorizontalStepCurve = context => {
62
- return new FunnelStep(context, true);
63
- };
64
- const funnelVerticalStepCurve = context => {
65
- return new FunnelStep(context, false);
66
- };
67
- export { funnelHorizontalStepCurve, funnelVerticalStepCurve };