Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/andreasarvidsson/openwebproject-graph-react

React component for owp.graph
https://github.com/andreasarvidsson/openwebproject-graph-react

Last synced: about 1 month ago
JSON representation

React component for owp.graph

Awesome Lists containing this project

README

        

# OpenWebProject Graph
React component for [owp.graph](https://github.com/AndreasArvidsson/OpenWebProject-Graph)

## Installation
`npm install owp.graph-react --save`

## Usage

```jsx
import Graph from "owp.graph-react";

const options = {
title: {
label: "Standard line plot with two data sets"
},
axes: {
x: {
"label": "Frequency (Hz)"
},
y: {
"label": "Amplitude (dB)"
}
},
graph: {
names: ["x", "Left", "Right"],
dataX: [
[100, 200, 400]
],
dataY: [
[1, 2, 3],
[1.5, 2.5, 3.5]
]
}
};

const style = {
width: 600,
height: 300
};

return
```

### Ref usage
```jsx

ref.get() => owp.graph instance
ref.container => div
```