etr2460 commented on a change in pull request #13802:
URL: https://github.com/apache/superset/pull/13802#discussion_r602819383



##########
File path: superset/viz.py
##########
@@ -1263,17 +1263,17 @@ def to_series(
                     series_title = series_title + (title_suffix,)
 
             values = []
-            non_nan_cnt = 0
+            non_value_cnt = 0
             for ds in df.index:
                 if ds in ys:
                     d = {"x": ds, "y": ys[ds]}
-                    if not np.isnan(ys[ds]):
-                        non_nan_cnt += 1
+                    if not np.isnan(ys[ds]) and ys[ds] != 0:
+                        non_value_cnt += 1

Review comment:
       yeah, i noticed this too and thought the code was pretty janky. I think 
i can clean it up even more, regardless of what the proper approach is for this 
PR




-- 
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