TapTool OpenURL does not seem to be working with multiple glyphs on same figure

Dear All,

I’m trying to plot a timeseries, where the x - axis would contain data on Buildnumber (of our C.I. Server builds) and the y - axis contains geometric mean of a value. I basically need to have a line chart that comprises of data at each point, with each point being clickable, and on clicking, I need to be taken to a specific URL. I have been able to successfully achieve the plot I want, but the click to take me to my desired URL does not seem to be working when I am plotting with either only line glyphs or both line and circle glyphs. However, if I plot the figure with circle glyphs only, I can get the Taptool URL opening to work. But this won’t work for me since I really need the line plot in place to connect up all my data points. Can anyone suggest to me what I should do to get the URL thing to work?

Attached here below are my codes for the plot:

from bokeh.plotting import figure , output_file, show
from bokeh.models import HoverTool, TapTool, OpenURL, ColumnDataSource
from collections import OrderedDict
def bokeh_plot(data):
if isinstance(data, pd.Series):
buildnums = list(data.index)
datapts = list(data)
source = ColumnDataSource(dict(x = buildnums, y=datapts))

p = figure(title="Builds", tools="pan,wheel_zoom,reset,hover")

p.line(x = buildnums, y = datapts)

#p.circle(x = buildnums, y = datapts, radius=0.5, source = source,
#fill_color="blue", fill_alpha=0.6, line_color=None)

hover = p.select(dict(type=HoverTool))
hover.tooltips = OrderedDict([
("(x,y)", "(@x, @y)")
 ])

tap = TapTool(plot=p,
    action=OpenURL(url="http://192.168.1.253:8010/builders/Synthesis/builds/@x"))

p.tools.append(tap)

output_file("data_analysis.html")
show(p)

bokeh_plot(aggregated_geomean_syn_queue_fmax) # aggregated_geomean_syn_queue_fmax is the DataFrame used in the plot

Hi Augustine,

What version of bokeh are you running against?

We have just released (yesterday) a dev build that adds better selectors/inspectors management and first support for inspection on line glyphs (there is still work to do, and I actually opened an issue to refine better support for line and openUrl action) . It’d be interesting to check against that build.

Thanks

Fabio

···

On Wednesday, April 22, 2015 at 8:42:14 AM UTC+2, Augustine Koh wrote:

Dear All,

I’m trying to plot a timeseries, where the x - axis would contain data on Buildnumber (of our C.I. Server builds) and the y - axis contains geometric mean of a value. I basically need to have a line chart that comprises of data at each point, with each point being clickable, and on clicking, I need to be taken to a specific URL. I have been able to successfully achieve the plot I want, but the click to take me to my desired URL does not seem to be working when I am plotting with either only line glyphs or both line and circle glyphs. However, if I plot the figure with circle glyphs only, I can get the Taptool URL opening to work. But this won’t work for me since I really need the line plot in place to connect up all my data points. Can anyone suggest to me what I should do to get the URL thing to work?

Attached here below are my codes for the plot:

from bokeh.plotting import figure , output_file, show
from bokeh.models import HoverTool, TapTool, OpenURL, ColumnDataSource
from collections import OrderedDict
def bokeh_plot(data):
if isinstance(data, pd.Series):
buildnums = list(data.index)
datapts = list(data)
source = ColumnDataSource(dict(x = buildnums, y=datapts))

p = figure(title="Builds", tools="pan,wheel_zoom,reset,hover")

p.line(x = buildnums, y = datapts)

#p.circle(x = buildnums, y = datapts, radius=0.5, source = source,
#fill_color="blue", fill_alpha=0.6, line_color=None)

hover = p.select(dict(type=HoverTool))
hover.tooltips = OrderedDict([
("(x,y)", "(@x, @y)")
 ])

tap = TapTool(plot=p,
    action=OpenURL(url="[http://192.168.1.253:8010/builders/Synthesis/builds/@x](http://192.168.1.253:8010/builders/Synthesis/builds/@x)"))

p.tools.append(tap)

output_file("data_analysis.html")
show(p)

bokeh_plot(aggregated_geomean_syn_queue_fmax) # aggregated_geomean_syn_queue_fmax is the DataFrame used in the plot

Dear Fabio,

Thanks for your response here, and also I’ve received your email to my questions. They are great, I might have some more questions but for now they clarify everything.

Sorry I’m not quite sure how to check for my Bokeh version, can you please tell me here how to do it?

To try out that new build, should I clone the repository onto my machine?

Best,
Augustine

···

On Wednesday, 22 April 2015 20:34:36 UTC+8, Fabio Pliger wrote:

Hi Augustine,

What version of bokeh are you running against?

We have just released (yesterday) a dev build that adds better selectors/inspectors management and first support for inspection on line glyphs (there is still work to do, and I actually opened an issue to refine better support for line and openUrl action) . It’d be interesting to check against that build.

