d3tip
TypeScript icon, indicating that this package has built-in type declarations

0.5.0 • Public • Published

D3 Tooltip

Sample

Web SiteSource Code

Install

npm install d3tip --save
npm install d3-selection --save
npm install types.d3 --save # d3 4.x typings 
import {select} from 'd3-selection';
import d3tip from 'd3tip';
import 'd3tip/index.css'; // Default tooltip style. If you don't need default style. you have not to import this.
 
d3.select('#button')
  .datum('HELLO WORLD')
  .call(d3tip({
    html: d => d.toString()
  }))

Options

  • html: string|(d?:any, i?:number, nodes?:Node[]) => string
  • classed?: string[]|(d?:any, i?:number, nodes?:Node[]) => string[]
  • distance?: number
  • target?: string = 'pointer' | 'element'
  • position?: string|(d?:any, i?:number, nodes?:Node[]) => string = 'left' | 'right' | 'top' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'

Readme

Keywords

none

Package Sidebar

Install

npm i d3tip

Weekly Downloads

4

Version

0.5.0

License

MIT

Last publish

Collaborators

  • ssen