• Public
  • Public/Protected
  • All

Class PalettedFill <TProps >

Fillstyle class to colorize the data based on value using LUT lookup table.

LUT class stores information about values and its associated colors, which provides efficient lookup of the color based on provided value as well as linear and step interpolation between colors.

ChartXY - LineSeries and PointSeries: When this fillstyle is set, the Series will colorize the data-Points based on X / Y value.

Instances of PalettedFill are immutable, meaning that its setters don't modify the object, but instead return a completely new modified object.




  • Create a new fillstyle to fill the object with Colors based on value. The color for the data-point would be selected from a specified LUT, which contains the information about gradient steps.

    Create the paletted fillstyle with specified LUT lookup table.


    // create LUT from 0..100 with gradient steps.
    const lut = new LUT( {
     steps: [
          { value: 0, color: ColorRGBA( 0, 0, 0 ) },
          { value: 30, color: ColorRGBA( 255, 255, 0 ) },
          { value: 45, color: ColorRGBA( 255, 204, 0 ) },
          { value: 60, color: ColorRGBA( 255, 128, 0 ) },
          { value: 100, color: ColorRGBA( 255, 0, 0 ) }
     interpolate: true
     } )
    // create fillstyle with attached lookup table
    const palettedfill = new PalettedFill({ lut })


    • Optional props: Partial<PalettedFillProperties>

      Optional object containing parameters for creation of fillstyle.

    Returns PalettedFill



  • getDefaultHighlightStyle(): this


  • getPalette(): LUT
  • Get LUT lookup table.

    Returns LUT

    LUT object.

Static Factory

  • Factory(values?: Partial<TProps> | Iterable<[string, any]>): Record<TProps> & Readonly<TProps>
  • Type parameters

    • TProps: Object


    • Optional values: Partial<TProps> | Iterable<[string, any]>

    Returns Record<TProps> & Readonly<TProps>

Static Record

  • Record(defaultValues: TProps, name?: undefined | string): Factory<TProps>
  • Unlike other types in Immutable.js, the Record() function creates a new Record Factory, which is a function that creates Record instances.

    See above for examples of using Record().

    Note: Record is a factory function and not a class, and does not use the new keyword during construction.

    Type parameters

    • TProps


    • defaultValues: TProps
    • Optional name: undefined | string

    Returns Factory<TProps>

Static getDescriptiveName

  • getDescriptiveName(record: Record<any>): string
  • Records allow passing a second parameter to supply a descriptive name that appears when converting a Record to a string or in any error messages. A descriptive name for any record can be accessed by using this method. If one was not provided, the string "Record" is returned.

    const { Record } = require('immutable')
    const Person = Record({
      name: null
    }, 'Person')
    var me = Person({ name: 'My Name' })
    me.toString() // "Person { "name": "My Name" }"
    Record.getDescriptiveName(me) // "Person"


    • record: Record<any>

    Returns string

Static isRecord

  • isRecord(maybeRecord: any): boolean
  • True if maybeRecord is an instance of a Record.


    • maybeRecord: any

    Returns boolean