vega/vega-themes

Name: vega-themes

Owner: Vega

Description: Themes for stylized Vega visualizations.

Created: 2016-10-03 23:32:46.0

Updated: 2017-11-15 04:25:40.0

Pushed: 2017-08-09 23:57:54.0

Homepage: null

Size: 7

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

vega-themes

Themes for stylized Vega visualizations. For Vega version 3.0+.

A Vega theme is a configuration object with default settings for a variety of visual properties such as colors, typefaces, line widths and spacing. This module exports a set of named themes, which can be passed as input to the Vega parser:

runtime = vega.parse(vega_spec, vega.themes.quartz);
view = new vega.View(runtime);

Once instantiated, a visualization theme can not be changed. Instead, the input specification must be re-parsed with a new theme and a new View instance must be created.

Included Themes

# vega.themes.excel <>

Chart theme modeled after Microsoft Excel.

# vega.themes.ggplot2 <>

Chart theme modeled after ggplot2.

# vega.themes.quartz <>

Chart theme modeled after Quartz.

# vega.themes.vox <>

Chart theme modeled after Vox.

Instructions

To view and test different themes, follow these steps:

  1. Install dependencies via npm install.
  2. Launch a local web server in the top-level directory (e.g., python -m SimpleHTTPServer 8000).
  3. Load the examples in your browser (e.g., at http://localhost:8000/test/).

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.