From f3259aedea667b830f8ad8f6c3427d6319b93da2 Mon Sep 17 00:00:00 2001 From: Ephraim Atta-Duncan Date: Thu, 17 Aug 2023 08:24:37 +0000 Subject: [PATCH] feat: Add legend to pie chart --- apps/marketing/src/app/(marketing)/open/cap-table.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/marketing/src/app/(marketing)/open/cap-table.tsx b/apps/marketing/src/app/(marketing)/open/cap-table.tsx index e1a0913c1..4a7f2fd92 100644 --- a/apps/marketing/src/app/(marketing)/open/cap-table.tsx +++ b/apps/marketing/src/app/(marketing)/open/cap-table.tsx @@ -2,7 +2,7 @@ import { HTMLAttributes, useEffect, useState } from 'react'; -import { Cell, Pie, PieChart, Tooltip } from 'recharts'; +import { Cell, Legend, Pie, PieChart, Tooltip } from 'recharts'; import { cn } from '@documenso/ui/lib/utils'; @@ -69,6 +69,7 @@ export const CapTable = ({ className, ...props }: CapTableProps) => { ))} + { return [`${percent}%`, name || props['name'] || props['payload']['name']];