mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-07 01:16:28 +02: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 toGraphData = (metrics?: RequestsPerSecondSchema) => {
|
||||||
const results =
|
const results =
|
||||||
metrics?.data?.result?.filter(result => result.metric?.appName) || [];
|
metrics?.data?.result?.filter(result => result?.metric?.appName) || [];
|
||||||
const aggregated = results
|
const aggregated = results
|
||||||
.map(asNetworkAppData)
|
.map(asNetworkAppData)
|
||||||
.reduce(summingReqsByLabelAndType, {});
|
.reduce(summingReqsByLabelAndType, {});
|
||||||
|
@ -111,10 +111,10 @@ const createInstanceChartOptions = (
|
|||||||
x: {
|
x: {
|
||||||
type: 'time',
|
type: 'time',
|
||||||
time: { unit: 'minute' },
|
time: { unit: 'minute' },
|
||||||
grid: { display: false },
|
grid: { display: true },
|
||||||
ticks: {
|
ticks: {
|
||||||
callback: (_, i, data) =>
|
callback: (_, i, data) =>
|
||||||
formatDateHM(data[i].value, locationSettings.locale),
|
formatDateHM(data[i].value * 1000, locationSettings.locale),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user