Path: blob/main/docs/user_guide/ui_elements/popups.md
1603 views
Popups
Simple popups
You can define your popup at the feature creation, but you can also overwrite them afterwards:
HTML in popup
Iframe in popup
You can also put any HTML code inside a Popup, thaks to the IFrame
object.
Note that you can put another Figure
into an IFrame
; this should let you do strange things...
Vega chart in popup
Vega is a way to describe charts. You can embed a Vega chart in a popup using the Vega
class.
Vega-Lite chart in popup
Vega-lite is a higher-level version of Vega. Folium supports it as well in the VegaLite
class.
Lazy loading
If whatever you are showing in the popup is slow or heavy to load and you have many popups, you may not want to render the popup contents immediately. There's an argument to prevent loading until the popup is opened.