in riff-raff/public/javascripts/rickshaw.js [438:468]
this.validateSeries = function(series) {
if (!(series instanceof Array) && !(series instanceof Rickshaw.Series)) {
var seriesSignature = Object.prototype.toString.apply(series);
throw "series is not an array: " + seriesSignature;
}
var pointsCount;
series.forEach( function(s) {
if (!(s instanceof Object)) {
throw "series element is not an object: " + s;
}
if (!(s.data)) {
throw "series has no data: " + JSON.stringify(s);
}
if (!(s.data instanceof Array)) {
throw "series data is not an array: " + JSON.stringify(s.data);
}
var x = s.data[0].x;
var y = s.data[0].y;
if (typeof x != 'number' || ( typeof y != 'number' && y !== null ) ) {
throw "x and y properties of points should be numbers instead of " +
(typeof x) + " and " + (typeof y);
}
}, this );
};