From 470801783dcf1150ca93b6580647abfeb7061e5a Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sun, 20 Oct 2019 21:37:59 +0200 Subject: [PATCH] fix the data sclicing first we were selecting the last 30 values but we want the first 30 values --- sensors/collector/plot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sensors/collector/plot.py b/sensors/collector/plot.py index db88b06..5ac5774 100644 --- a/sensors/collector/plot.py +++ b/sensors/collector/plot.py @@ -4,7 +4,7 @@ from collector.models import Time, Temperature, Humidity, Pressure def temperature(): - data = Temperature.objects.all()[30:] + data = Temperature.objects.all()[:30] x_axis = [] y_axis = [] for point in data: @@ -20,7 +20,7 @@ def temperature(): def humidity(): - data = Humidity.objects.all()[30:] + data = Humidity.objects.all()[:30] x_axis = [] y_axis = [] for point in data: @@ -35,7 +35,7 @@ def humidity(): def pressure(): - data = Pressure.objects.all()[30:] + data = Pressure.objects.all()[:30] x_axis = [] y_axis = [] for point in data: