The NChartValueAxisDataSource interface provides methods to control data displayed on value axis. More...
Public Member Functions | |
String | name (NChartValueAxis axis) |
Get the name that is displayed in the axis' caption. More... | |
Number | min (NChartValueAxis axis) |
Get the minimal value for the axis. More... | |
Number | max (NChartValueAxis axis) |
Get the maximal value for the axis. More... | |
Number | step (NChartValueAxis axis) |
Get step value for axis. More... | |
String[] | ticks (NChartValueAxis axis) |
Get array of ticks for the discrete axis. More... | |
String[] | extraTicks (NChartValueAxis axis) |
Get array of extra ticks for discrete axis. More... | |
Number | length (NChartValueAxis axis) |
Get length of axis in 3D scene units. More... | |
String | doubleToString (double value, NChartValueAxis axis) |
Convert double value to string. More... | |
Date | minDate (NChartValueAxis axis) |
Get the minimal date for the axis. More... | |
Date | maxDate (NChartValueAxis axis) |
Get the maximal date for the axis. More... | |
Number | dateStep (NChartValueAxis axis) |
Get date step value for axis. More... | |
String | dateToString (Date date, double tickInterval, NChartValueAxis axis) |
Convert date to string. More... | |
Detailed Description
The NChartValueAxisDataSource interface provides methods to control data displayed on value axis.
Member Function Documentation
Number com.nchart3d.NChart.NChartValueAxisDataSource.dateStep | ( | NChartValueAxis | axis | ) |
Get date step value for axis.
If there is no implementation, the step, min and max values are beautified. This method is called in date mode of the value axis only. See hasDates
method of the NChartValueAxis
for details.
- Parameters
-
axis - axis to get the step value for.
- Returns
- number representing time interval of the date step value for the axis. It may be null that is equivalent to the absence of implementation.
String com.nchart3d.NChart.NChartValueAxisDataSource.dateToString | ( | Date | date, |
double | tickInterval, | ||
NChartValueAxis | axis | ||
) |
Convert date to string.
- Parameters
-
date - date to convert. tickInterval - time interval between neighbor ticks in seconds. axis - axis to convert value for.
- Returns
- string representation of the date.
String com.nchart3d.NChart.NChartValueAxisDataSource.doubleToString | ( | double | value, |
NChartValueAxis | axis | ||
) |
Convert double value to string.
- Parameters
-
axis - axis to convert value for. value - value to convert.
- Returns
- string representation of the value.
String [] com.nchart3d.NChart.NChartValueAxisDataSource.extraTicks | ( | NChartValueAxis | axis | ) |
Get array of extra ticks for discrete axis.
Use this method to provide additional ticks for axis. This method is called after you call extendData
of NChart
. The ticks from the array returned are added to the axis' array of ticks, so axis will have more data. The maximal length of ticks array is determined by pointsHistoryLength
property of NChart
. Due to performance reasons you won't have access to the newly created ticks through the ticks
method of the NChartValueAxis.
- Parameters
-
axis - axis to obtain the extra ticks for.
- Returns
- array of extra ticks.
Number com.nchart3d.NChart.NChartValueAxisDataSource.length | ( | NChartValueAxis | axis | ) |
Get length of axis in 3D scene units.
If there is no implementation, 1 is used. See length of com.nchart3d.NChart.NChartValueAxis for details.
- Parameters
-
axis - axis to get the length for.
- Returns
- the length of the axis. It may be null that is equivalent to the absence of implementation.
Number com.nchart3d.NChart.NChartValueAxisDataSource.max | ( | NChartValueAxis | axis | ) |
Get the maximal value for the axis.
If there is no implementation, the axis is assumed to be discrete and you should provide an array of ticks. If neither min and max nor an array of ticks are provided, the axis is assumed to be continuous and both min and max are calculated automatically based on the values for the series.
- Parameters
-
axis - axis to get the maximal value for.
- Returns
- the maximal value for the axis. It may be null that is equivalent to the absence of implementation.
Date com.nchart3d.NChart.NChartValueAxisDataSource.maxDate | ( | NChartValueAxis | axis | ) |
Get the maximal date for the axis.
If there is no implementation, both min and max are calculated automatically based on the date from the series.
This method is called in date mode of the value axis only. See hasDates
method of the NChartValueAxis
for details.
- Parameters
-
axis - axis to get maximal date for.
- Returns
- the maximal date for the axis. It may be null that is equivalent to the absence of implementation.
Number com.nchart3d.NChart.NChartValueAxisDataSource.min | ( | NChartValueAxis | axis | ) |
Get the minimal value for the axis.
If there is no implementation, the axis is assumed to be discrete and you should provide an array of ticks. If neither min and max nor an array of ticks are provided, the axis is assumed to be continuous and both min and max are calculated automatically based on the values for the series.
- Parameters
-
axis - axis to get minimal value for.
- Returns
- the minimal value for the axis. It may be null that is equivalent to the absence of implementation.
Date com.nchart3d.NChart.NChartValueAxisDataSource.minDate | ( | NChartValueAxis | axis | ) |
Get the minimal date for the axis.
If there is no implementation, both min and max are calculated automatically based on the date from the series.
This method is called in date mode of the value axis only. See hasDates
method of the NChartValueAxis
for details.
- Parameters
-
axis - axis to get minimal date for.
- Returns
- the minimal date for the axis. It may be null that is equivalent to the absence of implementation.
String com.nchart3d.NChart.NChartValueAxisDataSource.name | ( | NChartValueAxis | axis | ) |
Get the name that is displayed in the axis' caption.
- Parameters
-
axis - axis to get the name for.
- Returns
- the name of the axis.
Number com.nchart3d.NChart.NChartValueAxisDataSource.step | ( | NChartValueAxis | axis | ) |
Get step value for axis.
If there is no implementation, the step, min and max values are beautified.
- Parameters
-
axis - axis to get the step value for.
- Returns
- the step value for the axis. It may be null that is equivalent to the absence of implementation.
String [] com.nchart3d.NChart.NChartValueAxisDataSource.ticks | ( | NChartValueAxis | axis | ) |
Get array of ticks for the discrete axis.
You should provide it if min and max are not implemented. If they are implemented, the array of ticks is ignored. If neither min and max nor the array of ticks are provided, axis is assumed to be continuous and both min and max are calculated automatically based on the values for the series.
- Parameters
-
axis - axis to get an array of ticks for.
- Returns
- an array of strings that represent the ticks. It may be null that is equivalent to the absence of implementation.