Skip to content
This is the alpha v4 version website. Looking for the v3 documentation?

DataPredicate

DataPredicate<A> = keyof A | readonly keyof A[] | Partial<A>

Defined in: packages/sigma/src/types/styles.ts:98

Data predicate for conditional styling based on graph attributes (whenData). Shorthand forms only — use when for function predicates.

  • string: Single attribute name - true if the attribute is truthy
  • string[]: Array of attribute names - true if ALL are truthy (AND logic)
  • object: Map of attribute names to expected values (AND logic)

Type Parameters

A

A extends Attributes = Attributes