From 9a197401282e946943daae45bca834117bb7a3d5 Mon Sep 17 00:00:00 2001 From: "olau@iola.dk" Date: Thu, 13 Mar 2008 11:37:28 +0000 Subject: [PATCH] Set the fill opacity instead of just scaling it git-svn-id: https://flot.googlecode.com/svn/trunk@65 1e0a6537-2640-0410-bfb7-f154510ff394 --- jquery.flot.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jquery.flot.js b/jquery.flot.js index c95e65c..f939a16 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -1297,7 +1297,14 @@ function setFillStyle(obj, seriesColor) { var fill = obj.fill; if (fill) { - ctx.fillStyle = obj.fillColor ? obj.fillColor : parseColor(seriesColor).scale(null, null, null, typeof fill == "number" ? fill : 0.4).toString(); + if (obj.fillColor) + ctx.fillStyle = obj.fillColor; + else { + var c = parseColor(seriesColor); + c.a = typeof fill == "number" ? fill : 0.4; + c.normalize(); + ctx.fillStyle = c.toString(); + } } }