Thanks

Fabio

On Wednesday, April 22, 2015 at 8:42:14 AM UTC+2, Augustine Koh wrote:

Dear All,

I’m trying to plot a timeseries, where the x - axis would contain data on Buildnumber (of our C.I. Server builds) and the y - axis contains geometric mean of a value. I basically need to have a line chart that comprises of data at each point, with each point being clickable, and on clicking, I need to be taken to a specific URL. I have been able to successfully achieve the plot I want, but the click to take me to my desired URL does not seem to be working when I am plotting with either only line glyphs or both line and circle glyphs. However, if I plot the figure with circle glyphs only, I can get the Taptool URL opening to work. But this won’t work for me since I really need the line plot in place to connect up all my data points. Can anyone suggest to me what I should do to get the URL thing to work?

Attached here below are my codes for the plot:

from bokeh.plotting import figure , output_file, show
from bokeh.models import HoverTool, TapTool, OpenURL, ColumnDataSource
from collections import OrderedDict
def bokeh_plot(data):
if isinstance(data, pd.Series):
buildnums = list(data.index)
datapts = list(data)
source = ColumnDataSource(dict(x = buildnums, y=datapts))

p = figure(title="Builds", tools="pan,wheel_zoom,reset,hover")

p.line(x = buildnums, y = datapts)

#p.circle(x = buildnums, y = datapts, radius=0.5, source = source,
#fill_color="blue", fill_alpha=0.6, line_color=None)

hover = p.select(dict(type=HoverTool))
hover.tooltips = OrderedDict([
("(x,y)", "(@x, @y)")
 ])

tap = TapTool(plot=p,
    action=OpenURL(url="[http://192.168.1.253:8010/builders/Synthesis/builds/@x](http://192.168.1.253:8010/builders/Synthesis/builds/@x)"))

p.tools.append(tap)

output_file("data_analysis.html")
show(p)

bokeh_plot(aggregated_geomean_syn_queue_fmax) # aggregated_geomean_syn_queue_fmax is the DataFrame used in the plot

Hi Augustine,

Sorry, I could have been more specific.

To know what version of bokeh you are using just run:

python -c “import bokeh; print bokeh.version

and to try the new dev build you can follow the instructions here: http://bokeh.pydata.org/en/dev/docs/installation.html#developer-builds

Best

Fabio

···

On Wednesday, April 22, 2015 at 3:59:25 PM UTC+2, Augustine Koh wrote:

Dear Fabio,

Thanks for your response here, and also I’ve received your email to my questions. They are great, I might have some more questions but for now they clarify everything.

Sorry I’m not quite sure how to check for my Bokeh version, can you please tell me here how to do it?

To try out that new build, should I clone the repository onto my machine?

Best,
Augustine

On Wednesday, 22 April 2015 20:34:36 UTC+8, Fabio Pliger wrote:

Hi Augustine,

What version of bokeh are you running against?

We have just released (yesterday) a dev build that adds better selectors/inspectors management and first support for inspection on line glyphs (there is still work to do, and I actually opened an issue to refine better support for line and openUrl action) . It’d be interesting to check against that build.

Thanks

Fabio

On Wednesday, April 22, 2015 at 8:42:14 AM UTC+2, Augustine Koh wrote:

Dear All,

I’m trying to plot a timeseries, where the x - axis would contain data on Buildnumber (of our C.I. Server builds) and the y - axis contains geometric mean of a value. I basically need to have a line chart that comprises of data at each point, with each point being clickable, and on clicking, I need to be taken to a specific URL. I have been able to successfully achieve the plot I want, but the click to take me to my desired URL does not seem to be working when I am plotting with either only line glyphs or both line and circle glyphs. However, if I plot the figure with circle glyphs only, I can get the Taptool URL opening to work. But this won’t work for me since I really need the line plot in place to connect up all my data points. Can anyone suggest to me what I should do to get the URL thing to work?

Attached here below are my codes for the plot:

from bokeh.plotting import figure , output_file, show
from bokeh.models import HoverTool, TapTool, OpenURL, ColumnDataSource
from collections import OrderedDict
def bokeh_plot(data):
if isinstance(data, pd.Series):
buildnums = list(data.index)
datapts = list(data)
source = ColumnDataSource(dict(x = buildnums, y=datapts))

p = figure(title="Builds", tools="pan,wheel_zoom,reset,hover")

p.line(x = buildnums, y = datapts)

#p.circle(x = buildnums, y = datapts, radius=0.5, source = source,
#fill_color="blue", fill_alpha=0.6, line_color=None)

hover = p.select(dict(type=HoverTool))
hover.tooltips = OrderedDict([
("(x,y)", "(@x, @y)")
 ])

tap = TapTool(plot=p,
    action=OpenURL(url="[http://192.168.1.253:8010/builders/Synthesis/builds/@x](http://192.168.1.253:8010/builders/Synthesis/builds/@x)"))

p.tools.append(tap)

output_file("data_analysis.html")
show(p)

bokeh_plot(aggregated_geomean_syn_queue_fmax) # aggregated_geomean_syn_queue_fmax is the DataFrame used in the plot

Dear Fabio,

After running that string, I get version 0.8.2 . So is my problem here associated with that version?

Installing the developer build looks simple as I have read from your link, but so just to be sure, will that mean that my existing Bokeh release package be overwritten? If I do any ‘import bokeh’ in future, then will I automatically be importing the dev build version?

Thank you.

Best,
Augustine

···

On Wednesday, 22 April 2015 22:12:35 UTC+8, Fabio Pliger wrote:

Hi Augustine,

Sorry, I could have been more specific.

To know what version of bokeh you are using just run:

python -c “import bokeh; print bokeh.version

and to try the new dev build you can follow the instructions here: http://bokeh.pydata.org/en/dev/docs/installation.html#developer-builds

Best

Fabio

On Wednesday, April 22, 2015 at 3:59:25 PM UTC+2, Augustine Koh wrote:

Dear Fabio,

Thanks for your response here, and also I’ve received your email to my questions. They are great, I might have some more questions but for now they clarify everything.

Sorry I’m not quite sure how to check for my Bokeh version, can you please tell me here how to do it?

To try out that new build, should I clone the repository onto my machine?

Best,
Augustine

On Wednesday, 22 April 2015 20:34:36 UTC+8, Fabio Pliger wrote:

Hi Augustine,

What version of bokeh are you running against?

We have just released (yesterday) a dev build that adds better selectors/inspectors management and first support for inspection on line glyphs (there is still work to do, and I actually opened an issue to refine better support for line and openUrl action) . It’d be interesting to check against that build.

Thanks

Fabio

On Wednesday, April 22, 2015 at 8:42:14 AM UTC+2, Augustine Koh wrote:

Dear All,

I’m trying to plot a timeseries, where the x - axis would contain data on Buildnumber (of our C.I. Server builds) and the y - axis contains geometric mean of a value. I basically need to have a line chart that comprises of data at each point, with each point being clickable, and on clicking, I need to be taken to a specific URL. I have been able to successfully achieve the plot I want, but the click to take me to my desired URL does not seem to be working when I am plotting with either only line glyphs or both line and circle glyphs. However, if I plot the figure with circle glyphs only, I can get the Taptool URL opening to work. But this won’t work for me since I really need the line plot in place to connect up all my data points. Can anyone suggest to me what I should do to get the URL thing to work?

Attached here below are my codes for the plot:

from bokeh.plotting import figure , output_file, show
from bokeh.models import HoverTool, TapTool, OpenURL, ColumnDataSource
from collections import OrderedDict
def bokeh_plot(data):
if isinstance(data, pd.Series):
buildnums = list(data.index)
datapts = list(data)
source = ColumnDataSource(dict(x = buildnums, y=datapts))

p = figure(title="Builds", tools="pan,wheel_zoom,reset,hover")

p.line(x = buildnums, y = datapts)

#p.circle(x = buildnums, y = datapts, radius=0.5, source = source,
#fill_color="blue", fill_alpha=0.6, line_color=None)

hover = p.select(dict(type=HoverTool))
hover.tooltips = OrderedDict([
("(x,y)", "(@x, @y)")
 ])

tap = TapTool(plot=p,
    action=OpenURL(url="[http://192.168.1.253:8010/builders/Synthesis/builds/@x](http://192.168.1.253:8010/builders/Synthesis/builds/@x)"))

p.tools.append(tap)

output_file("data_analysis.html")
show(p)

bokeh_plot(aggregated_geomean_syn_queue_fmax) # aggregated_geomean_syn_queue_fmax is the DataFrame used in the plot

Hi Augustine,

I’d suggest you to use conda and create a new environment for that. Environments creation and management are extremely easy with conda and you can just create an isolated environment. For this you can just:

conda create -n bokeh_dev -c bokeh/channel/dev bokeh bokeh

source activate bokeh_dev

``

Of course you can specify the python version or any other package you want to install in the first cmd.

Anytime you want to use the last official release you can just activate you official release environment and the same apply for the dev release environment too.

Thanks

Fabio

···

On Thursday, April 23, 2015 at 3:56:54 AM UTC+2, Augustine Koh wrote:

Dear Fabio,

After running that string, I get version 0.8.2 . So is my problem here associated with that version?

Installing the developer build looks simple as I have read from your link, but so just to be sure, will that mean that my existing Bokeh release package be overwritten? If I do any ‘import bokeh’ in future, then will I automatically be importing the dev build version?

Thank you.

Best,
Augustine

