From f7c0ee930a87a7daec532737b2f4d07b45e0e675 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sun, 11 Sep 2022 17:33:22 -0400 Subject: [PATCH] Offset last (live) datum from y-axis by a 16th --- piker/ui/_display.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/piker/ui/_display.py b/piker/ui/_display.py index fa07a03c..3edf8b20 100644 --- a/piker/ui/_display.py +++ b/piker/ui/_display.py @@ -1060,10 +1060,14 @@ async def display_symbol_data( hist_linked.graphics_cycle() await trio.sleep(0) + + bars_in_mem = int(len(hist_ohlcv.array)) hist_chart.default_view( - bars_from_y=int(len(hist_ohlcv.array)), # size to data - y_offset=6116*2, # push it a little away from the y-axis + bars_from_y=bars_in_mem, # size to data + # push it 1/16th away from the y-axis + y_offset=round(bars_in_mem / 16), ) + rt_linked.set_split_sizes() # let the app run.. bby await trio.sleep_forever()