Hi I am new to android and I am developing an app to display a temperature data that I get from my firebase database. I am following the following tutorial to draw the graph https://www.youtube.com/watch?v=wEFkzQY_wWI . But I am not finding many tutorials on how to connect a database to XYplot. Please help me
public class MainActivity extends AppCompatActivity {
private XYPlot plot;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
plot = (XYPlot) findViewById(R.id.plot);
XYSeries s1 = new SimpleXYSeries(SimpleXYSeries.ArrayFormat.Y_VALS_ONLY, "series 1", 1,3,6,4,2,6,9);
plot.addSeries(s1, new LineAndPointFormatter(Color.GREEN, Color.GREEN, null, null));
PanZoom.attach(plot);
}}