Rename `._ohlc.gen_qpath()` -> `.gen_ohlc_qpath()`

pre_flow
Tyler Goodlet 2022-05-15 14:30:13 -04:00
parent b7f7296f3a
commit 3bf907c10f
2 changed files with 4 additions and 4 deletions

View File

@ -52,7 +52,7 @@ from .._profile import (
) )
from ._ohlc import ( from ._ohlc import (
BarItems, BarItems,
gen_qpath, gen_ohlc_qpath,
) )
from ._curve import ( from ._curve import (
FastAppendCurve, FastAppendCurve,
@ -365,7 +365,7 @@ class Flow(msgspec.Struct): # , frozen=True):
r = self._src_r = Renderer( r = self._src_r = Renderer(
flow=self, flow=self,
# TODO: rename this to something with ohlc # TODO: rename this to something with ohlc
draw_path=gen_qpath, draw_path=gen_ohlc_qpath,
last_read=read, last_read=read,
) )

View File

@ -156,7 +156,7 @@ def path_arrays_from_ohlc(
return x, y, c return x, y, c
def gen_qpath( def gen_ohlc_qpath(
data: np.ndarray, data: np.ndarray,
start: int = 0, # XXX: do we need this? start: int = 0, # XXX: do we need this?
# 0.5 is no overlap between arms, 1.0 is full overlap # 0.5 is no overlap between arms, 1.0 is full overlap
@ -274,7 +274,7 @@ class BarItems(pg.GraphicsObject):
''' '''
hist, last = ohlc[:-1], ohlc[-1] hist, last = ohlc[:-1], ohlc[-1]
self.path = gen_qpath(hist, start, self.w) self.path = gen_ohlc_qpath(hist, start, self.w)
# save graphics for later reference and keep track # save graphics for later reference and keep track
# of current internal "last index" # of current internal "last index"