gpt4 book ai didi

r - 有没有办法突出显示 R dygraphs 中最接近的系列?

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

我正在使用 R 的 dygraphs https://rstudio.github.io/dygraphs/我想知道是否有一种方法可以突出显示最接近的系列,就像在原始图画中所做的那样?演示库在这里:http://dygraphs.com/gallery/#g/highlighted-series

我对 CSS 和 HTML 都很不熟悉。感谢您的帮助和建议。

最佳答案

如果您只想突出显示鼠标光标下方的系列,则可以使用dyHighlight。检查:official R-dygraph website

在图例中强调突出显示的系列的名称有点棘手。您需要在单独的 css file and add it 中编辑 .highlight 类到你的图表:

your_dygraph %>% dyCSS("dygraph.css")

dygraph.css 示例:

.highlight {
/*border: 2px solid black;*/
background-color: #B0B0B0; /* grey background*/
}

关于r - 有没有办法突出显示 R dygraphs 中最接近的系列?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30309825/

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