Core Plot (iOS and tvOS)
Cocoa plotting framework for macOS, iOS, and tvOS
CPTAxis Class Reference

An abstract axis class. More...

#import <CPTAxis.h>

+ Inheritance diagram for CPTAxis:
+ Collaboration diagram for CPTAxis:

Public Instance Methods

(CGPoint- viewPointForCoordinateValue: [implementation]
 Converts a position on the axis to drawing coordinates. More...
 
(void) - drawGridLinesInContext:isMajor: [implementation]
 Draws grid lines into the provided graphics context. More...
 
(void) - drawBackgroundBandsInContext: [implementation]
 Draws alternating background bands into the provided graphics context. More...
 
(void) - drawBackgroundLimitsInContext: [implementation]
 Draws background limit ranges into the provided graphics context. More...
 
Ticks
(nullable CPTNumberSet *) - filteredMajorTickLocations:
 Removes any major ticks falling inside the label exclusion ranges from the set of tick locations. More...
 
(nullable CPTNumberSet *) - filteredMinorTickLocations:
 Removes any minor ticks falling inside the label exclusion ranges from the set of tick locations. More...
 
Initialization
(nonnull instancetype) - initWithFrame: [implementation]
 Initializes a newly allocated CPTAxis object with the provided frame rectangle. More...
 
Layout
(void) - layoutSublayers [implementation]
 Updates the layout of all sublayers. The axes are relabeled if needed and all axis labels are repositioned. More...
 
User Interaction
(BOOL- pointingDeviceDownEvent:atPoint: [implementation]
 Informs the receiver that the user has started touching the screen. More...
 
(BOOL- pointingDeviceUpEvent:atPoint: [implementation]
 Informs the receiver that the user has ended touching the screen. More...
 
Coordinate Space Conversions
(CGPoint- viewPointForCoordinateValue:
 
- Public Instance Methods inherited from CPTLayer
(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) - 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]
 
(nullable 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) - sublayerMarginLeft:top:right:bottom:
 Returns the margins that should be left between the bounds of the receiver and all sublayers. 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 <CPTResponder>
(BOOL- pointingDeviceDraggedEvent:atPoint:
 (Required) Informs the receiver that the user has moved their finger while touching the screen. More...
 
(BOOL- pointingDeviceCancelledEvent:
 (Required) Informs the receiver that tracking of touches has been cancelled for any reason. More...
 

Properties

Axis
CPTLineStyleaxisLineStyle
 The line style for the axis line. If nil, the line is not drawn. More...
 
CPTCoordinate coordinate
 The axis coordinate. More...
 
NSNumberlabelingOrigin
 The origin used for axis labels. The default value is 0. It is only used when the axis labeling policy is CPTAxisLabelingPolicyFixedInterval. The origin is a reference point used to being labeling. Labels are added at the origin, as well as at fixed intervals above and below the origin. More...
 
CPTSign tickDirection
 The tick direction. The direction is given as the sign that ticks extend along the axis (e.g., positive or negative). More...
 
CPTPlotRangevisibleRange
 The plot range over which the axis and ticks are visible. Use this to restrict an axis and its grid lines to less than the full plot area width. Use the visibleAxisRange to specify a separate range for the axis line, if needed. Set to nil for no restriction. More...
 
CPTPlotRangevisibleAxisRange
 The plot range over which the axis itself is visible. Use this to restrict an axis line to less than the full plot area width. This range is independent of the visibleRange and overrides it for the axis line and line cap. Set to nil to use the visibleRange instead. More...
 
CPTLineCapaxisLineCapMin
 The line cap for the end of the axis line with the minimum value. More...
 
CPTLineCapaxisLineCapMax
 The line cap for the end of the axis line with the maximum value. More...
 
Major Ticks
NSNumbermajorIntervalLength
 The distance between major tick marks expressed in data coordinates. More...
 
CGFloat majorTickLength
 The length of the major tick marks. More...
 
CPTLineStylemajorTickLineStyle
 The line style for the major tick marks. If nil, the major ticks are not drawn. More...
 
CPTNumberSetmajorTickLocations
 A set of axis coordinates for all major tick marks. More...
 
NSUInteger preferredNumberOfMajorTicks
 The number of ticks that should be targeted when auto-generating positions. This property only applies when the CPTAxisLabelingPolicyAutomatic or CPTAxisLabelingPolicyEqualDivisions policies are in use. If zero (0) (the default), Core Plot will choose a reasonable number of ticks. More...
 
Minor Ticks
NSUInteger minorTicksPerInterval
 The number of minor tick marks drawn in each major tick interval. More...
 
CGFloat minorTickLength
 The length of the minor tick marks. More...
 
CPTLineStyleminorTickLineStyle
 The line style for the minor tick marks. If nil, the minor ticks are not drawn. More...
 
CPTNumberSetminorTickLocations
 A set of axis coordinates for all minor tick marks. More...
 
Plot Space
CPTPlotSpaceplotSpace
 The plot space for the axis. More...
 
Layers
BOOL separateLayers
 Use separate layers for drawing grid lines? More...
 
CPTPlotAreaplotArea
 The plot area that the axis belongs to. More...
 
CPTGridLinesminorGridLines
 The layer that draws the minor grid lines. More...
 
CPTGridLinesmajorGridLines
 The layer that draws the major grid lines. More...
 
CPTAxisSetaxisSet
 The axis set that the axis belongs to. More...
 
- Properties inherited from CPTLayer
CPTGraphgraph
 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, NSObjectidentifier
 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...
 
CPTShadowshadow
 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...
 
CPTSublayerSetsublayersExcludedFromAutomaticLayout
 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
 
NSStringfillMode
 
float repeatCount
 
id repeatDuration
 
float speed
 
CFTimeInterval timeOffset
 

Title

CPTTextStyletitleTextStyle
 The text style used to draw the axis title text. More...
 
CPTAxisTitleaxisTitle
 The axis title. If nil, no title is drawn. More...
 
CGFloat titleOffset
 The offset distance between the axis title and the axis line. More...
 
NSStringtitle
 A convenience property for setting the text title of the axis. More...
 
NSAttributedStringattributedTitle
 A convenience property for setting the styled text title of the axis. More...
 
CGFloat titleRotation
 The rotation angle of the axis title in radians. If NaN (the default), the title will be parallel to the axis. More...
 
CPTSign titleDirection
 The offset direction for the axis title. The direction is given as the sign that ticks extend along the axis (e.g., positive or negative). If the title direction is CPTSignNone (the default), the title is offset in the direction indicated by the tickDirection. More...
 
NSNumbertitleLocation
 The position along the axis where the axis title should be centered. If NaN (the default), the defaultTitleLocation will be used. More...
 
NSNumberdefaultTitleLocation
 The position along the axis where the axis title should be centered if titleLocation is NaN. More...
 
(void) - updateAxisTitle
 Update the axis title position. More...
 

Labels

CPTAxisLabelingPolicy labelingPolicy
 The axis labeling policy. More...
 
CGFloat labelOffset
 The offset distance between the tick marks and labels. More...
 
CGFloat minorTickLabelOffset
 The offset distance between the minor tick marks and labels. More...
 
CGFloat labelRotation
 The rotation of the axis labels in radians. Set this property to Ï€/2 to have labels read up the screen, for example. More...
 
CGFloat minorTickLabelRotation
 The rotation of the axis minor tick labels in radians. Set this property to Ï€/2 to have labels read up the screen, for example. More...
 
CPTAlignment labelAlignment
 The alignment of the axis label with respect to the tick mark. More...
 
CPTAlignment minorTickLabelAlignment
 The alignment of the axis label with respect to the tick mark. More...
 
CPTTextStylelabelTextStyle
 The text style used to draw the label text. More...
 
CPTTextStyleminorTickLabelTextStyle
 The text style used to draw the label text of minor tick labels. More...
 
CPTSign tickLabelDirection
 The offset direction for major tick labels. The direction is given as the sign that ticks extend along the axis (e.g., positive or negative). If the label direction is CPTSignNone (the default), the labels are offset in the direction indicated by the tickDirection. More...
 
CPTSign minorTickLabelDirection
 The offset direction for minor tick labels. The direction is given as the sign that ticks extend along the axis (e.g., positive or negative). If the label direction is CPTSignNone (the default), the labels are offset in the direction indicated by the tickDirection. More...
 
NSFormatterlabelFormatter
 The number formatter used to format the label text. If you need a non-numerical label, such as a date, you can use a formatter than turns the numerical plot coordinate into a string (e.g., “Jan 10, 2010”). The CPTCalendarFormatter and CPTTimeFormatter classes are useful for this purpose. More...
 
NSFormatterminorTickLabelFormatter
 The number formatter used to format the label text of minor ticks. If you need a non-numerical label, such as a date, you can use a formatter than turns the numerical plot coordinate into a string (e.g., “Jan 10, 2010”). The CPTCalendarFormatter and CPTTimeFormatter classes are useful for this purpose. More...
 
CPTAxisLabelSetaxisLabels
 The set of axis labels. More...
 
CPTAxisLabelSetminorTickAxisLabels
 The set of minor tick axis labels. More...
 
BOOL needsRelabel
 If YES, the axis needs to be relabeled before the layer content is drawn. More...
 
CPTPlotRangeArraylabelExclusionRanges
 An array of CPTPlotRange objects. Any tick marks and labels falling inside any of the ranges in the array will not be drawn. More...
 
CPTShadowlabelShadow
 The shadow applied to each axis label. More...
 
CPTShadowminorTickLabelShadow
 The shadow applied to each minor tick axis label. More...
 
(void) - relabel
 Updates the axis labels. More...
 
(void) - setNeedsRelabel
 Marks the receiver as needing to update the labels before the content is next drawn. More...
 
(void) - updateMajorTickLabels
 Update the major tick mark labels. More...
 
(void) - updateMinorTickLabels
 Update the minor tick mark labels. More...
 

Grid Lines

CPTLineStylemajorGridLineStyle
 The line style for the major grid lines. If nil, the major grid lines are not drawn. More...
 
CPTLineStyleminorGridLineStyle
 The line style for the minor grid lines. If nil, the minor grid lines are not drawn. More...
 
CPTPlotRangegridLinesRange
 The plot range over which the grid lines are visible. Note that this range applies to the orthogonal coordinate, not the axis coordinate itself. Set to nil for no restriction. More...
 
(void) - drawGridLinesInContext:isMajor:
 

Background Bands

CPTFillArrayalternatingBandFills
 An array of two or more fills to be drawn between successive major tick marks. More...
 
NSNumberalternatingBandAnchor
 The starting location of the first band fill. More...
 
CPTLimitBandArraybackgroundLimitBands
 An array of CPTLimitBand objects. More...
 
(void) - addBackgroundLimitBand:
 Add a background limit band. More...
 
(void) - removeBackgroundLimitBand:
 Remove a background limit band. More...
 
(void) - removeAllBackgroundLimitBands
 Remove all background limit bands. More...
 
(void) - drawBackgroundBandsInContext:
 
(void) - drawBackgroundLimitsInContext:
 

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 <NSSecureCoding>
(BOOL+ supportsSecureCoding:
 

Detailed Description

An abstract axis class.

The figure below illustrates the relationship between the three plot range properties. If all are nil, the axis and grid lines will extend the full width of the plot area.

Axis Ranges
See also
See Axes for a list of animatable properties.

Method Documentation

◆ addBackgroundLimitBand:

- (void) addBackgroundLimitBand: (nullable CPTLimitBand *)  limitBand

Add a background limit band.

Parameters
limitBandThe new limit band.

◆ drawBackgroundBandsInContext: [1/2]

- (void) drawBackgroundBandsInContext: (nonnull CGContextRef __unused)  context
implementation

Draws alternating background bands into the provided graphics context.

Parameters
contextThe graphics context to draw into.

Provided by category CPTAxis(AbstractMethods).

◆ drawBackgroundBandsInContext: [2/2]

- (void) drawBackgroundBandsInContext: (nonnull CGContextRef context

Provided by category CPTAxis(AbstractMethods).

◆ drawBackgroundLimitsInContext: [1/2]

- (void) drawBackgroundLimitsInContext: (nonnull CGContextRef __unused)  context
implementation

Draws background limit ranges into the provided graphics context.

Parameters
contextThe graphics context to draw into.

Provided by category CPTAxis(AbstractMethods).

◆ drawBackgroundLimitsInContext: [2/2]

- (void) drawBackgroundLimitsInContext: (nonnull CGContextRef context

Provided by category CPTAxis(AbstractMethods).

◆ drawGridLinesInContext:isMajor: [1/2]

- (void) drawGridLinesInContext: (nonnull CGContextRef __unused)  context
isMajor: (BOOL __unused)  major 
implementation

Draws grid lines into the provided graphics context.

Parameters
contextThe graphics context to draw into.
majorDraw the major grid lines If YES, minor grid lines otherwise.

Provided by category CPTAxis(AbstractMethods).

◆ drawGridLinesInContext:isMajor: [2/2]

- (void) drawGridLinesInContext: (nonnull CGContextRef context
isMajor: (BOOL major 

Provided by category CPTAxis(AbstractMethods).

◆ filteredMajorTickLocations:

- (nullable CPTNumberSet *) filteredMajorTickLocations: (nullable CPTNumberSet *)  allLocations

Removes any major ticks falling inside the label exclusion ranges from the set of tick locations.

Parameters
allLocationsA set of major tick locations.
Returns
The filtered set.

◆ filteredMinorTickLocations:

- (nullable CPTNumberSet *) filteredMinorTickLocations: (nullable CPTNumberSet *)  allLocations

Removes any minor ticks falling inside the label exclusion ranges from the set of tick locations.

Parameters
allLocationsA set of minor tick locations.
Returns
The filtered set.

◆ initWithFrame:

- (nonnull instancetype) initWithFrame: (CGRect newFrame
implementation

Initializes a newly allocated CPTAxis object with the provided frame rectangle.

This is the designated initializer. The initialized layer will have the following properties:

Parameters
newFrameThe frame rectangle.
Returns
The initialized CPTAxis object.

Reimplemented from CPTLayer.

Reimplemented in CPTXYAxis.

◆ layoutSublayers

- (void) layoutSublayers
implementation

Updates the layout of all sublayers. The axes are relabeled if needed and all axis labels are repositioned.

This is where we do our custom replacement for the Mac-only layout manager and autoresizing mask. Subclasses should override this method to provide a different layout of their own sublayers.

Reimplemented from CPTLayer.

◆ pointingDeviceDownEvent:atPoint:

- (BOOL) pointingDeviceDownEvent: (nonnull CPTNativeEvent *)  event
atPoint: (CGPoint interactionPoint 
implementation

Informs the receiver that the user has started touching the screen.

If this axis has a delegate that responds to either -axis:labelTouchDown: or -axis:labelTouchDown:withEvent: methods, the axis labels are searched to find the one containing the interactionPoint. The delegate method will be called and this method returns YES if the interactionPoint is within a label.

If this axis has a delegate that responds to either -axis:minorTickTouchDown: or -axis:minorTickTouchDown:withEvent: methods, the minor tick axis labels are searched to find the one containing the interactionPoint. The delegate method will be called and this method returns YES if the interactionPoint is within a label.

This method returns NO if the interactionPoint is outside all of the labels.

Parameters
eventThe OS event.
interactionPointThe coordinates of the interaction.
Returns
Whether the event was handled or not.

Reimplemented from <CPTResponder>.

◆ pointingDeviceUpEvent:atPoint:

- (BOOL) pointingDeviceUpEvent: (nonnull CPTNativeEvent *)  event
atPoint: (CGPoint interactionPoint 
implementation

Informs the receiver that the user has ended touching the screen.

If this axis has a delegate that responds to -axis:labelTouchUp: , -axis:labelTouchUp:withEvent: -axis:labelWasSelected: , and/or -axis:labelWasSelected:withEvent: methods, the axis labels are searched to find the one containing the interactionPoint. The delegate method will be called and this method returns YES if the interactionPoint is within a label.

If this axis has a delegate that responds to -axis:minorTickTouchUp: , -axis:minorTickTouchUp:withEvent: -axis:minorTickLabelWasSelected: , and/or -axis:minorTickLabelWasSelected:withEvent: methods, the minor tick axis labels are searched to find the one containing the interactionPoint. The delegate method will be called and this method returns YES if the interactionPoint is within a label.

This method returns NO if the interactionPoint is outside all of the labels.

Parameters
eventThe OS event.
interactionPointThe coordinates of the interaction.
Returns
Whether the event was handled or not.

Reimplemented from <CPTResponder>.

◆ relabel

- (void) relabel

Updates the axis labels.

◆ removeAllBackgroundLimitBands

- (void) removeAllBackgroundLimitBands

Remove all background limit bands.

◆ removeBackgroundLimitBand:

- (void) removeBackgroundLimitBand: (nullable CPTLimitBand *)  limitBand

Remove a background limit band.

Parameters
limitBandThe limit band to be removed.

◆ setNeedsRelabel

- (void) setNeedsRelabel

Marks the receiver as needing to update the labels before the content is next drawn.

◆ updateAxisTitle

- (void) updateAxisTitle

Update the axis title position.

◆ updateMajorTickLabels

- (void) updateMajorTickLabels

Update the major tick mark labels.

◆ updateMinorTickLabels

- (void) updateMinorTickLabels

Update the minor tick mark labels.

◆ viewPointForCoordinateValue: [1/2]

- (CGPoint) viewPointForCoordinateValue: (nullable NSNumber *__unused)  coordinateValue
implementation

Converts a position on the axis to drawing coordinates.

Parameters
coordinateValueThe axis value in data coordinate space.
Returns
The drawing coordinates of the point.

Provided by category CPTAxis(AbstractMethods).

◆ viewPointForCoordinateValue: [2/2]

- (CGPoint) viewPointForCoordinateValue: (nullable NSNumber *)  coordinateValue

Provided by category CPTAxis(AbstractMethods).

Property Documentation

◆ alternatingBandAnchor

- (nullable NSNumber *) alternatingBandAnchor
readwritenonatomicstrong

The starting location of the first band fill.

If nil (the default), the first fill is drawn between the bottom left corner of the plot area and the first major tick location inside the plot area. If the anchor falls between two major tick locations, the first band fill wiil be drawn between those locations.

◆ alternatingBandFills

- (nullable CPTFillArray *) alternatingBandFills
readwritenonatomiccopy

An array of two or more fills to be drawn between successive major tick marks.

When initializing the fills, provide an NSArray containing any combination of CPTFill, CPTColor, CPTGradient, and/or CPTImage objects. Blank (transparent) bands can be created by using an NSNull object in place of some of the CPTFill objects.

◆ attributedTitle

- (nullable NSAttributedString *) attributedTitle
readwritenonatomiccopy

A convenience property for setting the styled text title of the axis.

Assigning a new value to this property also sets the value of the title property to the same string without formatting information. It also replaces the titleTextStyle with a style matching the first position (location 0) of the styled title. Default is nil.

◆ axisLabels

- (nullable CPTAxisLabelSet *) axisLabels
readwritenonatomicstrong

The set of axis labels.

◆ axisLineCapMax

- (nullable CPTLineCap *) axisLineCapMax
readwritenonatomiccopy

The line cap for the end of the axis line with the maximum value.

See also
axisLineCapMin

◆ axisLineCapMin

- (nullable CPTLineCap *) axisLineCapMin
readwritenonatomiccopy

The line cap for the end of the axis line with the minimum value.

See also
axisLineCapMax

◆ axisLineStyle

- (nullable CPTLineStyle *) axisLineStyle
readwritenonatomiccopy

The line style for the axis line. If nil, the line is not drawn.

◆ axisSet

- (nullable CPTAxisSet *) axisSet
readnonatomicassign

The axis set that the axis belongs to.

◆ axisTitle

- (nullable CPTAxisTitle *) axisTitle
readwritenonatomicstrong

The axis title. If nil, no title is drawn.

◆ backgroundLimitBands

- (nullable CPTLimitBandArray *) backgroundLimitBands
readnonatomicassign

An array of CPTLimitBand objects.

The limit bands are drawn on top of the alternating band fills.

◆ coordinate

- (CPTCoordinate) coordinate
readwritenonatomicassign

The axis coordinate.

◆ defaultTitleLocation

- (nonnull NSNumber *) defaultTitleLocation
readnonatomicassign

The position along the axis where the axis title should be centered if titleLocation is NaN.

◆ gridLinesRange

- (nullable CPTPlotRange *CPTPlotRange *) gridLinesRange
readwritenonatomiccopy

The plot range over which the grid lines are visible. Note that this range applies to the orthogonal coordinate, not the axis coordinate itself. Set to nil for no restriction.

◆ labelAlignment

- (CPTAlignment) labelAlignment
readwritenonatomicassign

The alignment of the axis label with respect to the tick mark.

◆ labelExclusionRanges

- (nullable CPTPlotRangeArray *) labelExclusionRanges
readwritenonatomicstrong

An array of CPTPlotRange objects. Any tick marks and labels falling inside any of the ranges in the array will not be drawn.

◆ labelFormatter

- (nullable NSFormatter *) labelFormatter
readwritenonatomicstrong

The number formatter used to format the label text. If you need a non-numerical label, such as a date, you can use a formatter than turns the numerical plot coordinate into a string (e.g., “Jan 10, 2010”). The CPTCalendarFormatter and CPTTimeFormatter classes are useful for this purpose.

◆ labelingOrigin

- (nonnull NSNumber *) labelingOrigin
readwritenonatomicstrong

The origin used for axis labels. The default value is 0. It is only used when the axis labeling policy is CPTAxisLabelingPolicyFixedInterval. The origin is a reference point used to being labeling. Labels are added at the origin, as well as at fixed intervals above and below the origin.

◆ labelingPolicy

- (CPTAxisLabelingPolicy) labelingPolicy
readwritenonatomicassign

The axis labeling policy.

◆ labelShadow

- (nullable CPTShadow *) labelShadow
readwritenonatomicstrong

The shadow applied to each axis label.

◆ labelTextStyle

- (nullable CPTTextStyle *) labelTextStyle
readwritenonatomiccopy

The text style used to draw the label text.

◆ majorGridLines

- (nullable CPTGridLines *) majorGridLines
readnonatomicweak

The layer that draws the major grid lines.

◆ majorGridLineStyle

- (nullable CPTLineStyle *) majorGridLineStyle
readwritenonatomiccopy

The line style for the major grid lines. If nil, the major grid lines are not drawn.

◆ majorIntervalLength

- (nullable NSNumber *) majorIntervalLength
readwritenonatomicstrong

The distance between major tick marks expressed in data coordinates.

◆ majorTickLength

- (CGFloat) majorTickLength
readwritenonatomicassign

The length of the major tick marks.

◆ majorTickLineStyle

- (nullable CPTLineStyle *) majorTickLineStyle
readwritenonatomiccopy

The line style for the major tick marks. If nil, the major ticks are not drawn.

◆ majorTickLocations

- (nullable CPTNumberSet *) majorTickLocations
readwritenonatomicstrong

A set of axis coordinates for all major tick marks.

◆ minorGridLines

- (nullable CPTGridLines *) minorGridLines
readnonatomicweak

The layer that draws the minor grid lines.

◆ minorGridLineStyle

- (nullable CPTLineStyle *) minorGridLineStyle
readwritenonatomiccopy

The line style for the minor grid lines. If nil, the minor grid lines are not drawn.

◆ minorTickAxisLabels

- (nullable CPTAxisLabelSet *) minorTickAxisLabels
readwritenonatomicstrong

The set of minor tick axis labels.

◆ minorTickLabelAlignment

- (CPTAlignment) minorTickLabelAlignment
readwritenonatomicassign

The alignment of the axis label with respect to the tick mark.

◆ minorTickLabelDirection

- (CPTSign) minorTickLabelDirection
readwritenonatomicassign

The offset direction for minor tick labels. The direction is given as the sign that ticks extend along the axis (e.g., positive or negative). If the label direction is CPTSignNone (the default), the labels are offset in the direction indicated by the tickDirection.

◆ minorTickLabelFormatter

- (nullable NSFormatter *) minorTickLabelFormatter
readwritenonatomicstrong

The number formatter used to format the label text of minor ticks. If you need a non-numerical label, such as a date, you can use a formatter than turns the numerical plot coordinate into a string (e.g., “Jan 10, 2010”). The CPTCalendarFormatter and CPTTimeFormatter classes are useful for this purpose.

◆ minorTickLabelShadow

- (nullable CPTShadow *) minorTickLabelShadow
readwritenonatomicstrong

The shadow applied to each minor tick axis label.

◆ minorTickLabelTextStyle

- (nullable CPTTextStyle *) minorTickLabelTextStyle
readwritenonatomiccopy

The text style used to draw the label text of minor tick labels.

◆ minorTickLength

- (CGFloat) minorTickLength
readwritenonatomicassign

The length of the minor tick marks.

◆ minorTickLineStyle

- (nullable CPTLineStyle *) minorTickLineStyle
readwritenonatomiccopy

The line style for the minor tick marks. If nil, the minor ticks are not drawn.

◆ minorTickLocations

- (nullable CPTNumberSet *) minorTickLocations
readwritenonatomicstrong

A set of axis coordinates for all minor tick marks.

◆ minorTicksPerInterval

- (NSUInteger) minorTicksPerInterval
readwritenonatomicassign

The number of minor tick marks drawn in each major tick interval.

◆ needsRelabel

- (BOOL) needsRelabel
readnonatomicassign

If YES, the axis needs to be relabeled before the layer content is drawn.

◆ plotArea

- (nullable CPTPlotArea *) plotArea
readwritenonatomicweak

The plot area that the axis belongs to.

◆ plotSpace

- (nullable CPTPlotSpace *) plotSpace
readwritenonatomicstrong

The plot space for the axis.

◆ preferredNumberOfMajorTicks

- (NSUInteger) preferredNumberOfMajorTicks
readwritenonatomicassign

The number of ticks that should be targeted when auto-generating positions. This property only applies when the CPTAxisLabelingPolicyAutomatic or CPTAxisLabelingPolicyEqualDivisions policies are in use. If zero (0) (the default), Core Plot will choose a reasonable number of ticks.

◆ separateLayers

- (BOOL) separateLayers
readwritenonatomicassign

Use separate layers for drawing grid lines?

If NO, the default, the major and minor grid lines are drawn in layers shared with other axes. If YES, the grid lines are drawn in their own layers.

◆ tickDirection

- (CPTSign) tickDirection
readwritenonatomicassign

The tick direction. The direction is given as the sign that ticks extend along the axis (e.g., positive or negative).

◆ tickLabelDirection

- (CPTSign) tickLabelDirection
readwritenonatomicassign

The offset direction for major tick labels. The direction is given as the sign that ticks extend along the axis (e.g., positive or negative). If the label direction is CPTSignNone (the default), the labels are offset in the direction indicated by the tickDirection.

◆ title

- (nullable NSString *) title
readwritenonatomiccopy

A convenience property for setting the text title of the axis.

Assigning a new value to this property also sets the value of the attributedTitle property to nil.

◆ titleDirection

- (CPTSign) titleDirection
readwritenonatomicassign

The offset direction for the axis title. The direction is given as the sign that ticks extend along the axis (e.g., positive or negative). If the title direction is CPTSignNone (the default), the title is offset in the direction indicated by the tickDirection.

◆ titleLocation

- (nullable NSNumber *) titleLocation
readwritenonatomicstrong

The position along the axis where the axis title should be centered. If NaN (the default), the defaultTitleLocation will be used.

◆ titleTextStyle

- (nullable CPTTextStyle *) titleTextStyle
readwritenonatomiccopy

The text style used to draw the axis title text.

Assigning a new value to this property also sets the value of the attributedTitle property to nil.

◆ visibleAxisRange

- (nullable CPTPlotRange *) visibleAxisRange
readwritenonatomiccopy

The plot range over which the axis itself is visible. Use this to restrict an axis line to less than the full plot area width. This range is independent of the visibleRange and overrides it for the axis line and line cap. Set to nil to use the visibleRange instead.

◆ visibleRange

- (nullable CPTPlotRange *) visibleRange
readwritenonatomiccopy

The plot range over which the axis and ticks are visible. Use this to restrict an axis and its grid lines to less than the full plot area width. Use the visibleAxisRange to specify a separate range for the axis line, if needed. Set to nil for no restriction.


The documentation for this class was generated from the following files: