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)
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 |