No Description

rongmz 39d72095dd Update Readme and documentation. 5 years ago
example 39d72095dd Update Readme and documentation. 5 years ago
src 39d72095dd Update Readme and documentation. 5 years ago
types 840eb397bf Add typescript type information. 5 years ago
.editorconfig 48ce3e12ac init create-react-library@3.1.1 5 years ago
.eslintignore 48ce3e12ac init create-react-library@3.1.1 5 years ago
.eslintrc 48ce3e12ac init create-react-library@3.1.1 5 years ago
.gitignore 48ce3e12ac init create-react-library@3.1.1 5 years ago
.prettierrc 48ce3e12ac init create-react-library@3.1.1 5 years ago
.travis.yml 48ce3e12ac init create-react-library@3.1.1 5 years ago
README.md 39d72095dd Update Readme and documentation. 5 years ago
package-lock.json 53da727271 Add sample data and prepare skeleton of component. 5 years ago
package.json 39d72095dd Update Readme and documentation. 5 years ago
run.bat dd77d94938 Add required packages and add a script to run dev. 5 years ago
screenshot.png 39d72095dd Update Readme and documentation. 5 years ago

README.md

@rongmz/react-stock-heatmap

This is a react chart library for genarating "Stock Heatmap" with given market depth data. Stock Heatmap graph useful for day traders.

NPM JavaScript Style Guide

Live Demo Here

Screenshot

Screenshot

Install

npm install --save @rongmz/react-stock-heatmap

Usage

import React from 'react'
import StockHeatmap from '@rongmz/react-stock-heatmap';

class Example extends React.Component {

  heatmapRef = React.createRef();

  loadDataFromFile = () => {
    // Somehow load market depth datapoints
    ...
    ...
    // set the data to StockHeatmap to render graph
    if(heatmapRef.current !== null) {
      heatmapRef.current.setData(data);
    }
  }

  onLiveDataReceived = (data) => {
    // Add more data to existing data. This is useful for live graphing.
    if(heatmapRef.current !== null) {
      heatmapRef.current.addData(data);
    }
  }

  render() {
    return <StockHeatmap ref={heatmapRef} width={800} height={600} />
  }

}

License

MIT © Rounak Saha