You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Issue with interactions between widgets and plots using bokeh server #4764
When creating two plots, each one with select box acting on the data and try to replace the plot in the "on_change" callback, the change in one select box updates the corresponding plot and messes up the other (the plot disappears or some text appears behind, ...).
To reproduce the issue, simply run the code below as server and change the selection of the first select box. The first graph will update and the second will get affected. Then, changing the second select box fixes the display of the second plot and affects the first one.
@troianow Is it the same kind of plot (glyphs, etc) but just the data is changing? A current workaround would be to update the data in the plot, instead of the plot itself, as demonstrated in most of the existing examples
@bryevdv Unfortunately, for my application, most of the plot changes: the widget might control the way the data is sliced, thus impacting the glyphs, axes, legend, ... so I don't think I can get away with changes in the data source alone. Is there a good way to replace everything in the figure without replacing the figure itself?
OK, we will make a priority of it, but the best person to try and fix this is out for another week or so, so it will probably not be able to be fixed until after SciPy.
I am having the same issue. Also with column if I define multiple rows.
The usage of row was my workaround and with only one row it's working for me (or one column). So troianow, this may be the solution for you. As I need a grid like structure with a toolbar per plot I do need this fixed.
I've been bumping my head against this bug today also. Discussion group post here, which contains a link to a Gist of code to reproduce the problem. Just in case a second example is helpful.
Facing the same problem. I thought using the layout(...) function to create the grid might solve it, but no luck.
My current workaround is to add my "real" layout inside a one element column which acts as the root. When I want to update, I remove the real layout, then add the updated on back into the root. Has the downside of noticeably clearing the whole page when it happens, but works for now.
(As a side note that I discovered while working around this, is there a reported bug for curdoc().clear() not clearing the page? My first attempt was to clear it then add a new root, but it just duplicated everything. Or is this behaviour intentional?)
Hello everyone! First time commenting but I've been closely following development, I'm a big supporter of the bokeh package, fantastic job done.
I am having problems as well with updating multiple plots with a callback function arranged with the layout function. I was getting DeserializationErrors in version 0.12.2, bokeh serve was hanging in 0.12.5. However, the plots are updating with the callback in dev version 0.12.6 but I had to nest each plot separately in column functions. It works but I see multiple RuntimeErrors in the console.
@mattpap I think this is the same issue (or related to #4810) basically, adding new models that have references to other models (such as new plots) results in
2017-05-31 20:02:20,720 error handling message Message 'PATCH-DOC' (revision 1): RuntimeError('Cannot apply patch to d3a4b88c-321d-4bdf-8d61-e62bbe0d9f10 which is not in the document',)
In this case, the plots render, but the toolbar does not. My guess is that patches are not being handled carefully enough in the presence of object graphs. I think it's trying to patch sub objects like new toolbar before they are actually instantiated (speculation)
Activity
bryevdv commentedon Jul 6, 2016
Here's a screenshot. My guess is that a resize event needs to be triggered but is not.
bryevdv commentedon Jul 6, 2016
I was hoping this might be a workaround but unfortunately not:
@troianow Is it the same kind of plot (glyphs, etc) but just the data is changing? A current workaround would be to update the data in the plot, instead of the plot itself, as demonstrated in most of the existing examples
bryevdv commentedon Jul 6, 2016
Aso FWIW I don't think the widgets are relevant I think it is just the replacement of a child plot at all that is problematic.
gtroianowski commentedon Jul 7, 2016
@bryevdv Unfortunately, for my application, most of the plot changes: the widget might control the way the data is sliced, thus impacting the glyphs, axes, legend, ... so I don't think I can get away with changes in the data source alone. Is there a good way to replace everything in the figure without replacing the figure itself?
bryevdv commentedon Jul 7, 2016
OK, we will make a priority of it, but the best person to try and fix this is out for another week or so, so it will probably not be able to be fixed until after SciPy.
gtroianowski commentedon Aug 1, 2016
Is someone looking at this?
birdsarah commentedon Aug 1, 2016
Not that I'm aware of. Are you experiencing the same issue with 0.12.1?
gtroianowski commentedon Aug 2, 2016
Yes, the behavior is the same
migueldiasalmeida commentedon Oct 22, 2016
I am having the same issue. Also with column if I define multiple rows.
The usage of row was my workaround and with only one row it's working for me (or one column). So troianow, this may be the solution for you. As I need a grid like structure with a toolbar per plot I do need this fixed.
tobyhodges commentedon Nov 24, 2016
I've been bumping my head against this bug today also. Discussion group post here, which contains a link to a Gist of code to reproduce the problem. Just in case a second example is helpful.
mbrigdan commentedon Dec 9, 2016
Facing the same problem. I thought using the layout(...) function to create the grid might solve it, but no luck.
My current workaround is to add my "real" layout inside a one element column which acts as the root. When I want to update, I remove the real layout, then add the updated on back into the root. Has the downside of noticeably clearing the whole page when it happens, but works for now.
(As a side note that I discovered while working around this, is there a reported bug for curdoc().clear() not clearing the page? My first attempt was to clear it then add a new root, but it just duplicated everything. Or is this behaviour intentional?)
6 remaining items
nickmachairas commentedon May 1, 2017
Hello everyone! First time commenting but I've been closely following development, I'm a big supporter of the bokeh package, fantastic job done.
I am having problems as well with updating multiple plots with a callback function arranged with the layout function. I was getting DeserializationErrors in version 0.12.2, bokeh serve was hanging in 0.12.5. However, the plots are updating with the callback in dev version 0.12.6 but I had to nest each plot separately in column functions. It works but I see multiple RuntimeErrors in the console.
I can help with testing if needed. Thanks
bryevdv commentedon Jun 1, 2017
@mattpap I think this is the same issue (or related to #4810) basically, adding new models that have references to other models (such as new plots) results in
In this case, the plots render, but the toolbar does not. My guess is that patches are not being handled carefully enough in the presence of object graphs. I think it's trying to patch sub objects like new toolbar before they are actually instantiated (speculation)
github-actions commentedon Oct 28, 2024
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.