From 4aa526f400ea5b669c9c2be54da4fbeeec126e3e Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 8 Jul 2020 14:56:45 -0400 Subject: [PATCH] Use structure array indexing syntax --- piker/ui/_axes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/piker/ui/_axes.py b/piker/ui/_axes.py index 03e68feb..b64b72ec 100644 --- a/piker/ui/_axes.py +++ b/piker/ui/_axes.py @@ -62,7 +62,7 @@ class DynamicDateAxis(pg.AxisItem): for ibar in values: if ibar > quotes_count: return strings - dt_tick = fromtimestamp(bars[int(ibar)].time) + dt_tick = fromtimestamp(bars[int(ibar)]['time']) strings.append( dt_tick.strftime(self.tick_tpl[s_period]) ) @@ -146,7 +146,7 @@ class XAxisLabel(AxisLabel): bars = self.parent.linked_charts._array if tick_pos > len(bars): return 'Unknown Time' - return fromtimestamp(bars[round(tick_pos)].time).strftime(tpl) + return fromtimestamp(bars[round(tick_pos)]['time']).strftime(tpl) def boundingRect(self): # noqa return QtCore.QRectF(0, 0, 145, 50)