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
```goshtosochart
schemaVersion: 1
type: bar
renderer: static
title: Weekly output
categories: [Mon, Tue, Wed]
series:
- name: Pages
values: [3, 5, 4]
```
Result
| Series | Category | Sample | Value | |
|---|---|---|---|---|
| Pages | Mon | 3 | Pages|Mon|3 | |
| Pages | Tue | 5 | Pages|Tue|5 | |
| Pages | Wed | 4 | Pages|Wed|4 |
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.
| Series | Category | Sample | Value | |
|---|---|---|---|---|
| Pages | Mon | 3 | Pages|Mon|3 | |
| Pages | Tue | 5 | Pages|Tue|5 | |
| Pages | Wed | 4 | Pages|Wed|4 |
Line chart
Exact category and values
| Category | Series | Value |
|---|---|---|
| Mon | Pages | 3 |
| Tue | Pages | 5 |
| Wed | Pages | 4 |
3 ordered x values across 1 series.
| Series | Category | Sample | Value | |
|---|---|---|---|---|
| Pages | Mon | 3 | Pages|Mon|3 | |
| Pages | Tue | 5 | Pages|Tue|5 | |
| Pages | Wed | 4 | Pages|Wed|4 |
Pie and doughnut charts
Exact pie values
| Series | Sector | Value | Share |
|---|---|---|---|
| Request share | API | 60 | 60.0% |
| Request share | UI | 40 | 40.0% |
| Series | Category | Sample | Value | |
|---|---|---|---|---|
| API | 60 | API|60 | ||
| UI | 40 | UI|40 |
Change type to doughnut to use the same slice payload with a doughnut
projection.
Scatter chart
| Series | Category | Sample | Value | |
|---|---|---|---|---|
| P95 latency | us | 120 | P95 latency|us|120 | |
| P95 latency | eu | 150 | P95 latency|eu|150 | |
| P95 latency | ap | 180 | P95 latency|ap|180 |
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.