散景:回调CustomJS是否有替代HTML字符串的更好方法?

时间:2019-02-27 03:33:22

标签: callback bokeh

当我使用Bokeh中的点击工具单击一个字形时,我试图创建一个弹出窗口。我看到工具提示使用@variable装饰器,可以替换它,例如

plot = figure(
            x_axis_label ='False Positives',
            y_axis_label ='False Negatives',    
            plot_width=500, plot_height=500, 
            tools="tap",
            tooltips=TOOLTIPS)

其中TOOLTIPS是其中带有@variable的html字符串。 除了做之外还有没有更好的方法来替换html字符串中的@variable html = html.replace("@x", x); 在customJS的tap回调代码中?

0 个答案:

没有答案