panel.pane.Bokeh

Here are the examples of the python api panel.pane.Bokeh taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

0 Source : test_links.py
with BSD 3-Clause "New" or "Revised" License
from holoviz

def test_bokeh_figure_jslink(document, comm):
    fig = figure()

    pane = Bokeh(fig)
    t1 = TextInput()
    
    pane.jslink(t1, **{'x_range.start': 'value'})
    row = Row(pane, t1)
    
    model = row.get_root(document, comm)

    link_customjs = fig.x_range.js_property_callbacks['change:start'][-1]
    assert link_customjs.args['source'] == fig.x_range
    assert link_customjs.args['target'] == model.children[1]
    assert link_customjs.code == """
    var value = source['start'];
    value = value;
    value = value;
    try {
      var property = target.properties['value'];
      if (property !== undefined) { property.validate(value); }
    } catch(err) {
      console.log('WARNING: Could not set value on target, raised error: ' + err);
      return;
    }
    try {
      target['value'] = value;
    } catch(err) {
      console.log(err)
    }
    """

def test_widget_jscallback(document, comm):