@mui/x-charts 9.0.2 → 9.0.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 (118) hide show
  1. package/BarChart/BarChart.js +2 -1
  2. package/BarChart/BarChart.mjs +2 -1
  3. package/BarChart/BarPlot.js +2 -1
  4. package/BarChart/BarPlot.mjs +2 -1
  5. package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.mts +8 -8
  6. package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +8 -8
  7. package/CHANGELOG.md +136 -0
  8. package/ChartsRadialGrid/ChartsRadialGrid.js +2 -0
  9. package/ChartsRadialGrid/ChartsRadialGrid.mjs +2 -0
  10. package/ChartsRadialGrid/ChartsRadiusGrid.d.mts +1 -0
  11. package/ChartsRadialGrid/ChartsRadiusGrid.d.ts +1 -0
  12. package/ChartsRadialGrid/ChartsRadiusGrid.js +1 -2
  13. package/ChartsRadialGrid/ChartsRadiusGrid.mjs +1 -2
  14. package/ChartsRadiusAxis/ChartsRadiusAxis.d.mts +48 -0
  15. package/ChartsRadiusAxis/ChartsRadiusAxis.d.ts +48 -0
  16. package/ChartsRadiusAxis/ChartsRadiusAxis.js +147 -0
  17. package/ChartsRadiusAxis/ChartsRadiusAxis.mjs +141 -0
  18. package/ChartsRadiusAxis/chartsRadiusAxisClasses.d.mts +6 -0
  19. package/ChartsRadiusAxis/chartsRadiusAxisClasses.d.ts +6 -0
  20. package/ChartsRadiusAxis/chartsRadiusAxisClasses.js +30 -0
  21. package/ChartsRadiusAxis/chartsRadiusAxisClasses.mjs +17 -0
  22. package/ChartsRadiusAxis/createGetLabelTextAnchors.d.mts +10 -0
  23. package/ChartsRadiusAxis/createGetLabelTextAnchors.d.ts +10 -0
  24. package/ChartsRadiusAxis/createGetLabelTextAnchors.js +46 -0
  25. package/ChartsRadiusAxis/createGetLabelTextAnchors.mjs +39 -0
  26. package/ChartsRadiusAxis/getLabelTransform.d.mts +11 -0
  27. package/ChartsRadiusAxis/getLabelTransform.d.ts +11 -0
  28. package/ChartsRadiusAxis/getLabelTransform.js +37 -0
  29. package/ChartsRadiusAxis/getLabelTransform.mjs +31 -0
  30. package/ChartsRadiusAxis/index.d.mts +3 -0
  31. package/ChartsRadiusAxis/index.d.ts +3 -0
  32. package/ChartsRadiusAxis/index.js +19 -0
  33. package/ChartsRadiusAxis/index.mjs +2 -0
  34. package/ChartsRadiusAxis/sharedRadialAxisClasses.d.mts +21 -0
  35. package/ChartsRadiusAxis/sharedRadialAxisClasses.d.ts +21 -0
  36. package/ChartsRadiusAxis/sharedRadialAxisClasses.js +14 -0
  37. package/ChartsRadiusAxis/sharedRadialAxisClasses.mjs +6 -0
  38. package/ChartsRotationAxis/ChartsRotationAxis.d.mts +48 -0
  39. package/ChartsRotationAxis/ChartsRotationAxis.d.ts +48 -0
  40. package/ChartsRotationAxis/ChartsRotationAxis.js +141 -0
  41. package/ChartsRotationAxis/ChartsRotationAxis.mjs +135 -0
  42. package/ChartsRotationAxis/chartsRotationAxisClasses.d.mts +5 -0
  43. package/ChartsRotationAxis/chartsRotationAxisClasses.d.ts +5 -0
  44. package/ChartsRotationAxis/chartsRotationAxisClasses.js +29 -0
  45. package/ChartsRotationAxis/chartsRotationAxisClasses.mjs +16 -0
  46. package/ChartsRotationAxis/getLabelTransform.d.mts +11 -0
  47. package/ChartsRotationAxis/getLabelTransform.d.ts +11 -0
  48. package/ChartsRotationAxis/getLabelTransform.js +37 -0
  49. package/ChartsRotationAxis/getLabelTransform.mjs +31 -0
  50. package/ChartsRotationAxis/index.d.mts +2 -0
  51. package/ChartsRotationAxis/index.d.ts +2 -0
  52. package/ChartsRotationAxis/index.js +19 -0
  53. package/ChartsRotationAxis/index.mjs +2 -0
  54. package/ChartsTooltip/useAxesTooltip.js +7 -4
  55. package/ChartsTooltip/useAxesTooltip.mjs +8 -5
  56. package/ChartsTooltip/useItemTooltip.d.mts +1 -1
  57. package/ChartsTooltip/useItemTooltip.d.ts +1 -1
  58. package/ChartsTooltip/useItemTooltip.js +17 -2
  59. package/ChartsTooltip/useItemTooltip.mjs +18 -3
  60. package/ChartsXAxis/useAxisTicksProps.d.mts +245 -164
  61. package/ChartsXAxis/useAxisTicksProps.d.ts +245 -164
  62. package/ChartsYAxis/useAxisTicksProps.d.mts +245 -164
  63. package/ChartsYAxis/useAxisTicksProps.d.ts +245 -164
  64. package/LineChart/seriesConfig/curveEvaluation.js +24 -19
  65. package/LineChart/seriesConfig/curveEvaluation.mjs +24 -19
  66. package/LineChart/seriesConfig/getItemAtPosition.js +14 -3
  67. package/LineChart/seriesConfig/getItemAtPosition.mjs +14 -3
  68. package/LineChart/seriesConfig/getSeriesWithDefaultValues.js +4 -6
  69. package/LineChart/seriesConfig/getSeriesWithDefaultValues.mjs +4 -6
  70. package/LineChart/seriesConfig/seriesProcessor.d.mts +4 -2
  71. package/LineChart/seriesConfig/seriesProcessor.d.ts +4 -2
  72. package/LineChart/seriesConfig/seriesProcessor.js +2 -2
  73. package/LineChart/seriesConfig/seriesProcessor.mjs +2 -2
  74. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.mts +2 -2
  75. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +2 -2
  76. package/hooks/useAxis.d.mts +2 -2
  77. package/hooks/useAxis.d.ts +2 -2
  78. package/index.d.mts +2 -0
  79. package/index.d.ts +2 -0
  80. package/index.js +22 -2
  81. package/index.mjs +3 -1
  82. package/internals/cubiqSolver.d.mts +5 -0
  83. package/internals/cubiqSolver.d.ts +5 -0
  84. package/internals/cubiqSolver.js +62 -0
  85. package/internals/cubiqSolver.mjs +56 -0
  86. package/internals/index.d.mts +5 -1
  87. package/internals/index.d.ts +5 -1
  88. package/internals/index.js +47 -2
  89. package/internals/index.mjs +5 -1
  90. package/internals/isPolar.d.mts +3 -2
  91. package/internals/isPolar.d.ts +3 -2
  92. package/internals/isPolar.js +4 -0
  93. package/internals/isPolar.mjs +3 -0
  94. package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.mts +8 -9
  95. package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.ts +8 -9
  96. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.mts +3 -2
  97. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +3 -2
  98. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +23 -13
  99. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.mjs +23 -13
  100. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.mts +2 -2
  101. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +2 -2
  102. package/models/axis.d.mts +2 -0
  103. package/models/axis.d.ts +2 -0
  104. package/models/seriesType/bar.d.mts +12 -7
  105. package/models/seriesType/bar.d.ts +12 -7
  106. package/models/seriesType/common.d.mts +10 -0
  107. package/models/seriesType/common.d.ts +10 -0
  108. package/models/seriesType/composition.d.mts +3 -1
  109. package/models/seriesType/composition.d.ts +3 -1
  110. package/models/seriesType/composition.js +6 -2
  111. package/models/seriesType/composition.mjs +5 -1
  112. package/models/seriesType/index.d.mts +3 -3
  113. package/models/seriesType/index.d.ts +3 -3
  114. package/models/seriesType/index.js +0 -22
  115. package/models/seriesType/index.mjs +0 -2
  116. package/models/seriesType/line.d.mts +13 -8
  117. package/models/seriesType/line.d.ts +13 -8
  118. package/package.json +161 -133
@@ -10,11 +10,11 @@ export type SeriesItemIdentifierWithData<SeriesType extends ChartSeriesType> = S
10
10
  */
11
11
  export type HighlightItemIdentifier<SeriesType extends ChartSeriesType> = SeriesType extends any ? DistributiveOmit<ChartsSeriesConfig[SeriesType]['highlightIdentifier'], 'type'> : never;
12
12
  export type HighlightItemIdentifierWithType<SeriesType extends ChartSeriesType> = SeriesType extends any ? ChartsSeriesConfig[SeriesType]['highlightIdentifier'] : never;
13
- export type FocusedItemIdentifier<SeriesType extends ChartSeriesType = ChartSeriesType> = SeriesType extends 'line' | 'radar' ? DefaultizedProps<ChartsSeriesConfig[SeriesType]['itemIdentifier'], 'dataIndex'> : SeriesType extends 'heatmap' ? DefaultizedProps<ChartsSeriesConfig[SeriesType]['itemIdentifier'], 'xIndex' | 'yIndex'> : ChartsSeriesConfig[SeriesType]['itemIdentifier'];
13
+ export type FocusedItemIdentifier<SeriesType extends ChartSeriesType = ChartSeriesType> = SeriesType extends 'line' | 'radar' | 'radialLine' ? DefaultizedProps<ChartsSeriesConfig[SeriesType]['itemIdentifier'], 'dataIndex'> : SeriesType extends 'heatmap' ? DefaultizedProps<ChartsSeriesConfig[SeriesType]['itemIdentifier'], 'xIndex' | 'yIndex'> : ChartsSeriesConfig[SeriesType]['itemIdentifier'];
14
14
  export { type SeriesId } from "./common.mjs";
