From 23a03e3a0a08e3b3811027d1927b3813ec043398 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 15 Jun 2021 18:25:03 -0400 Subject: [PATCH] Port cursor and axes to new widget names --- piker/ui/_axes.py | 8 ++++---- piker/ui/_graphics/_cursor.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/piker/ui/_axes.py b/piker/ui/_axes.py index d7f69742..3e66ada3 100644 --- a/piker/ui/_axes.py +++ b/piker/ui/_axes.py @@ -38,7 +38,7 @@ class Axis(pg.AxisItem): """ def __init__( self, - linked_charts, + linkedsplits, typical_max_str: str = '100 000.000', min_tick: int = 2, **kwargs @@ -49,7 +49,7 @@ class Axis(pg.AxisItem): # XXX: pretty sure this makes things slower # self.setCacheMode(QtGui.QGraphicsItem.DeviceCoordinateCache) - self.linked_charts = linked_charts + self.linkedsplits = linkedsplits self._min_tick = min_tick self._dpi_font = _font @@ -132,9 +132,9 @@ class DynamicDateAxis(Axis): ) -> List[str]: # try: - chart = self.linked_charts.chart + chart = self.linkedsplits.chart bars = chart._ohlc - shm = self.linked_charts.chart._shm + shm = self.linkedsplits.chart._shm first = shm._first.value bars_len = len(bars) diff --git a/piker/ui/_graphics/_cursor.py b/piker/ui/_graphics/_cursor.py index a32a3870..0f250e7a 100644 --- a/piker/ui/_graphics/_cursor.py +++ b/piker/ui/_graphics/_cursor.py @@ -203,7 +203,7 @@ class Cursor(pg.GraphicsObject): def __init__( self, - linkedsplitcharts: 'LinkedSplitCharts', # noqa + linkedsplits: 'LinkedSplits', # noqa digits: int = 0 ) -> None: super().__init__() @@ -217,7 +217,7 @@ class Cursor(pg.GraphicsObject): color=hcolor('davies'), style=QtCore.Qt.DashLine, ) - self.lsc = linkedsplitcharts + self.lsc = linkedsplits self.graphics: Dict[str, pg.GraphicsObject] = {} self.plots: List['PlotChartWidget'] = [] # type: ignore # noqa self.active_plot = None