Skip to content

Commit

Permalink
Reorganize structure of component render to avoid errors. (#54251) (#…
Browse files Browse the repository at this point in the history
…54367)

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
justinkambic and elasticmachine authored Jan 10, 2020
1 parent 4560a79 commit 1006139
Showing 1 changed file with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,32 +66,32 @@ export const DurationChart = ({
</h4>
</EuiTitle>
<ChartWrapper height="400px" loading={loading}>
<Chart>
<Settings xDomain={{ min, max }} showLegend={true} legendPosition={Position.Bottom} />
<Axis
id="bottom"
position={Position.Bottom}
showOverlappingTicks={true}
tickFormat={timeFormatter(getChartDateLabel(min, max))}
title={i18n.translate('xpack.uptime.monitorCharts.durationChart.bottomAxis.title', {
defaultMessage: 'Timestamp',
})}
/>
<Axis
domain={{ min: 0 }}
id="left"
position={Position.Left}
tickFormat={d => getTickFormat(d)}
title={i18n.translate('xpack.uptime.monitorCharts.durationChart.leftAxis.title', {
defaultMessage: 'Duration ms',
})}
/>
{hasLines ? (
{hasLines ? (
<Chart>
<Settings xDomain={{ min, max }} showLegend={true} legendPosition={Position.Bottom} />
<Axis
id="bottom"
position={Position.Bottom}
showOverlappingTicks={true}
tickFormat={timeFormatter(getChartDateLabel(min, max))}
title={i18n.translate('xpack.uptime.monitorCharts.durationChart.bottomAxis.title', {
defaultMessage: 'Timestamp',
})}
/>
<Axis
domain={{ min: 0 }}
id="left"
position={Position.Left}
tickFormat={d => getTickFormat(d)}
title={i18n.translate('xpack.uptime.monitorCharts.durationChart.leftAxis.title', {
defaultMessage: 'Duration ms',
})}
/>
<DurationLineSeriesList lines={locationDurationLines} meanColor={meanColor} />
) : (
<DurationChartEmptyState />
)}
</Chart>
</Chart>
) : (
<DurationChartEmptyState />
)}
</ChartWrapper>
</EuiPanel>
</>
Expand Down

0 comments on commit 1006139

Please sign in to comment.