iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
SCIGridData
@interface SCIGridData<T : id <ISCIComparable>>
: NSObject <ISCIDoubleValuesProvider>
A Data Structure which stores a 2D uniform array of elements.
-
Gets the
SCIIndexCalculator
which is used to map indices. -
Gets the
SCIIndexCalculator
which is used to map indices.Declaration
Objective-C
@property (nonatomic, readonly) SCIIndexCalculator *_Nonnull indexCalculator;
Swift
var indexCalculator: SCIIndexCalculator { get }
-
Creates a new instance of the
SCIGridData
class.Declaration
Objective-C
- (nonnull instancetype)initWithItemsClass:(SCIDataType)itemsType indexCalculator: (nonnull SCIIndexCalculator *)calculator;
Swift
init(itemsClass itemsType: SCIDataType, indexCalculator calculator: SCIIndexCalculator)
Parameters
itemsType
The types of underlying data.
calculator
The
SCIIndexCalculator
instance. -
Gets the value with specified z and x index.
Declaration
Objective-C
- (nonnull T)valueAtXIndex:(NSInteger)xIndex zIndex:(NSInteger)zIndex;
Swift
func value(atXIndex xIndex: Int, zIndex: Int) -> T
Parameters
xIndex
The xIndex to use.
zIndex
The zIndex to use.
Return Value
The value at specified index.
-
Sets the value with specified z and x index.
Declaration
Objective-C
- (void)setValue:(nonnull T)value atX:(NSInteger)xIndex andZ:(NSInteger)zIndex;
Swift
func setValue(_ value: T, atX xIndex: Int, andZ zIndex: Int)
Parameters
xIndex
The xIndex to use.
zIndex
The zIndex to use.
value
The value to set.
-
Pushes a row into the array, which discards one old row in a First In First Out fashion. use this method to scroll the GridData in the Z-direction.
Declaration
Objective-C
- (void)pushArrayRow:(nonnull NSArray<T> *)array;
Swift
func pushArrayRow(_ array: [T])
Parameters
array
The array with new values.
-
Pushes a row into the array, which discards one old row in a First In First Out fashion. use this method to scroll the GridData in the Z-direction.
Declaration
Objective-C
- (void)pushValuesRow:(nonnull id<ISCIValues>)values;
Swift
func pushValuesRow(_ values: ISCIValues)
Parameters
values
The row with new values.
-
Sets the row at the specified Z index.
Declaration
Objective-C
- (void)setArrayRow:(nonnull NSArray<T> *)row at:(NSInteger)index;
Swift
func setArrayRow(_ row: [T], at index: Int)
Parameters
index
The z-index to use.
row
The row with new values.
-
Sets the row at the specified Z index.
Declaration
Objective-C
- (void)setValuesRow:(nonnull id<ISCIValues>)row at:(NSInteger)index;
Swift
func setValuesRow(_ row: ISCIValues, at index: Int)
Parameters
index
The z-index to use.
row
The row with new values.
-
Copies values to this instance.
Declaration
Objective-C
- (void)copyFromArray:(nonnull NSArray<T> *)array;
Swift
func copy(from array: [T])
Parameters
array
Array to copy from.
-
Copies values to this instance.
Declaration
Objective-C
- (void)copyFromValues:(nonnull id<ISCIValues>)values;
Swift
func copy(from values: ISCIValues)
Parameters
values
Values to copy from.