GUI 4 Vega is a React component library that provides a user-friendly interface for creating and customizing Vega visualizations.
Refer to this README or GUI 4 Vega Documentation.
@relisa/gui4vega package hosted on GitHub Packages registry.demo_antd) and Bootstrap (demo_bootstrap).
These steps will guide you through the installation of the GUI 4 Vega package in order to include it in your React project.
To install the package locally, you can clone the repository and build it from source:
# from root of the repository
cd gui4vega
npm install
npm run build
After that you can link the package to your React project:
cd path/to/your/project
npm link path/to/gui4vega
This process can be simplified with Vite. You can refer to the Vite documentation for more details or implementation of vite.config.ts of both demo applications in the repository.
To install the package, you need access to the GitHub Packages registry.
read:package scope (no other privileges are required)..npmrc file in your project root with the following content (replace the placeholder with your actual token):
.npmrc file is also present in the repository.@relisa:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN_WITH_PACKAGE_READ_PERMISSION
npm install @relisa/gui4vega
Since the demo applications are linked locally to the library, you need to build the library first before running the demos:
# from root of the repository
cd gui4vega
npm install
npm run build
After building the library, you can run either of the demo applications (you dont need to link the library to the demo applications, since they are already linked locally in the repository):
# from root of the repository
cd demo_antd # or demo_bootstrap
npm install
npm run dev
The applications will be available at http://localhost:5173 or http://localhost:5174 respectively.
The GUI provides an integrated code editor for updating the Vega visualization specification JSON. Changes to the code automatically reflect on the rendered chart.