Uses geographic projection and d3.zoom working with d3.v4.js
Based on an example by Jason Davies.
| Code derived from the d3.js 'force' example: | |
| The miserables.json file contains the weighted network of coappearances of | |
| characters in Victor Hugo's novel /Les Miserables/. Nodes represent characters | |
| as indicated by the labels, and edges connect any pair of characters that | |
| appear in the same chapter of the book. The values on the edges are the number | |
| of such coappearances. The data on coappearances were taken from D. E. Knuth, | |
| "The Stanford GraphBase: A Platform for Combinatorial Computing", | |
| Addison-Wesley, Reading, MA (1993). |
Uses geographic projection and d3.zoom working with d3.v4.js
Based on an example by Jason Davies.
| // https://github.com/vasturiano/d3-sankey Version 0.4.2. | |
| (function (global, factory) { | |
| typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-array'), require('d3-collection'), require('d3-interpolate')) : | |
| typeof define === 'function' && define.amd ? define(['exports', 'd3-array', 'd3-collection', 'd3-interpolate'], factory) : | |
| (factory((global.d3 = global.d3 || {}),global.d3,global.d3,global.d3)); | |
| }(this, (function (exports,d3Array,d3Collection,d3Interpolate) { 'use strict'; | |
| var sankey = function() { | |
| var sankey = {}, | |
| nodeWidth = 24, |