Hi all,
I am making interactive plot with using Panel and Bokeh. But now I faced a problem. this problem is reporting warning message from jupyter notebook. My function works well as I wanted . But I want to delete this warning. Someone helps me.
alarm info
WARNING:bokeh.core.validation.check:W-1002 (EMPTY_LAYOUT): Layout has no children: Column(id=‘1231’, …)
Info [I tried]
When I delete ‘sidebar = tabs’ in my code, warning is not reported. But I need this sidebar.
My simple code is below
from bokeh.models import Panel, Tabs
import panel as pn
pn.extension()
from bokeh.plotting import figure
p1 = figure(width=300, height=300, name='Scatter')
p1.scatter([0, 1, 2, 3, 4, 5, 6], [0, 1, 2, 3, 2, 1, 0])
p2 = figure(width=300, height=300, name='Line')
p2.line([0, 1, 2, 3, 4, 5, 6], [0, 1, 2, 3, 2, 1, 0])
text1 = "# Slider 1"
text2 = "# Slider 2"
def tabs():
return pn.Tabs(
('scatter', text1),
('line', text2)
)
golden = pn.template.GoldenTemplate(title='Slider_Tabs_sample',sidebar=tabs )
golden.main.append(
pn.Row(
pn.Card(p1, title='Sample1'),
pn.Card(p2, title='Sample2'),
)
)
pn.config.sizing_mode = "scale_width"
pn.serve(golden)
output screen
sidebar works well. But I want to delate warning. Someone helps me.