Skip to content

Commit 87b4d87

Browse files
committed
Merge remote-tracking branch 'upstream/master' into knip
2 parents 075a561 + dffb2c6 commit 87b4d87

File tree

115 files changed

+355
-815
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+355
-815
lines changed

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pnpm generate:exports # when editing code in `packages/x-charts*`
2828

2929
## Testing
3030

31-
### Run unit tests in JSDOM
31+
### Run unit tests in jsdom
3232

3333
```bash
3434
# Filter by project name (glob patterns supported)

docs/data/charts/zoom-and-pan/ZoomSliderPreview.js

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ const gdpPerCapitaFormatter = new Intl.NumberFormat('en-US', {
3737
});
3838
const populationFormatter = new Intl.NumberFormat('en-US', { notation: 'compact' });
3939

40+
const commonXAxisProps = {
41+
id: 'x',
42+
zoom: { filterMode: 'discard', slider: { enabled: true, preview: true } },
43+
};
44+
45+
const commonProps = {
46+
initialZoom: [{ axisId: 'x', start: 20, end: 80 }],
47+
height: 400,
48+
};
49+
4050
const lineXAxis = {
4151
scaleType: 'time',
4252
id: 'x',
@@ -59,7 +69,6 @@ const lineSettings = {
5969
valueFormatter: (v) => percentageFormatter.format(v),
6070
},
6171
],
62-
height: 400,
6372
};
6473

6574
const areaXAxis = {
@@ -86,7 +95,6 @@ const areaSettings = {
8695
stack: 'population',
8796
valueFormatter: (v) => populationFormatter.format(v),
8897
})),
89-
height: 400,
9098
};
9199

92100
const scatterXAxis = {
@@ -106,7 +114,6 @@ const scatterSettings = {
106114
valueFormatter: (value) =>
107115
`${countryData[value.id].country} - Birth rate: ${value.y} - GDP per capita: ${gdpPerCapitaFormatter.format(value.x)}`,
108116
})),
109-
height: 400,
110117
};
111118

112119
const sortedShareOfRenewables = shareOfRenewables.toSorted(
@@ -124,7 +131,6 @@ const barSettings = {
124131
valueFormatter: (v) => percentageFormatter.format(v),
125132
},
126133
],
127-
height: 400,
128134
};
129135

130136
const rangeBarXAxis = {
@@ -151,7 +157,6 @@ const rangeBarSettings = {
151157
data: temperatureBerlinPorto.berlin,
152158
},
153159
],
154-
height: 300,
155160
};
156161

157162
export default function ZoomSliderPreview() {
@@ -194,10 +199,9 @@ function LineChartPreview() {
194199
Unemployment Rate in United States (1948-2025)
195200
</Typography>
196201
<LineChartPro
202+
{...commonProps}
197203
{...lineSettings}
198-
xAxis={[
199-
{ ...lineXAxis, zoom: { slider: { enabled: true, preview: true } } },
200-
]}
204+
xAxis={[{ ...lineXAxis, ...commonXAxisProps }]}
201205
/>
202206
<Typography variant="caption">
203207
Source: Federal Reserve Bank of St. Louis. Updated: Jun 6, 2025 7:46 AM CDT.
@@ -213,10 +217,9 @@ function AreaChartPreview() {
213217
Population by Age Group in 2050 (Projected)
214218
</Typography>
215219
<LineChartPro
220+
{...commonProps}
216221
{...areaSettings}
217-
xAxis={[
218-
{ ...areaXAxis, zoom: { slider: { enabled: true, preview: true } } },
219-
]}
222+
xAxis={[{ ...areaXAxis, ...commonXAxisProps }]}
220223
/>
221224
<Typography variant="caption">
222225
Source: World Population Prospects: The 2024 Revision, United Nations.
@@ -232,8 +235,9 @@ function BarChartPreview() {
232235
Share of Primary Energy Consumption from Renewables (2023)
233236
</Typography>
234237
<BarChartPro
238+
{...commonProps}
235239
{...barSettings}
236-
xAxis={[{ ...barXAxis, zoom: { slider: { enabled: true, preview: true } } }]}
240+
xAxis={[{ ...barXAxis, ...commonXAxisProps }]}
237241
/>
238242
<Typography variant="caption">
239243
Source: Our World in Data. Updated: 2023.
@@ -249,10 +253,9 @@ function RangeBarChartPreview() {
249253
Average monthly temperature ranges in °C for Porto and Berlin in 1991-2020
250254
</Typography>
251255
<BarChartPremium
256+
{...commonProps}
252257
{...rangeBarSettings}
253-
xAxis={[
254-
{ ...rangeBarXAxis, zoom: { slider: { enabled: true, preview: true } } },
255-
]}
258+
xAxis={[{ ...rangeBarXAxis, ...commonXAxisProps }]}
256259
/>
257260
<Typography variant="caption">
258261
Source: IPMA (Porto), climate-data.org (Berlin)
@@ -268,10 +271,9 @@ function ScatterChartPreview() {
268271
Births per woman vs GDP per capita (USD, 2023)
269272
</Typography>
270273
<ScatterChartPro
274+
{...commonProps}
271275
{...scatterSettings}
272-
xAxis={[
273-
{ ...scatterXAxis, zoom: { slider: { enabled: true, preview: true } } },
274-
]}
276+
xAxis={[{ ...scatterXAxis, ...commonXAxisProps }]}
275277
/>
276278
<Typography variant="caption">
277279
GDP per capita is expressed in international dollars at 2021 prices. <br />

docs/data/charts/zoom-and-pan/ZoomSliderPreview.tsx

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ const gdpPerCapitaFormatter = new Intl.NumberFormat('en-US', {
4747
});
4848
const populationFormatter = new Intl.NumberFormat('en-US', { notation: 'compact' });
4949

50+
const commonXAxisProps = {
51+
id: 'x',
52+
zoom: { filterMode: 'discard', slider: { enabled: true, preview: true } },
53+
} as const;
54+
55+
const commonProps = {
56+
initialZoom: [{ axisId: 'x', start: 20, end: 80 }],
57+
height: 400,
58+
} as const;
59+
5060
const lineXAxis = {
5161
scaleType: 'time',
5262
id: 'x',
@@ -69,7 +79,6 @@ const lineSettings = {
6979
valueFormatter: (v: number | null) => percentageFormatter.format(v!),
7080
},
7181
],
72-
height: 400,
7382
} satisfies Partial<LineChartProProps>;
7483

7584
const areaXAxis = {
@@ -98,7 +107,6 @@ const areaSettings = {
98107
stack: 'population',
99108
valueFormatter: (v: number | null) => populationFormatter.format(v!),
100109
})),
101-
height: 400,
102110
} satisfies Partial<LineChartProProps>;
103111

104112
const scatterXAxis = {
@@ -121,7 +129,6 @@ const scatterSettings = {
121129
valueFormatter: (value: ScatterValueType | null) =>
122130
`${countryData[value!.id as keyof typeof countryData].country} - Birth rate: ${value!.y} - GDP per capita: ${gdpPerCapitaFormatter.format(value!.x)}`,
123131
})),
124-
height: 400,
125132
} satisfies Partial<ScatterChartProProps>;
126133

127134
const sortedShareOfRenewables = shareOfRenewables.toSorted(
@@ -139,7 +146,6 @@ const barSettings = {
139146
valueFormatter: (v: number | null) => percentageFormatter.format(v!),
140147
},
141148
],
142-
height: 400,
143149
} satisfies Partial<BarChartProProps>;
144150

145151
const rangeBarXAxis = {
@@ -167,7 +173,6 @@ const rangeBarSettings = {
167173
data: temperatureBerlinPorto.berlin,
168174
},
169175
],
170-
height: 300,
171176
} satisfies BarChartPremiumProps;
172177

173178
export default function ZoomSliderPreview() {
@@ -210,10 +215,9 @@ function LineChartPreview() {
210215
Unemployment Rate in United States (1948-2025)
211216
</Typography>
212217
<LineChartPro
218+
{...commonProps}
213219
{...lineSettings}
214-
xAxis={[
215-
{ ...lineXAxis, zoom: { slider: { enabled: true, preview: true } } },
216-
]}
220+
xAxis={[{ ...lineXAxis, ...commonXAxisProps }]}
217221
/>
218222
<Typography variant="caption">
219223
Source: Federal Reserve Bank of St. Louis. Updated: Jun 6, 2025 7:46 AM CDT.
@@ -229,10 +233,9 @@ function AreaChartPreview() {
229233
Population by Age Group in 2050 (Projected)
230234
</Typography>
231235
<LineChartPro
236+
{...commonProps}
232237
{...areaSettings}
233-
xAxis={[
234-
{ ...areaXAxis, zoom: { slider: { enabled: true, preview: true } } },
235-
]}
238+
xAxis={[{ ...areaXAxis, ...commonXAxisProps }]}
236239
/>
237240
<Typography variant="caption">
238241
Source: World Population Prospects: The 2024 Revision, United Nations.
@@ -248,8 +251,9 @@ function BarChartPreview() {
248251
Share of Primary Energy Consumption from Renewables (2023)
249252
</Typography>
250253
<BarChartPro
254+
{...commonProps}
251255
{...barSettings}
252-
xAxis={[{ ...barXAxis, zoom: { slider: { enabled: true, preview: true } } }]}
256+
xAxis={[{ ...barXAxis, ...commonXAxisProps }]}
253257
/>
254258
<Typography variant="caption">
255259
Source: Our World in Data. Updated: 2023.
@@ -265,10 +269,9 @@ function RangeBarChartPreview() {
265269
Average monthly temperature ranges in °C for Porto and Berlin in 1991-2020
266270
</Typography>
267271
<BarChartPremium
272+
{...commonProps}
268273
{...rangeBarSettings}
269-
xAxis={[
270-
{ ...rangeBarXAxis, zoom: { slider: { enabled: true, preview: true } } },
271-
]}
274+
xAxis={[{ ...rangeBarXAxis, ...commonXAxisProps }]}
272275
/>
273276
<Typography variant="caption">
274277
Source: IPMA (Porto), climate-data.org (Berlin)
@@ -284,10 +287,9 @@ function ScatterChartPreview() {
284287
Births per woman vs GDP per capita (USD, 2023)
285288
</Typography>
286289
<ScatterChartPro
290+
{...commonProps}
287291
{...scatterSettings}
288-
xAxis={[
289-
{ ...scatterXAxis, zoom: { slider: { enabled: true, preview: true } } },
290-
]}
292+
xAxis={[{ ...scatterXAxis, ...commonXAxisProps }]}
291293
/>
292294
<Typography variant="caption">
293295
GDP per capita is expressed in international dollars at 2021 prices. <br />

docs/data/scheduler/event-calendar/events/DynamicResourceProperty.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ export default function DynamicResourceProperty() {
158158
onEventsChange={setEvents}
159159
view="day"
160160
views={['day']}
161+
defaultPreferences={{ isSidePanelOpen: false }}
161162
/>
162163
</div>
163164
</Stack>

docs/data/scheduler/event-calendar/events/DynamicResourceProperty.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ export default function DynamicResourceProperty() {
175175
onEventsChange={setEvents}
176176
view="day"
177177
views={['day']}
178+
defaultPreferences={{ isSidePanelOpen: false }}
178179
/>
179180
</div>
180181
</Stack>

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"@emotion/server": "^11.11.0",
2929
"@emotion/styled": "catalog:",
3030
"@mui/icons-material": "catalog:",
31-
"@mui/internal-docs-infra": "^0.6.1-canary.1",
31+
"@mui/internal-docs-infra": "^0.7.1-canary.0",
3232
"@mui/joy": "^5.0.0-beta.52",
3333
"@mui/lab": "^7.0.0-beta.17",
3434
"@mui/material": "catalog:",

docs/pages/x/api/charts/bar-series-type.js

Lines changed: 0 additions & 27 deletions
This file was deleted.

docs/pages/x/api/charts/bar-series-type.json

Lines changed: 0 additions & 27 deletions
This file was deleted.

docs/pages/x/api/charts/chart-container-premium.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)