1.1.6 • Published 3 months ago

react-calendar-heatmap-chart v1.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

React Calendar Heatmap Chart

A simple and customizable calendar heatmap chart for React applications.

🚀 Installation

npm install react-calendar-heatmap-chart

Usage

import { HeatmapCalendarChart } from "react-calendar-heatmap-chart";

export default function Heatmap() {
  const data = [
    { date: "2025-01-06", net_profit_loss: -78 },
    { date: "2025-01-09", net_profit_loss: 79 },
    { date: "2025-01-27", net_profit_loss: -73 },
    { date: "2025-01-26", net_profit_loss: 82 },
    { date: "2025-01-08", net_profit_loss: 70 },
    { date: "2025-02-24", net_profit_loss: 58 },
    { date: "2025-02-08", net_profit_loss: -81 },
    { date: "2025-02-28", net_profit_loss: 16 },
    { date: "2025-02-04", net_profit_loss: 75 },
    { date: "2025-02-17", net_profit_loss: 15 },
  ];

  return <HeatmapCalendarChart data={data} displayDate={true} />;
}

Props

PropTypeDescription
dataArrayArray of objects containing date (YYYY-MM-DD) and net_profit_loss values.
displayDateBooleanIf true, the date will be displayed on hover.

📸 Outputs

Light Mode:

Alt Lightmode

Dark Mode:

Alt Darkmode

📜 License

This project is licensed under the MIT License.

Repository

GitHub Repository

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check issues and make pull requests.

1.1.6

3 months ago

1.1.5

4 months ago

1.1.4

4 months ago

1.1.3

4 months ago

1.1.2

4 months ago

1.1.1

4 months ago

1.1.0

4 months ago

1.0.0

4 months ago