8000 GitHub - payamshiri/tooltip-d3js: Tooltip plugin for d3.js
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

payamshiri/tooltip-d3js

 
 

Repository files navigation

D3.JS Tooltipy

Create Tooltip with D3.JS for your d3-based visualizations charts simple and easy.

Installation

Import to HTML

<script src="https://d3js.org/d3.v5.min.js"></script>
<script src="https://githubraw.com/ehsanghaffarii/d3-tooltipy/main/examples/index.js"></script>

Install with NPM

npm install d3-tooltipy

How to use

var tooltip = d3.tooltipy()
  .attr('class', 'tooltip')
  // .html(function(d) { return d; })
  .html(function(d) { return d.name; })

  const svg = d3.select('svg');

  svg.call(tooltip);

  svg.append('rect')
    .attr('width', 100)
    .attr('height', 100)
    .on('mouseover', tooltip.show)
    .on('mouseout', tooltip.hide);

Documentation

Soon...

About

Tooltip plugin for d3.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.4%
  • Makefile 3.6%
0