CP chart data points are now clickable
This commit is contained in:
@@ -3896,6 +3896,8 @@ def interactive_otwcpchart(powerdf,promember=0,rowername="",r=None,cpfit='data',
|
||||
deltas = fitt.apply(lambda x: timedeltaconv(x))
|
||||
ftime = niceformat(deltas)
|
||||
workouts = powerdf['workout']
|
||||
urls = powerdf['url']
|
||||
|
||||
|
||||
sourcecomplex = ColumnDataSource(
|
||||
data = dict(
|
||||
@@ -3904,6 +3906,7 @@ def interactive_otwcpchart(powerdf,promember=0,rowername="",r=None,cpfit='data',
|
||||
duration = fitt/60.,
|
||||
ftime = ftime,
|
||||
workout = workouts,
|
||||
url = urls,
|
||||
)
|
||||
)
|
||||
|
||||
@@ -3967,6 +3970,9 @@ def interactive_otwcpchart(powerdf,promember=0,rowername="",r=None,cpfit='data',
|
||||
|
||||
hover.mode = 'mouse'
|
||||
|
||||
taptool = plot.select(type=TapTool)
|
||||
taptool.callback = OpenURL(url='@url')
|
||||
|
||||
plot.line('duration','CP',source=sourcecomplex,legend_label="CP Model",
|
||||
color='green')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user