Browse Source

Move transformTo to api.transform.js

pull/486/head
Masayuki Tanaka 10 years ago
parent
commit
24e06dd40c
  1. 20
      c3.js
  2. 6
      c3.min.js
  3. 10
      src/api.transform.js
  4. 10
      src/core.js

20
c3.js

@ -802,16 +802,6 @@
return callResizeFunctions;
};
c3_chart_internal_fn.transformTo = function (targetIds, type, optionsForRedraw) {
var $$ = this,
withTransitionForAxis = !$$.hasArcType(),
options = optionsForRedraw || {withTransitionForAxis: withTransitionForAxis};
options.withTransitionForTransform = false;
$$.transiting = false;
$$.setTargetType(targetIds, type);
$$.updateAndRedraw(options);
};
c3_chart_internal_fn.endall = function (transition, callback) {
var n = 0;
transition
@ -5911,6 +5901,16 @@
$$.transformTo(targetIds, type, options);
};
c3_chart_internal_fn.transformTo = function (targetIds, type, optionsForRedraw) {
var $$ = this,
withTransitionForAxis = !$$.hasArcType(),
options = optionsForRedraw || {withTransitionForAxis: withTransitionForAxis};
options.withTransitionForTransform = false;
$$.transiting = false;
$$.setTargetType(targetIds, type);
$$.updateAndRedraw(options);
};
c3_chart_fn.groups = function (groups) {
var $$ = this.internal, config = $$.config;
if (isUndefined(groups)) { return config[__data_groups]; }

6
c3.min.js vendored

File diff suppressed because one or more lines are too long

10
src/api.transform.js

@ -3,3 +3,13 @@ c3_chart_fn.transform = function (type, targetIds) {
options = ['pie', 'donut'].indexOf(type) >= 0 ? {withTransform: true} : null;
$$.transformTo(targetIds, type, options);
};
c3_chart_internal_fn.transformTo = function (targetIds, type, optionsForRedraw) {
var $$ = this,
withTransitionForAxis = !$$.hasArcType(),
options = optionsForRedraw || {withTransitionForAxis: withTransitionForAxis};
options.withTransitionForTransform = false;
$$.transiting = false;
$$.setTargetType(targetIds, type);
$$.updateAndRedraw(options);
};

10
src/core.js

@ -797,16 +797,6 @@ c3_chart_internal_fn.generateResize = function () {
return callResizeFunctions;
};
c3_chart_internal_fn.transformTo = function (targetIds, type, optionsForRedraw) {
var $$ = this,
withTransitionForAxis = !$$.hasArcType(),
options = optionsForRedraw || {withTransitionForAxis: withTransitionForAxis};
options.withTransitionForTransform = false;
$$.transiting = false;
$$.setTargetType(targetIds, type);
$$.updateAndRedraw(options);
};
c3_chart_internal_fn.endall = function (transition, callback) {
var n = 0;
transition

Loading…
Cancel
Save