Guide
Output modes
Control whether comark-flint-chart emits a Flint component node, inline SVG, or an img data URI at parse time.
| Mode | Generated node | Notes |
|---|---|---|
component (default) | <Flint spec={…} backend="…"> | Recommended for apps; pair with shipped Vue renderer |
svg | inline <svg> | Opt-in for static/PDF; requires renderer peer; falls back to component |
img | <img src="data:image/svg+xml;base64,…"> | Opt-in; requires renderer peer |
Render interactive charts (default)
component.ts
flint({ flint: { output: 'component' } })
Register the Vue <Flint> component. See Usage.
Export static SVG at parse time
svg.ts
flint({ flint: { output: 'svg' } })
Requires vega + vega-lite (and/or echarts) as peers. Falls back to component when SSR rendering is unavailable.
Emit an img data URI
img.ts
flint({ flint: { output: 'img' } })
Useful for static docs that need a single self-contained element.
Set a document-wide default
frontmatter.md
---
flint:
output: component
---
Per-directive attrs and fence meta override frontmatter and plugin defaults.