
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;
-
Gets or sets the max value of this range.
Declaration
Objective-C
@property (nonatomic, strong) id<ISCIComparable> _Nonnull max;
-
Gets the difference -
max - min
- of this range.Declaration
Objective-C
@property (nonatomic, strong, readonly) id<ISCIComparable> _Nonnull diff;
-
Gets whether this Range is defined.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL isDefined;
-
Gets whether the range is Zero, where max equals min.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL isZero;
-
Gets whether the min and max value are valid
min <= max
.Declaration
Objective-C
@property (nonatomic, readonly) BOOL isMinMaxValid;
-
Gets the double representation of min value.
Declaration
Objective-C
@property (nonatomic, readonly) double minAsDouble;
-
Gets the double representation of max value.
Declaration
Objective-C
@property (nonatomic, readonly) double maxAsDouble;
-
Returns true if the value is within the min and max of the Range.
Declaration
Objective-C
- (BOOL)isValueWithinTheRange:(nonnull id<ISCIComparable>)value;
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;
Parameters
minFraction
The min fraction to grow by. For example,
min = -10
andminFraction = 0.1
will result in the newmin = -11
.maxFraction
The max fraction to grow by. For example,
max = 10
andminFraction = 0.2
will result in the newmax = 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;
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;
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;
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;
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;
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;
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;
Parameters
range
input range.
-
Performs the union of two
ISCIRange
instances.Declaration
Objective-C
- (void)unionWith:(nonnull id<ISCIRange>)range;
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;
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;
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;
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;
Return Value
A clone of this instance.
-
Adds
SCIRangeChangeObserverProtocol
instance to listen changes of thisISCIRange
instance.Declaration
Objective-C
- (void)addRangeChangeObserver:(nonnull SCIRangeChangeObserver)observer;
Parameters
observer
The observer to add.
-
Removes
SCIRangeChangeObserverProtocol
instance from list of change listeners for thisISCIRange
instance.Declaration
Objective-C
- (void)removeRangeChangeObserver:(nonnull SCIRangeChangeObserver)observer;
Parameters
observer
The observer to remove.