Popularity
7.0
Stable
Activity
3.6
Stable
7,454
199
474

Description

A sample set of examples may be found on the examples page. The example below demonstrates how easy it is to produce a graphic. Our graphics function provides a robust layer of indirection, allowing one to more efficiently build, say, a dashboard of interactive graphics, each of which may be pulling data from a different data source. For the complete list of options, and for download instructions, take a look at the sections below.

Code Quality Rank: L5
Programming language: TypeScript
License: Mozilla Public License 2.0
Latest version: v3.0.0-beta1.2

metrics-graphics alternatives and similar libraries

Based on the "d3" category.
Alternatively, view metrics-graphics alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of metrics-graphics or a related project?

Add another 'd3' Library

README

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](.img/screenshot.png)

The raw data for this example can be found [here](packages/examples/src/assets/data/ufoSightings.js)

Documentation

If you want to use MetricsGraphics, you can find the public API [here](packages/lib/docs/API.md).

If you want to extend MetricsGraphics, you can read up on the [components](packages/lib/docs/Components.md) and [utilities](packages/lib/docs/Utility.md).

Development Setup

This project uses Yarn Workspaces. Please make sure that Yarn is installed.

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

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

# inside packages/lib
yarn dev

# inside packages/examples
yarn dev