public final class DataUnit
extends java.lang.Object
Provides access to the DataUnit object.
All the values passed to the chart, are internally processed by this class.
The methods and methods exposed in this class, will allow you to convert data from one type to another. Plus, you can verify if some point is being rendered or if it's hidden.
Modifier and Type | Field and Description |
---|---|
double |
DAY
All the values passed to the chart, are internally processed by this class.
|
double |
HIDDEN
All the values passed to the chart, are internally processed by this class.
|
double |
HOUR
All the values passed to the chart, are internally processed by this class.
|
double |
MILLISECOND
All the values passed to the chart, are internally processed by this class.
|
double |
MINUTE
All the values passed to the chart, are internally processed by this class.
|
double |
MONTH
All the values passed to the chart, are internally processed by this class.
|
double |
SECOND
All the values passed to the chart, are internally processed by this class.
|
int |
TICKSUNIT
All the values passed to the chart, are internally processed by this class.
|
double |
YEAR
All the values passed to the chart, are internally processed by this class.
|
Constructor and Description |
---|
DataUnit()
Constructs a newly allocated DataUnit object
|
DataUnit(DataUnit value)
Constructs a newly allocated DataUnit object
|
DataUnit(java.util.Date value)
Constructs a newly allocated DataUnit object
|
DataUnit(double value)
Constructs a newly allocated DataUnit object
|
DataUnit(TimeSpan value)
Constructs a newly allocated DataUnit object
|
Modifier and Type | Method and Description |
---|---|
double |
dateToDouble(DataUnit d)
Converts the value of the specified DateTime to a Double.
|
static double |
dateToDouble(java.util.Date d)
Converts the value of the specified DateTime to a Double.
|
static java.util.Date |
doubleToDate(double d)
Converts the value of the specified Double to a DateTime.
|
static TimeSpan |
doubleToTimeSpan(double d)
Converts the value of the specified Double to a TimeSpan
|
boolean |
isHidden()
Specifies if the selected DataUnit is a Hidden Value
|
static boolean |
isValueHidden(double d)
Determines if a specified value is set as hidden.
|
double |
timeSpanToDouble(DataUnit t)
Converts the value of the specified TimeSpan to a Double.
|
static double |
timeSpanToDouble(TimeSpan t)
Converts the value of the specified TimeSpan to a Double.
|
public double DAY
All the values passed to the chart, are internally processed by this class.
The methods and methods exposed in this class, will allow you to convert data from one type to another. Plus, you can verify if some point is being rendered or if it's hidden.
public double HIDDEN
All the values passed to the chart, are internally processed by this class.
The methods and methods exposed in this class, will allow you to convert data from one type to another. Plus, you can verify if some point is being rendered or if it's hidden.
public double HOUR
All the values passed to the chart, are internally processed by this class.
The methods and methods exposed in this class, will allow you to convert data from one type to another. Plus, you can verify if some point is being rendered or if it's hidden.
public double MILLISECOND
All the values passed to the chart, are internally processed by this class.
The methods and methods exposed in this class, will allow you to convert data from one type to another. Plus, you can verify if some point is being rendered or if it's hidden.
public double MINUTE
All the values passed to the chart, are internally processed by this class.
The methods and methods exposed in this class, will allow you to convert data from one type to another. Plus, you can verify if some point is being rendered or if it's hidden.
public double MONTH
All the values passed to the chart, are internally processed by this class.
The methods and methods exposed in this class, will allow you to convert data from one type to another. Plus, you can verify if some point is being rendered or if it's hidden.
public double SECOND
All the values passed to the chart, are internally processed by this class.
The methods and methods exposed in this class, will allow you to convert data from one type to another. Plus, you can verify if some point is being rendered or if it's hidden.
public int TICKSUNIT
All the values passed to the chart, are internally processed by this class.
The methods and methods exposed in this class, will allow you to convert data from one type to another. Plus, you can verify if some point is being rendered or if it's hidden.
public double YEAR
All the values passed to the chart, are internally processed by this class.
The methods and methods exposed in this class, will allow you to convert data from one type to another. Plus, you can verify if some point is being rendered or if it's hidden.
public DataUnit()
public DataUnit(TimeSpan value)
value
- public DataUnit(DataUnit value)
value
- public DataUnit(double value)
value
- public DataUnit(java.util.Date value)
value
- public boolean isHidden()
DataUnit du; du = new DataUnit(); boolean duIsHidden; duIsHidden = du.getIsHidden();
public double dateToDouble(DataUnit d)
Converts the value of the specified DateTime to a Double.
This method is useful when trying to plot on a numerical axis set to Date format.
To convert December 25th, 2012 into a double.
double xmasDay; xmasDay = DataUnit.DateToDouble(new SfxNET.System.DateTime(2012, 12, 25).StructClone());
d
- public static double dateToDouble(java.util.Date d)
Converts the value of the specified DateTime to a Double.
This method is useful when trying to plot on a numerical axis set to Date format.
To convert December 25th, 2012 into a double.
double xmasDay; xmasDay = DataUnit.DateToDouble(new SfxNET.System.DateTime(2012, 12, 25).StructClone());
d
- DateTime to be converted.public static java.util.Date doubleToDate(double d)
Converts the value of the specified Double to a DateTime.
This method is useful when dealing with data from a numerical axis set to Date format.
To convert a double to DateTime:
d
- Double to be converted.public static TimeSpan doubleToTimeSpan(double d)
Converts the value of the specified Double to a TimeSpan
This method is useful when dealing with data from a numerical axis set to Date format.
To convert a double to TimeSpan:
d
- Double to be converted.public static boolean isValueHidden(double d)
Determines if a specified value is set as hidden.
This method will return true if the value passed as parameter is set as hidden.
For example, we use this piece of code to display a chart with 4 points, in which 1 of them is hidden:
chart1.getData().setSeries(1); chart1.getData().setPoints(4); chart1.getData().set(0, 0, ((DataUnit)1)); chart1.getData().set(0, 1, ((DataUnit)2)); chart1.getData().set(0, 2, ((DataUnit)Chart.HIDDEN)); chart1.getData().set(0, 3, ((DataUnit)3));
The code below will return true:
boolean isHidden; isHidden = DataUnit.IsValueHidden(DataUnit.op_Implicit(chart1.getData().get(0, 2)));
While the following core will return false:
boolean isHidden; isHidden = DataUnit.IsValueHidden(DataUnit.op_Implicit(chart1.getData().get(0, 1)));
d
- public static double timeSpanToDouble(TimeSpan t)
Converts the value of the specified TimeSpan to a Double.
This method is useful when trying to plot on a numerical axis set to Date format.
To convert a TimeSpan of 90 minutes to double:
double myDouble; myDouble = DataUnit.TimeSpanToDouble(new SfxNET.System.TimeSpan(1, 30, 0).StructClone());
t
- TimeSpan to be converted.public double timeSpanToDouble(DataUnit t)
Converts the value of the specified TimeSpan to a Double.
This method is useful when trying to plot on a numerical axis set to Date format.
To convert a TimeSpan of 90 minutes to double:
double myDouble; myDouble = DataUnit.TimeSpanToDouble(new SfxNET.System.TimeSpan(1, 30, 0).StructClone());
t
- 2014 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
All other names are trademarks or registered trademarks of their respective owners.