Visualization
Production - Multiple chart types, configuration, auto-detection
The Visualization system generates chart specifications from query results. The VisualizationAgent automatically selects appropriate chart types based on data shape and user intent.
12.4.8.1Chart Types
| Type | Best For | Required Columns |
|---|---|---|
bar | Categorical comparison | 1 category + 1+ numeric |
line | Time series, trends | 1 datetime + 1+ numeric |
pie | Part-of-whole | 1 category + 1 numeric |
scatter | Correlation | 2 numeric |
heatmap | Matrix patterns | 2 categorical + 1 numeric |
area | Cumulative trends | 1 datetime + 1+ numeric |
table | Detailed data | Any columns |
metric | Single KPI | 1 numeric |
Chart Specification
{
"type": "bar",
"x": "region",
"y": "total_revenue",
"series": [],
"color_scheme": "blue",
"show_legend": true,
"show_grid": true,
"title": "Revenue by Region",
"aggregation": "sum",
"value_format": "$,.0f"
}# Change chart type
curl -X POST http://localhost:8000/api/v1/bi/sessions/{session_id}/visualization \
-H "Content-Type: application/json" \
-d '{"chart_type": "pie"}'