Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Commit

Permalink
fix: Subtler chart empty state messages
Browse files Browse the repository at this point in the history
  • Loading branch information
diondiondion committed Aug 21, 2019
1 parent 1fc4fce commit 8bb2074
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/charts/SimpleChart/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled from 'styled-components';

import {getColorBlock} from '../../utils/colors';

import CenterContent from '../../CenterContent';
import Box from '../../Box';

import useChartist from '../useChartist';
import ChartTooltips from './ChartTooltips';
Expand Down Expand Up @@ -113,7 +113,9 @@ function SimpleChart({
getReadout={getTooltipReadout}
/>
) : (
<CenterContent fillParent>{emptyContent}</CenterContent>
<Box dimmed bottom right position="absolute" mx="xs" my="xxs">
{emptyContent}
</Box>
)}
</ChartWrapper>
);
Expand Down
6 changes: 3 additions & 3 deletions src/charts/SimpleGauge/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import styled, {css} from 'styled-components';
import {pxToRem} from '../../utils/units';
import {getColorBlock} from '../../utils/colors';

import CenterContent from '../../CenterContent';
import Box from '../../Box';

import useChartist from '../useChartist';
import StripesPattern from './StripesPattern';
Expand Down Expand Up @@ -87,10 +87,10 @@ function SimpleGauge({
patternId={hasValue ? null : patternId}
>
{!hasValue && (
<CenterContent fillParent spacing="0">
<Box dimmed bottom right position="absolute" mx="xs" my="xxs">
{emptyContent}
<StripesPattern color={color} id={patternId} />
</CenterContent>
</Box>
)}
</Wrapper>
);
Expand Down

0 comments on commit 8bb2074

Please sign in to comment.