better colors
This commit is contained in:
@@ -234,10 +234,12 @@ def interactive_hr_piechart(df,rower,title,totalseconds=0):
|
|||||||
TOOLS = 'save,hover'
|
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",
|
tools=TOOLS,toolbar_location=None,tooltips="@zone: @totaltime",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
z.wedge(x=0,y=1, radius=0.4,
|
z.wedge(x=0,y=1, radius=0.4,
|
||||||
start_angle=cumsum('angle',include_zero=True), end_angle=cumsum('angle'),
|
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='zone')
|
||||||
@@ -250,6 +252,7 @@ def interactive_hr_piechart(df,rower,title,totalseconds=0):
|
|||||||
z.outline_line_color = None
|
z.outline_line_color = None
|
||||||
z.toolbar_location = 'right'
|
z.toolbar_location = 'right'
|
||||||
|
|
||||||
|
|
||||||
return components(z)
|
return components(z)
|
||||||
|
|
||||||
def pretty_timedelta(secs):
|
def pretty_timedelta(secs):
|
||||||
|
|||||||
@@ -270,10 +270,10 @@ rowtypes = (
|
|||||||
|
|
||||||
checktypes = [i[0] for i in workouttypes]
|
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))}
|
color_map = {checktypes[i]:colors[i] for i in range(len(checktypes))}
|
||||||
|
|
||||||
workoutsources = (
|
workoutsources = (
|
||||||
|
|||||||
Reference in New Issue
Block a user