GithubHelp home page GithubHelp logo

sweetymeow / streamgraph.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jsundram/streamgraph.js

0.0 2.0 0.0 1.7 MB

Home Page: http://runningwithdata.com/post/566345323/streamgraph-js

HTML 7.51% JavaScript 91.32% CSS 1.17%

streamgraph.js's Introduction

Streamgraph.js is a port of Lee Byron and Martin Wattenberg's streamgraph_generator (http://github.com/leebyron/streamgraph_generator) to javascript and processing.js. The paper "Stacked Graphs -- Geometry & Aesthetics" by Byron &  Wattenberg is useful to consult.

I've added the following features (which can be turned off or ignored):
 * Dynamic Sizing
 * Legend
 * Settings (Dynamically changeable Layout, Colors, etc.)
 * Zoom (Drag to select an area, ESC to zoom out)
 * Hover (Highlights the layer under the mouse, presents the layer name and relevant data at the top of the screen)
 * New Color Option, NiceRandom (a bit more variation)
 * Real examples (showing how to use).
 
Known issues:
 * The examples don't work locally using Chrome on Mac. 
 
How to use:
 Consult any of the examples. Basically, you need to:
 * Create a javascript file that implements getStreamgraphData() and getStreamgraphLabels.
 * Optionally, you can add getStreamgraphSettings() if you wish to modify the default settings.
 * Your getStreamgraphData() needs to return a 2D array, where each column contains a series, and each row conains a time-slice.
 * There should be the same number of labels as columns.
 * Create an html file that includes processing.js, streamgraph.js, streamgraph.settings.js and your javascript file. 
 * Place a canvas tag with its datasource set to streamgraph.pjs. Alternatively, use jquery, as described here: http://processingjs.org/source/ajax-init/index.html

streamgraph.js's People

Contributors

jsundram avatar

Watchers

James Cloos avatar Wendy 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.