diff --git a/src/app/components/charts/line-chart/LineChart.types.ts b/src/app/components/charts/line-chart/LineChart.types.ts index 4c0ff0e..08ed64c 100644 --- a/src/app/components/charts/line-chart/LineChart.types.ts +++ b/src/app/components/charts/line-chart/LineChart.types.ts @@ -7,4 +7,5 @@ export interface StackedLineChartSeries { export interface LineChartConfig { series: StackedLineChartSeries[]; labels: string[]; + valueFormatter?: (value: number) => string; } diff --git a/src/app/components/charts/line-chart/LineChart.vue b/src/app/components/charts/line-chart/LineChart.vue index 99edb6a..6af1801 100644 --- a/src/app/components/charts/line-chart/LineChart.vue +++ b/src/app/components/charts/line-chart/LineChart.vue @@ -3,9 +3,8 @@ + + diff --git a/src/app/pages/Frame.vue b/src/app/pages/Frame.vue index 9cc64b9..27f0027 100644 --- a/src/app/pages/Frame.vue +++ b/src/app/pages/Frame.vue @@ -23,11 +23,13 @@ + +
diff --git a/src/app/pages/dashboard/Dashboard.vue b/src/app/pages/dashboard/Dashboard.vue index d86c942..b1429c7 100644 --- a/src/app/pages/dashboard/Dashboard.vue +++ b/src/app/pages/dashboard/Dashboard.vue @@ -1,24 +1,30 @@ + + diff --git a/src/app/pages/dashboard/all-time/AllTimeChart.vue b/src/app/pages/dashboard/all-time/AllTimeChart.vue new file mode 100644 index 0000000..e263ce4 --- /dev/null +++ b/src/app/pages/dashboard/all-time/AllTimeChart.vue @@ -0,0 +1,47 @@ + + + diff --git a/src/app/pages/dashboard/overview/widgets/header-panels/SummaryPanels.vue b/src/app/pages/dashboard/overview/widgets/header-panels/SummaryPanels.vue index a36f05d..d7ebe72 100644 --- a/src/app/pages/dashboard/overview/widgets/header-panels/SummaryPanels.vue +++ b/src/app/pages/dashboard/overview/widgets/header-panels/SummaryPanels.vue @@ -97,7 +97,6 @@ const remainingBalancePercentage = computed(() => { display: grid; grid-template: 1fr / repeat(var(--panels), 1fr); width: 100%; - height: 150px; gap: 10px; @include globals.onMobileDevices { diff --git a/src/app/pages/dashboard/summary/widgets/charts/DevelopmentChart.vue b/src/app/pages/dashboard/summary/widgets/charts/DevelopmentChart.vue index 869a856..14f5914 100644 --- a/src/app/pages/dashboard/summary/widgets/charts/DevelopmentChart.vue +++ b/src/app/pages/dashboard/summary/widgets/charts/DevelopmentChart.vue @@ -18,11 +18,11 @@ const props = defineProps<{ class?: ClassNames; }>(); -const classes = computed(() => props.class); const months = useMonthNames(); const { state } = useDataStore(); -const { t } = useI18n(); +const { t, locale } = useI18n(); +const classes = computed(() => props.class); const isEmpty = computed(() => { const totalIncome = sum(totals(state.income)); const totalExpenses = sum(totals(state.expenses)); @@ -33,9 +33,15 @@ const data = computed((): LineChartConfig => { const income = totals(state.income); const expenses = totals(state.expenses); const endingBalance = aggregate(subtract(income, expenses)); + const formatter = new Intl.NumberFormat(locale.value, { + style: 'currency', + currency: state.currency, + maximumFractionDigits: 0 + }); return { labels: months.value, + valueFormatter: (value) => formatter.format(value), series: [ { name: t('page.dashboard.income'), color: 'var(--c-success-light-dimmed)', data: income }, { name: t('page.dashboard.expenses'), color: 'var(--c-danger-light-dimmed)', data: expenses }, diff --git a/src/app/pages/shared/Pane.vue b/src/app/pages/shared/Pane.vue index 973bee8..a489798 100644 --- a/src/app/pages/shared/Pane.vue +++ b/src/app/pages/shared/Pane.vue @@ -2,7 +2,6 @@

- {{ title }}