diff --git a/frontend/src/views/payees/PayeesView.vue b/frontend/src/views/payees/PayeesView.vue index a60a872..85663b4 100644 --- a/frontend/src/views/payees/PayeesView.vue +++ b/frontend/src/views/payees/PayeesView.vue @@ -51,12 +51,14 @@ @@ -176,7 +178,7 @@ const headers = [ { title: 'Default Category', key: 'defaultCategoryName' }, { title: 'Aliases', key: 'aliases', sortable: false }, { title: 'Status', key: 'isActive', width: '90px' }, - { title: 'Actions', key: 'actions', sortable: false, width: '90px' }, + { title: 'Actions', key: 'actions', sortable: false, width: '100px' }, ] const filteredPayees = computed(() => { diff --git a/frontend/src/views/reports/ReportsView.vue b/frontend/src/views/reports/ReportsView.vue index 8beee11..7a07c2a 100644 --- a/frontend/src/views/reports/ReportsView.vue +++ b/frontend/src/views/reports/ReportsView.vue @@ -336,23 +336,34 @@ const spendingChartSeries = computed(() => spending.value?.categories.map(c => c.amount) ?? [] ) +let chartLeaveTimer: ReturnType | null = null + +function setChartHighlight(categoryName: string | null) { + if (chartLeaveTimer) { clearTimeout(chartLeaveTimer); chartLeaveTimer = null } + if (categoryName) { + highlightedCategory.value = categoryName + } else { + chartLeaveTimer = setTimeout(() => { highlightedCategory.value = null }, 100) + } +} + const spendingChartOptions = computed(() => ({ chart: { type: 'donut' as const, events: { dataPointMouseEnter: (_e: any, _ctx: any, config: any) => { const labels = spending.value?.categories.map(c => c.categoryName) ?? [] - highlightedCategory.value = labels[config.dataPointIndex] ?? null + setChartHighlight(labels[config.dataPointIndex] ?? null) }, dataPointMouseLeave: () => { - highlightedCategory.value = null + setChartHighlight(null) }, legendMouseOver: (_ctx: any, _opts: any, config: any) => { const labels = spending.value?.categories.map(c => c.categoryName) ?? [] - highlightedCategory.value = labels[config.seriesIndex] ?? null + setChartHighlight(labels[config.seriesIndex] ?? null) }, legendMouseOut: () => { - highlightedCategory.value = null + setChartHighlight(null) }, }, },