Vegais avisualization grammar,a declarative format for creating, saving, and sharing interactive visualization designs. With Vega you can describe data visualizations in a JSON format, and generate interactive views using either HTML5 Canvas or SVG.
For documentation, tutorials, and examples, see theVega website.For a description of changes between Vega 2 and later versions, please refer to theVega Porting Guide.
For a basic setup allowing you to build Vega and run examples:
- Clone
https://github.com/vega/vega
. - Run
yarn
to install dependencies for all packages. If you don't have yarn installed, seehttps://yarnpkg.com/en/docs/install.We useYarn workspacesto manage multiple packages within thismonorepo. - Once installation is complete, run
yarn test
to run test cases, or runyarn build
to build output files for all packages. - After running either
yarn test
oryarn build
,runyarn serve
to launch a local web server — your default browser will open and you can browse to the"test"
folder to view test specifications.
This repository includes the Vega website and documentation in thedocs
folder. To launch the website locally, first runbundle install
in thedocs
folder to install the necessary Jekyll libraries. Afterwards, useyarn docs
to build the documentation and launch a local webserver. After launching, you can openhttp://127.0.0.1:4000/vega/
to see the website.
For backwards compatibility, Vega includes ababel-ifiedIE-compatible version of the code in thepackages/vega/build-es5
directory. Older browser would also require several polyfill libraries:
<scriptsrc= "https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.4.4/polyfill.min.js"></script>
<scriptsrc= "https://cdn.jsdelivr.net/npm/[email protected]/runtime.min.js"></script>
<scriptsrc= "https://cdn.jsdelivr.net/npm/[email protected]/dist/fetch.umd.min.js"></script>
Interested in contributing to Vega? Please see ourcontribution and development guidelines,subject to ourcode of conduct.
Looking for support, or interested in sharing examples and tips? Post to theVega discussion forumor join theVega slack organization!We also have examples available asObservable notebooks.
If you're curious about system performance, see somein-browser benchmarks.Read about future plans inour roadmap.