getMaxScrollDistance

fun getMaxScrollDistance(columnWidth: Float, xMax: Float, xMin: Float, xOffset: Float, paddingRight: Float, canvasWidth: Float, containerPaddingEnd: Float = 0.0f): Float

returns the max scrollable distance based on the points to be drawn along with padding etc.

Parameters

columnWidth

: Width of the Y-Axis.

xMax

: Max X-Axis value.

xMin

: Min X-Axis value.

xOffset

: Total distance between two X-Axis points.

paddingRight

: Padding at the end of the canvas.

canvasWidth

: Total available canvas width.

containerPaddingEnd

: Container inside padding end after the last point of the graph.