Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import React, { FC } from 'react';
import { EuiIcon } from '@elastic/eui';
import { RectAnnotation, LineAnnotation, AnnotationDomainType, Position } from '@elastic/charts';
import { timeFormatter } from '../../../../../../../../common/util/date_utils';
import { useCurrentEuiTheme } from '../../../../../../components/color_range_legend';

interface Props {
overlayKey: number;
Expand All @@ -19,12 +20,14 @@ interface Props {
}

export const OverlayRange: FC<Props> = ({ overlayKey, start, end, color, showMarker = true }) => {
const { euiTheme } = useCurrentEuiTheme();

return (
<>
<RectAnnotation
id={`rect_annotation_${overlayKey}`}
zIndex={1}
hideTooltips={true}
hideTooltips
dataValues={[
{
coordinates: {
Expand All @@ -50,14 +53,12 @@ export const OverlayRange: FC<Props> = ({ overlayKey, start, end, color, showMar
},
}}
markerPosition={Position.Bottom}
hideTooltips={true}
marker={
hideTooltips
marker={showMarker ? <EuiIcon type="arrowUp" /> : undefined}
markerBody={
showMarker ? (
<div>
<div style={{ textAlign: 'center' }}>
<EuiIcon type="arrowUp" />
</div>
<div style={{ fontWeight: 'normal', color: '#343741' }}>{timeFormatter(start)}</div>
<div style={{ fontWeight: 'normal', color: euiTheme.euiTextColor }}>
{timeFormatter(start)}
</div>
) : undefined
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const LoadingWrapper: FC<Props> = ({ hasData, loading = false, height, ch
transition: 'opacity 0.2s',
}}
>
{children}
{loading && !hasData ? null : children}
</div>
{loading === true && (
<EuiFlexGroup
Expand Down