Skip to content

Instantly share code, notes, and snippets.

<script src="https://d3js.org/d3.v3.min.js"></script>
<script>
var width = 960,
height = 900,
radius = Math.min(width, height) / 3;
var x = d3.scale.linear()
.range([0, 2 * Math.PI]);
@fluidmotion
fluidmotion / jsonTblExpand.js
Last active January 15, 2019 02:18
read json for a sunburst plot, format into collapsible table
var myList = [];
var t1 = 0;
var t2 = 0;
var t3 = 0;
var cols = ['Flow', 'BudgetItem', 'Aquifer'];
$.holdReady( true );
$.ajax({
url: 'https://raw.githubusercontent.com/fluidmotion/visTools/master/examples/sunburst/blackhills.json',
@fluidmotion
fluidmotion / sunburst.js
Created January 5, 2019 00:39
updated javascript for a sunburst plot - includes tooltop of values
var tooltip = d3.select("body")
.append("div")
.style("position", "absolute")
.style("z-index", "10")
.style("visibility", "hidden")
.style("background", "#FFFF00")
.text("a simple tooltip");
var width = 960,
height = 900,