Skip to content

Chart Nodes

Chart nodes render visualizations on canvas, receiving data from connected query nodes.

What Chart Nodes Do

A chart node contains a DataGlass chart configuration. When connected to a query node via canvas edge, the chart renders with the query's data.

Creating a Chart Node

Add a text node with dgExtension to your canvas:

json
{
  "id": "chart-bar",
  "type": "text",
  "text": "```dg\ndata:\n  upstream: true\ntype: bar\nx: region\ny: revenue\n```",
  "dgExtension": {
    "nodeType": "chart",
    "chartConfig": "data:\n  upstream: true\ntype: bar\nx: region\ny: revenue"
  },
  "x": 400,
  "y": 0,
  "width": 500,
  "height": 400
}

Upstream Data

Charts receive data from query nodes using upstream: true:

yaml
data:
  upstream: true
type: bar
x: category
y: value

The chart waits for data from the connected query node. A loading indicator appears until data arrives.

Chart Configuration

Configure charts with standard DataGlass properties:

yaml
data:
  upstream: true       # Receive from query node
type: bar              # Chart type
x: region              # X-axis column
y: revenue             # Y-axis column
color: category        # Color by column
title: Sales Report    # Chart title
width: 600             # Width in pixels
height: 400            # Height in pixels

Supported Chart Types

TypeDescription
barVertical bars
lineConnected points
scatterIndividual points
areaFilled line
pieCircular segments

Connecting to Query Nodes

Draw a canvas edge from a query node to the chart node:

[Query Node] ──edge──> [Chart Node]

The edge direction matters: data flows from source to target.

Sizing Charts

Resize chart nodes by dragging canvas handles. The chart re-renders to fit the new dimensions.

For precise control, set dimensions in the config:

yaml
width: 800
height: 600

Troubleshooting

ProblemCauseSolution
"No data source"Missing upstream configAdd data: { upstream: true }
"Waiting for data" timeoutNo connected queryDraw edge from query node
Wrong columnsColumn mismatchCheck query output columns
Chart blankData emptyVerify query loads data

Released under the MIT License. Built by Boundary Lab.