small improvements on perf chartt
This commit is contained in:
@@ -1771,6 +1771,8 @@ def performance_chart(user,startdate=None,enddate=None,kfitness=42,kfatigue=7,
|
||||
|
||||
# to avoid data mess later on
|
||||
startdate = arrow.get(startdate).datetime.replace(hour=0,minute=0,second=0,microsecond=0)
|
||||
enddate = enddate+datetime.timedelta(days=1)
|
||||
enddate = arrow.get(enddate).datetime.replace(hour=0,minute=0,second=0,microsecond=0)
|
||||
|
||||
|
||||
modelchoice = 'coggan'
|
||||
@@ -1938,13 +1940,16 @@ def performance_chart(user,startdate=None,enddate=None,kfitness=42,kfatigue=7,
|
||||
y2rangemax = df.loc[:,['form']].max().max()
|
||||
if dofatigue and showtests:
|
||||
y1rangemin = df.loc[:,['testpower','fitness','fatigue']].min().min()
|
||||
y1rangemax = df.loc[:,['testpower','fitness','fatigue']].max().max()
|
||||
y1rangemax = df.loc[:,['testpower','fitness','fatigue']].max().max()*1.02
|
||||
elif showtests:
|
||||
y1rangemin = df.loc[:,['testpower','fitness']].min().min()
|
||||
y1rangemax = df.loc[:,['testpower','fitness']].max().max()*1.02
|
||||
elif dofatigue:
|
||||
y1rangemin = df.loc[:,['fitness','fatigue']].min().min()
|
||||
y1rangemax = df.loc[:,['fitness','fatigue']].max().max()
|
||||
y1rangemax = df.loc[:,['fitness','fatigue']].max().max()*1.02
|
||||
else:
|
||||
y1rangemin = df.loc[:,['fitness']].min().min()
|
||||
y1rangemax = df.loc[:,['fitness']].max().max()
|
||||
y1rangemax = df.loc[:,['fitness']].max().max()*1.02
|
||||
|
||||
if doform:
|
||||
plot.extra_y_ranges["yax2"] = Range1d(start=y2rangemin,end=y2rangemax)
|
||||
|
||||
Reference in New Issue
Block a user