Graph

Use a graph to explore weighted relationships between categories as nodes and edges.

Every preview on this page is generated from the YAML shown below it using a fixed documentation dataset.

Basic network

Map two dimensions to source and target nodes, then use the metric as edge weight to reveal relationships between statuses and delivery buckets.

Key fields
visuals:
  status_delivery_graph:
    title: Status and delivery network
    description: Shows status and delivery-speed relationships as a network.
    type: graph
    presentation:
      type: hierarchy
      labels:
        density: automatic
        priority:
        - selected
        - anomaly
        - threshold
        maxCharacters: 18
        minimumSpacing: 6
        tooltipFallback: true
    query:
      type: aggregate
      dimensions:
      - status
      - delivery_bucket
      metrics:
      - order_count
      sort:
      - field: order_count
        direction: desc
      limit: 40

Alternate relationships

Replace the source dimension with category to inspect a different relationship while retaining the same weighted graph shape.

Key fields
visuals:
  category_status_graph:
    title: Category and status network
    type: graph
    query:
      type: aggregate
      dimensions:
      - category
      - status
      metrics:
      - order_count
      sort:
      - field: order_count
        direction: desc
      limit: 60
    presentation:
      type: hierarchy

Circular layout

Set presentation.layout: circular for a stable ring, curve overlapping edges, and use focus: adjacency to emphasize connected nodes on interaction.

Key fields
visuals:
  category_status_graph_circular:
    title: Circular category and status network
    type: graph
    presentation:
      type: hierarchy
      layout: circular
      curveness: 0.28
      focus: adjacency
    query:
      type: aggregate
      dimensions:
      - category
      - status
      metrics:
      - order_count
      sort:
      - field: order_count
        direction: desc
      limit: 60

API reference

Kind: chart. Renderer: echarts. Supported result shapes: graph_edges.

FieldTypeDefaultAllowed valuesDescription
query.dimensionsfield mappingGroups query results and supplies category or hierarchy labels.
query.limitintegerno limitpositive integerCaps the number of rows returned to the renderer.
query.metricsmetric mappingSelects governed semantic metrics consumed by the visual shape.
query.sortsort listOrders query results by a returned field or metric alias.
presentation.curvenessnumberrenderer defaultnumber from 0 through 1Controls the curvature of graph and flow edges.
presentation.focusstringnonenone adjacencyControls whether interaction emphasizes adjacent graph nodes and edges.
presentation.labelslabel policyhiddenhidden automatic dense alwaysControls deterministic label density, priority, truncation, and tooltip fallback.
presentation.layoutstringstandardstandard circularSelects the deterministic hierarchy or graph layout.

Accessibility. Use meaningful node labels and keep the hierarchy or flow small enough to follow without relying on color alone.