stream-charts
    Preparing search index...

    An immutable axis range that holds the current range and the original (no zoom) range.

    Hierarchy (View Summary)

    Index

    Constructors

    • Protected

      Parameters

      • start: number

        The axis-range start value.

      • end: number

        The axis-range end value.

      • OptionaloriginalStart: number = start

        The optional original axis-range start value. Defaults to the start value if not specified.

      • OptionaloriginalEnd: number = end

        The optional original axis-range end value. Defaults to the end value if not specified.

      Returns BaseAxisRange

    Properties

    current: AxisInterval
    original: AxisInterval

    Accessors

    • get originalDistance(): number

      Returns the original (e.g. before any zooming or panning) distance between the start and end of the range.

      Returns number

    Methods

    • Scales the axis-range by the specified scale factor, but constrains the range to the specified constraint min and max. The equations are written so that the zooming (scaling) occurs at the specified value, and expands/contracts equally from that value.

      Parameters

      • factor: number

        The scale factor

      • value: number

        The value at which the zoom is initiated

      • constraint: [min: number, max: number]

        The min and max range

      Returns BaseAxisRange

      A new continuous-axis range with updated values

    • Determines whether the specified (start, end) interval matches the original interval

      Parameters

      • start: number

        The start of the interval

      • end: number

        The end of the interval

      Returns boolean

      true if the specified interval matches the original interval; false otherwise

    • Scales the axis-range by the specified scale factor from the specified value. The equations are written so that the zooming (scaling) occurs at the specified value, and expands/contracts equally from that value.

      Parameters

      • factor: number

        The scale factor

      • value: number

        The time from which to scale the interval

      Returns BaseAxisRange

      A new continuous-axis range with updated values

    • Scales the range using the current scale-factor (closure on scaleFactor)

      Parameters

      • factor: number

        The factor used to update the range

      • value: number

        The current value being scaled

      Returns AxisInterval

      The new range, represented by an array holding the start and end value

    • Translates the axis-range by the specified amount

      Parameters

      • amount: number

        The amount by which to translate the axis-range

      • Optionalconstraints: [start: number, end: number]

        Optional constraint interval in which the axis range must be within

      Returns BaseAxisRange

      An updated ContinuousAxisRange that has been translated by the specified amount

    • Updates the axis-range based on the new start and end values

      Parameters

      • start: number

        The new start of the axis-range

      • end: number

        The new end of the axis range

      Returns BaseAxisRange

      The updated axis-range type, with all other values unchanged

    • Updates the original range with the new start and end values.

      Parameters

      • start: number

        The new value for the start of the original range

      • end: number

        The new value for the end of the original range

      Returns BaseAxisRange

      The updated original range.