# Type alias ConditionalDataColorOptions

ConditionalDataColorOptions: object

Conditional color options for data similar to the Conditional Color option in the Sisense UI.

This option allows you to define color conditions. Each condition is a logical expression that defines how data values are mapped into colors. These conditions are evaluated in the order in which they appear in the array.

# Example

An example of a condition stating that a negative data value is displayed in red and another condition stating that a positive data value is green.

{
  type: 'conditional',
  conditions: [
    { color: 'red', expression: '0', operator: '<' },
    { color: 'green', expression: '0', operator: '>=' },
  ],
  defaultColor: 'red',
}

# Type declaration

# conditions

conditions?: DataColorCondition[]

Array of color conditions


# defaultColor

defaultColor?: string

Default color when no condition is met


# type

type: "conditional"

Color options type