mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: chart xAxis and null values (#6472)
Changes the xAxis from 'week' to 'date' (timeline fix) Replace null values with 0 --------- Signed-off-by: andreas-unleash <andreas@getunleash.ai>
This commit is contained in:
parent
ecd2693cfe
commit
bf5f38ba1e
@ -109,17 +109,19 @@ export const MetricsSummaryTooltip: VFC<{ tooltip: TooltipState | null }> = ({
|
||||
/>
|
||||
<InfoLine
|
||||
iconChar={'▣ '}
|
||||
title={`Total requests: ${point.value.totalRequests}`}
|
||||
title={`Total requests: ${
|
||||
point.value.totalRequests ?? 0
|
||||
}`}
|
||||
color={'info'}
|
||||
/>
|
||||
<InfoLine
|
||||
iconChar={'▲ '}
|
||||
title={`Exposed: ${point.value.totalYes}`}
|
||||
title={`Exposed: ${point.value.totalYes ?? 0}`}
|
||||
color={'success'}
|
||||
/>
|
||||
<InfoLine
|
||||
iconChar={'▼ '}
|
||||
title={`Not exposed: ${point.value.totalNo}`}
|
||||
title={`Not exposed: ${point.value.totalNo ?? 0}`}
|
||||
color={'error'}
|
||||
/>
|
||||
<Divider
|
||||
@ -127,12 +129,18 @@ export const MetricsSummaryTooltip: VFC<{ tooltip: TooltipState | null }> = ({
|
||||
/>
|
||||
<InfoSummary
|
||||
data={[
|
||||
{ key: 'Flags', value: point.value.totalFlags },
|
||||
{
|
||||
key: 'Flags',
|
||||
value: point.value.totalFlags ?? 0,
|
||||
},
|
||||
{
|
||||
key: 'Environments',
|
||||
value: point.value.totalEnvironments,
|
||||
value: point.value.totalEnvironments ?? 0,
|
||||
},
|
||||
{
|
||||
key: 'Apps',
|
||||
value: point.value.totalApps ?? 0,
|
||||
},
|
||||
{ key: 'Apps', value: point.value.totalApps },
|
||||
]}
|
||||
/>
|
||||
</StyledTooltipItemContainer>
|
||||
|
@ -26,7 +26,7 @@ export const MetricsSummaryChart: VFC<IMetricsSummaryChartProps> = ({
|
||||
isLocalTooltip
|
||||
TooltipComponent={MetricsSummaryTooltip}
|
||||
overrideOptions={{
|
||||
parsing: { yAxisKey: 'totalRequests', xAxisKey: 'week' },
|
||||
parsing: { yAxisKey: 'totalRequests', xAxisKey: 'date' },
|
||||
}}
|
||||
cover={notEnoughData ? <NotEnoughData /> : false}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user