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

[Kotlin] Points not being drawn (Realtime) #667

Open
BerkDelivers opened this issue Jun 19, 2020 · 0 comments
Open

[Kotlin] Points not being drawn (Realtime) #667

BerkDelivers opened this issue Jun 19, 2020 · 0 comments

Comments

@BerkDelivers
Copy link

I'm making an API call, and trying to plot the data I get into the graph.
However, when the application runs, there are no points drawn on the graph and the graph is not scrollable/scalable.

There are no errors being logged. Here is how I'm setting up my graph:

graph = view.findViewById(R.id.graph) as GraphView
series = LineGraphSeries<DataPoint>()

Then, in my response parsing method:

for (i in 0 until dataArray.length()-1) {
val point = DataPoint(i.toDouble(), obj.get("value").toString().toDouble()) series!!.appendData(point, true, dataArray.length()-1)

This is what I end up with:
Screen Shot 2020-06-19 at 1 12 21 PM

Am I doing something incorrect to load these data points in?

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