0.0.24 • Published 1 year ago

react-scatter-graph v0.0.24

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

React Scatter graph

A fully customizable ready to use scatter graph UI package for React. Try tweaking a vertical stepper using this codesandbox link here

Installation

npm install @keyvaluesystems/react-scatter-graph

You’ll need to install React separately since it isn't included in the package.

Usage

React Scatter Graph can run in a very basic mode like this:

import  React,  {  useState  }  from  'react';
import ReactScatterGraph from '@keyvaluesystems/react-scatter-graph';

function  App()  {  
  data = [
    { x: 450, y: 150 },
    { x: 360, y: 330 },
    { x: 650, y: 315 },
    { x: 270, y: 200}
  ];

  return (
    <ScatterGraph
      data={data}
      yMax={500}
      xMax={600}
      yInterval={50}
      xInterval={50}
      graphHeight={500}
    />
  );
}

export default App;

The data array is an array of objects with { x, y } cordinates.

Note: The graph width is resposive. So the it can be adjusted by paraent wrapper. Need to provide the height.

Props

Props that can be passed to the component are listed below:

0.0.24

1 year ago

0.0.23

1 year ago

0.0.22

1 year ago

0.0.21

1 year ago

0.0.20

1 year ago

0.0.19

1 year ago

0.0.18

1 year ago

0.0.17

1 year ago

0.0.16

1 year ago

0.0.15

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago