GtBridge.Phlow.Mondrian (gt_bridge v0.17.1)

Copy Markdown View Source

I am a Phlow Mondrian (graph) view specification.

I serialize a node list, adjacency matrix, and layout name so that GT can render the graph via GtPhlowMondrianViewSpecification.

The API mirrors GT's Mondrian: nodes/2 sets the domain objects, node_label/2 extracts display text, edges/2 returns children from the same collection. Each serialized node carries both a label (for display) and object (the original domain item, for click-to-inspect).

Public API

Summary

Types

t()

@type t() :: %GtBridge.Phlow.Mondrian{
  edges_callback: (any() -> list()) | nil,
  layout: atom(),
  node_label: (any() -> String.t()) | nil,
  nodes_callback: (-> list()) | nil,
  view_priority: integer(),
  view_title: String.t()
}

Functions

as_dict(self)

@spec as_dict(t()) :: map()

edges(self, fun)

@spec edges(t(), (any() -> list())) :: t()

layout(self, layout_atom)

@spec layout(t(), atom()) :: t()

node_label(self, fun)

@spec node_label(t(), (any() -> String.t())) :: t()

nodes(self, items)

@spec nodes(t(), list() | (-> list())) :: t()

priority(self, priority_value)

@spec priority(t(), integer()) :: t()

title(self, title_text)

@spec title(t(), String.t()) :: t()