X-Git-Url: https://www.nos-oignons.net/gitweb/graphnion.git/blobdiff_plain/63c3875c3bc5cf22e59d18561e11c325247d9835..refs/heads/refactor:/graphnion.js diff --git a/graphnion.js b/graphnion.js index b4ac1a6..77d951c 100644 --- a/graphnion.js +++ b/graphnion.js @@ -33,6 +33,7 @@ this.options.type = options.type || defaults.type; this.options.size = options.size || defaults.size; + this.options.width = options.width || (this.options.size / 5); // Radius * 10% this.options.colors = options.colors || defaults.colors; this.options.onionoo = options.onionoo; @@ -51,11 +52,10 @@ var self = this; this.radius = this.options.size / 2, - this.labelRadius = this.radius - (this.options.size / 10) this.formatPercent = d3.format(".2%"); this.arc = d3.svg.arc() - .outerRadius(this.radius - (this.options.size / 10)) - .innerRadius(this.radius - (this.options.size / 4)); + .outerRadius(this.radius) + .innerRadius(this.radius - this.options.width); this.pie = d3.layout.pie() .sort(null)