intuitive-line-graph

0.2.1 • Public • Published

React Intuitive Line Graph

React Intuitive Line Chart is a ReactJS library for showing line chart graph

Installation

Use the package manager [npm] to install React Intuitive Line Graph.

npm install intuitive-line-graph

Usage

import IntuitiveLineGraph from 'intuitive-line-graph';

function Example() {
  const source_labels = [
    'At Order Placed',
    'Sample Collected',
    'Sample Received in Lab',
    'Result Provisional',
    'Result Finalised'
  ];
  const source_datasets = [
    {
      name: 'IP',
      backgroundColor: '#8186D3',
      color: '#FFFFFF',
      lineColor: '#ff0000',
      data: [13, 19, null, 5, 2],
    },
    {
      name: 'OP',
      backgroundColor: '#DA76A0',
      color: '#FFFFFF',
      lineColor: '#ff0000',
      data: [10, 17, 1, 8, null],
    },
    {
      name: 'ER',
      backgroundColor: '#9CD6BB',
      color: '#FFFFFF',
      lineColor: '#ff0000',
      data: [null, null, null, null, 8],
    },
  ];

  return (
    <IntuitiveLineGraph
      labels={source_labels}
      dataset={source_datasets}
      chips_callback={(info) => console.log(info)}
    />
  );
}

export default Example;

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Package Sidebar

Install

npm i intuitive-line-graph

Weekly Downloads

14

Version

0.2.1

License

MIT

Unpacked Size

13.9 kB

Total Files

3

Last publish

Collaborators

  • mohamed-salman