1

Hi I'm plotting with Bokeh rect tool to plot a list of rectangles:

p.rect(xs, ys, widths, heights, fill_color="#F2583E", line_color="black",tags=rect_tags)

I want it to have the following function: for different rectangles above, each link to a different url. I try the following function:

url = "http://www.colors.commutercreative.com/@color/"
taptool = p.select(type=TapTool)
taptool.callback = OpenURL(url=url)

but it links to all the rectangles and cannot specify individual ones.

If I change it to

taptool = p.select(type=TapTool, tags="sometag")

to specify specific tags, the link will not work.

Could you help me how could I achieve my function?Thanks!

Wei Li
  • 11
  • 2
  • Possible duplicate of [OpenURL in bokeh - open in same tab](https://stackoverflow.com/questions/40316017/openurl-in-bokeh-open-in-same-tab) – bigreddot Jun 07 '18 at 22:58

0 Answers0