I'm making use of the calendar heatmap chart, but i'm getting unexpected null dates for a month outside of the filter.

How to reproduce the bug

  1. create heatmap calendar
  2. set filter to 2021-05-01 minus two months (see underneath) Apache Superset Calendar Heatmap - Shows unexpected null dates

Expected results

Apache Superset Calendar Heatmap - Shows unexpected null dates

Actual results

But as can be seen on the image underneath, we have a full month with null values Apache Superset Calendar Heatmap - Shows unexpected null dates

Checklist

  • [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [x] I have reproduced the issue with at least the latest released version of superset.
  • [x] I have checked the issue tracker for the same issue and I haven't found one similar.

Comment From: Shazad-khan

Apache Superset Calendar Heatmap - Shows unexpected null dates

It is working as expected please recheck the issue and close this bug

Comment From: rusackas

Can anyone confirm if this is still an issue in 3.x?

Comment From: vankeer

I just stumbled upon this when installing & using the latest version from master. This is still an issue.

It is working as expected please recheck the issue and close this bug

You have to enable "Show values" under the "Customize" tab.

Comment From: sra

This is happening for us in 4.0.2

Comment From: rusackas

Yep, this is still real... probably just not the biggest bug and/or not our most highly used chart. I'd encourage anyone to take a look and open a PR if they can solve it!

Comment From: CoolDude937

@rusackas hello, I see this is still an issue and I have managed to replicate the issue, although it appears to be slightly different. The month of null values appears to be February 2021 on my end, as opposed to May 2021 in this issue.

Image

I attempted replication on the latest version using the quickstart for Superset, and also the Docker image for version 4.0.2, mentioned to also have this issue. Both times, the “null month” was February 2021.

Regardless, the general problem seems to persist. Me and a group of others would like to attempt this issue over the next couple of weeks. I hope that is fine with you. Thanks.

Comment From: Bunbunw

Hi everyone, I am together with CoolDude937. We tried to figure out why an extra “null” month that is outside of the selected time range is displayed. We suspect that this issue is occurring due to fixed timezone offset variable stdTimezoneOffset in superset-frontend/plugins/legacy-plugin-chart-calendar/src/vendor/cal-heatmap.js, which shifts all timestamps by a fixed value without the consideration of the user's browser timezone offset and DST (Daylight Saving Time) together correctly. E.g. if your timezone is EST, then its UTC-05:00, because of summer daylight saving time in north america, we have UTC-04:00, which matches our observation where if it's after 4am of the first day of the month, the rendering is correct. Our intended solution would be to fix the current timezone offset by making sure that the correct value is added to each timestamp with consideration of timezone differences and DST, that way it's minimal and doesn't touch other components. We would also fix more problems related to calendar heatmap if we are done with this issue. We would like to ask for any feedback or advice regarding our intended solution if possible, thanks!