Core Plot (iOS and tvOS)
Cocoa plotting framework for macOS, iOS, and tvOS
CPTRangePlot.h
Go to the documentation of this file.
1 #import "CPTDefinitions.h"
2 #import "CPTLineStyle.h"
3 #import "CPTPlot.h"
4 
5 @class CPTFill;
6 @class CPTRangePlot;
7 
12 
15 extern CPTRangePlotBinding __nonnull const CPTRangePlotBindingXValues;
16 extern CPTRangePlotBinding __nonnull const CPTRangePlotBindingYValues;
24 
28 typedef NS_ENUM (NSInteger, CPTRangePlotField) {
35 };
36 
40 typedef NS_ENUM (NSInteger, CPTRangePlotFillDirection) {
43 };
44 
45 #pragma mark -
46 
51 @optional
52 
55 
61 -(nullable CPTLineStyleArray *)barLineStylesForRangePlot:(nonnull CPTRangePlot *)plot recordIndexRange:(NSRange)indexRange;
62 
72 -(nullable CPTLineStyle *)barLineStyleForRangePlot:(nonnull CPTRangePlot *)plot recordIndex:(NSUInteger)idx;
73 
79 -(nullable CPTNumberArray *)barWidthsForRangePlot:(nonnull CPTRangePlot *)plot recordIndexRange:(NSRange)indexRange;
80 
89 -(nullable NSNumber *)barWidthForRangePlot:(nonnull CPTRangePlot *)plot recordIndex:(NSUInteger)idx;
90 
92 
93 @end
94 
95 #pragma mark -
96 
101 
102 @optional
103 
106 
115 -(void)rangePlot:(nonnull CPTRangePlot *)plot rangeWasSelectedAtRecordIndex:(NSUInteger)idx;
116 
126 -(void)rangePlot:(nonnull CPTRangePlot *)plot rangeWasSelectedAtRecordIndex:(NSUInteger)idx withEvent:(nonnull CPTNativeEvent *)event;
127 
136 -(void)rangePlot:(nonnull CPTRangePlot *)plot rangeTouchDownAtRecordIndex:(NSUInteger)idx;
137 
147 -(void)rangePlot:(nonnull CPTRangePlot *)plot rangeTouchDownAtRecordIndex:(NSUInteger)idx withEvent:(nonnull CPTNativeEvent *)event;
148 
157 -(void)rangePlot:(nonnull CPTRangePlot *)plot rangeTouchUpAtRecordIndex:(NSUInteger)idx;
158 
168 -(void)rangePlot:(nonnull CPTRangePlot *)plot rangeTouchUpAtRecordIndex:(NSUInteger)idx withEvent:(nonnull CPTNativeEvent *)event;
169 
171 
172 @end
173 
174 #pragma mark -
175 
176 @interface CPTRangePlot : CPTPlot
177 
180 @property (nonatomic, readwrite, copy, nullable) CPTLineStyle *barLineStyle;
181 @property (nonatomic, readwrite) CGFloat barWidth;
182 @property (nonatomic, readwrite) CGFloat gapHeight;
183 @property (nonatomic, readwrite) CGFloat gapWidth;
185 
188 @property (nonatomic, readwrite) CPTRangePlotFillDirection fillDirection;
189 @property (nonatomic, copy, nullable) CPTFill *areaFill;
190 @property (nonatomic, readwrite, copy, nullable) CPTLineStyle *areaBorderLineStyle;
192 
195 -(void)reloadBarLineStyles;
196 -(void)reloadBarLineStylesInIndexRange:(NSRange)indexRange;
197 -(void)reloadBarWidths;
198 -(void)reloadBarWidthsInIndexRange:(NSRange)indexRange;
200 
201 @end
CPTRangePlotFillDirection
CPTRangePlotFillDirection
Enumeration of range plot data fill directions.
Definition: CPTRangePlot.h:40
CPTLineStyle
Immutable wrapper for various line drawing properties. Create a CPTMutableLineStyle if you want to cu...
Definition: CPTLineStyle.h:20
CPTRangePlotBindingLeftValues
CPTRangePlotBinding __nonnull const CPTRangePlotBindingLeftValues
Left price values.
Definition: CPTRangePlot.m:35
CPTRangePlot::barLineStyle
CPTLineStyle * barLineStyle
The line style of the range bars. Set to nil to have no bars. Default is a black line style.
Definition: CPTRangePlot.h:180
NSNumber
CPTRangePlotFillVertical
@ CPTRangePlotFillVertical
Fill between the left and right values in a vertical direction.
Definition: CPTRangePlot.h:42
CPTPlotDataSource-p
A plot data source.
Definition: CPTPlot.h:51
CPTRangePlotFieldLeft
@ CPTRangePlotFieldLeft
relative Left values.
Definition: CPTRangePlot.h:33
CPTRangePlotBindingHighValues
CPTRangePlotBinding __nonnull const CPTRangePlotBindingHighValues
High values.
Definition: CPTRangePlot.m:33
CPTRangePlotFieldHigh
@ CPTRangePlotFieldHigh
relative High values.
Definition: CPTRangePlot.h:31
CPTRangePlotBindingRightValues
CPTRangePlotBinding __nonnull const CPTRangePlotBindingRightValues
Right price values.
Definition: CPTRangePlot.m:36
CPTRangePlot::gapWidth
CGFloat gapWidth
Width of the central gap. Set to zero to have no gap.
Definition: CPTRangePlot.h:183
NSRange
typedef NSRange
CPTRangePlot::fillDirection
CPTRangePlotFillDirection fillDirection
Fill the range in a horizontal or vertical direction. Default is CPTRangePlotFillHorizontal.
Definition: CPTRangePlot.h:188
CPTRangePlotFieldY
@ CPTRangePlotFieldY
Y values.
Definition: CPTRangePlot.h:30
NSUInteger
typedef NSUInteger
CPTRangePlotBindingYValues
CPTRangePlotBinding __nonnull const CPTRangePlotBindingYValues
Y values.
Definition: CPTRangePlot.m:32
CPTRangePlot
A plot class representing a range of values in one coordinate, such as typically used to show errors....
Definition: CPTRangePlot.h:177
CPTRangePlotDataSource-p
A range plot data source.
Definition: CPTRangePlot.h:50
CPTFill
Draws area fills.
Definition: CPTFill.h:18
CPTRangePlotFieldLow
@ CPTRangePlotFieldLow
relative Low values.
Definition: CPTRangePlot.h:32
-[NSObject copy]
id copy
CPTRangePlotFieldRight
@ CPTRangePlotFieldRight
relative Right values.
Definition: CPTRangePlot.h:34
CPTRangePlot::areaFill
CPTFill * areaFill
The fill used to render the area. Set to nil to have no fill. Default is nil.
Definition: CPTRangePlot.h:189
CPTRangePlot::gapHeight
CGFloat gapHeight
Height of the central gap. Set to zero to have no gap.
Definition: CPTRangePlot.h:182
CPTRangePlot::barWidth
CGFloat barWidth
Width of the lateral sections of the bars.
Definition: CPTRangePlot.h:181
CPTDefinitions.h
CPTRangePlotDelegate-p
Range plot delegate.
Definition: CPTRangePlot.h:100
CPTPlot.h
-[CPTRangePlot reloadBarWidths]
void reloadBarWidths()
Reload all bar widths from the data source immediately.
Definition: CPTRangePlot.m:659
-[CPTRangePlot reloadBarLineStyles]
void reloadBarLineStyles()
Reload all bar line styles from the data source immediately.
Definition: CPTRangePlot.m:607
CPTPlot
An abstract plot class.
Definition: CPTPlot.h:258
CPTRangePlotField
CPTRangePlotField
Enumeration of range plot data source field types.
Definition: CPTRangePlot.h:28
NSArray
CPTLineStyle.h
CPTRangePlotBindingXValues
CPTRangePlotBinding __nonnull const CPTRangePlotBindingXValues
X values.
Definition: CPTRangePlot.m:31
cpt_swift_struct
#define cpt_swift_struct
Marks a type definition to be imported into Swift as a structure.
Definition: CPTDefinitions.h:73
NSString
CPTRangePlotBindingBarLineStyles
CPTRangePlotBinding __nonnull const CPTRangePlotBindingBarLineStyles
Bar line styles.
Definition: CPTRangePlot.m:37
CPTRangePlot::areaBorderLineStyle
CPTLineStyle * areaBorderLineStyle
The line style of the border line around the area fill. Set to nil to have no border line....
Definition: CPTRangePlot.h:190
CPTPlotDelegate-p
Plot delegate.
Definition: CPTPlot.h:170
CPTRangePlotBindingBarWidths
CPTRangePlotBinding __nonnull const CPTRangePlotBindingBarWidths
Bar widths.
Definition: CPTRangePlot.m:38
CPTRangePlotBindingLowValues
CPTRangePlotBinding __nonnull const CPTRangePlotBindingLowValues
Low values.
Definition: CPTRangePlot.m:34
CPTRangePlotFieldX
@ CPTRangePlotFieldX
X values.
Definition: CPTRangePlot.h:29
CPTRangePlotFillHorizontal
@ CPTRangePlotFillHorizontal
Fill between the high and low values in a horizontal direction.
Definition: CPTRangePlot.h:41