NChartLineDash Class Reference
Inherits from | NSObject |
---|---|
Declared in | NChartLineDash.h |
Overview
The NChartLineDash class provides methods to set up the dash pattern for lines drawn on the chart.
+ lineDashWithPattern:
Create new line dash instance.
+ (NChartLineDash *)lineDashWithPattern:(NSArray *)pattern
Parameters
pattern |
|
---|
Return Value
new line dash instance.
Declared In
NChartLineDash.h
+ lineDashWithPattern:andPhase:
Create new line dash instance.
+ (NChartLineDash *)lineDashWithPattern:(NSArray *)pattern andPhase:(float)phase
Parameters
pattern |
|
---|---|
phase |
|
Return Value
new line dash instance.
Declared In
NChartLineDash.h
– initWithPattern:
Init line dash instance.
- (id)initWithPattern:(NSArray *)pattern
Parameters
pattern |
|
---|
Return Value
initialized instance of the line dash.
Declared In
NChartLineDash.h
– initWithPattern:andPhase:
Init line dash instance.
- (id)initWithPattern:(NSArray *)pattern andPhase:(float)phase
Parameters
pattern |
|
---|---|
phase |
|
Return Value
initialized instance of the line dash.
Declared In
NChartLineDash.h
pattern
Array representing the line dash as the lengths (in pixels) of the painted and unpainted segments, respectively.
If the values is nil or an array has no elements, dash is not applied and the line is drawn continuous.
The default values is nil.
For example, if the array @[@10, @15]
is set, the line will alternate between 10 pixels
drawn segment and 15 pixels gap. If @[@10, @5, @15, @8]
is set, the line will be a looped pattern
of 10 pixels drawn segment, followed by 5 pixels gap, followed by 15 pixels drawn segment, followed by 8 pixels gap.
@property (nonatomic, strong) NSArray<NSNumber*> *pattern
Declared In
NChartLineDash.h
phase
Value specifying how far (in pixels) into the dash pattern the line starts.
The default value is 0 which means to start interpreting the pattern from the beginning.
For example, if 10 is set, the line is drawn with the dash pattern starting at 10 pixels from its
beginning.
@property (nonatomic, assign) float phase
Declared In
NChartLineDash.h