Browse Source

Fix cx and cy to be generated after params update

pull/729/head
Masayuki Tanaka 10 years ago
parent
commit
4e03d50a26
  1. 8
      c3.js
  2. 2
      c3.min.js
  3. 8
      src/core.js

8
c3.js

@ -433,9 +433,7 @@
var duration, durationForExit, durationForAxis;
var waitForDraw, flow;
var targetsToShow = $$.filterTargetsToShow($$.data.targets), tickValues, i, intervalForCulling, xDomainForZoom;
var xv = $$.xv.bind($$),
cx = ($$.config.axis_rotated ? $$.generateCircleY() : $$.circleX).bind($$),
cy = ($$.config.axis_rotated ? $$.circleX : $$.generateCircleY()).bind($$);
var xv = $$.xv.bind($$), cx, cy;
options = options || {};
withY = getOption(options, "withY", true);
@ -592,6 +590,10 @@
if ($$.updateZoom) { $$.updateZoom(); }
}
// generate circle x/y functions depending on updated params
cx = ($$.config.axis_rotated ? $$.generateCircleY() : $$.circleX).bind($$);
cy = ($$.config.axis_rotated ? $$.circleX : $$.generateCircleY()).bind($$);
// transition should be derived from one transition
d3.transition().duration(duration).each(function () {
var transitions = [];

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

8
src/core.js

@ -428,9 +428,7 @@ c3_chart_internal_fn.redraw = function (options, transitions) {
var duration, durationForExit, durationForAxis;
var waitForDraw, flow;
var targetsToShow = $$.filterTargetsToShow($$.data.targets), tickValues, i, intervalForCulling, xDomainForZoom;
var xv = $$.xv.bind($$),
cx = ($$.config.axis_rotated ? $$.generateCircleY() : $$.circleX).bind($$),
cy = ($$.config.axis_rotated ? $$.circleX : $$.generateCircleY()).bind($$);
var xv = $$.xv.bind($$), cx, cy;
options = options || {};
withY = getOption(options, "withY", true);
@ -587,6 +585,10 @@ c3_chart_internal_fn.redraw = function (options, transitions) {
if ($$.updateZoom) { $$.updateZoom(); }
}
// generate circle x/y functions depending on updated params
cx = ($$.config.axis_rotated ? $$.generateCircleY() : $$.circleX).bind($$);
cy = ($$.config.axis_rotated ? $$.circleX : $$.generateCircleY()).bind($$);
// transition should be derived from one transition
d3.transition().duration(duration).each(function () {
var transitions = [];

Loading…
Cancel
Save