
I’m trying to create a function in JavaScript that will update the theme of my Bokeh plot.
I use this to set the theme of my plot at the start of the function that creates the plot
Bokeh.require("core/properties").use_theme(Bokeh.Themes.dark_minimal); //Set theme for graph
The purpose of what I want is because users will print the graph and different themes will be useful for accessibility.
It seems if I use the same line of code as above, it will only set the theme for elements yet to be created.
Eg.
- Set theme to dark minimal
- make plot
- set theme to light minimal
- make the legend for the plot
The result of the above is a plot with dark minimal theme and a legend with a light minimal theme (although legend looks a bit broken)
What I want is to be able to create the plot with dark minimal theme and then later after the plot is generated, be able to change the theme to whatever I want.
I’m using BokehJS 3.0.3
I can add a code example if neccessary but don’t think it should be needed.
Is this possible to do?




