for (int i = 0, n = selectedNodes.length; i < n; i++) {
if (node == selectedNodes[i]) {
TimeSeries series = timeSeries.getSeries(i);
int groupSize = getGroupSize(node);
if (groupSize > 1) {
series.clear();
updateSeries(series, node, groupSize);
} else {
series.addOrUpdate(new Second(new Date(data.getNodeTime())), getSensorDataValue(data));
}
chartPanel.repaint();