e_legend | R Documentation |
Customise the legend.
e_legend(e, show = TRUE, type = c("plain", "scroll"), icons = NULL, ...)
e |
An |
show |
Set to |
type |
Type of legend, |
icons |
A optional list of icons the same length as there are series, see example. |
... |
Any other option to pass, check See Also section. |
e <- cars |>
e_charts(speed) |>
e_scatter(dist, symbol_size = 5)
# with legend
e
# without legend
e |>
e_legend(show = FALSE)
# with icon
# path is taken from http://svgicons.sparkk.fr/
path <- paste0(
"path://M11.344,5.71c0-0.73,0.074-1.122,1.199-1.122",
"h1.502V1.871h-2.404c-2.886,0-3.903,1.36-3.903,3.646",
"v1.765h-1.8V10h1.8v8.128h3.601V10h2.403l0.32-2.718h",
"-2.724L11.344,5.71z"
)
e |>
e_legend(
icons = list(path)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.