Я хочу импортировать боке интерактивные графики в моей презентации reve.js .
Что я могу сделать
- Я могу встроить html-контент в reve.js с помощью iframe:
<iframe data-src="https://demo.bokehplots.com/apps/sliders"
width="445" height="355" frameborder="0" marginwidth="0" marginheight="0"
scrolling="no" style="border:3px solid #666; margin-bottom:5px; max-width:
100%;" allowfullscreen=""></iframe>
- Я могу сохранить график Bokeh в формате HTML:
from bokeh.plotting import figure, output_file, show
output_file("/line.html")
p = figure(plot_width=400, plot_height=400)
p.circle([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], size=20, color="navy", alpha=0.5)
show(p)
, который приводит к файлу line.html
, который я могу видеть и взаимодействовать, когда открываю его в своем веб-браузере.
Что я не могу сделать
Вставить мой line.html
файл в reve.js.
Я пытался:
<iframe data-src="/Users/JohnDoe/line.html" width="945" height="555" frameborder="0" marginwidth="0" marginheight="0" scrolling="yes" style="border:3px solid #666; margin-bottom:5px; max-width: 600%;" allowfullscreen=""></iframe>
Этот результат в сообщении Cannot GET /Users/JohnDoe/line.html
отображается в моем iframe.
<iframe data-src="file:///Users/JohnDoe/line.html" width="945" height="555" frameborder="0" marginwidth="0" marginheight="0" scrolling="yes" style="border:3px solid #666; margin-bottom:5px; max-width: 600%;" allowfullscreen=""></iframe>
А в траме ничего не отображается.
Что я хочу сделать
Я хочу, чтобы мой файл .html отображался в моем iframe, как он работает в разделе 1. «Что я могу сделать».