ericsoco / vega-tooltip

Tooltip Plugin for Vega-Lite

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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) -->
<script src="https://cdn.jsdelivr.net/npm/vega@3"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@2"></script>

<script src="https://cdn.jsdelivr.net/npm/vega-tooltip@[VERSION]"></script>
<link 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.

About

Tooltip Plugin for Vega-Lite

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


Languages

Language:TypeScript 77.8%Language:JavaScript 8.8%Language:HTML 7.8%Language:CSS 3.2%Language:Shell 2.3%