Re: Repaint QSplineSeries
You're trying to add the same series more than once (that is, QSplineSeries * series_for_Vy has already been added to the chart). The fact that you changed the data in the series makes no difference.
You probably need to do this:
- remove the series from the chart (QChart::removeSeries())
- change the series data
- add the series back to the chart (QChart::addSeries())
You may not actually need to remove and add the series, but from what I remember of QChart, changing the data in the series may not result in an update to the chart.
Re: Repaint QSplineSeries
Re: Repaint QSplineSeries
I'm using QML for my charts, but I have been able to achieve updating the series without removing and recreating it...
Code:
wavgSeries.remove(0);
wavgSeries.append(appWin.wxMsec,appWin.wxWavg);
Basically, removing the first element in the series, then just appending a new one...
--SamG