Skip to content
Margo v0.0.22

Goshtoso chart fence

#

The optional goshtosochart fence describes a chart in YAML. Register the charts extension in a Go host; static SVG is the default, while interactive HTML is an explicit capability.

Source

markdown
```goshtosochart
schemaVersion: 1
type: bar
renderer: static
title: Weekly output
categories: [Mon, Tue, Wed]
series:
  - name: Pages
    values: [3, 5, 4]
```

Result

Weekly output
SeriesCategorySampleValue
PagesMon3
PagesTue5
PagesWed4

Static charts can include an exact-data table for screen readers and print readers. Deck output keeps the static projection by contract.

The examples below keep the visual projection prominent. The first chart also exposes its exact-data table as an accessibility example.

Exact values
SeriesCategorySampleValue
PagesMon3
PagesTue5
PagesWed4

Line chart

Exact category and values
CategorySeriesValue
MonPages3
TuePages5
WedPages4

3 ordered x values across 1 series.

Weekly trend
SeriesCategorySampleValue
PagesMon3
PagesTue5
PagesWed4

Pie and doughnut charts

Exact pie values
SeriesSectorValueShare
Request shareAPI6060.0%
Request shareUI4040.0%
Request share
SeriesCategorySampleValue
API60
UI40

Change type to doughnut to use the same slice payload with a doughnut projection.

Scatter chart

Latency by region
SeriesCategorySampleValue
P95 latencyus120
P95 latencyeu150
P95 latencyap180

Options

Set type, title, categories, and series in the YAML payload. Choose renderer: static for a portable SVG; renderer: interactive requires the registered chart runtime and is not available in every target. See the Goshtoso chart schemas for the full payload contracts.

The YAML block above is the complete source payload for this chart fence.