Skip to content

Interface: StyleCondition ​

A condition on a point. Keys are fields of the trace ('y', 'text', 'marker.size', 'customdata[1]', or 'pointNumber', the point's index) holding StyleOperators or a value (shorthand for eq). Several fields must all hold; and, or and not combine conditions.

Example ​

ts
{ y: { gt: 10 }, 'customdata[1]': { in: ['A', 'B'] } }
{ or: [{ y: { lt: 0 } }, { not: { text: { regex: '^ok' } } }] }

Indexable ​

ts
[field: string]:
  | StyleCondition
  | StyleOperators
  | StyleValue
  | readonly StyleCondition[]
  | undefined

Properties ​

PropertyModifierType
and?readonlyreadonly StyleCondition[]
not?readonlyStyleCondition
or?readonlyreadonly StyleCondition[]

Released under the MIT License.