Hey guys, I have made a basic bar chart using Plotly.js bar chart examples where the data is derived from a CSV file. Now I want to add functionality when we hover over the bars the color changes where and how can I add that, can anyone help me here.
After plotting my graph, I have used the function:
myPlot.on(‘plotly_hover’, function(data){
data[‘data1’] = {‘marker’: {‘color’: ‘#000’}}
})
.on(‘plotly_unhover’, function(data){
data[‘data1’] = {‘marker’: {‘color’: ‘#005587’}}
});
will this work?