From e0629007580486339315df286d948c44fcfa6da8 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Fri, 8 Feb 2013 16:18:36 -0500 Subject: [PATCH] Add CSS "reset" to fix Issue 429 --- dygraph.js | 2 ++ tests/css-positioning.html | 56 ++++++++++++++++++++++++++++++---------------- 2 files changed, 39 insertions(+), 19 deletions(-) diff --git a/dygraph.js b/dygraph.js index 941badb..eba57db 100644 --- a/dygraph.js +++ b/dygraph.js @@ -930,6 +930,8 @@ Dygraph.prototype.createInterface_ = function() { this.graphDiv = document.createElement("div"); this.graphDiv.style.width = this.width_ + "px"; this.graphDiv.style.height = this.height_ + "px"; + // TODO(danvk): any other styles that are useful to set here? + this.graphDiv.style.textAlign = 'left'; // This is a CSS "reset" enclosing.appendChild(this.graphDiv); // Create the canvas for interactive parts of the chart. diff --git a/tests/css-positioning.html b/tests/css-positioning.html index 733c12f..829de2f 100644 --- a/tests/css-positioning.html +++ b/tests/css-positioning.html @@ -8,14 +8,14 @@ @@ -23,21 +23,39 @@
+ +
+
+
+
+ +