Sin descripción

skyffire 272634c8b5 electron打包的部分终于好了…… hace 1 año
example 272634c8b5 electron打包的部分终于好了…… hace 1 año
src 64471f67eb 测试数据的调整。 hace 1 año
types c8b58364d1 修复数据延迟问题 hace 1 año
.editorconfig 48ce3e12ac init create-react-library@3.1.1 hace 5 años
.eslintignore 48ce3e12ac init create-react-library@3.1.1 hace 5 años
.eslintrc 48ce3e12ac init create-react-library@3.1.1 hace 5 años
.gitignore a13696a199 bids和asks颜色改成一样 hace 1 año
.npmignore fd8f88d4d6 Add few more metrics to X axis and corner. hace 5 años
.prettierrc 48ce3e12ac init create-react-library@3.1.1 hace 5 años
.travis.yml 48ce3e12ac init create-react-library@3.1.1 hace 5 años
README.md 39d72095dd Update Readme and documentation. hace 5 años
package-lock.json ceaa12a374 一个将就可以用的版本。 hace 1 año
package.json 272634c8b5 electron打包的部分终于好了…… hace 1 año
run.bat dd77d94938 Add required packages and add a script to run dev. hace 5 años
screenshot.png 39d72095dd Update Readme and documentation. hace 5 años

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