NChartValueAxisDataSource Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | NChartValueAxis.h |
Overview
The NChartValueAxisDataSource protocol provides methods to control data displayed on value axis.
– valueAxisDataSourceNameForAxis:
Get the name that is displayed in the axis' caption.
- (NSString *)valueAxisDataSourceNameForAxis:(NChartValueAxis *)axis
Parameters
axis |
|
---|
Return Value
the name of the axis.
See Also
Declared In
NChartValueAxis.h
– valueAxisDataSourceMinForValueAxis:
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.
- (NSNumber *)valueAxisDataSourceMinForValueAxis:(NChartValueAxis *)axis
Parameters
axis |
|
---|
Return Value
the minimal value for the axis. It may be nil that is equivalent to the absence of implementation.
See Also
Declared In
NChartValueAxis.h
– valueAxisDataSourceMaxForValueAxis:
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.
- (NSNumber *)valueAxisDataSourceMaxForValueAxis:(NChartValueAxis *)axis
Parameters
axis |
|
---|
Return Value
the maximal value for the axis. It may be nil that is equivalent to the absence of implementation.
See Also
Declared In
NChartValueAxis.h
– valueAxisDataSourceStepForValueAxis:
Get step value for axis. If there is no implementation, the step, min and max values are beautified.
- (NSNumber *)valueAxisDataSourceStepForValueAxis:(NChartValueAxis *)axis
Parameters
axis |
|
---|
Return Value
the step value for the axis. It may be nil that is equivalent to the absence of implementation.
See Also
Declared In
NChartValueAxis.h
– valueAxisDataSourceTicksForValueAxis:
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.
- (NSArray *)valueAxisDataSourceTicksForValueAxis:(NChartValueAxis *)axis
Parameters
axis |
|
---|
Return Value
an array of strings that represent the ticks. It may be nil that is equivalent to the absence of implementation.
See Also
Declared In
NChartValueAxis.h
– valueAxisDataSourceExtraTicksForValueAxis:
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
.
- (NSArray *)valueAxisDataSourceExtraTicksForValueAxis:(NChartValueAxis *)axis
Parameters
axis |
|
---|
Return Value
array of extra ticks.
Discussion
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
.
See Also
Declared In
NChartValueAxis.h
– valueAxisDataSourceLengthForValueAxis:
Get length of axis in 3D scene units. If there is no implementation, 1 is used. See length of NChartValueAxis for details.
- (NSNumber *)valueAxisDataSourceLengthForValueAxis:(NChartValueAxis *)axis
Parameters
axis |
|
---|
Return Value
the length of the axis. It may be nil that is equivalent to the absence of implementation.
See Also
Declared In
NChartValueAxis.h
– valueAxisDataSourceDouble:toStringForValueAxis:
Convert double value to string.
- (NSString *)valueAxisDataSourceDouble:(double)value toStringForValueAxis:(NChartValueAxis *)axis
Parameters
value |
|
---|---|
axis |
|
Return Value
string representation of the value.
See Also
Declared In
NChartValueAxis.h
– valueAxisDataSourceMinDateForValueAxis:
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.
- (NSDate *)valueAxisDataSourceMinDateForValueAxis:(NChartValueAxis *)axis
Parameters
axis |
|
---|
Return Value
the minimal date for the axis. It may be nil that is equivalent to the absence of implementation.
Discussion
This method is called in date mode of the value axis only. See hasDates
method of the
NChartValueAxis
for details.
See Also
Declared In
NChartValueAxis.h
– valueAxisDataSourceMaxDateForValueAxis:
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.
- (NSDate *)valueAxisDataSourceMaxDateForValueAxis:(NChartValueAxis *)axis
Parameters
axis |
|
---|
Return Value
the maximal date for the axis. It may be nil that is equivalent to the absence of implementation.
Discussion
This method is called in date mode of the value axis only. See hasDates
method of the
NChartValueAxis
for details.
See Also
Declared In
NChartValueAxis.h
– valueAxisDataSourceDateStepForValueAxis:
Get date step value for axis. If there is no implementation, the step, min and max values are beautified.
- (NSNumber *)valueAxisDataSourceDateStepForValueAxis:(NChartValueAxis *)axis
Parameters
axis |
|
---|
Return Value
number representing time interval of the date step value for the axis. It may be nil that is equivalent to the absence of implementation.
Discussion
This method is called in date mode of the value axis only. See hasDates
method of the
NChartValueAxis
for details.
See Also
Declared In
NChartValueAxis.h
– valueAxisDataSourceDate:tickInterval:toStringForAxis:
Convert date to string.
- (NSString *)valueAxisDataSourceDate:(NSDate *)date tickInterval:(NSTimeInterval)tickInterval toStringForAxis:(NChartValueAxis *)axis
Parameters
date |
|
---|---|
tickInterval |
|
axis |
|
Return Value
string representation of the date.
Declared In
NChartValueAxis.h