com.nchart3d.NChart.NChartSubChart Class Reference

The NChartSubChart class provides methods to display a subchart on top of the main chart. More...

Inheritance diagram for com.nchart3d.NChart.NChartSubChart:
com.nchart3d.NChart.NChartObject

Public Member Functions

 NChartSubChart (NChart parentChart)
 Initialize subchart. More...
 
NChart getParentChart ()
 Reference to the parent chart.
 
NChart getChart ()
 The inner chart of the subchart. More...
 
boolean isVisible ()
 Visibility of the subchart.
 
PointF getSize ()
 Size (in pixels) of the subchart. More...
 
void setSize (PointF size)
 For details see getSize().
 
NChartPoint getTargetPoint ()
 Target chart point, for which the subchart is shown. More...
 
void setTargetPoint (NChartPoint targetPoint)
 For details see getTargetPoint().
 
double getTargetX ()
 X value in the chart space of the target location, for which the subchart is shown. More...
 
void setTargetX (double targetX)
 For details see getTargetX().
 
double getTargetY ()
 Y value in the chart space of the target location, for which the subchart is shown. More...
 
void setTargetY (double targetY)
 For details see getTargetY().
 
double getTargetZ ()
 Z value in the chart space of the target location, for which the subchart is shown. More...
 
void setTargetZ (double targetZ)
 For details see getTargetZ().
 
boolean isHostsOnSX ()
 Flag that determines if the target location is hosted on the secondary X-axis. More...
 
void setHostsOnSX (boolean hostsOnSX)
 For details see isHostsOnSX().
 
boolean isHostsOnSY ()
 Flag that determines if the target location is hosted on the secondary Y-axis. More...
 
void setHostsOnSY (boolean hostsOnSY)
 For details see isHostsOnSY().
 
boolean isHostsOnSZ ()
 Flag that determines if the target location is hosted on the secondary Z-axis. More...
 
void setHostsOnSZ (boolean hostsOnSZ)
 For details see isHostsOnSZ().
 
PointF getTargetAreaOffset ()
 Offset from the target area in pixels. More...
 
PointF getTargetAreaSize ()
 Size (in pixels) of the highlighted area around the target. More...
 
double getBorderThickness ()
 Border thickness (in pixels). More...
 
void setBorderThickness (double borderThickness)
 For details see getBorderThickness().
 
int getBorderColor ()
 Border color. More...
 
void setBorderColor (int color)
 For details see getBorderColor().
 
void setVisible (boolean visible)
 Set the visibility of the subchart. More...
 
void setVisible (boolean visible, float duration)
 Change visibility of the subchart animated. More...
 
- Public Member Functions inherited from com.nchart3d.NChart.NChartObject
boolean isVisible ()
 Flag that determines if the object is visible or not. More...
 
void setVisible (boolean visible)
 For details see isVisible().
 
NChart getChart ()
 Chart the object belongs to. More...
 

Static Public Member Functions

static NChartSubChart subChartForChart (NChart parentChart)
 Create a subchart. More...
 

Detailed Description

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 practices 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.

Constructor & Destructor Documentation

com.nchart3d.NChart.NChartSubChart.NChartSubChart ( NChart  parentChart)
inline

Initialize subchart.

Parameters
parentChart- chart to create the subchart for.

Member Function Documentation

int com.nchart3d.NChart.NChartSubChart.getBorderColor ( )
inline

Border color.

The default value is black.

double com.nchart3d.NChart.NChartSubChart.getBorderThickness ( )
inline

Border thickness (in pixels).

The default value is 1.

NChart com.nchart3d.NChart.NChartSubChart.getChart ( )
inline

The inner chart of the subchart.

Add series to this chart to display them in the subchart.

PointF com.nchart3d.NChart.NChartSubChart.getSize ( )
inline

Size (in pixels) of the subchart.

The default value is (300, 300).

PointF com.nchart3d.NChart.NChartSubChart.getTargetAreaOffset ( )
inline

Offset from the target area in pixels.

The default value is (50, 50). The offset direction may be altered automatically so that both the target area and the subchart are visible.

PointF com.nchart3d.NChart.NChartSubChart.getTargetAreaSize ( )
inline

Size (in pixels) of the highlighted area around the target.

The default value is (10, 10).

NChartPoint com.nchart3d.NChart.NChartSubChart.getTargetPoint ( )
inline

Target chart point, for which the subchart is shown.

If null, use setTargetX, setTargetY, and setTargetZ to define an arbitrary point in the chart space. The default value is null.

double com.nchart3d.NChart.NChartSubChart.getTargetX ( )
inline

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 setTargetPoint(NChartPoint).

double com.nchart3d.NChart.NChartSubChart.getTargetY ( )
inline

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 setTargetPoint(NChartPoint).

double com.nchart3d.NChart.NChartSubChart.getTargetZ ( )
inline

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 setTargetPoint(NChartPoint).

boolean com.nchart3d.NChart.NChartSubChart.isHostsOnSX ( )
inline

Flag that determines if the target location is hosted on the secondary X-axis.

The default value is false. If true, it will be drawn according to the secondary X-axis, if false according to the normal X-axis.

boolean com.nchart3d.NChart.NChartSubChart.isHostsOnSY ( )
inline

Flag that determines if the target location is hosted on the secondary Y-axis.

The default value is false. If true, it will be drawn according to the secondary Y-axis, if false according to the normal Y-axis.

boolean com.nchart3d.NChart.NChartSubChart.isHostsOnSZ ( )
inline

Flag that determines if the target location is hosted on the secondary Z-axis.

The default value is false. If true, it will be drawn according to the secondary Z-axis, if false according to the normal Z-axis.

void com.nchart3d.NChart.NChartSubChart.setVisible ( boolean  visible)
inline

Set the visibility of the subchart.

Parameters
visible- flag of visibility.
void com.nchart3d.NChart.NChartSubChart.setVisible ( boolean  visible,
float  duration 
)
inline

Change visibility of the subchart animated.

Parameters
visible- flag of visibility.
duration- duration of animation in seconds.
static NChartSubChart com.nchart3d.NChart.NChartSubChart.subChartForChart ( NChart  parentChart)
inlinestatic

Create a subchart.

Parameters
parentChart- chart to create the subchart for.
Returns
newly created instance of a subchart.