[Pkg-javascript-commits] [d3-tip.js] 80/277: offset examples by amount of tooltip triangle
bhuvan krishna
bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:57:18 UTC 2016
This is an automated email from the git hooks/post-receive script.
bhuvan-guest pushed a commit to branch master
in repository d3-tip.js.
commit 7e1ac4ebb94611820cac21220351c0a1bcd8d8ca
Author: Justin Palmer <justin at github.com>
Date: Sun Apr 7 19:05:42 2013 -0700
offset examples by amount of tooltip triangle
---
examples/bars.html | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/examples/bars.html b/examples/bars.html
index d718121..4ac4565 100644
--- a/examples/bars.html
+++ b/examples/bars.html
@@ -14,6 +14,7 @@
}
.d3-tip {
+ line-height: 1;
font-weight: bold;
padding: 12px;
background: rgba(0, 0, 0, 0.8);
@@ -22,19 +23,20 @@
}
.d3-tip:after {
- display: inline-block;
- font-size: 12px;
+ box-sizing: border-box;
+ display: inline;
+ font-size: 10px;
width: 100%;
line-height: 1;
color: rgba(0, 0, 0, 0.8);
content: "\25BC";
position: absolute;
text-align: center;
- font-size: 12px;
}
.d3-tip.n:after {
- top: 99%;
+ margin: -1px 0 0 0;
+ top: 100%;
left: 0;
}
@@ -76,7 +78,8 @@
<script type="text/javascript">
var tip = d3.tip()
.attr('class', 'd3-tip')
- .text(function(d) { return d.total })
+ .text(function(d) { return d.total + " entries" })
+ .offset([-12, 0])
.direction(function(d) {
return d3.shuffle(['n'])[0]
})
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/d3-tip.js.git
More information about the Pkg-javascript-commits
mailing list