Always add last data point to dps over time graph
This commit is contained in:
@@ -34,6 +34,7 @@ class FitDpsVsTimeGraph(Graph):
|
|||||||
if fit.ID not in self._cache:
|
if fit.ID not in self._cache:
|
||||||
self.__generateCache(fit, maxX)
|
self.__generateCache(fit, maxX)
|
||||||
currentY = None
|
currentY = None
|
||||||
|
prevY = None
|
||||||
xs = []
|
xs = []
|
||||||
ys = []
|
ys = []
|
||||||
cache = self._cache[fit.ID]
|
cache = self._cache[fit.ID]
|
||||||
@@ -70,6 +71,9 @@ class FitDpsVsTimeGraph(Graph):
|
|||||||
ys.append(prevY)
|
ys.append(prevY)
|
||||||
xs.append(currentX)
|
xs.append(currentX)
|
||||||
ys.append(currentY)
|
ys.append(currentY)
|
||||||
|
if max(xs) < maxX:
|
||||||
|
xs.append(maxX)
|
||||||
|
ys.append(currentY or 0)
|
||||||
return xs, ys
|
return xs, ys
|
||||||
|
|
||||||
def getYForX(self, fit, extraData, x):
|
def getYForX(self, fit, extraData, x):
|
||||||
|
|||||||
Reference in New Issue
Block a user