Commit 5047173c authored by Masayuki Tanaka's avatar Masayuki Tanaka

Check timeseries column when load data

parent 4f493c8e
......@@ -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)
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment