If I have the following loop:
Chart plot = new Chart(composite, SWT.NONE);
ISeriesSet seriesSet = plot.getSeriesSet();
ISeries series = seriesSet.createSeries(SeriesType.LINE, "Test");
for(int i=0; i<1000; i++) {
points = ...
series.setYSeries(points);
}
The chart is not refreshed quickly enough, even if I add a delay within the loop. I had to minimize the window and then maximize it to see the changes, in other words, it is not refreshed after every loop, I tried to force a refresh by adding this lines inside the loop:
plot.redraw();
plot.layout(true, true);
But seems like it is refreshed only once at the end of the loop. Is there a best practice I should be following when having to quickly refreshing the chart?