All Projects → arunghosh → react-heatmap-grid

arunghosh / react-heatmap-grid

Licence: MIT License
A react component for heatmap visualisation in grid layout

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to react-heatmap-grid

morpheus.js
JavaScript matrix visualization and analysis
Stars: ✭ 51 (-15%)
Mutual labels:  heatmap
Multi-Person-Pose-using-Body-Parts
No description or website provided.
Stars: ✭ 41 (-31.67%)
Mutual labels:  heatmap
Strava-Analysis-Tool
A Python tool to analyze and display Strava activity data.
Stars: ✭ 32 (-46.67%)
Mutual labels:  heatmap
simple-d3-heatmap
A javascript module to create heatmap calendars
Stars: ✭ 24 (-60%)
Mutual labels:  heatmap
GPXtoHeatmap
Allows users to convert a collection of GPX files into a heatmap
Stars: ✭ 18 (-70%)
Mutual labels:  heatmap
chessalyzer.js
A JavaScript library for batch analyzing chess games
Stars: ✭ 14 (-76.67%)
Mutual labels:  heatmap
flutter heatmap calendar
A Heatmap Calendar based on Github's contributions chart
Stars: ✭ 47 (-21.67%)
Mutual labels:  heatmap
visium-clustergrammer2
Spatial Transcriptomics Dashboard
Stars: ✭ 24 (-60%)
Mutual labels:  heatmap
QHeatMap
Generate Heat map in Qt.
Stars: ✭ 72 (+20%)
Mutual labels:  heatmap
COVID-CXNet
COVID-CXNet: Diagnosing COVID-19 in Frontal Chest X-ray Images using Deep Learning. Preprint available on arXiv: https://arxiv.org/abs/2006.13807
Stars: ✭ 48 (-20%)
Mutual labels:  heatmap
catheat
Plot categorical heatmaps with seaborn
Stars: ✭ 17 (-71.67%)
Mutual labels:  heatmap
PhyloProfile
A phylogenetic profile analysis tool
Stars: ✭ 24 (-60%)
Mutual labels:  heatmap
COA
Openstack Foundation Openstack Certified Administrator exam Preparation
Stars: ✭ 41 (-31.67%)
Mutual labels:  heatmap
reactjs-calendar-heatmap
React component for d3.js calendar heatmap graph
Stars: ✭ 128 (+113.33%)
Mutual labels:  heatmap
monthly-returns-heatmap
Python Monthly Returns Heatmap (DEPRECATED! Use QuantStats instead)
Stars: ✭ 23 (-61.67%)
Mutual labels:  heatmap
visual-heatmap
Open source javascript module for high performance, large scale heatmap rendering.
Stars: ✭ 21 (-65%)
Mutual labels:  heatmap
there-are-lots-of-people-in-Baiyun-airport
挑战杯 - 广州白云机场人流量时空分布预测系统 - 前端
Stars: ✭ 14 (-76.67%)
Mutual labels:  heatmap
leaflet heatmap
简单的可视化湖州通话数据 假设数据量很大,没法用浏览器直接绘制热力图,把绘制热力图这一步骤放到线下计算分析。使用Apache Spark并行计算数据之后,再使用Apache Spark绘制热力图,然后用leafletjs加载OpenStreetMap图层和热力图图层,以达到良好的交互效果。现在使用Apache Spark实现绘制,可能是Apache Spark不擅长这方面的计算或者是我没有设计好算法,并行计算的速度比不上单机计算。Apache Spark绘制热力图和计算代码在这 https://github.com/yuanzhaokang/ParallelizeHeatmap.git .
Stars: ✭ 13 (-78.33%)
Mutual labels:  heatmap
calour
exploratory and interactive microbiome analyses based on heatmaps
Stars: ✭ 22 (-63.33%)
Mutual labels:  heatmap
hotmap
WebGL Heatmap Viewer for Big Data and Bioinformatics
Stars: ✭ 13 (-78.33%)
Mutual labels:  heatmap

react-heatmap-grid

Created a new version of this having smaller size and a better interface. Check it out.

Build Status

A React component for heatmap in grid layout using div.

Live example here.

Screenshot

Installation

yarn add react-heatmap-grid

or

npm install react-heatmap-grid --save

Usage

Mandatory fields

Name Type Sample
xLabels Array of string ['1am', '2am', '3am']
yLabels Array of string ['Sun', 'Mon']
data 2D Array of numbers having yLabels.length rows and xLabels.length rows [[2,3,5][5,6,9]]
const xLabels = new Array(24).fill(0).map((_, i) => `${i}`);
const yLabels = ["Sun", "Mon", "Tue"];
const data = new Array(yLabels.length)
  .fill(0)
  .map(() =>
    new Array(xLabels.length).fill(0).map(() => Math.floor(Math.random() * 100))
  );

ReactDOM.render(
  <HeatMap xLabels={xLabels} yLabels={yLabels} data={data} />,
  document.getElementById("app")
);

Configuration

Name Type Description Default Value
background string The base color for the heatmap "#329fff"
height number Height of each cell of the heatmap in px 30
onClick function Adds an handler to cell click undefined
squares boolean If set to true will render cells as square false
xLabelWidth number Width of the x label area in pixel 60
yLabelWidth number Width of the y label area in pixel 40
yLabelTextAlign string Text alignment of the yLabels "right"
xLabelsLocation string Location of y labels. It can be top or bottom "top"
xLabelsVisibility [boolean] Array of bool conveying which x labels to display. For ex: [true, false, true, false] means the 1st and the 3rd labels will be displayed and the 2nd and 4th will be hidden
unit string Unit to display next to the value on hover
cellRender function Render custom content in cell () => null
cellStyle function To set custom cell style. It is useful for using own colour scheme
title function To render custom title in each cell ${value} ${unit}

Example

const xLabels = new Array(24).fill(0).map((_, i) => `${i}`);

// Display only even labels
const xLabelsVisibility = new Array(24)
  .fill(0)
  .map((_, i) => (i % 2 === 0 ? true : false));

const yLabels = ["Sun", "Mon", "Tue"];
const data = new Array(yLabels.length)
  .fill(0)
  .map(() =>
    new Array(xLabels.length).fill(0).map(() => Math.floor(Math.random() * 100))
  );

ReactDOM.render(
  <HeatMap
    xLabels={xLabels}
    yLabels={yLabels}
    xLabelsLocation={"bottom"}
    xLabelsVisibility={xLabelsVisibility}
    xLabelWidth={50}
    data={data}
    squares
    onClick={(x, y) => alert(`Clicked ${x}, ${y}`)}
    cellStyle={(background, value, min, max, data, x, y) => ({
      background: `rgba(66, 86, 244, ${1 - (max - value) / (max - min)})`,
      fontSize: "11px",
    })}
    cellRender={(value) => value && `${value}%`}
    title={(value, unit) => `${value}`}
  />,
  document.getElementById("app")
);

For developers

New build

npm run build

Run dev server

npm run dev

Run test

npm run test

Buy Me A Coffee

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].