Dygraphs change legend values ββ/ background
I am using dygraphs on a dark background and cannot imagine the legends / values ββbackground being transparent.
CSS I've tried:
.dygraph-legend {
background:none;
}
and
.dygraph-legend {
background-color: transparent;
}
I cannot find a way to make this transparent.
Link to problem image: here
+3
source to share
2 answers
Add another div just after the dyGraphs div and tell the graphic to use this div for labels and style the annotated divs !important
. For example:.
CSS
.dyStatsLegend {
color: silver !important;
background: rgba( 255, 255, 255, 0.1 ) !important;
}
HTML:
<div id="dyGraphHumTemp" class="dyStatsDiv"></div>
<div id="dyGraphHumTempLabels" class="dyStatsLegend"></div>
JavaScript:
var g1 = new Dygraph(
document.getElementById("dyGraphHumTemp"),
data,{
labelsDiv: 'dyGraphHumTempLabels'
});
0
source to share