GraphView icon indicating copy to clipboard operation
GraphView copied to clipboard

GraphView not getting any Data, Lines etc.

Open mglbvc8 opened this issue 3 years ago • 0 comments

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

mglbvc8 avatar Mar 29 '22 17:03 mglbvc8