1

I have circles(representing customers) with certain coordinates. What I am trying to do is that when I hover a circle a description box pops up exposing the information about that circle(aka customer). So I guess I would need to track the cursor maybe? Circles are drawn with d3 and for description boxes I am using jquery.

 var circle = topology.selectAll("circle")
            .data(coordinatesX)
            .enter()
            .append("circle")
            .attr("cx", function(d) {
                return d;
            })
            .attr("cy", function(d, i) {
                return coordinatesY[i];
            })
            .attr("r", circleR)
            .style("fill",function(d,i){return checkCustomer[analyzedUnique[i]]});

$('svg circle').tipsy({
        gravity: 'w',
        html: true,
        fade: true,
        title: function () {

            return 'CUSTOMER ID :  <span>' + (**?**)+ '</span>';
        }
    });

Thanks in advance

avernus
  • 304
  • 1
  • 4
  • 15

0 Answers0