Show unit vlm on LHS for now

vlm_plotz
Tyler Goodlet 2022-01-09 11:36:30 -05:00
parent 51f9511669
commit e93edc2acb
1 changed files with 59 additions and 58 deletions

View File

@ -120,7 +120,6 @@ def update_fsp_chart(
array,
array_key=array_key or graphics_name,
)
chart._set_yrange()
# XXX: re: ``array_key``: fsp func names must be unique meaning we
# can't have duplicates of the underlying data even if multiple
@ -400,13 +399,6 @@ async def maybe_open_vlm_display(
log.warning(f"{linked.symbol.key} does not seem to have volume info")
yield
return
else:
# shm, opened = maybe_mk_fsp_shm(
# linked.symbol.key,
# 'vlm',
# readonly=True,
# )
async with open_fsp_sidepane(
linked, {
@ -441,6 +433,10 @@ async def maybe_open_vlm_display(
style='step',
)
# show volume units value on LHS (for dinkus)
chart.hideAxis('right')
chart.showAxis('left')
# XXX: ONLY for sub-chart fsps, overlays have their
# data looked up from the chart's internal array set.
# TODO: we must get a data view api going STAT!!
@ -463,7 +459,7 @@ async def maybe_open_vlm_display(
)
# size view to data once at outset
chart._set_yrange()
chart.view._set_yrange()
yield chart
@ -494,7 +490,10 @@ async def run_fsp_ui(
async with (
# side UI for parameters/controls
open_fsp_sidepane(linkedsplits, {display_name: conf},) as sidepane,
open_fsp_sidepane(
linkedsplits,
{display_name: conf},
) as sidepane,
):
await started.wait()
profiler(f'fsp:{func_name} attached to fsp ctx-stream')
@ -511,6 +510,7 @@ async def run_fsp_ui(
data=shm.array,
overlay=True,
color='default_light',
array_key=func_name,
separate_axes=conf.get('separate_axes', False),
**conf.get('chart_kwargs', {})
)
@ -575,7 +575,7 @@ async def run_fsp_ui(
level_line(chart, 70, orient_v='bottom')
level_line(chart, 80, orient_v='top')
chart._set_yrange()
chart.view._set_yrange()
# done() # status updates
profiler(f'fsp:{func_name} starting update loop')
@ -669,7 +669,6 @@ async def start_fsp_displays(
},
'dolla_vlm': {
'func_name': 'dolla_vlm',
'zero_on_step': True,
'overlay': 'volume',
@ -701,8 +700,10 @@ async def start_fsp_displays(
trio.open_nursery(),
# TODO: fast startup of volume overlayed with $_vlm
maybe_open_vlm_display(linkedsplits, ohlcv),
maybe_open_vlm_display(
linkedsplits,
ohlcv,
),
)) as (admin, n, vlm_chart):