Question

Do anybody know whether images can be displayed on mouse hover event on rickshaw or d3 graph. if so please state a example. Thanks in advance. help will be appreciated.

Was it helpful?

Solution

looks like there is a sample here
https://github.com/shutterstock/rickshaw/blob/master/examples/hover.html

edit the render event to do what you want:

graph.render();

var legend = document.querySelector('#legend');

var Hover = Rickshaw.Class.create(Rickshaw.Graph.HoverDetail, {

   render: function(args) {

   legend.innerHTML = args.formattedXValue;

   args.detail.sort(function(a, b) { return a.order - b.order }).forEach( function(d) {
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top