<!DOCTYPE html>
<html>

<head>
    <title>Tree</title>
    <script src="d3.min.js"></script>
</head>

<body>
    <svg width="2200" height="1200" id="mainsvg" class="svgs" style="display: block; margin: auto;"></svg>
    <script>
        const svg = d3.select('#mainsvg');
        const width = +svg.attr('width');
        const height = +svg.attr('height');
        const margin = { top: 100, right: 0, bottom: 350, left: 0 };
        const innerWidth = width - margin.left - margin.right;
        const innerHei