Private
Public Access
1
0

Merge branch 'release/v16.4.2'

This commit is contained in:
Sander Roosendaal
2021-05-31 18:09:06 +02:00
2 changed files with 33 additions and 3 deletions

View File

@@ -824,7 +824,7 @@ def interactive_activitychart2(workouts,startdate,enddate,stack='type',toolbar_l
types_order = mytypes.workouttypes_ordered
#bars=table.to.bars(['date',stack],[yaxis])
bars = hv.Bars(df, kdims=['date',stack]).aggregate(function=np.sum)
bars = hv.Bars(df, kdims=['date',stack]).aggregate(function=np.sum).redim.values(types=types_order)
#print(mytypes.color_map)
@@ -834,8 +834,6 @@ def interactive_activitychart2(workouts,startdate,enddate,stack='type',toolbar_l
legend_position='bottom',show_frame=True))
p = hv.render(bars)
p.title.text = 'Activity {d1} to {d2}'.format(

View File

@@ -328,6 +328,38 @@ from bokeh.palettes import Category10,Category20, Category20c
colors = list(set(Category10[9]))+list(set(Category20[19]+Category20c[19]))
color_map = {checktypes[i]:colors[i] for i in range(len(checktypes))}
color_map = {
'water': 'blue', #'#2ca02c',
'rower': 'red', #'#ff7f0e',
'skierg': 'ghostwhite', #'#8c564b',
'bikeerg': 'pink', #'#d62728',
'dynamic': 'darkred', #'#e377c2',
'slides': 'salmon', #'#9467bd',
'paddle': 'cyan', #'#7f7f7f',
'snow': 'snow',#'#1f77b4',
'coastal': 'navy', #'#bcbd22',
'c-boat': 'lightsteelblue', #'#ffbb78',
'churchboat': 'midnightblue', #'#17becf',
'Ride': 'hotpink', #'#3182bd',
'bike': 'deeppink', #'#e6550d',
'Run': 'green', #'#ff9896',
'NordicSki': 'lightgray', #'#74c476',
'Swim': 'aqua', #'#fd8d3c',
'Hike': 'lime', #'#fdae6b',
'Walk': 'lawngreen', #'#756bb1',
'Canoeing': 'turquoise', #'#fdd0a2',
'Crossfit': 'yellow', #'#c5b0d5',
'StandUpPaddling': 'lightseagreen', #'#dadaeb',
'IceSkate': 'gray', #'#9ecae1',
'WeightTraining': 'khaki', #'#e377c2',
'InlineSkate': 'slategray', #'#98df8a',
'Kayaking': 'teal', #'#31a354',
'Workout': 'gold',#' #''#f7b6d2',
'Yoga': 'hotpink', #'#1f77b4',
'other': 'indigo', #'#bcbd22'
}
workoutsources = (
('strava','strava'),
('concept2','concept2'),