From 082b02776cdd283144669f68b749ee5174111c6d Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 4 Apr 2022 14:45:29 -0400 Subject: [PATCH] Drop the unit-volume chart once $vlm is fully drawn --- piker/ui/_fsp.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/piker/ui/_fsp.py b/piker/ui/_fsp.py index 5c656a2d..42017752 100644 --- a/piker/ui/_fsp.py +++ b/piker/ui/_fsp.py @@ -756,20 +756,14 @@ async def open_vlm_displays( 'dark_trade_rate', ] - # add custom auto range handler - dvlm_pi.vb._maxmin = partial( + group_mxmn = partial( maxmin, # keep both regular and dark vlm in view names=fields + dvlm_rate_fields, ) - # TODO: is there a way to "sync" the dual axes such that only - # one curve is needed? - # hide the original vlm curve since the $vlm one is now - # displayed and the curves are effectively the same minus - # liquidity events (well at least on low OHLC periods - 1s). - vlm_curve.hide() - chart.removeItem(vlm_curve) + # add custom auto range handler + dvlm_pi.vb._maxmin = group_mxmn # use slightly less light (then bracket) gray # for volume from "main exchange" and a more "bluey" @@ -837,6 +831,14 @@ async def open_vlm_displays( fr_shm, ) + # TODO: is there a way to "sync" the dual axes such that only + # one curve is needed? + # hide the original vlm curve since the $vlm one is now + # displayed and the curves are effectively the same minus + # liquidity events (well at least on low OHLC periods - 1s). + vlm_curve.hide() + chart.removeItem(vlm_curve) + # Trade rate overlay # XXX: requires an additional overlay for # a trades-per-period (time) y-range.