简体   繁体   English

Fontawesome 5.13.0 在 visNetwork 中不起作用

[英]Fontawesome 5.13.0 doesn't work in visNetwork

While fontawesome 4.7.0 works smoothly, setting version = "5.13.0" doesn't work.虽然 fontawesome 4.7.0 运行顺畅,但设置version = "5.13.0"不起作用。 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结果是在此处输入图像描述

You need to add: face = "'Font Awesome 5 Free'" in icon=list() Here an exemple:您需要在icon=list()中添加: face = "'Font Awesome 5 Free'"这里是一个例子:

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")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM