diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index d5abd874..bc68f342 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -234,10 +234,12 @@ def interactive_hr_piechart(df,rower,title,totalseconds=0): TOOLS = 'save,hover' - z = figure(title="HR "+title, x_range=(-0.5,1), plot_height=350, + z = figure(title="HR "+title, x_range=(-0.5,1), plot_height=375, tools=TOOLS,toolbar_location=None,tooltips="@zone: @totaltime", ) + + 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') @@ -250,6 +252,7 @@ def interactive_hr_piechart(df,rower,title,totalseconds=0): z.outline_line_color = None z.toolbar_location = 'right' + return components(z) def pretty_timedelta(secs): diff --git a/rowers/mytypes.py b/rowers/mytypes.py index 817884f4..c70ffbcc 100644 --- a/rowers/mytypes.py +++ b/rowers/mytypes.py @@ -270,10 +270,10 @@ rowtypes = ( checktypes = [i[0] for i in workouttypes] -from bokeh.palettes import Category10 +from bokeh.palettes import Category10,Category20, Category20c -colors = Category10[9]+Category10[9]+Category10[9]+Category10[9] +colors = Category10[9]+Category20[19]+Category20c[19] color_map = {checktypes[i]:colors[i] for i in range(len(checktypes))} workoutsources = (