1.0.1 • Published 3 years ago

line-chart-react v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-line-chart

Made with create-react-library

NPM JavaScript Style Guide

Demo

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

PropertyTypeDefaultDescription
numberslist of numbersNoneThe points to be used in the line chart.
widthnumber800The width of the chart.
heightnumber350The height of the chart.
pointsnumberNoneThe number of points to account for (if blank, chart fills width).
lineWidthnumber1The width of the line.
colorstring"#000000"The color of the line.

License

MIT © crnorthc

1.0.1

3 years ago

1.0.0

3 years ago