Core Plot (macOS)
Cocoa plotting framework for macOS, iOS, and tvOS
|
A graph using a cartesian (X-Y) plot space. More...
#import <CPTXYGraph.h>
Public Instance Methods | |
Initialization | |
(nonnull instancetype) | - initWithFrame:xScaleType:yScaleType: |
Initializes a newly allocated CPTXYGraph object with the provided frame rectangle and scale types. More... | |
(nullable instancetype) | - initWithCoder: |
Returns an object initialized from data in a given unarchiver. More... | |
(nonnull instancetype) | - initWithLayer: |
Override to copy or initialize custom fields of the specified layer. More... | |
(nonnull instancetype) | - initWithFrame: [implementation] |
Initializes a newly allocated CPTXYGraph object with the provided frame rectangle. More... | |
Public Instance Methods inherited from CPTGraph | |
(void) | - reloadData |
Makes all plots reload their data. More... | |
(void) | - reloadDataIfNeeded |
Makes all plots reload their data if their data cache is out of date. More... | |
(nonnull CPTPlotArray *) | - allPlots |
All plots associated with the graph. More... | |
(nullable CPTPlot *) | - plotAtIndex: |
Gets the plot at the given index in the plot array. More... | |
(nullable CPTPlot *) | - plotWithIdentifier: |
Gets the plot with the given identifier from the plot array. More... | |
(void) | - addPlot: |
Add a plot to the default plot space. More... | |
(void) | - addPlot:toPlotSpace: |
Add a plot to the given plot space. More... | |
(void) | - removePlot: |
Remove a plot from the graph. More... | |
(void) | - removePlotWithIdentifier: |
Remove a plot from the graph. More... | |
(void) | - insertPlot:atIndex: |
Add a plot to the default plot space at the given index in the plot array. More... | |
(void) | - insertPlot:atIndex:intoPlotSpace: |
Add a plot to the given plot space at the given index in the plot array. More... | |
(nonnull CPTPlotSpaceArray *) | - allPlotSpaces |
All plot spaces associated with the graph. More... | |
(nullable CPTPlotSpace *) | - plotSpaceAtIndex: |
Gets the plot space at the given index in the plot space array. More... | |
(nullable CPTPlotSpace *) | - plotSpaceWithIdentifier: |
Gets the plot space with the given identifier from the plot space array. More... | |
(void) | - addPlotSpace: |
Add a plot space to the graph. More... | |
(void) | - removePlotSpace: |
Remove a plot space from the graph. More... | |
(void) | - applyTheme: |
Apply a theme to style the graph. More... | |
(BOOL) | - pointingDeviceDownEvent:atPoint: [implementation] |
Informs the receiver that the user has pressed the mouse button. More... | |
(BOOL) | - pointingDeviceUpEvent:atPoint: [implementation] |
Informs the receiver that the user has released the mouse button. More... | |
(BOOL) | - pointingDeviceDraggedEvent:atPoint: [implementation] |
Informs the receiver that the user has moved the mouse with the button pressed. More... | |
(BOOL) | - pointingDeviceCancelledEvent: [implementation] |
Informs the receiver that tracking of mouse moves has been cancelled for any reason. More... | |
(BOOL) | - scrollWheelEvent:fromPoint:toPoint: [implementation] |
(Required) Informs the receiver that the user has moved the scroll wheel. More... | |
(nullable CPTPlotSpace *) | - newPlotSpace |
Creates a new plot space for the graph. More... | |
(nullable CPTAxisSet *) | - newAxisSet |
Creates a new axis set for the graph. More... | |
Public Instance Methods inherited from CPTBorderedLayer | |
(void) | - renderBorderedLayerAsVectorInContext: |
Draws the fill and border of a CPTBorderedLayer into the given graphics context. More... | |
(void) | - sublayerMarginLeft:top:right:bottom: [implementation] |
Increases the sublayer margin on all four sides by half the width of the border line style. More... | |
Public Instance Methods inherited from CPTAnnotationHostLayer | |
(void) | - addAnnotation: |
Adds an annotation to the receiver. More... | |
(void) | - removeAnnotation: |
Removes an annotation from the receiver. More... | |
(void) | - removeAllAnnotations |
Removes all annotations from the receiver. More... | |
Public Instance Methods inherited from CPTLayer | |
(nonnull instancetype) | - init [implementation] |
Initializes a newly allocated CPTLayer object with an empty frame rectangle. More... | |
(void) | - logLayers |
Logs this layer and all of its sublayers. More... | |
(BOOL) | - pointingDeviceDownEvent:atPoint: [implementation] |
(BOOL) | - pointingDeviceUpEvent:atPoint: [implementation] |
(BOOL) | - pointingDeviceDraggedEvent:atPoint: [implementation] |
(BOOL) | - pointingDeviceCancelledEvent: [implementation] |
(BOOL) | - scrollWheelEvent:fromPoint:toPoint: [implementation] |
(nonnull CPTNativeImage *) | - imageOfLayer |
Gets an image of the layer contents. More... | |
(void) | - setNeedsDisplayAllLayers |
Recursively marks this layer and all sublayers as needing to be redrawn. More... | |
(void) | - renderAsVectorInContext: |
Draws layer content into the provided graphics context. More... | |
(void) | - recursivelyRenderInContext: |
Draws layer content and the content of all sublayers into the provided graphics context. More... | |
(void) | - layoutAndRenderInContext: |
Updates the layer layout if needed and then draws layer content and the content of all sublayers into the provided graphics context. More... | |
(nonnull NSData *) | - dataForPDFRepresentationOfLayer |
Draws layer content and the content of all sublayers into a PDF document. More... | |
(void) | - applySublayerMaskToContext:forSublayer:withOffset: |
Recursively sets the clipping path of the given graphics context to the sublayer masking paths of its superlayers. More... | |
(void) | - applyMaskToContext: |
Sets the clipping path of the given graphics context to mask the content. More... | |
(void) | - pixelAlign |
Align the receiver’s position with pixel boundaries. More... | |
(void) | - layoutSublayers [implementation] |
Updates the layout of all sublayers. Sublayers fill the super layer’s bounds minus any padding. More... | |
Public Instance Methods inherited from CALayer | |
(BOOL) | - containsPoint: |
(void) | - drawInContext: |
(id) | - init |
(id) | - initWithLayer |
(void) | - layoutSublayers |
(void) | - setNeedsDisplay |
(void) | - setNeedsDisplayInRect: |
(void) | - setNeedsLayout |
Public Instance Methods inherited from NSObject | |
(Class) | - classForCoder |
(id) | - copy |
(void) | - dealloc |
(void) | - finalize |
(id) | - init |
(id) | - mutableCopy |
Public Instance Methods inherited from <NSObject> | |
(NSString *) | - description |
(NSUInteger) | - hash |
(BOOL) | - isEqual: |
Public Instance Methods inherited from <NSKeyValueBindingCreation> | |
(NSArray *) | - exposedBindings |
(Class) | - valueClassForBinding: |
(void) | - bind:toObject:withKeyPath:options: |
(NSArray *) | - optionDescriptionsForBinding: |
(NSDictionary *) | - infoForBinding: |
(void) | - unbind: |
Public Instance Methods inherited from <NSCoding> | |
(id) | - initWithCoder: |
(void) | - encodeWithCoder: |
User Interaction |
Additional Inherited Members | |
Public Class Methods inherited from CALayer | |
(id) | + layer |
Public Class Methods inherited from NSObject | |
(id) | + alloc |
(Class) | + class |
(void) | + initialize |
(void) | + load |
(id) | + new |
Public Class Methods inherited from <NSKeyValueBindingCreation> | |
(void) | + exposeBinding: |
Public Class Methods inherited from <NSSecureCoding> | |
(BOOL) | + supportsSecureCoding: |
Properties inherited from CPTGraph | |
CPTGraphHostingView * | hostingView |
The hosting view that contains the graph. More... | |
NSString * | title |
The title string. More... | |
NSAttributedString * | attributedTitle |
The styled title string. More... | |
CPTTextStyle * | titleTextStyle |
The text style of the title. More... | |
CGPoint | titleDisplacement |
A vector giving the displacement of the title from the edge location. More... | |
CPTRectAnchor | titlePlotAreaFrameAnchor |
The location of the title with respect to the plot area frame. Default is CPTRectAnchorTop. More... | |
CPTAxisSet * | axisSet |
The axis set. More... | |
CPTPlotAreaFrame * | plotAreaFrame |
The plot area frame. More... | |
CPTPlotSpace * | defaultPlotSpace |
The default plot space. More... | |
CPTNumberArray * | topDownLayerOrder |
An array of graph layers to be drawn in an order other than the default. More... | |
CPTLegend * | legend |
The graph legend. Setting this property will automatically anchor the legend to the graph and position it using the legendAnchor and legendDisplacement properties. This is a convenience property only—the legend may be inserted in the layer tree and positioned like any other CPTLayer if more flexibility is needed. More... | |
CPTRectAnchor | legendAnchor |
The location of the legend with respect to the graph frame. Default is CPTRectAnchorBottom. More... | |
CGPoint | legendDisplacement |
A vector giving the displacement of the legend from the edge location. More... | |
Properties inherited from CPTBorderedLayer | |
CPTLineStyle * | borderLineStyle |
The line style for the layer border. More... | |
CPTFill * | fill |
The fill for the layer background. More... | |
BOOL | inLayout |
Set to YES when changing the layout of this layer. Otherwise, if masking the border, all layout property changes will be passed to the superlayer. More... | |
Properties inherited from CPTAnnotationHostLayer | |
CPTAnnotationArray * | annotations |
An array of annotations attached to this layer. More... | |
Properties inherited from CPTLayer | |
CPTGraph * | graph |
The graph for the layer. More... | |
CGFloat | paddingLeft |
Amount to inset the left side of each sublayer. More... | |
CGFloat | paddingTop |
Amount to inset the top of each sublayer. More... | |
CGFloat | paddingRight |
Amount to inset the right side of each sublayer. More... | |
CGFloat | paddingBottom |
Amount to inset the bottom of each sublayer. More... | |
id< NSCopying, NSCoding, NSObject > | identifier |
An object used to identify the layer in collections. More... | |
CGFloat | contentsScale |
The scale factor applied to the layer. More... | |
BOOL | useFastRendering |
If YES, subclasses should optimize their drawing for speed over precision. More... | |
CPTShadow * | shadow |
The shadow drawn under the layer content. If nil (the default), no shadow is drawn. More... | |
CGSize | shadowMargin |
The maximum margin size needed to fully enclose the layer shadow. More... | |
BOOL | masksToBorder |
If YES, a sublayer mask is applied to clip sublayer content to the inside of the border. More... | |
CGPathRef | outerBorderPath |
A drawing path that encompasses the outer boundary of the layer border. More... | |
CGPathRef | innerBorderPath |
A drawing path that encompasses the inner boundary of the layer border. More... | |
CGPathRef | maskingPath |
A drawing path that encompasses the layer content including any borders. Set to NULL when no masking is desired. More... | |
CGPathRef | sublayerMaskingPath |
A drawing path that encompasses the layer content excluding any borders. Set to NULL when no masking is desired. More... | |
CPTSublayerSet * | sublayersExcludedFromAutomaticLayout |
A set of sublayers that should be excluded from the automatic sublayer layout. More... | |
Properties inherited from CALayer | |
CGPoint | anchorPoint |
CGRect | bounds |
CGFloat | contentsScale |
CGFloat | cornerRadius |
id | delegate |
CGRect | frame |
BOOL | masksToBounds |
BOOL | needsDisplayOnBoundsChange |
BOOL | opacity |
BOOL | opaque |
Properties inherited from <CAMediaTiming> | |
BOOL | autoreverses |
CFTimeInterval | beginTime |
CFTimeInterval | duration |
NSString * | fillMode |
float | repeatCount |
id | repeatDuration |
float | speed |
CFTimeInterval | timeOffset |
A graph using a cartesian (X-Y) plot space.
- (nullable instancetype) initWithCoder: | (nonnull NSCoder *) | coder |
Returns an object initialized from data in a given unarchiver.
coder | An unarchiver object. |
Reimplemented from CPTLayer.
|
implementation |
Initializes a newly allocated CPTXYGraph object with the provided frame rectangle.
The initialized layer will have the following properties:
newFrame | The frame rectangle. |
Reimplemented from CPTGraph.
- (nonnull instancetype) initWithFrame: | (CGRect) | newFrame | |
xScaleType: | (CPTScaleType) | newXScaleType | |
yScaleType: | (CPTScaleType) | newYScaleType | |
Initializes a newly allocated CPTXYGraph object with the provided frame rectangle and scale types.
This is the designated initializer.
newFrame | The frame rectangle. |
newXScaleType | The scale type for the x-axis. |
newYScaleType | The scale type for the y-axis. |
- (nonnull instancetype) initWithLayer: | (nonnull id) | layer |
Override to copy or initialize custom fields of the specified layer.
layer | The layer from which custom fields should be copied. |
layer
. Reimplemented from CPTLayer.