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

@uiw/react-heat-map

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-heat-map

React component create calendar heatmap to visualize time series data, a la github contribution graph.

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7K
decreased by-44.01%
Maintainers
1
Weekly downloads
 
Created
Source

HeatMap 日历热图

Build & Deploy Issues Forks Stars Release npm version

React component create calendar heatmap to visualize time series data, a la github contribution graph.

Install

# Not dependent on uiw.
npm install @uiw/react-heat-map --save

Basic Usage

import ReactDOM from 'react-dom';
import HeatMap from '@uiw/react-heat-map';

const Demo = () => {
  const value = [
    { date: '2016/01/11', count:2, content:['一条消息来了!','一条消息来了!'] },
    { date: '2016/04/11', count:2, content:['一条消息来了!'] },
    { date: '2016/05/01', count:5, content:['需要显示的数据'] },
    { date: '2016/05/02', count:5, content:['空的没有消息'] },
    { date: '2016/05/04', count:11, content:['些放弃的人会这样想'] },
  ];
  return (
    <div>
      <HeatMap value={value} startDate={new Date('2016/01/01')} />
    </div>
  )
};
ReactDOM.render(<Demo />, _mount_);

Props

参数说明类型默认值
valueData to be displayed, requiredArray[]
rectSizeGrid sizenumber11
startDateStart dateDatenew Date()
endDateEnd dateDate-
spaceInterval between grid sizesnumber2
rectPropsGrid node attribute settingsReact.SVGProps<SVGRectElement>2
weekLablesWeek displaystring[]['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
monthLablesMonth displaystring[]['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
panelColorsBackgroud color of active colorsRecord<number, string>{ 0: '#EBEDF0', 8: '#7BC96F', 4: '#C6E48B', 12: '#239A3B', 32: '#196127' }
renderRectSingle block re-render() => React.ReactNode-

Development

development

Runs the project in development mode.

# Step 1, run first, listen to the component compile and output the .js file
# listen for compilation output type .d.ts file
npm run watch
# Step 2, development mode, listen to compile preview website instance
npm run start

production

Builds the app for production to the build folder.

npm run build

The build is minified and the filenames include the hashes. Your app is ready to be deployed!

License

Licensed under the MIT License.

Keywords

FAQs

Package last updated on 29 May 2021

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