1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: set correct lables for project charts (#6099)

This commit is contained in:
Fredrik Strand Oseberg 2024-02-01 10:31:11 +01:00 committed by GitHub
parent 7ec0fa55ab
commit de0bebd7ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -40,8 +40,10 @@ export const FlagsProjectChart: VFC<IFlagsProjectChartProps> = ({
},
);
const objectKeys = Object.keys(groupedFlagTrends);
return {
labels: projectFlagTrends.map((item) => item.date),
labels: groupedFlagTrends[objectKeys[0]].map((item) => item.date),
datasets,
};
}, [theme, projectFlagTrends]);

View File

@ -41,8 +41,10 @@ export const ProjectHealthChart: VFC<IFlagsProjectChartProps> = ({
},
);
const objectKeys = Object.keys(groupedFlagTrends);
return {
labels: projectFlagTrends.map((item) => item.date),
labels: groupedFlagTrends[objectKeys[0]].map((item) => item.date),
datasets,
};
}, [theme, projectFlagTrends]);