projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
315d487
)
Add toString function to dygraph instances. Doesn't work with graphs on divs without...
author
Robert Konigsberg
<konigsberg@google.com>
Fri, 4 Feb 2011 22:27:56 +0000
(17:27 -0500)
committer
Robert Konigsberg
<konigsberg@google.com>
Fri, 4 Feb 2011 22:27:56 +0000
(17:27 -0500)
dygraph.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph.js
b/dygraph.js
index
b3433e2
..
e340a7b
100644
(file)
--- a/
dygraph.js
+++ b/
dygraph.js
@@
-260,6
+260,12
@@
Dygraph.prototype.__init__ = function(div, file, attrs) {
this.start_();
};
+Dygraph.prototype.toString = function() {
+ var maindiv = this.maindiv_;
+ var id = (maindiv && maindiv.id) ? maindiv.id : maindiv
+ return "[Dygraph " + id + "]";
+}
+
Dygraph.prototype.attr_ = function(name, seriesName) {
if (seriesName &&
typeof(this.user_attrs_[seriesName]) != 'undefined' &&