You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/02/19 11:24:07 UTC

[GitHub] [superset] maloun96 commented on a change in pull request #13233: fix: calendar heatmap granularity

maloun96 commented on a change in pull request #13233:
URL: https://github.com/apache/superset/pull/13233#discussion_r579114824



##########
File path: superset/viz.py
##########
@@ -1031,7 +1030,7 @@ def get_data(self, df: pd.DataFrame) -> VizData:
         diff_secs = (end - start).total_seconds()
 
         if domain == "year":
-            range_ = diff_delta.years + 1
+            range_ = end.year - start.year + 1

Review comment:
       Here for example I have 2 dates: 2020-08-01 and 2021-01-01 and the diff_delta.year will be "0" years and + 1 => range_ = 1 and will not display the data from "2021" year




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org