Drop the unit-volume chart once $vlm is fully drawn

big_data_lines
Tyler Goodlet 2022-04-04 14:45:29 -04:00
parent 27e3d0ef80
commit 082b02776c
1 changed files with 11 additions and 9 deletions

View File

@ -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.