Compare commits

..

1 Commits
0.7.1 ... main

Author SHA1 Message Date
cab9ed705e order by year
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/tag/woodpecker Pipeline was successful
2025-12-15 18:19:38 +01:00

View File

@@ -19,7 +19,7 @@ def pvstats():
dbh = psycopg.connect()
engine = sqlalchemy.create_engine("postgresql+psycopg://", creator=lambda: dbh)
df = pd.read_sql("SELECT month, cast(year AS varchar), current_energy AS value FROM pv_energy_by_month", con=engine)
df = pd.read_sql("SELECT month, cast(year AS varchar), current_energy AS value FROM pv_energy_by_month ORDER BY year, month", con=engine)
fig_1 = px.bar(df, x='month', y='value', color='year', barmode='group')
fig_1.update_layout(
title=f"Jahreswerte Exportierte Energie PV-Anlage",
@@ -35,7 +35,7 @@ def pvstats():
)
graph_html_1 = fig_1.to_html(full_html=False, default_height='30%')
df = pd.read_sql("SELECT month, cast(year AS varchar), current_energy AS value FROM car_energy_by_month", con=engine)
df = pd.read_sql("SELECT month, cast(year AS varchar), current_energy AS value FROM car_energy_by_month ORDER BY year, month", con=engine)
fig_2 = px.bar(df, x='month', y='value', color='year', barmode='group')
fig_2.update_layout(
title=f"Jahreswerte Verbrauch Elektroauto",