Skip to content

Commit

Permalink
Some quick EuiSeriesChart additions (#1198)
Browse files Browse the repository at this point in the history
  • Loading branch information
cchaos authored Sep 19, 2018
1 parent c9716d0 commit 1352a5b
Show file tree
Hide file tree
Showing 15 changed files with 629 additions and 76 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ No public interface changes since `4.1.0`.
- Fixed issue with unselected tabs and aria-controls attribute in EuiTabbedContent
- Added `tag` icon ([#1188](https://github.com/elastic/eui/pull/1188))
- Replaced `logging` app icon ([#1194](https://github.com/elastic/eui/pull/1194))
- Added some opacity options to `EuiLineSeries` and `EuiAreaSeries` ([#1198](https://github.com/elastic/eui/pull/1198))

**Bug fixes**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ exports[`EuiEmptyPrompt is rendered 1`] = `
Body
</p>
</div>
<div
class="euiSpacer euiSpacer--l"
/>
</span>
<div
class="euiSpacer euiSpacer--l"
/>
<div
class="euiSpacer euiSpacer--s"
/>
Expand Down Expand Up @@ -108,9 +108,6 @@ exports[`EuiEmptyPrompt props body renders alone 1`] = `
>
body
</div>
<div
class="euiSpacer euiSpacer--l"
/>
</span>
</div>
`;
Expand Down
4 changes: 3 additions & 1 deletion src/components/empty_prompt/empty_prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export const EuiEmptyPrompt = ({
<EuiText>
{body}
</EuiText>
<EuiSpacer size="l" />
</Fragment>
);
}
Expand Down Expand Up @@ -108,6 +107,9 @@ export const EuiEmptyPrompt = ({
>
{icon}
{content}
{body && actions &&
<EuiSpacer size="l" />
}
{actionsEl}
</div>
);
Expand Down
46 changes: 34 additions & 12 deletions src/components/series_chart/__snapshots__/series_chart.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,57 @@ exports[`EuiSeriesChart renders an empty chart 1`] = `
style="width: 100%; height: 100%;"
>
<div
class="euiEmptyPrompt"
class="euiEmptyPrompt euiSeriesChartContainer__emptyPrompt"
>
<svg
class="euiIcon euiIcon--xxLarge euiIcon--subdued"
focusable="false"
height="16"
viewBox="0 0 16 16"
width="16"
height="32"
viewBox="0 0 32 32"
width="32"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M8 14v-4h1v4h5V5h1v9a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-2h1v2h6zm4.853-10.146l-2.999 3a1.5 1.5 0 0 1-2.538 1.568l-2.714.904L4 9.527a1.5 1.5 0 1 1-.316-.948L7 7.473a1.5 1.5 0 0 1 2.146-1.327l3-3a1.5 1.5 0 1 1 .707.707z"
<g
fill="none"
fill-rule="evenodd"
/>
>
<rect
fill="#00A9E5"
height="18"
rx="2"
width="8"
x="1"
y="13"
/>
<rect
fill="#00A9E5"
height="22"
rx="2"
width="8"
x="23"
y="9"
/>
<rect
fill="#00BFB3"
height="30"
rx="2"
width="8"
x="12"
y="1"
/>
</g>
</svg>
<div
class="euiSpacer euiSpacer--s"
/>
<span
class="euiTextColor euiTextColor--subdued"
>
<h2
<span
class="euiTitle euiTitle--medium"
>
Chart not available
</h2>
</span>
<div
class="euiSpacer euiSpacer--m"
/>
Expand All @@ -41,9 +66,6 @@ exports[`EuiSeriesChart renders an empty chart 1`] = `
~~Empty Chart~~
</p>
</div>
<div
class="euiSpacer euiSpacer--l"
/>
</span>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/components/series_chart/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
@import "series/index";
@import "legend";
@import "line_annotation";
@import "series_chart";
8 changes: 8 additions & 0 deletions src/components/series_chart/_series_chart.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.euiSeriesChartContainer__emptyPrompt {
// Center the empty prompt within the series container
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
Loading

0 comments on commit 1352a5b

Please sign in to comment.