🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

edgelegend

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edgelegend

Creates dat.gui legend to change ngraph.pixel edges

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

edgelegend

Creates dat.gui legend to change ngraph.pixel edges. Click here to see the demo of this plugin.

usage

var renderGraph = require('ngraph.pixel');
var createSetings = require('config.pixel');
var createLegend = require('edgelegend');

var renderer = renderGraph(graph);
var settings = createSettings(renderer);

// add a new group called "Groups", with two colors:
createLegend(settings, 'Groups', [{
  name: 'First',
  color: 0xff0000,
  filter: function(link) {
    return link.fromId <= 50;
  }
}, {
  name: 'Second',
  color: 0x00ff00,
  filter: function(link) {
    return link.fromId > 50;
  }
}]);

install

With npm do:

npm install edgelegend

license

MIT

Keywords

ngraph

FAQs

Package last updated on 09 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts