문제

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.

도움이 되었습니까?

해결책

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) {
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top