Skip to content

Commit 6ab2f1a

Browse files
committed
refactor: streamline chart configuration and update color assignments in Dashboard component
1 parent 4086c1c commit 6ab2f1a

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

apps/web/components/feature/dashboard/dashboard.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ import { DevlogEntry, DevlogStats, TimeSeriesStats } from '@codervisor/devlog-co
2222
import { useRouter } from 'next/navigation';
2323
import { formatTimeAgoWithTooltip, getStatusChartColor } from '@/lib';
2424
import { DevlogPriorityTag, DevlogStatusTag, DevlogTypeTag } from '@/components/custom/devlog-tags';
25-
import {
26-
CHART_COLORS,
27-
CHART_OPACITY,
28-
formatTimeSeriesData,
29-
} from './chart-utils';
25+
import { CHART_COLORS, CHART_OPACITY, formatTimeSeriesData } from './chart-utils';
3026
import { CustomTooltip, CustomPieTooltip } from './custom-tooltip';
3127
import { DataContext } from '@/stores/base';
3228

@@ -114,7 +110,7 @@ export function Dashboard({
114110
</div>
115111
) : (
116112
<ResponsiveContainer width="100%" height={300}>
117-
<ComposedChart data={chartData}>
113+
<ComposedChart data={chartData} barGap="-50%" barCategoryGap="25%">
118114
<CartesianGrid strokeDasharray="3 3" />
119115
<XAxis dataKey="date" fontSize={12} tickLine={false} />
120116

@@ -142,7 +138,7 @@ export function Dashboard({
142138
<Bar
143139
yAxisId="daily"
144140
dataKey="dailyCreated"
145-
fill={CHART_COLORS.success}
141+
fill={CHART_COLORS.primary}
146142
fillOpacity={CHART_OPACITY.bar}
147143
name="Created"
148144
/>
@@ -151,7 +147,7 @@ export function Dashboard({
151147
<Bar
152148
yAxisId="daily"
153149
dataKey="dailyClosedNegative"
154-
fill={CHART_COLORS.error}
150+
fill={CHART_COLORS.success}
155151
fillOpacity={CHART_OPACITY.bar}
156152
name="Closed"
157153
/>

0 commit comments

Comments
 (0)