|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jidesoft.chart.AbstractAutoRanger
com.jidesoft.chart.DefaultAutoRanger
public class DefaultAutoRanger
A class that computes appropriate ranges for the x and y axes of a chart. 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.
Note that if you are using multiple y axes, these are 'bound' together by the rescaling procedure. This is intended for the case where, say, one axis shows Celsius and the other one Fahrenheit. In this case you want both axes to be rescaled together. If you want the rescaling of the axes to be more independent, try using the ZeroAlignedAutoRanger instead.
Constructor Summary | |
---|---|
DefaultAutoRanger()
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. |
|
DefaultAutoRanger(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 | |
---|---|
Pair<Range<?>,Range<?>> |
getRanges(Chart chart)
Computes appropriate x and y ranges for the supplied chart instance and applies them to the chart. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultAutoRanger()
public DefaultAutoRanger(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 Pair<Range<?>,Range<?>> getRanges(Chart chart)
chart
- the chart instance for which the ranges should be calculated
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |