X-Git-Url: https://nos-oignons.net/gitweb/graphnion.git/blobdiff_plain/855f3a7f62fbee80aa5f7a1b559375768fe12742..6eef74eb4b269f75aec9a395e13990fc871a07d0:/graphnion.js diff --git a/graphnion.js b/graphnion.js index de1d917..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; @@ -53,8 +54,8 @@ this.radius = this.options.size / 2, 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)