Add save last datum toggle to y-label

basic_orders
Tyler Goodlet 2021-03-13 21:06:49 -05:00
parent 776395791a
commit cf2f001bcc
1 changed files with 4 additions and 1 deletions

View File

@ -438,12 +438,15 @@ class YAxisLabel(AxisLabel):
self,
index: int,
value: float,
_save_last: bool = True,
) -> None:
"""Update the label's text contents **and** position from
a view box coordinate datum.
"""
if _save_last:
self._last_datum = (index, value)
self.update_label(
self._chart.mapFromView(QPointF(index, value)),
value