|
|
|
|
@ -2971,7 +2971,7 @@ Licensed under the MIT license.
|
|
|
|
|
|
|
|
|
|
// Generate markup for the list of entries, in their final order
|
|
|
|
|
|
|
|
|
|
var table = $("<table/>").css({
|
|
|
|
|
var table = $("<table>").css({
|
|
|
|
|
"font-size": "smaller",
|
|
|
|
|
"color": options.grid.color
|
|
|
|
|
});
|
|
|
|
|
@ -2984,16 +2984,24 @@ Licensed under the MIT license.
|
|
|
|
|
if (rowBuffer !== null) {
|
|
|
|
|
table.append(rowBuffer);
|
|
|
|
|
}
|
|
|
|
|
rowBuffer = $("<tr/>");
|
|
|
|
|
rowBuffer = $("<tr>");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var colorbox = $("<div>").css({
|
|
|
|
|
"width": "4px",
|
|
|
|
|
"height": 0,
|
|
|
|
|
"border": "5px solid " + entry.color,
|
|
|
|
|
"overflow": "hidden"
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
borderbox = $("<div>").css({
|
|
|
|
|
"border": "1px solid " + options.legend.labelBoxBorderColor,
|
|
|
|
|
"padding": "1px"
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
rowBuffer.append(
|
|
|
|
|
$("<td/>").addClass("legendColorBox").append(
|
|
|
|
|
$("<div/>").css({"border": "1px solid " + options.legend.labelBoxBorderColor, "padding": "1px"}).append(
|
|
|
|
|
$("<div/>").css({"width": "4px", "height": 0, "border": "5px solid " + entry.color, "overflow": "hidden"})
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
$("<td/>").addClass("legendLabel").html(entry.label)
|
|
|
|
|
$("<td>").addClass("legendColorBox").append(borderbox.append(colorbox)),
|
|
|
|
|
$("<td>").addClass("legendLabel").html(entry.label)
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -3016,7 +3024,7 @@ Licensed under the MIT license.
|
|
|
|
|
} else if (p.charAt(1) === "w") {
|
|
|
|
|
pos.left = (m[0] + plotOffset.left) + "px";
|
|
|
|
|
}
|
|
|
|
|
var legend = $("<div/>").addClass("legend").append(table.css(pos)).appendTo(placeholder);
|
|
|
|
|
var legend = $("<div>").addClass("legend").append(table.css(pos)).appendTo(placeholder);
|
|
|
|
|
if (options.legend.backgroundOpacity !== 0.0) {
|
|
|
|
|
// put in the transparent background
|
|
|
|
|
// separately to avoid blended labels and
|
|
|
|
|
@ -3035,7 +3043,7 @@ Licensed under the MIT license.
|
|
|
|
|
var div = legend.children();
|
|
|
|
|
|
|
|
|
|
// Position also applies to this
|
|
|
|
|
$("<div/>").css(pos).css({
|
|
|
|
|
$("<div>").css(pos).css({
|
|
|
|
|
"width": div.width() + "px",
|
|
|
|
|
"height": div.height() + "px",
|
|
|
|
|
"background-color": c,
|
|
|
|
|
|