[Pkg-javascript-commits] [d3-tip.js] 52/277: update examples to use d3 component

bhuvan krishna bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:57:16 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 2569659308d494b242c6f74d227b1ea9c6d73baa
Author: Justin Palmer <justin at github.com>
Date:   Wed Apr 3 15:41:09 2013 -0700

    update examples to use d3 component
---
 examples/bars.html          | 10 +++++-----
 examples/circles.html       |  8 ++++----
 examples/line.html          | 17 ++++++++---------
 examples/nested-groups.html |  3 +--
 4 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/examples/bars.html b/examples/bars.html
index 92425c5..75d41d0 100644
--- a/examples/bars.html
+++ b/examples/bars.html
@@ -4,7 +4,7 @@
   <title>d3.tip.js - Tooltips for D3</title>
   <meta charset="utf-8" />
   <title>Bar Chart</title>
-  <script type="text/javascript" src="../vendor/d3.js"></script>
+  <script type="text/javascript" src="../components/d3/d3.js"></script>
   <script type="text/javascript" src="../src/d3.tip.js"></script>
   <style type="text/css">
   .d3-tip {
@@ -54,21 +54,21 @@
       .attr('y', function(d) { return y(d) })
       .attr('x', function(d, i) { return x(i) })
       .on('mouseover', tip)
-      .on('click', function() { 
+      .on('click', function() {
         var rect = this.getBoundingClientRect(),
             bbox = this.getBBox(),
             x = bbox.x + (bbox.width / 2),
             y = bbox.y;
-        
+
         linex.transition()
           .attr('x1', x)
           .attr('x2', x)
 
         liney.transition()
           .attr('y1', y)
-          .attr('y2',y)      
+          .attr('y2',y)
       })
-  
+
     linex = vis.append('line')
       .attr("x1", 0)
       .attr("y1", 0)
diff --git a/examples/circles.html b/examples/circles.html
index 121f968..96b87d6 100644
--- a/examples/circles.html
+++ b/examples/circles.html
@@ -4,7 +4,7 @@
   <title>d3.tip.js - Tooltips for D3</title>
   <meta charset="utf-8" />
   <title>Bar Chart</title>
-  <script type="text/javascript" src="../vendor/d3.js"></script>
+  <script type="text/javascript" src="../components/d3/d3.js"></script>
   <script type="text/javascript" src="../src/d3.tip.js"></script>
   <style type="text/css">
   .d3-tip {
@@ -53,20 +53,20 @@
       .attr('r', r)
       .attr('cx', function(d, i) { return x(i) })
       .attr('cy', y)
-      .on('mouseover', function(d, i) { 
+      .on('mouseover', function(d, i) {
         tip.orient(orientations[i]).apply(this, arguments)
 
         var bbox = this.getBBox(),
             x = bbox.x + (bbox.width / 2),
             y = bbox.y + bbox.height;
-        
+
         linex.transition()
           .attr('x1', x)
           .attr('x2', x)
 
         liney.transition()
           .attr('y1', y)
-          .attr('y2',y)          
+          .attr('y2',y)
 
       })
 
diff --git a/examples/line.html b/examples/line.html
index 2fd52ca..dd239c7 100644
--- a/examples/line.html
+++ b/examples/line.html
@@ -2,8 +2,7 @@
 <html>
   <head>
     <title>Lines</title>
-    <script type="text/javascript" src="../vendor/d3.js"></script>
-    <script type="text/javascript" src="../vendor/d3.layout.js"></script>
+    <script type="text/javascript" src="../components/d3/d3.js"></script>
     <script type="text/javascript" src="../src/d3.tip.js"></script>
     <style type="text/css">
       .d3-tip path, .d3-tip rect {
@@ -54,7 +53,7 @@
   // Scales
   var x  = d3.scale.linear().domain([0, data[0].length - 1]).range([0, w])
       y  = d3.scale.linear().domain([0, max]).range([h, 0]);
-  
+
   // Base vis layer
   var vis = d3.select(document.body)
     .append('svg')
@@ -63,7 +62,7 @@
       .attr('class', 'viz')
     .append('g')
       .attr('transform', "translate(" + pl + "," + pt + ")")
- 
+
   // add path layers to their repesctive group
   var paths = vis.selectAll('g.line')
     .data(data)
@@ -73,7 +72,7 @@
   paths.append('path')
     .attr("d", d3.svg.line().x(function(d,i) { return x(i) }).y(y).interpolate('cardinal'))
     .style('stroke', function(d, i) { return ['#2fa5c7', '#d95ba6'][i] })
-  
+
   //Add point circles
   paths.selectAll('.point')
     .data(function(d) { return d })
@@ -82,26 +81,26 @@
     .attr("r", 4)
     .attr("cx", function(d, i) { return x(i) })
     .attr("cy", function(d) { return y(d) })
-    .on('click', function() { 
+    .on('click', function() {
       var rect = this.getBoundingClientRect(),
           bbox = this.getBBox(),
           x = bbox.x + (bbox.width / 2),
           y = bbox.y;
-      
+
       linex.transition()
         .attr('x1', x)
         .attr('x2', x)
 
       liney.transition()
         .attr('y1', y)
-        .attr('y2',y)      
+        .attr('y2',y)
     })
     .on('mouseover', function() {
       var rect = this.getBoundingClientRect(),
           bbox = this.getBBox(),
           x = bbox.x + (bbox.width / 2),
           y = bbox.y + bbox.height;
-      
+
       linex.transition()
         .attr('x1', x)
         .attr('x2', x)
diff --git a/examples/nested-groups.html b/examples/nested-groups.html
index 5d5c98b..c3d56e9 100644
--- a/examples/nested-groups.html
+++ b/examples/nested-groups.html
@@ -2,8 +2,7 @@
 <html>
   <head>
     <title>Lines</title>
-    <script type="text/javascript" src="../vendor/d3.js"></script>
-    <script type="text/javascript" src="../vendor/d3.layout.js"></script>
+    <script type="text/javascript" src="../components/d3/d3.js"></script>
     <script type="text/javascript" src="../src/d3.tip.js"></script>
     <style type="text/css">
       body {

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