Animated cardiogram component for React
Inspired by and based on ecg-line-webcomponent package.
✨ Demo
npm i react-cardiogram
or
yarn add react-cardiogram
Name | Description | Optional | Default | Unit |
---|---|---|---|---|
height |
Canvas height | No | 100 |
px |
width |
Default canvas width. Not necessary to explicitly set as it auto-adjusts to a container width. | No | 500 |
px |
color |
Line color | No | #22ff22 |
HEX |
scale |
How much of canvas height the actual drawing takes | No | 35 |
% |
density |
Horizontal "resolution". i.e setting 2 will render 250 points for 500px-wide container | No | 2 |
px |
thickness |
Line thickness | No | 2 |
px |
cursorSize |
The size of cursor | No | 3 |
px |
paintInterval |
Time interval between drawing any two adjacent points. Eventually controls the cardiogram "speed". | No | 30 |
ms |
beatFrequency |
Draws a spike each number of ms when provided |
Yes | - | ms |
👤 Dmitriy Kudelko [email protected]
- Github: @dmitriy-kudelko
- LinkedIn: @dmitry-kudelko
Give a ⭐️ if this project helped you!
Copyright © 2021 Dmitriy Kudelko [email protected].
This project is MIT licensed.
This README was generated with ❤️ by readme-md-generator