diff --git a/piker/ui/_chart.py b/piker/ui/_chart.py index 095d11e0..fb3fc388 100644 --- a/piker/ui/_chart.py +++ b/piker/ui/_chart.py @@ -1305,43 +1305,6 @@ class ChartPlotWidget(pg.PlotWidget): self.sig_mouse_leave.emit(self) self.scene().leaveEvent(ev) - def maxmin( - self, - name: str | None = None, - bars_range: tuple[ - int, int, int, int, int, int - ] | None = None, - - ) -> tuple[float, float]: - ''' - Return the max and min y-data values "in view". - - If ``bars_range`` is provided use that range. - - ''' - # TODO: here we should instead look up the ``Viz.shm.array`` - # and read directly from shm to avoid copying to memory first - # and then reading it again here. - viz_key = name or self.name - viz = self._vizs.get(viz_key) - if viz is None: - log.error(f"viz {viz_key} doesn't exist in chart {self.name} !?") - return 0, 0 - - res = viz.maxmin() - - if ( - res is None - ): - mxmn = 0, 0 - if not self._on_screen: - self.default_view(do_ds=False) - self._on_screen = True - else: - x_range, read_slc, mxmn = res - - return mxmn - def get_viz( self, key: str, diff --git a/piker/ui/_display.py b/piker/ui/_display.py index dbde38f7..d7400e4b 100644 --- a/piker/ui/_display.py +++ b/piker/ui/_display.py @@ -21,7 +21,6 @@ this module ties together quote and computational (fsp) streams with graphics update methods via our custom ``pyqtgraph`` charting api. ''' -from functools import partial import itertools from math import floor import time @@ -389,7 +388,6 @@ async def graphics_update_loop( 'fqsn': fqsn, 'godwidget': godwidget, 'quotes': {}, - # 'maxmin': maxmin, 'flume': flume, @@ -1397,10 +1395,6 @@ async def display_symbol_data( # for zoom-interaction purposes. hist_viz.draw_last(array_key=fqsn) - hist_pi.vb.maxmin = partial( - hist_chart.maxmin, - name=fqsn, - ) # TODO: we need a better API to do this.. # specially store ref to shm for lookup in display loop # since only a placeholder of `None` is entered in @@ -1426,10 +1420,6 @@ async def display_symbol_data( color=bg_chart_color, last_step_color=bg_last_bar_color, ) - rt_pi.vb.maxmin = partial( - rt_chart.maxmin, - name=fqsn, - ) # TODO: we need a better API to do this.. # specially store ref to shm for lookup in display loop