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 @@
+
+
-
{{ title }}
diff --git a/src/i18n/locales/de.json b/src/i18n/locales/de.json
index 44ceebd..59e9e6b 100644
--- a/src/i18n/locales/de.json
+++ b/src/i18n/locales/de.json
@@ -116,14 +116,23 @@
"title": "Dashboard",
"tables": "Tabellen",
"income": "Einnahmen",
+ "incomeTrend": "Einnahmen-Trend",
"expenses": "Ausgaben",
+ "expensesTrend": "Ausgaben-Trend",
+ "allTime": "Allzeit Übersicht",
+ "allTimeFromTo": "Allzeit Übersicht von {from} bis {to}",
"endingBalance": "Endsaldo",
"header": "Jährliches Budget für {year}",
"remainingBalance": "Verbleibendes Netto bis {year}",
"netSavings": "Nettoersparnisse",
"yearInThePast": "Jahr liegt in der Vergangenheit",
"yearInTheFuture": "Jahr liegt in der Zukunft",
- "yearEnding": "Dieses Jahr neigt sich dem Ende zu..."
+ "yearEnding": "Dieses Jahr neigt sich dem Ende zu...",
+ "yoyIncomeGrowth": "Jährliches Einkommenswachstum",
+ "yoyExpenseGrowth": "Jährliches Ausgabenwachstum",
+ "allTimeIncome": "Allzeit Einnahmen",
+ "allTimeExpenses": "Allzeit Ausgaben",
+ "allTimeSavings": "Allzeit Ersparnisse"
}
}
}
diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json
index 3f8f7b5..0cb1b21 100644
--- a/src/i18n/locales/en.json
+++ b/src/i18n/locales/en.json
@@ -116,14 +116,23 @@
"title": "Dashboard",
"tables": "Tables",
"income": "Income",
+ "incomeTrend": "Income Trend",
+ "allTime": "All time overview",
+ "allTimeFromTo": "All time from {from} to {to}",
"expenses": "Expenses",
+ "expensesTrend": "Expenses Trend",
"endingBalance": "Ending Balance",
"header": "Annual budget for {year}",
"remainingBalance": "Remaining Balance until {year}",
"netSavings": "Net Savings",
"yearInThePast": "Year is in the past",
"yearInTheFuture": "Year is in the future",
- "yearEnding": "This Year is coming to an end..."
+ "yearEnding": "This Year is coming to an end...",
+ "yoyIncomeGrowth": "YoY Income Growth",
+ "yoyExpenseGrowth": "YoY Expense Growth",
+ "allTimeIncome": "All Time Income",
+ "allTimeExpenses": "All Time Expenses",
+ "allTimeSavings": "All Time Savings"
}
}
}
diff --git a/src/styles/themes/dark.scss b/src/styles/themes/dark.scss
index 509ecaa..2055fba 100644
--- a/src/styles/themes/dark.scss
+++ b/src/styles/themes/dark.scss
@@ -109,6 +109,13 @@
--chart-generic-saturation: 75%;
--chart-generic-lightness: 75%;
+ --chart-tooltip-background-color: var(--app-background);
+ --chart-tooltip-border-color: var(--app-border);
+ --chart-tooltip-color: var(--theme-text);
+ --chart-tooltip-cross-color: var(--c-dimmed);
+ --chart-tooltip-axis-label-color: var(--c-primary-text);
+ --chart-tooltip-axis-label-background: var(--c-primary);
+
--border-radius-s: 2px;
--border-radius-m: 4px;
--border-radius-l: 6px;
diff --git a/src/styles/themes/light.scss b/src/styles/themes/light.scss
index 62c0396..37c31d0 100644
--- a/src/styles/themes/light.scss
+++ b/src/styles/themes/light.scss
@@ -109,6 +109,13 @@
--chart-generic-saturation: 55%;
--chart-generic-lightness: 82%;
+ --chart-tooltip-background-color: var(--app-background);
+ --chart-tooltip-border-color: var(--app-border);
+ --chart-tooltip-color: var(--theme-text);
+ --chart-tooltip-cross-color: var(--c-primary);
+ --chart-tooltip-axis-label-color: var(--c-primary-text);
+ --chart-tooltip-axis-label-background: var(--c-primary);
+
--border-radius-s: 2px;
--border-radius-m: 4px;
--border-radius-l: 6px;
diff --git a/src/utils/array.ts b/src/utils/array.ts
index 1eecd13..8382548 100644
--- a/src/utils/array.ts
+++ b/src/utils/array.ts
@@ -14,6 +14,24 @@ export const aggregate = (values: readonly number[]) => values.map((_, index) =>
export const arrayify = (value: T | T[]): T[] => (Array.isArray(value) ? value : [value]);
+export const rollingAverage = (values: readonly number[], windowSize: number): number[] => {
+ let sum = 0;
+ const result = [];
+
+ for (let i = 0; i < windowSize - 1; i++) {
+ sum += values[i];
+ result.push(sum / (i + 1));
+ }
+
+ for (let i = windowSize - 1; i < values.length; i++) {
+ sum += values[i];
+ sum -= i >= windowSize ? values[i - windowSize] : 0;
+ result.push(sum / windowSize);
+ }
+
+ return result;
+};
+
interface OnlyId {
id: string;
}