generate_bar_chart
Generate a bar chart from dataset columns to visualize aggregated values. Specify X-axis, Y-axis, optional grouping, and get the chart file path and data.
Instructions
Generate a bar chart from a dataset column.
Args:
dataset: Name of the dataset (e.g. "sales", "users").
x_column: Column to use for the X axis (categorical or date).
y_column: Numeric column to aggregate on the Y axis (sum by default).
title: Chart title shown at the top.
group_by: Optional column to group bars by colour (e.g. "category").
filename: Output filename (auto-generated if empty).
Returns:
A JSON str with {"chart_path":"...","chart_data":"..."}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"dataset": "<dataset>",
"x_column": "<x_column>",
"y_column": "<y_column>",
"title": "<title>"
},
"name": "generate_bar_chart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | ||
| dataset | Yes | ||
| filename | No | ||
| group_by | No | ||
| x_column | Yes | ||
| y_column | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |