Skip to content
This repository was archived by the owner on Mar 17, 2020. It is now read-only.

Repository files navigation

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){returnd;});/* Invoke the tip in the context of your visualization */vis.call(tip)vis.selectAll('rect').data(data).enter().append('rect').attr('width',function(){returnx.rangeBand()}).attr('height',function(d){returnh-y(d)}).attr('y',function(d){returny(d)}).attr('x',function(d,i){returnx(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.

<linkrel="stylesheet" href="//rawgithub.com/Caged/d3-tip/master/examples/example-styles.css">

About

d3 tooltips

Topics

Resources

Stars

1.2k stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages