문제

I have dojo bar chart. Onmouseover the bar i would like a hand cursor. I was trying something like this

chart1.connectToPlot("default",function(evt) {
   var type = evt.type;
   if(type == "onmouseover"){

   }

how do i get my mouse pointer to show as hand when i move it over the bar?

도움이 되었습니까?

해결책

Try this, assuming you have a div in your html (the container of your chart), with id="chartNode" :

 chart.connectToPlot("default",function(evt) {
    var type = evt.type;
    if(type == "onmouseover") {
        dojo.style("chartNode", "cursor", "pointer");
    }
    else if(type == "onmouseout") {
        dojo.style("chartNode", "cursor", "default");
    }

});

다른 팁

If you're using bar/column charts, you can possibly get away with the following CSS:

    g rect {
        cursor: pointer;
    }

This might not be an optimal solution, especially if you have other SVG elements on the page, you could risk your cursor being a pointer where you don't want it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top