Drop `._index_step` from formatters and instead defer to `Viz.index_step()`
parent
6796021663
commit
3c885a0698
|
@ -98,15 +98,13 @@ class IncrementalFormatter(msgspec.Struct):
|
||||||
_last_vr: tuple[float, float] | None = None
|
_last_vr: tuple[float, float] | None = None
|
||||||
_last_ivdr: tuple[float, float] | None = None
|
_last_ivdr: tuple[float, float] | None = None
|
||||||
|
|
||||||
_index_step_size: float = None
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def index_step_size(self) -> float:
|
def index_step_size(self) -> float:
|
||||||
'''
|
'''
|
||||||
Readonly value computed on first ``.diff()`` call.
|
Readonly value computed on first ``.diff()`` call.
|
||||||
|
|
||||||
'''
|
'''
|
||||||
return self._index_step_size
|
return self.viz.index_step()
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
msg = (
|
msg = (
|
||||||
|
@ -182,11 +180,6 @@ class IncrementalFormatter(msgspec.Struct):
|
||||||
nd_stop = self.xy_nd_stop = src_stop
|
nd_stop = self.xy_nd_stop = src_stop
|
||||||
|
|
||||||
align_index = array[self.index_field]
|
align_index = array[self.index_field]
|
||||||
self._index_step_size = (
|
|
||||||
align_index[-1]
|
|
||||||
-
|
|
||||||
align_index[-2]
|
|
||||||
)
|
|
||||||
|
|
||||||
# compute the length diffs between the first/last index entry in
|
# compute the length diffs between the first/last index entry in
|
||||||
# the input data and the last indexes we have on record from the
|
# the input data and the last indexes we have on record from the
|
||||||
|
|
Loading…
Reference in New Issue