From 9a15cca5e80fb91fe1931b445c4a9a743a1c1a13 Mon Sep 17 00:00:00 2001 From: Justin Lan Date: Wed, 13 Aug 2014 15:19:17 -0700 Subject: [PATCH 1/2] Update stylings for Legends and Title Labels. --- plottable.css | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plottable.css b/plottable.css index 4fdcf928fd..d0b3053c5b 100644 --- a/plottable.css +++ b/plottable.css @@ -10,12 +10,11 @@ svg.plottable { } .plottable .label text { - font-family: sans-serif; + font-family: "Helvetica Neue", sans-serif; fill: #32313F; } .plottable .axis-label text { - font-family: "Helvetica Neue", sans-serif; font-size: 10px; font-weight: bold; letter-spacing: 1px; @@ -24,7 +23,8 @@ svg.plottable { } .plottable .title-label text { - font-size: 30pt; + font-size: 20px; + font-weight: bold; } .plottable .text-label-vertical { @@ -67,9 +67,10 @@ svg.plottable { } .plottable .legend text { - font-family: sans-serif; - fill: #979797; - font-size: 14pt; + font-family: "Helvetica Neue", sans-serif; + font-size: 12px; + font-weight: bold; + line-height: normal; } .plottable .line-plot path.line { From 71614cf159bdad8f2aab2afd011c8e65e2a0b99c Mon Sep 17 00:00:00 2001 From: Justin Lan Date: Wed, 13 Aug 2014 15:44:40 -0700 Subject: [PATCH 2/2] Fixed off-by-small-number issue in label test. --- test/components/labelTests.ts | 2 +- test/tests.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/components/labelTests.ts b/test/components/labelTests.ts index baa0d08870..61bf434080 100644 --- a/test/components/labelTests.ts +++ b/test/components/labelTests.ts @@ -18,7 +18,7 @@ describe("Labels", () => { var text = content.select("text"); var bbox = Plottable.Util.DOM.getBBox(text); - assert.equal(bbox.height, label.availableHeight, "text height === label.minimumHeight()"); + assert.closeTo(bbox.height, label.availableHeight, 0.5, "text height === label.minimumHeight()"); assert.equal(text.node().textContent, "A CHART TITLE", "node's text content is as expected"); svg.remove(); }); diff --git a/test/tests.js b/test/tests.js index f811a536e9..98a5d8b465 100644 --- a/test/tests.js +++ b/test/tests.js @@ -694,7 +694,7 @@ describe("Labels", function () { assert.lengthOf(textChildren, 1, "There is one text node in the parent element"); var text = content.select("text"); var bbox = Plottable.Util.DOM.getBBox(text); - assert.equal(bbox.height, label.availableHeight, "text height === label.minimumHeight()"); + assert.closeTo(bbox.height, label.availableHeight, 0.5, "text height === label.minimumHeight()"); assert.equal(text.node().textContent, "A CHART TITLE", "node's text content is as expected"); svg.remove(); });