JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://code.highcharts.com/highcharts.js"></script>

<div id="GPS" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
<div id="result"></div>

JavaScript

$(document).ready(function() {
    var chartGPS = new Highcharts.Chart({
        chart: {
            renderTo: 'GPS',
            type: 'line',
            height: 250
        },
        title: {
            text: 'Altitude'
        },
        xAxis: {
            title: 'Arduino Time'
        },
        yAxis: {
            title: {
                text: 'Altitude'
            }
        },
        series: [{
            name: 'GPS',
            data: [[2951, 0], [3545, 50], [4139, 102], [4732, 85], [5326, 73]]
        }]
    });
    var lastUpdate = 0;
    var theSeries = chartGPS.series[0].data;

    $("#result").append("About to try finding the largest value of X... ");

    // Loop to determine last updated timestamp
    for (var i in theSeries) {
        // I think theSeries[i][0] should be the x value for each pair
        alert(theSeries[i]);                
        if (theSeries[i][0] > lastUpdate) {                
            lastUpdate = theSeries[i][0];
        }
    }
    $("#result").append("DONE: ");
    $("#result").append(lastUpdate);
    $("#result").append("<br>");

});