I’m creating a UI with a tabbed layout but I’m having trouble applying the theme to all tabs. Ive reduced this to the example code below.
from bokeh.models import TabPanel, Tabs
from bokeh.plotting import figure, show
from bokeh.io import curdoc
from bokeh.models import Button
from bokeh.layouts import gridplot
p1 = figure(width=300, height=300, sizing_mode="stretch_both")
p1.circle([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], size=20, color="navy", alpha=0.5)
tab1 = TabPanel(child=p1, title="circle")
p2 = figure(width=300, height=300, sizing_mode="stretch_both")
p2.line([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], line_width=3, color="navy", alpha=0.5)
tab2 = TabPanel(child=p2, title="line")
doc = curdoc()
doc.theme = "dark_minimal"
gridArray = []
aButton = Button(label="OK", button_type="primary")
gridArray.append([aButton])
gridPanel = gridplot(children = gridArray, sizing_mode="stretch_both")
rTab = TabPanel(child=gridPanel, title="Right Tab")
show(Tabs(tabs=[tab1, tab2, rTab], sizing_mode="stretch_both"))
I assumed that the ‘Right Tab’ (this only contains a Button in this example) would have the same theme as the other two tabs.
It appears I’m not understanding something. Can anyone explain how to ensure the theme is applied to the gridplot tab in the above example ?
Thanks
Paul