// ui import { LineGraph, ProfileEmptyState } from "components/ui"; // image import emptyGraph from "public/empty-state/empty_graph.svg"; // types import { IDefaultAnalyticsResponse } from "types"; // constants import { MONTHS_LIST } from "constants/calendar"; type Props = { defaultAnalytics: IDefaultAnalyticsResponse; }; export const AnalyticsYearWiseIssues: React.FC = ({ defaultAnalytics }) => (

Issues closed in a year

{defaultAnalytics.issue_completed_month_wise.length > 0 ? ( ({ x: month.label.substring(0, 3), y: defaultAnalytics.issue_completed_month_wise.find( (data) => data.month === month.value )?.count || 0, })), }, ]} customYAxisTickValues={defaultAnalytics.issue_completed_month_wise.map( (data) => data.count )} height="300px" colors={(datum) => datum.color} curve="monotoneX" margin={{ top: 20 }} enableSlices="x" sliceTooltip={(datum) => (
{datum.slice.points[0].data.yFormatted} issues closed in {datum.slice.points[0].data.xFormatted}
)} theme={{ background: "rgb(var(--color-background-100))", }} enableArea /> ) : (
)}
);