vega-tooltip
A tooltip plugin for Vega-Lite and Vega visualizations.
Last updated 3 years ago by domoritz .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install vega-tooltip 
SYNC missed versions from official npm registry.

Tooltip for Vega & Vega-Lite

npm version Build Status codecov code style: prettier

A tooltip plugin for Vega and Vega-Lite visualizations. This plugin implements a custom tooltip handler for Vega that uses custom HTML tooltips instead of the HTML title attribute. Vega Tooltip is installed in the Vega Editor.

demo image

Features

  • Renders nice tooltips for Vega and Vega-Lite charts
  • Supports dark and light theme
  • Renders object-valued tooltips as a table
  • Supports special keys title (becomes the title of the tooltip) and image (used as the url for an embedded image)

Demo

http://vega.github.io/vega-tooltip/

Installing

We recommend using Vega-Embed, which already comes with this tooltip plugin.

NPM or Yarn

Use npm install vega-tooltip or yarn add vega-tooltip.

Using Vega-tooltip with a CDN

You can import vega-tooltip directly from jsDelivr. Replace [VERSION] with the version that you want to use.

<!-- Import Vega 5 & Vega-Lite 4 (does not have to be from CDN) -->
<script src="https://cdn.jsdelivr.net/npm/vega@5"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@4"></script>

<script src="https://cdn.jsdelivr.net/npm/vega-tooltip@[VERSION]"></script>

Usage and APIs

If you use Vega-Embed, you don't need to install Vega Tooltip! Vega Embed already comes with Vega Tooltip. You can however pass tooltip customizations.

vegaEmbed("#vis", spec, {tooltip: {theme: 'dark'}})
  .then(function(result) {
    // result.view contains the Vega view
  })
  .catch(console.error);

If you want to use a different version of the tooltip handler, you can override the default handler with the handler from Vega Tooltip (and you need to install it separately).

var handler = new vegaTooltip.Handler();
vegaEmbed("#vis", spec, {tooltip: handler.call})
  .then(function(result) {
    // result.view contains the Vega view
  })
  .catch(console.error);

See the API documentation for details.

Tutorials

  1. Creating Your Tooltip
  2. Customizing Your Tooltip

Run Instructions

  1. In the project folder vega-tooltip, type command yarn to install dependencies.
  2. Then, type yarn start. This will build the library and start a web server.
  3. In your browser, navigate to http://localhost:8000/, where you can see various Vega-Lite and Vega visualizations with tooltip interaction.

Publishing

To make a release, run npm run release.

Current Tags

  • 0.29.1--canary.717.1dd1a25.0                                ...           canary (3 years ago)
  • 0.33.0                                ...           latest (3 years ago)
  • 0.29.1-next.0                                ...           next (3 years ago)
  • 0.2.0                                ...           pre (9 years ago)

