Skip to content

Instantly share code, notes, and snippets.

View seemantk's full-sized avatar

Seemant Kulleen seemantk

View GitHub Profile
@seemantk
seemantk / .block
Last active March 5, 2019 16:03 — forked from mbostock/.block
Brush & Zoom using viewBox
license: gpl-3.0
@seemantk
seemantk / 0_spheres_of_influence
Created November 16, 2015 04:42
Global Bilateral Migration
(title)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<style>
body, html {
width: 100%;
height: 100%;
}
@seemantk
seemantk / README.md
Last active November 15, 2015 22:30 — forked from boeric/README.md
D3 Based Real Time Chart

D3 Based Real Time Chart

The real time chart is a resuable Javascript component that accepts real time data. The chart's time domain is moving with the passage of time, which means that any data placed in the chart eventually will age out and leave the chart. In addition to the main chart, the component also manages a "focus" window with a viewport (d3.brush) that can moved and sized to view an arbitrary portion of the time series data.

The component adheres to the pattern described in Towards Reusable Chart.

The following options are currently supported:

  • width and height in pixels (Number)
  • border (Boolean)
@seemantk
seemantk / d3.js
Last active November 13, 2015 02:51 — forked from mbostock/.block
The Euro Debt Crisis
!function() {
var d3 = {
version: "3.5.8"
};
var d3_arraySlice = [].slice, d3_array = function(list) {
return d3_arraySlice.call(list);
};
var d3_document = this.document;
function d3_documentElement(node) {
return node && (node.ownerDocument || node.document || node).documentElement;
@seemantk
seemantk / README.md
Last active August 29, 2015 14:01 — forked from mbostock/.block

I think it is a bit easier to follow with the transitions simplified a bit.

For a simpler approach, see the Pie Chart Update series of examples.