Code Monkey home page Code Monkey logo

virtual-streamgraph's Introduction

virtual-streamgraph stability

npm version build status test coverage downloads js-standard-style

Create a virtual-dom streamgraph. Useful to visualize time series data.

example

Usage

const vgraph = require('virtual-streamgraph')
const vdom = require('virtual-dom')
const hyperx = require('hyperx')
const hx = hyperx(vdom.h)

const data = [
  { name: 'apples', values: [ { x: 1, y: 55 }, { x: 2, y: 65 }, { x: 3, y: 67 }] },
  { name: 'bananas', values: [ { x: 1, y: 55 }, { x: 2, y: 65 }, { x: 3, y: 67 }] },
  { name: 'cherries', values: [ { x: 1, y: 55 }, { x: 2, y: 65 }, { x: 3, y: 67 }] },
  { name: 'dates', values: [ { x: 1, y: 55 }, { x: 2, y: 65 }, { x: 3, y: 67 }] }
]

const tree = hx`
  <section className="my-graph">
    ${vgraph({ height: 500, width: 960, data: data })}
  </section>
`
console.log(vdom.create(tree).toString())

API

vgraph(opts)

Create a new virtual-streamgraph from data. Opts can contain the following fields:

  • opts.data: set data to be rendered
  • opts.width: set width dimension of the graph
  • opts.height: set height dimension of the graph
  • opts.min: optional, set lower bound for graph
  • opts.max: optional, set upper bound for graph
  • opts.limit: optional, limit amount of data points to be displayed

See Also

Installation

$ npm install virtual-streamgraph

License

MIT

virtual-streamgraph's People

Contributors

yoshuawuyts avatar chrisbuttery avatar

Stargazers

Cat  avatar Dmitry Iv. avatar Håvard Lundberg avatar Derek Reynolds avatar Jayson Harshbarger avatar Seth Vincent avatar Chris Hart avatar James Young avatar Liam Griffiths avatar timelyportfolio avatar Mark Sta Ana avatar  avatar Mikey avatar Jarrett Cruger avatar Hugh Kennedy avatar Athan avatar

Watchers

timelyportfolio avatar James Cloos avatar  avatar  avatar

Forkers

chrisbuttery

virtual-streamgraph's Issues

color option

a color range should be added based on a range; e.g. take a base color in hex -> create n colors between a lower and upper lighting bound based on the color

add labels

labels should be added on regions, toggleable though a boolean option

docs: styling

expose which classes can be targeted using css; use a sheetify example

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.