Skip to main content

Introduction

What is Graphviz?

Graphviz is an open-source graph visualization software that allows you to represent structural information as diagrams of abstract graphs and networks. It uses a language called DOT to describe the nodes, edges, and their relationships, which can then be rendered into various graphical formats like PNG, SVG, PDF, etc. Graphviz is widely used in academia and industry for visualizing complex structures such as hierarchies, data flows, and state machines.

Graphviz logo

Graphviz logo

What is ts-graphviz?

ts-graphviz is a Graphviz library for TypeScript, allowing you to directly utilize the powerful features of Graphviz within the TypeScript/JavaScript ecosystem. It fully integrates Graphviz's DOT language with TypeScript, enabling programmatic generation and manipulation of graphs. This makes it easy to visualize complex graphs and network structures based on dynamic data.

ts-graphviz logo

ts-graphviz logo

Key Features of ts-graphviz

  • TypeScript Integration: Provides strong typing and seamless integration with TypeScript projects, enhancing development efficiency and type safety.
  • Object-Oriented API: Offers an intuitive object-oriented API for creating and manipulating graphs, nodes, and edges.
  • Declarative and Imperative Styles: Supports both declarative and imperative programming styles, giving you flexibility in how you construct your graphs.
  • Extensibility: Allows for customization and extension of the library's type system to meet specific needs.
  • Cross-Platform Support: Works in Node.js, Deno, and browser environments, making it versatile for different projects.
  • AST Manipulation: Includes support for manipulating the DOT language at the Abstract Syntax Tree (AST) level for advanced use cases.