Skip to content

Commit

Permalink
fix the bug that the Other CSP is not count in the total CSP semidonu…
Browse files Browse the repository at this point in the history
…t chart
  • Loading branch information
pengyin-shan committed Aug 16, 2024
1 parent d85433a commit 3e9b770
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pages/CSPPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ export default function CSPPage(): JSX.Element {
{ name: "2014 Eligible Land", value: old2014Total, color: "#9CBAB4" },
{ name: "Other CSP", value: otherCSPTotal, color: "#B9CDC9" }
]);

if (zeroCategory.length > 0) setZeroCategories(zeroCategory);
else setZeroCategories(["None"]);
};
Expand Down Expand Up @@ -560,7 +559,7 @@ export default function CSPPage(): JSX.Element {
<Box component="div" sx={{ display: checked !== 0 ? "none" : "block" }}>
<SemiDonutChart
data={totalChartData}
label1={(firstTotal + secondTotal).toString()}
label1={(firstTotal + secondTotal + thirdTotal).toString()}
label2="CSP TOTAL BENEFITS"
/>
</Box>
Expand Down

0 comments on commit 3e9b770

Please sign in to comment.