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
SCIColorMapclass.Declaration
Objective-C
- (nonnull instancetype)initWithColors:(nonnull NSArray<UIColor *> *)colors andStops:(nonnull NSArray<NSNumber *> *)stops;Swift
init(colors: [UIColor], andStops stops: [NSNumber])Parameters
colorsThe colors used by this color map.
stopsThe stops used by this color map.
-
Creates a new instance of
SCIColorMapclass.Declaration
Objective-C
- (nonnull instancetype)initWithStartColor:(nonnull UIColor *)startColor endColor:(nonnull UIColor *)endColor;Swift
init(start startColor: UIColor, end endColor: UIColor)Parameters
startColorThe start color.
endColorThe end color.
-
Interpolates a data-value in a
SCIColorMap.Declaration
Objective-C
- (nonnull UIColor *)lerpColorForValue:(double)value;Swift
func lerpColor(forValue value: Double) -> UIColorParameters
valueThe value to interpolate color for.
Return Value
A linear interpolated color.
-
Helper method which creates
SCIIntegerValuesbitmap data fromSCIColorMapinstance.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) -> SCIUnsignedIntegerValuesParameters
colorMapThe color map.
widthThe width of bitmap.
heightThe height of bitmap.
Return Value
The
SCIUnsignedIntegerValuesbitmap data.
View on GitHub