Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

metrics-graphics

> 编程语言
Open source

A library optimized for concise and principled data graphics and layouts.

7.4K stars0 likes1 views
WebsiteGitHub

About

A library optimized for concise and principled data graphics and layouts.

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:

xml

Then, use the id to mount the chart:

javascript
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!

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 Yarn Workspaces. Please make sure that Yarn is installed.

bash
# 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

bash
# inside packages/lib
yarn dev

# inside packages/examples
yarn dev

Issues· 131 open

View all issuesOpen on GitHub
  • #563

    Memory leak with data update

    bugUpdated Nov 16, 2022
  • #960

    Enable discussions tab on this repo

    Updated Nov 16, 2022
  • #909

    Need help

    Updated Nov 16, 2022
  • #912

    No Interactivity

    Updated Nov 16, 2022
  • #959

    Playground

    Updated Jun 8, 2022
  • #714

    Bar charts do not update their data plots

    Updated Jun 23, 2021
  • #942

    Weird 'turns' and discontinuous lines

    Updated Apr 3, 2021
  • #938

    Touch support

    Updated Nov 23, 2020
  • #807

    [META] We'd like to modernize the MG codebase

    enhancementcode qualityUpdated Jul 21, 2020
  • #899

    Respect custom elements on domain computation

    good first issueUpdated Apr 28, 2020

> Tags

TypeScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 2, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言