Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2a0fd01
rever breking monorepo
alexfauquette Apr 2, 2026
6494619
setup type system to support polar and cartesian line series
alexfauquette Apr 2, 2026
903b8ff
Create a CHartsPolarDataProvider
alexfauquette Apr 2, 2026
1a42438
add a polar grid
alexfauquette Apr 2, 2026
c41fc6d
plot line
alexfauquette Apr 2, 2026
6464ef5
forgoten_file
alexfauquette Apr 7, 2026
91faab4
Merge remote-tracking branch 'upstream/master' into explore-polar-chart
alexfauquette Apr 7, 2026
e55915c
more tick numbers
alexfauquette Apr 7, 2026
7ea50a4
fix-tick-number
alexfauquette Apr 7, 2026
5a7f4a4
typo
alexfauquette Apr 7, 2026
920a448
implement angle detection for polar axes
alexfauquette Apr 7, 2026
a6b13bd
update tooltip
alexfauquette Apr 7, 2026
16b86fb
Merge remote-tracking branch 'upstream/master' into explore-polar-chart
alexfauquette Apr 7, 2026
b97472d
fix
alexfauquette Apr 7, 2026
cdbf8ff
Merge remote-tracking branch 'upstream/master' into explore-polar-chart
alexfauquette Apr 7, 2026
a2ff12c
pnpm prettier
alexfauquette Apr 7, 2026
82b94f6
pnpm prettier
alexfauquette Apr 7, 2026
c8c6bc2
rename radial line
alexfauquette Apr 8, 2026
aed8bef
soem renamings
alexfauquette Apr 8, 2026
6a470e6
Add use Radar line chart
alexfauquette Apr 8, 2026
41e056e
fix TS
alexfauquette Apr 8, 2026
ecd4b71
remove useless stuff (to cherry pick)
alexfauquette Apr 8, 2026
c1fc4ca
add basic docs
alexfauquette Apr 8, 2026
fb3c8de
make axis id optional
alexfauquette Apr 8, 2026
4aa95c3
reexport for composition
alexfauquette Apr 8, 2026
545e137
Merge remote-tracking branch 'upstream/master' into explore-polar-chart
alexfauquette Apr 8, 2026
e91b1f7
pnpm prettier
alexfauquette Apr 8, 2026
e65779a
pnpm proptypes
alexfauquette Apr 8, 2026
60df451
docs:api
alexfauquette Apr 8, 2026
3ffdd97
pnpm docs:api
alexfauquette Apr 8, 2026
c0e824b
Merge remote-tracking branch 'upstream/master' into explore-polar-chart
alexfauquette Apr 8, 2026
a21c71d
remove duplicate export
alexfauquette Apr 8, 2026
05f6f98
pnpm prettier
alexfauquette Apr 8, 2026
4a6f765
Merge remote-tracking branch 'upstream/master' into explore-polar-chart
alexfauquette Apr 8, 2026
ba10781
Merge remote-tracking branch 'upstream/master' into explore-polar-chart
alexfauquette Apr 8, 2026
00527fc
back-to-pnpm-lock
alexfauquette Apr 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions docs/data/charts/dataset/monthlyGlobalTemperatures.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Data from: https://ourworldindata.org/grapher/monthly-average-surface-temperaturess-by-year?overlay=download-data
const monthlyGlobalTemperatures = [
{
year: 2025,
temperatures: [
13.22883, 13.356764, 14.059157, 14.962844, 15.792284, 16.456886, 16.67788,
16.601345, 16.108519, 15.1414995, 14.0192585, 13.151818,
],
},
{
year: 2015,
temperatures: [
12.634522, 12.928324, 13.637803, 14.418158, 15.4382105, 16.169155, 16.382626,
16.353651, 15.713228, 14.8876295, 13.75632, 13.204671,
],
},
{
year: 2005,
temperatures: [
12.589498, 12.735534, 13.497629, 14.432102, 15.331207, 16.059366, 16.314322,
16.141184, 15.57603, 14.618258, 13.501898, 12.766566,
],
},
{
year: 1995,
temperatures: [
12.312858, 12.794863, 13.173332, 14.242319, 15.026494, 15.8967905, 16.125097,
16.0047, 15.245733, 14.251504, 13.146228, 12.325032,
],
},
{
year: 1985,
temperatures: [
12.01948, 12.034697, 12.878375, 13.889007, 14.824746, 15.516486, 15.69393,
15.717554, 14.925496, 13.799661, 12.776523, 12.119616,
],
},
{
year: 1975,
temperatures: [
11.799964, 12.069822, 12.798457, 13.720477, 14.631341, 15.288152, 15.500376,
15.273629, 14.606582, 13.518547, 12.49495, 11.842349,
],
},
];

