d3-tip

d3 tooltips

Github星跟蹤圖

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">

概覽

名稱與所有者caged/d3-tip
主編程語言JavaScript
編程語言Makefile (語言數: 2)
平台
許可證MIT License
發布數26
最新版本名稱v0.9.1 (發布於 )
第一版名稱v0.1.0 (發布於 )
創建於2012-01-07 22:22:34
推送於2020-02-16 23:36:24
最后一次提交2018-05-10 11:46:49
星數1.2k
關注者數43
派生數355
提交數321
已啟用問題?
問題數137
打開的問題數2
拉請求數44
打開的拉請求數6
關閉的拉請求數75
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?
去到頂部