Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added to documentation and updated an index default to be more sane. #185

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions g.pie.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
o init (boolean) whether or not to show animation when the chart is ready [default `false`]
o colors (array) colors be used to plot the chart
o href (array) urls to to set up clicks on chart slices
o matchColors (boolean) is colors-array matched with legends-array [default: `false`]
o legend (array) array containing strings that will be used in a legend. Other label options work if legend is defined.
o legendcolor (string) color of text in legend [default `"#000"`]
o legendothers (string) text that will be used in legend to describe options that are collapsed into 1 slice, because they are too small to render [default `"Others"`]
Expand Down Expand Up @@ -131,7 +132,7 @@

var path = sector(cx, cy, r, angle, angle -= 360 * values[i] / total);
var j = (opts.matchColors && opts.matchColors == true) ? values[i].order : i;
var p = paper.path(opts.init ? ipath : path).attr({ fill: opts.colors && opts.colors[j] || chartinst.colors[j] || "#666", stroke: opts.stroke || "#fff", "stroke-width": (opts.strokewidth == null ? 1 : opts.strokewidth), "stroke-linejoin": "round" });
var p = paper.path(opts.init ? ipath : path).attr({ fill: opts.colors && opts.colors[j] || chartinst.colors[i] || "#666", stroke: opts.stroke || "#fff", "stroke-width": (opts.strokewidth == null ? 1 : opts.strokewidth), "stroke-linejoin": "round" });

p.value = values[i];
p.middle = path.middle;
Expand Down Expand Up @@ -293,4 +294,4 @@
return new Piechart(this, cx, cy, r, values, opts);
}

})();
})();