Skip to content
Branch: master
Clone or download
Latest commit 517b147 May 10, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github use stale label. I don't like wontfix May 1, 2018
docs Merge pull request #92 from ersel/patch-1 Jan 17, 2017
examples Tweak copy Jan 17, 2017
.editorconfig
.eslintrc.yaml
.gitignore
LICENSE
Makefile
README.md recommend npm as the way to install d3-tip Jan 17, 2017
bower.json
circle.yml
index.js
package-lock.json update package lock after npm install May 1, 2018
package.json
rollup.conf.js

README.md

d3.tip: Tooltips for d3.js visualizations

API Docs

See the API Documentation

Download Latest Version

Install with NPM

npm install d3-tip

Quick Usage

/* Initialize tooltip */
tip = d3.tip().attr('class', 'd3-tip').html(function(d) { return d; });

/* Invoke the tip in the context of your visualization */
vis.call(tip)

vis.selectAll('rect')
  .data(data)
  .enter()
  .append('rect')
  .attr('width', function() { return x.rangeBand() })
  .attr('height', function(d) { return h - y(d) })
  .attr('y', function(d) { return y(d) })
  .attr('x', function(d, i) { return x(i) })
  .on('mouseover', tip.show)
  .on('mouseout', tip.hide)

If you want basic styling, you can include example-styles.css using a service like rawgithub.com.

<link rel="stylesheet" href="//rawgithub.com/Caged/d3-tip/master/examples/example-styles.css">
You can’t perform that action at this time.