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

Some quick EuiSeriesChart additions #1198

Merged
merged 7 commits into from
Sep 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- 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))
Copy link
Contributor

Choose a reason for hiding this comment

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

@chandlerprall should we label these under the experimental subheader? Or only do that for experimental breaks?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm fine with either. The chart themselves were/are flagged as experimental, and these changes themselves are not experimental in of themselves.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah that was kind of my line of thought too


**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