docs(skill): add common pitfalls section with radar-beta syntax guide

Added '## ⚠️ Common pitfalls' section covering:
- Radar chart syntax (radar-beta vs radar, axis vs x-axis, curve syntax)
- XY Chart vs Radar syntax comparison table
- Accessibility notes for diagrams that don't support accTitle/accDescr

Prevents the x-axis → radar-beta confusion that occurred in the example
research report.
This commit is contained in:
borealBytes
2026-02-19 22:09:55 -05:00
parent dc250634e4
commit b955648f14

View File

@@ -199,6 +199,52 @@ The `.md` file with embedded Mermaid is what gets committed. If you also generat
---
## ⚠️ Common pitfalls
### Radar chart syntax (`radar-beta`)
**WRONG:**
```mermaid
radar
title Example
x-axis ["A", "B", "C"]
"Series" : [1, 2, 3]
```
**CORRECT:**
```mermaid
radar-beta
title Example
axis a["A"], b["B"], c["C"]
curve series["Series"]{1, 2, 3}
max 3
```
- **Use `radar-beta`** not `radar` (the bare keyword doesn't exist)
- **Use `axis`** to define dimensions, **not** `x-axis`
- **Use `curve`** to define data series, **not** quoted labels with colon
- **No `accTitle`/`accDescr`** — radar-beta doesn't support accessibility annotations; always add a descriptive italic paragraph above the diagram
### XY Chart vs Radar confusion
| Diagram | Keyword | Axis syntax | Data syntax |
| ------- | ------- | ----------- | ----------- |
| **XY Chart** (bars/lines) | `xychart-beta` | `x-axis ["Label1", "Label2"]` | `bar [10, 20]` or `line [10, 20]` |
| **Radar** (spider/web) | `radar-beta` | `axis id["Label"]` | `curve id["Label"]{10, 20}` |
### Forgetting `accTitle`/`accDescr` on supported types
Only some diagram types support `accTitle`/`accDescr`. For those that don't, always place a descriptive italic paragraph directly above the code block:
> _Radar chart comparing three methods across five performance dimensions. Note: Radar charts do not support accTitle/accDescr._
```mermaid
radar-beta
...
```
---
## 🔗 Integration with other skills
### With `scientific-schematics`