@kit-data-manager/visualization-component
Version:
The visualization-component is a dynamic, interactive graph component built using D3.js. It is designed to render graphs based on provided JSON data, making it ideal for visualizing complex relationships and networks in an intuitive manner.
46 lines (45 loc) • 1.63 kB
TypeScript
/**
* Class responsible for handling interactive events on the graph nodes.
*/
export declare class HandleEvents {
private currentlyClicked;
private hostElement;
/**
* Creates an instance of HandleEvents.
*
* @constructor
* @param {HTMLElement} hostElement - The HTML element that hosts the D3.js graph.
*/
constructor(hostElement: any);
/**
* Apply mouseover event handling to the nodes for displaying tooltips and highlighting connected nodes.
*
* @param {any} nodes - D3 selection of graph nodes.
* @param {any} links - D3 selection of graph links.
* @param {any} tooltip - D3 selection of the tooltip element.
*/
applyMouseover(nodes: any, links: any, tooltip: any): void;
/**
* Clears the current selection by resetting node and link styles.
*/
clearSelection(): void;
/**
* Handles the onClick event for nodes, updating their sizes and related links.
*
* @param {any} nodes - D3 selection of graph nodes.
* @param {any} links - D3 selection of graph links.
*/
onClick(nodes: any, links: any): void;
handleNodeClick(event: any, d: any, nodes: any, links: any): void;
/**
* Applies a click handler to the body element to reset currentlyClicked when clicking outside the graph.
*/
applyClickHandler(): void;
/**
* Applies drag functionality to nodes using D3 drag behavior.
*
* @param {any} nodes - D3 selection of graph nodes.
* @param {any} simulation - D3 force simulation.
*/
applyDragToNodes(nodes: any, simulation: any): void;
}