From dbdd7b64974c1a562df83fc07c5ccbe50e56e460 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sun, 26 Sep 2021 17:14:30 -0400 Subject: [PATCH] Fix color passthrough, make overlays a `dict` --- piker/ui/_chart.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/piker/ui/_chart.py b/piker/ui/_chart.py index e4236aba..c564d3de 100644 --- a/piker/ui/_chart.py +++ b/piker/ui/_chart.py @@ -56,6 +56,7 @@ from ._style import ( ) from ..data.feed import Feed from ..data._source import Symbol +from ..data._sharedmem import ShmArray from ..log import get_logger from ._interaction import ChartView from ._forms import FieldsForm @@ -632,7 +633,8 @@ class ChartPlotWidget(pg.PlotWidget): 'ohlc': array, } self._graphics = {} # registry of underlying graphics - self._overlays = set() # registry of overlay curve names + # registry of overlay curve names + self._overlays: dict[str, ShmArray] = {} self._feeds: dict[Symbol, Feed] = {} @@ -808,8 +810,9 @@ class ChartPlotWidget(pg.PlotWidget): the input array ``data``. """ + color = color or self.pen_color or 'default_light' pdi_kwargs.update({ - 'color': color or self.pen_color or 'default_light' + 'color': color }) data_key = array_key or name @@ -856,7 +859,7 @@ class ChartPlotWidget(pg.PlotWidget): if overlay: anchor_at = ('bottom', 'left') - self._overlays.add(name) + self._overlays[name] = None else: anchor_at = ('top', 'left')