GithubHelp home page GithubHelp logo

Comments (4)

axil avatar axil commented on June 2, 2024

Ok. Got it:

def f(event):
    print('hi')
b = bm.Button()
w = BokehModel(b)
b.on_click(f)
w.render_bundle = w._model_to_traits(b)
b._update_event_callbacks()
w

from jupyter_bokeh.

bryevdv avatar bryevdv commented on June 2, 2024

Just noting that private APIs can change or be removed at any time so using those methods is purely at your own risk.

We could consider crafting a supported, public API for this, but I think we'd need to understand the use-case better. The intended usage of BokehModel is to be a "last mile" bridge for certain jupyter integrations. I.e. the intent is to set up all your Bokeh models normally up front, then only use BokehModel as the last step.

from jupyter_bokeh.

axil avatar axil commented on June 2, 2024

This makes the following layout impossible to implement:

Bokeh plot1
Ipywidget Slider
Bokeh plot2

(or rather a horizontal version of this widget sequence)

I realize that I could use the bokeh slider instead of the ipywidgets one. But not all ipywidget widgets have their counterparts in bokeh.

from jupyter_bokeh.

mattpap avatar mattpap commented on June 2, 2024

We need to let BokehModel listen to the underlying model's changes and refresh its render_bundle.

from jupyter_bokeh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.