Skip to contents

Wraps a qe_plot() chain as an htmlwidget, so it renders in the RStudio Viewer, R Markdown / Quarto and Shiny, and can be saved with htmlwidgets::saveWidget(). Printing a qe_plot uses this.

Usage

qe_widget(p, width = NULL, height = NULL, elementId = NULL, ...)

Arguments

p

A qe_plot object, or a set / ModelData list (passed to qe_plot() with ...).

width, height

Widget size — a number (pixels) or a CSS length. Default: the width / height given to qe_plot().

elementId

Optional element id.

...

Passed to qe_plot() when p is not a qe_plot.

Value

An htmlwidget.

Examples

if (FALSE) { # \dontrun{
w <- qe_plot(set) |> qe_edges("FirstGame") |> qe_widget()
htmlwidgets::saveWidget(w, "plot.html")
} # }