Socket
Socket
Sign inDemoInstall

vega

Package Overview
Dependencies
185
Maintainers
2
Versions
181
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vega

The Vega visualization grammar.


Version published
Weekly downloads
158K
decreased by-24.18%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

Vega: A Visualization Grammar

Build Status

Vega is a visualization grammar, a declarative format for creating and saving interactive visualization designs. With Vega you can describe data visualizations in a JSON format, and generate interactive views using either HTML5 Canvas or SVG.

To learn more, visit the wiki.

The Vega Runtime

This repository contains the vega-runtime system, which parses Vega specifications to produce interactive visualizations which run in the browser using a scenegraph-based rendering system.

Build Process

To use Vega in the browser, you need to build the vega.js and vega.min.js files. We assume that you have npm installed.

  1. Run npm install in the vega folder to install dependencies.
  2. Run npm run build. This will invoke browserify to bundle the source files into vega.js, and then uglify-js to create the minified vega.min.js.

Vega visualization specifications can be validated against a JSON Schema. To generate the vega-schema.json definition file, run npm run schema.

Vega Server-Side and Command Line Tools

Vega can also be run server-side using node.js. When running in "headless" mode, Vega can be used to render specifications directly to PNG or SVG. In addition to the summary below, see the Headless Mode wiki documentation for more information.

Command Line Tools

Vega includes two command line tools for converting Vega JSON specifications to rendered PNG or SVG:

  • vg2png: vg2png [-b basedir] vega_json_file [output_png_file]
  • vg2svg: vg2svg [-b basedir] [-h] vega_json_file [output_svg_file]

Within the Vega project directories, you can invoke these utilities using ./bin/vg2png or ./bin/vg2svg. If you import Vega using npm, these commands are accessible either locally (node_modules/.bin/vg2png) or globally (vg2png) depending on how you install the Vega package.

Using Vega in node.js Projects

To include Vega in a node project, first install it from the command line using npm (npm install vega) or by including "vega" among the dependencies in your package.json file.

Keywords

FAQs

Last updated on 15 Jul 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc