fix #593 updated colormap
This commit is contained in:
@@ -368,7 +368,7 @@ def interactive_hr_piechart(df,rower,title,totalseconds=0):
|
||||
|
||||
z.wedge(x=0,y=1, radius=0.4,
|
||||
start_angle=cumsum('angle',include_zero=True), end_angle=cumsum('angle'),
|
||||
line_color='white',fill_color='color',source=data,legend='zone')
|
||||
line_color='white',fill_color='color',source=data,legend_group='zone')
|
||||
|
||||
|
||||
|
||||
@@ -424,6 +424,7 @@ def interactive_workouttype_piechart(workouts):
|
||||
|
||||
|
||||
data = pd.DataFrame(data)
|
||||
|
||||
data['color'] = data['type'].apply(lambda x:mapcolors(x))
|
||||
data['totaltime'] = data['value'].apply(lambda x:pretty_timedelta(x))
|
||||
try:
|
||||
@@ -439,7 +440,7 @@ def interactive_workouttype_piechart(workouts):
|
||||
|
||||
p.wedge(x=0, y=1, radius=0.4,
|
||||
start_angle=cumsum('angle', include_zero=True), end_angle=cumsum('angle'),
|
||||
line_color="white", fill_color='color', source=data,legend='type', )
|
||||
line_color="white", fill_color='color', source=data,legend_group='type', )
|
||||
|
||||
p.axis.axis_label=None
|
||||
p.axis.visible=False
|
||||
@@ -697,7 +698,7 @@ def interactive_activitychart(workouts,startdate,enddate,stack='type',toolbar_lo
|
||||
|
||||
bars=table.to.bars(['date',stack],[yaxis])
|
||||
bars.opts(
|
||||
opts.Bars(color=hv.Cycle('Category10'), show_legend=True, stacked=True,
|
||||
opts.Bars(color=dim_expr, show_legend=True, stacked=True,
|
||||
tools=['tap','hover'], width=550, xrotation=45,padding=(0,(0,.1)),
|
||||
legend_position='bottom',show_frame=True))
|
||||
|
||||
@@ -860,11 +861,11 @@ def interactive_activitychart2(workouts,startdate,enddate,stack='type',toolbar_l
|
||||
|
||||
df = pd.DataFrame(thedict)
|
||||
|
||||
|
||||
source = ColumnDataSource(df)
|
||||
df['color'] = df['type'].apply(lambda x:mapcolors(x))
|
||||
|
||||
df.sort_values('date_sorting',inplace=True)
|
||||
#clrs = hv.Cycle(df['colors'].values)
|
||||
source = ColumnDataSource(df)
|
||||
|
||||
hv.extension('bokeh')
|
||||
|
||||
@@ -876,7 +877,7 @@ def interactive_activitychart2(workouts,startdate,enddate,stack='type',toolbar_l
|
||||
bars=table.to.bars(['date',stack],[yaxis])
|
||||
|
||||
bars.opts(
|
||||
opts.Bars(color=dim_expr, show_legend=True, stacked=True,
|
||||
opts.Bars(cmap=mytypes.color_map, show_legend=True, stacked=True,
|
||||
tools=['tap','hover'], width=550, xrotation=45,padding=(0,(0,.1)),
|
||||
legend_position='bottom',show_frame=True))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user