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 or sets the min value of this range.
Declaration
Objective-C
@property (nonatomic, strong) id<ISCIComparable> _Nonnull min;Swift
var min: any ISCIComparable { get set } -
Gets or sets the max value of this range.
Declaration
Objective-C
@property (nonatomic, strong) id<ISCIComparable> _Nonnull max;Swift
var max: any 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: any 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: any ISCIComparable) -> BoolParameters
valuethe value to test.
Return Value
true if the value is within the Min and Max of the Range.
-
Grows the current
ISCIRangeby 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
minFractionThe min fraction to grow by. For example,
min = -10andminFraction = 0.1will result in the newmin = -11.maxFractionThe max fraction to grow by. For example,
max = 10andminFraction = 0.2will result in the newmax = 12. -
Sets the min, max values on the
ISCIRangewith 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: any ISCIRange)Parameters
minNew min value.
maxNew max value.
maximumRangeThe 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
minNew min value.
maxNew max value.
-
Sets the min, max values on the
ISCIRangewithout equals checks.Declaration
Objective-C
- (void)setForcedDoubleMinTo:(double)min maxTo:(double)max;Swift
func setForcedDoubleMinTo(_ min: Double, maxTo max: Double)Parameters
minNew min value.
maxNew max value.
-
Sets the min, max values on the
ISCIRangewith 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: any ISCIComparable, maxTo max: any ISCIComparable, withLimit maximumRange: any ISCIRange)Parameters
minNew min value.
maxNew max value.
maximumRangeThe 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: any ISCIComparable, maxTo max: any ISCIComparable)Parameters
minNew min value.
maxNew max value.
-
Sets the min, max values on the
ISCIRangewithout equals checks.Declaration
Objective-C
- (void)setForcedMinTo:(nonnull id<ISCIComparable>)min maxTo:(nonnull id<ISCIComparable>)max;Swift
func setForcedMinTo(_ min: any ISCIComparable, maxTo max: any ISCIComparable)Parameters
minNew min value.
maxNew max value.
-
Sets the min, max values on the
ISCIRangewith a range.Declaration
Objective-C
- (void)setRange:(nonnull id<ISCIRange>)range;Swift
func setRange(_ range: any ISCIRange)Parameters
rangeinput range.
-
Performs the union of two
ISCIRangeinstances.Declaration
Objective-C
- (void)unionWith:(nonnull id<ISCIRange>)range;Swift
func union(with range: any ISCIRange)Parameters
rangeinput range.
-
Performs the union of two
ISCIRangeinstances.Declaration
Objective-C
- (void)unionWithMin:(nonnull id<ISCIComparable>)min max:(nonnull id<ISCIComparable>)max;Swift
func union(withMin min: any ISCIComparable, max: any ISCIComparable)Parameters
minThe min value.
maxThe max value.
-
Clips the current
ISCIRangeto a maximum range with MinMax mode.Declaration
Objective-C
- (void)clipTo:(nonnull id<ISCIRange>)maximumRange;Swift
func clip(to maximumRange: any ISCIRange)Parameters
maximumRangerange to compare.
-
Clips the current
ISCIRangeto a maximum according to clip mode.Declaration
Objective-C
- (void)clipTo:(nonnull id<ISCIRange>)maximumRange clipMode:(SCIRangeClipMode)clipMode;Swift
func clip(to maximumRange: any ISCIRange, clipMode: SCIRangeClipMode)Parameters
maximumRangerange to compare.
clipModeclip 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() -> any ISCIRangeReturn Value
A clone of this instance.
-
Adds
SCIRangeChangeObserverProtocolinstance to listen changes of thisISCIRangeinstance.Declaration
Objective-C
- (void)addRangeChangeObserver:(nonnull SCIRangeChangeObserver)observer;Swift
func addChangeObserver(_ observer: @escaping SCIRangeChangeObserver)Parameters
observerThe observer to add.
-
Removes
SCIRangeChangeObserverProtocolinstance from list of change listeners for thisISCIRangeinstance.Declaration
Objective-C
- (void)removeRangeChangeObserver:(nonnull SCIRangeChangeObserver)observer;Swift
func removeChangeObserver(_ observer: @escaping SCIRangeChangeObserver)Parameters
observerThe observer to remove.
View on GitHub