function privateUpdateData(row, col, visible) {
        //Removes old data from array
        //Could be done more concisely....
        while (chartData.length != 0) {
            chartData.shift();
        }
        //Gives the data array of the chart the new data points
        var channelColors = formData.getColors();
        // pull data for each channel of the selected tube
        var dataPoints = plate.get().createTimecourse(row, col);
        for (var i = 0; i < plate.get().channelNum; i++) {
            // set data point properties
            var dp = {
                type: "stepLine",
                showInLegend: true,
                lineThickness: 4,
                name: formData.getData().device.leds[i].wavelength.toString(),
                markerType: "none",
                color: channelColors[i],
                dataPoints: dataPoints[i],
                visible: visible[i]
            }
            if (i == 0) {
                dp.click = function (e) {
                    currentStep = e.dataPoint.x * 1000 * 60 / plate.get().totalTime * (plate.get().numPts - 1);
                    // TO DO: I don't think this works...
                }
            }
            // add to data array
            chartData.push(dp);
        }
        // Adjust x-axis maximum to prevent x-tick clipping
        try {
            chartReference.options.axisX.maximum = 1.02*plate.get().totalTime/60./1000; // Add 2% to the total time (in min)
        }
        catch (err) {
            chartReference.options.axisX.maximum = 1.02*480;
        }
    }
//Updates the data displayed on the chart to current data
Updates the data displayed on the chart to current data
Updates the data displayed on the chart to current data
function privateUpdateData(row, col, visible) {
        while (chartData.length != 0) {
            chartData.shift();
        }
        var channelColors = formData.getColors();
        var dataPoints = plate.get().createTimecourse(row, col);
        for (var i = 0; i < plate.get().channelNum; i++) {
            var dp = {
                type: "stepLine",
                showInLegend: true,
                lineThickness: 4,
                name: formData.getData().device.leds[i].wavelength.toString(),
                markerType: "none",
                color: channelColors[i],
                dataPoints: dataPoints[i],
                visible: visible[i]
            }
            if (i == 0) {
                dp.click = function (e) {
                    currentStep = e.dataPoint.x * 1000 * 60 / plate.get().totalTime * (plate.get().numPts - 1);
                }
            }
            chartData.push(dp);
        }
        try {
            chartReference.options.axisX.maximum = 1.02*plate.get().totalTime/60./1000; 
        }
        catch (err) {
            chartReference.options.axisX.maximum = 1.02*480;
        }
    }
function privateUpdateData ( row , col , visible ) { while ( chartData . length != 0 ) { chartData . shift ( ) ; } var channelColors = formData . getColors ( ) ; var dataPoints = plate . get ( ) . createTimecourse ( row , col ) ; for ( var i = 0 ; i < plate . get ( ) . channelNum ; i ++ ) { var dp = { type : "stepLine" , showInLegend : true , lineThickness : 4 , name : formData . getData ( ) . device . leds [ i ] . wavelength . toString ( ) , markerType : "none" , color : channelColors [ i ] , dataPoints : dataPoints [ i ] , visible : visible [ i ] } if ( i == 0 ) { dp . click = function ( e ) { currentStep = e . dataPoint . x * 1000 * 60 / plate . get ( ) . totalTime * ( plate . get ( ) . numPts - 1 ) ; } } chartData . push ( dp ) ; } try { chartReference . options . axisX . maximum = 1.02 * plate . get ( ) . totalTime / 60. / 1000 ; } catch ( err ) { chartReference . options . axisX . maximum = 1.02 * 480 ; } }
Updates the data displayed on the chart to current data
Updates the data displayed on the chart to current data
//Removes old data from array //Could be done more concisely.... //Gives the data array of the chart the new data points // pull data for each channel of the selected tube // set data point properties // TO DO: I don't think this works... // add to data array // Adjust x-axis maximum to prevent x-tick clipping // Add 2% to the total time (in min)