Browse Source

Fix bug for timeseries

pull/555/head
Masayuki Tanaka 10 years ago
parent
commit
b5d90f3322
  1. 4
      c3.js
  2. 2
      c3.min.js
  3. 4
      src/domain.js

4
c3.js

@ -1377,11 +1377,11 @@
c3_chart_internal_fn.trimXDomain = function (domain) {
var $$ = this;
if (domain[0] <= $$.orgXDomain[0]) {
domain[1] += $$.orgXDomain[0] - domain[0];
domain[1] = +domain[1] + ($$.orgXDomain[0] - domain[0]);
domain[0] = $$.orgXDomain[0];
}
if ($$.orgXDomain[1] <= domain[1]) {
domain[0] -= domain[1] - $$.orgXDomain[1];
domain[0] = +domain[0] - (domain[1] - $$.orgXDomain[1]);
domain[1] = $$.orgXDomain[1];
}
return domain;

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

4
src/domain.js

@ -210,11 +210,11 @@ c3_chart_internal_fn.updateXDomain = function (targets, withUpdateXDomain, withU
c3_chart_internal_fn.trimXDomain = function (domain) {
var $$ = this;
if (domain[0] <= $$.orgXDomain[0]) {
domain[1] += $$.orgXDomain[0] - domain[0];
domain[1] = +domain[1] + ($$.orgXDomain[0] - domain[0]);
domain[0] = $$.orgXDomain[0];
}
if ($$.orgXDomain[1] <= domain[1]) {
domain[0] -= domain[1] - $$.orgXDomain[1];
domain[0] = +domain[0] - (domain[1] - $$.orgXDomain[1]);
domain[1] = $$.orgXDomain[1];
}
return domain;

Loading…
Cancel
Save