Skip to content

Commit

Permalink
Fix color passthrough, make overlays a dict
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Nov 3, 2021
1 parent 549ff4e commit 6897393
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions piker/ui/_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
)
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
Expand Down Expand Up @@ -632,7 +633,8 @@ def __init__(
'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] = {}

Expand Down Expand Up @@ -808,8 +810,9 @@ def draw_curve(
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
Expand Down Expand Up @@ -856,7 +859,7 @@ def draw_curve(

if overlay:
anchor_at = ('bottom', 'left')
self._overlays.add(name)
self._overlays[name] = None

else:
anchor_at = ('top', 'left')
Expand Down

0 comments on commit 6897393

Please sign in to comment.