gpt4 book ai didi

r - 同一张图中的两个馅饼 - Highcharter

转载 作者:行者123 更新时间:2023-12-04 08:43:07 25 4
gpt4 key购买 nike

我正在尝试重现 following example同一张图表中的两个馅饼没有成功。下面的示例代码。有谁知道如何在 highcharter 中的同一个图表中创建两个图表?

df = tibble(name = c("a","b","c"),
a1 = c(10,12,11),
a2 = c(22,23,22))
highchart() %>%
hc_chart(renderTo = "container", type = "pie") %>%
hc_add_series(df, hcaes(name, a1), size = 100, center = c(30,10)) %>%
hc_add_series(df, hcaes(name, a2), size = 100, center = c(10,30))

最佳答案

可能的解决方案

highcharter::hw_grid(
hchart(df, type = "pie", mapping = hcaes(name, a1))
,
hchart(df, type = "pie", mapping = hcaes(name, a2))
) %>% htmltools::browsable()

enter image description here

关于r - 同一张图中的两个馅饼 - Highcharter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64466959/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com