Skip to content

Instantly share code, notes, and snippets.

@cool-Blue
cool-Blue / .block
Created April 1, 2018 07:14 — forked from mbostock/.block
Force-Directed Graph
license: gpl-3.0
height: 600
@cool-Blue
cool-Blue / index.html
Last active August 29, 2015 14:27 — forked from mbostock/.block
Circular Layout (Raindrops)
<!DOCTYPE html>
<meta charset="utf-8">
<title>Raindrops</title>
<style>
body {
background: #012;
}
path {
@cool-Blue
cool-Blue / graph.json
Last active August 29, 2015 14:27 — forked from eyaler/graph.json
Force-Directed Graph with Drag/Zoom/Pan/Center/Resize/Labels/Shapes/Filter/Highlight
{
"graph": [],
"links": [
{"source": 0, "target": 1},
{"source": 0, "target": 2},
{"source": 0, "target": 3},
{"source": 0, "target": 4},
{"source": 0, "target": 5},
{"source": 0, "target": 6},
{"source": 1, "target": 3},
@cool-Blue
cool-Blue / README.markdown
Last active August 29, 2015 14:27 — forked from mccannf/README.markdown
D3 Drag Rectangle with drag handles

This is an example of the power of the D3 library and how you can use the drag behavior of D3 to control the position and shape of the SVG element.

@cool-Blue
cool-Blue / .gitignore
Last active September 28, 2015 15:58 — forked from GerHobbelt/.gitignore
d3.js: force layout with self-referencing links
# Editor backup files
*.bak
*~
04ebde07750d6fdd5d1a/
@cool-Blue
cool-Blue / data-generator.js
Last active August 29, 2015 14:26 — forked from m99coder/data-generator.js
D3 Multiline Chart with Data Generator and Path Translation
/**
* Data Generator
*/
var DataGenerator = (function() {
// number of series
var _numberOfSeries = 1;
// number of data points
var _numberOfDataPoints = 40;
@cool-Blue
cool-Blue / index.html
Last active August 29, 2015 14:25 — forked from bycoffe/index.html
Point-in-polygon
<!doctype html>
<meta charset="utf-8">
<html>
<head>
<style type="text/css">
#canvas {
width: 800px;
height: 400px;
border: 1px solid #666;
}
@cool-Blue
cool-Blue / .gitignore
Last active August 29, 2015 14:25 — forked from GerHobbelt/.gitignore
d3.js: force layout; click to group/bundle nodes; multiple relations
# Editor backup files
*.bak
*~
@cool-Blue
cool-Blue / README.md
Last active August 29, 2015 14:24 — forked from mbostock/.block

This example demonstrates using the zoom event to constrain the zoom behavior’s translation. This implementation is a bit heavy-handed, as the translate constraint is zoom-dependent.