Companion

object Companion

Houses Interpolator singletons and factory functions.

Properties

Link copied to clipboard

Uses line segments.

Functions

Link copied to clipboard
fun catmullRom(@FloatRange(from = 0.0, to = 1.0, toInclusive = false) alpha: Float = 0.0f): LineCartesianLayer.Interpolator

Uses a Catmull–Rom spline. alpha, which must be in [0, 1), controls the tightness: 0 (the default) produces the standard Catmull–Rom spline, and values approaching 1 produce near-straight lines. Catmull–Rom splines pass through all data points and produce straight segments for collinear points.

Link copied to clipboard
fun cubic(@FloatRange(from = 0.0, to = 1.0, fromInclusive = false) curvature: Float = 0.5f): LineCartesianLayer.Interpolator

Uses cubic Bézier curves. curvature, which must be in (0, 1], defines their strength.