From 6ecc60987826c2d095406a5d26dfdb914b90d5df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6khan=20=C3=96zen?= Date: Fri, 28 Aug 2015 09:36:31 +0200 Subject: [PATCH] gauge_arcs_minWidth property to determine the minimal width of gaugearcs until the innerRadius disappears --- src/arc.js | 2 +- src/config.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/arc.js b/src/arc.js index 7fe5390..626e0b5 100644 --- a/src/arc.js +++ b/src/arc.js @@ -11,7 +11,7 @@ c3_chart_internal_fn.initPie = function () { c3_chart_internal_fn.updateRadius = function () { var $$ = this, config = $$.config, w = config.gauge_width || config.donut_width, - gaugeArcWidth = $$.visibleTargetCount * 5; // 5 = minimal arc width of one arc in multi arc gauge; TODO in config + gaugeArcWidth = $$.visibleTargetCount * $$.config.gauge_arcs_minWidth; $$.radiusExpanded = Math.min($$.arcWidth, $$.arcHeight) / 2 * ($$.hasType('gauge') ? 0.85 : 1); $$.radius = $$.radiusExpanded * 0.95; $$.innerRadiusRatio = w ? ($$.radius - w) / $$.radius : 0.6; diff --git a/src/config.js b/src/config.js index 0972b12..460569f 100644 --- a/src/config.js +++ b/src/config.js @@ -178,6 +178,7 @@ c3_chart_internal_fn.getDefaultConfig = function () { gauge_max: 100, gauge_units: undefined, gauge_width: undefined, + gauge_arcs_minWidth: 5, gauge_expand: {}, gauge_expand_duration: 50, // donut