Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphView not getting any Data, Lines etc. #682

Open
mglbvc8 opened this issue Mar 29, 2022 · 0 comments
Open

GraphView not getting any Data, Lines etc. #682

mglbvc8 opened this issue Mar 29, 2022 · 0 comments

Comments

@mglbvc8
Copy link

mglbvc8 commented Mar 29, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant