问题
Is it possible to change the color of a bar on hover with Flot horizontal bar charts
回答1:
This worked for me by setting the 'highlightColor' field:
$.plot("#placeholder", [data], {
series: {
bars: {
show: true,
align: 'center',
barWidth: .6,
horizontal: true
},
highlightColor: 'rgb(190,232,216)'
},
grid: {
hoverable: true
}
});
See this fiddle for working example.
来源:https://stackoverflow.com/questions/13266803/change-color-of-bar-on-hover-with-flot-charts