NChartSubChart Class Reference
| Inherits from | NChartObject : NSObject |
|---|---|
| Declared in | NChartSubChart.h |
Overview
The NChartSubChart class provides methods to display a subchart on top of the main chart.
Normally, subcharts are used to show advanced details about the objects displayed by the main chart. For example, imagine you have a data set of monthly revenue of 10 companies over 10 years, so you have 10 * 10 * 12 = 1200 data points. Being far away from the Big Data, it is still already quite some number, so, to display this data set in a reasonable way, you may need some Big Data analysis practives like the Shneiderman’s mantra: “Overview first, zoom and filter, then details on demand”. As an overview, you can display a histogram of average revenue for the companies, which gives you 10 columns. Upon click on a column, you can place a subchart on top of that showing a line chart with 120 points characterizing the selected company.
+ subChartForChart:
Create a subchart.
+ (NChartSubChart *)subChartForChart:(NChart *)parentChartParameters
parentChart |
|
|---|
Return Value
newly created instance of a subchart.
Declared In
NChartSubChart.h
– initWithChart:
Initialize subchart.
- (instancetype)initWithChart:(NChart *)parentChartParameters
parentChart |
|
|---|
Return Value
initialized instance of a subchart.
Declared In
NChartSubChart.h
parentChart
Reference to the parent chart.
@property (nonatomic, readonly) NChart *parentChartDiscussion
To get the subchart, use the chart property.
Declared In
NChartSubChart.h
size
Size (in pixels) of the subchart. The default value is (300, 300).
@property (nonatomic, assign) CGSize sizeDeclared In
NChartSubChart.h
targetPoint
Target chart point, for which the subchart is shown.
If nil, you have to use x, y, and z values to define an arbitrary point in the chart space.
The default value is nil.
@property (nonatomic, assign) NChartPoint *targetPointDeclared In
NChartSubChart.h
targetX
X value in the chart space of the target location, for which the subchart is shown. The default value is 0.
Alternatively, you can use targetPoint.
@property (nonatomic, assign) double targetXDeclared In
NChartSubChart.h
targetY
Y value in the chart space of the target location, for which the subchart is shown. The default value is 0.
Alternatively, you can use targetPoint.
@property (nonatomic, assign) double targetYDeclared In
NChartSubChart.h
targetZ
Z value in the chart space of the target location, for which the subchart is shown. The default value is 0.
Alternatively, you can use targetPoint.
@property (nonatomic, assign) double targetZDeclared In
NChartSubChart.h
hostsOnSX
Flag that determines if the target location is hosted on the secondary X-axis. The default value is NO. If YES, it will be drawn according to the secondary X-axis, if NO according to the normal X-axis. The secondary axis appears opposite the normal axis and is managed separately: it can have its own min and max; its own color settings and so on.
@property (nonatomic, assign) BOOL hostsOnSXDeclared In
NChartSubChart.h
hostsOnSY
Flag that determines if the target location is hosted on the secondary Y-axis. The default value is NO. If YES, it will be drawn according to the secondary Y-axis, if NO according to the normal Y-axis. The secondary axis appears opposite the normal axis and is managed separately: it can have its own min and max; its own color settings and so on.
@property (nonatomic, assign) BOOL hostsOnSYDeclared In
NChartSubChart.h
hostsOnSZ
Flag that determines if the target location is hosted on the secondary Z-axis. The default value is NO. If YES, it will be drawn according to the secondary Z-axis, if NO according to the normal Z-axis. The secondary axis appears opposite the normal axis and is managed separately: it can have its own min and max; its own color settings and so on.
@property (nonatomic, assign) BOOL hostsOnSZDeclared In
NChartSubChart.h
targetAreaOffset
Offset from the target area in pixels. The default value is (50, 50).
@property (nonatomic, assign) CGPoint targetAreaOffsetDiscussion
The offset direction may be altered automatically so that both the target area and the subchart are visible.
Declared In
NChartSubChart.h
targetAreaSize
Size (in pixels) of the highlighted area around the target. The default value is (10, 10).
@property (nonatomic, assign) CGSize targetAreaSizeDeclared In
NChartSubChart.h
targetAreaBorderRadius
Border radius of the highlighted target area (in pixels). The default value is 5.
@property (nonatomic, assign) double targetAreaBorderRadiusDeclared In
NChartSubChart.h
borderThickness
Border thickness (in pixels). The default value is 1.
@property (nonatomic, assign) double borderThicknessDeclared In
NChartSubChart.h
borderColor
Border color. The default value is black.
@property (nonatomic, retain) UIColor *borderColorDeclared In
NChartSubChart.h
– setVisible:animated:
Change visibility of the subchart animated.
- (void)setVisible:(BOOL)visible animated:(float)durationParameters
visible |
|
|---|---|
duration |
|
Declared In
NChartSubChart.h