projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
352c831
)
update legend when updateOptions() is called
author
Dan Vanderkam
<dan@dygraphs.com>
Sun, 10 Apr 2011 19:13:29 +0000
(15:13 -0400)
committer
Dan Vanderkam
<dan@dygraphs.com>
Sun, 10 Apr 2011 19:13:29 +0000
(15:13 -0400)
dygraph.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph.js
b/dygraph.js
index
4227652
..
958d1f3
100644
(file)
--- a/
dygraph.js
+++ b/
dygraph.js
@@
-1811,7
+1811,6
@@
Dygraph.prototype.setSelection = function(row) {
this.lastx_ = this.selPoints_[0].xval;
this.updateSelection_();
} else {
this.lastx_ = this.selPoints_[0].xval;
this.updateSelection_();
} else {
- this.lastx_ = -1;
this.clearSelection();
}
this.clearSelection();
}
@@
-2630,6
+2629,13
@@
Dygraph.prototype.drawGraph_ = function() {
if (is_initial_draw) {
// Generate a static legend before any particular point is selected.
this.attr_('labelsDiv').innerHTML = this.generateLegendHTML_();
if (is_initial_draw) {
// Generate a static legend before any particular point is selected.
this.attr_('labelsDiv').innerHTML = this.generateLegendHTML_();
+ } else {
+ if (typeof(this.selPoints_) !== 'undefined' && this.selPoints_.length) {
+ this.lastx_ = this.selPoints_[0].xval;
+ this.updateSelection_();
+ } else {
+ this.clearSelection();
+ }
}
if (this.attr_("drawCallback") !== null) {
}
if (this.attr_("drawCallback") !== null) {