Private
Public Access
1
0

color palette interactive activity chart

This commit is contained in:
Sander Roosendaal
2019-03-02 15:20:36 +01:00
parent 6fca69c3be
commit 7cf38e4c59
2 changed files with 7 additions and 3 deletions

View File

@@ -286,9 +286,13 @@ def interactive_activitychart(workouts,startdate,enddate,stack='type'):
durations.append(0)
types.append('rower')
try:
rowers.append(rowersinitials[workouts[0].user.id])
rowers.append(rowers[0])
except IndexError:
rowers.append(str(workouts[0].user))
try:
rowers.append(str(workouts[0].user))
except IndexError:
rowers.append(' ')
d += datetime.timedelta(days=1)
@@ -311,7 +315,7 @@ def interactive_activitychart(workouts,startdate,enddate,stack='type'):
bars=table.to.bars(['date',stack],['duration'])
bars.opts(
opts.Bars(color=hv.Cycle('Category20'), show_legend=True, stacked=True,
opts.Bars(color=hv.Cycle('Category10'), show_legend=True, stacked=True,
tools=['hover'], width=600, xrotation=90,))
# legend_position='bottom',show_frame=True))