Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
react-easy-heatmap
Advanced tools
Made with create-react-library
npm install --save react-easy-heatmap
import React, { Component } from 'react'
import Heatmap from 'react-easy-heatmap'
import 'react-easy-heatmap/dist/index.css'
class Example extends Component {
render() {
return <Heatmap />
}
}
[xCoordinate: number, yCoordinate: number, value: number][]
type TPoint = {
x: number; // x coordinate or width
y: number; // y coordinate or height
}
type TMapFile = {
image: string; // img url
imgSize: TPoint
coordinate: {
x: TPoint; // left bottom point's coordinate
y: TPoint; // right top point's coordinate
}
}
type TheatmapConfig = {
opacity?: number; // default 100
radius?: number; // heatmap data point radius, default to 20
theme?: number; // default to 0
}
Function being called when slider config changed.
Usually used to save slider config.
type TonConfigChangeProp = TheatmapConfig
Function being called when heatmap scale change or be dragged.
Usually used to sync operations from multi-heatmaps
type TOnPositionChangeProp = {
scale: number
bgP: {
x: TPoint;
y: TPoint;
}
}
Used for i18n :)
type THeatmapLocale = {
opacity?: string;
radius?: string;
colorTheme?: string;
reset?: string;
zoomOut?: string;
zoomIn?: string;
setting?: string;
}
Event key bound in document, will cause heatmap resize when being triggered
type TDocumentResizeEventKey = string;
Used to sync operations from multi-heatmaps
type THandleSyncActionProp = {
scale: number
bgP: {
x: TPoint;
y: TPoint;
}
}
This is my first npm package :)
Please raise issues in github or email me iyoungliu@163.com if you have any questions :)
FAQs
An easy heatmap component with React
We found that react-easy-heatmap demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.