93 Versions

  • 0.33.0                                ...           3 years ago
  • 0.32.0                                ...           3 years ago
  • 0.31.0                                ...           3 years ago
  • 0.30.1                                ...           3 years ago
  • 0.30.0                                ...           3 years ago
  • 0.29.1-next.0                                ...           3 years ago
  • 0.29.1--canary.717.1dd1a25.0                                ...           3 years ago
  • 0.29.0                                ...           3 years ago
  • 0.29.0-next.0                                ...           3 years ago
  • 0.29.0--canary.72971bc.0                                ...           4 years ago
  • 0.28.1--canary.705.64b759d.0                                ...           4 years ago
  • 0.28.1--canary.688.3450cec.0                                ...           4 years ago
  • 0.28.1--canary.688.c839fe7.0                                ...           4 years ago
  • 0.28.1--canary.688.a16edbc.0                                ...           4 years ago
  • 0.28.1--canary.688.2d881ef.0                                ...           4 years ago
  • 0.28.1--canary.688.818e403.0                                ...           4 years ago
  • 0.28.1--canary.688.1cb4211.0                                ...           4 years ago
  • 0.28.1--canary.687.3e8dda7.0                                ...           4 years ago
  • 0.28.0                                ...           4 years ago
  • 0.28.0-next.1                                ...           4 years ago
  • 0.28.0-next.0                                ...           4 years ago
  • 0.27.1--canary.614.256dfa2.0                                ...           4 years ago
  • 0.28.0--canary.614.0a1f487.0                                ...           4 years ago
  • 0.27.1--canary.588.8046555.0                                ...           5 years ago
  • 0.27.1--canary.578.6cf99cc.0                                ...           5 years ago
  • 0.27.1--canary.d94d030.0                                ...           5 years ago
  • 0.27.0                                ...           5 years ago
  • 0.26.1-next.0                                ...           5 years ago
  • 0.26.1--canary.566.30d5119.0                                ...           5 years ago
  • 0.26.0                                ...           5 years ago
  • 0.25.1                                ...           5 years ago
  • 0.25.0                                ...           5 years ago
  • 0.24.2                                ...           6 years ago
  • 0.24.1                                ...           6 years ago
  • 0.24.0                                ...           6 years ago
  • 0.23.2                                ...           6 years ago
  • 0.23.1                                ...           6 years ago
  • 0.23.0                                ...           6 years ago
  • 0.22.1                                ...           6 years ago
  • 0.22.0                                ...           6 years ago
  • 0.21.0                                ...           6 years ago
  • 0.20.1                                ...           6 years ago
  • 0.20.0                                ...           6 years ago
  • 0.19.1                                ...           7 years ago
  • 0.19.0                                ...           7 years ago
  • 0.18.1                                ...           7 years ago
  • 0.18.0                                ...           7 years ago
  • 0.17.2                                ...           7 years ago
  • 0.17.1                                ...           7 years ago
  • 0.17.0                                ...           7 years ago
  • 0.16.0                                ...           7 years ago
  • 0.15.0                                ...           7 years ago
  • 0.14.0                                ...           7 years ago
  • 0.13.0                                ...           8 years ago
  • 0.12.0                                ...           8 years ago
  • 0.11.0                                ...           8 years ago
  • 0.10.4                                ...           8 years ago
  • 0.10.2                                ...           8 years ago
  • 0.10.1                                ...           8 years ago
  • 0.10.0                                ...           8 years ago
  • 0.9.16                                ...           8 years ago
  • 0.9.14                                ...           8 years ago
  • 0.9.13                                ...           8 years ago
  • 0.9.12                                ...           8 years ago
  • 0.9.10                                ...           8 years ago
  • 0.9.7                                ...           8 years ago
  • 0.9.6                                ...           8 years ago
  • 0.9.5                                ...           8 years ago
  • 0.9.4                                ...           8 years ago
  • 0.9.3                                ...           8 years ago
  • 0.9.2                                ...           8 years ago
  • 0.9.1                                ...           8 years ago
  • 0.9.0                                ...           8 years ago
  • 0.8.0                                ...           8 years ago
  • 0.7.0                                ...           8 years ago
  • 0.6.1                                ...           8 years ago
  • 0.6.0                                ...           8 years ago
  • 0.5.1                                ...           8 years ago
  • 0.5.0                                ...           8 years ago
  • 0.4.4                                ...           9 years ago
  • 0.4.3                                ...           9 years ago
  • 0.4.2                                ...           9 years ago
  • 0.4.1                                ...           9 years ago
  • 0.4.0                                ...           9 years ago
  • 0.3.3                                ...           9 years ago
  • 0.3.2                                ...           9 years ago
  • 0.3.1                                ...           9 years ago
  • 0.3.0                                ...           9 years ago
  • 0.2.0                                ...           9 years ago
  • 0.1.3                                ...           10 years ago
  • 0.1.2                                ...           10 years ago
  • 0.1.1                                ...           10 years ago
  • 0.1.0                                ...           10 years ago

Copyright 2013 - present © cnpmjs.org | Home |