Getting started

Introduction

What comark-vega is, how it wraps Vega and Vega-Lite for Comark, and when to use parse-time SVG vs the Vue renderer.

comark-vega is a Comark plugin for Vega and Vega-Lite. It turns fenced blocks and directives into chart nodes in the AST.

Two rendering paths

PathWhen
Plugin + Vue rendererInteractive apps — recommended. Mount charts at runtime with the shipped <Vega> component.
Parse-time SVGStatic docs — opt in with ::vl, ::vg, ::chart, or mark shortcuts.

Parse-time SVG is opt-in. The default plugin path produces ['Vega', VegaNodeAttrs] component nodes for your renderer.

Shared AST shape

Both entry points produce identical ['Vega', VegaNodeAttrs] nodes. Map them with the shipped Vue component or a custom renderer via mountVegaView.

Credits

Chart rendering is provided by vega and vega-lite, maintained by the Vega team. This plugin wraps those libraries for Comark; it does not reimplement compilation or rendering.

comark, vega, and vega-lite are peer dependencies. vue and @comark/vue are optional peers for comark-vega/vue.
Copyright © 2026