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

@nightingale-elements/nightingale-heatmap

Package Overview
Dependencies
Maintainers
0
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nightingale-elements/nightingale-heatmap

[![Published on NPM](https://img.shields.io/npm/v/@nightingale-elements/nightingale-heatmap.svg)](https://www.npmjs.com/package/@nightingale-elements/nightingale-heatmap)

  • 5.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

nightingale-heatmap

Published on NPM

Nightingale Heatmap component is used to generate a heatmap visualisation.

Usage

The below example is using residues contacts data based on the distance.

<nightingale-heatmap
  id="heatmap"
  width="400"
  height="400"
  bottom-color="black"
  top-color="white"
  margin-left="50"
  margin-bottom="50"
  symmetric
></nightingale-heatmap>

API Reference

Properties

symmetric: boolean (default: false)

It supports symmetric matrix.

top-color: string (default: 'yellow')

The heatmap can interpolate colors from the bottom value (0.0) to its top (1.0). This attribute defines the color to paint the top (1.0) value.

It follows the web standard defined in https://developer.mozilla.org/en-US/docs/Web/CSS/color_value

bottom-color: string (default: "darkblue")

The heatmap can interpolate colors from the bottom value (0.0) to its top (1.0). This attribute defines the color to paint the bottom (0.0) value.

It follows the web standard defined in https://developer.mozilla.org/en-US/docs/Web/CSS/color_value

x-label: string (default: "Residue")

Label to the legend in the X axix

y-label: string (default: "Residue")

Label to the legend in the X axix

Properties

data: Array

The data array is of the HeatmapData structure.

type HeatmapData = Array<
  [
    number, //   X coordinate starting on 1
    number, //   Y coordinate starting on 1
    number, //    Value in that position. Between 0 and 1
  ]
>;

For instance:

[
  [1, 1, 0.2],
  [1, 2, 0.8],
  [2, 2, 0.5],
];

Events

change

Is dispatched when hovering over a point in the heatmap.

The detail of the event is a HeatmapPoint:

type HeatmapPoint = {
  xPoint: number;
  yPoint: number;
  value: number | null;
};

Usage example:

heatmapElement.addEventListener("change", (evt) => {
  console.log(evt.detail);
});

Keywords

FAQs

Package last updated on 23 Dec 2024

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