On Wednesday, 22 April 2015 22:12:35 UTC+8, Fabio Pliger wrote:

Hi Augustine,

Sorry, I could have been more specific.

To know what version of bokeh you are using just run:

python -c “import bokeh; print bokeh.version

and to try the new dev build you can follow the instructions here: http://bokeh.pydata.org/en/dev/docs/installation.html#developer-builds

Best

Fabio

On Wednesday, April 22, 2015 at 3:59:25 PM UTC+2, Augustine Koh wrote:

Dear Fabio,

Thanks for your response here, and also I’ve received your email to my questions. They are great, I might have some more questions but for now they clarify everything.

Sorry I’m not quite sure how to check for my Bokeh version, can you please tell me here how to do it?

To try out that new build, should I clone the repository onto my machine?

Best,
Augustine

On Wednesday, 22 April 2015 20:34:36 UTC+8, Fabio Pliger wrote:

Hi Augustine,

What version of bokeh are you running against?

We have just released (yesterday) a dev build that adds better selectors/inspectors management and first support for inspection on line glyphs (there is still work to do, and I actually opened an issue to refine better support for line and openUrl action) . It’d be interesting to check against that build.

Thanks

Fabio

On Wednesday, April 22, 2015 at 8:42:14 AM UTC+2, Augustine Koh wrote:

Dear All,

I’m trying to plot a timeseries, where the x - axis would contain data on Buildnumber (of our C.I. Server builds) and the y - axis contains geometric mean of a value. I basically need to have a line chart that comprises of data at each point, with each point being clickable, and on clicking, I need to be taken to a specific URL. I have been able to successfully achieve the plot I want, but the click to take me to my desired URL does not seem to be working when I am plotting with either only line glyphs or both line and circle glyphs. However, if I plot the figure with circle glyphs only, I can get the Taptool URL opening to work. But this won’t work for me since I really need the line plot in place to connect up all my data points. Can anyone suggest to me what I should do to get the URL thing to work?

Attached here below are my codes for the plot:

from bokeh.plotting import figure , output_file, show
from bokeh.models import HoverTool, TapTool, OpenURL, ColumnDataSource
from collections import OrderedDict
def bokeh_plot(data):
if isinstance(data, pd.Series):
buildnums = list(data.index)
datapts = list(data)
source = ColumnDataSource(dict(x = buildnums, y=datapts))

p = figure(title="Builds", tools="pan,wheel_zoom,reset,hover")

p.line(x = buildnums, y = datapts)

#p.circle(x = buildnums, y = datapts, radius=0.5, source = source,
#fill_color="blue", fill_alpha=0.6, line_color=None)

hover = p.select(dict(type=HoverTool))
hover.tooltips = OrderedDict([
("(x,y)", "(@x, @y)")
 ])

tap = TapTool(plot=p,
    action=OpenURL(url="[http://192.168.1.253:8010/builders/Synthesis/builds/@x](http://192.168.1.253:8010/builders/Synthesis/builds/@x)"))

p.tools.append(tap)

output_file("data_analysis.html")
show(p)

bokeh_plot(aggregated_geomean_syn_queue_fmax) # aggregated_geomean_syn_queue_fmax is the DataFrame used in the plot

Dear Fabio,

I have managed to create my bokeh dev environment, where my shell prompt now has ‘(bokeh_dev)’ prepended to it. At this prompt, I ran my script again but the plot that was generated again was the same - I could not click on the circle glyphs and be redirected to my URLs.

Do you know what the issue could be?

Thank you.

Best,
Augustine

···

On Thursday, 23 April 2015 17:39:45 UTC+8, Fabio Pliger wrote:

Hi Augustine,

I’d suggest you to use conda and create a new environment for that. Environments creation and management are extremely easy with conda and you can just create an isolated environment. For this you can just:

conda create -n bokeh_dev -c bokeh/channel/dev bokeh bokeh

source activate bokeh_dev

``

Of course you can specify the python version or any other package you want to install in the first cmd.

Anytime you want to use the last official release you can just activate you official release environment and the same apply for the dev release environment too.

Thanks

Fabio

On Thursday, April 23, 2015 at 3:56:54 AM UTC+2, Augustine Koh wrote:

Dear Fabio,

After running that string, I get version 0.8.2 . So is my problem here associated with that version?

Installing the developer build looks simple as I have read from your link, but so just to be sure, will that mean that my existing Bokeh release package be overwritten? If I do any ‘import bokeh’ in future, then will I automatically be importing the dev build version?

Thank you.

Best,
Augustine

On Wednesday, 22 April 2015 22:12:35 UTC+8, Fabio Pliger wrote:

Hi Augustine,

Sorry, I could have been more specific.

To know what version of bokeh you are using just run:

python -c “import bokeh; print bokeh.version

and to try the new dev build you can follow the instructions here: http://bokeh.pydata.org/en/dev/docs/installation.html#developer-builds

Best

Fabio

On Wednesday, April 22, 2015 at 3:59:25 PM UTC+2, Augustine Koh wrote:

Dear Fabio,

Thanks for your response here, and also I’ve received your email to my questions. They are great, I might have some more questions but for now they clarify everything.

Sorry I’m not quite sure how to check for my Bokeh version, can you please tell me here how to do it?

To try out that new build, should I clone the repository onto my machine?

Best,
Augustine

On Wednesday, 22 April 2015 20:34:36 UTC+8, Fabio Pliger wrote:

Hi Augustine,

What version of bokeh are you running against?

We have just released (yesterday) a dev build that adds better selectors/inspectors management and first support for inspection on line glyphs (there is still work to do, and I actually opened an issue to refine better support for line and openUrl action) . It’d be interesting to check against that build.

Thanks

Fabio

On Wednesday, April 22, 2015 at 8:42:14 AM UTC+2, Augustine Koh wrote:

Dear All,

I’m trying to plot a timeseries, where the x - axis would contain data on Buildnumber (of our C.I. Server builds) and the y - axis contains geometric mean of a value. I basically need to have a line chart that comprises of data at each point, with each point being clickable, and on clicking, I need to be taken to a specific URL. I have been able to successfully achieve the plot I want, but the click to take me to my desired URL does not seem to be working when I am plotting with either only line glyphs or both line and circle glyphs. However, if I plot the figure with circle glyphs only, I can get the Taptool URL opening to work. But this won’t work for me since I really need the line plot in place to connect up all my data points. Can anyone suggest to me what I should do to get the URL thing to work?

Attached here below are my codes for the plot:

from bokeh.plotting import figure , output_file, show
from bokeh.models import HoverTool, TapTool, OpenURL, ColumnDataSource
from collections import OrderedDict
def bokeh_plot(data):
if isinstance(data, pd.Series):
buildnums = list(data.index)
datapts = list(data)
source = ColumnDataSource(dict(x = buildnums, y=datapts))

p = figure(title="Builds", tools="pan,wheel_zoom,reset,hover")

p.line(x = buildnums, y = datapts)

#p.circle(x = buildnums, y = datapts, radius=0.5, source = source,
#fill_color="blue", fill_alpha=0.6, line_color=None)

hover = p.select(dict(type=HoverTool))
hover.tooltips = OrderedDict([
("(x,y)", "(@x, @y)")
 ])

tap = TapTool(plot=p,
    action=OpenURL(url="[http://192.168.1.253:8010/builders/Synthesis/builds/@x](http://192.168.1.253:8010/builders/Synthesis/builds/@x)"))

p.tools.append(tap)

output_file("data_analysis.html")
show(p)

bokeh_plot(aggregated_geomean_syn_queue_fmax) # aggregated_geomean_syn_queue_fmax is the DataFrame used in the plot

Hi Augustine,

I just noticed that your not really using the source you’ve built in your example. Sorry I didn’t spot it before. So, if you need to say the circle to use your source you should have this:

p.circle(x = ‘x’, y = ‘y’, radius=0.5, source = source, fill_color=“blue”, fill_alpha=0.6, line_color=None)

``

because those are the names you’ve defined in our script (on your source).

I’ve tried it locally and is working for me. Can you double check it?

Thanks

Fabio

···

On Monday, April 27, 2015 at 8:09:52 AM UTC+2, Augustine Koh wrote:

Dear Fabio,

I have managed to create my bokeh dev environment, where my shell prompt now has ‘(bokeh_dev)’ prepended to it. At this prompt, I ran my script again but the plot that was generated again was the same - I could not click on the circle glyphs and be redirected to my URLs.

Do you know what the issue could be?

Thank you.

Best,
Augustine

On Thursday, 23 April 2015 17:39:45 UTC+8, Fabio Pliger wrote:

Hi Augustine,

I’d suggest you to use conda and create a new environment for that. Environments creation and management are extremely easy with conda and you can just create an isolated environment. For this you can just:

conda create -n bokeh_dev -c bokeh/channel/dev bokeh bokeh

source activate bokeh_dev

``

Of course you can specify the python version or any other package you want to install in the first cmd.

Anytime you want to use the last official release you can just activate you official release environment and the same apply for the dev release environment too.

Thanks

Fabio

On Thursday, April 23, 2015 at 3:56:54 AM UTC+2, Augustine Koh wrote:

Dear Fabio,

After running that string, I get version 0.8.2 . So is my problem here associated with that version?

Installing the developer build looks simple as I have read from your link, but so just to be sure, will that mean that my existing Bokeh release package be overwritten? If I do any ‘import bokeh’ in future, then will I automatically be importing the dev build version?

Thank you.

Best,
Augustine

