markvis renders chart code blocks in Markdown to SVG, or leaves readable tables when drawing fails. It ships with bake tooling for GitHub and plugins for common Markdown pipelines.
Overview
markvis lets authors embed charts as short text blocks inside Markdown. Where a renderer can run JavaScript, blocks become plain SVG; where scripts cannot run, such as on github.com, a bake step can write a companion image while keeping the source block. Invalid blocks keep their tabular data and show a stable error line instead of throwing.
Seventeen chart kinds are supported, including bar, line, area, scatter, pie, heatmap, funnel, sankey, and calendar views. Data lives in comma-separated rows or Markdown tables rather than JSON by default, and blocks accept theme and palette hints. The runtime is small, dependency-free, and fast per chart.
Integration paths include a single script tag, a render() API, a React component that streams with react-markdown, and markdown-it, remark, or rehype plugins. CLI commands bake images and validate files. CSS variables on the host page control colors for light, dark, and branded layouts. A compact model instruction file helps LLMs write valid chart blocks.
Key features
- Seventeen chart types from text
- SVG output with table fallback
- npx markvis bake for GitHub
- markdown-it, remark, rehype plugins
- React streaming component
- CSS variable theming
- parseBlock and parseDocument APIs
- LLM-oriented chart authoring prompt
Use cases
- Charts in README and docs
- Data visualization in static sites
- AI-generated Markdown charts
- GitHub-rendered README graphics
- Streaming chat Markdown previews