g1eb / reactjs-calendar-heatmap

React component for d3.js calendar heatmap graph
https://rawgit.com/g1eb/reactjs-calendar-heatmap/master/
MIT License
151 stars 35 forks source link

Getting a summary.length error and trouble displaying data in year mode #16

Closed SoerenToennesen closed 3 years ago

SoerenToennesen commented 3 years ago

Hello,

While running my webapplication, it works initially. When clicking about, I run into the error below: image

Also, I cannot see data displayed when showcasing the year (much like the other issue posted half a year ago).

This is how my code looks like: image

I'm a bit new to React, so it might be a stupid problem on my end, but I can't seem to debug it. If you want to attempt to recreate the issue, the repo is here: https://github.com/SoerenToennesen/Website where I the calendar heat map is created under CalendarHeatMap.js

There is also another error, which I'm not sure why is created, as seen in the gif provided below (year_label.year is not a function). ezgif com-gif-maker

g1eb commented 3 years ago

Thanks for the detailed bug report! I'll check it out later today and get back to you

g1eb commented 3 years ago

Hands down best error report I've ever seen hah, I was able to reproduce your issue and I believe it has to do with d3 and moment versions used, if you set the specific versions in your package.json the example works

    "d3": "4.11.0",
    "moment": "2.19.1",

PS. I should probably make these dependency versions explicit in the original project so that it would install the correct version next time.

SoerenToennesen commented 3 years ago

Thank you for the fast reply and solutions - I'll change the versions then! :)