Search code examples
dojodojox.charting

Dojo bar chart, onmouseover hand cursor


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?


Solution

  • 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");
        }
    
    });