1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00

fix: x-axis not displaying the right date (#3068)

This commit is contained in:
Gastón Fournier 2023-02-08 16:07:48 +01:00 committed by GitHub
parent 50f9815191
commit 35d43df6dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,7 @@ const summingReqsByLabelAndType = (
const toGraphData = (metrics?: RequestsPerSecondSchema) => {
const results =
metrics?.data?.result?.filter(result => result.metric?.appName) || [];
metrics?.data?.result?.filter(result => result?.metric?.appName) || [];
const aggregated = results
.map(asNetworkAppData)
.reduce(summingReqsByLabelAndType, {});

View File

@ -111,10 +111,10 @@ const createInstanceChartOptions = (
x: {
type: 'time',
time: { unit: 'minute' },
grid: { display: false },
grid: { display: true },
ticks: {
callback: (_, i, data) =>
formatDateHM(data[i].value, locationSettings.locale),
formatDateHM(data[i].value * 1000, locationSettings.locale),
},
},
},