Skip to content

Conversation

@psociety
Copy link

I tried building the html myself but after having to do it a second time i went the js way xD
Usage example:

<div id="chart"></div>
<script>
  const data = [
    {
      name: 'Parent',
      childs: [
        [
          {
            name: 'Parent',
            childs: [
              [
                { name: 'Child 1', childs: [] },
                { name: 'Child 2', childs: [] },
                { name: 'Child 3', childs: [] }
              ]
            ]
          },
          { name: 'Child 2', childs: [] },
          { name: 'Child 3', childs: [] }
        ]
      ]
    }
  ];


(new TreeRenderer(data, '#chart')).render();
</script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant