gpt4 book ai didi

r - Highcharts 中的 dash_styles

转载 作者:行者123 更新时间:2023-12-04 12:46:14 24 4
gpt4 key购买 nike

我正在尝试更改 Highcharts 中折线图的 dashStyle。

我提到了 RDocumentation ,第 7 页,任何地方都没有它的例子。它所说的就是使用 dash_styles()

然后我检查了here并尝试过,但没有得到我需要的结果。

library(highcharter)
highchart() %>%
hc_title(text = title) %>%
hc_xAxis(categories = batchno) %>%
hc_add_series(name = "Mixer A", data = A,
color = "hotpink", pointWidth = 20, type = "line",
dash_styles(style = "LongDot")) %>%
hc_add_series(name = "Mixer B" , data = B,
color = "slateblue", pointWidth = 20,type = "line") %>%

hc_chart(type = "column") %>%

hc_yAxis(
list(lineWidth = 3, lineColor='seashell', title=list(text= "text"),max= 10)) %>% hc_tooltip(crosshairs = TRUE, shared = TRUE)
}

我如何使用这个 dash_style ?

最佳答案

dash_styles 只是一个辅助函数,显示您可以使用的破折号类型。

检查 this example .你会看到你只需要给出破折号类型的名称:

highchart() %>%
hc_add_series(data = rnorm(5), dashStyle = "longdash") %>%
hc_add_series(data = rnorm(5), dashStyle = "DashDot")

enter image description here

关于r - Highcharts 中的 dash_styles,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47136518/

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