mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
filter out all nan series (#7313)
This commit is contained in:
parent
97718daea3
commit
7192d36513
@ -1112,16 +1112,22 @@ class NVD3TimeSeriesViz(NVD3Viz):
|
||||
series_title = series_title + (title_suffix,)
|
||||
|
||||
values = []
|
||||
non_nan_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
|
||||
else:
|
||||
d = {}
|
||||
values.append(d)
|
||||
|
||||
if non_nan_cnt == 0:
|
||||
continue
|
||||
|
||||
d = {
|
||||
'key': series_title,
|
||||
'values': values,
|
||||
|
Loading…
Reference in New Issue
Block a user