mirror of
https://github.com/dzeiocom/OpenHealth.git
synced 2025-06-12 17:19:18 +00:00
misc: Continue working on Chart
This commit is contained in:
@ -41,6 +41,8 @@ class StepsHomeFragment :
|
||||
|
||||
viewModel.items.observe(viewLifecycleOwner) { list ->
|
||||
adapter.set(list)
|
||||
chart.numberOfEntries = list.size
|
||||
chart.numberOfLabels = 2
|
||||
|
||||
val strings = ArrayList<String>()
|
||||
val values = ArrayList<Int>()
|
||||
@ -50,10 +52,14 @@ class StepsHomeFragment :
|
||||
values.add(it.value)
|
||||
}
|
||||
|
||||
chart.yAxis.max = 10
|
||||
|
||||
|
||||
chart.setBottomTextList(strings)
|
||||
chart.setDataList(
|
||||
values
|
||||
)
|
||||
chart.refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user