Infographic
infographic fence and AntV template to display a title and items as a flow, timeline, funnel, grid, or hierarchy.An infographic fence selects an AntV template to display a title and item list.
Use it for order, hierarchy, or comparison. Use ECharts for axes and precise numbers.
Use Mermaid for flows with conditional branches.
The fence contains data and stays readable as text on GitHub.
Shortest form
Start with infographic <template>, then add a data block. title sets the title.
Every entry under items needs at least a label.
Use two spaces per indentation level to define structure. Keep labels short and put explanations in desc.
Timelines
The sequence-timeline-* family arranges items on a time axis. label gives the point in time, and desc gives the event.
Funnels
sequence-funnel-simple displays narrowing stages.
This example shows the five stages of a theme release.
Grid cards
For unordered items, list-grid-* uses a grid instead of a sequence.
Items with values
Add value to an item for templates that show proportions, such as pies, doughnuts, or progress displays.
Hierarchy and hand-drawn style
Nest items with children. hierarchy-mindmap-* displays two levels of structure.
A top-level theme block sets the appearance. type accepts light, dark, or hand-drawn.
theme belongs to the DSL. In OINK 1.4.0, each diagram has its own
canvas: transparent default and hand-drawn diagrams use white, and an authored
background takes priority. A type dark diagram keeps its dark background even
on a light page. Site mode changes preserve the palette, text colors, and drawing
style without rerendering. Explicit transparency or custom text colors still
require checking contrast in both modes.
Picking a template
Template names use structure-variant. Each structure has several visual variants. Common families are listed below:
| Structure prefix | What it expresses | Example |
|---|---|---|
list-row-* list-column-* |
Items in a row or a column | list-row-simple-horizontal-arrow |
list-grid-* |
A grid, no order between items | list-grid-compact-card list-grid-badge-card |
list-pyramid-* sequence-funnel-* |
Narrowing stages | sequence-funnel-simple |
sequence-timeline-* sequence-roadmap-vertical-* |
Timelines and roadmaps | sequence-timeline-simple |
sequence-steps-* sequence-snake-steps-* |
Ordered steps | sequence-steps-simple |
compare-binary-horizontal-* compare-quadrant-* |
Binary comparison and quadrants | compare-binary-horizontal-simple-vs |
hierarchy-mindmap-* hierarchy-structure-* |
Hierarchy, with children |
hierarchy-mindmap-level-gradient-compact-card |
chart-pie-* chart-bar-* chart-column-* |
Illustrative charts, with value |
chart-pie-donut-plain-text |
relation-network-* relation-dagre-flow |
Networks and flows, with relations |
relation-dagre-flow |
Choose the simplest form that explains the relationship. See the full AntV Infographic gallery. Template names match the version bundled with the theme.
Output
| Output | Shape |
|---|---|
| HTML | A canvas container inside <div class="td-infographic"> plus the DSL; the local AntV runtime draws the SVG |
No diagram; the DSL source inside <pre class="td-infographic-source"> |
|
| Markdown | The infographic fence and its DSL, kept as written |
| RSS | Same as print — source only |
Explain the diagram’s information in prose. Print and RSS include only the DSL source.
Parameter reference
The fence attribute line (```infographic {…}):
style, on*, and unknown attributes warn and are ignored. Empty DSL bodies warn and render nothing.
AntV defines these top-level DSL keys:
Each entry under items accepts label, desc, value, icon, children,
group and id. The DSL is defined by the
AntV Infographic documentation; the
version shipped with the theme and its checksum are recorded in the theme’s
VENDOR.json.
Limits
- Incorrect template names do not fail the build. Hugo checks only fence attributes; the browser runtime parses the DSL. Missing templates display error text in the container. Check the page after changing template names.
themeis part of the DSL and does not follow the site’s color scheme. Check contrast in both modes.- Print and RSS include only the DSL. State conclusions in prose.
- SVG does not provide semantic structure. Screen reader order can differ from visual order. Prefer headings, lists, or tables when they can express the information.
- Keep labels short. Narrow screens can truncate or compress long text. Check at phone width after editing.
Related
- ECharts — when you need axes and exact numbers
- Steps — when the reader has to follow the procedure
- Cards — a grid of clickable entry points
- Mermaid — flows with branches and conditions