Create your own graphs
Codegen’s graph visualization capabilities allow you to pair our sophisticated language server with best-in-class graph visualization tools to understand parts of your codebase like never before.
We leverage powerful libraries like NetworkX and D3.js to build and render graphs, enabling you to create visualizations that range from intricate details to large-scale structures. This combination of our advanced language analysis and industry-standard visualization tools opens up virtually limitless possibilities for exploring and understanding your codebase.
How to
Write a codemod that collects the data you want to visualize. This could involve using Codegen’s API to iterate through symbols, files, or other elements of your codebase.
Initialize a NetworkX graph and create nodes with the data you’ve collected. You can do this with code like G = nx.DiGraph()
and then add nodes and edges as needed.
Visualize your graph by passing it to the codebase.visualize()
function. This will display your graph in the Codegen IDE.
Use codebase.visualize(G) to view graphs in the Codegen IDE
Graphs
Visualize relationships and connections between different elements in your codebase
Plotly Charts
Display frequency distributions and comparisons of various metrics in your project
Trees
Display hierarchical structures and relationships in your project
Icicle Tree
Visualize nested hierarchies and distributions in your codebase
Was this page helpful?