🌍 Public
Viewing a saved revision (read-only)
c8e5c90d7d7b41208d7afb43bb514c40
Fork of React Starter
This example demonstrates a basic React application that renders a static message ("Hello vega") alongside a Vega bar chart embedded from a remote specification. The code initializes a React root using `createRoot` and renders a simple functional component with JSX, while separately using `vegaEmbed` to inject the Vega visualization into a dedicated div. It imports React 18, ReactDOM, Vega, Vega-Lite, and vega-embed from CDNs, with the chart specification sourced from a raw GitHub URL. The example shows a minimal integration of React for UI text and Vega for data visualization on the same page.
AI-generated descriptionVega Starter code.