Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

vega-themes

vega620.8kBSD-3-Clause3.0.0TypeScript support: included

Themes for stylized Vega and Vega-Lite visualizations.

vega, vega-lite, themes, style

readme

Vega Themes

npm version Test

Themes for stylized Vega and Vega-Lite visualizations. For Vega version 3+ and Vega-Lite 2+.

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 or Vega-Lite with Vega-Embed or directly as a configuration object to the Vega parser.

Try Vega-Themes in our Observable Demo.

Vega Themes comes with Vega-Embed:

vegaEmbed(el, spec, {theme: 'quartz'});

If you want to use a different version, pass the theme as a configuration:

vegaEmbed(el, spec, {config: vegaThemes.quartz});

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

Included Themes

# vega.themes.excel <>

Chart theme modeled after Microsoft Excel. Try it here.

# vega.themes.ggplot2 <>

Chart theme modeled after ggplot2. Try it here.

# vega.themes.quartz <>

Chart theme modeled after Quartz. Try it here.

# vega.themes.vox <>

Chart theme modeled after Vox. Try it here.

# vega.themes.fivethirtyeight <>

Chart theme modeled after FiveThirtyEight. Try it here.

# vega.themes.dark <>

A dark theme. Try it here.

# vega.themes.latimes <>

Chart theme modeled after the Los Angeles Times. Try it here.

# vega.themes.urbaninstitute <>

Chart theme modeled after the Urban Institute. Try it here.

# vega.themes.googlecharts <>

Chart theme modeled after Google Charts. Try it here.

# vega.themes.powerbi <>

Chart theme modeled after Power BI Desktop default theme. Try it here.

# vega.themes.carbonwhite <>

Chart theme modeled after IBM Carbon Charts - white theme. Try it here.

# vega.themes.carbong10 <>

Chart theme modeled after IBM Carbon Charts - grey 10 theme. This is the white theme with a slightly darker background. Try it here.

# vega.themes.carbong90 <>

Chart theme modeled after IBM Carbon Charts - grey 90 theme. Try it here.

# vega.themes.carbong100 <>

Chart theme modeled after IBM Carbon Charts - grey 100 theme. This is the grey 90 theme with a slightly darker background. Try it here.

Instructions for Developers

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 with npm start.
  3. Make changes. The website will automatically reload.

Publishing

To make a release, run npm run release. To deploy the examples, run npm run deploy:gh.

changelog

2.15.0 (2024-05-29)

Features

2.14.0 (2023-07-14)

Features

2.13.0 (2023-04-20)

Features

2.12.1 (2023-02-13)

2.12.0 (2022-08-12)

  • "Bump version to: 2.12.0 [skip ci]" (5ba047e)
  • Update CHANGELOG.md [skip ci] (3f7341d)

2.11.0 (2022-08-12)

v2.11.0 (Thu Aug 11 2022)

:tada: This release contains work from new contributors! :tada:

Thanks for all your work!

:heart: Daniel Marsh-Patrick (@dm-p)

:heart: Cameron Yick (@hydrosquall)

🚀 Enhancement

🐛 Bug Fix

⚠️ Pushed to stable

🔩 Dependency Updates

Authors: 5