jmf
1
Hello! I am trying to style a Div widget in BokehJS. I have tried calling the InlineStyleSheet class using the code
var stylesheet = Bokeh.InlineStyleSheet({
css: '.bk-Div { background-color: lightgray; }'
})
based on the BokehJS source code but I get the error:
Uncaught TypeError: Bokeh.InlineStyleSheet is not a function
Any ideas on how to properly call InlineStyleSheet in BokehJS?
Bryan
2
It’s a class, you’ll need to use new InlineStyleSheet(...)
jmf
3
Now I get the error:
InlineStyleSheet is not defined
my code:
var stylesheet = new InlineStyleSheet({
css: '.bk-Div { background-color: lightgray; }'
})
my html for loading BokehJS:
<head>
<!-- Load BokehJS -->
<script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-3.3.0.min.js"></script>
<script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.3.0.min.js"></script>
<script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.3.0.min.js"></script>
<script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.3.0.min.js"></script>
<script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-3.3.0.min.js"></script>
<script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-api-3.3.0.min.js"></script>
</head>
Bryan
4
I actually don’t know more than that it would need to be created via new
(e.g. where it lives or how to import it). cc @mateusz