Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial mdx * convert some md files to mdx * add fullscreen * Moved imports to top of md files * Fix propComponents * upgrade mdx * Fix rest of md files * css import order matters * webpack aliases * no console log * markdown quote style * mdx template update * Add imports to example markdown for copy/paste * Add newlines to end of markdown files
- Loading branch information
Showing
90 changed files
with
1,766 additions
and
1,212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 26 additions & 25 deletions
51
packages/patternfly-4/react-charts/src/components/ChartDonut/ChartDonut.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,59 @@ | ||
--- | ||
title: "Donut Chart" | ||
section: "charts" | ||
title: 'Donut Chart' | ||
section: 'charts' | ||
--- | ||
|
||
## Blue Theme Donut Chart | ||
```js | ||
import React from 'react'; | ||
|
||
import { ChartDonut, ChartLabel, ChartLegend, ChartTheme } from '@patternfly/react-charts'; | ||
import { Grid, GridItem, Text, TextVariants } from '@patternfly/react-core'; | ||
|
||
<div style={{display: 'inline-flex'}}> | ||
<div style={{height: 450, width: 450}}> | ||
<svg style={{position: 'absolute'}} height={this.size} width={this.size}> | ||
```js | ||
import React from 'react'; | ||
|
||
<div style={{ display: 'inline-flex' }}> | ||
<div style={{ height: 450, width: 450 }}> | ||
<svg style={{ position: 'absolute' }} height={this.size} width={this.size}> | ||
<ChartLabel style={{ fontSize: 20 }} text="100" textAnchor="middle" verticalAnchor="middle" x={225} y={200} /> | ||
<ChartLabel style={{ fill: '#bbb' }} text="Pets" textAnchor="middle" verticalAnchor="middle" x={255} y={250} /> | ||
</svg> | ||
<ChartDonut | ||
data={[{ x: 'Cats', y: 35 }, { x: 'Dogs', y: 55 }, { x: 'Birds', y: 10 }]} | ||
labels={datum => `${datum.x}: ${datum.y}`} | ||
theme={ChartTheme.light.blue} | ||
/> | ||
/> | ||
</div> | ||
<ChartLegend | ||
data={[{ name: 'Cats' }, { name: 'Dogs' }, { name: 'Birds' }]} | ||
orientation={'vertical'} | ||
theme={ChartTheme.light.blue} | ||
y={160} | ||
/> | ||
data={[{ name: 'Cats' }, { name: 'Dogs' }, { name: 'Birds' }]} | ||
orientation={'vertical'} | ||
theme={ChartTheme.light.blue} | ||
y={160} | ||
/> | ||
</div> | ||
``` | ||
|
||
## Multi-color Theme Donut Chart | ||
```js | ||
import React from 'react'; | ||
import { ChartDonut, ChartLabel, ChartLegend, ChartTheme } from '@patternfly/react-charts'; | ||
import { Grid, GridItem, Text, TextVariants } from '@patternfly/react-core'; | ||
|
||
<div> | ||
<div style={{height: 450, width: 450}}> | ||
<svg style={{position: 'absolute'}} height={this.size} width={this.size}> | ||
<div style={{ height: 450, width: 450 }}> | ||
<svg style={{ position: 'absolute' }} height={this.size} width={this.size}> | ||
<ChartLabel style={{ fontSize: 20 }} text="100" textAnchor="middle" verticalAnchor="middle" x={225} y={200} /> | ||
<ChartLabel style={{ fill: '#bbb' }} text="Pets" textAnchor="middle" verticalAnchor="middle" x={255} y={250} /> | ||
</svg> | ||
<ChartDonut | ||
data={[{ x: 'Cats', y: 35 }, { x: 'Dogs', y: 55 }, { x: 'Birds', y: 10 }]} | ||
labels={datum => `${datum.x}: ${datum.y}`} | ||
theme={ChartTheme.light.multi} | ||
/> | ||
/> | ||
</div> | ||
<ChartLegend | ||
data={[{ name: 'Cats' }, { name: 'Dogs' }, { name: 'Birds' }]} | ||
orientation={'horizontal'} | ||
theme={ChartTheme.light.multi} | ||
height={35} | ||
x={140} | ||
/> | ||
data={[{ name: 'Cats' }, { name: 'Dogs' }, { name: 'Birds' }]} | ||
orientation={'horizontal'} | ||
theme={ChartTheme.light.multi} | ||
height={35} | ||
x={140} | ||
/> | ||
</div> | ||
``` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
packages/patternfly-4/react-core/src/components/Alert/Alert.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.