New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vega-themes

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vega-themes

Themes for stylized Vega and Vega-Lite visualizations.

  • 2.6.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
101K
decreased by-0.35%
Maintainers
1
Weekly downloads
 
Created

What is vega-themes?

The vega-themes npm package provides a collection of themes for styling Vega and Vega-Lite visualizations. These themes can be used to quickly apply consistent styling to charts and graphs, enhancing their visual appeal and readability.

What are vega-themes's main functionalities?

Applying Predefined Themes

This feature allows users to apply predefined themes to their Vega or Vega-Lite visualizations. The code sample demonstrates how to apply the 'dark' theme from vega-themes to a Vega visualization.

const vega = require('vega');
const vegaThemes = require('vega-themes');

const runtime = vega.parse(spec);
const view = new vega.View(runtime)
  .renderer('canvas')
  .initialize('#view')
  .theme(vegaThemes.dark)
  .run();

Customizing Themes

Users can customize existing themes by modifying properties such as background color and axis styles. The code sample shows how to create a custom theme based on the 'fivethirtyeight' theme and apply it to a visualization.

const vega = require('vega');
const vegaThemes = require('vega-themes');

const customTheme = {
  ...vegaThemes.fivethirtyeight,
  background: '#f0f0f0',
  axis: {
    domainColor: '#333',
    tickColor: '#333'
  }
};

const runtime = vega.parse(spec);
const view = new vega.View(runtime)
  .renderer('canvas')
  .initialize('#view')
  .theme(customTheme)
  .run();

Other packages similar to vega-themes

Keywords

FAQs

Package last updated on 30 Jan 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc