From d5844ce8ffba3fda851299cd671b2758ea860f40 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 2 Dec 2022 19:58:19 -0500 Subject: [PATCH] Delegate formatter `.index_field` to the parent `Viz` --- piker/data/_formatters.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/piker/data/_formatters.py b/piker/data/_formatters.py index 523875a3..173d7552 100644 --- a/piker/data/_formatters.py +++ b/piker/data/_formatters.py @@ -54,7 +54,16 @@ class IncrementalFormatter(msgspec.Struct): ''' shm: ShmArray viz: Viz - index_field: str = 'index' + + @property + def index_field(self) -> 'str': + ''' + Value (``str``) used to look up the "index series" from the + underlying source ``numpy`` struct-array; delegate directly to + the managing ``Viz``. + + ''' + return self.viz.index_field # Incrementally updated xy ndarray formatted data, a pre-1d # format which is updated and cached independently of the final