Use s.datapoints instead of s.data in highlight(s, index) to lookup point

git-svn-id: https://flot.googlecode.com/svn/trunk@239 1e0a6537-2640-0410-bfb7-f154510ff394
pull/1/head
olau@iola.dk 16 years ago
parent 689e153a55
commit e6cde982f8

@ -31,6 +31,10 @@ Bug fixes:
brightness: x, opacity: y }. brightness: x, opacity: y }.
- Don't use $.browser.msie, check for getContext on the created canvas - Don't use $.browser.msie, check for getContext on the created canvas
element instead and try to use excanvas if it's not found. element instead and try to use excanvas if it's not found.
- highlight(s, index) was looking up the point in the original s.data
instead of in the computed datapoints array, which breaks with
plugins that modify the datapoints (such as the stacking plugin).
Issue 316 reported by curlypaul924.
Flot 0.6 Flot 0.6
-------- --------

@ -1973,8 +1973,10 @@
if (typeof s == "number") if (typeof s == "number")
s = series[s]; s = series[s];
if (typeof point == "number") if (typeof point == "number") {
point = s.data[point]; var ps = s.datapoints.pointsize;
point = s.datapoints.points.slice(ps * point, ps * (point + 1));
}
var i = indexOfHighlight(s, point); var i = indexOfHighlight(s, point);
if (i == -1) { if (i == -1) {

Loading…
Cancel
Save