From 3041b38d8daddc9ab72c83de42a41b7485452979 Mon Sep 17 00:00:00 2001 From: Luis Silva Date: Fri, 11 Oct 2013 23:48:47 +0930 Subject: [PATCH] Fixed Issue #1159 - Bug Redrawing Legend when using custom container --- jquery.flot.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jquery.flot.js b/jquery.flot.js index 2855d2e..4def83c 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -2626,7 +2626,10 @@ Licensed under the MIT license. function insertLegend() { - placeholder.find(".legend").remove(); + if (options.legend.container!= null) + $(options.legend.container).html(""); + else + placeholder.find(".legend").remove(); if (!options.legend.show) return;