Skip to content

Commit

Permalink
Fixing opacities
Browse files Browse the repository at this point in the history
  • Loading branch information
cchaos committed Sep 18, 2018
1 parent 38d8bc9 commit 3987934
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,6 @@ exports[`EuiAreaSeries all props are rendered 1`] = `
onSeriesClick={[MockFunction]}
onSeriesMouseOut={[Function]}
onSeriesMouseOver={[Function]}
opacity={1}
opacityDomain={Array []}
opacityType="literal"
radiusDomain={Array []}
Expand All @@ -857,6 +856,7 @@ exports[`EuiAreaSeries all props are rendered 1`] = `
style={
Object {
"cursor": "default",
"opacity": 1,
}
}
xDomain={
Expand Down Expand Up @@ -1012,7 +1012,6 @@ exports[`EuiAreaSeries all props are rendered 1`] = `
onSeriesClick={[MockFunction]}
onSeriesMouseOut={[Function]}
onSeriesMouseOver={[Function]}
opacity={1}
opacityDomain={Array []}
opacityType="literal"
radiusDomain={Array []}
Expand All @@ -1037,6 +1036,7 @@ exports[`EuiAreaSeries all props are rendered 1`] = `
style={
Object {
"cursor": "default",
"opacity": 1,
}
}
xDomain={
Expand Down Expand Up @@ -1174,7 +1174,6 @@ exports[`EuiAreaSeries all props are rendered 1`] = `
onSeriesClick={[MockFunction]}
onSeriesMouseOut={[Function]}
onSeriesMouseOver={[Function]}
opacity={1}
opacityDomain={Array []}
opacityType="literal"
radiusDomain={Array []}
Expand All @@ -1199,6 +1198,7 @@ exports[`EuiAreaSeries all props are rendered 1`] = `
style={
Object {
"cursor": "default",
"opacity": 1,
}
}
xDomain={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ exports[`EuiLineSeries all props are rendered 1`] = `
strokeStyle="solid"
style={
Object {
"opacity": 1,
"pointerEvents": "visiblestroke",
"strokeWidth": 3,
}
Expand Down Expand Up @@ -525,6 +526,7 @@ exports[`EuiLineSeries all props are rendered 1`] = `
strokeStyle="solid"
style={
Object {
"opacity": 1,
"pointerEvents": "visiblestroke",
"strokeWidth": 3,
}
Expand Down Expand Up @@ -687,6 +689,7 @@ exports[`EuiLineSeries all props are rendered 1`] = `
strokeStyle="solid"
style={
Object {
"opacity": 1,
"pointerEvents": "visiblestroke",
"strokeWidth": 3,
}
Expand Down Expand Up @@ -4463,6 +4466,7 @@ exports[`EuiLineSeries is rendered 1`] = `
strokeStyle="solid"
style={
Object {
"opacity": 1,
"pointerEvents": "visiblestroke",
"strokeWidth": 3,
}
Expand Down Expand Up @@ -4641,6 +4645,7 @@ exports[`EuiLineSeries is rendered 1`] = `
strokeStyle="solid"
style={
Object {
"opacity": 1,
"pointerEvents": "visiblestroke",
"strokeWidth": 3,
}
Expand Down Expand Up @@ -4801,6 +4806,7 @@ exports[`EuiLineSeries is rendered 1`] = `
strokeStyle="solid"
style={
Object {
"opacity": 1,
"pointerEvents": "visiblestroke",
"strokeWidth": 3,
}
Expand Down
3 changes: 1 addition & 2 deletions src/components/series_chart/series/_area_series.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.euiAreaSeries {
stroke-width: 0;
opacity: .2 !important;
stroke-width: 0 !important;
}
2 changes: 1 addition & 1 deletion src/components/series_chart/series/area_series.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ export class EuiAreaSeries extends AbstractSeries {
className="euiAreaSeries"
curve={curve}
color={color}
opacity={fillOpacity}
data={data}
onSeriesClick={onSeriesClick}
onSeriesMouseOver={this._onSeriesMouseOver}
onSeriesMouseOut={this._onSeriesMouseOut}
style={{
cursor: isMouseOverSeries && onSeriesClick ? 'pointer' : 'default',
opacity: fillOpacity,
}}
{...rest}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/series_chart/series/line_series.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ export class EuiLineSeries extends AbstractSeries {
key={`${name}-border`}
curve={curve}
data={data}
opacity={borderOpacity}
onSeriesClick={onSeriesClick}
style={{
pointerEvents: 'visiblestroke',
strokeWidth: lineSize + 2, // border margin
opacity: borderOpacity,
}}
_colorValue={'white'}
/>
Expand Down

0 comments on commit 3987934

Please sign in to comment.