dimanche 22 mars 2015

How to change highcharts opacity on hover?


How can I change the opacity of a point on hover in Highcharts?


I am currently using the following, although it is very slow and laggy since I am running the points hex colour to convert it to RGBA. I am using a heatmap chart type.



plotOptions: {
series: {
point: {
events: {
mouseOver: function () {
var newColor = hexToRgb(this.color);
var formattedColor = "rgba(" + newColor.r + "," + newColor.g + "," + newColor.b + ",0.7)";
this.oldColor = this.color;
this.update({
color: formattedColor
});
},
mouseOut: function () {
this.update({
color: this.oldColor,
});
}
}
}
}
}


Is there any easier approach to this?





Aucun commentaire:

Enregistrer un commentaire