On Wednesday, 22 April 2015 22:12:35 UTC+8, Fabio Pliger wrote:

Hi Augustine,

Sorry, I could have been more specific.

To know what version of bokeh you are using just run:

python -c “import bokeh; print bokeh.version

and to try the new dev build you can follow the instructions here: http://bokeh.pydata.org/en/dev/docs/installation.html#developer-builds

Best

Fabio

On Wednesday, April 22, 2015 at 3:59:25 PM UTC+2, Augustine Koh wrote:

Dear Fabio,

Thanks for your response here, and also I’ve received your email to my questions. They are great, I might have some more questions but for now they clarify everything.

Sorry I’m not quite sure how to check for my Bokeh version, can you please tell me here how to do it?

To try out that new build, should I clone the repository onto my machine?

Best,
Augustine

On Wednesday, 22 April 2015 20:34:36 UTC+8, Fabio Pliger wrote:

Hi Augustine,

What version of bokeh are you running against?

We have just released (yesterday) a dev build that adds better selectors/inspectors management and first support for inspection on line glyphs (there is still work to do, and I actually opened an issue to refine better support for line and openUrl action) . It’d be interesting to check against that build.

Thanks

Fabio

On Wednesday, April 22, 2015 at 8:42:14 AM UTC+2, Augustine Koh wrote:

Dear All,

I’m trying to plot a timeseries, where the x - axis would contain data on Buildnumber (of our C.I. Server builds) and the y - axis contains geometric mean of a value. I basically need to have a line chart that comprises of data at each point, with each point being clickable, and on clicking, I need to be taken to a specific URL. I have been able to successfully achieve the plot I want, but the click to take me to my desired URL does not seem to be working when I am plotting with either only line glyphs or both line and circle glyphs. However, if I plot the figure with circle glyphs only, I can get the Taptool URL opening to work. But this won’t work for me since I really need the line plot in place to connect up all my data points. Can anyone suggest to me what I should do to get the URL thing to work?

Attached here below are my codes for the plot:

from bokeh.plotting import figure , output_file, show
from bokeh.models import HoverTool, TapTool, OpenURL, ColumnDataSource
from collections import OrderedDict
def bokeh_plot(data):
if isinstance(data, pd.Series):
buildnums = list(data.index)
datapts = list(data)
source = ColumnDataSource(dict(x = buildnums, y=datapts))

p = figure(title="Builds", tools="pan,wheel_zoom,reset,hover")

p.line(x = buildnums, y = datapts)

#p.circle(x = buildnums, y = datapts, radius=0.5, source = source,
#fill_color="blue", fill_alpha=0.6, line_color=None)

hover = p.select(dict(type=HoverTool))
hover.tooltips = OrderedDict([
("(x,y)", "(@x, @y)")
 ])

tap = TapTool(plot=p,
    action=OpenURL(url="[http://192.168.1.253:8010/builders/Synthesis/builds/@x](http://192.168.1.253:8010/builders/Synthesis/builds/@x)"))

p.tools.append(tap)

output_file("data_analysis.html")
show(p)

bokeh_plot(aggregated_geomean_syn_queue_fmax) # aggregated_geomean_syn_queue_fmax is the DataFrame used in the plot

Dear Fabio,
Sorry for my late reply. Pardon me for accidentally commenting out the p.circle portion of my code in my first post for this thread. Even when I was running my code without the uncommented portion I couldn’t resolve the issue. As you suggested, last week I tried using your code snippet as you showed below, but that also did not work. Basically it still gave the same thing - the plot was rendered perfectly fine, and even the hovering over the circles work, but I couldn’t click on them (they were not ‘clickable’) when instead they should have been and I should get redirected to the URLs that I specified under OpenURL.
So I worked around with the code, and eventually I managed to overcome this problem. Here is my new code as follows:

···

Prototyping zone for the plotting of graphs using python bokeh

