New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

simple-tooltip

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-tooltip

Simple d3 tooltip

latest
Source
npmnpm
Version
1.1.3
Version published
Maintainers
1
Created
Source

Simple Tooltip for javascript

Dependencies

d3

Install

Currently can only be installed via NPM

npm

npm install simple-tooltip

Usage

d3 is required

var d3 = require('d3');
var tooltip = require('simple-tooltip');
//the container is typically the outer div, the coordinate of the
//tooltip is calculated relative to the container
var container = d3.select('#container').node();
//initialize the tooltip
var tip = tooltip().container(container).init();
...
//use the tooltip
var tipData = 'Hello, This is Tip';
var element = d3.select('#mouseover-item')
element.on('mouseover', function(){
  tip.show(container, tipData);
}).on('mousemove', function(){
  tip.move(container);
}).on('mouseout', function(){
  tip.hide();
});

Methods

# tooltip.container([container]])

# tooltip.css_class([css_class])

# tooltip.init()

# tooltip.html(html_function)

# tooltip.show(container, data)

# tooltip.move(container, [data])

# tooltip.hide()

# tooltip.x_pos(pos_function)

# tooltip.y_pos(pos_function)

# tooltip.font_size([size])

# tooltip.z_index([z_index])

FAQs

Package last updated on 11 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts