Published
Edited
Apr 1, 2020
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
dendrogram = {
let data = findModule();
let svg = d3.select(DOM.svg(width, height))
.style("width", width)
.style("height", height);
return svg.node();
}
Insert cell
Insert cell
Insert cell
Insert cell
cirtree = {
let data = findModule();
let svg = d3.select(DOM.svg(width, height))
.style("width", width)
.style("height", height);
return svg.node();
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
icicle = {
let data = findModule();
let svg = d3.select(DOM.svg(width, height))
.style("width", width)
.style("height", height);
return svg.node();
}
Insert cell
Insert cell
treemap = {
let data = findModule();
let svg = d3.select(DOM.svg(width, height))
.style("width", width)
.style("height", height);
return svg.node();
}
Insert cell
Insert cell
packing = {
let data = findModule();
let svg = d3.select(DOM.svg(diameter, diameter))
.style("width", diameter)
.style("height", diameter);
return svg.node();
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function drawNodes(g, nodes, raise) {
// TODO
// setupEvents(g, circles, raise);
}
Insert cell
function setupEvents(g, selection, raise) {
selection.on('mouseover.highlight', function(d) {
// https://github.com/d3/d3-hierarchy#node_path
// TODO
});
selection.on('mouseout.highlight', function(d) {
let path = d3.select(this).datum().path(selection.data()[0]);
let update = selection.data(path, node => node.data.name);
update.classed('selected', false);
});
// show tooltip text on mouseover (hover)
selection.on('mouseover.tooltip', function(d) {
showTooltip(g, d3.select(this));
});
// remove tooltip text on mouseout
selection.on('mouseout.tooltip', function(d) {
g.select("#tooltip").remove();
});
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more