Skip to content

Commit

Permalink
Remove fix size
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette committed Feb 8, 2024
1 parent b8c38c6 commit d4710a9
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 25 deletions.
9 changes: 5 additions & 4 deletions docs/data/charts/gauge/BasicGauges.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import * as React from 'react';
import Stack from '@mui/material/Stack';
import { Gauge } from '@mui/x-charts/Gauge';

export default function BasicGauges() {
return (
<React.Fragment>
<Gauge value={60} />
<Gauge value={60} startAngle={-90} endAngle={90} />
</React.Fragment>
<Stack direction={{ xs: 'column', md: 'row' }} spacing={{ xs: 1, md: 3 }}>
<Gauge width={100} height={100} value={60} />
<Gauge width={100} height={100} value={60} startAngle={-90} endAngle={90} />
</Stack>
);
}
9 changes: 5 additions & 4 deletions docs/data/charts/gauge/BasicGauges.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import * as React from 'react';
import Stack from '@mui/material/Stack';
import { Gauge } from '@mui/x-charts/Gauge';

export default function BasicGauges() {
return (
<React.Fragment>
<Gauge value={60} />
<Gauge value={60} startAngle={-90} endAngle={90} />
</React.Fragment>
<Stack direction={{ xs: 'column', md: 'row' }} spacing={{ xs: 1, md: 3 }}>
<Gauge width={100} height={100} value={60} />
<Gauge width={100} height={100} value={60} startAngle={-90} endAngle={90} />
</Stack>
);
}
6 changes: 2 additions & 4 deletions docs/data/charts/gauge/BasicGauges.tsx.preview
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
<React.Fragment>
<Gauge value={60} />
<Gauge value={60} startAngle={-90} endAngle={90} />
</React.Fragment>
<Gauge width={100} height={100} value={60} />
<Gauge width={100} height={100} value={60} startAngle={-90} endAngle={90} />
9 changes: 5 additions & 4 deletions docs/data/charts/gauge/GaugeValueRangeNoSnap.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import * as React from 'react';
import Stack from '@mui/material/Stack';
import { Gauge } from '@mui/x-charts/Gauge';

export default function GaugeValueRangeNoSnap() {
return (
<React.Fragment>
<Gauge value={50} />
<Gauge value={50} valueMin={10} valueMax={60} />
</React.Fragment>
<Stack direction={{ xs: 'column', md: 'row' }} spacing={{ xs: 1, md: 3 }}>
<Gauge width={100} height={100} value={50} />
<Gauge width={100} height={100} value={50} valueMin={10} valueMax={60} />
</Stack>
);
}
9 changes: 5 additions & 4 deletions docs/data/charts/gauge/GaugeValueRangeNoSnap.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import * as React from 'react';
import Stack from '@mui/material/Stack';
import { Gauge } from '@mui/x-charts/Gauge';

export default function GaugeValueRangeNoSnap() {
return (
<React.Fragment>
<Gauge value={50} />
<Gauge value={50} valueMin={10} valueMax={60} />
</React.Fragment>
<Stack direction={{ xs: 'column', md: 'row' }} spacing={{ xs: 1, md: 3 }}>
<Gauge width={100} height={100} value={50} />
<Gauge width={100} height={100} value={50} valueMin={10} valueMax={60} />
</Stack>
);
}
6 changes: 2 additions & 4 deletions docs/data/charts/gauge/GaugeValueRangeNoSnap.tsx.preview
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
<React.Fragment>
<Gauge value={50} />
<Gauge value={50} valueMin={10} valueMax={60} />
</React.Fragment>
<Gauge width={100} height={100} value={50} />
<Gauge width={100} height={100} value={50} valueMin={10} valueMax={60} />
1 change: 1 addition & 0 deletions docs/data/charts/gauge/PlaygroundNoSnap.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export default function PlaygroundNoSnap() {
sx={{
width: 200,
height: 200,
margin: 'auto',
}}
>
<Gauge
Expand Down
2 changes: 1 addition & 1 deletion packages/x-charts/src/Gauge/Gauge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const useUtilityClasses = (props: GaugeProps) => {
function Gauge(props: GaugeProps) {
const classes = useUtilityClasses(props);
return (
<GaugeContainer width={200} height={200} {...props} className={classes.root}>
<GaugeContainer {...props} className={classes.root}>
<GaugeReferenceArc className={classes.referenceArc} />
<GaugeValueArc className={classes.valueArc} />
</GaugeContainer>
Expand Down

0 comments on commit d4710a9

Please sign in to comment.