Commit 8309363a authored by olau@iola.dk's avatar olau@iola.dk

Take the grid background color into account when auto-detecting the legend background

git-svn-id: https://flot.googlecode.com/svn/trunk@11 1e0a6537-2640-0410-bfb7-f154510ff394
parent da0726b1
......@@ -977,8 +977,14 @@
// separately to avoid blended labels and
// label boxes
var c = options.legend.backgroundColor;
if (c == null)
c = parseColor(extractColor(div)).adjust(null, null, null, 1).toString();
if (c == null) {
var tmp;
if (options.grid.backgroundColor != null)
tmp = options.grid.backgroundColor;
else
tmp = extractColor(div);
c = parseColor(tmp).adjust(null, null, null, 1).toString();
}
$('<div style="position:absolute;width:' + div.width() + 'px;height:' + div.height() + 'px;' + pos +'background-color:' + c + ';"> </div>').appendTo(target).css('opacity', options.legend.backgroundOpacity);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment