☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

How to update a title from bokehJS

Community Supportbokehjs
PBrockmann
PBrockmann

I have prepared an example to explore that feature I am looking to implement:
change a title once the plot has been drawn

Also looking how to activate the wheel_zoom at the initialisation as it is possible with
bokeh/python

active_scroll: “wheel_zoom”,

Please play with:

Controling font_size seems not possible as well.
title.text_font_size = "10px";

⌁   Link to post
PBrockmann
PBrockmann

Yes but has been closed…

This one also concerns the topic

⌁   Link to post
Bryan
Bryan

@PBrockmann the second issue has nothing to do with the question, and it’s unclear that the first does either (the focus of the issue, the reported error, points to a different, usage, problem, which is why it was closed and referred here). Here is what I would suggest

  • Make a new issue
  • With a complete script that explicitly demonstrates the “missing plumbing”
  • Including a link back to this topic
⌁   Link to post
Bryan
Bryan

@oviquezr it’s unclear to me that this is the same issue, because this issue is all over the place, and involves quite old versions. Rather than resurrect an old dead thread, please make a brand new topic and absolutely most importantly: include a complete minimal reproducer that illustrates exactly what your are attempting. (The code in your GH issue is not complete, i.e cannot be copy and pasted and run without modifications)

⌁   Link to post
oviquezr
oviquezr

@Bryan Thanks for the follow-up!

After I saw your note on GH, I tried removing the title def from my constructor call entirely, and things worked as expected. I’m guessing I might have had a typo when I tried setting it with title: new Bokeh.Title({text: "some title"}), because that didn’t seem to work quite right for me last night.

My guess is that the issue I was actually running into would be that the Python and JS flavors behave differently, in that JS isn’t casting the figure constructor’s title:"some title" into plot.title.text, but rather replaces the default Title object with the provided string. This might be more of a documentation issue than a source code issue really, since the Minimal Example in the docs uses the approach that seemingly replaces the Title object. I’m transferring a set of Python plots to JS, to make better use of a websocket connection between our data sources and my team’s dashboard; would be happy to contribute to docs and examples once I get things cleaned up and running, if that were desirable to you and the dev team.

⌁   Link to post
Bryan
Bryan

@oviquezr updated examples/docs would be great to have, please let me know if I can answer any questions about the docs or docs build etc. The BokehJS is definitely a bit lagged behind in level of development including docs, so all help is very appreciated!

⌁   Link to post
mateusz
mateusz

Updating plot.title.text and other properties on a Title instance works, however layout is not affected, so changing e.g. text_font_size may produce awkward results. Updating plot.title doesn’t work at all. Both cases should work.

⌁   Link to post

End of archived discussion · Replies are disabled