knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
The following 77 icons are included.
Simply use the ea_icons
to which you pass the name of the icon you want.
library(echarts4r) library(echarts4r.assets) mtcars %>% e_charts(mpg) %>% e_scatter( wt, qsec, symbol = ea_icons("trash"), name = "Trash" ) %>% e_legend(icons = ea_icons("trash"))
You can pass multiple names to ea_icons
.
# laod icon data data("icons") # select 3 random icons (1 / group) icon_names <- sample(icons$name, 3) iris %>% group_by(Species) %>% e_charts(Sepal.Length) %>% e_scatter(Sepal.Width, Petal.Length) %>% e_legend( icon = ea_icons(icon_names) )
Works with anything that takes a symbol
.
y <- rnorm(10, 10, 2) df <- data.frame( x = 1:10, y = y, z = y - rnorm(10, 5, 1) ) df %>% e_charts(x) %>% e_pictorial( y, name = "volume", symbol = ea_icons("microphone"), symbolRepeat = TRUE, z = -1, symbolSize = c(20, 30) ) %>% e_theme("dark")
You can search icons with the convenience function e_icon_search
.
ea_icons_search("no")
Look at the output of ea_icons
to understand how to pass your own SVG paths.
cat( ea_icons("volume") )
All 77 icons.
icons$name
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.