Skip to content

Latest commit

 

History

History
59 lines (51 loc) · 1.14 KB

README.md

File metadata and controls

59 lines (51 loc) · 1.14 KB

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