Package org.jfree.chart.axis
Class SymbolicTickUnit
java.lang.Object
org.jfree.chart.axis.TickUnit
org.jfree.chart.axis.NumberTickUnit
org.jfree.chart.axis.SymbolicTickUnit
- All Implemented Interfaces:
Serializable
,Comparable
public class SymbolicTickUnit extends NumberTickUnit implements Serializable
A symbolic tick unit.
- Author:
- Anthony Boulestreau
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description SymbolicTickUnit(double size, String[] sv)
Creates a new symbolic tick unit. -
Method Summary
Modifier and Type Method Description int
getSymbolCount()
Returns the number of symbols in this unit.String
valueToString(double value)
Converts a value to a string, using the list of symbolic values.
-
Constructor Details
-
SymbolicTickUnit
Creates a new symbolic tick unit.- Parameters:
size
- the size of the tick unit.sv
- the list of symbolic value to display instead of the numeric value.
-
-
Method Details
-
valueToString
Converts a value to a string, using the list of symbolic values. ex: if the symbolic value list is ["up", "down"] then 0 is convert to "up" and 1 to "down".- Overrides:
valueToString
in classNumberTickUnit
- Parameters:
value
- value to convert.- Returns:
- the symbolic value.
-
getSymbolCount
public int getSymbolCount()Returns the number of symbols in this unit.- Returns:
- the symbol count.
-