Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions app/src/main/kotlin/info/appdev/chartexample/FilledLineActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,23 @@ class FilledLineActivity : DemoBase() {

for (i in 0..<count) {
val valueY = (sampleValues[i]!!.toFloat() * range) + 50
if (count / 2 == i) {
// Simulate a gap in the data
valuesArray1.add(null)
continue
}
valuesArray1.add(Entry(i.toFloat(), valueY))
}

val valuesArray2 = ArrayList<Entry?>()

for (i in 0..<count) {
val valueY = (sampleValues[i + 1]!!.toFloat() * range) + 450
if (count / 4 == i) {
// Simulate a gap in the data
valuesArray2.add(null)
continue
}
valuesArray2.add(Entry(i.toFloat(), valueY))
}

Expand Down
Loading