项目作者: smoghal

项目描述 :
React component that uses HTML5 canvas to render a heat map chart
高级语言: JavaScript
项目地址: git://github.com/smoghal/react-heatmap.git
创建时间: 2019-07-21T23:38:50Z
项目社区:https://github.com/smoghal/react-heatmap

开源协议:

下载


Overview

This project contains an implementation of heatmap chart, modelled after HTML5 canvas based heatmaps, which was missing a react implementation.

The Heatmap component in this project uses the same core algorithm to paint heatmap on HTML5 canvas with slight modifications to work with React lifecycle methods.

Following screenshot shows the default heatmap view with sample data. data.js conatins the sample data in [x, y, occurances] format.

screenshot1

Limitations:

  • Heatmap underlying canvas is currently not responsive

Usage

Refer to component/app.js on basic usage.

Heatmap API

TBD

Setup Instructions

  • Update src/config_dev.js with your canvas dimensions.
  • Install node_modules dependencies using yarn
    • yarn install
  • Launch the application locally using Webpack Development Server (WDS).
    • yarn start
  • Alternatively, if in VSCode, launch the server using the Launch Webpack Development Server (WDS) in VSCode Debug view.
  • In order to distrubute the application (S3 for example):
    • yarn build
    • copy build.js, style/*, image/*, index.html to S3 static website

License

ISC