Internal function that creates an interactive MAIDR widget from a ggplot object. This is called internally by render_maidr() and should not be called directly. Use maidr_output() and render_maidr() for Shiny integration instead.
Arguments
- plot
A ggplot object, or NULL to auto-detect recorded Base R plots
- use_cdn
Logical. Controls where MAIDR.js is loaded from, matching
show()andsave_html():TRUE: Use CDN (requires internet)FALSE: Use local bundled files (works offline)NULL(default): Auto-detect based on internet availability
This differs from
maidr_html_dependencies(), whereNULLmeans bundled. The widget renders throughcreate_maidr_iframe()andcreate_standalone_html(), which probes for connectivity, so an unsetuse_cdnloads from the CDN on a machine that is online.- width
The width of the widget in pixels or CSS units (default: NULL for auto-sizing)
- height
The height of the widget in pixels or CSS units (default: NULL for auto-sizing)
- element_id
A unique identifier for the widget (default: NULL for auto-generated)
- ...
Additional arguments passed to create_maidr_html()