Drop graphics throttle to 22Hz, add a `.maxmin` to our view box
parent
723eef3fd6
commit
45464a5465
|
@ -54,7 +54,7 @@ from ..log import get_logger
|
|||
log = get_logger(__name__)
|
||||
|
||||
# TODO: load this from a config.toml!
|
||||
_quote_throttle_rate: int = 58 # Hz
|
||||
_quote_throttle_rate: int = 6 + 16 # Hz
|
||||
|
||||
|
||||
# a working tick-type-classes template
|
||||
|
@ -266,7 +266,10 @@ async def graphics_update_loop(
|
|||
array_key=curve_name,
|
||||
)
|
||||
# is this even doing anything?
|
||||
flow.plot.vb._set_yrange()
|
||||
flow.plot.vb._set_yrange(
|
||||
autoscale_linked_plots=False,
|
||||
name=curve_name,
|
||||
)
|
||||
|
||||
ticks_frame = quote.get('ticks', ())
|
||||
|
||||
|
|
|
@ -421,6 +421,14 @@ class ChartView(ViewBox):
|
|||
if self._maxmin is None:
|
||||
self._maxmin = chart.maxmin
|
||||
|
||||
@property
|
||||
def maxmin(self) -> Callable:
|
||||
return self._maxmin
|
||||
|
||||
@maxmin.setter
|
||||
def maxmin(self, callback: Callable) -> None:
|
||||
self._maxmin = callback
|
||||
|
||||
def wheelEvent(
|
||||
self,
|
||||
ev,
|
||||
|
@ -678,6 +686,7 @@ class ChartView(ViewBox):
|
|||
# flag to prevent triggering sibling charts from the same linked
|
||||
# set from recursion errors.
|
||||
autoscale_linked_plots: bool = True,
|
||||
name: Optional[str] = None,
|
||||
# autoscale_overlays: bool = False,
|
||||
|
||||
) -> None:
|
||||
|
@ -735,6 +744,7 @@ class ChartView(ViewBox):
|
|||
)
|
||||
|
||||
if set_range:
|
||||
|
||||
yrange = self._maxmin()
|
||||
if yrange is None:
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue