From 3ebeca08b29bf688875894edfc09ccf9922179e0 Mon Sep 17 00:00:00 2001 From: Kyle Borash Date: Wed, 26 Jun 2019 16:09:54 -0800 Subject: [PATCH] Remove map key deletion call when a timeseries chart contains more than 20 sensors. The default Plotly chart configuration does not contain a 'b' key and attempting to remove that key throws an exception which bubbles up to a generic error message displayed to end users and no chart. --- bmsapp/reports/timeseries.py | 1 - 1 file changed, 1 deletion(-) diff --git a/bmsapp/reports/timeseries.py b/bmsapp/reports/timeseries.py index 06e6c2d..68f5dcc 100644 --- a/bmsapp/reports/timeseries.py +++ b/bmsapp/reports/timeseries.py @@ -87,7 +87,6 @@ class TimeSeries(basechart.BaseChart): # If there there are more than 20 sensors, hide the legend if len(sensor_list) > 20: opt['layout']['showlegend'] = False - del opt['layout']['margin']['b'] opt['layout']['xaxis']['title'] = "Date/Time (%s)" % self.timezone opt['layout']['xaxis']['type'] = 'date' -- 2.26.2