From c27da99e126cbb6601c6e1807c23a4cf7608a2fc Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 31 May 2023 10:32:16 -0400 Subject: [PATCH] Fix price label precision as `MktPair.price_tick_digits` Was only really borked for higher-precision but lower priced assets (like TLOS or peeneez) which have a `MktPair.price_tick_digits >= 2`. The issue was using the wrong attr, the `size_tick_digits`.. --- piker/ui/_chart.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/piker/ui/_chart.py b/piker/ui/_chart.py index a1935641..21ef0bcb 100644 --- a/piker/ui/_chart.py +++ b/piker/ui/_chart.py @@ -1235,10 +1235,10 @@ class ChartPlotWidget(pg.PlotWidget): # if the sticky is for our symbol # use the tick size precision for display name = name or pi.name - sym = self.linked.mkt - digits = None - if name == sym.key: - digits = sym.tick_size_digits + mkt: MktPair = self.linked.mkt + digits: int | None = None + if name in mkt.fqme: + digits = mkt.price_tick_digits # anchor_at = ('top', 'left')