export default monthlyGlobalTemperatures;
47 changes: 47 additions & 0 deletions docs/data/charts/dataset/monthlyGlobalTemperatures.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Data from: https://ourworldindata.org/grapher/monthly-average-surface-temperaturess-by-year?overlay=download-data
const monthlyGlobalTemperatures: { year: number; temperatures: number[] }[] = [
{
year: 2025,
temperatures: [
13.22883, 13.356764, 14.059157, 14.962844, 15.792284, 16.456886, 16.67788, 16.601345,
16.108519, 15.1414995, 14.0192585, 13.151818,
],
},
{
year: 2015,
temperatures: [
12.634522, 12.928324, 13.637803, 14.418158, 15.4382105, 16.169155, 16.382626, 16.353651,
15.713228, 14.8876295, 13.75632, 13.204671,
],
},
{
year: 2005,
temperatures: [
12.589498, 12.735534, 13.497629, 14.432102, 15.331207, 16.059366, 16.314322, 16.141184,
15.57603, 14.618258, 13.501898, 12.766566,
],
},
{
year: 1995,
temperatures: [
12.312858, 12.794863, 13.173332, 14.242319, 15.026494, 15.8967905, 16.125097, 16.0047,
15.245733, 14.251504, 13.146228, 12.325032,
],
},
{
year: 1985,
temperatures: [
12.01948, 12.034697, 12.878375, 13.889007, 14.824746, 15.516486, 15.69393, 15.717554,
14.925496, 13.799661, 12.776523, 12.119616,
],
},
{
year: 1975,
temperatures: [
11.799964, 12.069822, 12.798457, 13.720477, 14.631341, 15.288152, 15.500376, 15.273629,
14.606582, 13.518547, 12.49495, 11.842349,
],
},
];

export default monthlyGlobalTemperatures;
44 changes: 44 additions & 0 deletions docs/data/charts/radial-lines/RadialLineOverview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import * as React from 'react';
import { blue } from '@mui/material/colors';
import { RadialLineChart } from '@mui/x-charts/RadialLineChart';
import monthlyGlobalTemperatures from '../dataset/monthlyGlobalTemperatures';

const months = [
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec',
];

const colors = [blue[100], blue[300], blue[500], blue[700], blue[800], blue[900]];
const series = monthlyGlobalTemperatures.reverse().map((item, index) => ({
label: item.year.toString(),
data: item.temperatures,
color: colors[index],
}));

export default function RadialLineOverview() {
return (
<RadialLineChart
height={300}
series={series}
rotationAxis={[{ data: months, scaleType: 'point' }]}
radiusAxis={[
{
domainLimit: (min, max) => ({
min: Math.floor(min.valueOf()),
max: Math.ceil(max.valueOf()),
}),
},
]}
/>
);
}
44 changes: 44 additions & 0 deletions docs/data/charts/radial-lines/RadialLineOverview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import * as React from 'react';
import { blue } from '@mui/material/colors';
import { RadialLineChart } from '@mui/x-charts/RadialLineChart';
import monthlyGlobalTemperatures from '../dataset/monthlyGlobalTemperatures';

const months = [
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec',
];

const colors = [blue[100], blue[300], blue[500], blue[700], blue[800], blue[900]];
const series = monthlyGlobalTemperatures.reverse().map((item, index) => ({
label: item.year.toString(),
data: item.temperatures,
color: colors[index],
}));

export default function RadialLineOverview() {
return (
<RadialLineChart
height={300}
series={series}
rotationAxis={[{ data: months, scaleType: 'point' }]}
radiusAxis={[
{
domainLimit: (min, max) => ({
min: Math.floor(min.valueOf()),
max: Math.ceil(max.valueOf()),
}),
},
]}
/>
);
}
13 changes: 13 additions & 0 deletions docs/data/charts/radial-lines/RadialLineOverview.tsx.preview
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<RadialLineChart
height={300}
series={series}
rotationAxis={[{ data: months, scaleType: 'point' }]}
radiusAxis={[
{
domainLimit: (min, max) => ({
min: Math.floor(min.valueOf()),
max: Math.ceil(max.valueOf()),
}),
},
]}
/>
59 changes: 59 additions & 0 deletions docs/data/charts/radial-lines/radial-lines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
title: React Radial Line chart
productId: x-charts
components: RadialLineChart, RadialLinePlot, ChartsPolarGrid, ChartsPolarDataProvider
---

# Charts - Radial Lines

<p class="description">Use radial line charts to show trends along periodic values.</p>

## Overview

Radial line charts plot line series on polar coordinates instead of a Cartesian grid.

Each data point maps to an angle on the rotation axis and a distance on the radius axis, creating a shape that wraps around the center.

They work well when you want to compare cyclical patterns or display multivariate data on a shared circular layout.

{{"demo": "RadialLineOverview.js"}}

## Basics

### Data format

Radial line chart series use the same `data` property as regular line charts: an array of numbers representing the values along the radius axis.

To set the categories around the circle, pass `data` on the `rotationAxis` configuration with `scaleType: 'point'`.
Its `data` should have the same length as the series.

When you omit the `rotationAxis` prop entirely, `RadialLineChart` supplies a default rotation axis with `scaleType='point'`.
Its `data` is `[0, 1, 2, ...]` with length matching the longest series, so each value pairs with its index in the series `data` array.

<!-- {{"demo": "BasicRadialLine.js"}} -->

## Composition

