I'm currently making an app that tracks a user's blood pressure. Right now, I have a dataset with data programmed into the graph instead of a user actually inputting information. How would I store an integer and use it as a new data point in the graph?
ArrayList<Entry> yValues = new ArrayList<>();
yValues.add(new Entry(1, 133f));
yValues.add(new Entry(2, 134f));
yValues.add(new Entry(3, 133f));
yValues.add(new Entry(4, 130f));
yValues.add(new Entry(5, 128f));
yValues.add(new Entry(6, 130f));
yValues.add(new Entry(7, 125f));
yValues.add(new Entry(8, 125f));
yValues.add(new Entry(9, 117f));
yValues.add(new Entry(10, 124f));
LineDataSet set1 = new LineDataSet(yValues, "Systolic Blood Pressure");
ArrayList<ILineDataSet> dataSets = new ArrayList<>();
dataSets.add(set1);
LineData data = new LineData(dataSets);
//set data into mChart
mChart.setData(data);
I have this, but I want the user to input their data themselves instead of through code.