Skip to content

Re-usable web component for visualizing binary search trees

Notifications You must be signed in to change notification settings

stevemacn/d3.tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

D3 Binary Search Tree

A library to create tree visualizations in the browswer using D3 and javascript.

Getting started

The library takes as input:

  • an element ID to place the visualization.
  • a nested parent-child datastructure.

Node-link data (node, link [sourceNode, targetNode] can be converted to a nested representation using the treemill library.

Usage

An usage example has been provided example.html

A Sample Tree

The data used in the tree above looks like:

  { 
    "name":"Steve", 
    "children": [ 
      {
        "name":"Dahlia",
        "children": [
          { 
            "name":"Boris",
            "children": []
          }, 
          { 
            "name":"Natasha",
            "children": [
              { 
                "name":"Leo",
                "children": [
                  {
                    "name":"Lena",
                    "children": []
                  },
                  {
                    "name":"Ralph",
                    "children": [
                      { 
                        "name":"Meghna",
                        "children":[]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }


Disclaimer

This library is available as is and was based on code found at: http://mbostock.github.io/d3/talk/20111018/tree.html

About

Re-usable web component for visualizing binary search trees

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published