Elvina456 / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

No way to turn off line shadow (v0.6) #257

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Setting the shadow size to 0 will not work due to the if statement on line 
221 of jquery.flot.js:

if (options.shadowSize)
  options.series.shadowSize = options.shadowSize;

If the value passed in is 0 or "0" this will equate to false and the default 
value of 3 set on line 107 will be used instead.

Possible solution:
if (options.shadowSize!==null && options.shadowSize!==undefined && 
!isNaN(options.shadowSize)) options.series.shadowSize = options.shadowSize;

Original issue reported on code.google.com by aspi...@gmail.com on 10 Nov 2009 at 4:48

GoogleCodeExporter commented 8 years ago
Confirmed this issue exists and this patch works.  Can we get this merged? It's 
a simple 
fix for a huge aesthetic problem (a lot of pople really don't like dropshadows 
on the 
lines)

Original comment by kne...@gmail.com on 11 Jan 2010 at 8:05

GoogleCodeExporter commented 8 years ago
I concur. I did it slightly differently, added options.noShadow=true. Not 
necessarily better, just different.

See also Tufte on the principle of erasing non-data ink. The shadows are 
aesthetically pleasing on charts with less data, but high data-density charts 
can be nice without them.

Original comment by rbb362...@gmail.com on 7 Dec 2010 at 8:28

GoogleCodeExporter commented 8 years ago
The syntax changed - you're supposed to set the shadow size through series: { 
shadowSize: 0 } (it's mentioned in the API changes in NEWS.txt). What you're 
looking at is the backwards compatibility code. But it's true that it's a bug 
in that, so I've fixed it with != null (undefined converts to null). Thanks for 
the report!

Original comment by olau%iol...@gtempaccount.com on 15 Dec 2010 at 3:45