CFXDataValues Class Reference
Inherits from | |
Conforms to | |
Framework | |
Availability |
Available in iOS 5.0 and later.
|
Companion guide | |
Declared in |
ChartFX.h
|
Overview
You can also assign x-values to create an XY Plot using the x property.
You can set initial values using the yFrom property. Used in conjunction with the y property, you can create a 'floating bars' effect for bar charts.
Many times charts contain a large amount of data whereby visualizing such data via a chart has little or no value. For example, you may have the number of sales per day for all 365 days of the year however seeing a trend from month to month is very difficult due to the busy and excess information in the chart. Instead you can use ChartFX Data Compacting feature to provide meaningful summarized data. For convenience, ChartFX provides predefined formulas for popular compacting schemes such as First, Last, Min, Max, and Average.
Please note that instead of the value associated with the point, you can assign a hidden constant which will cause the point to be hidden in the chart. Although a hidden point is physically in the data array, when you use this constant the marker will not appear in the chart, and if you have charts like a line or area chart, the line will break at that particular point.
Properties
aggressiveAllocation
Gets or sets a value indicating ChartFX should agreesively allocate space for future values. This increases performance at the cost of additional memory usage.
Discussion
When set to YES, Chart FX will double the current memory allotment when it is required allocate additional memory for the chart's data array. This is the default behavior. When set to NO, memory is allocated in single units.
AggressiveAllocation should only become a factor when dealing with very large amounds of data (millions).
The data method of the Chart object is used to access the DataValues object of a chart.
Availability
- Available in iOS 5.0 and later.
Declared In
ChartFX.h
compacted
Gets a value indicating whether or not the data is compacted.
Discussion
The data compression features provide developers with a mechanism to display data in different intervals, summarizing historical data. The compact method is used to complete the compacting process.
The undoCompact method is used to decompress compacted data and show all values.
The compactedBy method is used to configure a value indicating the interval of units to compress data.
The data method is used to access the DataValues object for a chart.
Availability
- Available in iOS 5.0 and later.
Declared In
ChartFX.h
compactedBy
Gets or sets a value indicating the interval of units to compress data.
Discussion
This method is used to configure the units for compression in the X Axis. If the XAxis has been passed DateTime XValues and has been formated for Date, the units represented by the CompactBy method would be Days. For example a value of 30 would be interperted into 1 Month. If you do not have configured XValues in the chart, then the unit base is 1 (categorical axis).
The data compression features provide developers with a mechanism to display data in different intervals, summarizing historical data. The compact method is used to complete the compacting process.
The compacted returns a value indicating whether or not the data is compacted.
The undoCompact method is used to decompress compacted data and show all values.
The data method is used to access the DataValues object for a chart.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
ChartFX.h
initializeHidden
Gets or sets a value indicating to intialize all non-initialized values to hidden value.
Discussion
This method will affect the data points which will be allocated, not the data points which are already allocated.
Declared In
ChartFX.h
interpolateHidden
Gets or sets a value specifying to draw a connecting line over a missing data point.
Discussion
When this method is set to NO, hidden points in the chart will be result in a "broken" line in the chart. When set to YES, the chart will draw a connecting so prevent the broken line.
The initializeHidden method is used to instruct the chart to intialize all non-initialized values to a hidden value.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
ChartFX.h
labels
Provides access to label collection of the main x-axis.
Parameters
- index
- A zero based index indicating the Label index of the main x-axis.
Availability
- Available in iOS 5.0 and later.
Declared In
ChartFX.h
points
Gets or sets a value indicating the number of series allocated for the chart.
Discussion
The Points and series methods are usually set a design-time using the method dialog box for the Chart object. The only time these methods should be included in code is when you wish to read the number of series or points in a chart.
This method is normally used to get the number of data points per series available in the chart for administration purposes. For example, if you want to change the values of each data point in a series, you will need the number of available points per series to complete the For loop.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
ChartFX.h
series
Gets or sets a value indicating the number of series allocated for the chart.
Discussion
The points and Series methods are usually set a design-time using the property dialog box for the Chart object. The only time these methods should be included in code is when you wish to read the number of series or points in a chart.
This method is normally used to get the number of series available on the chart for administration purposes. For example, if you want to set a different color for each data series using the color method, you will need the number of available data series to complete the For loop.
Declared In
ChartFX.h
x
Allows you to set X-Values for specific point of XY plots.
Parameters
- series
- The series the value belongs to.
- point
- The point on the series.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
ChartFX.h
y
Allows you to access the Y coordinates of the data points.
Parameters
- series
- The series the value belongs to.
- point
- The point on the series.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
ChartFX.h
yFrom
Allows you to set the starting Y-value for a specific value on the chart.
Parameters
- series
- The series the value belongs to.
- point
- The point on the series.
Declared In
ChartFX.h
Instance Methods
commitChanges
Finalizes chart data and invokes selected data related tasks.
Declared In
ChartFX.h
recalculateScale
Recalculates the scale of the chart based on the data available.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
ChartFX.h
compactByStep:
Compacts the data in order to display more summarized information.
Parameters
- step
- The number of points to agregate while compacting data.
Declared In
ChartFX.h
removeSeries:
Remove a Series from the collection by index.
Parameters
- seriesIndex
- Index of Series to be removed.
Declared In
ChartFX.h
undoCompact
If the data is compacted, this method uncompacts the data and shows all values.
Declared In
ChartFX.h
setValue:forPoint:value:forSeries:andPoint:
Used to set the value for a particular point and series.
Parameters
- value
- The value to be set.
- forPoint
- Zero-based index of chart point to set value to.
- value
- The value to be set.
- forSeries
- Zero-based index of chart series to set value to.
- andPoint
- Zero-based index of chart point to set value to.
Discussion
When passing the value forPoint only, the chart must have one single series.
Declared In
ChartFX.h