1
0
mirror of https://github.com/dzeiocom/OpenHealth.git synced 2025-04-22 19:02:16 +00:00

fix(charts): Scrolling being to quick

This commit is contained in:
Florian Bouillon 2022-08-23 19:22:42 +02:00
parent 39f6e7cbef
commit 8860f2c1b8
4 changed files with 5 additions and 5 deletions

View File

@ -36,7 +36,7 @@ class ChartView @JvmOverloads constructor(context: Context?, attrs: AttributeSet
setOnChartMoved { movementX, _ ->
// Log.d(TAG, "scrolled: ${(movementX - lastMovement) * (xAxis.increment / 10)}")
xAxis.x = xAxis.x + (movementX - lastMovement) * (xAxis.increment / 10)
xAxis.x = xAxis.x + (movementX - lastMovement) * (xAxis.increment * xAxis.displayCount / width)
lastMovement = movementX.toDouble()
refresh()
}

View File

@ -101,6 +101,6 @@ class XAxis(
}
override fun refresh() {
TODO("Not yet implemented")
// TODO("Not yet implemented")
}
}

View File

@ -109,6 +109,6 @@ class YAxis(
}
override fun refresh() {
TODO("Not yet implemented")
// TODO("Not yet implemented")
}
}

View File

@ -122,6 +122,6 @@ class BarSerie(
}
override fun refresh() {
TODO("Not yet implemented")
// TODO("Not yet implemented")
}
}
}