Construct a PalettedFill object, specifying any amount of its properties.
// Example 1, palette by 'y' coordinate.
const paletteY = new PalettedFill({
lookUpProperty: 'y',
lut: new LUT({
interpolate: true,
steps: [
{ value: 0, color: ColorRGBA( 0, 0, 0 ) },
{ value: 10, color: ColorRGBA( 255, 0, 0 ) },
{ value: 20, color: ColorRGBA( 0, 255, 0 ) },
{ value: 30, color: ColorRGBA( 0, 0,255 ) },
]
})
})
// Example 2, palette by user supplied data point values.
const paletteValue = new PalettedFill({
lookUpProperty: 'value',
lut: new LUT({
interpolate: true,
steps: [
{ value: 0, color: ColorRGBA( 0, 0, 0 ) },
{ value: 100, color: ColorRGBA( 255, 0, 0 ) },
]
})
})
For more details, see LUT, and LookUpProperty.
Optional
props: Partial<PalettedFillProperties<T>>Object containing any amount of PalettedFill properties.
Readonly
lookIdentifier that points to a property to be used when picking colours from attached Look Up Table.
Possible values are:
Features that support assigning a PalettedFill contain additional per-feature information, which properties are supported, and how they behave.
Readonly
lutColor lookup table, which describes the relation of lookUpProperty
values to colors.
Readonly
typeConstruct a new PalettedFill object based on this one, but with modified 'lookUpProperty'.
Example:
palettedFill.setLookUpProperty( 'y' )
New PalettedFill object.
Style class for describing a dynamically looked up fill color. Using a PalettedFill, each data point (or even pixel) can be colored individually. The basis of coloring can be configured extensively, with a variety of different option combinations (read below for details).
Instances of PalettedFill, like all LCJS style classes, are immutable, meaning that its setters don't modify the actual object, but instead return a completely new modified object.
Properties of PalettedFill:
lut
: color lookup table. Essentially a list of colors paired with numeric values. See LUT for more details.lookUpProperty
: selects basis of color lookup. See LookUpProperty for possible options.PalettedFill Usage:
PalettedFill can be used with a select group of features:
Related information:
For more fill styles, see: