Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta name="description" content="Drag Demo"/>
<meta charset="utf-8">
<title>Drag Demo</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
</head>
@billdwhite
billdwhite / README
Created November 10, 2013 21:59 — forked from mattbaker/README
This example expects to have d3.min.js and d3.layout.min.js in the same directory as pie.js and pie_serv.js.
Run with node pie_serv.js

d3 Minimap Pan and Zoom Demo - Force Directed 1

A demo that explores another way to combine a forcelayout with the pan and zoom demo with a reusable forcecircle class.

A Pen by Bill White on CodePen.

License.

d3 Minimap Pan and Zoom Demo

A demo that explores one possible way to combine a forcelayout with the pan and zoom demo.

A Pen by Bill White on CodePen.

License.

@billdwhite
billdwhite / chart-flow.js
Last active August 29, 2015 13:57
Alternative chart-flow.js which does not rely on jQuery and does not create SVG for you; Instead it simple appends flow layout to the provided SVG container, allowing more than one flow layout within an SVG
d3.custom = {};
d3.custom.chart = {};
d3.custom.chart.flow = function() {
// public variables with default settings
var margin = {top:10, right:10, bottom:10, left:10}, // defaults
padding = {top:20, right:10, bottom:10, left:10},
transitionDuration = 300,
chartGroup,
container,
@billdwhite
billdwhite / demo.base.js
Created March 31, 2014 19:42
d3 Multi Flow Container Demo
d3.demo = {};
d3.demo.currentScale = 1;
d3.demo.app = function() {
"use strict";
var width = 600,
height = 900,
margin = {top: 0, right: 0, bottom: 0, left: 0},
base = null,
@billdwhite
billdwhite / index.html
Last active August 4, 2023 21:14
d3 Virtual Scrolling Plugin
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Virtual Scrolling Demo</title>
<style>
html, body {
width: 100%;
height: 100%;
margin: 0;
@billdwhite
billdwhite / treemap_header_02.html
Created August 5, 2014 17:18
d3 Treemap with Headers Demo
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Treemap - Neat Zoom Effect</title>
<script type="text/javascript" src="./d3/d3.js"></script>
<style type="text/css">
body {
overflow: hidden;
margin: 0;
@billdwhite
billdwhite / index.html
Created November 11, 2014 18:49
A Pen by Bill White.
<html class="no-js">
<head>
<title>d3 Demo CSS Layout 07 - jquery piechart</title>
<script src="https://cdn.rawgit.com/mbostock/d3/master/d3.js"></script>
</head>
<body>
<h5 class="description">Resize each container. Notice the PieChart does not resize.</h5>
<div id="chartContainer"></div>
<button id="addButton">Add Resizable Pie Chart</button>
</body>
@billdwhite
billdwhite / .block
Created July 26, 2017 15:57
cola block switch
license: mit