Code Monkey home page Code Monkey logo

grapher's Introduction

Grapher Build Status

Draw network graphs using WebGL and Canvas backup.

Download

Installing

You can import grapher in a script tag, or build grapher into your application using Duo:

var Grapher = require('ayasdi/grapher');

Additional Modules

Need a specific feature? Create your own modules for Grapher! Here are some modules we've made:

  • center: Helpful functions for centering the graph.
  • palette: Set up custom palettes and set colors by palette indices.
  • target: Target a node or link, or find the nearest nodes and links.
  • zoom: Zoom adjusts Grapher's scale by ratio. Optionally target a point as the zoom center.

Examples

Here are a few examples:

  1. Simple
  2. Transforms
  3. Colors
  4. Drag
  5. Pan
  6. Force (using d3's force layout)

These examples can be also found in the examples folder.

Developing

Installing

Grapher uses Node.js. Install Node.js then run the following command:

npm install

This will install the development dependencies that Grapher uses to run its various tasks.

Building

To build Grapher, run make:

make

This will bundle modules/grapher.js with its dependencies and outputs the result to grapher.js and grapher-min.js in the build folder. This will also generate documentation files in the doc folder. If you want to avoid creating docs, run this instead:

make grapher.js

This will only build grapher.js and grapher-min.js.

Testing

Unit tests are run using Jasmine with this command:

make test

This will also make grapher.js. Test specs can be found in the spec folder.

Documentation

Documentation is generated from the make command when building.

make

If you need to generate docs into the gh-pages branch, you can use:

make gh-pages

This will create a new branch off gh-pages named gh-pages-$(commit) which will contain the build and docs generated from the current HEAD. Please make sure to commit or stash any changes before running this command.

License

Grapher.js may be freely distributed under the Apache 2.0 license.

grapher's People

Contributors

cixzhang avatar conorayasdi avatar dannycochran avatar dianasuvorova avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.