Giter VIP home page Giter VIP logo

metrics-graphics's Introduction

BundlePhobia CodeClimate Netlify Status

MetricsGraphics is a library built for visualizing and laying out time-series data. At around 15kB (gzipped), it provides a simple way to produce common types of graphics in a principled and consistent way. The library currently supports line charts, scatterplots and histograms, as well as features like rug plots.

Example

All you need to do is add an entry node to your document:

<div id="chart"></div>

Then, use the id to mount the chart:

import LineChart from 'metrics-graphics'

new LineChart({
  data, // some array of data objects
  width: 600,
  height: 200,
  target: '#chart',
  area: true,
  xAccessor: 'date',
  yAccessor: 'value'
})

That's it!

Sample Screenshot

The raw data for this example can be found here

Documentation

If you want to use MetricsGraphics, you can find the public API here.

If you want to extend MetricsGraphics, you can read up on the components and utilities.

Development Setup

This project uses Lerna. Installing it globally helps a lot (npm i -g lerna).

# clone and setup
git clone https://github.com/metricsgraphics/metrics-graphics
cd metrics-graphics
lerna bootstrap

Run both the development setup of the library and the development setup of the examples

# inside packages/lib
npm run dev

# inside packages/examples
npm run dev

metrics-graphics's People

Contributors

almossawi avatar beardicus avatar benwiley4000 avatar blazkovicz avatar brab avatar cf avatar clarkbw avatar cnwangjie avatar dandehavilland avatar dstaley avatar ezekiel-da avatar frewsxcv avatar garrypolley avatar hamilton avatar himanish-star avatar jens-ox avatar matiassingers avatar mikaelbr avatar mreid-moz avatar pcl avatar renovate[bot] avatar rfk avatar sebholstein avatar shikhar-scs avatar t2k avatar tchanders avatar thomaschampagne avatar tlatorre-uchicago avatar uberi avatar wlach 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.