Jslink change.emit() for Plotly as target

I have been working on the interaction between python and js. I tried the example in “Plotly Link” page and although the properties are updated (which I can see in the chrome console), the plot itself is not, that is, the change.emit() either is not fired or it is but does not work. Can you guys confirm this?

range_callback = """
var ncontours = [2, 5, 10]
target.data[0].ncontours = ncontours[source.active]
target.properties.data.change.emit()
"""

buttons.jslink(plotly_pane, code={'active': range_callback})

not working for me too. I think this can be reported as a bug in the github issue tracker.

Additionally, when I use the .show or servable method. The following error appears to me.

Thanks for the check. In my case I didn’t try ‘show’, but with ‘serveable’ it runs as if there were no errors. With console.log() I can se that ncontours is updated, but that is it. No update for the plot.

I’ve been investigating deeper and I am not sure it is a bug. If it is, I suspect it is a bokeh problem, I’ll go read some forums there. On the other hand, I am not sure that the plotlyplot instance is kept when the bokeh server runs and it may lose its ability to redraw it.