Fix missing categories and gray text in category reports

Increase category over time limit from 8 to 50 so all categories appear.
Fix category name visibility: use foreground color for bar chart Y-axis
labels and chart legend text instead of muted/inherited colors.

Closes #13

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
le king fu 2026-03-07 09:06:40 -05:00
parent 420506b074
commit e1192beca3
3 changed files with 3 additions and 2 deletions

View file

@ -97,7 +97,7 @@ export default function CategoryBarChart({
type="category" type="category"
dataKey="category_name" dataKey="category_name"
width={120} width={120}
tick={{ fill: "var(--muted-foreground)", fontSize: 12 }} tick={{ fill: "var(--foreground)", fontSize: 12 }}
stroke="var(--border)" stroke="var(--border)"
/> />
<Tooltip <Tooltip

View file

@ -134,6 +134,7 @@ export default function CategoryOverTimeChart({
}} }}
onMouseLeave={() => setHoveredCategory(null)} onMouseLeave={() => setHoveredCategory(null)}
wrapperStyle={{ cursor: "pointer" }} wrapperStyle={{ cursor: "pointer" }}
formatter={(value) => <span style={{ color: "var(--foreground)" }}>{value}</span>}
/> />
{categoryEntries.map((c) => ( {categoryEntries.map((c) => (
<Bar <Bar

View file

@ -56,7 +56,7 @@ export async function getMonthlyTrends(
export async function getCategoryOverTime( export async function getCategoryOverTime(
dateFrom?: string, dateFrom?: string,
dateTo?: string, dateTo?: string,
topN: number = 8, topN: number = 50,
sourceId?: number, sourceId?: number,
): Promise<CategoryOverTimeData> { ): Promise<CategoryOverTimeData> {
const db = await getDb(); const db = await getDb();