Data formats#
Field semantics#
- Data: optional frame/query filter for a layer.
- Vertex A: source node ID field. This is the main node identity field.
- Vertex B: target node ID or path definition. If set, Mapgl can generate links.
- Edge ID: optional link identity. Use unique values for separate parallel links. Reuse one value only for consecutive, data source-ordered rows that form a continuous route; each row keeps its user-facing properties on the matching route portion.
- Vertex A namespace: optional source namespace field, or an array field assigning namespaces to every path node, for graph mode.
- Vertex B namespace: optional target namespace for graph mode. It remains active when Vertex A namespace is unset; the source then uses the default
externalnamespace. - Namespace layers separator: one- or two-symbol delimiter for nested namespace values. The preset values are
.,,, and-; custom values are supported and.is selected by default. - Search by: extra fields exposed to panel search.
- coordinates: optional; used for Geo placement.
Dataframe model#
- Nodes and links are generated from the same records.
- A single record may define a node and also define a link from that node.
- Separate node and edge tables are not required.
- If your data source returns separate node and edge tables, use Grafana transformations to prepare the dataframe Mapgl should read.
- Multiple configured Markers and links layers are composed in data-layer order into one graph.
- Each graph layer retains its own frame matcher, field mappings, styles, edge options, and LayerSwitcher identity.
- Cross-layer targets are resolved after every configured graph layer has contributed its nodes.
Dataframe contract#
- The optional layer Data setting selects the input frame before topology data is read.
- Every non-empty Vertex A value identifies a node in its source namespace.
- Repeated node IDs refer to the same node. The first row that introduces a node supplies its node properties, but later rows may still define links.
- A non-empty Vertex B defines either a direct target or a route from the row's Vertex A.
- Source and final target nodes must resolve after all configured graph layers have supplied their nodes.
- Without a non-empty Edge ID, link identity defaults to
source-finalTarget. - Use different Edge ID values when repeated source-target pairs must remain separate parallel links.
- Reuse one Edge ID only for rows that intentionally describe successive portions of one route. Those rows must be consecutive, remain in data source order, and connect end-to-start.
- User-facing fields from each valid route row remain associated with its displayed route portion for styling and tooltips.
Practical implication: choose one stable identity per logical link, preserve query ordering for multi-row routes, and use unique identities for parallel links.