1
0
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:
2022-07-25 17:37:02 +02:00
parent 39c7c507c5
commit 196fcf5da0
4 changed files with 78 additions and 19 deletions

View File

@ -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()
}
}
}