Question

I am trying to to have a unique value displayed per scatter plot symbol whenever the mouse moves over it ( or user clicks it) using nvd3.js. In the code here, I am able to get a unique value per group and not per symbol.

I think it has to do with some tooltip configuration.

//Configure how the tooltip looks.
chart.tooltipContent(function(key) {
    return '<h3>' + key + '</h3>';
});

But am not sure as to how to modify it per symbol and not per group.

The example is here.

Thanks

Was it helpful?

Solution

You haven't said what you want the unique text to be, but you could make it the node's position for example:

chart.tooltipContent(function(key, xval, yval) {
  return '<h3>' + xval + "," + yval + '</h3>';
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top