Skip to content

Commit

Permalink
Merge pull request #823 from palantir/re-styling
Browse files Browse the repository at this point in the history
Update stylings for Legends and Title Labels.
  • Loading branch information
jtlan committed Aug 13, 2014
2 parents 736531c + 71614cf commit 70b28a8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions plottable.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -24,7 +23,8 @@ svg.plottable {
}

.plottable .title-label text {
font-size: 30pt;
font-size: 20px;
font-weight: bold;
}

.plottable .text-label-vertical {
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion test/components/labelTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down
2 changes: 1 addition & 1 deletion test/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down

0 comments on commit 70b28a8

Please sign in to comment.