Closed joshvapeter closed 6 years ago
Can you provide more of a description of what you're trying to accomplish with the dynamic data? How often you are refreshing?
Thanks @gtcompscientist for your response. I am trying to plot the graph in the app. I am planning to refresh the data daily once around 10PM. I am trying to build an app for free to user community. The basic idea is how many people coming to church daily. Please let me know if you have any questions.
This excerpt from the README is what you're looking for. The arrayListOf()
line is where you would add/update the data. Convert the date
to an Int
/Long
for the PointValue, and create a value formatter to properly show them as dates.
arrayListOf(PointValue(0, 2), PointValue(1, 4), PointValue(2, 3), PointValue(3, 4))
val line = Line(values, color = Color.BLUE, isCubic = true)
val lines = arrayListOf(line)
val data = LineChartData(lines)
val chart = LineChartView(context)
chart.lineChartData = data
Hello, Its really a good work. I have a question. I need to pull data from database and refresh the graph dynamically. I don't really need all the graphs only line graph works. The document is not enough here. I need some step by step document that will be helpful. Sample data is like below. My database is mysql or if you made video thats really helpful for lot of folks who is developing kotlin project.
09/01/18---1 09/02/18---2 09/03/18---3