react-simple-chart
TypeScript icon, indicating that this package has built-in type declarations

1.0.14 • Public • Published

welcome to react-simple-chart

Install

npm install react-simple-chart

or

yarn add react-simple-chart

Usage

import ReactSimpleChart from "react-simple-chart";
 
const App = () => {
  return (
    <ReactSimpleChart
      x={[
        "jan",
        "feb",
        "mar",
        "apr",
        "may",
        "jun",
        "jul",
        "aug",
        "sep",
        "oct",
        "nov",
        "dec",
      ]}
      datas={[
        {
          label: "sell",
          value: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120],
          color: "blue",
        },
        {
          label: "buy",
          value: [120, 110, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10],
          color: "red",
        },
      ]}
      yRange={20} //default 10
    />
  );
};
props type default
x any[] require
datas { label: string; color: string; value: number[] } require
yRange custumizing y value range 10

Package Sidebar

Install

npm i react-simple-chart

Weekly Downloads

0

Version

1.0.14

License

MIT

Unpacked Size

53.4 kB

Total Files

10

Last publish

Collaborators

  • moowoon