Charts
#Charts are an optional Margo extension. The CLI registers the chart extension
for you; Go applications opt in with charts.Extension().
A chart fence
Exact series values
| Label | Series | Y axis | Value |
|---|---|---|---|
| Mon | Requests | Y axis | 12 |
| Tue | Requests | Y axis | 18 |
| Wed | Requests | Y axis | 16 |
| Thu | Requests | Y axis | 24 |
| Series | Category | Sample | Value | |
|---|---|---|---|---|
| Requests | Mon | 12 | Requests|Mon|12 | |
| Requests | Tue | 18 | Requests|Tue|18 | |
| Requests | Wed | 16 | Requests|Wed|16 | |
| Requests | Thu | 24 | Requests|Thu|24 |
Static rendering produces an SVG and an adjacent semantic exact-data table. The table keeps the values available to readers and assistive technology even when JavaScript is disabled.
Go integration
go
compiler := margo.New(
margo.WithExtension(charts.Extension()),
)
The extension supports bar, line, pie, doughnut, and scatter families.
Static SVG remains the default. Set renderer: interactive when the host also
wants Goshtoso chart controls; the accessible data table remains part of the
output contract.
Print behavior
Chart animation is disabled for deterministic capture. PDF output omits exact
data tables by default; --print-chart-data includes them for a data-forward
print artifact.