improved pop ups
This commit is contained in:
@@ -2174,7 +2174,7 @@ def interactive_chart(id=0,promember=0,intervaldata = {}):
|
||||
y_range_name = "watermark",
|
||||
)
|
||||
|
||||
plot.line('time','pace',source=source,legend="Pace")
|
||||
plot.line('time','pace',source=source,legend="Pace",name="pace")
|
||||
plot.title.text = row.name
|
||||
plot.title.text_font_size=value("1.0em")
|
||||
plot.xaxis.axis_label = "Time"
|
||||
@@ -2201,21 +2201,9 @@ def interactive_chart(id=0,promember=0,intervaldata = {}):
|
||||
plot.y_range = Range1d(1.e3*ymin,1.e3*ymax)
|
||||
|
||||
|
||||
hover = plot.select(dict(type=HoverTool))
|
||||
|
||||
|
||||
hover.tooltips = OrderedDict([
|
||||
('Time','@ftime'),
|
||||
('Pace','@fpace'),
|
||||
('HR','@hr{int}'),
|
||||
('SPM','@spm{1.1}'),
|
||||
])
|
||||
|
||||
hover.mode = 'mouse'
|
||||
|
||||
plot.extra_y_ranges["spmax"] = Range1d(start=10,end=45)
|
||||
plot.line('time','spm',source=source,color="red",
|
||||
y_range_name="spmax", legend="Stroke Rate")
|
||||
y_range_name="spmax", legend="Stroke Rate",name="spm")
|
||||
plot.add_layout(LinearAxis(y_range_name="spmax",axis_label="SPM"),'right')
|
||||
|
||||
plot.legend.location = "bottom_right"
|
||||
@@ -2240,6 +2228,20 @@ def interactive_chart(id=0,promember=0,intervaldata = {}):
|
||||
right='time_r',source=intervalsource,color='mediumvioletred',
|
||||
y_range_name='spmax',fill_alpha=0.2,line_alpha=0.2)
|
||||
|
||||
|
||||
hover = plot.select(dict(type=HoverTool))
|
||||
|
||||
|
||||
hover.tooltips = OrderedDict([
|
||||
('Time','@ftime'),
|
||||
('Pace','@fpace'),
|
||||
('HR','@hr{int}'),
|
||||
('SPM','@spm{1.1}'),
|
||||
])
|
||||
|
||||
hover.mode = 'mouse'
|
||||
hover.names = ["spm","pace"]
|
||||
|
||||
script, div = components(plot)
|
||||
|
||||
return [script,div]
|
||||
|
||||
Reference in New Issue
Block a user