projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e829f52
)
consider whether axes are displayed when computing area
author
Dan Vanderkam
<dan@dygraphs.com>
Mon, 9 May 2011 16:56:13 +0000
(12:56 -0400)
committer
Dan Vanderkam
<dan@dygraphs.com>
Mon, 9 May 2011 16:56:13 +0000
(12:56 -0400)
dygraph-canvas.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph-canvas.js
b/dygraph-canvas.js
index
fb454c9
..
471d9e4
100644
(file)
--- a/
dygraph-canvas.js
+++ b/
dygraph-canvas.js
@@
-334,12
+334,18
@@
DygraphCanvasRenderer.prototype.attr_ = function(x) {
DygraphCanvasRenderer.prototype.computeArea_ = function() {
var area = {
// TODO(danvk): per-axis setting.
DygraphCanvasRenderer.prototype.computeArea_ = function() {
var area = {
// TODO(danvk): per-axis setting.
- x:
this.attr_('yAxisLabelWidth') + 2 * this.attr_('axisTickSize')
,
+ x:
0
,
y: 0
};
y: 0
};
+ if (this.attr_('drawYAxis')) {
+ area.x = this.attr_('yAxisLabelWidth') + 2 * this.attr_('axisTickSize');
+ }
+
area.w = this.width - area.x - this.attr_('rightGap');
area.w = this.width - area.x - this.attr_('rightGap');
- area.h = this.height - this.attr_('axisLabelFontSize') -
- 2 * this.attr_('axisTickSize');
+ area.h = this.height;
+ if (this.attr_('drawXAxis')) {
+ area.h -= this.attr_('axisLabelFontSize') + 2 * this.attr_('axisTickSize');
+ }
// Shrink the drawing area to accomodate additional y-axes.
if (this.dygraph_.numAxes() == 2) {
// Shrink the drawing area to accomodate additional y-axes.
if (this.dygraph_.numAxes() == 2) {