Socket
Socket
Sign inDemoInstall

nodelegend

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    nodelegend

Creates dat.gui legend to change ngraph.pixel nodes.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
5.37 kB
Created
Weekly downloads
 

Readme

Source

nodelegend

Creates dat.gui legend to change ngraph.pixel nodes.

usage

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

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(node) {
    return node.id <= 50;
  }
}, {
  name: 'Second',
  color: 0x00ff00,
  filter: function(node) {
    return node.id > 50;
  }
}]);

install

With npm do:

npm install nodelegend

acknowledgement

Thanks for the awesome ngraph library by @anvaka!

license

MIT

Keywords

FAQs

Last updated on 15 Sep 2015

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc