Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
mukilan2815 committed Jun 28, 2024
1 parent 7aa9b01 commit 53d27e4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Pages/Admin/Analysis.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ const Dashboard = () => {
};

const annualTurnoverChartData = getChartData(
[annualTurnoverData.year1.reduce((a, b) => a + b, 0), annualTurnoverData.year2.reduce((a, b) => a + b, 0), annualTurnoverData.year3.reduce((a, b) => a + b, 0)],
[
annualTurnoverData.year1.reduce((a, b) => a + b, 0),
annualTurnoverData.year2.reduce((a, b) => a + b, 0),
annualTurnoverData.year3.reduce((a, b) => a + b, 0),
],
["Year 1", "Year 2", "Year 3"],
"Annual Turnover"
);
Expand All @@ -118,7 +122,7 @@ const Dashboard = () => {
const constitutionChartData = getChartData(
Object.values(constitutionCounts),
Object.keys(constitutionCounts),
"Number of Members by Constitution"
"Individual"
);

// Aggregate data for the third chart: catering to market
Expand All @@ -135,7 +139,8 @@ const Dashboard = () => {

// Aggregate data for the fourth chart: classification of industry
const industryCounts = formData.reduce((acc, curr) => {
acc[curr.Classificationofindustry] = (acc[curr.Classificationofindustry] || 0) + 1;
acc[curr.Classificationofindustry] =
(acc[curr.Classificationofindustry] || 0) + 1;
return acc;
}, {});

Expand Down

0 comments on commit 53d27e4

Please sign in to comment.