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

Creates a CPTGraph instance formatted with a predefined style. More...

#import <CPTTheme.h>

+ Inheritance diagram for CPTTheme:
+ Collaboration diagram for CPTTheme:

Public Class Methods

Theme Management
(void) + registerTheme:
 Register a theme class. More...
 
(nullable NSArray< Class > *) + themeClasses
 List of the available theme classes, sorted by name. More...
 
(nullable instancetype) + themeNamed:
 Gets a named theme. More...
 
(nonnull CPTThemeName+ name
 The name used for this theme class. More...
 
- 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:
 

Public Instance Methods

(void) - applyThemeToBackground: [implementation]
 Applies the background theme to the provided graph. More...
 
(void) - applyThemeToPlotArea: [implementation]
 Applies the theme to the provided plot area. More...
 
(void) - applyThemeToAxisSet: [implementation]
 Applies the theme to the provided axis set. More...
 
Theme Usage
(void) - applyThemeToGraph:
 Applies the theme to the provided graph. More...
 
(nullable id- newGraph
 Creates a new graph styled with the theme. More...
 
(void) - applyThemeToBackground:
 
(void) - applyThemeToPlotArea:
 
(void) - applyThemeToAxisSet:
 
Initialization
(nonnull instancetype) - init [implementation]
 Initializes a newly allocated CPTTheme object. More...
 
- 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:
 

Properties

Class graphClass
 The class used to create new graphs. Must be a subclass of CPTGraph. More...
 

Detailed Description

Creates a CPTGraph instance formatted with a predefined style.

Themes apply a predefined combination of line styles, text styles, and fills to the graph. The styles are applied to the axes, the plot area, and the graph itself. Using a theme to format the graph does not prevent any of the style properties from being changed later. Therefore, it is possible to apply initial formatting to a graph using a theme and then customize the styles to suit the application later.

Method Documentation

◆ applyThemeToAxisSet: [1/2]

- (void) applyThemeToAxisSet: (nonnull CPTAxisSet *__unused)  axisSet
implementation

Applies the theme to the provided axis set.

Parameters
axisSetThe axis set to style.

Provided by category CPTTheme(AbstractMethods).

◆ applyThemeToAxisSet: [2/2]

- (void) applyThemeToAxisSet: (nonnull CPTAxisSet *)  axisSet

Provided by category CPTTheme(AbstractMethods).

◆ applyThemeToBackground: [1/2]

- (void) applyThemeToBackground: (nonnull CPTGraph *__unused)  graph
implementation

Applies the background theme to the provided graph.

Parameters
graphThe graph to style.

Provided by category CPTTheme(AbstractMethods).

◆ applyThemeToBackground: [2/2]

- (void) applyThemeToBackground: (nonnull CPTGraph *)  graph

Provided by category CPTTheme(AbstractMethods).

◆ applyThemeToGraph:

- (void) applyThemeToGraph: (nonnull CPTGraph *)  graph

Applies the theme to the provided graph.

Parameters
graphThe graph to style.

◆ applyThemeToPlotArea: [1/2]

- (void) applyThemeToPlotArea: (nonnull CPTPlotAreaFrame *__unused)  plotAreaFrame
implementation

Applies the theme to the provided plot area.

Parameters
plotAreaFrameThe plot area to style.

Provided by category CPTTheme(AbstractMethods).

◆ applyThemeToPlotArea: [2/2]

- (void) applyThemeToPlotArea: (nonnull CPTPlotAreaFrame *)  plotAreaFrame

Provided by category CPTTheme(AbstractMethods).

◆ init

- (nonnull instancetype) init
implementation

Initializes a newly allocated CPTTheme object.

The initialized object will have the following properties:

Returns
The initialized object.

◆ name

+ (nonnull CPTThemeName) name

The name used for this theme class.

Returns
The name.

◆ newGraph

- (nullable id) newGraph

Creates a new graph styled with the theme.

Returns
The new graph.

Provided by category CPTTheme(AbstractMethods).

◆ registerTheme:

+ (void) registerTheme: (nonnull Class themeClass

Register a theme class.

Parameters
themeClassTheme class to register.

◆ themeClasses

+ (nullable NSArray< Class > *) themeClasses

List of the available theme classes, sorted by name.

Returns
An NSArray containing all available theme classes, sorted by name.

◆ themeNamed:

+ (nullable instancetype) themeNamed: (nullable CPTThemeName themeName

Gets a named theme.

Parameters
themeNameThe name of the desired theme.
Returns
A CPTTheme instance with name matching themeName or nil if no themes with a matching name were found.
See also
See Theme Names for a list of named themes provided by Core Plot.

Property Documentation

◆ graphClass

- (nullable Class) graphClass
readwritenonatomicstrong

The class used to create new graphs. Must be a subclass of CPTGraph.


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