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:
{
"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:
data:
upstream: true
type: bar
x: category
y: valueThe chart waits for data from the connected query node. A loading indicator appears until data arrives.
Chart Configuration
Configure charts with standard DataGlass properties:
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 pixelsSupported Chart Types
| Type | Description |
|---|---|
| bar | Vertical bars |
| line | Connected points |
| scatter | Individual points |
| area | Filled line |
| pie | Circular 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:
width: 800
height: 600Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
| "No data source" | Missing upstream config | Add data: { upstream: true } |
| "Waiting for data" timeout | No connected query | Draw edge from query node |
| Wrong columns | Column mismatch | Check query output columns |
| Chart blank | Data empty | Verify query loads data |