Skip to content

@graphty/graphty-element / session / RunStyle

Type Alias: RunStyle ​

RunStyle = boolean | { size?: boolean | readonly [number, number]; }

Defined in: graphty-element/src/session/runs/types.ts:414

What a run paints when it first completes.

  • true, or left off: the colour suggestion its result shape calls for.
  • false: nothing. The numbers are published and no layer is added.
  • { size }: the colour suggestion, plus -- for a run whose result is a node measurement (shape "node-metric": PageRank, degree, betweenness and the rest) -- a node size encoding of the same field. size: true sizes nodes from 1 (the default node size, so the least important node looks unchanged) to 3; size: [min, max] uses that range. size: false or left off adds no size. For any other result shape the size is ignored, without an error, exactly as the colour suggestion itself depends on the shape.

Every layer this adds is scoped to the nodes carrying the run's value, and is removed with the run.