score:1

Accepted answer

You can preprocess your data to calculate accurate x position on xAxis:

var sampleData = [
        [201906281815, 1],
        [201906281815, 4],
        [201906281830, 10],
        [201906281830, 7],
        [201906281830, 15],
        [201906281845, 11],
        [201906281845, 8],
        [201906281845, 22]
    ],
    repeated = 0,
    newData = [],
    xData = 0,
    yIndex = 0,
    step,
    j,
    categories = [];

sampleData.forEach(function(el, i) {
    if (sampleData[i + 1] && sampleData[i + 1][0] === el[0]) {
        repeated++
    } else {
        step = 1 / (repeated + 1);

        for (j = -0.5 + step / 2; j <= 0.5 - step / 2; j += step) {
            newData.push([
                xData + j,
                sampleData[yIndex][1]
            ]);

            yIndex++;
        }
        xData++;
        repeated = 0;
        categories.push(el[0]);
    }
});

Highcharts.chart('container', {
    series: [{
        data: newData
    }],
    xAxis: {
        categories: categories
    }
});

Live demo: http://jsfiddle.net/BlackLabel/4jfr1cgx/


Related Query

More Query from same tag