Fixes calculation of axis width/height in case values are not shown.
This commit is contained in:
parent
22ecd3cc41
commit
aa4b790dd2
@ -242,6 +242,8 @@ class AxisItem(GraphicsWidget):
|
|||||||
"""Set the height of this axis reserved for ticks and tick labels.
|
"""Set the height of this axis reserved for ticks and tick labels.
|
||||||
The height of the axis label is automatically added."""
|
The height of the axis label is automatically added."""
|
||||||
if h is None:
|
if h is None:
|
||||||
|
h = 0
|
||||||
|
if self.showValues:
|
||||||
if self.style['autoExpandTextSpace'] is True:
|
if self.style['autoExpandTextSpace'] is True:
|
||||||
h = self.textHeight
|
h = self.textHeight
|
||||||
else:
|
else:
|
||||||
@ -258,6 +260,8 @@ class AxisItem(GraphicsWidget):
|
|||||||
"""Set the width of this axis reserved for ticks and tick labels.
|
"""Set the width of this axis reserved for ticks and tick labels.
|
||||||
The width of the axis label is automatically added."""
|
The width of the axis label is automatically added."""
|
||||||
if w is None:
|
if w is None:
|
||||||
|
w = 0
|
||||||
|
if self.showValues:
|
||||||
if self.style['autoExpandTextSpace'] is True:
|
if self.style['autoExpandTextSpace'] is True:
|
||||||
w = self.textWidth
|
w = self.textWidth
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user