Reputation: 16813
The following implementation shows mouseover
event with cursor pointer
on y axis title label. It works and functional.
However, I want to implement mouseover
event with cursor pointer
on y axis (numeric axis) as well.
Upvotes: 0
Views: 455
Reputation: 106
there is actually a supported option with a custom visual:
categoryAxis: [{
labels: {
color: "rgba(60,60,60, 0.9995)",
visual: function(e) {
var visual = e.createVisual();
visual.options.cursor = 'pointer';
return visual;
}
}
}]
drawing.element.configuration.cursor
Upvotes: 0
Reputation: 24738
You can apply the same color trick to the axis labels:
valueAxis: {
labels: {
format: "N0",
color: "rgba(60,60,60, 0.9995)"
},
$(document).on("mouseover", '#chart text[fill="rgba(60,60,60, 0.9995)"]', function(){
$('#chart text[fill="rgba(60,60,60, 0.9995)"]').css("cursor", "pointer");
});
In this example I use the same color for title and labels, you could easily use a different color
Upvotes: 2
Reputation: 6322
If you can add some id or class then it is good but in your code I cant find class so I used stroke
$(document).on("mouseover", '#chart text[stroke="none"]', function(){
$('#chart text[stroke="none"]').css("cursor", "pointer");
});
Upvotes: 1