render_chart
Convert tabular CSV, TSV, TXT, or JSON data into an interactive ECharts HTML chart offline.
Instructions
Render one interactive ECharts HTML chart from tabular data.
Returns {ok, html, chart:{...}} where chart carries the full stdout contract: plot_stats (quote ONLY these numbers in your caption), data_preview (first 10 rendered rows), source_rows/plotted_rows/ unique_entities (aggregation audit), assumptions and advisories (read them before delivering).
Args:
data_text: raw file content as text (csv/tsv/txt/json)
chart_type: one of line, bar, area, pie, scatter, radar, heatmap,
treemap, graph, boxplot, waterfall, gauge, sankey, funnel, sunburst,
wordcloud, histogram, stacked_bar, bubble, pareto, combo, venn,
mindmap, orgchart, liquid, spreadsheet, map, lines, effect_scatter,
calendar, pictorial_bar, theme_river
title: conclusion-style title (subject + number), not a noun phrase
subtitle: context - time range, filters, source
x_axis / y_axis: column name(s); lists become multiple series
transform_code: sandboxed pandas code; variables df/pd/np only, must
produce a DataFrame named result (no import/open/try/class)
annotation: your written interpretation, injected into the HTML footer
theme: default | classic | dark
label_col: identity column for scatter/bubble/boxplot
target: business target for gauge/liquid achievement rate
sheet: Excel sheet name (convert to CSV first if using data_text)
header_row / skiprows / drop_rows: dirty-header repairs (1-based row)
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": {
"data_text": "<data_text>",
"chart_type": "<chart_type>"
},
"name": "render_chart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sheet | No | ||
| theme | No | ||
| title | No | ||
| target | No | ||
| x_axis | No | ||
| y_axis | No | ||
| filename | No | data.csv | |
| skiprows | No | ||
| subtitle | No | ||
| data_text | Yes | ||
| drop_rows | No | ||
| label_col | No | ||
| annotation | No | ||
| chart_type | Yes | ||
| header_row | No | ||
| transform_code | No |