Skip to content

Commit 2d2ca32

Browse files
committed
Fix problem with null values and pie plugin (patch by gcruxifix)
1 parent 3c1e90b commit 2d2ca32

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

NEWS.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
Flot x.x
2+
--------
3+
4+
5+
Bug fixes
6+
7+
- Fix problem with null values and pie plugin (patch by gcruxifix,
8+
issue 500).
9+
10+
111
Flot 0.7
212
--------
313

jquery.flot.pie.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ More detail and specific examples can be found in the included HTML file.
391391

392392
function drawSlice(angle, color, fill)
393393
{
394-
if (angle<=0)
394+
if (angle <= 0 || isNaN(angle))
395395
return;
396396

397397
if (fill)
@@ -682,7 +682,8 @@ More detail and specific examples can be found in the included HTML file.
682682

683683
function drawHighlight(series)
684684
{
685-
if (series.angle < 0) return;
685+
if (series.angle <= 0 || isNaN(angle))
686+
return;
686687

687688
//octx.fillStyle = parseColor(options.series.pie.highlight.color).scale(null, null, null, options.series.pie.highlight.opacity).toString();
688689
octx.fillStyle = "rgba(255, 255, 255, "+options.series.pie.highlight.opacity+")"; // this is temporary until we have access to parseColor

0 commit comments

Comments
 (0)