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;