From c833511431875685e91e1d7abbb94205dc1f8b72 Mon Sep 17 00:00:00 2001 From: Jamie Hamel-Smith Date: Sat, 19 Jan 2013 20:22:26 -0800 Subject: [PATCH] Adding a fix for the inability to set the point line width to 0. It's a bit of a hack, but it seems like an acceptable workaround. --- jquery.flot.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/jquery.flot.js b/jquery.flot.js index 918352a..f8139fb 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -2092,6 +2092,15 @@ Licensed under the MIT license. sw = series.shadowSize, radius = series.points.radius, symbol = series.points.symbol; + + // If the user sets the line width to 0, we change it to a very + // small value. A line width of 0 seems to force the default of 1. + // Doing the conditional here allows the shadow setting to still be + // optional even with a lineWidth of 0. + + if( lw == 0 ) + lw = 0.0001; + if (lw > 0 && sw > 0) { // draw shadow in two steps var w = sw / 2;