Code Monkey home page Code Monkey logo

vega-themes's Introduction

Vega Themes

npm version Build Status

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.

Instructions for Developers

To view and test different themes, follow these steps:

  1. Install dependencies via yarn.
  2. Launch a local web server in the top-level directory with yarn start.
  3. Make changes. The website will automatically reload.

Publishing

Publishing is handled by a 2-branch pre-release process, configured in publish.yml. All changes should be based off the default next branch, and are published automatically.

  • PRs made into the default branch that would trigger a version bump are auto-deployed to the next pre-release tag on NPM. The result can be installed with npm install vega-themes/@next.
    • When merging into next, please use the squash and merge strategy.
  • To release a new stable version, open a PR from next into stable using this compare link.
    • When merging from next into stable, please use the create a merge commit strategy.

vega-themes's People

Contributors

0az avatar casyfill avatar chekos avatar dependabot-preview[bot] avatar dependabot[bot] avatar dm-p avatar domoritz avatar greenkeeper[bot] avatar hydrosquall avatar iflameing avatar jheer avatar joelostblom avatar kanitw avatar marcprux avatar palewire avatar syntagmatic avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.