是否可以使用flot高亮显示折线图?我只看到突出显示数据点,而不是点之间的界限。条形图中的高亮显示行
我使用以下代码example。
$("#placeholder").bind("plothover", function (event, pos, item) {
$("#x").text(pos.x.toFixed(2));
$("#y").text(pos.y.toFixed(2));
if ($("#enableTooltip:checked").length > 0) {
if (item) {
if (previousPoint != item.dataIndex) {
previousPoint = item.dataIndex;
$("#tooltip").remove();
var x = item.datapoint[0].toFixed(2),
y = item.datapoint[1].toFixed(2);
showTooltip(item.pageX, item.pageY,
item.series.label + " of " + x + " = " + y);
}
}
else {
$("#tooltip").remove();
previousPoint = null;
}
}
});
code ...... ?????? –
我正在寻找同样的东西......你可以使用plothover并找出自己,如果鼠标在一条线上,但我想要一个更简单的方法。 –