From 39faf24b623b8eb9a4ce1198d487022bab5a3395 Mon Sep 17 00:00:00 2001 From: "olau@iola.dk" Date: Wed, 5 Nov 2008 10:53:53 +0000 Subject: [PATCH] Fixed a bug with drawing marking lines with differrent colors git-svn-id: https://flot.googlecode.com/svn/trunk@106 1e0a6537-2640-0410-bfb7-f154510ff394 --- NEWS.txt | 29 +++++++++++++++++------------ jquery.flot.js | 1 + 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/NEWS.txt b/NEWS.txt index a635d96..20cac71 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -3,18 +3,23 @@ Flot 0.x Bug fixes: -Fixed two corner-case bugs when drawing filled curves (report and -analysis by Joshua Varner). Fix auto-adjustment code when setting min -to 0 for an axis where the dataset is completely flat on that axis -(report by chovy). Fixed a bug with passing in data from getData to -setData when the secondary axes are used (issue 65, reported by -nperelman). Fixed so that it is possible to turn lines off when no -other chart type is shown (based on problem reported by Glenn -Vanderburg), and fixed so that setting lineWidth to 0 also hides the -shadow (based on problem reported by Sergio Nunes). Updated mousemove -position expression to the latest from jQuery (bug reported by -meyuchas). Use borders instead of background in legend (fix printing -issue 25 and 45). Explicitly convert axis min/max to numbers. +- Fixed two corner-case bugs when drawing filled curves (report and + analysis by Joshua Varner). +- Fix auto-adjustment code when setting min to 0 for an axis where the + dataset is completely flat on that axis (report by chovy). +- Fixed a bug with passing in data from getData to setData when the + secondary axes are used (issue 65, reported by nperelman). +- Fixed so that it is possible to turn lines off when no other chart + type is shown (based on problem reported by Glenn Vanderburg), and + fixed so that setting lineWidth to 0 also hides the shadow (based on + problem reported by Sergio Nunes). +- Updated mousemove position expression to the latest from jQuery (bug + reported by meyuchas). +- Use borders instead of background in legend (fix printing issue 25 + and 45). +- Explicitly convert axis min/max to numbers. +- Fixed a bug with drawing marking lines with different colors + (reported by Khurram). Flot 0.5 diff --git a/jquery.flot.js b/jquery.flot.js index 6aacefb..1221598 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -926,6 +926,7 @@ if (xrange.from == xrange.to || yrange.from == yrange.to) { // draw line ctx.strokeStyle = m.color || options.grid.markingsColor; + ctx.beginPath(); ctx.lineWidth = m.lineWidth || options.grid.markingsLineWidth; ctx.moveTo(Math.floor(xrange.from), Math.floor(yrange.from)); ctx.lineTo(Math.floor(xrange.to), Math.floor(yrange.to));