The V.G graph navigator — for idiots
Class:
idiot· zero knowledge assumed. You will end up with a window that shows a graph you can pan, zoom, colour, measure, and export — like Gephi, but it is a facett component. The design isgraphnav-vg-design.md; the reference isgraphnav-vg-guide.md.
What is this?
A graph is dots (nodes) joined by lines (edges). A graph navigator is a window for looking at one: move around it, make important dots bigger, colour groups, read a table of the numbers, and save it to a file another tool can open. facett's is called V.G (because in graph databases you fetch every vertex with G.V()).
The smallest possible program
use eframe::egui;
use facett_core::Facet;
use facett_graphnav::GraphNav;
fn main() -> eframe::Result<()> {
let mut nav = GraphNav::demo(); // a tiny made-up social graph
eframe::run_simple_native("V.G", Default::default(), move |ctx, _| {
egui::CentralPanel::default().show(ctx, |ui| nav.ui(ui));
})
}
Run it. You get a graph of people who know each other and the companies they work at.
Five things to try (no code — just the window)
-
Move around. Drag the empty canvas to slide the graph. Scroll to zoom in and out. Lost? Click ⊙ fit to snap the whole graph back into view.
-
Follow one dot. Click a node — it gets a ring and its details show up. Click ⊹ focus to fly the camera to it. Hover any node: everything else dims so you see just it and its direct connections.
-
Make the graph say something. In the
size:row pick degree — the busiest nodes grow. In thepartition:row pick louvain — the graph splits into coloured communities. That is the whole point of a tool like Gephi, in two clicks. -
See the numbers. Open the 📊 stats strip: how many nodes and edges, how dense it is, how many separate clumps, how far apart things are (diameter), how cliquey it is (clustering). In the demo tab you can also flip to ▦ table and read every node in a spreadsheet — click a row and that node lights up on the canvas.
-
Take it with you. Click ⭳gexf to get a Gephi file, or ⭳graphml for yEd / NetworkX. The important measurements (degree, pagerank, community…) travel inside the file as attributes. You can load such a file back in too.
Where to see it inside the demo
Build and run facett-demo, then click the V.G tab in the tab strip. It runs on the (synthetic) Swedish population graph — the same data the Sverige and graph3d tabs use — so you are exploring a real, structured graph, not a toy.
The one rule to remember
You never poke the graph's guts directly. You send it a small message (pan, zoom, "size by degree", "colour by community", "export gexf") and it updates. That is why the exact same clicks can be scripted by a robot test — the window and the test drive the identical path.