Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into theme
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasTy committed Sep 3, 2024
2 parents f7f7381 + 24943b0 commit b26571b
Show file tree
Hide file tree
Showing 83 changed files with 1,053 additions and 522 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ on:
- 'master'
- 'next'

permissions: {}

jobs:
benchmarks:
name: Benchmarks Charts
Expand All @@ -26,10 +28,10 @@ jobs:
# L3: Run the benchmarks for pull requests with the label 'component: charts'
# Yaml syntax looks a little weird, but it is correct.
if: >-
${{
(github.event_name == 'push') ||
(github.event_name == 'pull_request' && github.event.action == 'labeled' && github.event.label.name == 'component: charts') ||
(github.event_name == 'pull_request' && github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'component: charts'))
${{
(github.event_name == 'push') ||
(github.event_name == 'pull_request' && github.event.action == 'labeled' && github.event.label.name == 'component: charts') ||
(github.event_name == 'pull_request' && github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'component: charts'))
}}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/new-issue-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
needs: issue_cleanup
if: needs.issue_cleanup.outputs.orderId != ''
uses: mui/mui-public/.github/workflows/issues_order-id-validation.yml@master
secrets: inherit
with:
orderId: ${{ needs.issue_cleanup.outputs.orderId }}
permissions:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Change Log
# Changelog

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
Expand Down
2 changes: 1 addition & 1 deletion changelogOld/CHANGELOG.v4.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Change Log for v4 releases
# Changelog for v4 releases

## 4.0.0

Expand Down
2 changes: 1 addition & 1 deletion changelogOld/CHANGELOG.v5.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Change Log for v5 releases
# Changelog for v5 releases

## 5.17.25

Expand Down
2 changes: 1 addition & 1 deletion changelogOld/CHANGELOG.v6.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Change Log for v6 releases
# Changelog for v6 releases

## 6.19.12

Expand Down
10 changes: 3 additions & 7 deletions docs/data/charts/pie/PieActiveArc.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
import * as React from 'react';
import { PieChart } from '@mui/x-charts/PieChart';

const data = [
{ id: 0, value: 10, label: 'series A' },
{ id: 1, value: 15, label: 'series B' },
{ id: 2, value: 20, label: 'series C' },
];
import { desktopOS, valueFormatter } from './webUsageStats';

