HTML Annotation

Hi All,

I’d like to overlay a small table of data on top of a Bokeh chart. Is it possible to place a Div widget on top of a chart like an annotation?

Or some other method of achieving this effect?

Thanks,

Alex

Hi,

There's nothing built in that would do this. But I think you could accomplish this by writing a custom extension:

  https://bokeh.pydata.org/en/latest/docs/user_guide/extensions.html

Thanks,

Bryan

···

On Mar 8, 2019, at 6:39 AM, [email protected] wrote:

Hi All,

I'd like to overlay a small table of data on top of a Bokeh chart. Is it possible to place a Div widget on top of a chart like an annotation?
Or some other method of achieving this effect?

Thanks,
Alex

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/cc922e22-addc-4652-ba5b-01be8ce5ddba%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

You can position your Div widget anywhere you like using:

div = Div(text = ’

This is a DIV text
’)

``

``

``

But you could also use Text like:

`from bokeh.models import Plot
from bokeh.models.glyphs import Text

plot = Plot()
glyph = Text()
plot.add_glyph(source, glyph)
`

Or:

from bokeh.plotting import figure plot = figure() text = plot.text()

···

On Friday, March 8, 2019 at 6:03:25 PM UTC+1, Alex Bellinson wrote:

Hi All,

I’d like to overlay a small table of data on top of a Bokeh chart. Is it possible to place a Div widget on top of a chart like an annotation?

Or some other method of achieving this effect?

Thanks,

Alex

Thanks, Tony, for saving me from writing my own extension!!

···

On Monday, March 11, 2019 at 8:51:33 AM UTC-4, tony halik wrote:

You can position your Div widget anywhere you like using:

div = Div(text = ’

This is a DIV text
’)

``

``

``

But you could also use Text like:

`from bokeh.models import Plot
from bokeh.models.glyphs import Text

plot = Plot()
glyph = Text()
plot.add_glyph(source, glyph)
`

Or:

from bokeh.plotting import figure plot = figure() text = plot.text()

On Friday, March 8, 2019 at 6:03:25 PM UTC+1, Alex Bellinson wrote:

Hi All,

I’d like to overlay a small table of data on top of a Bokeh chart. Is it possible to place a Div widget on top of a chart like an annotation?

Or some other method of achieving this effect?

Thanks,

Alex