From 714340747e0cdb747d3dca2de2768235ddee713a Mon Sep 17 00:00:00 2001 From: Zach Domke Date: Fri, 13 Sep 2024 11:32:09 -0700 Subject: [PATCH] FIX: Fixing issues in PR #1108 --- pydm/widgets/archiver_time_plot.py | 4 +++- pydm/widgets/timeplot.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pydm/widgets/archiver_time_plot.py b/pydm/widgets/archiver_time_plot.py index 611825f08..6be9f6fe2 100644 --- a/pydm/widgets/archiver_time_plot.py +++ b/pydm/widgets/archiver_time_plot.py @@ -925,7 +925,7 @@ def addYChannel( """ Overrides timeplot addYChannel method to be able to pass the liveData flag. """ - return super().addYChannel( + curve = super().addYChannel( y_channel=y_channel, plot_style=plot_style, name=name, @@ -942,6 +942,8 @@ def addYChannel( useArchiveData=useArchiveData, liveData=liveData, ) + self.requestDataFromArchiver() + return curve def addFormulaChannel(self, yAxisName: str, **kwargs) -> FormulaCurveItem: """Creates a FormulaCurveItem and links it to the given y axis""" diff --git a/pydm/widgets/timeplot.py b/pydm/widgets/timeplot.py index 5a1559213..25d76ed41 100644 --- a/pydm/widgets/timeplot.py +++ b/pydm/widgets/timeplot.py @@ -102,9 +102,10 @@ def __init__(self, channel_address=None, plot_by_timestamps=True, plot_style="Li self.points_accumulated = 0 self.latest_value = None self.channel = None - self.address = channel_address self.units = "" + super(TimePlotCurveItem, self).__init__(**kws) + self.address = channel_address def to_dict(self): dic_ = OrderedDict([("channel", self.address), ("plot_style", self.plot_style)])