Skip to content
Simple text-based tooltips for d3.js
Branch: master
Clone or download
Pull request Compare This branch is 61 commits behind Caged:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
examples
.gitignore
LICENSE
Makefile
README.md
bower.json
index.js
package.json

README.md

d3.tip: Tooltips for d3.js visualizations

API Docs

See the API Documentation

Download Latest Version

Install with Bower

bower 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.