From 6334dacae926c0e539a9d45ebe5eb7c3e1327d16 Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Wed, 5 May 2021 23:18:00 +0200 Subject: [PATCH] disable console.log and set xaxis_title --- web/assets/clientside.js | 3 +-- web/figures.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/web/assets/clientside.js b/web/assets/clientside.js index 9c292d4..8aed1f4 100644 --- a/web/assets/clientside.js +++ b/web/assets/clientside.js @@ -40,9 +40,8 @@ function filter_dataset(data, range, old_figure, x,y) { figure["data"][j]["x"] = x_values } } - console.log(figure); + // console.log(figure); figures.push(figure); - }); return figures; } diff --git a/web/figures.py b/web/figures.py index 7257291..de3e0a8 100644 --- a/web/figures.py +++ b/web/figures.py @@ -120,7 +120,7 @@ def get_figures(trips: Trips, charging: List[dict]): consumption_df_dict = trips.get_long_trips() consumption_fig = px.histogram(x=[0], y=[1], title='Consumption of the car', histfunc="avg") - consumption_fig.update_layout(yaxis_title="Consumption kWh/100Km") + consumption_fig.update_layout(yaxis_title="Consumption kWh/100Km", xaxis_title="date") consumption_fig_by_speed = px.histogram(x=[0], y=[1], histfunc="avg", title="Consumption by speed")