I am putting together an application where have a timeseries in 1 pane and 2 auxilliary views in other panes (a distribution and a table). I would like to be able to get a callback when i mouse-over a point on the timeseries so that I can adjust the corresponding linked data panes. It occurs to me that there are 2 ways this could be handled (though not aware of a facility to do either right now):
1. on mouse-over, callback to server-side, which refreshes aux data panes (flexibility, but latency)
2. predetermined animation of the aux data panes pre-loaded. frame shown is keyed off of an internally linked mouse-over event on the timeseries
I assume #2 is not feasible short of writing my own coffeescript (I want to stay within the features as provided on the server side)? I’m guessing that #1 is the easier of the 2 to do, though not aware of any server-side callback facility for mouse-over? Assuming no server-side callback exists for mouse-over (preempting the hover facility), how hard would it be to add this and would the community be interested in this contribution?
To make this perform well and not overwhelm the HTTP server (and rendering) would want to flush intermediate mouse-over events between callbacks. Could possibly be done by enqueuing all events and having the service of that queue on a small delay (where in servicing would drop all events except the last one). Alternatively could require a click event or something lower-frequency, though click would interfere with panning perhaps.
Also any thoughts on client-side animation / change of data sets?
Right now selection events get stored on the server, so if an immediate solution is to rely on callbacks when a glyph is clicked, then this is probably doable today. It should also be possible to get arbitrary tap/clicks, even if they don't hit any glyph. Selection indices get stored on the data sources, and geometries get stored on a "ToolEvents" object that Plots have. Click events should not interfere with panning you can check out this example to see them together: https://github.com/bokeh/bokeh/blob/master/examples/plotting/file/tap.py
Regarding a callback that is (conceptually) on every mouse move, I think at one point on master, we did have all mouse and hit events resulting from hovers getting stored. As you mention, it needs some kind of throttling to be practical. In the short term, we simply stopped hover type tools from storing this information on the server. If you are interested in working up a PR that would enable some kind of hover callback in a practical way, it would certainly be seriously considered. Maybe open a GH issue to start a discussion of a proposed implementation?
Thanks!
Bryan
···
On Dec 26, 2014, at 7:21 AM, Jonathan Shore <[email protected]> wrote:
I am putting together an application where have a timeseries in 1 pane and 2 auxilliary views in other panes (a distribution and a table). I would like to be able to get a callback when i mouse-over a point on the timeseries so that I can adjust the corresponding linked data panes. It occurs to me that there are 2 ways this could be handled (though not aware of a facility to do either right now):
1. on mouse-over, callback to server-side, which refreshes aux data panes (flexibility, but latency)
2. predetermined animation of the aux data panes pre-loaded. frame shown is keyed off of an internally linked mouse-over event on the timeseries
I assume #2 is not feasible short of writing my own coffeescript (I want to stay within the features as provided on the server side)? I’m guessing that #1 is the easier of the 2 to do, though not aware of any server-side callback facility for mouse-over? Assuming no server-side callback exists for mouse-over (preempting the hover facility), how hard would it be to add this and would the community be interested in this contribution?
To make this perform well and not overwhelm the HTTP server (and rendering) would want to flush intermediate mouse-over events between callbacks. Could possibly be done by enqueuing all events and having the service of that queue on a small delay (where in servicing would drop all events except the last one). Alternatively could require a click event or something lower-frequency, though click would interfere with panning perhaps.
Also any thoughts on client-side animation / change of data sets?
Thanks, that offers some hints (re: getting a click event). I can see in the tap_tool.coffee code that:
for r in @mget(‘renderers’)
ds = r.get(‘data_source’)
sm = ds.get(‘selection_manager’)
sm.select(@, @plot_view.renderers[r.id], geometry, true, append)
So the data source selection is adjusted on click or region drag. I am not clear on how can capture changes in the selection on the server side (python). Supposing I have an instance of the main plot in my app as:
class Test(HBox):
…
mainplot = Instance(Plot)
…
def setup_events(self):
…
self.plot..on_change (…)
How do I capture the event posted to ToolEvents & get a callback?
Thanks
Jonathan
···
On Dec 26, 2014, at 11:48 AM, Bryan Van de Ven [email protected] wrote:
Hi Jonathan,
Right now selection events get stored on the server, so if an immediate solution is to rely on callbacks when a glyph is clicked, then this is probably doable today. It should also be possible to get arbitrary tap/clicks, even if they don’t hit any glyph. Selection indices get stored on the data sources, and geometries get stored on a “ToolEvents” object that Plots have. Click events should not interfere with panning you can check out this example to see them together: https://github.com/bokeh/bokeh/blob/master/examples/plotting/file/tap.py
Regarding a callback that is (conceptually) on every mouse move, I think at one point on master, we did have all mouse and hit events resulting from hovers getting stored. As you mention, it needs some kind of throttling to be practical. In the short term, we simply stopped hover type tools from storing this information on the server. If you are interested in working up a PR that would enable some kind of hover callback in a practical way, it would certainly be seriously considered. Maybe open a GH issue to start a discussion of a proposed implementation?
Thanks!
Bryan
On Dec 26, 2014, at 7:21 AM, Jonathan Shore [email protected] wrote:
I am putting together an application where have a timeseries in 1 pane and 2 auxilliary views in other panes (a distribution and a table). I would like to be able to get a callback when i mouse-over a point on the timeseries so that I can adjust the corresponding linked data panes. It occurs to me that there are 2 ways this could be handled (though not aware of a facility to do either right now):
on mouse-over, callback to server-side, which refreshes aux data panes (flexibility, but latency)
predetermined animation of the aux data panes pre-loaded. frame shown is keyed off of an internally linked mouse-over event on the timeseries
I assume #2 is not feasible short of writing my own coffeescript (I want to stay within the features as provided on the server side)? I’m guessing that #1 is the easier of the 2 to do, though not aware of any server-side callback facility for mouse-over? Assuming no server-side callback exists for mouse-over (preempting the hover facility), how hard would it be to add this and would the community be interested in this contribution?
To make this perform well and not overwhelm the HTTP server (and rendering) would want to flush intermediate mouse-over events between callbacks. Could possibly be done by enqueuing all events and having the service of that queue on a small delay (where in servicing would drop all events except the last one). Alternatively could require a click event or something lower-frequency, though click would interfere with panning perhaps.
Also any thoughts on client-side animation / change of data sets?
as the callback to call whenever the "selected" attribute changes on any of the data sources in "my_sources".
BTW "app creation" is still an area where we are looking to improve and make things more streamlined, so any feedback you have about what could be made better or simpler would be very valuable.
Thanks,
Bryan
···
On Dec 26, 2014, at 12:03 PM, Jonathan Shore <[email protected]> wrote:
Thanks, that offers some hints (re: getting a click event). I can see in the tap_tool.coffee code that:
for r in @mget('renderers’)
ds = r.get(‘data_source'
)
So the data source selection is adjusted on click or region drag. I am not clear on how can capture changes in the selection on the server side (python). Supposing I have an instance of the main plot in my app as:
How do I capture the event posted to ToolEvents & get a callback?
Thanks
Jonathan
On Dec 26, 2014, at 11:48 AM, Bryan Van de Ven <[email protected]> wrote:
Hi Jonathan,
Right now selection events get stored on the server, so if an immediate solution is to rely on callbacks when a glyph is clicked, then this is probably doable today. It should also be possible to get arbitrary tap/clicks, even if they don't hit any glyph. Selection indices get stored on the data sources, and geometries get stored on a "ToolEvents" object that Plots have. Click events should not interfere with panning you can check out this example to see them together: https://github.com/bokeh/bokeh/blob/master/examples/plotting/file/tap.py
Regarding a callback that is (conceptually) on every mouse move, I think at one point on master, we did have all mouse and hit events resulting from hovers getting stored. As you mention, it needs some kind of throttling to be practical. In the short term, we simply stopped hover type tools from storing this information on the server. If you are interested in working up a PR that would enable some kind of hover callback in a practical way, it would certainly be seriously considered. Maybe open a GH issue to start a discussion of a proposed implementation?
Thanks!
Bryan
On Dec 26, 2014, at 7:21 AM, Jonathan Shore <[email protected]> wrote:
I am putting together an application where have a timeseries in 1 pane and 2 auxilliary views in other panes (a distribution and a table). I would like to be able to get a callback when i mouse-over a point on the timeseries so that I can adjust the corresponding linked data panes. It occurs to me that there are 2 ways this could be handled (though not aware of a facility to do either right now):
1. on mouse-over, callback to server-side, which refreshes aux data panes (flexibility, but latency)
2. predetermined animation of the aux data panes pre-loaded. frame shown is keyed off of an internally linked mouse-over event on the timeseries
I assume #2 is not feasible short of writing my own coffeescript (I want to stay within the features as provided on the server side)? I’m guessing that #1 is the easier of the 2 to do, though not aware of any server-side callback facility for mouse-over? Assuming no server-side callback exists for mouse-over (preempting the hover facility), how hard would it be to add this and would the community be interested in this contribution?
To make this perform well and not overwhelm the HTTP server (and rendering) would want to flush intermediate mouse-over events between callbacks. Could possibly be done by enqueuing all events and having the service of that queue on a small delay (where in servicing would drop all events except the last one). Alternatively could require a click event or something lower-frequency, though click would interfere with panning perhaps.
Also any thoughts on client-side animation / change of data sets?
as the callback to call whenever the “selected” attribute changes on any of the data sources in “my_sources”.
BTW “app creation” is still an area where we are looking to improve and make things more streamlined, so any feedback you have about what could be made better or simpler would be very valuable.
Thanks,
Bryan
On Dec 26, 2014, at 12:03 PM, Jonathan Shore [email protected] wrote:
Thanks, that offers some hints (re: getting a click event). I can see in the tap_tool.coffee code that:
So the data source selection is adjusted on click or region drag. I am not clear on how can capture changes in the selection on the server side (python). Supposing I have an instance of the main plot in my app as:
class Test(HBox):
…
mainplot = Instance(Plot)
…
def setup_events(self):
…
self.plot.<something>.on_change (…)
How do I capture the event posted to ToolEvents & get a callback?
Thanks
Jonathan
On Dec 26, 2014, at 11:48 AM, Bryan Van de Ven [email protected] wrote:
Hi Jonathan,
Right now selection events get stored on the server, so if an immediate solution is to rely on callbacks when a glyph is clicked, then this is probably doable today. It should also be possible to get arbitrary tap/clicks, even if they don’t hit any glyph. Selection indices get stored on the data sources, and geometries get stored on a “ToolEvents” object that Plots have. Click events should not interfere with panning you can check out this example to see them together: https://github.com/bokeh/bokeh/blob/master/examples/plotting/file/tap.py
Regarding a callback that is (conceptually) on every mouse move, I think at one point on master, we did have all mouse and hit events resulting from hovers getting stored. As you mention, it needs some kind of throttling to be practical. In the short term, we simply stopped hover type tools from storing this information on the server. If you are interested in working up a PR that would enable some kind of hover callback in a practical way, it would certainly be seriously considered. Maybe open a GH issue to start a discussion of a proposed implementation?
Thanks!
Bryan
On Dec 26, 2014, at 7:21 AM, Jonathan Shore [email protected] wrote:
I am putting together an application where have a timeseries in 1 pane and 2 auxilliary views in other panes (a distribution and a table). I would like to be able to get a callback when i mouse-over a point on the timeseries so that I can adjust the corresponding linked data panes. It occurs to me that there are 2 ways this could be handled (though not aware of a facility to do either right now):
on mouse-over, callback to server-side, which refreshes aux data panes (flexibility, but latency)
predetermined animation of the aux data panes pre-loaded. frame shown is keyed off of an internally linked mouse-over event on the timeseries
I assume #2 is not feasible short of writing my own coffeescript (I want to stay within the features as provided on the server side)? I’m guessing that #1 is the easier of the 2 to do, though not aware of any server-side callback facility for mouse-over? Assuming no server-side callback exists for mouse-over (preempting the hover facility), how hard would it be to add this and would the community be interested in this contribution?
To make this perform well and not overwhelm the HTTP server (and rendering) would want to flush intermediate mouse-over events between callbacks. Could possibly be done by enqueuing all events and having the service of that queue on a small delay (where in servicing would drop all events except the last one). Alternatively could require a click event or something lower-frequency, though click would interfere with panning perhaps.
Also any thoughts on client-side animation / change of data sets?
Jonathan
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
as the callback to call whenever the “selected” attribute changes on any of the data sources in “my_sources”.
BTW “app creation” is still an area where we are looking to improve and make things more streamlined, so any feedback you have about what could be made better or simpler would be very valuable.
Thanks,
Bryan
On Dec 26, 2014, at 12:03 PM, Jonathan Shore [email protected] wrote:
Thanks, that offers some hints (re: getting a click event). I can see in the tap_tool.coffee code that:
So the data source selection is adjusted on click or region drag. I am not clear on how can capture changes in the selection on the server side (python). Supposing I have an instance of the main plot in my app as:
class Test(HBox):
…
mainplot = Instance(Plot)
…
def setup_events(self):
…
self.plot.<something>.on_change (…)
How do I capture the event posted to ToolEvents & get a callback?
Thanks
Jonathan
On Dec 26, 2014, at 11:48 AM, Bryan Van de Ven [email protected] wrote:
Hi Jonathan,
Right now selection events get stored on the server, so if an immediate solution is to rely on callbacks when a glyph is clicked, then this is probably doable today. It should also be possible to get arbitrary tap/clicks, even if they don’t hit any glyph. Selection indices get stored on the data sources, and geometries get stored on a “ToolEvents” object that Plots have. Click events should not interfere with panning you can check out this example to see them together: https://github.com/bokeh/bokeh/blob/master/examples/plotting/file/tap.py
Regarding a callback that is (conceptually) on every mouse move, I think at one point on master, we did have all mouse and hit events resulting from hovers getting stored. As you mention, it needs some kind of throttling to be practical. In the short term, we simply stopped hover type tools from storing this information on the server. If you are interested in working up a PR that would enable some kind of hover callback in a practical way, it would certainly be seriously considered. Maybe open a GH issue to start a discussion of a proposed implementation?
Thanks!
Bryan
On Dec 26, 2014, at 7:21 AM, Jonathan Shore [email protected] wrote:
I am putting together an application where have a timeseries in 1 pane and 2 auxilliary views in other panes (a distribution and a table). I would like to be able to get a callback when i mouse-over a point on the timeseries so that I can adjust the corresponding linked data panes. It occurs to me that there are 2 ways this could be handled (though not aware of a facility to do either right now):
on mouse-over, callback to server-side, which refreshes aux data panes (flexibility, but latency)
predetermined animation of the aux data panes pre-loaded. frame shown is keyed off of an internally linked mouse-over event on the timeseries
I assume #2 is not feasible short of writing my own coffeescript (I want to stay within the features as provided on the server side)? I’m guessing that #1 is the easier of the 2 to do, though not aware of any server-side callback facility for mouse-over? Assuming no server-side callback exists for mouse-over (preempting the hover facility), how hard would it be to add this and would the community be interested in this contribution?
To make this perform well and not overwhelm the HTTP server (and rendering) would want to flush intermediate mouse-over events between callbacks. Could possibly be done by enqueuing all events and having the service of that queue on a small delay (where in servicing would drop all events except the last one). Alternatively could require a click event or something lower-frequency, though click would interfere with panning perhaps.
Also any thoughts on client-side animation / change of data sets?
Jonathan
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
So the data source selection is adjusted on click or region drag. I am not clear on how can capture changes in the selection on the server side (python). Supposing I have an instance of the main plot in my app as:
class Test(HBox):
…
mainplot = Instance(Plot)
…
def setup_events(self):
…
self.plot.<something>.on_change (…)
How do I capture the event posted to ToolEvents & get a callback?
Thanks
Jonathan
On Dec 26, 2014, at 11:48 AM, Bryan Van de Ven [email protected] wrote:
Hi Jonathan,
Right now selection events get stored on the server, so if an immediate solution is to rely on callbacks when a glyph is clicked, then this is probably doable today. It should also be possible to get arbitrary tap/clicks, even if they don’t hit any glyph. Selection indices get stored on the data sources, and geometries get stored on a “ToolEvents” object that Plots have. Click events should not interfere with panning you can check out this example to see them together: https://github.com/bokeh/bokeh/blob/master/examples/plotting/file/tap.py
Regarding a callback that is (conceptually) on every mouse move, I think at one point on master, we did have all mouse and hit events resulting from hovers getting stored. As you mention, it needs some kind of throttling to be practical. In the short term, we simply stopped hover type tools from storing this information on the server. If you are interested in working up a PR that would enable some kind of hover callback in a practical way, it would certainly be seriously considered. Maybe open a GH issue to start a discussion of a proposed implementation?
Thanks!
Bryan
On Dec 26, 2014, at 7:21 AM, Jonathan Shore [email protected] wrote:
I am putting together an application where have a timeseries in 1 pane and 2 auxilliary views in other panes (a distribution and a table). I would like to be able to get a callback when i mouse-over a point on the timeseries so that I can adjust the corresponding linked data panes. It occurs to me that there are 2 ways this could be handled (though not aware of a facility to do either right now):
on mouse-over, callback to server-side, which refreshes aux data panes (flexibility, but latency)
predetermined animation of the aux data panes pre-loaded. frame shown is keyed off of an internally linked mouse-over event on the timeseries
I assume #2 is not feasible short of writing my own coffeescript (I want to stay within the features as provided on the server side)? I’m guessing that #1 is the easier of the 2 to do, though not aware of any server-side callback facility for mouse-over? Assuming no server-side callback exists for mouse-over (preempting the hover facility), how hard would it be to add this and would the community be interested in this contribution?
To make this perform well and not overwhelm the HTTP server (and rendering) would want to flush intermediate mouse-over events between callbacks. Could possibly be done by enqueuing all events and having the service of that queue on a small delay (where in servicing would drop all events except the last one). Alternatively could require a click event or something lower-frequency, though click would interfere with panning perhaps.
Also any thoughts on client-side animation / change of data sets?
Jonathan
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
as the callback to call whenever the “selected” attribute changes on any of the data sources in “my_sources”.
BTW “app creation” is still an area where we are looking to improve and make things more streamlined, so any feedback you have about what could be made better or simpler would be very valuable.
I am looking for a similar functionality, but with the taptool and with multiple plots per document (using embedded div’s). An example document would have multiple line glyphs per plot and multiple plots per outfile. When the user clicks on a point on one of the glyphs (ie a circle on a line), the callback needs to know which glyph was hit, and therefore the correct dataset is used for indexing.
The examples are great and hint toward this ability but I have not found the correct incantation to reference the glyph in the ‘selected’ indices, and therefore support multiple plots.
Thanks for your work!
Rusty
···
On Monday, February 9, 2015 at 6:44:47 PM UTC, Sarah Bird wrote:
On Monday, February 9, 2015 at 10:24:22 AM UTC-8, mateusz.paprocki wrote:
So the data source selection is adjusted on click or region drag. I am not clear on how can capture changes in the selection on the server side (python). Supposing I have an instance of the main plot in my app as:
class Test(HBox):
…
mainplot = Instance(Plot)
…
def setup_events(self):
…
self.plot.<something>.on_change (…)
How do I capture the event posted to ToolEvents & get a callback?
Thanks
Jonathan
On Dec 26, 2014, at 11:48 AM, Bryan Van de Ven [email protected] wrote:
Hi Jonathan,
Right now selection events get stored on the server, so if an immediate solution is to rely on callbacks when a glyph is clicked, then this is probably doable today. It should also be possible to get arbitrary tap/clicks, even if they don’t hit any glyph. Selection indices get stored on the data sources, and geometries get stored on a “ToolEvents” object that Plots have. Click events should not interfere with panning you can check out this example to see them together: https://github.com/bokeh/bokeh/blob/master/examples/plotting/file/tap.py
Regarding a callback that is (conceptually) on every mouse move, I think at one point on master, we did have all mouse and hit events resulting from hovers getting stored. As you mention, it needs some kind of throttling to be practical. In the short term, we simply stopped hover type tools from storing this information on the server. If you are interested in working up a PR that would enable some kind of hover callback in a practical way, it would certainly be seriously considered. Maybe open a GH issue to start a discussion of a proposed implementation?
Thanks!
Bryan
On Dec 26, 2014, at 7:21 AM, Jonathan Shore [email protected] wrote:
I am putting together an application where have a timeseries in 1 pane and 2 auxilliary views in other panes (a distribution and a table). I would like to be able to get a callback when i mouse-over a point on the timeseries so that I can adjust the corresponding linked data panes. It occurs to me that there are 2 ways this could be handled (though not aware of a facility to do either right now):
on mouse-over, callback to server-side, which refreshes aux data panes (flexibility, but latency)
predetermined animation of the aux data panes pre-loaded. frame shown is keyed off of an internally linked mouse-over event on the timeseries
I assume #2 is not feasible short of writing my own coffeescript (I want to stay within the features as provided on the server side)? I’m guessing that #1 is the easier of the 2 to do, though not aware of any server-side callback facility for mouse-over? Assuming no server-side callback exists for mouse-over (preempting the hover facility), how hard would it be to add this and would the community be interested in this contribution?
To make this perform well and not overwhelm the HTTP server (and rendering) would want to flush intermediate mouse-over events between callbacks. Could possibly be done by enqueuing all events and having the service of that queue on a small delay (where in servicing would drop all events except the last one). Alternatively could require a click event or something lower-frequency, though click would interfere with panning perhaps.
Also any thoughts on client-side animation / change of data sets?
Jonathan
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
as the callback to call whenever the “selected” attribute changes on any of the data sources in “my_sources”.
BTW “app creation” is still an area where we are looking to improve and make things more streamlined, so any feedback you have about what could be made better or simpler would be very valuable.