Skip to content

Repository files navigation

AlgorithmX

buildnpmcodecov

AlgorithmX is an event-driven network visualization library, built on top of D3 and WebCola. It can be used to create interactive networks and animated algorithm simulations.



Resources

Install

Browser

<scriptsrc="https://d3js.org/d3.v5.min.js"></script><scriptsrc="https://ialab.it.monash.edu/webcola/cola.min.js"></script><scriptsrc="https://unpkg.com/algorithmx"></script>

This will expose a global algorithmx variable.

Module

Run npm install algorithmx. AlgorithmX is written in TypeScript, and comes with complete type definitions.

To import the library in in a TypeScript or ES6 JavaScript project:

import{createCanvas}from'algorithmx';

Example Usage

// select a div with id 'output' for rendering the networkconstcanvas=createCanvas('output');// add three blue nodescanvas.nodes(['A','B','C']).add().color('blue');// add an edgecanvas.edge(['A','C']).add();// pause for half a secondcanvas.pause(0.5);// temporarily make node 'B' 1.5 times as largecanvas.node('B').highlight().size('1.5x');

About

An event-driven library for network visualization and algorithm simulation.

Topics

Resources

Stars

27 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages