1.0.8 • Published 2 years ago

ds-visualizer v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

ds-visualizer

Generate visualization of complex data structure on the fly

Table of contents

Features

  • Visualize complex data structure (currently only include Tree and Undirected Graph)

Installing

Using npm:

$ npm install ds-visualizer

Using yarn:

$ yarn add ds-visualizer

Example

note: CommonJS usage

Tree

const { BinaryTree } = require("ds-visualizer");

const simpleTree = [3, 9, 20, null, null, 15, 7, 8];

const tree = new BinaryTree(simpleTree);
tree.visualize("output/tree.svg");

// A tree.svg file will be generate with the visualization of the data structure

Graph

const { Graph } = require("ds-visualizer");

const simpleGraph = [
  [1, 3],
  [0, 2],
  [1, 3],
  [0, 2]
];

const graph = new Graph(simpleGraph);
graph.visualize("output/graph.svg");

// A graph.svg file will be generate with the visualization of the data structure

Credits

This project is heavily inspired by the python package written by Bill Tran. Please check out his work if you ever use Python.

Contributing

For more info on how to contribute to ds-visualizer, see the docs.

License

MIT

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago