var data = {
"node": "",
"children": [{
"name": "cat",
"location": 141470,
"context": "very cautiously, like a cat on ice. Martha,"
}, {
"name": "birds",
"location": 143666,
"context": "Marston they were 'noisy birds, and very disturbing."
}, {
"name": "birds",
"location": 193591,
"context": "minister than a nest of birds .' She and Mrs"
}, {
"name": "animals",
"location": 209662,
"context": "and Abel bestowed the various animals , she said to Martha"
}, {
"name": "bird",
"location": 209882,
"context": "a pie; an ill-contrived bird ; and a filthy smelly"
}, {
"name": "minorca cockerel",
"location": 242409,
"context": "and white hens and the minorca cockerel pecked about the open door"
}, {
"name": "butterfly",
"location": 253492,
"context": "skirt-fastener -- the golden butterfly , complicated by various hooks"
}, {
"name": "dog",
"location": 279608,
"context": "' 'Foxy's a bad dog !' came Mrs."
}, {
"name": "dog",
"location": 279753,
"context": "But she inna a bad dog , Mrs. Marston;"
}, {
"name": "cat",
"location": 351049,
"context": "take place?' A cat with a mouse was nothing"
}, {
"name": "parrot",
"location": 395707,
"context": "?' 'Yes, parrot .' 'Be you"
}]
}
var diameter = 960;
var tree = d3.layout.tree()
.size([360, diameter / 2 - 200])
.separation(function (a, b) {
return (a.parent == b.parent ? 1 : 2) / a.depth;
});
var diagonal = d3.svg.diagonal.radial()
.projection(function (d) {
return [d.y, d.x / 180 * Math.PI];
});
var svg = d3.select("body").append("svg")
.attr("width", diameter)
.attr("height", diameter - 50)
...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.