I have tried this:
private void graph() {
XYSeries series1 = new SimpleXYSeries(Arrays.asList(seriesOfNumbers), SimpleXYSeries.ArrayFormat.Y_VALS_ONLY,mFilename);
mFormat = new LineAndPointFormatter(Color.RED, Color.TRANSPARENT, Color.WHITE, null);
mFormat.setInterpolationParams(new CatmullRomInterpolator.Params(20, CatmullRomInterpolator.Type.Centripetal));
gPlot.addSeries(series1, mFormat);
}
this:
protected XYSeries generateSeries(ArrayList<String> bRows) {
List<Number> xVals = new ArrayList<>();
List<Number> yVals = new ArrayList<>();
int i = 1;
for (String b : bRows) {
xVals.add(i);
yVals.add(Float.valueOf(b));
i++;
}
return new SimpleXYSeries(xVals, yVals,""+i);
}
gPlot.addSeries(generateSeries(series1), mFormat);
and this:
public void calculateGraph() {
seriesOfNumbers = new Number[mNewDataListCount];
for (int i = 0; i < mNewDataListCount; i++) {
seriesOfNumbers[i] = Double.parseDouble(mNewDataList.get(i));
}
mFormat = new LineAndPointFormatter(Color.RED, Color.TRANSPARENT, Color.WHITE, null);
mFormat.setInterpolationParams(new CatmullRomInterpolator.Params(20, CatmullRomInterpolator.Type.Centripetal));
XYSeries series1 = new SimpleXYSeries(Arrays.asList(seriesOfNumbers), SimpleXYSeries.ArrayFormat.Y_VALS_ONLY,mFilename);
gPlot.addSeries(series1, mFormat);
}
I am assuming that the number of plot-able points is slowing down the plot production. Can anyone show me how I can process 17,500 rows into XYPlot points on the androidPlot graph.