Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
cab9ed705e
|
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user