Skip to content
Browse files

Added closePath option

Added a closePath option for supressing the Z argument when drawing the radar path.
  • Loading branch information...
1 parent 0321eb7 commit 0f3fa0bdf16cbed039bd4fae4678bb1dc9b4a5fc @datiecher datiecher committed
Showing with 7 additions and 2 deletions.
  1. +7 −2 g.radar.js
View
9 g.radar.js
@@ -32,7 +32,8 @@
pathStrokeWidth: 3,
pathCircleOuterRadius: 4,
pathCircleInnerRadius: 2,
- drawPathCircles: true
+ drawPathCircles: true,
+ closePath: true
};
//replacing default opts with explicitly provided
for (var prop in opts) {
@@ -105,7 +106,11 @@
pathData.push(cy + r / max * values[i] * Math.sin(rad));
++i;
}
- pathData.push("Z");
+
+ if (opts.closePath) {
+ pathData.push("Z");
+ }
+
paper.path(pathData.join(",")).attr({
"stroke": opts.pathStroke,
"fill": opts.pathFill,

0 comments on commit 0f3fa0b

Please sign in to comment.
Something went wrong with that request. Please try again.