Skip to content

jayden-chan/bplus-graphviz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

B+ Tree GraphViz Generator

Generate GraphViz programs for B+ Trees.

Usage

Read input from a file

node bplus-graphviz.js graph.json | dot -Tpng > output.png

Pipe input to STDIN

cat graph.json | node bplus-graphviz.js | dot -Tpng > output.png

Input format

Tree

q (number, required)

The number of elements per node

root (Node, required)

The root node of the tree

Node

items (array, required)

The elements of the node. Each element can be a number, boolean, string, or object of the form {"value": <val>, "highlight": <boolean>}

children (array of Nodes, optional)

The child nodes

highlight (boolean, optional)

Whether to highlight this node

minlen (number, optional)

Minimum length of the edge connecting this node to the next leaf (only valid if the node is a leaf node)

Examples

Simple (source)

Simple

Custom Edge Length (source)

Custom Edge Length

Highlight Information (source)

Highlight Information

Custom Cell Dimensions, (source)

Custom Cell Dimensions,

Strings (source)

Strings

About

Generate GraphViz programs for B+ Trees

Resources

License

Stars

Watchers

Forks