// ui import { PieGraph } from "components/ui"; // types import { IUserStateDistribution, TStateGroups } from "types"; // constants import { STATE_GROUP_COLORS } from "constants/state"; type Props = { groupedIssues: IUserStateDistribution[] | undefined; }; export const IssuesPieChart: React.FC = ({ groupedIssues }) => (

Issues by States

({ id: cell.state_group, label: cell.state_group, value: cell.state_count, color: STATE_GROUP_COLORS[cell.state_group.toLowerCase() as TStateGroups], })) ?? [] } height="320px" innerRadius={0.6} cornerRadius={5} padAngle={2} enableArcLabels arcLabelsTextColor="#000000" enableArcLinkLabels={false} activeInnerRadiusOffset={5} colors={(datum) => datum.data.color} tooltip={(datum) => (
{datum.datum.label} issues: {datum.datum.value}
)} margin={{ top: 32, right: 0, bottom: 32, left: 0, }} theme={{ background: "transparent", }} />
{groupedIssues?.map((cell) => (
{cell.state_group}- {cell.state_count}
))}
);