1.0.1 • Published 3 years ago
line-chart-react v1.0.1
react-line-chart
Made with create-react-library
Install
npm install --save line-chart-react
Usage
import React from 'react'
import Chart from 'line-chart-react'
import 'line-chart-react/dist/index.css'
const App = () => {
var numbers = [11.56, 11.60, 11.67, 11.55, 11.77, 11.88, 11.97, 12.03, 11.96, 12.10]
return <Chart numbers={numbers}
points={78}
lineWidth={1} />
}
export default App
Props
Property | Type | Default | Description |
---|---|---|---|
numbers | list of numbers | None | The points to be used in the line chart. |
width | number | 800 | The width of the chart. |
height | number | 350 | The height of the chart. |
points | number | None | The number of points to account for (if blank, chart fills width). |
lineWidth | number | 1 | The width of the line. |
color | string | "#000000" | The color of the line. |
License
MIT © crnorthc