Skip to contents

Turns an arc_chart() or an arc_map() into a renderable widget. Printing either one calls this for you.

Usage

as_widget(x, width = NULL, height = NULL, element_id = NULL)

Arguments

x

Defines which chart or map to render.

width, height

default NULL. Defines the widget size, passed to htmlwidgets::createWidget().

element_id

default NULL. Defines the DOM element id to render into.

Value

An htmlwidget.

Examples

df <- data.frame(species = c("a", "b", "c"), mass = c(1, 5, 3))

as_widget(arc_col(df, species, mass))