Skip to content
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import android.view.MenuItem
import androidx.core.net.toUri
import info.appdev.chartexample.DataTools.Companion.generateSineWaves
import info.appdev.chartexample.databinding.ActivityLinechartNoseekbarBinding
import info.appdev.chartexample.formatter.UnixTimeAxisValueFormatter
import info.appdev.chartexample.notimportant.DemoBase
import info.appdev.charting.components.Description
import info.appdev.charting.components.Legend.LegendForm
Expand Down Expand Up @@ -50,7 +49,6 @@ class TimeLineActivity : DemoBase() {
setDrawGridLines(false)
// granularity = 1f // only intervals of 1 day
labelCount = 7
valueFormatter = UnixTimeAxisValueFormatter("yyyy-MM-dd HH:mm:ss")
}

// if disabled, scaling can be done on x- and y-axis separately
Expand Down Expand Up @@ -79,10 +77,10 @@ class TimeLineActivity : DemoBase() {
@Suppress("SameParameterValue")
private fun setData(range: Float, timeOffset: Long) {

val sampleEntries = generateSineWaves(3, 30)
val sampleEntries = generateSineWaves(3, 3000)
.mapIndexed { index, data ->
val valueY = (data.toFloat() * range) + 50
Entry(timeOffset + index.toFloat() * 1000, valueY)
Entry(timeOffset + index.toFloat(), valueY)
}.toMutableList()

val set1: LineDataSet
Expand Down Expand Up @@ -146,6 +144,6 @@ class TimeLineActivity : DemoBase() {
public override fun saveToGallery() = Unit // Intentionally left empty

companion object {
const val TIME_OFFSET = 1767105583L
const val TIME_OFFSET = 0L //1767105583L
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading