vega-themes

3.0.0 • Public • Published

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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.0.012,543latest
3.0.0-alpha.31next
2.12.1--canary.402.305039f.01canary

Version History

VersionDownloads (Last 7 Days)Published
3.0.012,543
3.0.0-alpha.31
3.0.0-alpha.21
3.0.0-alpha.11
2.15.062,694
2.14.012,389
2.13.01,009
2.12.112,291
2.13.0-next.01
2.12.1--canary.402.305039f.01
2.12.01,562
2.10.1--canary.399.5c87997.01
2.10.1--canary.337.86557bf.01
2.10.1--canary.327.aea56da.01
2.10.1--canary.325.ca4a56e.01
2.10.023,719
2.9.11,625
2.9.038
2.8.52,054
2.8.46
2.8.32,567
2.8.218
2.7.15,466
2.6.11,732
2.6.01,572
2.5.01,703
2.4.013
2.3.245
2.3.12
2.3.01,228
2.2.034
2.1.1115
2.1.0118
2.0.08
1.1.01

Package Sidebar

Install

npm i vega-themes

Weekly Downloads

144,561

Version

3.0.0

License

BSD-3-Clause

Unpacked Size

80.3 kB

Total Files

56

Last publish

Collaborators

  • jheer
  • domoritz
  • kanitw
  • arvindsatya1
  • lhermann