public class TickFactory
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TickFactory.TickFormatting
tick formatting modes
|
Constructor and Description |
---|
TickFactory(IScaleProvider scale) |
TickFactory(TickFactory.TickFormatting format,
IScaleProvider scale) |
Modifier and Type | Method and Description |
---|---|
java.util.List<Tick> |
generateIndexBasedTicks(double min,
double max,
int maxTicks)
Generate a list of ticks that span range given by min and max.
|
java.util.List<Tick> |
generateLogTicks(double min,
double max,
int maxTicks,
boolean allowMinMaxOver,
boolean tight) |
java.util.List<Tick> |
generateTicks(double min,
double max,
int maxTicks,
boolean allowMinMaxOver,
boolean tight)
Generate a list of ticks that span range given by min and max.
|
protected static java.math.BigDecimal |
nicenum(java.math.BigDecimal x,
boolean round) |
protected static double |
roundDown(java.math.BigDecimal numerator,
java.math.BigDecimal denominator)
Round numerator down to multiples of denominators
|
protected static double |
roundUp(java.math.BigDecimal numerator,
java.math.BigDecimal denominator)
Round numerator up to multiples of denominators
|
public TickFactory(IScaleProvider scale)
format
- public TickFactory(TickFactory.TickFormatting format, IScaleProvider scale)
format
- protected static double roundDown(java.math.BigDecimal numerator, java.math.BigDecimal denominator)
numerator
- denominator
- protected static double roundUp(java.math.BigDecimal numerator, java.math.BigDecimal denominator)
numerator
- denominator
- protected static java.math.BigDecimal nicenum(java.math.BigDecimal x, boolean round)
x
- round
- if true, then round else take ceilingpublic java.util.List<Tick> generateTicks(double min, double max, int maxTicks, boolean allowMinMaxOver, boolean tight)
min
- max
- maxTicks
- allowMinMaxOver
- allow min/maximum overwritetight
- if true then remove ticks outside rangepublic java.util.List<Tick> generateIndexBasedTicks(double min, double max, int maxTicks)
min
- max
- maxTicks
- public java.util.List<Tick> generateLogTicks(double min, double max, int maxTicks, boolean allowMinMaxOver, boolean tight)
min
- (must be >0)max
- (must be >0)maxTicks
- allowMinMaxOver
- allow min/maximum overwritetight
- if true then remove ticks outside range