有没有办法改变dygraph标签的背景颜色?

时间:2016-09-26 14:27:17

标签: javascript css dygraphs

当我在我的网站上放置一个dygraph时,我希望图表的背景与我网站的背景颜色相匹配。当我通过<div>标签属性中的css设置dygraph背景颜色时,颜色不会应用于标签,当我将鼠标悬停在数据上时它会保持白色。

<div id="graphdiv" style="width:750px; height:300px; background-color: lightblue;"></div>

如果选项存在,它可能会被称为labelsColor,但该选项不存在。是否有其他方法可以更改标签颜色?

1 个答案:

答案 0 :(得分:1)

不确定为什么你的背景颜色有问题,因为我的图形div位于我的页面主体中,只是继承了页面主体的CSS背景样式。至于图例的颜色,除其他外,请参阅http://dygraphs.com/css.html - 我使用以下方式更改了图例背景的颜色:

background: transparent !important;

在.dygraph-legend中,它现在是页面正文的颜色。