Module org.jfree.chart3d
Package org.jfree.chart3d.axis

# Class TickData

java.lang.Object
org.jfree.chart3d.axis.TickData

public class TickData extends Object
Data related to the tick marks and labels on a chart.

## Constructor Summary

Constructors
Constructor
Description
`TickData(double pos, double dataValue)`
Creates a new instance.
`TickData(double pos, Comparable<?> key, String keyLabel)`
Creates a new instance.
`TickData(TickData source, int vertexIndex)`
Creates a new instance by copying an existing instance but altering the vertex index.

## Method Summary

Modifier and Type
Method
Description
`Point2D`
`getAnchorPt()`
Returns the anchor point.
`double`
`getDataValue()`
Returns the data value when the tick data is for a `NumberAxis3D`, and `Double.NaN` otherwise.
`Comparable<?>`
`getKey()`
Returns the key when the tick data is for a `CategoryAxis3D`, and `null` otherwise.
`String`
`getKeyLabel()`
Returns the key label.
`double`
`getPos()`
Returns the position of the tick, as a percentage along the axis (for example, 0.5 is halfway along the axis).
`int`
`getVertexIndex()`
Returns the vertex index that is the anchor point for the tick mark.
`void`
`setAnchorPt(Point2D anchorPt)`
Sets the anchor point.
`void`
`setVertexIndex(int index)`
Sets the vertex index.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### TickData

public TickData(double pos, Comparable<?> key, String keyLabel)
Creates a new instance. This constructor is used for category axes.

Parameters:
  `pos` - the position along the axis as a percentage of the range.
  `key` - the key.
  `keyLabel` - the key label.

### TickData

public TickData(double pos, double dataValue)
Creates a new instance. This constructor is used for numerical axes.

Parameters:
  `pos` - the position along the axis as a percentage of the range.
  `dataValue` - the data value.

### TickData

public TickData(TickData source, int vertexIndex)
Creates a new instance by copying an existing instance but altering the vertex index.

Parameters:
  `source` - a source to copy (`null` not permitted).
  `vertexIndex` - the vertex index.

## Method Details

### getPos

public double getPos()
Returns the position of the tick, as a percentage along the axis (for example, 0.5 is halfway along the axis).

Returns:
  The position.

### getKey

public Comparable<?> getKey()
Returns the key when the tick data is for a `CategoryAxis3D`, and `null` otherwise.

Returns:
  The key (possibly `null`).

### getKeyLabel

public String getKeyLabel()
Returns the key label.

Returns:
  The key label (possibly `null`).
Since:
  1.2

### getDataValue

public double getDataValue()
Returns the data value when the tick data is for a `NumberAxis3D`, and `Double.NaN` otherwise.

Returns:
  The data value.

### getVertexIndex

public int getVertexIndex()
Returns the vertex index that is the anchor point for the tick mark.

Returns:
  The vertex index.

### setVertexIndex

public void setVertexIndex(int index)
Sets the vertex index. The vertex is a point in 3D space that is the anchor point for the tick mark, after this is projected to 2D space we have a reference point for the tick mark.

Parameters:
  `index` - the index.

### getAnchorPt

public Point2D getAnchorPt()
Returns the anchor point.

Returns:
  The anchor point.

### setAnchorPt

public void setAnchorPt(Point2D anchorPt)
Sets the anchor point. This is the projected point in 2D space of the vertex we track in 3D space.

Parameters:
  `anchorPt` - the anchor point.