Interface BasicTicker.Rule
- All Known Subinterfaces:
PrefixTicker.Rule
- Enclosing class:
BasicTicker
public static interface BasicTicker.Rule
Defines a specific rule for generating major and minor axis tick marks.
The major tick marks defined by this rule are labelled by a
contiguous sequence of long integer indices, which increase in the
direction of axis value increase.
- Since:
- 17 Oct 2013
- Author:
- Mark Taylor
-
Method Summary
Modifier and TypeMethodDescriptionlongfloorIndex(double value) Returns the largest major tick mark index value that identifies an axis value less than or equal to a supplied axis value.double[]getMinors(long index) Returns the axis values for minor tickmarks that fall between the a given major tick mark and the next one.indexToLabel(long index) Returns a text string to label the major tick identified by a given index.doubleindexToValue(long index) Returns the axis value identified by a given major tick mark index.
-
Method Details
-
floorIndex
long floorIndex(double value) Returns the largest major tick mark index value that identifies an axis value less than or equal to a supplied axis value.- Parameters:
value- axis reference value- Returns:
- major tick index for an axis point equal to
or just less than
value
-
getMinors
double[] getMinors(long index) Returns the axis values for minor tickmarks that fall between the a given major tick mark and the next one.- Parameters:
index- major tick mark index- Returns:
- minor tick mark axis values between the axis values
for major ticks
indexandindex+1
-
indexToValue
double indexToValue(long index) Returns the axis value identified by a given major tick mark index. Note the result may be infinite if the relevant value cannot be represented by a double.- Parameters:
index- major tick index- Returns:
- axis value for major tick
-
indexToLabel
Returns a text string to label the major tick identified by a given index.- Parameters:
index- major tick index- Returns:
- label string for major tick
-