Aucune description

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

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