Private
Public Access
1
0

better colors

This commit is contained in:
Sander Roosendaal
2020-05-12 21:53:40 +02:00
parent 0d41ee9ea0
commit d2a810c873
2 changed files with 6 additions and 3 deletions

View File

@@ -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):

View File

@@ -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 = (