Hey guys, i am really new in this and I have to make an app for a project in my school.. the thing is I am trying to put some Data in the GraphView but it´s not showing anything in the app.. I see the GraphView with default values only and my values don´t get shown in there.. i am using the bottom navigation tab and GraphView is in the home_fragment..so i made a public class (own file) under .ui.home and wrote this code :
`
public class GraphActivity extends FragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.fragment_dashboard);
GraphView graph = (GraphView) findViewById(R.id.graph);
LineGraphSeries<DataPoint> series = new LineGraphSeries<>(new DataPoint[]{
new DataPoint(0, 1),
new DataPoint(1, 5),
new DataPoint(2, 3),
new DataPoint(3, 2),
new DataPoint(4, 6)});
graph.addSeries(series);
}
}
`
i´m not getting any errors just the data is not being shown... thanks in advance
Hey
guys, i am really new in this and I have to make an app for a project in my school.. the thing is I am trying to put some Data in the GraphView but it´s not showing anything in the app.. I see the GraphView with default values only and my values don´t get shown in there.. i am using the bottom navigation tab and GraphView is in the home_fragment..so i made a public class (own file) under .ui.home and wrote this code : ` public class GraphActivity extends FragmentActivity {} ` i´m not getting any errors just the data is not being shown... thanks in advance