Core Plot (macOS)
Cocoa plotting framework for macOS, iOS, and tvOS
CPTPlotRange.h
Go to the documentation of this file.
1 #import "CPTDefinitions.h"
2 
4 
5 @class CPTPlotRange;
6 
10 typedef NS_CLOSED_ENUM(NSInteger, CPTPlotRangeComparisonResult) {
15 };
16 
21 
26 
28 
31 @property (nonatomic, readonly, strong, nonnull) NSNumber *location;
32 @property (nonatomic, readonly, strong, nonnull) NSNumber *length;
33 @property (nonatomic, readonly, strong, nonnull) NSNumber *end;
34 @property (nonatomic, readonly) NSDecimal locationDecimal;
35 @property (nonatomic, readonly) NSDecimal lengthDecimal;
36 @property (nonatomic, readonly) NSDecimal endDecimal;
37 @property (nonatomic, readonly) double locationDouble;
38 @property (nonatomic, readonly) double lengthDouble;
39 @property (nonatomic, readonly) double endDouble;
40 
41 @property (nonatomic, readonly, strong, nonnull) NSNumber *minLimit;
42 @property (nonatomic, readonly, strong, nonnull) NSNumber *midPoint;
43 @property (nonatomic, readonly, strong, nonnull) NSNumber *maxLimit;
44 @property (nonatomic, readonly) NSDecimal minLimitDecimal;
45 @property (nonatomic, readonly) NSDecimal midPointDecimal;
46 @property (nonatomic, readonly) NSDecimal maxLimitDecimal;
47 @property (nonatomic, readonly) double minLimitDouble;
48 @property (nonatomic, readonly) double midPointDouble;
49 @property (nonatomic, readonly) double maxLimitDouble;
50 
51 @property (nonatomic, readonly) BOOL isInfinite;
52 @property (nonatomic, readonly) CPTSign lengthSign;
54 
57 +(nonnull instancetype)plotRangeWithLocation:(nonnull NSNumber *)loc length:(nonnull NSNumber *)len;
58 +(nonnull instancetype)plotRangeWithLocationDecimal:(NSDecimal)loc lengthDecimal:(NSDecimal)len;
60 
63 -(nonnull instancetype)initWithLocation:(nonnull NSNumber *)loc length:(nonnull NSNumber *)len NS_DESIGNATED_INITIALIZER;
64 -(nonnull instancetype)initWithLocationDecimal:(NSDecimal)loc lengthDecimal:(NSDecimal)len;
65 -(nullable instancetype)initWithCoder:(nonnull NSCoder *)decoder NS_DESIGNATED_INITIALIZER;
67 
70 -(BOOL)contains:(NSDecimal)number;
71 -(BOOL)containsDouble:(double)number;
72 -(BOOL)containsNumber:(nullable NSNumber *)number;
73 -(BOOL)isEqualToRange:(nullable CPTPlotRange *)otherRange;
74 -(BOOL)containsRange:(nullable CPTPlotRange *)otherRange;
75 -(BOOL)intersectsRange:(nullable CPTPlotRange *)otherRange;
77 
80 -(CPTPlotRangeComparisonResult)compareToNumber:(nonnull NSNumber *)number;
81 -(CPTPlotRangeComparisonResult)compareToDecimal:(NSDecimal)number;
82 -(CPTPlotRangeComparisonResult)compareToDouble:(double)number;
84 
85 @end
CPTPlotRange::end
NSNumber * end
The ending value of the range, equivalent to location + length.
Definition: CPTPlotRange.h:33
CPTPlotRangeComparisonResultNumberBelowRange
@ CPTPlotRangeComparisonResultNumberBelowRange
Number is below the range.
Definition: CPTPlotRange.h:11
CPTPlotRange::lengthSign
CPTSign lengthSign
The direction (positive or negative) if the length of the range is infinite.
Definition: CPTPlotRange.h:52
NSArray
CPTPlotRangeArray
NSArray< CPTPlotRange * > CPTPlotRangeArray
An array of plot ranges.
Definition: CPTPlotRange.h:20
CPTPlotRangeComparisonResultNumberUndefined
@ CPTPlotRangeComparisonResultNumberUndefined
Number is undefined (e.g., NaN).
Definition: CPTPlotRange.h:14
CPTPlotRange::midPointDecimal
NSDecimal midPointDecimal
The middle value of the range.
Definition: CPTPlotRange.h:45
CPTPlotRange
Defines an immutable range of plot data.
Definition: CPTPlotRange.h:27
CPTPlotRange::endDouble
double endDouble
The ending value of the range as a double, equivalent to locationDouble + lengthDouble.
Definition: CPTPlotRange.h:39
CPTPlotRange::locationDecimal
NSDecimal locationDecimal
The starting value of the range.
Definition: CPTPlotRange.h:34
CPTPlotRange::maxLimitDecimal
NSDecimal maxLimitDecimal
The maximum extreme value of the range.
Definition: CPTPlotRange.h:46
CPTPlotRange::midPoint
NSNumber * midPoint
The middle value of the range.
Definition: CPTPlotRange.h:42
CPTPlotRangeComparisonResultNumberAboveRange
@ CPTPlotRangeComparisonResultNumberAboveRange
Number is above the range.
Definition: CPTPlotRange.h:13
CPTPlotRangeComparisonResult
CPTPlotRangeComparisonResult
Enumeration of possible results of a plot range comparison.
Definition: CPTPlotRange.h:10
CPTSign
CPTSign
Enumeration of label positioning offset directions.
Definition: CPTDefinitions.h:185
BOOL
typedef BOOL
CPTPlotRange::midPointDouble
double midPointDouble
The middle value of the range as a double.
Definition: CPTPlotRange.h:48
CPTDefinitions.h
CPTPlotRange::length
NSNumber * length
The length of the range.
Definition: CPTPlotRange.h:32
CPTPlotRange::minLimit
NSNumber * minLimit
The minimum extreme value of the range.
Definition: CPTPlotRange.h:41
CPTPlotRange::locationDouble
double locationDouble
The starting value of the range as a double.
Definition: CPTPlotRange.h:37
CPTPlotRange::minLimitDouble
double minLimitDouble
The minimum extreme value of the range as a double.
Definition: CPTPlotRange.h:47
CPTMutablePlotRangeArray
NSMutableArray< CPTPlotRange * > CPTMutablePlotRangeArray
A mutable array of plot ranges.
Definition: CPTPlotRange.h:25
CPTPlotRange::maxLimit
NSNumber * maxLimit
The maximum extreme value of the range.
Definition: CPTPlotRange.h:43
CPTPlotRange::location
NSNumber * location
The starting value of the range.
Definition: CPTPlotRange.h:31
CPTPlotRange::minLimitDecimal
NSDecimal minLimitDecimal
The minimum extreme value of the range.
Definition: CPTPlotRange.h:44
CPTPlotRange::isInfinite
BOOL isInfinite
YES if the length of the range is infinite.
Definition: CPTPlotRange.h:51
NSDecimal
typedef NSDecimal
CPTPlotRangeComparisonResultNumberInRange
@ CPTPlotRangeComparisonResultNumberInRange
Number is in the range.
Definition: CPTPlotRange.h:12
CPTPlotRange::maxLimitDouble
double maxLimitDouble
The maximum extreme value of the range as a double.
Definition: CPTPlotRange.h:49
NSSecureCoding-p
CPTPlotRange::endDecimal
NSDecimal endDecimal
The ending value of the range, equivalent to locationDecimal + lengthDecimal.
Definition: CPTPlotRange.h:36
CPTPlotRange::lengthDouble
double lengthDouble
The length of the range as a double.
Definition: CPTPlotRange.h:38
CPTPlotRange::lengthDecimal
NSDecimal lengthDecimal
The length of the range.
Definition: CPTPlotRange.h:35
NSCoder