src/views/timechart.js
function(options) {
        var userOptions = options;
        var series = userOptions.series;
        if (!series) {
            return userOptions;
        }
        series.forEach(function(value, index) {
            if (Object.keys(userOptions.yScales).length < 2 && Object.keys(userOptions.yScales).indexOf(value.yScale) === -1 && value.yScale === 'secondary') {
                userOptions.yScales[value.yScale] = {
                    scaling: 'linear',
                    minValue: 'auto',
                    maxValue: 'auto',
                    displayOnAxis: 'right'
                };
            }
        });
        return userOptions;
    }
function(options) {
        var userOptions = options;
        var series = userOptions.series;
        if (!series) {
            return userOptions;
        }
        series.forEach(function(value, index) {
            if (Object.keys(userOptions.yScales).length < 2 && Object.keys(userOptions.yScales).indexOf(value.yScale) === -1 && value.yScale === 'secondary') {
                userOptions.yScales[value.yScale] = {
                    scaling: 'linear',
                    minValue: 'auto',
                    maxValue: 'auto',
                    displayOnAxis: 'right'
                };
            }
        });
        return userOptions;
    }
function ( options ) { var userOptions = options ; var series = userOptions . series ; if ( ! series ) { return userOptions ; } series . forEach ( function ( value , index ) { if ( Object . keys ( userOptions . yScales ) . length < 2 && Object . keys ( userOptions . yScales ) . indexOf ( value . yScale ) === - 1 && value . yScale === 'secondary' ) { userOptions . yScales [ value . yScale ] = { scaling : 'linear' , minValue : 'auto' , maxValue : 'auto' , displayOnAxis : 'right' } ; } } ) ; return userOptions ; }
adds secondary scale if necessary
adds secondary scale if necessary