X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=sidebyside;f=dygraph.js;h=9b4c3bb8bd1cba3724eca00edff2403ceacd7735;hb=bb89f4463bfe972067bd9894421a98ed0563292c;hp=ea1f90460d9c869e623c6077d2e94f35fdeb4393;hpb=b3b20e24b5e645594c42a97a76cabc0d78c5fbfb;p=dygraphs.git diff --git a/dygraph.js b/dygraph.js index ea1f904..9b4c3bb 100644 --- a/dygraph.js +++ b/dygraph.js @@ -155,6 +155,10 @@ Dygraph.prototype.__init__ = function(div, file, attrs) { this.wilsonInterval_ = attrs.wilsonInterval || true; this.customBars_ = attrs.customBars || false; + // Clear the div. This ensure that, if multiple dygraphs are passed the same + // div, then only one will be drawn. + div.innerHTML = ""; + // If the div isn't already sized then give it a default size. if (div.style.width == '') { div.style.width = Dygraph.DEFAULT_WIDTH + "px";