Browse Source

Check timeseries column when load data

pull/1/head
Masayuki Tanaka 11 years ago
parent
commit
5047173ccf
  1. 7
      c3.js

7
c3.js

@ -431,7 +431,12 @@
var targets, i = 0
data.forEach(function(d) {
d.x = (isTimeSeries) ? parseDate(d[__data_x]) : i++
if (isTimeSeries) {
if (!(__data_x in d)) throw Error("'" + __data_x + "' must be included in data");
d.x = parseDate(d[__data_x]);
} else {
d.x = i++;
}
if (firstDate === null) firstDate = new Date(d.x)
lastDate = new Date(d.x)
})

Loading…
Cancel
Save