|
|
@ -265,18 +265,22 @@ c3_chart_internal_fn.redrawArc = function (duration, durationForExit, withTransf |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
updated = $$.updateAngle(d); |
|
|
|
updated = $$.updateAngle(d); |
|
|
|
arcData = $$.convertToArcData(updated); |
|
|
|
if (updated) { |
|
|
|
// transitions
|
|
|
|
arcData = $$.convertToArcData(updated); |
|
|
|
$$.expandArc(updated.data.id); |
|
|
|
// transitions
|
|
|
|
$$.api.focus(updated.data.id); |
|
|
|
$$.expandArc(updated.data.id); |
|
|
|
$$.toggleFocusLegend(updated.data.id, true); |
|
|
|
$$.api.focus(updated.data.id); |
|
|
|
$$.config.data_onmouseover(arcData, this); |
|
|
|
$$.toggleFocusLegend(updated.data.id, true); |
|
|
|
|
|
|
|
$$.config.data_onmouseover(arcData, this); |
|
|
|
|
|
|
|
} |
|
|
|
} : null) |
|
|
|
} : null) |
|
|
|
.on('mousemove', config.interaction_enabled ? function (d) { |
|
|
|
.on('mousemove', config.interaction_enabled ? function (d) { |
|
|
|
var updated = $$.updateAngle(d), |
|
|
|
var updated = $$.updateAngle(d), arcData, selectedData; |
|
|
|
|
|
|
|
if (updated) { |
|
|
|
arcData = $$.convertToArcData(updated), |
|
|
|
arcData = $$.convertToArcData(updated), |
|
|
|
selectedData = [arcData]; |
|
|
|
selectedData = [arcData]; |
|
|
|
$$.showTooltip(selectedData, this); |
|
|
|
$$.showTooltip(selectedData, this); |
|
|
|
|
|
|
|
} |
|
|
|
} : null) |
|
|
|
} : null) |
|
|
|
.on('mouseout', config.interaction_enabled ? function (d) { |
|
|
|
.on('mouseout', config.interaction_enabled ? function (d) { |
|
|
|
var updated, arcData; |
|
|
|
var updated, arcData; |
|
|
@ -284,19 +288,25 @@ c3_chart_internal_fn.redrawArc = function (duration, durationForExit, withTransf |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
updated = $$.updateAngle(d); |
|
|
|
updated = $$.updateAngle(d); |
|
|
|
arcData = $$.convertToArcData(updated); |
|
|
|
if (updated) { |
|
|
|
// transitions
|
|
|
|
arcData = $$.convertToArcData(updated); |
|
|
|
$$.unexpandArc(updated.data.id); |
|
|
|
// transitions
|
|
|
|
$$.api.revert(); |
|
|
|
$$.unexpandArc(updated.data.id); |
|
|
|
$$.revertLegend(); |
|
|
|
$$.api.revert(); |
|
|
|
$$.hideTooltip(); |
|
|
|
$$.revertLegend(); |
|
|
|
$$.config.data_onmouseout(arcData, this); |
|
|
|
$$.hideTooltip(); |
|
|
|
|
|
|
|
$$.config.data_onmouseout(arcData, this); |
|
|
|
|
|
|
|
} |
|
|
|
} : null) |
|
|
|
} : null) |
|
|
|
.on('click', config.interaction_enabled ? function (d, i) { |
|
|
|
.on('click', config.interaction_enabled ? function (d, i) { |
|
|
|
var updated = $$.updateAngle(d), |
|
|
|
var updated = $$.updateAngle(d), arcData; |
|
|
|
|
|
|
|
if (updated) { |
|
|
|
arcData = $$.convertToArcData(updated); |
|
|
|
arcData = $$.convertToArcData(updated); |
|
|
|
if ($$.toggleShape) { $$.toggleShape(this, arcData, i); } |
|
|
|
if ($$.toggleShape) { |
|
|
|
$$.config.data_onclick.call($$.api, arcData, this); |
|
|
|
$$.toggleShape(this, arcData, i); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$$.config.data_onclick.call($$.api, arcData, this); |
|
|
|
|
|
|
|
} |
|
|
|
} : null) |
|
|
|
} : null) |
|
|
|
.each(function () { $$.transiting = true; }) |
|
|
|
.each(function () { $$.transiting = true; }) |
|
|
|
.transition().duration(duration) |
|
|
|
.transition().duration(duration) |
|
|
|