我试图重新创建此graph。我对标签&#34; Tokyo&#34;感兴趣。和&#34;伦敦&#34;在右下角。显然我需要获取系列标签.js,如html所示:<script src="https://code.highcharts.com/modules/series-label.js"></script>
如果从html中删除该行,标签就会消失。
如何使用r-wrapper实现这一目标?我不在乎太阳,雪和颜色。只是右边的标签。
示例代码:
data(citytemp)
hc <- highchart() %>%
hc_xAxis(categories = citytemp$month) %>%
hc_add_series(name = "Tokyo", data = citytemp$tokyo) %>%
hc_add_series(name = "London", data = citytemp$london)
hc
答案 0 :(得分:0)
检查此代码:
library(highcharter)
data(citytemp)
hc <- highchart() %>%
hc_xAxis(categories = citytemp$month) %>%
hc_add_series(name = "Tokyo", data = citytemp$tokyo) %>%
hc_add_series(name = "London", data = citytemp$london) %>%
hc_legend(align = "right", verticalAlign = "bottom",
layout = "horizental", y = -5)
hc