Fontawesome 5.13.0 doesn't work in visNetwork

Viewed 49

While fontawesome 4.7.0 works smoothly, setting version = "5.13.0" doesn't work. From the documentation:

nodes <- data.frame(id = 1:3, group = c("B", "A", "B"))
edges <- data.frame(from = c(1,2), to = c(2,3))

visNetwork(nodes, edges, width = "100%") %>%
  visGroups(groupname = "A", shape = "icon", icon = list(code = "f0c0", size = 75)) %>%
  visGroups(groupname = "B", shape = "icon", icon = list(code = "f007", color = "red")) %>%
  visLegend() %>%
  addFontAwesome(version = "5.13.0")

results in enter image description here

1 Answers

You need to add : face = "'Font Awesome 5 Free'" in icon=list() Here an exemple :

visNetwork(nodes, edges) %>%
  visGroups(groupname = "A", shape = "icon", 
      icon = list(face = "'Font Awesome 5 Free'", code = "f0c0", size = 75)) %>%
  visGroups(groupname = "B", shape = "icon", 
      icon = list(face = "'Font Awesome 5 Free'", code = "f007", color = "red")) %>%
  addFontAwesome(version = "5.13.0")
Related