}
private void makeSeries(XYSeries series, final Object trace, boolean cumulative, CalculatedValues calculatedValues) {
final double scaleFactor = getScaleFactor(trace);
final XYSeries _series = series;
if (isTraceRectilinear(trace)) {
calculatedValues.makeRectilinearSeries(new SeriesCallback() {
public void add(int index, double x, double y) {
_series.add(x,y / scaleFactor);
}
});
} else {
calculatedValues.makeSeries(cumulative,new SeriesCallback() {
public void add(int index, double x, double y) {
_series.add(x,y / scaleFactor);
}
});
}