From eee071c47d8c0076df7f91b65de90a69ab022766 Mon Sep 17 00:00:00 2001 From: David Schnur Date: Mon, 11 Mar 2013 22:17:11 -0400 Subject: [PATCH] Fix highlight and unhighlight inconsistency. The unhighlight method retrieved the point differently from highlight, and incorrectly. It now matches the behavior of highlight. --- jquery.flot.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jquery.flot.js b/jquery.flot.js index 69ac139..408af04 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -2844,8 +2844,10 @@ Licensed under the MIT license. if (typeof s == "number") s = series[s]; - if (typeof point == "number") - point = s.data[point]; + if (typeof point == "number") { + var ps = s.datapoints.pointsize; + point = s.datapoints.points.slice(ps * point, ps * (point + 1)); + } var i = indexOfHighlight(s, point); if (i != -1) {