|
Core Plot (iOS and tvOS)
Cocoa plotting framework for macOS, iOS, and tvOS
|
Go to the documentation of this file.
101 -(nullable
double *)doublesForPlot:(nonnull
CPTPlot *)plot field:(
NSUInteger)fieldEnum recordIndexRange:(
NSRange)indexRange NS_RETURNS_INNER_POINTER;
185 -(void)plot:(nonnull
CPTPlot *)plot dataLabelWasSelectedAtRecordIndex:(
NSUInteger)idx;
206 -(void)plot:(nonnull
CPTPlot *)plot dataLabelTouchDownAtRecordIndex:(
NSUInteger)idx;
227 -(void)plot:(nonnull
CPTPlot *)plot dataLabelTouchUpAtRecordIndex:(
NSUInteger)idx;
249 -(void)didFinishDrawing:(nonnull
CPTPlot *)plot;
301 @property (nonatomic, readwrite, assign) NSUInteger
labelField;
321 -(void)relabelIndexRange:(
NSRange)indexRange;
324 -(void)reloadDataLabelsInIndexRange:(
NSRange)indexRange;
332 -(void)reloadDataInIndexRange:(
NSRange)indexRange;
334 -(void)deleteDataInIndexRange:(
NSRange)indexRange;
344 -(nullable
id)numbersFromDataSourceForField:(
NSUInteger)fieldEnum recordIndexRange:(
NSRange)indexRange;
345 -(
BOOL)loadNumbersForAllFieldsFromDataSourceInRecordIndexRange:(
NSRange)indexRange;
357 -(void)cacheNumbers:(nullable
id)numbers forField:(
NSUInteger)fieldEnum;
358 -(void)cacheNumbers:(nullable
id)numbers forField:(
NSUInteger)fieldEnum atRecordIndex:(
NSUInteger)idx;
359 -(void)cacheArray:(nullable
NSArray *)array forKey:(nonnull
NSString *)key;
void setNeedsRelabel()
Marks the receiver as needing to update all data labels before the content is next drawn.
Definition: CPTPlot.m:1595
BOOL alignsPointsToPixels
If YES (the default), all plot points will be aligned to device pixels when drawing.
Definition: CPTPlot.h:309
Immutable wrapper for various shadow drawing properties.
Definition: CPTShadow.h:3
Structure that describes the encoding of numeric data samples.
Definition: CPTNumericDataType.h:27
BOOL showLabels
Set to NO to override all other label settings and hide the data labels. Defaults to YES.
Definition: CPTPlot.h:298
void reloadDataIfNeeded()
Reload plot data from the data source only if the data cache is out of date.
Definition: CPTPlot.m:578
NSArray< __kindof CPTPlot * > CPTPlotArray
An array of plots.
Definition: CPTPlot.h:39
Positions a content layer relative to some anchor point in a plot space.
Definition: CPTPlotSpaceAnnotation.h:6
A plot data source.
Definition: CPTPlot.h:51
CPTTextStyle * labelTextStyle
The text style used to draw the data labels. Set this property to nil to hide the data labels.
Definition: CPTPlot.h:302
NSFormatter * labelFormatter
The number formatter used to format the data labels. Set this property to nil to hide the data labels...
Definition: CPTPlot.h:303
void reloadPlotData()
Reload all plot data from the data source immediately.
Definition: CPTPlot.m:694
CPTPlotSpace * plotSpace
The plot space for the plot.
Definition: CPTPlot.h:272
Defines an immutable range of plot data.
Definition: CPTPlotRange.h:27
Defines the coordinate system of a plot.
Definition: CPTPlotSpace.h:178
id< CPTPlotDataSource > dataSource
The data source for the plot.
Definition: CPTPlot.h:261
Immutable wrapper for various text style properties.
Definition: CPTTextStyle.h:18
BOOL adjustLabelAnchors
If YES, data labels anchor points are adjusted automatically when the labels are positioned....
Definition: CPTPlot.h:297
@ CPTPlotCachePrecisionDecimal
All cached data will be converted to NSDecimal.
Definition: CPTPlot.h:33
NSString * title
The title of the plot displayed in the legend.
Definition: CPTPlot.h:266
CPTPlot abstract methods—must be overridden by subclasses.
Definition: CPTPlot.h:386
NSUInteger numberOfLegendEntries()
The number of legend entries provided by this plot.
Definition: CPTPlot.m:1796
A container layer for annotations.
Definition: CPTAnnotationHostLayer.h:5
Layer delegate.
Definition: CPTLayer.h:76
NSUInteger labelField
The plot field identifier of the data field used to generate automatic labels.
Definition: CPTPlot.h:301
An annotated NSMutableData type.
Definition: CPTMutableNumericData.h:5
@ CPTPlotCachePrecisionDouble
All cached data will be converted to double precision.
Definition: CPTPlot.h:32
CPTNumericDataType doubleDataType
The CPTNumericDataType used to cache plot data as double.
Definition: CPTPlot.h:290
NSUInteger numberOfFields()
Number of fields in a plot data record.
Definition: CPTPlot.m:2259
nonnull CPTNumberArray * fieldIdentifiers()
Identifiers (enum values) identifying the fields.
Definition: CPTPlot.m:2267
CPTPlotCachePrecision cachePrecision
The numeric precision used to cache the plot data and perform all plot calculations....
Definition: CPTPlot.h:289
Base class for all Core Animation layers in Core Plot.
Definition: CPTLayer.h:83
NSAttributedString * attributedTitle
The styled title of the plot displayed in the legend.
Definition: CPTPlot.h:267
CPTNumericDataType decimalDataType
The CPTNumericDataType used to cache plot data as NSDecimal.
Definition: CPTPlot.h:291
NSMutableArray< __kindof CPTPlot * > CPTMutablePlotArray
A mutable array of plots.
Definition: CPTPlot.h:44
A graph legend.
Definition: CPTLegend.h:185
CPTPlotCachePrecision
Enumeration of cache precisions.
Definition: CPTPlot.h:30
CPTShadow * labelShadow
The shadow applied to each data label.
Definition: CPTPlot.h:304
An annotated NSData type.
Definition: CPTNumericData.h:4
CPTCoordinate
Enumeration of axis coordinates.
Definition: CPTDefinitions.h:164
BOOL doublePrecisionCache
If YES, the cache holds data of type double, otherwise it holds NSDecimal.
Definition: CPTPlot.h:288
An abstract plot class.
Definition: CPTPlot.h:258
BOOL dataNeedsReloading
If YES, the plot data will be reloaded from the data source before the layer content is drawn.
Definition: CPTPlot.h:282
BOOL needsRelabel
If YES, the plot needs to be relabeled before the layer content is drawn.
Definition: CPTPlot.h:296
#define cpt_swift_struct
Marks a type definition to be imported into Swift as a structure.
Definition: CPTDefinitions.h:73
A layer representing the actual plotting area of a graph.
Definition: CPTPlotArea.h:76
void repositionAllLabelAnnotations()
Repositions all existing label annotations.
Definition: CPTPlot.m:1775
CGFloat labelOffset
The distance that labels should be offset from their anchor points. The direction of the offset is de...
Definition: CPTPlot.h:299
#define cpt_weak_property
A custom definition for automatic reference counting (ARC) weak properties that falls back to assign ...
Definition: CPTDefinitions.h:32
void reloadData()
Reload all plot data, labels, and plot-specific information from the data source immediately.
Definition: CPTPlot.m:567
@ CPTPlotCachePrecisionAuto
Cache precision is determined automatically from the data. All cached data will be converted to match...
Definition: CPTPlot.h:31
Plot delegate.
Definition: CPTPlot.h:170
CPTPlotBinding __nonnull const CPTPlotBindingDataLabels
Plot data labels.
Definition: CPTPlot.m:47
CPTPlotArea * plotArea
The plot area for the plot.
Definition: CPTPlot.h:277
void reloadDataLabels()
Reload all data labels from the data source immediately.
Definition: CPTPlot.m:716
void setDataNeedsReloading()
Marks the receiver as needing the data source reloaded before the content is next drawn.
Definition: CPTPlot.m:559
void relabel()
Updates the data labels in the labelIndexRange.
Definition: CPTPlot.m:1604
nonnull id nilData()
A unique marker object used in collections to indicate that the datasource returned nil.
Definition: CPTPlot.m:761
NSUInteger cachedDataCount
The number of data points stored in the cache.
Definition: CPTPlot.h:287
CGFloat labelRotation
The rotation of the data labels in radians. Set this property to π/2 to have labels read up the scree...
Definition: CPTPlot.h:300
BOOL drawLegendSwatchDecoration
If YES (the default), additional plot-specific decorations, symbols, and/or colors will be drawn on t...
Definition: CPTPlot.h:314