almost there

This commit is contained in:
Jake
2025-04-12 15:20:05 +01:00
parent c0b5e95d98
commit a79c245511
5 changed files with 46 additions and 30 deletions
+10 -4
View File
@@ -1,21 +1,27 @@
'''Module to create a Dash app that displays visualizations of YNAB data.'''
import dash
from dash import dcc, html
from dash.dependencies import Input, Output
from dash.dependencies import Input, Output, State
import dash_bootstrap_components as dbc
from visuals.layout import create_layout
from visuals.components import update_data, update_dates
from datetime import date
from datetime import date, timedelta
today = date.today()
one_year_ago = today - timedelta(days=365)
master_data = update_dates(start_date=date(2024, 1, 1), end_date=date(2026, 1, 1))
master_data = update_dates(start_date=one_year_ago, end_date=today)
data = update_data(master_data)
app = dash.Dash(__name__, external_stylesheets=[dbc.themes.DARKLY])
@app.callback(
Output("layout-container", "children"),
Output("spend_per_day","figure"),
Output("spend_per_category","figure"),
Output("spend_per_payee","figure"),
Output("total_spend","children"),
[Input('date-picker-range', 'start_date'),
Input('date-picker-range', 'end_date')]
)