0

Can anyone help me to figure out how to add tooltips in my D3 motion chart? Thanks. I need to make the tooltips to include all of x , y, and radius, and to show up when the mouse moves over each bubble.

function x(d) {
    return d.marketCap;
}
function y(d) {
    return d.dividendGrowth;
}
function radius(d) {
    return d.dividendContribution;
}
function color(d) {
    return d.sector;
}
function key(d) {
    return d.name;
}

var currentCountry = "";

// Chart dimensions.
var margin = { top: 19.5, right: 19.5, bottom: 19.5, left: 39.5 },
    width = 960 - margin.right,
    height = 500 - margin.top - margin.bottom,
    yearMargin = 10;

Visit http://jsfiddle.net/joseph8691/ja08wyra/

Joseph Feng
  • 43
  • 1
  • 5
  • I figure it out a way with the help of Frank van Puffelen. If you also have the similar question, this is my updated jsfiddle file. http://jsfiddle.net/joseph8691/ja08wyra/1/ – Joseph Feng Aug 15 '14 at 17:53
  • possible duplicate of [How to add hover (tooltip) to the D3. bubble motion chart?](http://stackoverflow.com/questions/25313542/how-to-add-hover-tooltip-to-the-d3-bubble-motion-chart) – Frank van Puffelen Aug 16 '14 at 12:08

0 Answers0