MouseOver with Cursor Pointer on Y Axis

457 views Asked by At

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.

CURRENT IMPLEMENTATION

3

There are 3 answers

0
ezanker On BEST ANSWER

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

Updated DEMO

In this example I use the same color for title and labels, you could easily use a different color

3
Keval Bhatt On

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

0
Alex Bubblemaster On

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

Runnable Dojo