PDA

View Full Version : what is the function or the slot which is responsable of plot update in QChart?



belloul
16th October 2017, 11:48
Hello, I need to plot in live with Qchart, but it didn't update with the code below.

So I am searching the function or the slot which is responsable of plot update, so I will activate it by myself.



def __init__(self, params):
super().__init__()

#init with params

self.mycurv.append(QLineSeries(self))
self.addSeries(self.allCruvs[-1])

def plotData(self, Time, Values, color=None, curvIndex=0):
self.mycurv.clear()
lastTime = self.myZero
for i, theTime in enumerate(Time):
if (theTime > lastTime + MININTERVALTIME):
self.mycurv.append(lastTime - self.myZero, Values[i])

self.mycurv.append(theTime - self.myZero, Values[i])
lastTime = theTime
self.update()


if at the end in stead of self.update, I put


self.removeAllseries()
self.addseries(self.mycurv)

it is working in live for a while, and the the application crashes.

Thanks in advance