diff --git a/pyAmakIHM/classes/panelLimitedPlotChart.py b/pyAmakIHM/classes/panelLimitedPlotChart.py index 9cbd3faa6e2a9207efd3ccab6b9223dd55bf05de..99e28ab5c18a27c667456ea873a5d965fdc75095 100644 --- a/pyAmakIHM/classes/panelLimitedPlotChart.py +++ b/pyAmakIHM/classes/panelLimitedPlotChart.py @@ -12,16 +12,19 @@ class PanelLimitedPlotChart(PanelPlotChart): def __init__( self, - root, - id, - limit - ) : + root : 'Tk', + id : int, + limit : int + ) -> None : super().__init__(root, id) self.__limit = limit self.__limited = False - def addPoint(self, id : int, x : int, y : int): + """ + Add a point to the id curve with x,y coords + """ + def addPoint(self, id : int, x : int, y : int) -> None: self._axis.clear() self._xAxis[id].append(x) self._yAxis[id].append(y) @@ -35,10 +38,16 @@ class PanelLimitedPlotChart(PanelPlotChart): self._rebuild() - def isLimited(self,id): + """ + Return true if number of points is over the limit + """ + def isLimited(self,id : int) -> bool: return len(self._xAxis[id]) > self.__limit - def createCopy(self, name : str, id : int) -> 'PanelPlotChart': + """ + Return a copy of the object + """ + def createCopy(self, name : str, id : int) -> 'PanelLimitedPlotChart': window = Toplevel() window.title(name) @@ -57,7 +66,10 @@ class PanelLimitedPlotChart(PanelPlotChart): return self._copy - def _copyWidget(self): + """ + Copy the object + """ + def _copyWidget(self) -> None: super()._copyWidget() self._copy.__limit = self.__limit self._copy.__limited = self.__limited