only flaw now is bar colors not equal to pie colors
This commit is contained in:
@@ -351,6 +351,7 @@ def interactive_hr_piechart(df,rower,title,totalseconds=0):
|
||||
data = pd.Series(datadict).reset_index(name='value').rename(columns={'index':'zone'})
|
||||
data['angle'] = data['value']/data['value'].sum() * 2*pi
|
||||
data['color'] = colors
|
||||
data['zone'] = ['<ut2','ut2','ut1','at','tr','an']
|
||||
data['totaltime'] = pd.Series([pretty_timedelta(v) for v in data['value']])
|
||||
|
||||
|
||||
@@ -367,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_label='zone')
|
||||
line_color='white',fill_color='color',source=data,legend='zone')
|
||||
|
||||
|
||||
|
||||
@@ -438,7 +439,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_label='type', )
|
||||
line_color="white", fill_color='color', source=data,legend='type', )
|
||||
|
||||
p.axis.axis_label=None
|
||||
p.axis.visible=False
|
||||
|
||||
Reference in New Issue
Block a user