Commit e6cde982 authored by olau@iola.dk's avatar olau@iola.dk

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
parent 689e153a
...@@ -31,6 +31,10 @@ Bug fixes: ...@@ -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 @@ ...@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment