gregm
gregm

Reputation: 177

Is there a way to change background-color of dygraph labels?

When I place a dygraph on my website I want the background of the graph to match the background-color of my website. When I set the dygraph background color via css in the <div> tag attributes the color is not applied to the label, it remains white when I mouse over the data.

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

If the option existed it would presumably be called labelsColor, but that option doesn't exist. Is there some other way to change the label color?

Upvotes: 1

Views: 1926

Answers (1)

Bink
Bink

Reputation: 2171

Not sure why you’re having an issue with the color of the background as my graph div is in the body of my page and simply inherits the CSS background style of the page body. As for the color of the legend, amongst other things, see http://dygraphs.com/css.html—I changed the color of the background of my legend using:

background: transparent !important;

in .dygraph-legend and it is now the color of the body of the page.

Upvotes: 1

Related Questions