Skip to content

Commit

Permalink
[Platform]: format values in sumstats popover (#615)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmcn authored Dec 10, 2024
1 parent e411c1b commit ea62e69
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/ui/src/components/SummaryStatsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ const dicSummary = [
},
];

function formatValue(v: number) {
return Number.isInteger(v) ? v.toLocaleString() : v.toPrecision(3);
}

export default function SummaryStatsTable({ sumstatQCValues }: any) {
return (
<>
Expand All @@ -44,7 +48,7 @@ export default function SummaryStatsTable({ sumstatQCValues }: any) {
</Tooltip>
</td>
<Typography sx={{ textAlign: "right" }} component="td" variant="body2">
{summStatValue}
{formatValue(summStatValue)}
</Typography>
</tr>
);
Expand Down

0 comments on commit ea62e69

Please sign in to comment.