From: Dan Vanderkam Date: Sat, 26 Mar 2011 23:23:13 +0000 (-0400) Subject: a few more tweaks X-Git-Tag: v1.0.0~546 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=86cce9e8c6070fb0223d315751bc062fb88f2b69;p=dygraphs.git a few more tweaks --- diff --git a/dygraph-canvas.js b/dygraph-canvas.js index 6ac556a..18cd8f6 100644 --- a/dygraph-canvas.js +++ b/dygraph-canvas.js @@ -659,7 +659,7 @@ DygraphCanvasRenderer.prototype._renderChartLabels = function() { div.style.width = this.area.w + 'px'; div.style.height = this.attr_('titleHeight') + 'px'; div.style.textAlign = 'center'; - div.style.fontSize = this.attr_('titleHeight') + 'px'; + div.style.fontSize = (this.attr_('titleHeight') - 2) + 'px'; div.style.fontWeight = 'bold'; // div.style.border = '1px solid black'; div.innerHTML = this.attr_('title'); @@ -675,7 +675,7 @@ DygraphCanvasRenderer.prototype._renderChartLabels = function() { div.style.width = this.area.w + 'px'; div.style.height = this.attr_('xLabelHeight') + 'px'; div.style.textAlign = 'center'; - div.style.fontSize = this.attr_('xLabelHeight') + 'px'; + div.style.fontSize = (this.attr_('xLabelHeight') - 2) + 'px'; // div.style.border = '1px solid black'; div.innerHTML = this.attr_('xlabel'); this.container.appendChild(div); @@ -695,7 +695,7 @@ DygraphCanvasRenderer.prototype._renderChartLabels = function() { div.style.top = box.top + 'px'; div.style.width = box.width + 'px'; div.style.height = box.height + 'px'; - div.style.fontSize = this.attr_('xLabelHeight') + 'px'; + div.style.fontSize = (this.attr_('yLabelWidth') - 2) + 'px'; // div.style.border = '1px solid black'; var inner_div = document.createElement("div"); diff --git a/dygraph.js b/dygraph.js index 03ee85d..d7f25e1 100644 --- a/dygraph.js +++ b/dygraph.js @@ -194,9 +194,9 @@ Dygraph.DEFAULT_ATTRS = { avoidMinZero: false, // Sizes of the various chart labels. - titleHeight: 16, - xLabelHeight: 16, - yLabelWidth: 16, + titleHeight: 18, + xLabelHeight: 18, + yLabelWidth: 18, interactionModel: null // will be set to Dygraph.defaultInteractionModel. }; diff --git a/tests/border.html b/tests/border.html index 9079448..cbf5f9e 100644 --- a/tests/border.html +++ b/tests/border.html @@ -23,7 +23,10 @@