Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Arrow glyph does not update #9436

m3bert opened this issue Nov 20, 2019 · 1 comment · Fixed by #10217

[BUG] Arrow glyph does not update #9436

m3bert opened this issue Nov 20, 2019 · 1 comment · Fixed by #10217


Copy link

m3bert commented Nov 20, 2019

software version info

  • Bokeh 1.4.0
  • Python 3.7.5
  • Tornado 6.0.3
  • node.js 12.12.0

Description of expected behavior and the observed behavior

Arrow should change its length when updating its data via = dict(xS=[0], yS=[1], xE=[new], yE=[1]).
This worked in Bokeh version 1.0.2 (and Python 2.7).

Using[0], yS=[1], xE=[new], yE=[1]),rollover=1) the update works in both versions.

Complete, minimal, self-contained example code that reproduces the issue

from bokeh.plotting import figure
from bokeh.models import ColumnDataSource, Slider, Arrow, OpenHead
from bokeh.layouts import column
from import curdoc

cds_arrow = ColumnDataSource(dict(xS=[0], yS=[1], xE=[1], yE=[1]))
cds_line  = ColumnDataSource(dict(x=[0,1], y=[3,3]))

def slider_callback_data(attr,old,new): = dict(xS=[0], yS=[1], xE=[new], yE=[1])  = dict(x=[0,new], y=[3,3])
    #print( # data is updated but not plotted

def slider_callback_stream(attr,old,new):[0], yS=[1], xE=[new], yE=[1]),rollover=1)[0,new], y=[3,3]),rollover=2)

slider_data = Slider(title="", value=1.0, start=0.0, end=5.0, step=0.1, width=400)

slider_stream = Slider(title="", value=1.0, start=0.0, end=5.0, step=0.1, width=400)

figure_test = figure(title="Example Figure", x_range=(-1,6), y_range=(-0.5,4.5), height=300, width=400, tools="")
figure_test.line(x='x', y='y', source=cds_line)
arrow_glyph = Arrow(end=OpenHead(), x_start='xS', y_start='yS', x_end='xE', y_end='yE',source=cds_arrow)

curdoc().add_root(column(figure_test, slider_data, slider_stream))

Screenshots or screencasts of the bug in action

When moving the upper slider, only the line updates.
Moving the lower slider, both update correctly.

Copy link

bryevdv commented Nov 20, 2019

Thanks for the clear report @m3bert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging a pull request may close this issue.

3 participants