iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
SCIColorMap
@interface SCIColorMap : NSObject
Defines a color map for SCIFastUniformHeatmapRenderableSeries
.
-
The color map colors.
Declaration
Objective-C
@property (nonatomic, strong, readonly) NSArray<UIColor *> *_Nonnull colors;
Swift
var colors: [UIColor] { get }
-
The color map stop points.
Declaration
Objective-C
@property (nonatomic, strong, readonly) NSArray<NSNumber *> *_Nonnull stops;
Swift
var stops: [NSNumber] { get }
-
Creates a new instance of
SCIColorMap
class.Declaration
Objective-C
- (nonnull instancetype)initWithColors:(nonnull NSArray<UIColor *> *)colors andStops:(nonnull NSArray<NSNumber *> *)stops;
Swift
init(colors: [UIColor], andStops stops: [NSNumber])
Parameters
colors
The colors used by this color map.
stops
The stops used by this color map.
-
Creates a new instance of
SCIColorMap
class.Declaration
Objective-C
- (nonnull instancetype)initWithStartColor:(nonnull UIColor *)startColor endColor:(nonnull UIColor *)endColor;
Swift
init(start startColor: UIColor, end endColor: UIColor)
Parameters
startColor
The start color.
endColor
The end color.
-
Interpolates a data-value in a
SCIColorMap
.Declaration
Objective-C
- (nonnull UIColor *)lerpColorForValue:(double)value;
Swift
func lerpColor(forValue value: Double) -> UIColor
Parameters
value
The value to interpolate color for.
Return Value
A linear interpolated color.
-
Helper method which creates
SCIIntegerValues
bitmap data fromSCIColorMap
instance.Declaration
Objective-C
+ (nonnull SCIUnsignedIntegerValues *)createColorMapBitmap: (nonnull SCIColorMap *)colorMap width:(int)width height:(int)height;
Swift
class func createColorMapBitmap(_ colorMap: SCIColorMap, width: Int32, height: Int32) -> SCIUnsignedIntegerValues
Parameters
colorMap
The color map.
width
The width of bitmap.
height
The height of bitmap.
Return Value
The
SCIUnsignedIntegerValues
bitmap data.