New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@types/simpleheat

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/simpleheat

TypeScript definitions for simpleheat

ts4.5
ts4.6
ts4.7
ts4.8
ts4.9
ts5.0
ts5.1
ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
ts6.0
latest
Source
npmnpm
Version
0.4.3
Version published
Weekly downloads
1.9K
-37.28%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/simpleheat

Summary

This package contains type definitions for simpleheat (https://github.com/mourner/simpleheat).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/simpleheat.

index.d.ts

declare namespace simpleheat {
    interface Instance {
        /**
         * Set heatmap data points
         *
         * @param points Array of data points containing 2D coordinates and intensity value (defaulted to 1)
         * @example [[0, 0, 1.0], [1, 0, 2.0], [1, 1, 0.5], ...]
         */
        data(points: Array<[number, number] | [number, number, number]>): this;

        /**
         * Set max data value
         *
         * @param maxValue Maximum data value (defaulted to 1)
         */
        max(maxValue: number): this;

        /**
         * Add a data point
         *
         * @param point Array of 2D coordinates and intensity value (defaulted to 1)
         */
        add(point: [number, number] | [number, number, number]): this;

        /**
         * Clear canvas data
         */
        clear(): this;

        /**
         * Set point radius and optional blur radius
         *
         * @param radius Radius (defaulted to 25)
         * @param blur Optional blur radius (defaulted to 15)
         */
        radius(r: number, blur?: number): this;

        /**
         * Update drawing, in case canvas size changed
         */
        resize(): this;

        /**
         * Set gradient colors as {<stop>: '<color>'}
         * Thresholds are between 0.0 and 1.0.
         *
         * @param gradient Thresholds with associated colors to generate the gradient
         * @example {
         *            0.4: 'blue',
         *            0.6: 'cyan',
         *            0.7: 'lime',
         *            0.8: 'yellow',
         *            1.0: 'red'
         *          }
         */
        gradient(gradient: { [key: number]: string }): this;

        /**
         * Draw the heatmap
         *
         * @param minOpacity Optional param to set the opacity of the heatmap (defaulted to 0.05)
         */
        draw(minOpacity?: number): this;
    }
    interface Static {
        new(canvas: HTMLCanvasElement): Instance;
        (canvas: HTMLCanvasElement): Instance;
    }
}

declare const simpleheat: simpleheat.Static;

export = simpleheat;
export as namespace simpleheat;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by Tristan de Guillebon.

FAQs

Package last updated on 07 Nov 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