15
15
  export type { CartesianChartSeriesType, StackableChartSeriesType } from "./config.mjs";
16
- export * from "./line.mjs";
17
- export * from "./bar.mjs";
16
+ export type { ShowMarkParams, MarkShape, LineSeriesType, LineItemIdentifier, DefaultizedLineSeriesType } from "./line.mjs";
17
+ export type { BarValueType, BarSeriesType, BarItemIdentifier, DefaultizedBarSeriesType } from "./bar.mjs";
18
18
  export * from "./scatter.mjs";
19
19
  export * from "./pie.mjs";
20
20
  export * from "./radar.mjs";
@@ -10,11 +10,11 @@ export type SeriesItemIdentifierWithData<SeriesType extends ChartSeriesType> = S
10
10
  */
11
11
  export type HighlightItemIdentifier<SeriesType extends ChartSeriesType> = SeriesType extends any ? DistributiveOmit<ChartsSeriesConfig[SeriesType]['highlightIdentifier'], 'type'> : never;
12
12
  export type HighlightItemIdentifierWithType<SeriesType extends ChartSeriesType> = SeriesType extends any ? ChartsSeriesConfig[SeriesType]['highlightIdentifier'] : never;
13
- export type FocusedItemIdentifier<SeriesType extends ChartSeriesType = ChartSeriesType> = SeriesType extends 'line' | 'radar' ? DefaultizedProps<ChartsSeriesConfig[SeriesType]['itemIdentifier'], 'dataIndex'> : SeriesType extends 'heatmap' ? DefaultizedProps<ChartsSeriesConfig[SeriesType]['itemIdentifier'], 'xIndex' | 'yIndex'> : ChartsSeriesConfig[SeriesType]['itemIdentifier'];
13
+ export type FocusedItemIdentifier<SeriesType extends ChartSeriesType = ChartSeriesType> = SeriesType extends 'line' | 'radar' | 'radialLine' ? DefaultizedProps<ChartsSeriesConfig[SeriesType]['itemIdentifier'], 'dataIndex'> : SeriesType extends 'heatmap' ? DefaultizedProps<ChartsSeriesConfig[SeriesType]['itemIdentifier'], 'xIndex' | 'yIndex'> : ChartsSeriesConfig[SeriesType]['itemIdentifier'];
14
14
  export { type SeriesId } from "./common.js";
15
15
  export type { CartesianChartSeriesType, StackableChartSeriesType } from "./config.js";
16
- export * from "./line.js";
17
- export * from "./bar.js";
16
+ export type { ShowMarkParams, MarkShape, LineSeriesType, LineItemIdentifier, DefaultizedLineSeriesType } from "./line.js";
17
+ export type { BarValueType, BarSeriesType, BarItemIdentifier, DefaultizedBarSeriesType } from "./bar.js";
18
18
  export * from "./scatter.js";
19
19
  export * from "./pie.js";
20
20
  export * from "./radar.js";
@@ -3,28 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- var _line = require("./line");
7
- Object.keys(_line).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _line[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _line[key];
14
- }
15
- });
16
- });
17
- var _bar = require("./bar");
18
- Object.keys(_bar).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _bar[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function () {
24
- return _bar[key];
25
- }
26
- });
27
- });
28
6
  var _scatter = require("./scatter");
