Handle yrange not set on view vase for vlm fsp plot

log_linearized_curve_overlays
Tyler Goodlet 2023-03-01 17:35:07 -05:00
parent f7dfe57090
commit eea850450a
1 changed files with 7 additions and 1 deletions

View File

@ -853,7 +853,12 @@ def graphics_update_cycle(
vlm_vizs = vlm_chart._vizs vlm_vizs = vlm_chart._vizs
main_vlm_viz = vlm_vizs['volume'] main_vlm_viz = vlm_vizs['volume']
main_vlm_vb = main_vlm_viz.plot.vb main_vlm_vb = main_vlm_viz.plot.vb
(_, vlm_ymx) = vlm_yrange = main_vlm_vb._yrange
# TODO: we should probably read this
# from the `Viz.vs: ViewState`!
vlm_yr = main_vlm_vb._yrange
if vlm_yr:
(_, vlm_ymx) = vlm_yrange = vlm_yr
# always update y-label # always update y-label
ds.vlm_sticky.update_from_data( ds.vlm_sticky.update_from_data(
@ -892,6 +897,7 @@ def graphics_update_cycle(
if ( if (
mx_vlm_in_view mx_vlm_in_view
and vlm_yr
and mx_vlm_in_view != vlm_ymx and mx_vlm_in_view != vlm_ymx
): ):
# in this case we want to scale all overlays in the # in this case we want to scale all overlays in the