from bokeh.plotting import figure , output_file, show
from bokeh.models import HoverTool, TapTool, OpenURL, ColumnDataSource
from collections import OrderedDict
def bokeh_plot(data):
if isinstance(data, pd.Series):
buildnums = list(data.index)
datapts = list(data)
source = ColumnDataSource(dict(x = buildnums, y=datapts))
p = figure(title=“Builds”, tools=“pan,wheel_zoom,reset,hover”)
# Now I render the circle glyph before the line glyph
p.circle(x = buildnums, y = datapts, radius=0.3, source = source,
fill_color=“blue”, fill_alpha=0.6, line_color=None)
p.line(x = buildnums, y = datapts)
hover = p.select(dict(type=HoverTool))
hover.tooltips = OrderedDict([
(“(x,y)”, “(@x, @y)”)
])
tap = TapTool(plot=p,
action=OpenURL(url=“http://192.168.1.253:8010/builders/Synthesis/builds/@x”))
p.tools.append(tap)
output_file(“data_analysis.html”)
show(p)
bokeh_plot(aggregated_geomean_syn_queue_fmax) # aggregated_geomean_syn_queue_fmax is a pandas series object

What different in this chunk compared to the previous is that now I chose to render the circle glyph BEFORE rendering the line glyph and I think this somehow led the the circles being superimposed on top of the line glyphs, that thus made them to be ‘clickable’, because previously when I was doing the opposite, the circles were never ‘clickable’. You mentioned in your reply that your code worked when you tried it - however did you test if you could click on the circles and be redirected to URLs?

So looking at this, is it true that the order in which the glyphs are rendered and layered upon one another follows the order in which they were called in the code, and that this ordering can have an impact on the glyph behaviors? Is this anticipated behavior? If so, I think it will be important to document it. I never saw this in the Bokeh documentation (is it already there?) and if it isn’t already, I don’t mind contributing some explanations on this behavior if the documentation is open to community editing.

Cheers and keep up the good work with developing Bokeh!

Best,
Augustine

On Monday, 27 April 2015 23:21:52 UTC+8, Fabio Pliger wrote:

Hi Augustine,

I just noticed that your not really using the source you’ve built in your example. Sorry I didn’t spot it before. So, if you need to say the circle to use your source you should have this:

p.circle(x = ‘x’, y = ‘y’, radius=0.5, source = source, fill_color=“blue”, fill_alpha=0.6, line_color=None)

``

because those are the names you’ve defined in our script (on your source).

I’ve tried it locally and is working for me. Can you double check it?

Thanks

Fabio

On Monday, April 27, 2015 at 8:09:52 AM UTC+2, Augustine Koh wrote:

Dear Fabio,

I have managed to create my bokeh dev environment, where my shell prompt now has ‘(bokeh_dev)’ prepended to it. At this prompt, I ran my script again but the plot that was generated again was the same - I could not click on the circle glyphs and be redirected to my URLs.

Do you know what the issue could be?

Thank you.

Best,
Augustine

On Thursday, 23 April 2015 17:39:45 UTC+8, Fabio Pliger wrote:

Hi Augustine,

I’d suggest you to use conda and create a new environment for that. Environments creation and management are extremely easy with conda and you can just create an isolated environment. For this you can just:

conda create -n bokeh_dev -c bokeh/channel/dev bokeh bokeh

source activate bokeh_dev

``

Of course you can specify the python version or any other package you want to install in the first cmd.

Anytime you want to use the last official release you can just activate you official release environment and the same apply for the dev release environment too.

Thanks

Fabio

On Thursday, April 23, 2015 at 3:56:54 AM UTC+2, Augustine Koh wrote:

Dear Fabio,

After running that string, I get version 0.8.2 . So is my problem here associated with that version?

Installing the developer build looks simple as I have read from your link, but so just to be sure, will that mean that my existing Bokeh release package be overwritten? If I do any ‘import bokeh’ in future, then will I automatically be importing the dev build version?

Thank you.

Best,
Augustine

On Wednesday, 22 April 2015 22:12:35 UTC+8, Fabio Pliger wrote:

Hi Augustine,

Sorry, I could have been more specific.

To know what version of bokeh you are using just run:

python -c “import bokeh; print bokeh.version

and to try the new dev build you can follow the instructions here: http://bokeh.pydata.org/en/dev/docs/installation.html#developer-builds

Best

Fabio

On Wednesday, April 22, 2015 at 3:59:25 PM UTC+2, Augustine Koh wrote:

Dear Fabio,

Thanks for your response here, and also I’ve received your email to my questions. They are great, I might have some more questions but for now they clarify everything.

Sorry I’m not quite sure how to check for my Bokeh version, can you please tell me here how to do it?

To try out that new build, should I clone the repository onto my machine?

Best,
Augustine

On Wednesday, 22 April 2015 20:34:36 UTC+8, Fabio Pliger wrote:

Hi Augustine,

What version of bokeh are you running against?

We have just released (yesterday) a dev build that adds better selectors/inspectors management and first support for inspection on line glyphs (there is still work to do, and I actually opened an issue to refine better support for line and openUrl action) . It’d be interesting to check against that build.

Thanks

Fabio

On Wednesday, April 22, 2015 at 8:42:14 AM UTC+2, Augustine Koh wrote:

Dear All,

I’m trying to plot a timeseries, where the x - axis would contain data on Buildnumber (of our C.I. Server builds) and the y - axis contains geometric mean of a value. I basically need to have a line chart that comprises of data at each point, with each point being clickable, and on clicking, I need to be taken to a specific URL. I have been able to successfully achieve the plot I want, but the click to take me to my desired URL does not seem to be working when I am plotting with either only line glyphs or both line and circle glyphs. However, if I plot the figure with circle glyphs only, I can get the Taptool URL opening to work. But this won’t work for me since I really need the line plot in place to connect up all my data points. Can anyone suggest to me what I should do to get the URL thing to work?

Attached here below are my codes for the plot:

from bokeh.plotting import figure , output_file, show
from bokeh.models import HoverTool, TapTool, OpenURL, ColumnDataSource
from collections import OrderedDict
def bokeh_plot(data):
if isinstance(data, pd.Series):
buildnums = list(data.index)
datapts = list(data)
source = ColumnDataSource(dict(x = buildnums, y=datapts))

p = figure(title="Builds", tools="pan,wheel_zoom,reset,hover")

p.line(x = buildnums, y = datapts)

#p.circle(x = buildnums, y = datapts, radius=0.5, source = source,
#fill_color="blue", fill_alpha=0.6, line_color=None)

hover = p.select(dict(type=HoverTool))
hover.tooltips = OrderedDict([
("(x,y)", "(@x, @y)")
 ])

tap = TapTool(plot=p,
    action=OpenURL(url="[http://192.168.1.253:8010/builders/Synthesis/builds/@x](http://192.168.1.253:8010/builders/Synthesis/builds/@x)"))

p.tools.append(tap)

output_file("data_analysis.html")
show(p)

bokeh_plot(aggregated_geomean_syn_queue_fmax) # aggregated_geomean_syn_queue_fmax is the DataFrame used in the plot

Hi Augustine,

Dear Fabio,

Sorry for my late reply. Pardon me for accidentally commenting out the p.circle portion of my code in my first post for this thread. Even when I was running my code without the uncommented portion I couldn’t resolve the issue. As you suggested, last week I tried using your code snippet as you showed below, but that also did not work. Basically it still gave the same thing - the plot was rendered perfectly fine, and even the hovering over the circles work, but I couldn’t click on them (they were not ‘clickable’) when instead they should have been and I should get redirected to the URLs that I specified under OpenURL.

So I worked around with the code, and eventually I managed to overcome this problem.

Happy to hear that you’ve got it working.

Here is my new code as follows:

Prototyping zone for the plotting of graphs using python bokeh

from bokeh.plotting import figure , output_file, show
from bokeh.models import HoverTool, TapTool, OpenURL, ColumnDataSource
from collections import OrderedDict
def bokeh_plot(data):
if isinstance(data, pd.Series):
buildnums = list(data.index)
datapts = list(data)
source = ColumnDataSource(dict(x = buildnums, y=datapts))

p = figure(title="Builds", tools="pan,wheel_zoom,reset,hover")

# Now I render the circle glyph before the line glyph
p.circle(x = buildnums, y = datapts, radius=0.3, source = source,
fill_color="blue", fill_alpha=0.6, line_color=None)

p.line(x = buildnums, y = datapts)

hover = p.select(dict(type=HoverTool))
hover.tooltips = OrderedDict([
("(x,y)", "(@x, @y)")
 ])

tap = TapTool(plot=p,
    action=OpenURL(url="[http://192.168.1.253:8010/builders/Synthesis/builds/@x](http://192.168.1.253:8010/builders/Synthesis/builds/@x)"))

p.tools.append(tap)

output_file("data_analysis.html")
show(p)

bokeh_plot(aggregated_geomean_syn_queue_fmax) # aggregated_geomean_syn_queue_fmax is a pandas series object

Ah! Got it. I did try adding both locally and was working. I should have considered that.

What different in this chunk compared to the previous is that now I chose to render the circle glyph BEFORE rendering the line glyph and I think this somehow led the the circles being superimposed on top of the line glyphs, that thus made them to be ‘clickable’, because previously when I was doing the opposite, the circles were never ‘clickable’. You mentioned in your reply that your code worked when you tried it - however did you test if you could click on the circles and be redirected to URLs?

Yes. It was working. I probably did change when copying and pasting the code because I had also a couple of lines commented in the middle that I removed.

So looking at this, is it true that the order in which the glyphs are rendered and layered upon one another follows the order in which they were called in the code, and that this ordering can have an impact on the glyph behaviors? Is this anticipated behavior?

Yes. I don’t remember it being well and clearly documented though. (at least specified for the different API layers)

If so, I think it will be important to document it.

Yes, agreed.

I never saw this in the Bokeh documentation (is it already there?) and if it isn’t already, I don’t mind contributing some explanations on this behavior if the documentation is open to community editing.

That’d be definitely AWESOME ! I then suggest you to open an issue on github related to this and a following PR with the documentation addition.

You should find information about how to contribute on the contributing and the developer guide sections of the documentation. But let us know if there is something not clear that prevents you from contributing.

Cheers and keep up the good work with developing Bokeh!

Thank you very much!

Fabio

···

On Monday, May 4, 2015 at 5:00:57 AM UTC+2, Augustine Koh wrote: