// ui import { BarGraph, ProfileEmptyState } from "components/ui"; import { Loader } from "@plane/ui"; // image import emptyBarGraph from "public/empty-state/empty_bar_graph.svg"; // helpers import { capitalizeFirstLetter } from "helpers/string.helper"; // types import { IUserProfileData } from "types"; type Props = { userProfile: IUserProfileData | undefined; }; export const ProfilePriorityDistribution: React.FC = ({ userProfile }) => (

Issues by Priority

{userProfile ? (
{userProfile.priority_distribution.length > 0 ? ( ({ priority: capitalizeFirstLetter(priority.priority ?? "None"), value: priority.priority_count, }))} height="300px" indexBy="priority" keys={["value"]} borderRadius={4} padding={0.7} customYAxisTickValues={userProfile.priority_distribution.map((p) => p.priority_count)} tooltip={(datum) => (
{datum.data.priority}: {datum.value}
)} colors={(datum) => { if (datum.data.priority === "Urgent") return "#991b1b"; else if (datum.data.priority === "High") return "#ef4444"; else if (datum.data.priority === "Medium") return "#f59e0b"; else if (datum.data.priority === "Low") return "#16a34a"; else return "#e5e5e5"; }} theme={{ axis: { domain: { line: { stroke: "transparent", }, }, }, grid: { line: { stroke: "transparent", }, }, }} /> ) : (
)}
) : (
)}
);