|
|
|
@ -282,7 +282,7 @@
|
|
|
|
|
var __donut_label_show = getConfig(['donut', 'label', 'show'], true), |
|
|
|
|
__donut_label_format = getConfig(['donut', 'label', 'format']), |
|
|
|
|
__donut_label_threshold = getConfig(['donut', 'label', 'threshold'], 0.05), |
|
|
|
|
__donut_radius_inner = getConfig(['donut', 'radius', 'inner']), |
|
|
|
|
__donut_width = getConfig(['donut', 'width']), |
|
|
|
|
__donut_sort = getConfig(['donut', 'sort'], true), |
|
|
|
|
__donut_expand = getConfig(['donut', 'expand'], true), |
|
|
|
|
__donut_title = getConfig(['donut', 'title'], ""); |
|
|
|
@ -530,21 +530,11 @@
|
|
|
|
|
.attr("y2", __axis_rotated ? -10 : height); |
|
|
|
|
} |
|
|
|
|
function updateRadius() { |
|
|
|
|
var innerRadiusRatio; |
|
|
|
|
var innerRadiusRatio, w = __gauge_width || __donut_width; |
|
|
|
|
radiusExpanded = Math.min(arcWidth, arcHeight) / 2; |
|
|
|
|
radius = radiusExpanded * 0.95; |
|
|
|
|
innerRadiusRatio = __gauge_width ? (radius - __gauge_width) / radius : 0.6; |
|
|
|
|
if (hasDonutType(c3.data.targets) || hasGaugeType(c3.data.targets)) { |
|
|
|
|
if (typeof __donut_radius_inner === 'function') { |
|
|
|
|
innerRadius = __donut_radius_inner(radius, innerRadiusRatio); |
|
|
|
|
} else if (__donut_radius_inner) { |
|
|
|
|
innerRadius = __donut_radius_inner; |
|
|
|
|
} else { |
|
|
|
|
innerRadius = radius * innerRadiusRatio; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
innerRadius = 0; |
|
|
|
|
} |
|
|
|
|
innerRadiusRatio = w ? (radius - w) / radius : 0.6; |
|
|
|
|
innerRadius = hasDonutType(c3.data.targets) || hasGaugeType(c3.data.targets) ? radius * innerRadiusRatio : 0; |
|
|
|
|
} |
|
|
|
|
function getSvgLeft() { |
|
|
|
|
var leftAxisClass = __axis_rotated ? CLASS.axisX : CLASS.axisY, |
|
|
|
|