src/views/timechart.js
function(seriesKeys) {
        var fieldValues = _.values(seriesKeys),
            matchingSeriesDef = _.find(this._attributes.series, function(seriesDef) {
                return _.contains(fieldValues, seriesDef.name);
            });
        if (!matchingSeriesDef) {
            return _.find(this._attributes.series, function(seriesDef) {
                return !seriesDef.name;
            });
        }
        return matchingSeriesDef;
    }
function(seriesKeys) {
        var fieldValues = _.values(seriesKeys),
            matchingSeriesDef = _.find(this._attributes.series, function(seriesDef) {
                return _.contains(fieldValues, seriesDef.name);
            });
        if (!matchingSeriesDef) {
            return _.find(this._attributes.series, function(seriesDef) {
                return !seriesDef.name;
            });
        }
        return matchingSeriesDef;
    }
function ( seriesKeys ) { var fieldValues = _ . values ( seriesKeys ) , matchingSeriesDef = _ . find ( this . _attributes . series , function ( seriesDef ) { return _ . contains ( fieldValues , seriesDef . name ) ; } ) ; if ( ! matchingSeriesDef ) { return _ . find ( this . _attributes . series , function ( seriesDef ) { return ! seriesDef . name ; } ) ; } return matchingSeriesDef ; }
returns a series def if the series def has a name value that matches one of the series keys.
returns a series def if the series def has a name value that matches one of the series keys .