projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42b3b41
)
Allow labelsDivWidth updates to be reflected in already-drawn graphs.
author
Robert Konigsberg
<konigsberg@google.com>
Thu, 2 Aug 2012 19:40:17 +0000
(15:40 -0400)
committer
Robert Konigsberg
<konigsberg@google.com>
Thu, 2 Aug 2012 19:40:17 +0000
(15:40 -0400)
plugins/legend.js
patch
|
blob
|
blame
|
history
diff --git
a/plugins/legend.js
b/plugins/legend.js
index
c124c38
..
f16e632
100644
(file)
--- a/
plugins/legend.js
+++ b/
plugins/legend.js
@@
-151,8
+151,10
@@
legend.prototype.predraw = function(e) {
// TODO(danvk): only use real APIs for this.
e.dygraph.graphDiv.appendChild(this.legend_div_);
var area = e.dygraph.plotter_.area;
- this.legend_div_.style.left = area.x + area.w - e.dygraph.getOption("labelsDivWidth") - 1 + "px";
+ var labelsDivWidth = e.dygraph.getOption("labelsDivWidth");
+ this.legend_div_.style.left = area.x + area.w - labelsDivWidth - 1 + "px";
this.legend_div_.style.top = area.y + "px";
+ this.legend_div_.style.width = labelsDivWidth + "px";
};
/**