ktmud commented on a change in pull request #13802:
URL: https://github.com/apache/superset/pull/13802#discussion_r602618352
##########
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:
Instead of +1, we can probably change `non_value_cnt` to a boolean
`has_value` and skip the `np.isnan` check as long as `has_value == True`.
--
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]