Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-grid-heatmapjs

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-grid-heatmapjs

React for the user interface, Tailwind CSS for styling, and CSS Grid for layout. A heatmap is a data visualization technique that uses color to represent the magnitude of values within a two-dimensional grid or matrix.

  • 0.9.9
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

react-heatmapjs

React for the user interface, Tailwind CSS for styling, and CSS Grid for layout. A heatmap is a data visualization technique that uses color to represent the magnitude of values within a two-dimensional grid or matrix.

Properties

NameTypeDescription
title (optional)stringTitle for Heatmap Heading
colorRange{
from: number,
to: number,
color: string,
name:string
}[]
from: The lowest value in the range.,
to: The highest value in the range.,
color: The color of cells that fall within the range, specified in hexadecimal format.,
name: The name of the range, which will appear in the legend.
series{
name: string,
data: number[],
total?: number[]
}[]
name: becomes the y-axis label
data: values
total: To display the total of row data on the right side of the heatmap along the Y-axis..
xaxis{
labels: string[],
totals?: number[]
}
labels: label property becomes the label for the x-axis
totals: To display the total of column data beneath the label.

Examples

const data = {
  title: "Dummy Heat Map",
  colorRange: [
    {
      from: 0,
      to: 30,
      color: "#4074b3",
      name: "Cold",
    },
    {
      from: 30,
      to: 60,
      color: "#ffc039",
      name: "Hot",
    },
  ],
  series: [
    {
      name: "Series 1",
      data: [10, 5, 50, 2, 25],
      total: 150,
    },
    {
      name: "Series 2",
      data: [1, 12, 50, 11, 18],
      total: 125,
    },
    {
      name: "Series 3",
      data: [3, 7, 17, 50, 14],
      total: 175,
    },
  ],
  xaxis: {
    labels: ["Label 1", "Label 2", "Label 3", "Label 4", "Label 5"],
    totals: [30, 60, 90, 120, 150],
  },
};

The data above will produce this heatmap.

image

For developers

Getting the Source Code

Clone this package:

git clone https://github.com/hex909/react-heatmapjs.git

Installing Dependencies

Navigate to the package's root directory and install the required dependencies:

cd react-heatmapjs
npm install

To test this Package locally, you can use npm link to create a symbolic link between your local development directory and your application. Follow these steps:

  1. Navigate to the root directory of this Package project.
  2. Run the following command to build the package:
npm run build
  1. Run the following command to create a global link for your package:
npm link
  1. Navigate to the directory of your application where you want to test the local package.
  2. Run the following command to link this Package to your application:
npm link react-heatmapjs

Keywords

FAQs

Package last updated on 22 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc