'use client';
import { HTMLAttributes } from 'react';
import { Cell, Pie, PieChart, Tooltip } from 'recharts';
import { cn } from '@documenso/ui/lib/utils';
import { CAP_TABLE } from './data';
const COLORS = ['#7fd843', '#a2e771', '#c6f2a4'];
const RADIAN = Math.PI / 180;
const renderCustomizedLabel = ({ cx, cy, midAngle, innerRadius, outerRadius, percent, index }) => {
const radius = innerRadius + (outerRadius - innerRadius) * 0.25;
const x = cx + radius * Math.cos(-midAngle * RADIAN);
const y = cy + radius * Math.sin(-midAngle * RADIAN);
return (
cx ? 'start' : 'end'} dominantBaseline="central">
{`${(percent * 100).toFixed(1)}%`}
);
};
export type CapTableProps = HTMLAttributes;
export const CapTable = ({ className, ...props }: CapTableProps) => {
return (
Cap Table
{CAP_TABLE.map((entry, index) => (
|
))}
{
return [`${percent}%`, name || props['name'] || props['payload']['name']];
}}
/>
);
};