29
7
  Object.keys(_scatter).forEach(function (key) {
30
8
  if (key === "default" || key === "__esModule") return;
@@ -9,8 +9,6 @@
9
9
  * Identifies an highlighted item or series.
10
10
  */
11
11
 
12
- export * from "./line.mjs";
13
- export * from "./bar.mjs";
14
12
  export * from "./scatter.mjs";
15
13
  export * from "./pie.mjs";
16
14
  export * from "./radar.mjs";
@@ -1,6 +1,6 @@
1
1
  import { type DefaultizedProps } from '@mui/x-internals/types';
2
2
  import type { StackOffsetType } from "../stacking.mjs";
3
- import { type CartesianSeriesType, type CommonDefaultizedProps, type CommonSeriesType, type SeriesId, type StackableSeriesType } from "./common.mjs";
3
+ import type { CartesianSeriesType, CommonDefaultizedProps, CommonSeriesType, SeriesId, StackableSeriesType } from "./common.mjs";
4
4
  import { type DatasetElementType } from "./config.mjs";
5
5
  import { type CurveType } from "../curve.mjs";
6
6
  export interface ShowMarkParams<AxisValue = number | Date> {
@@ -26,8 +26,10 @@ export interface ShowMarkParams<AxisValue = number | Date> {
26
26
  value: number;
27
27
  }
28
28
  export type MarkShape = 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye';
29
- export interface LineSeriesType extends CommonSeriesType<number | null, 'line'>, CartesianSeriesType, StackableSeriesType {
30
- type: 'line';
29
+ /**
30
+ * @internal The series type shared by the line and radialLine charts
31
+ */
32
+ export interface CommonLineSeriesType {
31
33
  /**
32
34
  * Data associated to the line.
33
35
  */
@@ -86,11 +88,6 @@ export interface LineSeriesType extends CommonSeriesType<number | null, 'line'>,
86
88
  * @default false
87
89
  */
88
90
  connectNulls?: boolean;
89
- /**
90
- * Defines how stacked series handle negative values.
91
- * @default 'none'
92
- */
93
- stackOffset?: StackOffsetType;
94
91
  /**
95
92
  * The value of the line at the base of the series area.
96
93
  *
@@ -102,6 +99,14 @@ export interface LineSeriesType extends CommonSeriesType<number | null, 'line'>,
102
99
  */
103
100
  baseline?: number | 'min' | 'max';
104
101
  }
102
+ export interface LineSeriesType extends CommonSeriesType<number | null, 'line'>, CartesianSeriesType, StackableSeriesType, CommonLineSeriesType {
103
+ type: 'line';
104
+ /**
105
+ * Defines how stacked series handle negative values.
106
+ * @default 'none'
107
+ */
108
+ stackOffset?: StackOffsetType;
109
+ }
105
110
  /**
106
111
  * An object that allows to identify a single line.
107
112
  * Used for item interaction
@@ -1,6 +1,6 @@
1
1
  import { type DefaultizedProps } from '@mui/x-internals/types';
2
2
  import type { StackOffsetType } from "../stacking.js";
3
- import { type CartesianSeriesType, type CommonDefaultizedProps, type CommonSeriesType, type SeriesId, type StackableSeriesType } from "./common.js";
3
+ import type { CartesianSeriesType, CommonDefaultizedProps, CommonSeriesType, SeriesId, StackableSeriesType } from "./common.js";
4
4
  import { type DatasetElementType } from "./config.js";
5
5
  import { type CurveType } from "../curve.js";
6
6
  export interface ShowMarkParams<AxisValue = number | Date> {
@@ -26,8 +26,10 @@ export interface ShowMarkParams<AxisValue = number | Date> {
26
26
  value: number;
27
27
  }
28
28
  export type MarkShape = 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye';
29
- export interface LineSeriesType extends CommonSeriesType<number | null, 'line'>, CartesianSeriesType, StackableSeriesType {
30
- type: 'line';
29
+ /**
30
+ * @internal The series type shared by the line and radialLine charts
31
+ */
32
+ export interface CommonLineSeriesType {
31
33
  /**
32
34
  * Data associated to the line.
33
35
  */
@@ -86,11 +88,6 @@ export interface LineSeriesType extends CommonSeriesType<number | null, 'line'>,
86
88
  * @default false
87
89
  */
88
90
  connectNulls?: boolean;
89
- /**
90
- * Defines how stacked series handle negative values.
91
- * @default 'none'
92
- */
93
- stackOffset?: StackOffsetType;
94
91
  /**
95
92
  * The value of the line at the base of the series area.
96
93
  *
@@ -102,6 +99,14 @@ export interface LineSeriesType extends CommonSeriesType<number | null, 'line'>,
102
99
  */
103
100
  baseline?: number | 'min' | 'max';
104
101
  }
102
+ export interface LineSeriesType extends CommonSeriesType<number | null, 'line'>, CartesianSeriesType, StackableSeriesType, CommonLineSeriesType {
103
+ type: 'line';
104
+ /**
105
+ * Defines how stacked series handle negative values.
106
+ * @default 'none'
107
+ */
108
+ stackOffset?: StackOffsetType;
109
+ }
105
110
  /**
106
111
  * An object that allows to identify a single line.
107
112
  * Used for item interaction