我正在使用浮点http://code.google.com/p/flot/ http://code.google.com/p/flot/并希望当用户将鼠标悬停在链接上时突出显示系列中的特定栏,有谁知道该怎么做?
Cheers,
Tim
你正在寻找的是highlight
,记录在API.txt http://flot.googlecode.com/svn/trunk/API.txt:
highlight(series, datapoint)
Highlight a specific datapoint in the data series. You can either
specify the actual objects, e.g. if you got them from a
"plotclick" event, or you can specify the indices, e.g.
highlight(1, 3) to highlight the fourth point in the second series
(remember, zero-based indexing).
所以你的代码看起来像这样:
//before this, $.plot has been called and assigned to "plot"
$('#mylink').mouseover(function(){
plot.highlight(1,3);
}).mouseout(function(){
plot.unhighlight(1,3);
});
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)