From 175df7130cffe1b656f99be5b838f85635e27011 Mon Sep 17 00:00:00 2001 From: alexandre Date: Mon, 13 May 2024 14:00:59 +0200 Subject: [PATCH 1/4] Fiss missing default: false --- docs/pages/x/api/charts/bar-chart.json | 2 +- docs/pages/x/api/charts/line-chart.json | 2 +- docs/pages/x/api/charts/pie-chart.json | 2 +- docs/pages/x/api/charts/scatter-chart.json | 2 +- packages/x-charts/src/BarChart/BarChart.tsx | 1 + packages/x-charts/src/ChartsOverlay/ChartsOverlay.tsx | 1 + packages/x-charts/src/LineChart/LineChart.tsx | 1 + packages/x-charts/src/PieChart/PieChart.tsx | 1 + packages/x-charts/src/ScatterChart/ScatterChart.tsx | 1 + 9 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/pages/x/api/charts/bar-chart.json b/docs/pages/x/api/charts/bar-chart.json index 67e4981b50ee..fd2099bd65d9 100644 --- a/docs/pages/x/api/charts/bar-chart.json +++ b/docs/pages/x/api/charts/bar-chart.json @@ -37,7 +37,7 @@ "type": { "name": "union", "description": "object
| string" }, "default": "yAxisIds[0] The id of the first provided axis" }, - "loading": { "type": { "name": "bool" } }, + "loading": { "type": { "name": "bool" }, "default": "false" }, "margin": { "type": { "name": "shape", diff --git a/docs/pages/x/api/charts/line-chart.json b/docs/pages/x/api/charts/line-chart.json index 8c2cff769838..68752fd26553 100644 --- a/docs/pages/x/api/charts/line-chart.json +++ b/docs/pages/x/api/charts/line-chart.json @@ -34,7 +34,7 @@ "type": { "name": "union", "description": "object
| string" }, "default": "yAxisIds[0] The id of the first provided axis" }, - "loading": { "type": { "name": "bool" } }, + "loading": { "type": { "name": "bool" }, "default": "false" }, "margin": { "type": { "name": "shape", diff --git a/docs/pages/x/api/charts/pie-chart.json b/docs/pages/x/api/charts/pie-chart.json index 183721e32cd0..caa5ec8996d9 100644 --- a/docs/pages/x/api/charts/pie-chart.json +++ b/docs/pages/x/api/charts/pie-chart.json @@ -39,7 +39,7 @@ "deprecated": true, "deprecationInfo": "Consider using slotProps.legend instead." }, - "loading": { "type": { "name": "bool" } }, + "loading": { "type": { "name": "bool" }, "default": "false" }, "margin": { "type": { "name": "shape", diff --git a/docs/pages/x/api/charts/scatter-chart.json b/docs/pages/x/api/charts/scatter-chart.json index 7e52fa19a2a7..d94d55348507 100644 --- a/docs/pages/x/api/charts/scatter-chart.json +++ b/docs/pages/x/api/charts/scatter-chart.json @@ -34,7 +34,7 @@ "type": { "name": "union", "description": "object
| string" }, "default": "yAxisIds[0] The id of the first provided axis" }, - "loading": { "type": { "name": "bool" } }, + "loading": { "type": { "name": "bool" }, "default": "false" }, "margin": { "type": { "name": "shape", diff --git a/packages/x-charts/src/BarChart/BarChart.tsx b/packages/x-charts/src/BarChart/BarChart.tsx index b67cca32b75f..9bee34968418 100644 --- a/packages/x-charts/src/BarChart/BarChart.tsx +++ b/packages/x-charts/src/BarChart/BarChart.tsx @@ -298,6 +298,7 @@ BarChart.propTypes = { }), /** * If `true`, a loading overlay is displayed. + * @default false */ loading: PropTypes.bool, /** diff --git a/packages/x-charts/src/ChartsOverlay/ChartsOverlay.tsx b/packages/x-charts/src/ChartsOverlay/ChartsOverlay.tsx index ef1e7371336f..83758efe3c8e 100644 --- a/packages/x-charts/src/ChartsOverlay/ChartsOverlay.tsx +++ b/packages/x-charts/src/ChartsOverlay/ChartsOverlay.tsx @@ -46,6 +46,7 @@ export interface ChartsOverlaySlotProps { export interface ChartsOverlayProps { /** * If `true`, a loading overlay is displayed. + * @default false */ loading?: boolean; diff --git a/packages/x-charts/src/LineChart/LineChart.tsx b/packages/x-charts/src/LineChart/LineChart.tsx index 170b59bceb1c..79f00201e306 100644 --- a/packages/x-charts/src/LineChart/LineChart.tsx +++ b/packages/x-charts/src/LineChart/LineChart.tsx @@ -320,6 +320,7 @@ LineChart.propTypes = { }), /** * If `true`, a loading overlay is displayed. + * @default false */ loading: PropTypes.bool, /** diff --git a/packages/x-charts/src/PieChart/PieChart.tsx b/packages/x-charts/src/PieChart/PieChart.tsx index 50ed25c630f9..b3a2638627a6 100644 --- a/packages/x-charts/src/PieChart/PieChart.tsx +++ b/packages/x-charts/src/PieChart/PieChart.tsx @@ -266,6 +266,7 @@ PieChart.propTypes = { }), /** * If `true`, a loading overlay is displayed. + * @default false */ loading: PropTypes.bool, /** diff --git a/packages/x-charts/src/ScatterChart/ScatterChart.tsx b/packages/x-charts/src/ScatterChart/ScatterChart.tsx index eb8666d4ec51..ca05641dd084 100644 --- a/packages/x-charts/src/ScatterChart/ScatterChart.tsx +++ b/packages/x-charts/src/ScatterChart/ScatterChart.tsx @@ -266,6 +266,7 @@ ScatterChart.propTypes = { }), /** * If `true`, a loading overlay is displayed. + * @default false */ loading: PropTypes.bool, /** From 08ec3bc42839dca27f8112f10ad413dbb3a41ca0 Mon Sep 17 00:00:00 2001 From: alexandre Date: Mon, 13 May 2024 14:07:36 +0200 Subject: [PATCH 2/4] fix text font --- packages/x-charts/src/ChartsOverlay/ChartsLoadingOverlay.tsx | 1 + packages/x-charts/src/ChartsOverlay/ChartsNoDataOverlay.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/x-charts/src/ChartsOverlay/ChartsLoadingOverlay.tsx b/packages/x-charts/src/ChartsOverlay/ChartsLoadingOverlay.tsx index aff9dc1678b7..12873f53fb3f 100644 --- a/packages/x-charts/src/ChartsOverlay/ChartsLoadingOverlay.tsx +++ b/packages/x-charts/src/ChartsOverlay/ChartsLoadingOverlay.tsx @@ -4,6 +4,7 @@ import { useDrawingArea } from '../hooks/useDrawingArea'; import type { CommonOverlayProps } from './ChartsOverlay'; const StyledText = styled('text')(({ theme }) => ({ + ...theme.typography.body2, stroke: 'none', fill: theme.palette.text.primary, shapeRendering: 'crispEdges', diff --git a/packages/x-charts/src/ChartsOverlay/ChartsNoDataOverlay.tsx b/packages/x-charts/src/ChartsOverlay/ChartsNoDataOverlay.tsx index 3567e83b4b1e..0ee3f2c7de13 100644 --- a/packages/x-charts/src/ChartsOverlay/ChartsNoDataOverlay.tsx +++ b/packages/x-charts/src/ChartsOverlay/ChartsNoDataOverlay.tsx @@ -4,6 +4,7 @@ import { useDrawingArea } from '../hooks/useDrawingArea'; import type { CommonOverlayProps } from './ChartsOverlay'; const StyledText = styled('text')(({ theme }) => ({ + ...theme.typography.body2, stroke: 'none', fill: theme.palette.text.primary, shapeRendering: 'crispEdges', From 3d034be3137d6933e8fdb95551318e824ee8270d Mon Sep 17 00:00:00 2001 From: alexandre Date: Mon, 13 May 2024 14:10:25 +0200 Subject: [PATCH 3/4] add description --- packages/x-charts/src/ChartsOverlay/ChartsOverlay.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/x-charts/src/ChartsOverlay/ChartsOverlay.tsx b/packages/x-charts/src/ChartsOverlay/ChartsOverlay.tsx index 83758efe3c8e..528002d32de0 100644 --- a/packages/x-charts/src/ChartsOverlay/ChartsOverlay.tsx +++ b/packages/x-charts/src/ChartsOverlay/ChartsOverlay.tsx @@ -49,8 +49,15 @@ export interface ChartsOverlayProps { * @default false */ loading?: boolean; - + /** + * Overridable component slots. + * @default {} + */ slots?: ChartsOverlaySlots; + /** + * The props used for each component slot. + * @default {} + */ slotProps?: ChartsOverlaySlotProps; } From 27d501ecd65999e0a26dce09831a034f5e83410a Mon Sep 17 00:00:00 2001 From: alexandre Date: Mon, 13 May 2024 14:13:32 +0200 Subject: [PATCH 4/4] use special character for ... --- packages/x-charts/src/ChartsOverlay/ChartsLoadingOverlay.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/x-charts/src/ChartsOverlay/ChartsLoadingOverlay.tsx b/packages/x-charts/src/ChartsOverlay/ChartsLoadingOverlay.tsx index 12873f53fb3f..f9f287a345d0 100644 --- a/packages/x-charts/src/ChartsOverlay/ChartsLoadingOverlay.tsx +++ b/packages/x-charts/src/ChartsOverlay/ChartsLoadingOverlay.tsx @@ -18,7 +18,7 @@ export function ChartsLoadingOverlay(props: CommonOverlayProps) { return ( - {message ?? 'Loading data ...'} + {message ?? 'Loading data…'} ); }