export default function PieActiveArc() {
return (
<PieChart
series={[
{
data,
data: desktopOS,
highlightScope: { fade: 'global', highlight: 'item' },
faded: { innerRadius: 30, additionalRadius: -30, color: 'gray' },
valueFormatter,
},
]}
height={200}
Expand Down
10 changes: 3 additions & 7 deletions docs/data/charts/pie/PieActiveArc.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
import * as React from 'react';
import { PieChart } from '@mui/x-charts/PieChart';

const data = [
{ id: 0, value: 10, label: 'series A' },
{ id: 1, value: 15, label: 'series B' },
{ id: 2, value: 20, label: 'series C' },
];
import { desktopOS, valueFormatter } from './webUsageStats';

export default function PieActiveArc() {
return (
<PieChart
series={[
{
data,
data: desktopOS,
highlightScope: { fade: 'global', highlight: 'item' },
faded: { innerRadius: 30, additionalRadius: -30, color: 'gray' },
valueFormatter,
},
]}
height={200}
Expand Down
3 changes: 2 additions & 1 deletion docs/data/charts/pie/PieActiveArc.tsx.preview
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<PieChart
series={[
{
data,
data: desktopOS,
highlightScope: { fade: 'global', highlight: 'item' },
faded: { innerRadius: 30, additionalRadius: -30, color: 'gray' },
valueFormatter,
},
]}
height={200}
Expand Down
29 changes: 5 additions & 24 deletions docs/data/charts/pie/PieAnimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,7 @@ import Slider from '@mui/material/Slider';
import FormControlLabel from '@mui/material/FormControlLabel';
import Checkbox from '@mui/material/Checkbox';
import { PieChart } from '@mui/x-charts/PieChart';

const data1 = [
{ label: 'Group A', value: 400 },
{ label: 'Group B', value: 300 },
{ label: 'Group C', value: 300 },
{ label: 'Group D', value: 200 },
];

const data2 = [
{ label: '1', value: 100 },
{ label: '2', value: 300 },
{ label: '3', value: 100 },
{ label: '4', value: 80 },
{ label: '5', value: 40 },
{ label: '6', value: 30 },
{ label: '7', value: 50 },
{ label: '8', value: 100 },
{ label: '9', value: 200 },
{ label: '10', value: 150 },
{ label: '11', value: 50 },
];
import { mobileAndDesktopOS, valueFormatter } from './webUsageStats';

export default function PieAnimation() {
const [radius, setRadius] = React.useState(50);
Expand All @@ -50,11 +30,12 @@ export default function PieAnimation() {
<PieChart
height={300}
series={[
{ data: data1, outerRadius: radius },
{
data: data2.slice(0, itemNb),
data: mobileAndDesktopOS.slice(0, itemNb),
innerRadius: radius,
arcLabel: (params) => params.label ?? '',
arcLabelMinAngle: 20,
valueFormatter,
},
]}
skipAnimation={skipAnimation}
Expand All @@ -75,7 +56,7 @@ export default function PieAnimation() {
onChange={handleItemNbChange}
valueLabelDisplay="auto"
min={1}
max={10}
max={8}
aria-labelledby="input-item-number"
/>
<Typography id="input-radius" gutterBottom>
Expand Down
28 changes: 5 additions & 23 deletions docs/data/charts/pie/PieAnimation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,7 @@ import Slider from '@mui/material/Slider';
import FormControlLabel from '@mui/material/FormControlLabel';
import Checkbox from '@mui/material/Checkbox';
import { PieChart } from '@mui/x-charts/PieChart';

const data1 = [
{ label: 'Group A', value: 400 },
{ label: 'Group B', value: 300 },
{ label: 'Group C', value: 300 },
{ label: 'Group D', value: 200 },
];
const data2 = [
{ label: '1', value: 100 },
{ label: '2', value: 300 },
{ label: '3', value: 100 },
{ label: '4', value: 80 },
{ label: '5', value: 40 },
{ label: '6', value: 30 },
{ label: '7', value: 50 },
{ label: '8', value: 100 },
{ label: '9', value: 200 },
{ label: '10', value: 150 },
{ label: '11', value: 50 },
];
import { mobileAndDesktopOS, valueFormatter } from './webUsageStats';

export default function PieAnimation() {
const [radius, setRadius] = React.useState(50);
Expand All @@ -49,11 +30,12 @@ export default function PieAnimation() {
<PieChart
height={300}
series={[
{ data: data1, outerRadius: radius },
{
data: data2.slice(0, itemNb),
data: mobileAndDesktopOS.slice(0, itemNb),
innerRadius: radius,
arcLabel: (params) => params.label ?? '',
arcLabelMinAngle: 20,
valueFormatter,
},
]}
skipAnimation={skipAnimation}
Expand All @@ -74,7 +56,7 @@ export default function PieAnimation() {
onChange={handleItemNbChange}
valueLabelDisplay="auto"
min={1}
max={10}
max={8}
aria-labelledby="input-item-number"
/>
<Typography id="input-radius" gutterBottom>
Expand Down
31 changes: 15 additions & 16 deletions docs/data/charts/pie/PieArcLabel.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
import * as React from 'react';
import { PieChart, pieArcLabelClasses } from '@mui/x-charts/PieChart';

const data = [
{ value: 5, label: 'A' },
{ value: 10, label: 'B' },
{ value: 15, label: 'C' },
{ value: 20, label: 'D' },
];

const size = {
width: 400,
height: 200,
};
import { desktopOS, valueFormatter } from './webUsageStats';

export default function PieArcLabel() {
return (
<PieChart
series={[
{
arcLabel: (item) => `${item.label} (${item.value})`,
arcLabelMinAngle: 45,
data,
arcLabel: (item) => `${item.value}%`,
arcLabelMinAngle: 35,
arcLabelRadius: '60%',
...data,
},
]}
sx={{
[`& .${pieArcLabelClasses.root}`]: {
fill: 'white',
fontWeight: 'bold',
},
}}
{...size}
/>
);
}

const size = {
width: 400,
height: 200,
};

const data = {
data: desktopOS,
valueFormatter,
};
31 changes: 15 additions & 16 deletions docs/data/charts/pie/PieArcLabel.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
import * as React from 'react';
import { PieChart, pieArcLabelClasses } from '@mui/x-charts/PieChart';

const data = [
{ value: 5, label: 'A' },
{ value: 10, label: 'B' },
{ value: 15, label: 'C' },
{ value: 20, label: 'D' },
];

const size = {
width: 400,
height: 200,
};
import { desktopOS, valueFormatter } from './webUsageStats';

export default function PieArcLabel() {
return (
<PieChart
series={[
{
arcLabel: (item) => `${item.label} (${item.value})`,
arcLabelMinAngle: 45,
data,
arcLabel: (item) => `${item.value}%`,
arcLabelMinAngle: 35,
arcLabelRadius: '60%',
...data,
},
]}
sx={{
[`& .${pieArcLabelClasses.root}`]: {
fill: 'white',
fontWeight: 'bold',
},
}}
{...size}
/>
);
}

const size = {
width: 400,
height: 200,
};

const data = {
data: desktopOS,
valueFormatter,
};
8 changes: 4 additions & 4 deletions docs/data/charts/pie/PieArcLabel.tsx.preview
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<PieChart
series={[
{
arcLabel: (item) => `${item.label} (${item.value})`,
arcLabelMinAngle: 45,
data,
arcLabel: (item) => `${item.value}%`,
arcLabelMinAngle: 35,
arcLabelRadius: '60%',
...data,
},
]}
sx={{
[`& .${pieArcLabelClasses.root}`]: {
fill: 'white',
fontWeight: 'bold',
},
}}
Expand Down
Loading

0 comments on commit b26571b

Please sign in to comment.