Browse Source

Fix bug for raw timeseries input - #311

pull/319/head
Masayuki Tanaka 10 years ago
parent
commit
d1783abed6
  1. 12
      c3.js
  2. 2
      c3.min.js

12
c3.js

@ -1464,7 +1464,17 @@
function generateTargetX(rawX, id, index) {
var x;
if (isTimeSeries) {
x = rawX ? rawX instanceof Date ? rawX : parseDate(rawX) : parseDate(getXValue(id, index));
if (rawX) {
if (typeof rawX === 'number') {
x = new Date(rawX);
} else if (rawX instanceof Date) {
x = rawX;
} else {
x = parseDate(rawX);
}
} else {
x = parseDate(getXValue(id, index));
}
}
else if (isCustomX() && !isCategorized) {
x = isValue(rawX) ? +rawX : getXValue(id, index);

2
c3.min.js vendored

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