com.nchart3d.NChart.NChartStaticLine Class Reference

The NChartStaticLine class provides methods to control static lines displayed on top of the chart. More...

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

Public Member Functions

 NChartStaticLine ()
 Create new static line instance.
 
int getColor ()
 Color of the static line. More...
 
void setColor (int color)
 For details see getColor().
 
float getThickness ()
 Thickness of the static line. More...
 
void setThickness (float thickness)
 For details see getThickness().
 
float getPosition ()
 Position of static line relative to the chart plot area. More...
 
void setPosition (float position)
 For details see getPosition().
 
NChartInterpolationRange nearestPointIndices (NChartSeries series)
 Get indices and interpolation parameter of nearest points relative to the static line (taking into account current chart position). More...
 
NChartPointState underlyingPointState (NChartSeries series, boolean shouldInterpolate)
 Get chart point state of given series under the static line (taking into account current chart position). 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...
 

Detailed Description

The NChartStaticLine class provides methods to control static lines displayed on top of the chart.

These lines do not move with the chart and do not respond to any user interactions. They can be used as custom borders, indicators, static grid, etc.

Member Function Documentation

int com.nchart3d.NChart.NChartStaticLine.getColor ( )
inline

Color of the static line.

The default value is black color.

float com.nchart3d.NChart.NChartStaticLine.getPosition ( )
inline

Position of static line relative to the chart plot area.

The default value is 0.5, which means the middle of the plot area.

float com.nchart3d.NChart.NChartStaticLine.getThickness ( )
inline

Thickness of the static line.

The default value is 1.0.

NChartInterpolationRange com.nchart3d.NChart.NChartStaticLine.nearestPointIndices ( NChartSeries  series)
inline

Get indices and interpolation parameter of nearest points relative to the static line (taking into account current chart position).

Parameters
series- series to get points of.
Returns
an instance of interpolation range. Its properties have following meaning: left - reference to the variable where to write nearest point left to the static line. If no points of series are left to the static line, the value is -1. right - reference to the variable where to write nearest point right to the static line. If no points of series are right to the static line, the value is -1. t - interpolation parameter in range [0; 1], if static line is between points with indices left and right, -1 otherwise.
NChartPointState com.nchart3d.NChart.NChartStaticLine.underlyingPointState ( NChartSeries  series,
boolean  shouldInterpolate 
)
inline

Get chart point state of given series under the static line (taking into account current chart position).

The state contains values only (this means brush, borderBrush and marker properties are undefined).

Parameters
series- series to get the point state for.
shouldInterpolate- flag indicating if the values should be interpolated between neighbor points (true) or the nearest point value should be used (false).
Returns
point state or null, if the series has no data under the static line.