diff --git a/frontend/src/component/executiveDashboard/FlagsProjectChart/FlagsProjectChart.tsx b/frontend/src/component/executiveDashboard/FlagsProjectChart/FlagsProjectChart.tsx index 5f4255b5fd..176ea1086f 100644 --- a/frontend/src/component/executiveDashboard/FlagsProjectChart/FlagsProjectChart.tsx +++ b/frontend/src/component/executiveDashboard/FlagsProjectChart/FlagsProjectChart.tsx @@ -40,8 +40,10 @@ export const FlagsProjectChart: VFC = ({ }, ); + const objectKeys = Object.keys(groupedFlagTrends); + return { - labels: projectFlagTrends.map((item) => item.date), + labels: groupedFlagTrends[objectKeys[0]].map((item) => item.date), datasets, }; }, [theme, projectFlagTrends]); diff --git a/frontend/src/component/executiveDashboard/ProjectHealthChart/ProjectHealthChart.tsx b/frontend/src/component/executiveDashboard/ProjectHealthChart/ProjectHealthChart.tsx index bdf6449962..da5b0e0e6b 100644 --- a/frontend/src/component/executiveDashboard/ProjectHealthChart/ProjectHealthChart.tsx +++ b/frontend/src/component/executiveDashboard/ProjectHealthChart/ProjectHealthChart.tsx @@ -41,8 +41,10 @@ export const ProjectHealthChart: VFC = ({ }, ); + const objectKeys = Object.keys(groupedFlagTrends); + return { - labels: projectFlagTrends.map((item) => item.date), + labels: groupedFlagTrends[objectKeys[0]].map((item) => item.date), datasets, }; }, [theme, projectFlagTrends]);