Export Code
Connected
stixtree.js
import {
select,
json,
zoom,
drag,
event,
tree,
hierarchy,
} from 'd3';

function makeLink(start, end, radius) {
const path = d3.path();
const dh = (4 / 3) * Math.tan(Math.PI / 8); // tangent handle offset

//flip curve
let fx, fy;
if (end[0] - start[0] == 0) {
fx = 0;
} else if (end[0] - start[0] > 0) {
fx = 1;
} else {
fx = -1;
}
if (end[1] - start[1] == 0) {
fy = 0;
} else if (end[1] - start[1] > 0) {
fy = 1;
} else {
fy = -1;
}

//scale curve when dx or dy is less than the radius
if (radius == 0) {
fx = 0;
fy = 0;
} else {

OS-Threat UI

brettforbes

Last edited May 30, 2024
Created on Mar 27, 2024

This is a basic left panel with a tree view in it, based on data slice type

MIT Licensed