grubersjoe / react-activity-calendar

A flexible React component to display activity data in a calendar (heatmap).

Home Page:https://grubersjoe.github.io/react-activity-calendar/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow arbitrary number of levels

eschreiner opened this issue · comments

Hi there,

first of all, thank you for sharing this component.

I would like to use more than the 5 levels. Is that possible at all? The internal rendering of the blocks seems to account only for 5 different fills...

Thank you!

Hey. Good idea, like it :). There is no good reason that only five levels are supported and it should be easy to implement any amount. The number originates from earlier when this component was part of react-github-calendar that uses five levels like GitHub.

I've started a branch to work on it.

Added the maxLevel prop in react-activity-calendar@2.2.0. Check out the demo.

Hi Jonathan,

upgraded to 2.2.0 - works like a charm!

grafik

Thank you so much for the timely response.

Nice screenshot :). Glad that it works well for your use case!