projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e013c3
)
clear div
author
Dan Vanderkam
<danvdk@gmail.com>
Fri, 27 Nov 2009 01:44:51 +0000
(20:44 -0500)
committer
Dan Vanderkam
<danvdk@gmail.com>
Fri, 27 Nov 2009 01:44:51 +0000
(20:44 -0500)
dygraph.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph.js
b/dygraph.js
index
ea1f904
..
9b4c3bb
100644
(file)
--- 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";