Skip to content
sigma.js sigma.js
v4.0.6 Docs Examples GitHub 12.2K

DataPredicate

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

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

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)

A extends Attributes = Attributes