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;
  • The color map stop points.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSArray<NSNumber *> *_Nonnull stops;
  • Creates a new instance of SCIColorMap class.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithColors:(nonnull NSArray<UIColor *> *)colors
                                  andStops:(nonnull NSArray<NSNumber *> *)stops;

    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;

    Parameters

    startColor

    The start color.

    endColor

    The end color.

  • Interpolates a data-value in a SCIColorMap.

    Declaration

    Objective-C

    - (nonnull UIColor *)lerpColorForValue:(double)value;

    Parameters

    value

    The value to interpolate color for.

    Return Value

    A linear interpolated color.

  • Helper method which creates SCIIntegerValues bitmap data from SCIColorMap instance.

    Declaration

    Objective-C

    + (nonnull SCIUnsignedIntegerValues *)createColorMapBitmap:
                                              (nonnull SCIColorMap *)colorMap
                                                         width:(int)width
                                                        height:(int)height;

    Parameters

    colorMap

    The color map.

    width

    The width of bitmap.

    height

    The height of bitmap.

    Return Value

    The SCIUnsignedIntegerValues bitmap data.