ScrollHandler

class ScrollHandler(scrollEnabled: Boolean = true, initialScroll: Scroll.Absolute = Scroll.Absolute.Start, autoScroll: Scroll = initialScroll, autoScrollCondition: AutoScrollCondition = AutoScrollCondition.Never, autoScrollInterpolator: TimeInterpolator = AccelerateDecelerateInterpolator(), autoScrollDuration: Long = Animation.DIFF_DURATION.toLong())

Houses information on a CartesianChart’s scroll value. Allows for scroll customization and programmatic scrolling.

Constructors

Link copied to clipboard
constructor(scrollEnabled: Boolean = true, initialScroll: Scroll.Absolute = Scroll.Absolute.Start, autoScroll: Scroll = initialScroll, autoScrollCondition: AutoScrollCondition = AutoScrollCondition.Never, autoScrollInterpolator: TimeInterpolator = AccelerateDecelerateInterpolator(), autoScrollDuration: Long = Animation.DIFF_DURATION.toLong())

Types

Link copied to clipboard
interface Listener

Facilitates listening for scroll events.

Properties

Link copied to clipboard

The maximum scroll value (in pixels).

Link copied to clipboard

The current scroll value (in pixels).

Functions

Link copied to clipboard

Adds the provided Listener.

Link copied to clipboard
fun animateScroll(scroll: Scroll, interpolator: TimeInterpolator = AccelerateDecelerateInterpolator(), duration: Long = Animation.DIFF_DURATION.toLong())

Triggers an animated scroll.

Link copied to clipboard

Removes the provided Listener.

Link copied to clipboard
fun scroll(scroll: Scroll)

Triggers a scroll.