connections {echarts4r} | R Documentation |
Connect charts
Description
Connect charts together.
Usage
e_connect(e, ids)
e_group(e, group)
e_connect_group(e, group)
e_disconnect_group(e, group = NULL)
e_arrange(..., rows = NULL, cols = NULL, width = "xs", title = NULL)
Arguments
e |
An |
ids |
Scalar, vector or list of ids of chart to connect with. |
group |
Group name. |
... |
Any |
rows , cols |
Number of rows and columns. |
width |
Wdith of columns, one of |
title |
Title of charts. |
Value
e_arrange
: in an interactive session, returns a htmltools::browsable
, in rmarkdown
returns a
container (htmltools::div
).
Functions
e_connect
: connects charts byids
, cannot be disconnected.e_group
: assigns a group to chart.e_connect_group
: connects chart with another group.e_disconnect_group
: diconnects chart from group.e_arrange
: arrange charts.
Note
e_arrange
may not work properly in the RStudio viewer.
Examples
# linked datazoom
e1 <- cars |>
e_charts(
speed,
height = 200
) |>
e_scatter(dist) |>
e_datazoom(show = FALSE) |>
e_group("grp") # assign group
e2 <- cars |>
e_charts(
dist,
height = 200
) |>
e_scatter(speed) |>
e_datazoom() |>
e_group("grp") |> # assign group
e_connect_group("grp") # connect
if (interactive()) {
e_arrange(e1, e2, title = "Linked datazoom")
}
[Package echarts4r version 0.4.5 Index]