|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.chart.AbstractAutoRanger com.jidesoft.chart.ZeroAlignedAutoRanger
public class ZeroAlignedAutoRanger
A class that computes appropriate ranges for the x and y axes of a chart, while keeping y axis aligned at zero. By default the leading and trailing margin proportions for the x and y ranges are 10% of the difference between the maximum and the minimum (that is, the value is 0.1). If required, you can fix corner points of the x and y axes - for example to make sure the origin of the chart is at (0, 0) while allowing the maximum values to be auto-ranged.
ZeroAlignedAutoRanger is a MultiAutoRanger, which means that when a chart contains multiple y axes, the axes are rescaled independently. This is different behaviour to the DefaultAutoRanger, which rescales the axes by maintaining a scaling factor across them (which is useful for axes showing different units of temperature, for example).
Constructor Summary | |
---|---|
ZeroAlignedAutoRanger()
Creates an auto ranger that does not constrain any of the corner points of the x or y axes, and with default values for the leading and trailing margin proportions. |
|
ZeroAlignedAutoRanger(Double fixMinX,
Double fixMinY,
Double fixMaxX,
Double fixMaxY)
This constructor allows you to fix one or more parts of the ranges that are returned. |
Method Summary | |
---|---|
Map<Axis,Range<?>> |
getAxisRanges(Chart chart)
|
Pair<Range<?>,Range<?>> |
getRanges(Chart chart)
Computes appropriate x and y ranges for the supplied chart instance and applies them to the chart. |
boolean |
isAlwaysIncludeXZero()
Returns a boolean to indicate whether zero should always be included in the modified x range |
boolean |
isAlwaysIncludeYZeros()
Returns a boolean to indicate whether zero should always be included in the modified y ranges |
boolean |
isAlwaysIncludeZeros()
Returns a boolean to indicate whether zero inclusion is active for both x and y axes |
void |
setAlwaysIncludeXZero(boolean alwaysIncludeXZero)
|
void |
setAlwaysIncludeYZeros(boolean alwaysIncludeYZeros)
|
void |
setAlwaysIncludeZeros(boolean alwaysIncludeZeros)
When you have all positive or all negative data, auto-ranging would normally home in on the ranges that actually include the data, but sometimes you want the origin to be included. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ZeroAlignedAutoRanger()
public ZeroAlignedAutoRanger(Double fixMinX, Double fixMinY, Double fixMaxX, Double fixMaxY)
fixMinX
- the fixed value for min x, or null to compute value automaticallyfixMinY
- the fixed value for min y, or null to compute value automaticallyfixMaxX
- the fixed value for max x, or null to compute value automaticallyfixMaxY
- the fixed value for max y, or null to compute value automaticallyMethod Detail |
---|
public boolean isAlwaysIncludeZeros()
public void setAlwaysIncludeZeros(boolean alwaysIncludeZeros)
alwaysIncludeZeros
- a boolean to indicate whether you want zero to be includedpublic boolean isAlwaysIncludeXZero()
public void setAlwaysIncludeXZero(boolean alwaysIncludeXZero)
public boolean isAlwaysIncludeYZeros()
public void setAlwaysIncludeYZeros(boolean alwaysIncludeYZeros)
public Pair<Range<?>,Range<?>> getRanges(Chart chart)
getRanges
in interface AutoRanger
chart
- the chart instance for which the ranges should be calculated
public Map<Axis,Range<?>> getAxisRanges(Chart chart)
getAxisRanges
in interface MultiAutoRanger
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |