js/highcharts-master/samples/highcharts/studies/timeline-areaspline/demo.js
/**
 * Update the chart. This happens either on updating (moving) the range input,
 * or from a timer when the timeline is playing.
 */
Update the chart. This happens either on updating (moving) the range input,
or from a timer when the timeline is playing.
Update the chart . This happens either on updating ( moving ) the range input or from a timer when the timeline is playing .
function update(increment) {
    var input = $('#play-range')[0],
        output = $('#play-output')[0];
    if (increment) {
        input.value = parseInt(input.value, 10) + increment;
    }
    chart.series[0].setData(dataSequence[input.value].data); 
    output.innerHTML = dataSequence[input.value].name; 
    if (input.value >= input.max) { 
        pause($('#play-pause-button')[0]);
    }
}
function update ( increment ) { var input = $ ( '#play-range' ) [ 0 ] , output = $ ( '#play-output' ) [ 0 ] ; if ( increment ) { input . value = parseInt ( input . value , 10 ) + increment ; } chart . series [ 0 ] . setData ( dataSequence [ input . value ] . data ) ; output . innerHTML = dataSequence [ input . value ] . name ; if ( input . value >= input . max ) { pause ( $ ( '#play-pause-button' ) [ 0 ] ) ; } }
Update the chart.
Update the chart .
// Increment dataset (updates chart) // Output value // Auto-pause