@mui/x-charts 9.0.0 → 9.0.1
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.
- package/CHANGELOG.md +94 -6891
- package/LineChart/LineChart.d.mts +1 -2
- package/LineChart/LineChart.d.ts +1 -2
- package/RadarChart/RadarAxis/useRadarAxis.d.mts +1 -1
- package/RadarChart/RadarAxis/useRadarAxis.d.ts +1 -1
- package/RadarChart/RadarAxis/useRadarAxis.js +2 -2
- package/RadarChart/RadarAxis/useRadarAxis.mjs +2 -2
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,6 @@ import { type AreaPlotProps, type AreaPlotSlotProps, type AreaPlotSlots } from "
|
|
|
5
5
|
import { type LinePlotProps, type LinePlotSlotProps, type LinePlotSlots } from "./LinePlot.mjs";
|
|
6
6
|
import { type ChartsContainerProps } from "../ChartsContainer/index.mjs";
|
|
7
7
|
import { type MarkPlotProps, type MarkPlotSlotProps, type MarkPlotSlots } from "./MarkPlot.mjs";
|
|
8
|
-
import { type ChartsAxisProps } from "../ChartsAxis/ChartsAxis.mjs";
|
|
9
8
|
import { type LineSeriesType } from "../models/seriesType/line.mjs";
|
|
10
9
|
import { type ChartsTooltipSlots, type ChartsTooltipSlotProps } from "../ChartsTooltip/ChartTooltip.types.mjs";
|
|
11
10
|
import { type ChartsLegendSlotProps, type ChartsLegendSlots } from "../ChartsLegend/index.mjs";
|
|
@@ -19,7 +18,7 @@ import type { ChartsToolbarSlots, ChartsToolbarSlotProps } from "../Toolbar/inde
|
|
|
19
18
|
export interface LineChartSlots extends ChartsAxisSlots, AreaPlotSlots, LinePlotSlots, MarkPlotSlots, LineHighlightPlotSlots, ChartsLegendSlots, ChartsOverlaySlots, ChartsTooltipSlots, ChartsToolbarSlots, Partial<ChartsSlots> {}
|
|
20
19
|
export interface LineChartSlotProps extends ChartsAxisSlotProps, AreaPlotSlotProps, LinePlotSlotProps, MarkPlotSlotProps, LineHighlightPlotSlotProps, ChartsLegendSlotProps, ChartsOverlaySlotProps, ChartsTooltipSlotProps, ChartsToolbarSlotProps, Partial<ChartsSlotProps> {}
|
|
21
20
|
export type LineSeries = MakeOptional<LineSeriesType, 'type'>;
|
|
22
|
-
export interface LineChartProps extends Omit<ChartsContainerProps<'line', LineChartPluginSignatures>, 'series' | 'plugins' | 'zAxis'>, Omit<
|
|
21
|
+
export interface LineChartProps extends Omit<ChartsContainerProps<'line', LineChartPluginSignatures>, 'series' | 'plugins' | 'zAxis'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
|
|
23
22
|
/**
|
|
24
23
|
* The series to display in the line chart.
|
|
25
24
|
* An array of [[LineSeries]] objects.
|
package/LineChart/LineChart.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import { type AreaPlotProps, type AreaPlotSlotProps, type AreaPlotSlots } from "
|
|
|
5
5
|
import { type LinePlotProps, type LinePlotSlotProps, type LinePlotSlots } from "./LinePlot.js";
|
|
6
6
|
import { type ChartsContainerProps } from "../ChartsContainer/index.js";
|
|
7
7
|
import { type MarkPlotProps, type MarkPlotSlotProps, type MarkPlotSlots } from "./MarkPlot.js";
|
|
8
|
-
import { type ChartsAxisProps } from "../ChartsAxis/ChartsAxis.js";
|
|
9
8
|
import { type LineSeriesType } from "../models/seriesType/line.js";
|
|
10
9
|
import { type ChartsTooltipSlots, type ChartsTooltipSlotProps } from "../ChartsTooltip/ChartTooltip.types.js";
|
|
11
10
|
import { type ChartsLegendSlotProps, type ChartsLegendSlots } from "../ChartsLegend/index.js";
|
|
@@ -19,7 +18,7 @@ import type { ChartsToolbarSlots, ChartsToolbarSlotProps } from "../Toolbar/inde
|
|
|
19
18
|
export interface LineChartSlots extends ChartsAxisSlots, AreaPlotSlots, LinePlotSlots, MarkPlotSlots, LineHighlightPlotSlots, ChartsLegendSlots, ChartsOverlaySlots, ChartsTooltipSlots, ChartsToolbarSlots, Partial<ChartsSlots> {}
|
|
20
19
|
export interface LineChartSlotProps extends ChartsAxisSlotProps, AreaPlotSlotProps, LinePlotSlotProps, MarkPlotSlotProps, LineHighlightPlotSlotProps, ChartsLegendSlotProps, ChartsOverlaySlotProps, ChartsTooltipSlotProps, ChartsToolbarSlotProps, Partial<ChartsSlotProps> {}
|
|
21
20
|
export type LineSeries = MakeOptional<LineSeriesType, 'type'>;
|
|
22
|
-
export interface LineChartProps extends Omit<ChartsContainerProps<'line', LineChartPluginSignatures>, 'series' | 'plugins' | 'zAxis'>, Omit<
|
|
21
|
+
export interface LineChartProps extends Omit<ChartsContainerProps<'line', LineChartPluginSignatures>, 'series' | 'plugins' | 'zAxis'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> {
|
|
23
22
|
/**
|
|
24
23
|
* The series to display in the line chart.
|
|
25
24
|
* An array of [[LineSeries]] objects.
|
|
@@ -16,7 +16,7 @@ export interface UseRadarAxisParams {
|
|
|
16
16
|
divisions?: number;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* Returns an array with
|
|
19
|
+
* Returns an array with one item per metric with the different points to label.
|
|
20
20
|
*/
|
|
21
21
|
export declare function useRadarAxis(params: UseRadarAxisParams): {
|
|
22
22
|
metric: string;
|
|
@@ -16,7 +16,7 @@ export interface UseRadarAxisParams {
|
|
|
16
16
|
divisions?: number;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* Returns an array with
|
|
19
|
+
* Returns an array with one item per metric with the different points to label.
|
|
20
20
|
*/
|
|
21
21
|
export declare function useRadarAxis(params: UseRadarAxisParams): {
|
|
22
22
|
metric: string;
|
|
@@ -14,7 +14,7 @@ var _degToRad = require("../../internals/degToRad");
|
|
|
14
14
|
var _clampAngle = require("../../internals/clampAngle");
|
|
15
15
|
var _angleConversion = require("../../internals/angleConversion");
|
|
16
16
|
/**
|
|
17
|
-
* Returns an array with
|
|
17
|
+
* Returns an array with one item per metric with the different points to label.
|
|
18
18
|
*/
|
|
19
19
|
function useRadarAxis(params) {
|
|
20
20
|
const {
|
|
@@ -39,7 +39,7 @@ function useRadarAxis(params) {
|
|
|
39
39
|
}
|
|
40
40
|
const existingMetrics = rotationScale.domain();
|
|
41
41
|
if (!existingMetrics.includes(metric)) {
|
|
42
|
-
(0, _warning.warnOnce)([`MUI X Charts:
|
|
42
|
+
(0, _warning.warnOnce)([`MUI X Charts: Your radar axis tries to display values for the metric "${metric}" which does not exist.`, `Either add this metric to your radar, or pick one from the existing metrics: ${existingMetrics.join(', ')}`]);
|
|
43
43
|
}
|
|
44
44
|
const anglesWithDefault = angle !== undefined ? (0, _degToRad.degToRad)(angle) : rotationScale(metric) ?? 0;
|
|
45
45
|
const radiusRatio = Array.from({
|
|
@@ -8,7 +8,7 @@ import { degToRad } from "../../internals/degToRad.mjs";
|
|
|
8
8
|
import { clampAngle } from "../../internals/clampAngle.mjs";
|
|
9
9
|
import { rad2deg } from "../../internals/angleConversion.mjs";
|
|
10
10
|
/**
|
|
11
|
-
* Returns an array with
|
|
11
|
+
* Returns an array with one item per metric with the different points to label.
|
|
12
12
|
*/
|
|
13
13
|
export function useRadarAxis(params) {
|
|
14
14
|
const {
|
|
@@ -33,7 +33,7 @@ export function useRadarAxis(params) {
|
|
|
33
33
|
}
|
|
34
34
|
const existingMetrics = rotationScale.domain();
|
|
35
35
|
if (!existingMetrics.includes(metric)) {
|
|
36
|
-
warnOnce([`MUI X Charts:
|
|
36
|
+
warnOnce([`MUI X Charts: Your radar axis tries to display values for the metric "${metric}" which does not exist.`, `Either add this metric to your radar, or pick one from the existing metrics: ${existingMetrics.join(', ')}`]);
|
|
37
37
|
}
|
|
38
38
|
const anglesWithDefault = angle !== undefined ? degToRad(angle) : rotationScale(metric) ?? 0;
|
|
39
39
|
const radiusRatio = Array.from({
|
package/index.js
CHANGED
package/index.mjs
CHANGED