如何编辑R highcharter多元时间序列Y轴

时间:2020-01-16 17:40:41

标签: r r-highcharter

library(highcharter)
x <- cbind(mdeaths, fdeaths)
hchart(x)

在这个简单的示例中,有两个折线图。我想知道如何编辑每个图的Y轴。我的实际数据是百分比,因此我希望Y轴相同。

我尝试添加以下代码,但是将这两条线放在一张图表中:

hchart(x) %>%
  hc_yAxis_multiples(list(title = list(text = "A"),labels=list(format = '{value}%'),
    opposite = FALSE),
    list(title = list(text = "B"),labels = list(format = "{value}%"),
    showLastLabel = FALSE, opposite = TRUE))

0 个答案:

没有答案
相关问题