Use `ChartsPolarDataProvider` to provide `series`, `rotationAxis`, and `radiusAxis` props for composition.

In addition to the shared chart components available for [composition](/x/react-charts/composition/), you can use `RadialLinePlot` to draw the lines and `ChartsPolarGrid` to draw the grid.

Here's how the radial line chart is composed:

```jsx
<ChartsPolarDataProvider>
<ChartsWrapper>
<ChartsLegend />
<ChartsSurface>
<ChartsPolarGrid />
<g clipPath={`url(#${clipPathId})`}>
{/* Elements clipped inside the drawing area. */}
<RadialLinePlot />
<ChartsOverlay />
</g>
<ChartsClipPath id={clipPathId} />
</ChartsSurface>
<ChartsTooltip />
</ChartsWrapper>
</ChartsPolarDataProvider>
```
16 changes: 16 additions & 0 deletions docs/data/chartsApiPages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@ const chartsApiPages: MuiPage[] = [
pathname: '/x/api/charts/charts-localization-provider',
title: 'ChartsLocalizationProvider',
},
{
pathname: '/x/api/charts/charts-polar-data-provider',
title: 'ChartsPolarDataProvider',
},
{
pathname: '/x/api/charts/charts-polar-grid',
title: 'ChartsPolarGrid',
},
{
pathname: '/x/api/charts/charts-reference-line',
title: 'ChartsReferenceLine',
Expand Down Expand Up @@ -363,6 +371,14 @@ const chartsApiPages: MuiPage[] = [
pathname: '/x/api/charts/radar-series-plot',
title: 'RadarSeriesPlot',
},
{
pathname: '/x/api/charts/radial-line-chart',
title: 'RadialLineChart',
},
{
pathname: '/x/api/charts/radial-line-plot',
title: 'RadialLinePlot',
},
{
pathname: '/x/api/charts/range-bar-plot',
title: 'RangeBarPlot',
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/charts/charts-container.json

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions docs/pages/x/api/charts/charts-polar-data-provider.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import * as React from 'react';
import ApiPage from 'docs/src/modules/components/ApiPage';
import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations';
import jsonPageContent from './charts-polar-data-provider.json';

export default function Page(props) {
const { descriptions } = props;
return <ApiPage descriptions={descriptions} pageContent={jsonPageContent} />;
}

export async function getStaticProps() {
const req = require.context(
'docsx/translations/api-docs/charts/charts-polar-data-provider',
false,
/\.\/charts-polar-data-provider.*\.json$/,
);
const descriptions = mapApiPageTranslations(req);

return { props: { descriptions } };
}
39 changes: 39 additions & 0 deletions docs/pages/x/api/charts/charts-polar-data-provider.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"props": {
"colors": {
"type": { "name": "union", "description": "Array&lt;string&gt;<br>&#124;&nbsp;func" },
"default": "rainbowSurgePalette"
},
"height": { "type": { "name": "number" } },
"id": { "type": { "name": "string" } },
"localeText": { "type": { "name": "object" } },
"margin": {
"type": {
"name": "union",
"description": "number<br>&#124;&nbsp;{ bottom?: number, left?: number, right?: number, top?: number }"
}
},
"series": { "type": { "name": "arrayOf", "description": "Array&lt;object&gt;" } },
"skipAnimation": { "type": { "name": "bool" } },
"slotProps": { "type": { "name": "object" } },
"slots": { "type": { "name": "object" }, "additionalInfo": { "slotsApi": true } },
"width": { "type": { "name": "number" } }
},
"name": "ChartsPolarDataProvider",
"imports": [
"import { ChartsPolarDataProvider } from '@mui/x-charts/ChartsPolarDataProvider';",
"import { ChartsPolarDataProvider } from '@mui/x-charts';",
"import { ChartsPolarDataProvider } from '@mui/x-charts-pro';",
"import { ChartsPolarDataProvider } from '@mui/x-charts-premium';"
],
"slots": [
{ "name": "baseButton", "description": "", "class": null },
{ "name": "baseIconButton", "description": "", "class": null }
],
"classes": [],
"muiName": "MuiChartsPolarDataProvider",
"filename": "/packages/x-charts/src/ChartsPolarDataProvider/ChartsPolarDataProvider.tsx",
"inheritance": null,
"demos": "<ul><li><a href=\"/x/react-charts/radial-lines/\">Charts - Radial Lines</a></li></ul>",
"cssComponent": false
}
20 changes: 20 additions & 0 deletions docs/pages/x/api/charts/charts-polar-grid.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import * as React from 'react';
import ApiPage from 'docs/src/modules/components/ApiPage';
import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations';
import jsonPageContent from './charts-polar-grid.json';

export default function Page(props) {
const { descriptions } = props;
return <ApiPage descriptions={descriptions} pageContent={jsonPageContent} />;
}

export async function getStaticProps() {
const req = require.context(
'docsx/translations/api-docs/charts/charts-polar-grid',
false,
/\.\/charts-polar-grid.*\.json$/,
);
const descriptions = mapApiPageTranslations(req);

return { props: { descriptions } };
}
Loading
Loading