Skip to content

rstorsauce/d3tip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published