Merge branch 'release/v16.4.4'
This commit is contained in:
@@ -6627,6 +6627,7 @@ def get_zones_report(rower,startdate,enddate,trainingzones='hr',date_agg='week')
|
|||||||
week=arrow.get(w.date).isocalendar()[1],
|
week=arrow.get(w.date).isocalendar()[1],
|
||||||
year= w.date.strftime('%y')
|
year= w.date.strftime('%y')
|
||||||
)
|
)
|
||||||
|
dd4 = (w.date - datetime.timedelta(days = w.date.weekday())).strftime('%y/%m/%d')
|
||||||
|
|
||||||
#print(w.date,arrow.get(w.date),arrow.get(w.date).isocalendar())
|
#print(w.date,arrow.get(w.date),arrow.get(w.date).isocalendar())
|
||||||
|
|
||||||
@@ -6757,6 +6758,8 @@ def get_zones_report(rower,startdate,enddate,trainingzones='hr',date_agg='week')
|
|||||||
week=arrow.get(d).isocalendar()[1],
|
week=arrow.get(d).isocalendar()[1],
|
||||||
year= d.strftime('%y')
|
year= d.strftime('%y')
|
||||||
)
|
)
|
||||||
|
dd4 = (d - datetime.timedelta(days = d.weekday())).strftime('%y/%m/%d')
|
||||||
|
|
||||||
dates.append(dd4)
|
dates.append(dd4)
|
||||||
dates_sorting.append(dd4)
|
dates_sorting.append(dd4)
|
||||||
else:
|
else:
|
||||||
@@ -6850,6 +6853,10 @@ def interactive_zoneschart(rower,data,startdate,enddate,trainingzones='hr',date_
|
|||||||
|
|
||||||
hv.extension('bokeh')
|
hv.extension('bokeh')
|
||||||
|
|
||||||
|
xrotation = 0
|
||||||
|
nrdates = len(list(set(df['date'].values)))
|
||||||
|
if nrdates > 10:
|
||||||
|
xrotation = 45
|
||||||
|
|
||||||
bars = hv.Bars(df, kdims = ['date','zones']).aggregate(function=np.sum).redim.values(zones=zones_order)
|
bars = hv.Bars(df, kdims = ['date','zones']).aggregate(function=np.sum).redim.values(zones=zones_order)
|
||||||
|
|
||||||
@@ -6858,6 +6865,7 @@ def interactive_zoneschart(rower,data,startdate,enddate,trainingzones='hr',date_
|
|||||||
opts.Bars(cmap=color_map,show_legend=True,stacked=True,
|
opts.Bars(cmap=color_map,show_legend=True,stacked=True,
|
||||||
tools=['tap','hover'],width=550,padding=(0,(0,.1)),
|
tools=['tap','hover'],width=550,padding=(0,(0,.1)),
|
||||||
legend_position='bottom',
|
legend_position='bottom',
|
||||||
|
xrotation=xrotation,
|
||||||
show_frame=False)
|
show_frame=False)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user