Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add support for per-dataset nostroke option

  • Loading branch information...
commit dd17c28d0e77b9c276e5e5b3dcff47f5cff48292 1 parent 5e25a5c
@al2o3cr authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 g.line.js
View
9 g.line.js
@@ -82,7 +82,8 @@
for (i = 0, ii = valuesy.length; i < ii; i++) {
if (opts.shade) {
- shades.push(paper.path().attr({ stroke: "none", fill: colors[i], opacity: opts.nostroke ? 1 : .3 }));
+ var nostroke = Raphael.is(nostroke, "array") ? opts.nostroke[i] : opts.nostroke;
+ shades.push(paper.path().attr({ stroke: "none", fill: colors[i], opacity: nostroke ? 1 : .3 }));
}
if (valuesy[i].length > width - 2 * gutter) {
@@ -121,7 +122,9 @@
line;
for (i = 0, ii = valuesy.length; i < ii; i++) {
- if (!opts.nostroke) {
+ var nostroke = Raphael.is(nostroke, "array") ? opts.nostroke[i] : opts.nostroke;
+
+ if (!nostroke) {
lines.push(line = paper.path().attr({
stroke: colors[i],
"stroke-width": opts.width || 2,
@@ -171,7 +174,7 @@
shades[i].attr({ path: path.concat(["L", X, y + height - gutter, "L", x + gutter + ((valuesx[i] || valuesx[0])[0] - minx) * kx, y + height - gutter, "z"]).join(",") });
}
- !opts.nostroke && line.attr({ path: path.join(",") });
+ !nostroke && line.attr({ path: path.join(",") });
}
function createColumns(f) {
Please sign in to comment.
Something went wrong with that request. Please try again.