mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: x-axis not displaying the right date (#3068)
This commit is contained in:
parent
50f9815191
commit
35d43df6dc
@ -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, {});
|
||||
|
@ -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),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user