stream-charts
    Preparing search index...

    An immutable continuous-axis range that holds the current range and the original (no zoom) range. Create an instance using the ContinuousAxisRange.from factory method.

    Hierarchy (View Summary)

    Index

    Properties

    current: AxisInterval
    original: AxisInterval

    Accessors

    • get currentDistance(): number

      Returns the current distance between the start and end of the range.

      Returns number

    • get originalDistance(): number

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

      Returns number

    • get scaleFactor(): number

      The ratio between the current and original distance.

      Returns number

    Methods

    • Scales the axis-range by the specified scale factor from the specified value, while keeping the range within the constraints (start, end). 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 from which to scale the interval

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

        The minimum and maximum values that range bounds can be

      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 value from which to scale the interval

      Returns ContinuousAxisRange

      A new continuous-axis range with updated values

    • Factory function for creating a new continuous-axis range instance.

      Parameters

      • start: number

        The start of the axis-range.

      • end: number

        The end of the axis-range.

      • OptionaloriginalStart: number = start

        The optional original start of the axis-range (e.g. before any zooming or panning. Defaults to the start value if not specified.)

      • OptionaloriginalEnd: number = end

        The optional original end of the axis-range (e.g. before any zooming or panning. Defaults to the end value if not specified.)

      Returns ContinuousAxisRange

      A new continuous-axis range instance.