+
+
+ Teams:
+
{uniqueTeams.map((team) => (
{team.name}
@@ -142,6 +191,7 @@ export function MemberCard({ member, dashboardCharts }: MemberCardProps) {
)}
>
)}
+
{isLoading ? (
<>
@@ -163,8 +214,8 @@ export function MemberCard({ member, dashboardCharts }: MemberCardProps) {
>
) : (
<>
-
-
+
+
Effort Distribution
{rolesWithEffort.length > 0 ? (
@@ -179,7 +230,7 @@ export function MemberCard({ member, dashboardCharts }: MemberCardProps) {
value: totalEffortPoints,
label: "Total",
}}
- className="h-[280px] w-full"
+ className="h-[260px] w-full"
/>
) : (
@@ -188,15 +239,81 @@ export function MemberCard({ member, dashboardCharts }: MemberCardProps) {
)}
-
>
)}
+
+ {/* Expandable Section for Roles & KPIs */}
+ {hasRolesOrKpis && (
+
+
+
+
+
+
+ {/* Roles Section */}
+ {roles && roles.length > 0 && (
+
+
+ Roles ({roles.length})
+
+
+ {roles.map((role) => (
+
+ ))}
+
+
+ )}
+
+ {/* KPIs Section */}
+ {memberKpis.length > 0 && (
+
+
+ KPIs ({memberKpis.length})
+
+
+ {memberKpis.map((chart) => (
+
+ ))}
+
+
+ )}
+
+
+ )}
);
}
diff --git a/src/components/charts/goals-radar-chart.tsx b/src/components/charts/goals-bar-chart.tsx
similarity index 78%
rename from src/components/charts/goals-radar-chart.tsx
rename to src/components/charts/goals-bar-chart.tsx
index c50dd34..3020420 100644
--- a/src/components/charts/goals-radar-chart.tsx
+++ b/src/components/charts/goals-bar-chart.tsx
@@ -32,11 +32,13 @@ import { formatValue } from "@/lib/helpers/format-value";
import { cn } from "@/lib/utils";
import { api } from "@/trpc/react";
-interface GoalsRadarChartProps {
+interface GoalsBarChartProps {
/** Array of metric IDs to display goal progress for */
metricIds: string[];
showHeader?: boolean;
className?: string;
+ /** Use simplified legend with only colored dots and names (no status badges, percentages, or tooltips) */
+ simpleLegend?: boolean;
}
const STATUS_CONFIG: Record<
@@ -284,11 +286,12 @@ function GoalTooltipContent({ active, payload }: GoalTooltipProps) {
);
}
-export function GoalsRadarChart({
+export function GoalsBarChart({
metricIds,
showHeader = true,
className,
-}: GoalsRadarChartProps) {
+ simpleLegend = false,
+}: GoalsBarChartProps) {
// Fetch dashboard charts from cache (parent already fetched this)
const { data: allCharts } = api.dashboard.getDashboardCharts.useQuery();
@@ -429,63 +432,86 @@ export function GoalsRadarChart({
-
- {chartData.map((item) => {
- const statusConfig = STATUS_CONFIG[item.status];
- return (
-
-
-
-
-
-
-
- {item.goal}
-
-
-
- {Math.round(item.progress)}%
+ {simpleLegend ? (
+
+ {chartData.map((item) => (
+
+ ))}
+
+ ) : (
+
+ {chartData.map((item) => {
+ const statusConfig = STATUS_CONFIG[item.status];
+ return (
+
+
+
+
+
+
+
+ {item.goal}
-
- {statusConfig.icon}
- {statusConfig.label}
-
+
+
+ {Math.round(item.progress)}%
+
+
+ {statusConfig.icon}
+ {statusConfig.label}
+
+
-
-
-
-
-
{item.goal}
- {item.selectedDimension && (
-
- Dimension: {item.selectedDimension}
-
- )}
-
-
Progress:
-
- {Math.round(item.progress)}%
-
+
+
+
+
{item.goal}
+ {item.selectedDimension && (
+
+ Dimension: {item.selectedDimension}
+
+ )}
+
+
+ Progress:
+
+
+ {Math.round(item.progress)}%
+
+
-
-
-
-
- );
- })}
-
+
+
+
+ );
+ })}
+
+ )}
);
diff --git a/src/components/charts/index.ts b/src/components/charts/index.ts
index 778cd77..9d688de 100644
--- a/src/components/charts/index.ts
+++ b/src/components/charts/index.ts
@@ -1,6 +1,6 @@
export { MetricAreaChart } from "./area-chart";
export { MetricBarChart } from "./bar-chart";
-export { GoalsRadarChart } from "./goals-radar-chart";
+export { GoalsBarChart } from "./goals-bar-chart";
export { MetricPieChart } from "./pie-chart";
export { MetricRadarChart } from "./radar-chart";
export { MetricRadialChart } from "./radial-chart";
diff --git a/src/components/charts/pie-chart.tsx b/src/components/charts/pie-chart.tsx
index 36051fa..5166f5e 100644
--- a/src/components/charts/pie-chart.tsx
+++ b/src/components/charts/pie-chart.tsx
@@ -89,7 +89,10 @@ export function MetricPieChart({
)}
{showLegend && (
- } />
+ }
+ wrapperStyle={{ paddingTop: 16 }}
+ />
)}