score:1

Accepted answer

You can loop through your data and round timestamps to the nearest date:

function roundDate(timeStamp) {
    timeStamp -= timeStamp % (24 * 60 * 60 * 1000); //subtract amount of time since midnight
    return new Date(timeStamp).getTime();
}

function loopThroughData(data) {
    data.forEach(function(el) {
        el[0] = roundDate(el[0])
    });
}

loopThroughData(series1);
loopThroughData(series2);

Live demo: https://jsfiddle.net/BlackLabel/zhbt4gmw/

Useful thread: Round a timestamp to the nearest date


Related Query

More Query from same tag