@apestaartje/graph
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

Graph

Simple class that can plot on a graph.

Usage

const graph = new Graph({
    height: 600,
    width: 600
});

graph
    .drawGrid(50, 50)
    .drawXAxis()
    .drawYAxis()
    .drawYLabels(50)
    .drawXLabels(100)
    .plot([
        {x: 0, y: 0},
        {x: 120, y: 30},
        {x: 320, y: 300}
    ]);

graph.render(document.querySelector('body'));

Readme

Keywords

Package Sidebar

Install

npm i @apestaartje/graph

Weekly Downloads

2

Version

1.2.2

License

MIT

Unpacked Size

9.45 kB

Total Files

16

Last publish

Collaborators

  • joppe