Reputation: 13
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?
Upvotes: 1
Views: 1717
Reputation: 59
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.
Upvotes: 0
Reputation: 6828
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");
}
});
Upvotes: 3