Pass through fonts to axes
parent
58d3234f74
commit
fc23b2180d
|
@ -19,16 +19,18 @@ class PriceAxis(pg.AxisItem):
|
||||||
self,
|
self,
|
||||||
) -> None:
|
) -> None:
|
||||||
super().__init__(orientation='right')
|
super().__init__(orientation='right')
|
||||||
|
self.setTickFont(_font)
|
||||||
self.setStyle(**{
|
self.setStyle(**{
|
||||||
'textFillLimits': [(0, 0.5)],
|
'textFillLimits': [(0, 0.5)],
|
||||||
# 'tickTextWidth': 10,
|
# 'tickTextWidth': 100,
|
||||||
# 'tickTextHeight': 25,
|
# 'tickTextHeight': 20,
|
||||||
|
'tickFont': _font,
|
||||||
|
# 'tickTextWidth': 40,
|
||||||
# 'autoExpandTextSpace': True,
|
# 'autoExpandTextSpace': True,
|
||||||
# 'maxTickLength': -20,
|
# 'maxTickLength': -20,
|
||||||
# 'stopAxisAtTick': (True, True),
|
# 'stopAxisAtTick': (True, True),
|
||||||
})
|
})
|
||||||
self.setLabel(**{'font-size': '10pt'})
|
# self.setLabel(**{'font-size': '10pt'})
|
||||||
self.setTickFont(_font)
|
|
||||||
self.setWidth(40)
|
self.setWidth(40)
|
||||||
|
|
||||||
# XXX: drop for now since it just eats up h space
|
# XXX: drop for now since it just eats up h space
|
||||||
|
@ -60,13 +62,12 @@ class DynamicDateAxis(pg.AxisItem):
|
||||||
self.setTickFont(_font)
|
self.setTickFont(_font)
|
||||||
|
|
||||||
# default styling
|
# default styling
|
||||||
self.setStyle(
|
self.setStyle(**{
|
||||||
tickTextOffset=4,
|
# tickTextOffset=4,
|
||||||
textFillLimits=[(0, 0.70)],
|
'textFillLimits': [(0, 0.70)],
|
||||||
# TODO: doesn't seem to work -> bug in pyqtgraph?
|
'tickFont': _font,
|
||||||
# tickTextHeight=11,
|
})
|
||||||
)
|
self.setHeight(11)
|
||||||
self.setHeight(10)
|
|
||||||
|
|
||||||
def _indexes_to_timestrs(
|
def _indexes_to_timestrs(
|
||||||
self,
|
self,
|
||||||
|
|
Loading…
Reference in New Issue