![]() |
Core Plot (iOS and tvOS)
Cocoa plotting framework for macOS, iOS, and tvOS
|
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 <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 <NSCoding> | |
| (id) | - initWithCoder: |
| (void) | - encodeWithCoder: |
Properties | |
| Class | graphClass |
| The class used to create new graphs. Must be a subclass of CPTGraph. More... | |
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.
|
implementation |
Applies the theme to the provided axis set.
| axisSet | The axis set to style. |
Provided by category CPTTheme(AbstractMethods).
| - (void) applyThemeToAxisSet: | (nonnull CPTAxisSet *) | axisSet |
Provided by category CPTTheme(AbstractMethods).
|
implementation |
Applies the background theme to the provided graph.
| graph | The graph to style. |
Provided by category CPTTheme(AbstractMethods).
| - (void) applyThemeToBackground: | (nonnull CPTGraph *) | graph |
Provided by category CPTTheme(AbstractMethods).
| - (void) applyThemeToGraph: | (nonnull CPTGraph *) | graph |
Applies the theme to the provided graph.
| graph | The graph to style. |
|
implementation |
Applies the theme to the provided plot area.
| plotAreaFrame | The plot area to style. |
Provided by category CPTTheme(AbstractMethods).
| - (void) applyThemeToPlotArea: | (nonnull CPTPlotAreaFrame *) | plotAreaFrame |
Provided by category CPTTheme(AbstractMethods).
|
implementation |
Initializes a newly allocated CPTTheme object.
The initialized object will have the following properties:
| + (nonnull CPTThemeName) name |
The name used for this theme class.
| - (nullable id) newGraph |
Creates a new graph styled with the theme.
Provided by category CPTTheme(AbstractMethods).
| + (void) registerTheme: | (nonnull Class) | themeClass |
Register a theme class.
| themeClass | Theme class to register. |
List of the available theme classes, sorted by name.
| + (nullable instancetype) themeNamed: | (nullable CPTThemeName) | themeName |
Gets a named theme.
| themeName | The name of the desired theme. |
themeName or nil if no themes with a matching name were found.
|
readwritenonatomicstrong |
The class used to create new graphs. Must be a subclass of CPTGraph.