Skip to main content

definitions

EditorMode

from dara.components.graphs.definitions import EditorMode

class EditorMode(str, Enum)

DEFAULT

Default DAG viewer, assumes all edges are directed

PAG

PAG viewer, displays all edge types

RESOLVER

Resolver mode - allows users to accept edges

SpacerLegend

from dara.components.graphs.definitions import SpacerLegend

class SpacerLegend(Legend)

Defines a spacer legend for a graph element.

Arguments:

  • label: Optional label to show in the legend

Attributes

  • type:
  • label: Optional[str]

EdgeLegend

from dara.components.graphs.definitions import EdgeLegend

class EdgeLegend(Legend)

Defines an edge legend for a graph element.

Arguments:

  • label: Optional label to show in the legend
  • color: Optional color for the edge symbol in the legend
  • arrow_type: Optional edge head to show at end of line
  • center_symbol: Optional symbol to show at the center of the edge
  • dash_array: Optional stroke-dasharray SVG path property - line will be dashed if specified

Attributes

  • type:
  • label: Optional[str]
  • arrow_type: Optional[ArrowType]
  • center_symbol: Optional[CenterSymbol]
  • color: Optional[str]
  • dash_array: Optional[str]

NodeLegend

from dara.components.graphs.definitions import NodeLegend

class NodeLegend(Legend)

Defines a node legend for a graph element.

Arguments:

  • label: Optional label to show in the legend
  • color: Optional color to fill the node symbol in the legend
  • highlight_color: Optional color for the node symbol rim in the legend

Attributes

  • type:
  • label: Optional[str]
  • color: Optional[str]
  • highlight_color: Optional[str]

ZoomThresholds

from dara.components.graphs.definitions import ZoomThresholds

class ZoomThresholds(BaseModel)

Defines minimum scales at which a given graph element should be visible. Each value should be a float between 0 and 2, where 2 is the maximum zoom level and 0 is the minimum zoom level.

Attributes

  • edge: float
  • label: float
  • shadow: float
  • symbol: float

edge

Minimum scale at which edges should be visible (defaults to 0.08)

label

Minimum scale at which node labels should be visible (defaults to 0.3)

shadow

Minimum scale at which node/edge shadows should be visible (defaults to 0.6)

symbol

Minimum scale at which edge symbols (arrow heads etc.) should be visible (defaults to 0.2)