Update a line chart

Hi all,
Based on user input I am generating some ( 4 ) line charts; the input is always visible, thus the user can change the values and “refresh” the charts.
As far as I understand all I can do is get each DataSeriesItem and update it … right ?
What if the new chart has fewer elements ?

Actually, is there any chance I can substitute the DataSeries object in a Chart and call some sort of repaint ?

TIA

marco

Answering my own question : yes you can


chart.getConfiguration().setSeries(newSeries);
chart.markAsDirty();//vaadin 7