feat(panel): harcanabilir ve grup harcama grafikleri

- Günlük / Haftalık / Aylık sekmeli iki çizgi grafik (Recharts, ayrı parça olarak yüklenir)
- Kümülatif harcanabilir vs gerçekleşen; 4 grup (+ isteğe bağlı harcanabilir çizgisi)
- Dönem istatistiklerine grup kırılımı (spent_by_group)
- Grafik altında metin özeti, koyu tema uyumlu renkler

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-13 00:14:55 +03:00
parent 64c185ab96
commit 191c3e6db5
20 changed files with 952 additions and 27 deletions
+7
View File
@@ -1,5 +1,6 @@
import { describe, expect, it } from 'vitest'
import {
formatCompact,
formatWeekday,
formatDate,
formatMoney,
@@ -35,6 +36,12 @@ describe('diğer biçimler', () => {
expect(formatPercent(0.123)).toBe('%12,3')
})
it('grafik ekseni için kısa tutar', () => {
expect(formatCompact(2_700_000)).toBe('27\u00a0B') // bölünmez boşluk
expect(formatCompact(150_000_000)).toBe('1,5\u00a0Mn')
expect(formatCompact(95_000)).toBe('950')
})
it('tarih GG.AA.YYYY', () => {
expect(formatDate('2026-12-09')).toBe('09.12.2026')
expect(formatDate(new Date(2027, 0, 1))).toBe('01.01.2027')