Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Charts): Fix themes for bar chart default colors #2112

Merged
merged 1 commit into from Jun 3, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -2235,6 +2235,7 @@ exports[`Chart 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -4834,6 +4835,7 @@ exports[`Chart 2`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -7439,6 +7441,7 @@ exports[`renders axis and component children 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -127,6 +127,7 @@ exports[`Chart 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -618,6 +619,7 @@ exports[`Chart 2`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -1133,6 +1135,7 @@ exports[`renders component data 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -127,6 +127,7 @@ exports[`ChartAxis 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -633,6 +634,7 @@ exports[`ChartAxis 2`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -3256,6 +3258,7 @@ exports[`renders component data 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -142,6 +142,7 @@ exports[`Chart 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -648,6 +649,7 @@ exports[`Chart 2`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -3256,6 +3258,7 @@ exports[`renders component data 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -4,18 +4,36 @@ section: 'charts'
propComponents: ['Chart', 'ChartBar', 'ChartGroup', 'ChartThemeColor', 'ChartThemeVariant']
---

## Blue bar chart
## Default Bar Chart

import { Chart, ChartBar, ChartGroup, ChartThemeColor, ChartThemeVariant } from '@patternfly/react-charts';
import './chart-bar.scss';

```js
import React from 'react';
import { Chart, ChartBar, ChartGroup } from '@patternfly/react-charts';
import { Chart, ChartBar } from '@patternfly/react-charts';
<div>
<div className="bar-chart-container">
<Chart domainPadding={{ x: [30, 25] }}>
<ChartBar data={[ { x: 'Cats', y: 1 }, { x: 'Dogs', y: 2 }, { x: 'Birds', y: 5 }, { x: 'Mice', y: 3 } ]} />
</Chart>
</div>
</div>
```

## Grouped Bar Chart with Light Blue Theme
```js
import React from 'react';
import { Chart, ChartBar, ChartGroup } from '@patternfly/react-charts';
<div>
<div className="bar-chart-container">
<Chart
domainPadding={{ x: [30, 25] }}
themeColor={ChartThemeColor.blue}
themeVariant={ChartThemeVariant.light}
>
<ChartGroup offset={11}>
<ChartBar data={[{ x: 'Cats', y: 1 }, { x: 'Dogs', y: 2 }, { x: 'Birds', y: 5 }, { x: 'Mice', y: 3 }]} />
<ChartBar data={[{ x: 'Cats', y: 2 }, { x: 'Dogs', y: 1 }, { x: 'Birds', y: 7 }, { x: 'Mice', y: 4 }]} />
@@ -27,7 +45,7 @@ import { Chart, ChartBar, ChartGroup } from '@patternfly/react-charts';
</div>
```

## Multi-color bar chart
## Grouped Bar Chart with Light Multi-Color Theme
```js
import React from 'react';
import { Chart, ChartBar, ChartGroup, ChartThemeColor, ChartThemeVariant } from '@patternfly/react-charts';
@@ -154,6 +154,7 @@ exports[`Chart 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -609,6 +610,7 @@ exports[`Chart 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -1130,6 +1132,7 @@ exports[`Chart 2`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -1585,6 +1588,7 @@ exports[`Chart 2`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -2093,6 +2097,7 @@ exports[`renders container via ChartLegend 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -2548,6 +2553,7 @@ exports[`renders container via ChartLegend 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -154,6 +154,7 @@ exports[`Chart 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -609,6 +610,7 @@ exports[`Chart 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -1130,6 +1132,7 @@ exports[`Chart 2`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -1585,6 +1588,7 @@ exports[`Chart 2`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -2098,6 +2102,7 @@ exports[`renders component data 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -2553,6 +2558,7 @@ exports[`renders component data 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -111,6 +111,7 @@ exports[`Chart 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -589,6 +590,7 @@ exports[`Chart 2`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -1079,6 +1081,7 @@ exports[`renders component data 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -132,6 +132,7 @@ exports[`Chart 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -629,6 +630,7 @@ exports[`Chart 2`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -1139,6 +1141,7 @@ exports[`renders component data 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -103,6 +103,7 @@ exports[`ChartGroup 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -570,6 +571,7 @@ exports[`ChartGroup 2`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -1038,6 +1040,7 @@ exports[`renders container children 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -99,6 +99,7 @@ exports[`Chart 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -573,6 +574,7 @@ exports[`Chart 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -1045,6 +1047,7 @@ exports[`Chart 2`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -1519,6 +1522,7 @@ exports[`Chart 2`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -1991,6 +1995,7 @@ exports[`renders component data 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -2466,6 +2471,7 @@ exports[`renders component data 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -126,6 +126,7 @@ exports[`Chart 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -616,6 +617,7 @@ exports[`Chart 2`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
@@ -3221,6 +3223,7 @@ exports[`renders component data 1`] = `
"padding": 50,
"style": Object {
"data": Object {
"fill": "#06c",
"stroke": "none",
},
"labels": Object {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.