nonisolated init<T>(unit: T, majorAlignment: MajorValueAlignment<T>? = nil, limitBehavior: ValueAlignedLimitBehavior = .automatic) where T : Plottable, T : Numeric
Creates a scroll target behavior that aligns to values spaced at regular intervals along the scrollable axes.
- Parameter unit: The alignment unit. When the user finishes a scroll gesture, the chart will snap to align to
the given unit or the end of the domain.
- Parameter majorAlignment: The behavior for aligning to major values. When the user swipes on the chart, the chart will snap to the
next or previous major unit depending on the swipe direction. When enabled, the default major unit is a page.
- Parameter limitBehavior: The scroll limit behavior.
nonisolated init<X, Y>(xUnit: X, yUnit: Y, xMajorAlignment: MajorValueAlignment<X>? = nil, yMajorAlignment: MajorValueAlignment<Y>? = nil, limitBehavior: ValueAlignedLimitBehavior = .automatic) where X : Plottable, X : Numeric, Y : Plottable, Y : Numeric
Creates a scroll target behavior that aligns to values spaced at regular intervals along the scrollable axes.
- Parameter xUnit: The alignment unit for the x-axis.
- Parameter yUnit: The alignment unit for the y-axis.
- Parameter xMajorAlignment: The behavior for aligning to major values along the x-axis.
- Parameter yMajorAlignment: The behavior for aligning to major values along the y-axis.
- Parameter limitBehavior: The scroll limit behavior.
nonisolated init<X>(xUnit: X, yMatching yComponents: DateComponents, xMajorAlignment: MajorValueAlignment<X>? = nil, yMajorAlignment: MajorValueAlignment<Date>? = nil, limitBehavior: ValueAlignedLimitBehavior = .automatic) where X : Plottable, X : Numeric
Creates a scroll target behavior that aligns to values spaced at regular intervals along the scrollable axes.
- Parameter xUnit: The alignment unit for the x-axis.
- Parameter yComponents: The alignment components for the y-axis.
- Parameter xMajorAlignment: The behavior for aligning to major values along the x-axis.
- Parameter yMajorAlignment: The behavior for aligning to major values along the y-axis.
- Parameter limitBehavior: The scroll limit behavior.
Creates a scroll target behavior that aligns to values spaced at regular intervals along the scrollable axes.
- Parameter components: The components to search for when aligning after the user finishes scrolling.
- Parameter majorAlignment: The behavior for aligning to major values. When the user swipes on the chart, the chart will snap to the
next or previous major unit depending on the swipe direction. When enabled, the default major unit is a page.
- Parameter limitBehavior: The scroll limit behavior.
Creates a scroll target behavior that aligns to values spaced at regular intervals along the scrollable axes.
- Parameter xComponents: The alignment components for the x-axis.
- Parameter yComponents: The alignment components for the y-axis.
- Parameter xMajorAlignment: The behavior for aligning to major values along the x-axis.
- Parameter yMajorAlignment: The behavior for aligning to major values along the y-axis.
- Parameter limitBehavior: The scroll limit behavior.
nonisolated init<Y>(xMatching xComponents: DateComponents, yUnit: Y, xMajorAlignment: MajorValueAlignment<Date>? = nil, yMajorAlignment: MajorValueAlignment<Y>? = nil, limitBehavior: ValueAlignedLimitBehavior = .automatic) where Y : Plottable, Y : Numeric
Creates a scroll target behavior that aligns to values spaced at regular intervals along the scrollable axes.
- Parameter xComponents: The alignment components for the x-axis.
- Parameter yUnit: The alignment unit for the y-axis.
- Parameter xMajorAlignment: The behavior for aligning to major values along the x-axis.
- Parameter yMajorAlignment: The behavior for aligning to major values along the y-axis.
- Parameter limitBehavior: The scroll limit behavior.