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:
       For Domain Year 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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to