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.