Expand description
facett-graph — the graph (node/edge) viewer component, on
facett_core. Build a Scene from a labelled edge list (the common
shape: a graph query, a dataflow DAG) and draw it. Source-agnostic — the
caller turns its Arrow/Cypher/whatever into edges first.
Modules§
- theme
- Theming. A palette the custom-painted components (graph/depgraph/map)
read from the egui context, plus matching egui
Visualsfor the standard widgets (pop/table/pipeline). Callset_themeonce on the context and every facet follows. Ships aTheme::defaultlook, aTheme::sci_fineon-on-near-black look, and a switchable family of striking palettes (Theme::nordic_aurora,Theme::cyberpunk_neon,Theme::amber_crt,Theme::deep_space,Theme::hugin_noir). Enumerate them withTheme::ALL/Theme::by_nameto build a picker.
Structs§
- DepEdge
- A directed edge
from → to, with the connecting items shown on the arrow. - DepGraph
View - The layered dep-graph viewer. Implements
Facet. - DepNode
- One node: a label, an optional sub-label (a sha, a version…), and a border colour (the consumer’s status policy).
- Edge
- A directed edge between node indices.
- Facet
Caps - What a Facet can do, so hosts treat every component uniformly. All-false by default: a facet opts in to each capability it actually honors.
- Graph
View - A simple graph-view widget: a
Scene+ aLayout. ImplementsFacet, so it drops into aFacetDeckand exposesstate_jsonfor free. - Node
- A node: a label + a colour (the consumer picks the colour policy — hash by label, by status, …).
- Scene
- A drawable graph: nodes + edges (edges index into
nodes). - Theme
- The facett palette. All custom-painted colours come from here.
Enums§
- Layout
- Node placement strategy.
Traits§
- Facet
- The facett component contract. Every facet — graph, map, pipeline, table, the ported nornir viewers — implements this, so consumers (korp, nornir, …) compose them uniformly and get headless robot-testing for free.
Functions§
- draw
- Draw a
Sceneintoui— the reusable render primitive. Empty scenes showempty_hint. Labels render when the node count is small enough to read. - draw_
arrow - Line + arrowhead from
fromtoto(head pulled back by half a node width). - hash_
color - A stable, bright-ish colour from a string (FNV-1a). Handy default node colour.
- scene_
from_ labeled_ edges - Build a
Scenefrom a labelled edge list — each row is(src_id, dst_id, src_label, dst_label). Distinct ids become nodes, coloured per label (FNV-hashed). The reusable “graph from edges” adapter korp’s Graph and Pipelines views both want. - set_
theme - Store
themeon the context and apply its eguiVisuals. Call once per frame (cheap) or whenever the theme changes; every facet picks it up. - theme
- The theme stored on the ui’s context (or
Theme::defaultif none).