Module: ojpalette

Oracle® JavaScript Extension Toolkit (JET)
15.1.0

F83698-01

QuickNav

JET Modules

See JET Module Loading for an overview of module usage within JET.

Functions

getColorValuesFromPalette(palette, bins, options) : {Array.<string>}

Returns an array of colors from the corresponding color palette and range values.
Parameters:
Name Type Argument Description
palette 'viridis' | 'magma' | 'inferno' | 'plasma' the color Palette where the values are from. Options are 'viridis', 'magma', 'inferno', and 'plasma'.
bins number <optional>
the number of color values to be returned, all the colors will be returned if set to 0 or null. Color values may be repeated if the number of bins exceeds the number of colors defined in the specified palette
options Options <optional>
Additional configuration options for the colors to be returned.
Returns:

An array containing CSS color strings from the corresponding color palette

Type
Array.<string>

Type Definitions

Options

Properties:
Name Type Argument Description
range [number,number] <optional>
the range of the values to draw the color values from. By default the range is [0,1]. An error will be thrown if the values are outside [0,1] or if the start value is higher than the end value.