Class: VisualyzerManager

VisualyzerManager()

Visualyzer Manager - Interactive Graph Visualization Uses D3.js for force-directed graph rendering

Constructor

new VisualyzerManager()

Source:

Methods

clear() → {void}

Clear the graph and return to dropzone

Source:
Returns:
Type
void

collapseNode(node) → {void}

Collapse node and hide its children recursively

Parameters:
Name Type Description
node Object

Node to collapse

Source:
Returns:
Type
void

createForceGraph(data, filename) → {void}

Create D3.js force-directed graph visualization

Parameters:
Name Type Description
data Object

Graph data with nodes and edges

filename string

Name of the DOT file

Source:
Returns:
Type
void

createLegend(svg) → {void}

Create legend showing node type colors

Parameters:
Name Type Description
svg Object

D3.js SVG selection

Source:
Returns:
Type
void

dragEnded(event, d, simulation) → {void}

Handle drag end event for node

Parameters:
Name Type Description
event Object

D3 drag event

d Object

Node data

simulation Object

D3 simulation

Source:
Returns:
Type
void

dragStarted(event, d, simulation) → {void}

Handle drag start event for node

Parameters:
Name Type Description
event Object

D3 drag event

d Object

Node data

simulation Object

D3 simulation

Source:
Returns:
Type
void

dragged(event, d) → {void}

Handle drag event for node

Parameters:
Name Type Description
event Object

D3 drag event

d Object

Node data

Source:
Returns:
Type
void

expandNode(node) → {void}

Expand node to show its children

Parameters:
Name Type Description
node Object

Node to expand

Source:
Returns:
Type
void

getNodeColor(node) → {Object}

Get node color based on type

Parameters:
Name Type Description
node Object

Node data

Source:
Returns:

Color object with fill and stroke

Type
Object

(async) handleFile(file) → {Promise.<void>}

Handle dropped or selected file

Parameters:
Name Type Description
file File

DOT file

Source:
Returns:
Type
Promise.<void>

hasUnexpandedChildren(node) → {boolean}

Check if node has children that haven't been expanded

Parameters:
Name Type Description
node Object

Node to check

Source:
Returns:

True if node has unexpanded children

Type
boolean

initializeElements()

Initialize DOM elements

Source:

parseDotContent(dotContent) → {Object}

Parse DOT content into graph data

Parameters:
Name Type Description
dotContent string

DOT file content

Source:
Returns:

Parsed graph data

Type
Object

parseLabel(label) → {Object}

Parse node label text

Parameters:
Name Type Description
label string

Label text to parse

Source:
Returns:

Parsed label with title and fields

Type
Object

parseRecordLabel(label) → {Object}

Parse record-style label into structured fields

Parameters:
Name Type Description
label string

Record label text

Source:
Returns:

Object with title and fields array

Type
Object

readFile(file) → {Promise.<string>}

Read file content

Parameters:
Name Type Description
file File

File to read

Source:
Returns:

File content

Type
Promise.<string>

(async) renderGraph(dotContent, filename)

Render interactive graph using D3.js

Parameters:
Name Type Description
dotContent string

DOT file content

filename string

File name

Source:

resetZoom() → {void}

Reset zoom to default level

Source:
Returns:
Type
void

setupEventListeners()

Setup event listeners

Source:

showError(message) → {void}

Display error message to user

Parameters:
Name Type Description
message string

Error message to display

Source:
Returns:
Type
void

showNodeMetadata(node) → {void}

Display node metadata in the info panel

Parameters:
Name Type Description
node Object

Node whose metadata to display

Source:
Returns:
Type
void

toggleNodeExpansion(node) → {void}

Toggle node expansion state (expand/collapse children)

Parameters:
Name Type Description
node Object

Node to toggle

Source:
Returns:
Type
void

updateGraph() → {void}

Update graph visualization with current visible nodes and edges

Source:
Returns:
Type
void

zoomIn() → {void}

Zoom in on the graph

Source:
Returns:
Type
void

zoomOut() → {void}

Zoom out on the graph

Source:
Returns:
Type
void