vega/vega-lite-tooltip

Name: vega-lite-tooltip

Owner: Vega

Description: null

Created: 2017-05-15 20:42:51.0

Updated: 2017-05-15 20:42:51.0

Pushed: 2017-05-15 20:42:53.0

Homepage: null

Size: 0

Language: null

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Tooltip for Vega & Vega-Lite

npm version

A tooltip plugin for Vega and Vega-Lite visualizations.

The current version works with Vega 3 and Vega-Lite 2. For Vega 2 and Vega-Lite 1, use the old version of Vega-Tooltip.

demo image

Author

Vega Tooltip was built by Zening Qu and Sira Horradarn, with significant help from Dominik Moritz and Kanit “Ham” Wongsuphasawat.

Demo

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

Installing
NPM

If you use NPM, run command npm install 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 3 & Vega-Lite 2 (does not have to be from CDN) -->
ipt src="https://cdn.jsdelivr.net/npm/vega@3"></script>
ipt src="https://cdn.jsdelivr.net/npm/vega-lite@2"></script>

ipt src="https://cdn.jsdelivr.net/npm/vega-tooltip@[VERSION]"></script>
k rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/vega-tooltip@[VERSION]/build/vega-tooltip.min.css">
APIs

For Vega-Lite: vegaTooltip.vegaLite(vgView, vlSpec[, options])

For Vega: vegaTooltip.vega(vgView[, options])

Tutorials
  1. Creating Your Tooltip
  2. Customizing Your Tooltip
  3. Examples and Code on bl.ocks.org
Run Instructions
  1. In the project folder vega-tooltip, type command npm install to install dependencies.
  2. Then, type npm 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.

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.