Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
docs
  • Loading branch information
alexfauquette committed Feb 12, 2024
commit a1886ff5f459eb9e0944c9dab9335074c5038224
13 changes: 9 additions & 4 deletions docs/data/charts/gauge/gauge.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ THe first solution is to add your component as children.
They will be stacked on top of the default rendering.

```tsx
import { Gauge } from '@mui/x-charts/Gauge'
import { Gauge } from '@mui/x-charts/Gauge';

<Gauge value={25} valueMax={50}>
<AddedElement />
</Gauge>
</Gauge>;
```

### Using the Gauge container
Expand All @@ -84,13 +84,18 @@ The second solution is to start from scratch with our components:
- GaugeValueText
Comment on lines +83 to +85
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- GaugeReferenceArc
- GaugeValueArc
- GaugeValueText
- `<GaugeReferenceArc />`
- `<GaugeValueArc />`
- `<GaugeValueText />`


```tsx
import { GaugeContainer, Gauge , GaugeReferenceArc, GaugeValueArc } from '@mui/x-charts/Gauge'
import {
GaugeContainer,
Gauge,
GaugeReferenceArc,
GaugeValueArc,
} from '@mui/x-charts/Gauge';

<GaugeContainer value={25} valueMax={50}>
<GaugeReferenceArc />
<GaugeValueArc />
<AddedElement />
</GaugeContainer>
</GaugeContainer>;
```

### Creating your components
Expand Down
2 changes: 1 addition & 1 deletion docs/data/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ const pages: MuiPage[] = [
{ pathname: '/x/react-charts/bar-demo', title: 'Demos' },
],
},
{ pathname: '/x/react-charts/gauge', title: 'Gauge' },
{
pathname: '/x/react-charts-lines',
title: 'Lines',
Expand Down Expand Up @@ -458,7 +459,6 @@ const pages: MuiPage[] = [
pathname: '/x/react-charts-future',
subheader: 'Future components',
children: [
{ pathname: '/x/react-charts/gauge', title: 'Gauge', planned: true },
{ pathname: '/x/react-charts/heat-map', title: 'Heat map', planned: true },
{ pathname: '/x/react-charts/radar', title: 'Radar', planned: true },
{ pathname: '/x/react-charts/tree-map', title: 'Treemap', planned: true },
Expand Down
6 changes: 6 additions & 0 deletions docs/src/modules/components/ChartComponentsGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ function components() {
srcDark: '/static/x/component-illustrations/sparkline-dark.png',
href: '/x/react-charts/sparkline/',
},
// {
// title: 'Gauge',
// srcLight: '/static/x/component-illustrations/gauge-light.png',
// srcDark: '/static/x/component-illustrations/gauge-dark.png',
// href: '/x/react-charts/gauge/',
// },
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove comments when the image is available

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added illustrations for that in a separate PR → #12041

];
}

Expand Down