https://github.com/metricsgraphics/metrics-graphics
A library optimized for concise and principled data graphics and layouts.
https://github.com/metricsgraphics/metrics-graphics
Last synced: about 2 months ago
JSON representation
A library optimized for concise and principled data graphics and layouts.
- Host: GitHub
- URL: https://github.com/metricsgraphics/metrics-graphics
- Owner: metricsgraphics
- Created: 2014-05-01T18:25:52.000Z (over 12 years ago)
- Default Branch: main
- Last Pushed: 2022-05-31T15:05:59.000Z (over 4 years ago)
- Last Synced: 2026-10-17T06:40:03.222Z (about 2 months ago)
- Language: TypeScript
- Homepage: http://metricsgraphicsjs.org
- Size: 8.13 MB
- Stars: 7,393
- Watchers: 186
- Forks: 460
- Open Issues: 131
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-starred - metricsgraphics/metrics-graphics - A library optimized for concise and principled data graphics and layouts. (others)
- awesome-d3 - metrics-graphics - Optimized for visualizing time-series data \[line, scatter, area\] (Charts)
- awesome-javascript - metrics-graphics - A library optimized for concise and principled data graphics and layouts. (Data Visualization)
- starred-awesome - metrics-graphics - A library optimized for concise and principled data graphics and layouts. (JavaScript)
- awesome-frontend - Metric-Graphics - 用于可视化和布局时间序列数据。它相对较小(80kb),提供了小而优雅的线条图、散点图、直方图、柱状图和数据表,以及地格图(rug plot)和基本线性回归等特性 (数据可视化库)
- awesome-d3 - metrics-graphics - Optimized for visualizing time-series data \[line, scatter, area\] (Charts)
- awesome-d3 - metrics-graphics - Optimized for visualizing time-series data \[line, scatter, area\] (Charts)
- Github-Ultimate-Repos - metricsgraphics/metrics-graphics - | ⭐ 7,392★ | 🍴 460 | 💻 `TypeScript`🔗 <https://github.com/metricsgraphics/metrics-graphics>📝 A library optimized for concise and principled data graphics and layouts.⚙️ `Push/pull metric ingestion -> Gorilla double-delta timestamp & XOR float compression -> in-memory Head chunking -> immutable TSDB block compaction & PromQL evaluation.` (📜 Master Categorized Repository Directory (100% Clickable Links) / [41] OBSERVABILITY, APM TELEMETRY, METRICS, DISTRIBUTED TRACING & LOGGING)
- awesome-side-quests - metricsgraphics/metrics-graphics - ⚠️ STALE — D3-based library for clean, principled data graphics — opinionated simplicity for time-series and scatter plots (Stale / JS Libraries & Utilities)
README
[](https://metricsgraphicsjs.org)
[](https://bundlephobia.com/result?p=mg2) [](https://codeclimate.com/github/jens-ox/metrics-graphics/maintainability) [](https://app.netlify.com/sites/affectionate-benz-6e3cf9/deploys)
*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:
```html
```
Then, use the id to mount the chart:
```js
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](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](https://classic.yarnpkg.com/lang/en/docs/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
```