Vega Chart
Renders Vega and Vega-Lite specifications through the Vega runtime. Experimental component in @astryxdesign/vega (canary).
@astryxdesign/vega
Usage
Renders Vega and Vega-Lite specifications through the Vega runtime. Experimental component in @astryxdesign/vega (canary).
- Only render specifications you authored or reviewed. For untrusted specs, configure the interpreter and a restricted loader as described in the package README.
- Keep spec and option objects stable to avoid recreating the Vega View unnecessarily.
Typed props
| Prop | Type and behavior |
|---|---|
spec | AnySpec · requiredA Vega or Vega-Lite specification with an official $schema URL. |
data | ViewDataInitial values for datasets named by the spec. Read when the view is created; later updates should use the live View. |
compileOptions | CompileOptionsOptions passed to Vega-Lite compilation. Ignored for native Vega specs. |
parseConfig | ConfigVega configuration passed to vega.parse(). |
parseOptions | ParseOptionsOptions passed to vega.parse(). |
viewOptions | Omit<ViewOptions, 'container'>Options passed to the Vega View. The component always supplies the container. |
onReady | (view: View) => voidCalled with the live Vega View after the first render. |
onError | (error: Error) => voidCalled when schema validation, compilation, or rendering fails. |