Commit f29b9714 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Avoid updating arc targets when it's not needed - #172

parent b790f46a
...@@ -413,7 +413,10 @@ ...@@ -413,7 +413,10 @@
$$.updateTargetsForLine(targets); $$.updateTargetsForLine(targets);
//-- Arc --// //-- Arc --//
if ($$.updateTargetsForArc) { $$.updateTargetsForArc(targets); } if ($$.hasArcType() && $$.updateTargetsForArc) { $$.updateTargetsForArc(targets); }
/*-- Sub --*/
if ($$.updateTargetsForSubchart) { $$.updateTargetsForSubchart(targets); } if ($$.updateTargetsForSubchart) { $$.updateTargetsForSubchart(targets); }
/*-- Show --*/ /*-- Show --*/
...@@ -6238,6 +6241,7 @@ ...@@ -6238,6 +6241,7 @@
options.withTransitionForTransform = false; options.withTransitionForTransform = false;
$$.transiting = false; $$.transiting = false;
$$.setTargetType(targetIds, type); $$.setTargetType(targetIds, type);
$$.updateTargets($$.data.targets); // this is needed when transforming to arc
$$.updateAndRedraw(options); $$.updateAndRedraw(options);
}; };
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -11,5 +11,6 @@ c3_chart_internal_fn.transformTo = function (targetIds, type, optionsForRedraw) ...@@ -11,5 +11,6 @@ c3_chart_internal_fn.transformTo = function (targetIds, type, optionsForRedraw)
options.withTransitionForTransform = false; options.withTransitionForTransform = false;
$$.transiting = false; $$.transiting = false;
$$.setTargetType(targetIds, type); $$.setTargetType(targetIds, type);
$$.updateTargets($$.data.targets); // this is needed when transforming to arc
$$.updateAndRedraw(options); $$.updateAndRedraw(options);
}; };
...@@ -408,7 +408,10 @@ c3_chart_internal_fn.updateTargets = function (targets) { ...@@ -408,7 +408,10 @@ c3_chart_internal_fn.updateTargets = function (targets) {
$$.updateTargetsForLine(targets); $$.updateTargetsForLine(targets);
//-- Arc --// //-- Arc --//
if ($$.updateTargetsForArc) { $$.updateTargetsForArc(targets); } if ($$.hasArcType() && $$.updateTargetsForArc) { $$.updateTargetsForArc(targets); }
/*-- Sub --*/
if ($$.updateTargetsForSubchart) { $$.updateTargetsForSubchart(targets); } if ($$.updateTargetsForSubchart) { $$.updateTargetsForSubchart(targets); }
/*-- Show --*/ /*-- Show --*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment