uiwjs / react-heat-map

A lightweight calendar heatmap react component built on SVG, customizable version of GitHub's contribution graph.
https://uiwjs.github.io/react-heat-map
MIT License
210 stars 25 forks source link

Start date as "Today" #130

Open shivam-880 opened 7 months ago

shivam-880 commented 7 months ago

image

How do we start the heatmap from the start date as today?

jaywcjlove commented 7 months ago

https://github.com/uiwjs/react-heat-map/blob/29f6a14cbc600efa0827946c5033c76f29c7d25b/core/src/SVG.tsx#L16

@iamsmkr You can try using the startDate props

shivam-880 commented 7 months ago

I already have tried that. It just doesn't show up as the last <rect> unfortunately. Seems like the contribution must always show up as a perfect rectangle. Which means startDate can't be the last/first date.

jaywcjlove commented 7 months ago

@iamsmkr I understand your idea. At the moment, I have more interesting things to do. If you submit a PR yourself, I will merge it. Thank you.