|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.googlecode.charts4j.DataUtil
public final class DataUtil
Perusing the Google Chart API Group reveals that a lot of users and developers are having difficulty scaling their data. A common question is "What do I do about negative numbers?". Or "What if my data lies outside the simple or extended encoding range?" The answer to these problems is that users must scale their data so that they may be rendered in the chart. This class helps users achieve that goal.
Data
,
Plots
,
GCharts
Method Summary | |
---|---|
static Data |
scale(double... data)
Static factory method that will simply scale between the minimum and maximum values in the data. |
static Data |
scale(List<? extends Number> data)
Static factory method that will simply scale between the minimum and maximum values in the data. |
static Data |
scaleWithinRange(double min,
double max,
double[] data)
Static factory method that will scale data between the min and max. |
static Data |
scaleWithinRange(double min,
double max,
List<? extends Number> data)
Static factory method that will scale data between the min and max. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Data scaleWithinRange(double min, double max, double[] data)
min
- The minimum value in the scaling range.max
- The maximum value in the scaling range.data
- The data
Data
public static Data scaleWithinRange(double min, double max, List<? extends Number> data)
min
- The minimum value in the scaling range.max
- The maximum value in the scaling range.data
- The data list to be scaled. The Number type is used as a
convenience but Numbers that fall outside the
Double.MAX_VALUE
and Double.MIN_VALUE
should
not be used.
Data
public static Data scale(double... data)
data
- Provide a data series that will be scaled by this method.
Data
public static Data scale(List<? extends Number> data)
data
- Provide a data series that will be scaled by this method.
Double.MAX_VALUE
and
Double.MIN_VALUE
should not be used.Data
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |