Skip to content

Instantly share code, notes, and snippets.

View git-ashish's full-sized avatar
🏠
Freelancing – Open to exciting opportunities

Ashish Singh git-ashish

🏠
Freelancing – Open to exciting opportunities
View GitHub Profile
@git-ashish
git-ashish / index.html
Last active August 29, 2015 14:19 — forked from mbostock/.block
Dynamic Force Layout
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
var w = 960,
h = 500,
nodes = [],
node;
@git-ashish
git-ashish / README.md
Last active August 29, 2015 14:20 — forked from mbostock/.block
D3 Spline Editor

Click to add new points. Hit the DELETE key to remove the selected point. Use the dropdown menu to change the interpolation mode.

@git-ashish
git-ashish / index.html
Last active August 29, 2015 14:20 — forked from tmcw/index.html
d3 - Click & Double Click
<!DOCTYPE html>
<html>
<head>
<script src="http://d3js.org/d3.v3.min.js"></script>
<style>
body { margin:0; padding:0; }
#map { width:960px; height:500px; background:cyan; }
</style>
</head>
<body>
sub, sup {
/* Specified in % so that the sup/sup is the
right size relative to the surrounding text */
font-size: 75%;
/* Zero out the line-height so that it doesn't
interfere with the positioning that follows */
line-height: 0;
/* Where the magic happens: makes all browsers position
@git-ashish
git-ashish / README.md
Last active August 29, 2015 14:22 — forked from mbostock/.block

A variation of programmatic zoom where buttons can be used to zoom-in or zoom-out around the current center of the viewport.

@git-ashish
git-ashish / README.md
Last active August 29, 2015 14:22 — forked from sim0nf/README.md

This is an example of building a tree layout using the Reingold-Tilford "tidy" algorithm, as described in "Tidier Drawings of Trees". As each new element is added to the graph, it animates in, starting at the previous position of the parent node. Thus, the existing nodes and the new node transition smoothly to their new positions. The animation stops when 500 nodes have been added to the tree.

Built with D3.js.

@git-ashish
git-ashish / README
Created September 24, 2013 06:45 — forked from rmarimon/README
Click on the x axis line and drag to change the scale of the graph.
# Install subversion
sudo apt-get -y install subversion
# Install g++
sudo apt-get -y install g++
# Install Hierarchical Data Format library
# NOTE: This library is not necessarily needed, but was required
# in order for this to compile against a clean Ubuntu 12.04 LTS system.
# I didn't need it on a clean EC2 Ubuntu 12.10 instance, so
@git-ashish
git-ashish / README.md
Created November 5, 2013 15:09 — forked from mbostock/.block
@git-ashish
git-ashish / dnd.js
Created November 5, 2013 15:12 — forked from johan/dnd.js
// http://www.html5rocks.com/en/tutorials/file/dndfiles/
d3.select('svg')
.on('dragover', handleDragOver)
.on('drop', handleFileSelect)
;
function handleFileSelect() {
var event = d3.event
, files = event.dataTransfer.files // FileList object
, about = []