Returns the current distance between the start and end of the range.
Returns the original (e.g. before any zooming or panning) distance between the start and end of the range.
The ratio between the current and original distance.
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.
The scale factor
The value from which to scale the interval
The minimum and maximum values that range bounds can be
A new continuous-axis range with updated values
Determines whether the specified (start, end) interval matches the original interval
The start of the interval
The end of the interval
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.
The scale factor
The value from which to scale the interval
A new continuous-axis range with updated values
ProtectedscaledScales the range using the current scale-factor (closure on scaleFactor)
The factor used to update the range
The current value being scaled
The new range, represented by an array holding the start and end value
Translates the axis-range by the specified amount
The amount by which to translate the axis-range
Optionalconstraint: [start: number, end: number] = ...Optional constraint interval in which the axis range must be within
An updated ContinuousAxisRange that has been translated by the specified amount
Updates the axis-range with the new start and end values, leaving the original range unchanged.
The new start of the axis-range
The new end of the axis range
The updated axis-range type, with all other values unchanged.
Updates the original range with the new start and end values.
The new value for the start of the original range
The new value for the end of the original range
The updated original range.
StaticfromFactory function for creating a new continuous-axis range instance.
The start of the axis-range.
The end of the axis-range.
OptionaloriginalStart: number = startThe optional original start of the axis-range (e.g. before any zooming or panning. Defaults to the start value if not specified.)
OptionaloriginalEnd: number = endThe optional original end of the axis-range (e.g. before any zooming or panning. Defaults to the end value if not specified.)
A new continuous-axis range instance.
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.