Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vega-tooltip

Package Overview
Dependencies
Maintainers
4
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vega-tooltip

A tooltip plugin for vega-lite and vega visualizations.

  • 0.4.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
46K
decreased by-63.99%
Maintainers
4
Weekly downloads
 
Created

What is vega-tooltip?

The vega-tooltip npm package provides a way to add customizable tooltips to Vega and Vega-Lite visualizations. It enhances the interactivity of visualizations by displaying additional information when users hover over data points.

What are vega-tooltip's main functionalities?

Basic Tooltip

This feature allows you to add a basic tooltip to a Vega or Vega-Lite visualization. The tooltip displays information about the data point that the user is hovering over.

const vegaTooltip = require('vega-tooltip');
const view = new vega.View(vega.parse(spec))
  .renderer('canvas')
  .initialize('#view')
  .hover()
  .run();
vegaTooltip.vega(view);

Custom Tooltip Content

This feature allows you to customize the content of the tooltip. You can format the tooltip content in any way you like by providing a custom format function.

const vegaTooltip = require('vega-tooltip');
const handler = new vegaTooltip.Handler({
  formatType: 'custom',
  format: (value) => `Custom content: ${value}`
});
const view = new vega.View(vega.parse(spec))
  .renderer('canvas')
  .initialize('#view')
  .hover()
  .run();
vegaTooltip.vega(view, handler);

Styling Tooltips

This feature allows you to style the tooltips by specifying a theme. The example shows how to apply a dark theme to the tooltips.

const vegaTooltip = require('vega-tooltip');
const handler = new vegaTooltip.Handler({
  theme: 'dark'
});
const view = new vega.View(vega.parse(spec))
  .renderer('canvas')
  .initialize('#view')
  .hover()
  .run();
vegaTooltip.vega(view, handler);

Other packages similar to vega-tooltip

Keywords

FAQs

Package last updated on 26 Jun 2017

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