iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x

ISCIRange

@protocol ISCIRange <NSObject>

Defines protcol for ranges. Range is defined by min, max values and type.

  • Gets the ISCIMath associated with this range.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) id<ISCIMath> _Nonnull math;

    Swift

    var math: ISCIMath { get }
  • min

    Gets or sets the min value of this range.

    Declaration

    Objective-C

    @property (nonatomic, strong) id<ISCIComparable> _Nonnull min;

    Swift

    var min: ISCIComparable { get set }
  • max

    Gets or sets the max value of this range.

    Declaration

    Objective-C

    @property (nonatomic, strong) id<ISCIComparable> _Nonnull max;

    Swift

    var max: ISCIComparable { get set }
  • Gets the difference - max - min - of this range.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) id<ISCIComparable> _Nonnull diff;

    Swift

    var diff: ISCIComparable { get }
  • Gets whether this Range is defined.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isDefined;

    Swift

    var isDefined: Bool { get }
  • Gets whether the range is Zero, where max equals min.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isZero;

    Swift

    var isZero: Bool { get }
  • Gets whether the min and max value are valid min <= max.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isMinMaxValid;

    Swift

    var isMinMaxValid: Bool { get }
  • Gets the double representation of min value.

    Declaration

    Objective-C

    @property (nonatomic, readonly) double minAsDouble;

    Swift

    var minAsDouble: Double { get }
  • Gets the double representation of max value.

    Declaration

    Objective-C

    @property (nonatomic, readonly) double maxAsDouble;

    Swift

    var maxAsDouble: Double { get }
  • Returns true if the value is within the min and max of the Range.

    Declaration

    Objective-C

    - (BOOL)isValueWithinTheRange:(nonnull id<ISCIComparable>)value;

    Swift

    func isValue(withinTheRange value: ISCIComparable) -> Bool

    Parameters

    value

    the value to test.

    Return Value

    true if the value is within the Min and Max of the Range.

  • Grows the current ISCIRange by the min and max fraction.

    Declaration

    Objective-C

    - (void)growMinBy:(double)minFraction maxBy:(double)maxFraction;

    Swift

    func growMin(by minFraction: Double, maxBy maxFraction: Double)

    Parameters

    minFraction

    The min fraction to grow by. For example, min = -10 and minFraction = 0.1 will result in the new min = -11.

    maxFraction

    The max fraction to grow by. For example, max = 10 and minFraction = 0.2 will result in the new max = 12.

  • Sets the min, max values on the ISCIRange with a max range to clip values to.

    Declaration

    Objective-C

    - (void)setDoubleMinTo:(double)min
                     maxTo:(double)max
                 withLimit:(nonnull id<ISCIRange>)maximumRange;

    Swift

    func setDoubleMinTo(_ min: Double, maxTo max: Double, withLimit maximumRange: ISCIRange)

    Parameters

    min

    New min value.

    max

    New max value.

    maximumRange

    The max range, which is used to clip values.

  • Sets the min, max values on the ISCIRange.

    Declaration

    Objective-C

    - (void)setDoubleMinTo:(double)min maxTo:(double)max;

    Swift

    func setDoubleMinTo(_ min: Double, maxTo max: Double)

    Parameters

    min

    New min value.

    max

    New max value.

  • Sets the min, max values on the ISCIRange without equals checks.

    Declaration

    Objective-C

    - (void)setForcedDoubleMinTo:(double)min maxTo:(double)max;

    Swift

    func setForcedDoubleMinTo(_ min: Double, maxTo max: Double)

    Parameters

    min

    New min value.

    max

    New max value.

  • Sets the min, max values on the ISCIRange with a max range to clip values to.

    Declaration

    Objective-C

    - (void)setMinTo:(nonnull id<ISCIComparable>)min
               maxTo:(nonnull id<ISCIComparable>)max
           withLimit:(nonnull id<ISCIRange>)maximumRange;

    Swift

    func setMinTo(_ min: ISCIComparable, maxTo max: ISCIComparable, withLimit maximumRange: ISCIRange)

    Parameters

    min

    New min value.

    max

    New max value.

    maximumRange

    The max range, which is used to clip values.

  • Sets the min, max values on the ISCIRange.

    Declaration

    Objective-C

    - (void)setMinTo:(nonnull id<ISCIComparable>)min
               maxTo:(nonnull id<ISCIComparable>)max;

    Swift

    func setMinTo(_ min: ISCIComparable, maxTo max: ISCIComparable)

    Parameters

    min

    New min value.

    max

    New max value.

  • Sets the min, max values on the ISCIRange without equals checks.

    Declaration

    Objective-C

    - (void)setForcedMinTo:(nonnull id<ISCIComparable>)min
                     maxTo:(nonnull id<ISCIComparable>)max;

    Swift

    func setForcedMinTo(_ min: ISCIComparable, maxTo max: ISCIComparable)

    Parameters

    min

    New min value.

    max

    New max value.

  • Sets the min, max values on the ISCIRange with a range.

    Declaration

    Objective-C

    - (void)setRange:(nonnull id<ISCIRange>)range;

    Swift

    func setRange(_ range: ISCIRange)

    Parameters

    range

    input range.

  • Performs the union of two ISCIRange instances.

    Declaration

    Objective-C

    - (void)unionWith:(nonnull id<ISCIRange>)range;

    Swift

    func union(with range: ISCIRange)

    Parameters

    range

    input range.

  • Performs the union of two ISCIRange instances.

    Declaration

    Objective-C

    - (void)unionWithMin:(nonnull id<ISCIComparable>)min
                     max:(nonnull id<ISCIComparable>)max;

    Swift

    func union(withMin min: ISCIComparable, max: ISCIComparable)

    Parameters

    min

    The min value.

    max

    The max value.

  • Clips the current ISCIRange to a maximum range with MinMax mode.

    Declaration

    Objective-C

    - (void)clipTo:(nonnull id<ISCIRange>)maximumRange;

    Swift

    func clip(to maximumRange: ISCIRange)

    Parameters

    maximumRange

    range to compare.

  • Clips the current ISCIRange to a maximum according to clip mode.

    Declaration

    Objective-C

    - (void)clipTo:(nonnull id<ISCIRange>)maximumRange
          clipMode:(SCIRangeClipMode)clipMode;

    Swift

    func clip(to maximumRange: ISCIRange, clipMode: SCIRangeClipMode)

    Parameters

    maximumRange

    range to compare.

    clipMode

    clip mode which defines how to clip range.

  • Creates and returns a copy of this object.

    Declaration

    Objective-C

    - (nonnull id<ISCIRange>)clone;

    Swift

    func clone() -> ISCIRange

    Return Value

    A clone of this instance.

  • Adds SCIRangeChangeObserverProtocol instance to listen changes of this ISCIRange instance.

    Declaration

    Objective-C

    - (void)addRangeChangeObserver:(nonnull SCIRangeChangeObserver)observer;

    Swift

    func addChangeObserver(_ observer: @escaping SCIRangeChangeObserver)

    Parameters

    observer

    The observer to add.

  • Removes SCIRangeChangeObserverProtocol instance from list of change listeners for this ISCIRange instance.

    Declaration

    Objective-C

    - (void)removeRangeChangeObserver:(nonnull SCIRangeChangeObserver)observer;

    Swift

    func removeChangeObserver(_ observer: @escaping SCIRangeChangeObserver)

    Parameters

    observer

    The observer to remove.