Skip to content

Commit 502b6d6

Browse files
authored
fe: round pie-chart value to 1 decimal place (#112)
1 parent c974ec4 commit 502b6d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/components/chart/pie/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const PieChart: FC<{ data: ValidIndicatorData[] }> = ({ data }) => {
7474
>
7575
<div className="flex h-full flex-col items-center justify-center px-4 py-2 text-center">
7676
<div className="fill-foreground mb-3 text-4xl leading-none font-bold">
77-
{center ? `${center.value}%` : ""}
77+
{center ? `${center.value.toFixed(1)}%` : ""}
7878
</div>
7979
<div className="fill-foreground text-sm leading-tight font-normal break-words">
8080
{center ? center.label : ""}

0 commit comments

Comments
 (0)