From 0cbb08167fd4d749e60bcacd1fe914ac3098e9b6 Mon Sep 17 00:00:00 2001 From: Jelle Date: Mon, 11 Sep 2023 17:53:20 +0200 Subject: [PATCH] X-axis to human readable date --- psa_car_controller/web/figures.py | 1 + 1 file changed, 1 insertion(+) diff --git a/psa_car_controller/web/figures.py b/psa_car_controller/web/figures.py index 7dda480..847914d 100644 --- a/psa_car_controller/web/figures.py +++ b/psa_car_controller/web/figures.py @@ -115,6 +115,7 @@ def get_figures(car: Car): consumption_fig = px.histogram(x=[0], y=[1], title='Consumption of the car', histfunc="avg") consumption_fig.update_layout(yaxis_title="Consumption kWh/100Km", xaxis_title="date") + consumption_fig.update_xaxes(type="date", tickformat="%d/%m/%Y") consumption_fig_by_speed = px.histogram(data_frame=[{"start_at": 1, "speed_average": 2}], x="start_at", y="speed_average", histfunc="avg",