Hi,
Animated GIFs will not work with ImageURL because the underlying HTML canvas the browser provides does not support animated GIFs. There is not anything we can do about that. Your best bet is to make a layout with a Div, then you could put an animated GIF in the Div.
Thanks,
Bryan
···
On Aug 6, 2018, at 03:06, [email protected] wrote:
Hi,
On reset module of a figure, I would like to be able to display animated images. The idea is to make user wait until a certain of backend operations complete like a wait cycle. I want to sort of freeze the screen and put an animated image. So far, I was able to append an image to a plot but not a gif. Could you please help me with this? You can find a sample code below.
from bokeh.plotting import figure, curdoc
from bokeh.models import ColumnDataSource, Range1d
from bokeh.models.glyphs import ImageURL
from bokeh.models.widgets import Panel, Tabs, Select,Buttonbosch_logo = "myapp1/static/loading-animated-gif-transparent-background-11.gif"
logo_src = ColumnDataSource(dict(url = [bosch_logo]))page_logo = figure(plot_width = 500, plot_height = 500, title="")
page_logo.toolbar.logo = None
page_logo.toolbar_location = None
page_logo.x_range=Range1d(start=0, end=1)
page_logo.y_range=Range1d(start=0, end=1)
page_logo.xgrid.grid_line_color = None
page_logo.ygrid.grid_line_color = None
image = ImageURL(url='url', x=0.05, y = 0.85, h=0.7, w=0.9)
page_logo.add_glyph(logo_src, image)
page_logo.outline_line_alpha = 0
curdoc().add_root(page_logo)Thanks.
--
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/6e7c9d86-ad5f-4ce7-982a-ccbdcc70cb4d%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.