[Pkg-javascript-commits] [d3-tip.js] 78/277: add callout triangle to north positioned tips

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 8d825a42458c7b54963dfbf19debde426f39870c
Author: Justin Palmer <justin at github.com>
Date:   Sun Apr 7 18:40:14 2013 -0700

    add callout triangle to north positioned tips
---
 examples/bars.html | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/examples/bars.html b/examples/bars.html
index edb459e..d718121 100644
--- a/examples/bars.html
+++ b/examples/bars.html
@@ -16,12 +16,26 @@
   .d3-tip {
     font-weight: bold;
     padding: 12px;
-    border: 1px solid rgba(0, 0, 0, 0.8);
-    background: rgba(0, 0, 0, 0.5);
+    background: rgba(0, 0, 0, 0.8);
     color: #fff;
-    text-align: center;
     border-radius: 2px;
-    box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
+  }
+
+  .d3-tip:after {
+    display: inline-block;
+    font-size: 12px;
+    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%;
+    left: 0;
   }
 
   .d3-tip text {
@@ -64,7 +78,7 @@
       .attr('class', 'd3-tip')
       .text(function(d) { return d.total })
       .direction(function(d) {
-        return d3.shuffle(['n', 's', 'e', 'w'])[0]
+        return d3.shuffle(['n'])[0]
       })
 
     var w = 800,

-- 
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