CFXRealTimeSettings Class Reference

Inherits from
Conforms to
Framework
Availability
Available in iOS 5.0 and later.
Companion guide
Declared in
ChartFX.h

Overview

Chart FX for iOS supports true real-time charting capabilities by giving specific functions that support chart scrolling in an accelerated painting mode (without flickering). Using the supported members of this class, you can control the type and style of a real-time chart as well as visual attributes to make your charts more readable and useful.

loopMarker sets the visual properties of the loop marker.

In order to use this functionality you must include jchartfx.advanced.js in your project.

Properties

bufferSize

Gets or sets the buffer size for real-time charts. When setting this property, the data array will be cleared.

@property(nonatomic) int bufferSize
Discussion

This property allocates a circular buffer that Chart FX for iOS will use to handle limited real-time charts. By using this property, you gain performance in real-time charts and avoid data overflow.

Declared In
ChartFX.h

fastScroll

Gets or sets the Fast Scrolling feature.

@property(nonatomic) BOOL fastScroll
Discussion

This feature scrolls a portion of the chart as a whole picture and simply paints a single value, instead of redrawing all the points.

This technique may prove very helpful when you have a large number of points or series.

Declared In
ChartFX.h

isBufferFull

Gets the status of the Buffer to see if it is full.

@property(nonatomic) BOOL isBufferFull
Discussion

This Boolean value returns YES when the buffer is equal to the BufferSize property.

This is a good property to check to prevent Buffer Overflow.

Declared In
ChartFX.h

loopMarker

Allows you to apply the supported CFXLine class members to the real-time loop marker.

@property(nonatomic) CFXLine loopMarker
Declared In
ChartFX.h

mode

Sets or Gets the RealTime Mode.

@property(nonatomic) CFXRealTimeMode mode
Discussion

Loop Mode should be used if you prefer for a loop marker to move across the chart from left to right updating the values as it passes.

Scroll Mode should be used if you prefer the chart's data line/curve moving across from right to left updating the values on the right-most part of the chart.

Declared In
ChartFX.h

Instance Methods

beginAddDataForNumberOfPoints:action:

Add points in the real-time chart. This function needs to be called before endAddDataScrollingLabels

- (void) beginAddDataForNumberOfPoints:(int *)points action(RealTimeAction *)action
Parameters
points
Number of points to add in the real-time chart.
action
Used to determine whether points are appended to the end or inserted at the beginning of the chart.
Declared In
ChartFX.h

endAddDataScrollingLabels:scrollingToEnd:

Refreshs the real-time chart after having added the points using beginAddDataForNumberOfPoints.

- (void) endAddDataScrollingLabels:(BOOL *)scrollLabels scrollingToEnd(BOOL *)scrollingToEnd
Parameters
scrollLabels
If True, allows the scrolling of the temproral axis.
scrollingToEnd
If True, scroll to the last acquired point.
Declared In
ChartFX.h

Constants

CFXRealTimeMode

Enumeration that allows the developer to set how a RealTime chart will animate.

typedef enum {
   CFXScroll,
   CFXLoop
} CFXRealTimeMode;
Constants
CFXScroll
Updates will proceed from left to right and upon reaching the right edge of the chart area the udpates will begin scrolling.
CFXLoop
Updates will proceed from left to right and upon reaching the right edge of the chart area the updates will continue on the left side of the chart.
Declared In
chartfx.h