Browse Source

gauge_arcs_minWidth property to determine the minimal width of gaugearcs until the innerRadius disappears

pull/1355/head
Gökhan Özen 9 years ago
parent
commit
6ecc609878
  1. 2
      src/arc.js
  2. 1
      src/config.js

2
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;

1
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

Loading…
Cancel
Save