Wraps the <arcgis-chart> web component directly. Most users want
arc_bar(), arc_scatter(), or arc_line(), which build the arguments
for you.
Usage
arcgis_chart(
i_layer,
chart_type,
config,
tooltip = NULL,
width = NULL,
height = NULL,
element_id = NULL
)Arguments
- i_layer
Defines the layer the chart reads, as built by
as_feature_layer().- chart_type
Defines which default model the config merges over, such as
"barChart". See ModelTypes.- config
Defines the chart configuration in the
WebChartshape. May be sparse because the browser merges it over the defaults.- tooltip
default
NULL. Defines extra tooltip rows aslabelsplus alookupkeyed by series and mark, as built byset_tooltip().- width, height
default
NULL. Defines the widget size, passed tohtmlwidgets::createWidget().- element_id
default
NULL. Defines the DOM element id to render into.
Examples
df <- data.frame(species = c("a", "b", "c"), mass = c(1, 5, 3))
arcgis_chart(
i_layer = as_feature_layer(df),
chart_type = "barChart",
config = arc_col(df, species, mass)@webchart
)