Browse Source

Fix bug for xy and timeseries load

pull/155/head
Masayuki Tanaka 11 years ago
parent
commit
069a6491c8
  1. 7
      c3.js
  2. 2
      c3.min.js

7
c3.js

@ -1338,11 +1338,16 @@
// save x for update data by load when custom x and c3.x API
ids.forEach(function (id) {
var xKey = getXKey(id);
var xKey = getXKey(id), idsForX = Object.keys(c3.data.x);
if (isCustomX || isTimeSeries) {
if (xs.indexOf(xKey) >= 0) {
c3.data.x[id] = data.map(function (d) { return d[xKey]; });
}
// Use other id's x when same x (data.x option) specified.
else if (__data_x && idsForX.length > 0) {
c3.data.x[id] = c3.data.x[idsForX[0]];
}
// MEMO: if no x included, use same x of current will be used
} else {
c3.data.x[id] = data.map(function (d, i) { return i; });

2
c3.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save