[英]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")
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.