Set zeros for `Flow.maxmin() -> None` results

mxmn_from_m4
Tyler Goodlet 2022-06-27 18:22:30 -04:00
parent a425c29ef1
commit c620517543
1 changed files with 6 additions and 1 deletions

View File

@ -1292,11 +1292,16 @@ class ChartPlotWidget(pg.PlotWidget):
key = round(lbar), round(rbar) key = round(lbar), round(rbar)
res = flow.maxmin(*key) res = flow.maxmin(*key)
if res == (None, None):
if (
res is None or
res == (None, None)
):
log.error( log.error(
f"{flow_key} no mxmn for bars_range => {key} !?" f"{flow_key} no mxmn for bars_range => {key} !?"
) )
res = 0, 0 res = 0, 0
profiler(f'yrange mxmn: {key} -> {res}') profiler(f'yrange mxmn: {key} -> {res}')
# print(f'{flow_key} yrange mxmn: {key} -> {res}')
return res return res