+
Effort Distribution
{rolesWithEffort.length > 0 ? (
@@ -232,7 +234,7 @@ export function MemberCard({ member, dashboardCharts }: MemberCardProps) {
value: totalEffortPoints,
label: "Total",
}}
- className="h-[260px] w-full"
+ className="h-full w-full"
/>
) : (
@@ -245,7 +247,8 @@ export function MemberCard({ member, dashboardCharts }: MemberCardProps) {
metricIds={metricIdsWithGoals}
showHeader={false}
simpleLegend={true}
- className="h-[340px] rounded-lg"
+ className={CHART_HEIGHT}
+ noBorder={true}
/>
>
)}
@@ -257,19 +260,19 @@ export function MemberCard({ member, dashboardCharts }: MemberCardProps) {
diff --git a/src/components/charts/goals-bar-chart.tsx b/src/components/charts/goals-bar-chart.tsx
index 132f5df..7b51b80 100644
--- a/src/components/charts/goals-bar-chart.tsx
+++ b/src/components/charts/goals-bar-chart.tsx
@@ -12,7 +12,7 @@ import {
TrendingDown,
TrendingUp,
} from "lucide-react";
-import { Bar, BarChart, Cell, XAxis, YAxis } from "recharts";
+import { Bar, BarChart, CartesianGrid, Cell, XAxis, YAxis } from "recharts";
import { Badge } from "@/components/ui/badge";
import {
@@ -35,10 +35,13 @@ import { api } from "@/trpc/react";
interface GoalsBarChartProps {
/** Array of metric IDs to display goal progress for */
metricIds: string[];
+ /** Show header with title and goal count (default: true) */
showHeader?: boolean;
className?: string;
- /** Use simplified legend with only colored dots and names (no status badges, percentages, or tooltips) */
+ /** Use simplified legend with only colored dots and names (default: false) */
simpleLegend?: boolean;
+ /** Remove border and background styling (default: false) */
+ noBorder?: boolean;
}
const STATUS_CONFIG: Record<
@@ -119,10 +122,10 @@ function formatTimeRemaining(
}
const STATUS_COLORS = {
- exceeded: "hsl(142, 76%, 36%)",
- onTrack: "hsl(217, 91%, 60%)",
- behind: "hsl(38, 92%, 50%)",
- atRisk: "hsl(0, 84%, 60%)",
+ exceeded: "#22c55e", // green-500
+ onTrack: "#3b82f6", // blue-500
+ behind: "#f59e0b", // amber-500
+ atRisk: "#ef4444", // red-500
} as const;
function getBarColor(progress: number, expectedProgress: number): string {
@@ -291,6 +294,7 @@ export function GoalsBarChart({
showHeader = true,
className,
simpleLegend = false,
+ noBorder = false,
}: GoalsBarChartProps) {
// Fetch dashboard charts from cache (parent already fetched this)
const { data: allCharts } = api.dashboard.getDashboardCharts.useQuery();
@@ -334,7 +338,8 @@ export function GoalsBarChart({
return (
@@ -366,7 +371,11 @@ export function GoalsBarChart({
return (
{showHeader && (
@@ -383,20 +392,28 @@ export function GoalsBarChart({
)}
-
-
+
+ {noBorder && (
+
+ Goal Progress
+
+ )}
+
+
{simpleLegend ? (
-
+
{chartData.map((item) => (
{showTooltip && (
@@ -41,8 +41,8 @@ export function MetricPieChart({
data={chartData}
dataKey={dataKey}
nameKey={xAxisKey}
- innerRadius="40%"
- outerRadius="70%"
+ innerRadius="50%"
+ outerRadius="85%"
strokeWidth={2}
isAnimationActive={true}
animationDuration={800}
@@ -92,8 +92,8 @@ export function MetricPieChart({
}
wrapperStyle={{
- paddingTop: 8,
- maxHeight: "80px",
+ paddingTop: 4,
+ maxHeight: "60px",
overflowY: "auto",
}}
/>